Codebase list cinnamon-menus / 4cd33db
Merge tag 'upstream/2.2.0' Upstream version 2.2.0 Margarita Manterola 9 years ago
51 changed file(s) with 66485 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Mark McLoughlin <mark@skynet.ie>
1 Havoc Pennington <hp@redhat.com>
2 Vincent Untz <vuntz@gnome.org>
0 GNU GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
4 51 Franklin Street, 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 Lesser 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 along
306 with this program; if not, write to the Free Software Foundation, Inc.,
307 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
308
309 Also add information on how to contact you by electronic and paper mail.
310
311 If the program is interactive, make it output a short notice like this
312 when it starts in an interactive mode:
313
314 Gnomovision version 69, Copyright (C) year name of author
315 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
316 This is free software, and you are welcome to redistribute it
317 under certain conditions; type `show c' for details.
318
319 The hypothetical commands `show w' and `show c' should show the appropriate
320 parts of the General Public License. Of course, the commands you use may
321 be called something other than `show w' and `show c'; they could even be
322 mouse-clicks or menu items--whatever suits your program.
323
324 You should also get your employer (if you work as a programmer) or your
325 school, if any, to sign a "copyright disclaimer" for the program, if
326 necessary. Here is a sample; alter the names:
327
328 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
329 `Gnomovision' (which makes passes at compilers) written by James Hacker.
330
331 <signature of Ty Coon>, 1 April 1989
332 Ty Coon, President of Vice
333
334 This General Public License does not permit incorporating your program into
335 proprietary programs. If your program is a subroutine library, you may
336 consider it more useful to permit linking proprietary applications with the
337 library. If this is what you want to do, use the GNU Lesser General
338 Public License instead of this License.
0 GNU LIBRARY GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1991 Free Software Foundation, Inc.
4 51 Franklin Street, 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 [This is the first released version of the library GPL. It is
9 numbered 2 because it goes with version 2 of the ordinary GPL.]
10
11 Preamble
12
13 The licenses for most software are designed to take away your
14 freedom to share and change it. By contrast, the GNU General Public
15 Licenses are intended to guarantee your freedom to share and change
16 free software--to make sure the software is free for all its users.
17
18 This license, the Library General Public License, applies to some
19 specially designated Free Software Foundation software, and to any
20 other libraries whose authors decide to use it. You can use it for
21 your libraries, too.
22
23 When we speak of free software, we are referring to freedom, not
24 price. Our General Public Licenses are designed to make sure that you
25 have the freedom to distribute copies of free software (and charge for
26 this service if you wish), that you receive source code or can get it
27 if you want it, that you can change the software or use pieces of it
28 in new free programs; and that you know you can do these things.
29
30 To protect your rights, we need to make restrictions that forbid
31 anyone to deny you these rights or to ask you to surrender the rights.
32 These restrictions translate to certain responsibilities for you if
33 you distribute copies of the library, or if you modify it.
34
35 For example, if you distribute copies of the library, whether gratis
36 or for a fee, you must give the recipients all the rights that we gave
37 you. You must make sure that they, too, receive or can get the source
38 code. If you link a program with the library, you must provide
39 complete object files to the recipients so that they can relink them
40 with the library, after making changes to the library and recompiling
41 it. And you must show them these terms so they know their rights.
42
43 Our method of protecting your rights has two steps: (1) copyright
44 the library, and (2) offer you this license which gives you legal
45 permission to copy, distribute and/or modify the library.
46
47 Also, for each distributor's protection, we want to make certain
48 that everyone understands that there is no warranty for this free
49 library. If the library is modified by someone else and passed on, we
50 want its recipients to know that what they have is not the original
51 version, so that any problems introduced by others will not reflect on
52 the original authors' reputations.
53
54 Finally, any free program is threatened constantly by software
55 patents. We wish to avoid the danger that companies distributing free
56 software will individually obtain patent licenses, thus in effect
57 transforming the program into proprietary software. To prevent this,
58 we have made it clear that any patent must be licensed for everyone's
59 free use or not licensed at all.
60
61 Most GNU software, including some libraries, is covered by the ordinary
62 GNU General Public License, which was designed for utility programs. This
63 license, the GNU Library General Public License, applies to certain
64 designated libraries. This license is quite different from the ordinary
65 one; be sure to read it in full, and don't assume that anything in it is
66 the same as in the ordinary license.
67
68 The reason we have a separate public license for some libraries is that
69 they blur the distinction we usually make between modifying or adding to a
70 program and simply using it. Linking a program with a library, without
71 changing the library, is in some sense simply using the library, and is
72 analogous to running a utility program or application program. However, in
73 a textual and legal sense, the linked executable is a combined work, a
74 derivative of the original library, and the ordinary General Public License
75 treats it as such.
76
77 Because of this blurred distinction, using the ordinary General
78 Public License for libraries did not effectively promote software
79 sharing, because most developers did not use the libraries. We
80 concluded that weaker conditions might promote sharing better.
81
82 However, unrestricted linking of non-free programs would deprive the
83 users of those programs of all benefit from the free status of the
84 libraries themselves. This Library General Public License is intended to
85 permit developers of non-free programs to use free libraries, while
86 preserving your freedom as a user of such programs to change the free
87 libraries that are incorporated in them. (We have not seen how to achieve
88 this as regards changes in header files, but we have achieved it as regards
89 changes in the actual functions of the Library.) The hope is that this
90 will lead to faster development of free libraries.
91
92 The precise terms and conditions for copying, distribution and
93 modification follow. Pay close attention to the difference between a
94 "work based on the library" and a "work that uses the library". The
95 former contains code derived from the library, while the latter only
96 works together with the library.
97
98 Note that it is possible for a library to be covered by the ordinary
99 General Public License rather than by this special one.
100
101 GNU LIBRARY GENERAL PUBLIC LICENSE
102 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
103
104 0. This License Agreement applies to any software library which
105 contains a notice placed by the copyright holder or other authorized
106 party saying it may be distributed under the terms of this Library
107 General Public License (also called "this License"). Each licensee is
108 addressed as "you".
109
110 A "library" means a collection of software functions and/or data
111 prepared so as to be conveniently linked with application programs
112 (which use some of those functions and data) to form executables.
113
114 The "Library", below, refers to any such software library or work
115 which has been distributed under these terms. A "work based on the
116 Library" means either the Library or any derivative work under
117 copyright law: that is to say, a work containing the Library or a
118 portion of it, either verbatim or with modifications and/or translated
119 straightforwardly into another language. (Hereinafter, translation is
120 included without limitation in the term "modification".)
121
122 "Source code" for a work means the preferred form of the work for
123 making modifications to it. For a library, complete source code means
124 all the source code for all modules it contains, plus any associated
125 interface definition files, plus the scripts used to control compilation
126 and installation of the library.
127
128 Activities other than copying, distribution and modification are not
129 covered by this License; they are outside its scope. The act of
130 running a program using the Library is not restricted, and output from
131 such a program is covered only if its contents constitute a work based
132 on the Library (independent of the use of the Library in a tool for
133 writing it). Whether that is true depends on what the Library does
134 and what the program that uses the Library does.
135
136 1. You may copy and distribute verbatim copies of the Library's
137 complete source code as you receive it, in any medium, provided that
138 you conspicuously and appropriately publish on each copy an
139 appropriate copyright notice and disclaimer of warranty; keep intact
140 all the notices that refer to this License and to the absence of any
141 warranty; and distribute a copy of this License along with the
142 Library.
143
144 You may charge a fee for the physical act of transferring a copy,
145 and you may at your option offer warranty protection in exchange for a
146 fee.
147
148 2. You may modify your copy or copies of the Library or any portion
149 of it, thus forming a work based on the Library, and copy and
150 distribute such modifications or work under the terms of Section 1
151 above, provided that you also meet all of these conditions:
152
153 a) The modified work must itself be a software library.
154
155 b) You must cause the files modified to carry prominent notices
156 stating that you changed the files and the date of any change.
157
158 c) You must cause the whole of the work to be licensed at no
159 charge to all third parties under the terms of this License.
160
161 d) If a facility in the modified Library refers to a function or a
162 table of data to be supplied by an application program that uses
163 the facility, other than as an argument passed when the facility
164 is invoked, then you must make a good faith effort to ensure that,
165 in the event an application does not supply such function or
166 table, the facility still operates, and performs whatever part of
167 its purpose remains meaningful.
168
169 (For example, a function in a library to compute square roots has
170 a purpose that is entirely well-defined independent of the
171 application. Therefore, Subsection 2d requires that any
172 application-supplied function or table used by this function must
173 be optional: if the application does not supply it, the square
174 root function must still compute square roots.)
175
176 These requirements apply to the modified work as a whole. If
177 identifiable sections of that work are not derived from the Library,
178 and can be reasonably considered independent and separate works in
179 themselves, then this License, and its terms, do not apply to those
180 sections when you distribute them as separate works. But when you
181 distribute the same sections as part of a whole which is a work based
182 on the Library, the distribution of the whole must be on the terms of
183 this License, whose permissions for other licensees extend to the
184 entire whole, and thus to each and every part regardless of who wrote
185 it.
186
187 Thus, it is not the intent of this section to claim rights or contest
188 your rights to work written entirely by you; rather, the intent is to
189 exercise the right to control the distribution of derivative or
190 collective works based on the Library.
191
192 In addition, mere aggregation of another work not based on the Library
193 with the Library (or with a work based on the Library) on a volume of
194 a storage or distribution medium does not bring the other work under
195 the scope of this License.
196
197 3. You may opt to apply the terms of the ordinary GNU General Public
198 License instead of this License to a given copy of the Library. To do
199 this, you must alter all the notices that refer to this License, so
200 that they refer to the ordinary GNU General Public License, version 2,
201 instead of to this License. (If a newer version than version 2 of the
202 ordinary GNU General Public License has appeared, then you can specify
203 that version instead if you wish.) Do not make any other change in
204 these notices.
205
206 Once this change is made in a given copy, it is irreversible for
207 that copy, so the ordinary GNU General Public License applies to all
208 subsequent copies and derivative works made from that copy.
209
210 This option is useful when you wish to copy part of the code of
211 the Library into a program that is not a library.
212
213 4. You may copy and distribute the Library (or a portion or
214 derivative of it, under Section 2) in object code or executable form
215 under the terms of Sections 1 and 2 above provided that you accompany
216 it with the complete corresponding machine-readable source code, which
217 must be distributed under the terms of Sections 1 and 2 above on a
218 medium customarily used for software interchange.
219
220 If distribution of object code is made by offering access to copy
221 from a designated place, then offering equivalent access to copy the
222 source code from the same place satisfies the requirement to
223 distribute the source code, even though third parties are not
224 compelled to copy the source along with the object code.
225
226 5. A program that contains no derivative of any portion of the
227 Library, but is designed to work with the Library by being compiled or
228 linked with it, is called a "work that uses the Library". Such a
229 work, in isolation, is not a derivative work of the Library, and
230 therefore falls outside the scope of this License.
231
232 However, linking a "work that uses the Library" with the Library
233 creates an executable that is a derivative of the Library (because it
234 contains portions of the Library), rather than a "work that uses the
235 library". The executable is therefore covered by this License.
236 Section 6 states terms for distribution of such executables.
237
238 When a "work that uses the Library" uses material from a header file
239 that is part of the Library, the object code for the work may be a
240 derivative work of the Library even though the source code is not.
241 Whether this is true is especially significant if the work can be
242 linked without the Library, or if the work is itself a library. The
243 threshold for this to be true is not precisely defined by law.
244
245 If such an object file uses only numerical parameters, data
246 structure layouts and accessors, and small macros and small inline
247 functions (ten lines or less in length), then the use of the object
248 file is unrestricted, regardless of whether it is legally a derivative
249 work. (Executables containing this object code plus portions of the
250 Library will still fall under Section 6.)
251
252 Otherwise, if the work is a derivative of the Library, you may
253 distribute the object code for the work under the terms of Section 6.
254 Any executables containing that work also fall under Section 6,
255 whether or not they are linked directly with the Library itself.
256
257 6. As an exception to the Sections above, you may also compile or
258 link a "work that uses the Library" with the Library to produce a
259 work containing portions of the Library, and distribute that work
260 under terms of your choice, provided that the terms permit
261 modification of the work for the customer's own use and reverse
262 engineering for debugging such modifications.
263
264 You must give prominent notice with each copy of the work that the
265 Library is used in it and that the Library and its use are covered by
266 this License. You must supply a copy of this License. If the work
267 during execution displays copyright notices, you must include the
268 copyright notice for the Library among them, as well as a reference
269 directing the user to the copy of this License. Also, you must do one
270 of these things:
271
272 a) Accompany the work with the complete corresponding
273 machine-readable source code for the Library including whatever
274 changes were used in the work (which must be distributed under
275 Sections 1 and 2 above); and, if the work is an executable linked
276 with the Library, with the complete machine-readable "work that
277 uses the Library", as object code and/or source code, so that the
278 user can modify the Library and then relink to produce a modified
279 executable containing the modified Library. (It is understood
280 that the user who changes the contents of definitions files in the
281 Library will not necessarily be able to recompile the application
282 to use the modified definitions.)
283
284 b) Accompany the work with a written offer, valid for at
285 least three years, to give the same user the materials
286 specified in Subsection 6a, above, for a charge no more
287 than the cost of performing this distribution.
288
289 c) If distribution of the work is made by offering access to copy
290 from a designated place, offer equivalent access to copy the above
291 specified materials from the same place.
292
293 d) Verify that the user has already received a copy of these
294 materials or that you have already sent this user a copy.
295
296 For an executable, the required form of the "work that uses the
297 Library" must include any data and utility programs needed for
298 reproducing the executable from it. However, as a special exception,
299 the source code distributed need not include anything that is normally
300 distributed (in either source or binary form) with the major
301 components (compiler, kernel, and so on) of the operating system on
302 which the executable runs, unless that component itself accompanies
303 the executable.
304
305 It may happen that this requirement contradicts the license
306 restrictions of other proprietary libraries that do not normally
307 accompany the operating system. Such a contradiction means you cannot
308 use both them and the Library together in an executable that you
309 distribute.
310
311 7. You may place library facilities that are a work based on the
312 Library side-by-side in a single library together with other library
313 facilities not covered by this License, and distribute such a combined
314 library, provided that the separate distribution of the work based on
315 the Library and of the other library facilities is otherwise
316 permitted, and provided that you do these two things:
317
318 a) Accompany the combined library with a copy of the same work
319 based on the Library, uncombined with any other library
320 facilities. This must be distributed under the terms of the
321 Sections above.
322
323 b) Give prominent notice with the combined library of the fact
324 that part of it is a work based on the Library, and explaining
325 where to find the accompanying uncombined form of the same work.
326
327 8. You may not copy, modify, sublicense, link with, or distribute
328 the Library except as expressly provided under this License. Any
329 attempt otherwise to copy, modify, sublicense, link with, or
330 distribute the Library is void, and will automatically terminate your
331 rights under this License. However, parties who have received copies,
332 or rights, from you under this License will not have their licenses
333 terminated so long as such parties remain in full compliance.
334
335 9. You are not required to accept this License, since you have not
336 signed it. However, nothing else grants you permission to modify or
337 distribute the Library or its derivative works. These actions are
338 prohibited by law if you do not accept this License. Therefore, by
339 modifying or distributing the Library (or any work based on the
340 Library), you indicate your acceptance of this License to do so, and
341 all its terms and conditions for copying, distributing or modifying
342 the Library or works based on it.
343
344 10. Each time you redistribute the Library (or any work based on the
345 Library), the recipient automatically receives a license from the
346 original licensor to copy, distribute, link with or modify the Library
347 subject to these terms and conditions. You may not impose any further
348 restrictions on the recipients' exercise of the rights granted herein.
349 You are not responsible for enforcing compliance by third parties to
350 this License.
351
352 11. If, as a consequence of a court judgment or allegation of patent
353 infringement or for any other reason (not limited to patent issues),
354 conditions are imposed on you (whether by court order, agreement or
355 otherwise) that contradict the conditions of this License, they do not
356 excuse you from the conditions of this License. If you cannot
357 distribute so as to satisfy simultaneously your obligations under this
358 License and any other pertinent obligations, then as a consequence you
359 may not distribute the Library at all. For example, if a patent
360 license would not permit royalty-free redistribution of the Library by
361 all those who receive copies directly or indirectly through you, then
362 the only way you could satisfy both it and this License would be to
363 refrain entirely from distribution of the Library.
364
365 If any portion of this section is held invalid or unenforceable under any
366 particular circumstance, the balance of the section is intended to apply,
367 and the section as a whole is intended to apply in other circumstances.
368
369 It is not the purpose of this section to induce you to infringe any
370 patents or other property right claims or to contest validity of any
371 such claims; this section has the sole purpose of protecting the
372 integrity of the free software distribution system which is
373 implemented by public license practices. Many people have made
374 generous contributions to the wide range of software distributed
375 through that system in reliance on consistent application of that
376 system; it is up to the author/donor to decide if he or she is willing
377 to distribute software through any other system and a licensee cannot
378 impose that choice.
379
380 This section is intended to make thoroughly clear what is believed to
381 be a consequence of the rest of this License.
382
383 12. If the distribution and/or use of the Library is restricted in
384 certain countries either by patents or by copyrighted interfaces, the
385 original copyright holder who places the Library under this License may add
386 an explicit geographical distribution limitation excluding those countries,
387 so that distribution is permitted only in or among countries not thus
388 excluded. In such case, this License incorporates the limitation as if
389 written in the body of this License.
390
391 13. The Free Software Foundation may publish revised and/or new
392 versions of the Library General Public License from time to time.
393 Such new versions will be similar in spirit to the present version,
394 but may differ in detail to address new problems or concerns.
395
396 Each version is given a distinguishing version number. If the Library
397 specifies a version number of this License which applies to it and
398 "any later version", you have the option of following the terms and
399 conditions either of that version or of any later version published by
400 the Free Software Foundation. If the Library does not specify a
401 license version number, you may choose any version ever published by
402 the Free Software Foundation.
403
404 14. If you wish to incorporate parts of the Library into other free
405 programs whose distribution conditions are incompatible with these,
406 write to the author to ask for permission. For software which is
407 copyrighted by the Free Software Foundation, write to the Free
408 Software Foundation; we sometimes make exceptions for this. Our
409 decision will be guided by the two goals of preserving the free status
410 of all derivatives of our free software and of promoting the sharing
411 and reuse of software generally.
412
413 NO WARRANTY
414
415 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
416 WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
417 EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
418 OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
419 KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
420 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
421 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
422 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
423 THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
424
425 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
426 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
427 AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
428 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
429 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
430 LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
431 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
432 FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
433 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
434 DAMAGES.
435
436 END OF TERMS AND CONDITIONS
437
438 How to Apply These Terms to Your New Libraries
439
440 If you develop a new library, and you want it to be of the greatest
441 possible use to the public, we recommend making it free software that
442 everyone can redistribute and change. You can do so by permitting
443 redistribution under these terms (or, alternatively, under the terms of the
444 ordinary General Public License).
445
446 To apply these terms, attach the following notices to the library. It is
447 safest to attach them to the start of each source file to most effectively
448 convey the exclusion of warranty; and each file should have at least the
449 "copyright" line and a pointer to where the full notice is found.
450
451 <one line to give the library's name and a brief idea of what it does.>
452 Copyright (C) <year> <name of author>
453
454 This library is free software; you can redistribute it and/or
455 modify it under the terms of the GNU Library General Public
456 License as published by the Free Software Foundation; either
457 version 2 of the License, or (at your option) any later version.
458
459 This library is distributed in the hope that it will be useful,
460 but WITHOUT ANY WARRANTY; without even the implied warranty of
461 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
462 Library General Public License for more details.
463
464 You should have received a copy of the GNU Library General Public
465 License along with this library; if not, write to the Free Software
466 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
467
468 Also add information on how to contact you by electronic and paper mail.
469
470 You should also get your employer (if you work as a programmer) or your
471 school, if any, to sign a "copyright disclaimer" for the library, if
472 necessary. Here is a sample; alter the names:
473
474 Yoyodyne, Inc., hereby disclaims all copyright interest in the
475 library `Frob' (a library for tweaking knobs) written by James Random Hacker.
476
477 <signature of Ty Coon>, 1 April 1990
478 Ty Coon, President of Vice
479
480 That's all there is to it!
0 # Generated by Makefile. Do not edit.
1
2 commit 246a46e6f240915c7ba58c455f8d45ea59cebb2e
3 Author: Matthias Clasen <mclasen@redhat.com>
4 Date: Mon Mar 25 22:31:16 2013 -0400
5
6 3.8.0
7
8 M NEWS
9 M configure.ac
10
11 commit 0a37bcb06b0094a677178bd9777758cc16441274
12 Author: Ani Peter <apeter@redhat.com>
13 Date: Mon Mar 25 19:19:17 2013 +0530
14
15 Completed for Malayalam
16
17 M po/ml.po
18
19 commit e28da785eccf196ef0b987b1f4dbe74a5102aff5
20 Author: Krishnababu Krothapalli <kkrothap@redhat.com>
21 Date: Mon Mar 25 15:49:39 2013 +0530
22
23 Updated Telugu Translations
24
25 M po/te.po
26
27 commit 4343c5db75e0b306b835212a98b3edee8ea66db5
28 Author: Reşat SABIQ <tilde.birlik@gmail.com>
29 Date: Sun Mar 24 13:26:35 2013 -0500
30
31 Minor update for Crimean Tatar/Turkish translation
32
33 M po/crh.po
34
35 commit 292ecdb7084cd52c5c8016c2e4b25a78f1debdef
36 Author: Reşat SABIQ <tilde.birlik@gmail.com>
37 Date: Sun Mar 24 13:24:38 2013 -0500
38
39 Updated Crimean Tatar (Crimean Turkish) translation
40
41 M po/crh.po
42
43 commit 47378bcc11d754c3490c7ce06b6a258b8c8afa8c
44 Author: Jiro Matsuzawa <jmatsuzawa@gnome.org>
45 Date: Mon Mar 25 02:30:49 2013 +0900
46
47 l10n: Update Japanese translation
48
49 M po/ja.po
50
51 commit 5e5b387cfd590cd028df6dc323a547e66c76c23b
52 Author: Wouter Bolsterlee <uws@xs4all.nl>
53 Date: Sat Mar 23 23:39:30 2013 +0100
54
55 Updated Dutch translation
56
57 M po/nl.po
58
59 commit 5a6cb52314c39f577ff6faaa6e94bb9620d96f00
60 Author: Daniel Korostil <ted.korostiled@gmail.com>
61 Date: Sat Mar 23 12:42:16 2013 +0200
62
63 Uploaded Ukranian
64
65 M po/uk.po
66
67 commit 370d50f85550cd5e2398198f7148e52c69e2d38f
68 Author: Shantha kumar <shkumar@redhat.com>
69 Date: Fri Mar 22 15:45:10 2013 +0530
70
71 Tamil Translations Updated
72
73 M po/ta.po
74
75 commit 8770020280a690de1f047aa55d360968d187f94b
76 Author: Rajesh Ranjan <rranjan@redhat.com>
77 Date: Fri Mar 22 12:40:18 2013 +0530
78
79 hindi translation
80
81 M po/hi.po
82
83 commit c03b16747e734de180c3dfd678f9657f1f5f163d
84 Author: Sandeep Sheshrao Shedmake <sshedmak@redhat.com>
85 Date: Thu Mar 21 18:46:00 2013 +0530
86
87 Updated Marathi Translations
88
89 M po/mr.po
90
91 commit 5c50a43768e2eff9f68f94b3a1207b0c1d8cd905
92 Author: ManojKumar Giri <mgiri@redhat.com>
93 Date: Wed Mar 20 18:04:23 2013 +0530
94
95 Updated Odia Translation.
96
97 M po/or.po
98
99 commit fb40f7702b8d443e5c6a4983da133b1eafad300c
100 Author: Danial Behzadi <dani.behzi@gmail.com>
101 Date: Wed Mar 20 09:26:27 2013 +0330
102
103 l10n: Updated Persian translation
104
105 M po/fa.po
106
107 commit 107172dc7b4c8b7936113d74f3c53fe53b24bdeb
108 Author: Victor Ibragimov <victor.ibragimov@gmail.com>
109 Date: Tue Mar 19 20:40:30 2013 +0100
110
111 [l10n] Added Tadjik translation
112
113 M po/LINGUAS
114 A po/tg.po
115
116 commit c573fa0e08616a908e6f1c335641ec6c1b9105f4
117 Author: Shankar Prasad <svenkate@redhat.com>
118 Date: Mon Mar 18 16:02:23 2013 +0530
119
120 Updated kn translations
121
122 M po/kn.po
123
124 commit e26a4cd263ffc78db3104a9aca6e85034d48a67b
125 Author: Marek Černocký <marek@manet.cz>
126 Date: Sun Mar 17 22:46:15 2013 +0100
127
128 Updated Czech translation
129
130 M po/cs.po
131
132 commit 3fa134531fa6a7f1ed2ac4b572ea455a55eb1dd4
133 Author: Carles Ferrando <carles.ferrando@gmail.com>
134 Date: Sun Mar 17 19:51:46 2013 +0100
135
136 [l10n] Updated Catalan (Valencian) translation
137
138 M po/ca@valencia.po
139
140 commit 94a7ab3216a5d64c38272f616a20715ea6028b5f
141 Author: Ask H. Larsen <asklarsen@gmail.com>
142 Date: Sun Mar 17 14:44:39 2013 +0100
143
144 Updated Danish translation
145
146 M po/da.po
147
148 commit f4adf5966ff0a6ebc86cdad7b22126dd88859804
149 Author: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
150 Date: Sun Mar 17 16:24:34 2013 +0300
151
152 Updated Belarusian translation.
153
154 M po/be.po
155
156 commit b717f6e4f5d9a792f441f626bb769ec150e4bdd9
157 Author: Changwoo Ryu <cwryu@debian.org>
158 Date: Sat Mar 16 22:26:34 2013 +0900
159
160 Updated Korean translation
161
162 M po/ko.po
163
164 commit 8da5f3028860bfa6f5d8b38f6071285b501bb800
165 Author: Balázs Úr <urbalazs@src.gnome.org>
166 Date: Thu Mar 14 22:14:33 2013 +0100
167
168 Updated Hungarian translation
169
170 M po/hu.po
171
172 commit ca3a6029128122ee4f4b4b991686529174f25d02
173 Author: Duarte Loreto <happyguy_pt@hotmail.com>
174 Date: Tue Mar 12 13:05:37 2013 +0000
175
176 Updated Portuguese translation and converted to New Spelling (Novo AO)
177
178 M po/pt.po
179
180 commit 758c22ec25528869dc96a3a77b76f378e4339d1e
181 Author: Gil Forcada <gforcada@gnome.org>
182 Date: Mon Mar 11 23:01:17 2013 +0100
183
184 [l10n] Updated Catalan translation
185
186 M po/ca.po
187
188 commit ed0dbd6eba3bcff96ce03dc7ba03c1d632e9e14d
189 Author: Mattias Põldaru <mahfiaz@gmail.com>
190 Date: Mon Mar 11 15:31:45 2013 +0200
191
192 [l10n] Updated Estonian translation
193
194 M po/et.po
195
196 commit 2be1f73f29a753a243f8dfcdf540916c8c9f20ad
197 Author: Andika Triwidada <andika@gmail.com>
198 Date: Mon Mar 11 12:39:01 2013 +0700
199
200 Updated Indonesian translation
201
202 M po/id.po
203
204 commit 8d0d9190809b44cdd94ae293d47df2abc4b1fe8d
205 Author: Khaled Hosny <khaledhosny@eglug.org>
206 Date: Sun Mar 10 00:06:18 2013 +0200
207
208 Update Arabic translation
209
210 M po/ar.po
211
212 commit a6c9fb7eaa9c3df19dbe6d555795f563fcdfa7c8
213 Author: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
214 Date: Sat Mar 9 21:28:34 2013 +0600
215
216 Updated Kazakh translation.
217
218 M po/kk.po
219
220 commit eebcb71254cc92334da975505e07446d1a00bf09
221 Author: Ville-Pekka Vainio <vpvainio@iki.fi>
222 Date: Thu Mar 7 20:57:21 2013 +0200
223
224 Finnish translation update by Jiri Grönroos
225
226 M po/fi.po
227
228 commit 47aec8856134fb8960679260a92c499578228b26
229 Author: Rafael Ferreira <rafael.f.f1@gmail.com>
230 Date: Tue Mar 5 10:16:37 2013 -0300
231
232 Updated Brazilian Portuguese translation
233
234 M po/pt_BR.po
235
236 commit e63b9b880787e06c945a525048a7a7d92f8e19c8
237 Author: Nilamdyuti Goswami <ngoswami@redhat.com>
238 Date: Tue Mar 5 15:34:11 2013 +0530
239
240 Assamese translation updated for gnome 3.8
241
242 M po/as.po
243
244 commit 192c6566cc281c52a2ca438da965da32c5e752f2
245 Author: Inaki Larranaga Murgoitio <dooteo@zundan.com>
246 Date: Mon Mar 4 23:08:53 2013 +0100
247
248 Updated Basque language
249
250 M po/eu.po
251
252 commit 0f929355820faafef8712b17be906e834c3c97cc
253 Author: Jeremy Bicha <jbicha@ubuntu.com>
254 Date: Sun Mar 3 01:49:02 2013 -0500
255
256 sundry: Add Power Statistics & Personal File Sharing
257
258 These seem to sort of duplicate what we have in Settings.
259 Perhaps the extra graphs and info from Power Statistics should find
260 a new home in System Monitor?
261
262 https://bugzilla.gnome.org/show_bug.cgi?id=695047
263
264 M layout/gnome-applications.menu
265
266 commit af5d71c573cda0e3527ea935516454dc3cd35e28
267 Author: William Jon McCann <william.jon.mccann@gmail.com>
268 Date: Sun Mar 3 15:33:51 2013 -0500
269
270 Revert "Remove the special casing for Fedora desktop vendor renames"
271
272 This reverts commit 5cc05790a308bbf7a5905254e377d3ca47df603b.
273
274 We should really wait a bit before pushing this so the changes have
275 time to propagate.
276
277 M layout/gnome-applications.menu
278
279 commit a5382598d7f982e49b6267869db69ac7cf562b26
280 Author: William Jon McCann <william.jon.mccann@gmail.com>
281 Date: Sun Mar 3 15:19:45 2013 -0500
282
283 layout: put im-chooser into Sundry
284
285 M layout/gnome-applications.menu
286
287 commit 28ab24749488986519a21a51ca8060e5d9002256
288 Author: Benjamin Steinwender <b@stbe.at>
289 Date: Sun Mar 3 19:52:08 2013 +0100
290
291 [l10n] Updated German translation
292
293 M po/de.po
294
295 commit 6f27ae37ae12ee34b15479bb2a76d8a83ad5be81
296 Author: Luca Ferretti <lferrett@gnome.org>
297 Date: Sun Mar 3 01:19:56 2013 +0100
298
299 l10n: Updated Italian translation
300
301 M po/it.po
302
303 commit 5cc05790a308bbf7a5905254e377d3ca47df603b
304 Author: Kalev Lember <kalevlember@gmail.com>
305 Date: Fri Feb 22 13:15:18 2013 +0100
306
307 Remove the special casing for Fedora desktop vendor renames
308
309 The desktop file vendor prefixes are gone from eog.desktop,
310 file-roller.desktop, gucharmap.desktop, and yelp.desktop in Fedora 19+,
311 so we no longer need to special case them in gnome-applications.menu.
312
313 https://bugzilla.gnome.org/show_bug.cgi?id=694444
314
315 M layout/gnome-applications.menu
316
317 commit e85f2419023afef93e25d2058560fc833c22d310
318 Author: Мирослав Николић <miroslavnikolic@rocketmail.com>
319 Date: Fri Mar 1 09:26:42 2013 +0100
320
321 Updated Serbian translation
322
323 M po/sr.po
324 M po/sr@latin.po
325
326 commit aab9d5ed860175bb86063a58a1fb82b3083d3431
327 Author: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
328 Date: Wed Feb 27 22:51:08 2013 +0800
329
330 Updated Traditional Chinese translation(Hong Kong and Taiwan)
331
332 M po/zh_HK.po
333 M po/zh_TW.po
334
335 commit 7ba60014ce6bcc74996b519540ad58940ecd7205
336 Author: Sweta Kothari <swkothar@redhat.com>
337 Date: Wed Feb 27 13:58:35 2013 +0530
338
339 Updated gujarati file
340
341 M po/gu.po
342
343 commit 4a4d04d822e226eaf2c13a24a79ec639b620eb8a
344 Author: Pavol Klačanský <pavol@klacansky.com>
345 Date: Mon Feb 25 20:57:24 2013 +0100
346
347 Updated slovak translation
348
349 M po/sk.po
350
351 commit 3b28046273ca53e7a4f2d78f26fad10ea7c06424
352 Author: Kjartan Maraas <kmaraas@gnome.org>
353 Date: Mon Feb 25 19:18:08 2013 +0100
354
355 Updated Norwegian bokmål translation
356
357 M po/nb.po
358
359 commit 7c94f1773354a31f9db1f140bd164f9bb5a2f872
360 Author: Jasper St. Pierre <jstpierre@mecheye.net>
361 Date: Mon Feb 25 11:13:14 2013 -0500
362
363 configure: Remove AM_PATH_PYTHON
364
365 This was a leftover from removing the simple-editor.
366
367 M configure.ac
368
369 commit fe172ebde5ff50e55784611bc6048ecf56580699
370 Author: Aurimas Černius <aurisc4@gmail.com>
371 Date: Sun Feb 24 21:59:22 2013 +0200
372
373 Updated Lithuanian translation
374
375 M po/lt.po
376
377 commit 4338482231743c5e8bab7dd565e269e3a0cbe2cd
378 Author: Dimitris Spingos <dmtrs32@gmail.com>
379 Date: Sun Feb 24 10:23:11 2013 +0200
380
381 Updated Greek translation
382
383 M po/el.po
384
385 commit 3e5fe2ec16b5683ffdf225f1b2721ac4e4f902c6
386 Author: Matej Urbančič <mateju@svn.gnome.org>
387 Date: Fri Feb 22 22:28:14 2013 +0100
388
389 Updated Slovenian translation
390
391 M po/sl.po
392
393 commit 57b724f42917bcde9cf6b52d885bea4662b18f89
394 Author: A S Alam <aalam@users.sf.net>
395 Date: Fri Feb 22 14:55:42 2013 +0000
396
397 Punjabi: Translation updated (aalam)
398
399 M po/pa.po
400
401 commit 0cfe9c374d664492a77dbda436da5fe3bed7da4c
402 Author: Gheyret Kenji <gheyret@gmail.com>
403 Date: Fri Feb 22 22:58:01 2013 +0900
404
405 Updated Uyghur translation
406
407 Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
408
409 M po/ug.po
410
411 commit e1849964ad1a91d2a017f0bcc743bb936c52fb0d
412 Author: Yaron Shahrabani <sh.yaron@gmail.com>
413 Date: Thu Feb 21 19:41:32 2013 +0200
414
415 Updated Hebrew translation.
416
417 M po/he.po
418
419 commit ecc8ace4d8d7603f3f1c182de3ae107c20701302
420 Author: Daniel Mustieles <daniel.mustieles@gmail.com>
421 Date: Thu Feb 21 16:55:32 2013 +0100
422
423 Updated Spanish translation
424
425 M po/es.po
426
427 commit eb5f8823904a79787d0e6057f36fc9d08d44c332
428 Author: Yuri Myasoedov <omerta13@yandex.ru>
429 Date: Thu Feb 21 15:54:56 2013 +0400
430
431 Updated Russian translation
432
433 M po/ru.po
434
435 commit 207fa196dd04124ea3919cc7e66b44be75f982f9
436 Author: Cosimo Cecchi <cosimoc@gnome.org>
437 Date: Wed Feb 20 18:48:01 2013 -0500
438
439 sundry: add more Java stuff
440
441 I get these indecipherable desktop files when I install Eclipse.
442
443 https://bugzilla.gnome.org/show_bug.cgi?id=694324
444
445 M layout/gnome-applications.menu
446
447 commit 31b32c027426007639369832e4d6bb48f4f6c0fc
448 Author: Daniel Martinez <dmartinez@src.gnome.org>
449 Date: Wed Feb 20 23:11:23 2013 +0100
450
451 Updated Aragonese translation
452
453 M po/an.po
454
455 commit 48307035146fb3b1e6fea66f5b73a4bfe001a064
456 Author: Alexandre Franke <alexandre.franke@gmail.com>
457 Date: Wed Feb 20 21:15:02 2013 +0100
458
459 Update French translation
460
461 M po/fr.po
462
463 commit e775ffd58b91ec437c4a17d3fea2f5bc45b2423a
464 Author: Fran Diéguez <fran.dieguez@mabishu.com>
465 Date: Wed Feb 20 10:38:36 2013 +0100
466
467 Updated Galician translations
468
469 M po/gl.po
470
471 commit 96ae298b28c458bfd3f735a6ed8dac5d79b3d0b1
472 Author: Rūdolfs Mazurs <rudolfsm@src.gnome.org>
473 Date: Wed Feb 20 11:33:40 2013 +0200
474
475 Updated Latvian translation
476
477 M po/lv.po
478
479 commit a2f3bacaba079df016cf53b8331fb4e1c77f2eab
480 Author: Jasper St. Pierre <jstpierre@mecheye.net>
481 Date: Tue Feb 19 18:55:17 2013 -0500
482
483 Post-release version bump
484
485 M configure.ac
486
487 commit 005605f79c8fb7f13542c497ccc1f1fe52907902
488 Author: Jasper St. Pierre <jstpierre@mecheye.net>
489 Date: Tue Feb 19 18:53:34 2013 -0500
490
491 Release 3.7.90
492
493 M NEWS
494 M configure.ac
495
496 commit 64e189fedf5a04956cb96c54560f54736a012f4b
497 Author: Piotr Drąg <piotrdrag@gmail.com>
498 Date: Tue Feb 19 23:32:28 2013 +0100
499
500 Updated Polish translation
501
502 M po/pl.po
503
504 commit f3c636fbcf38846698c657d6aeb920cdabb0ea17
505 Author: Piotr Drąg <piotrdrag@gmail.com>
506 Date: Tue Feb 19 23:31:14 2013 +0100
507
508 Updated POTFILES.in
509
510 M po/POTFILES.in
511
512 commit ac21fd7730b0c7f84b06468f862592d9666dfac6
513 Author: Florian Müllner <fmuellner@gnome.org>
514 Date: Tue Feb 19 12:47:18 2013 +0100
515
516 Add .directory file for Sundry
517
518 https://bugzilla.gnome.org/show_bug.cgi?id=694131
519
520 M desktop-directories/Makefile.am
521 A desktop-directories/X-GNOME-Sundry.directory.in
522 M layout/gnome-applications.menu
523
524 commit 95858c40461f6a2c53e2d4427d0851a08e0181c7
525 Author: Alexandre Franke <alexandre.franke@gmail.com>
526 Date: Tue Feb 19 21:56:15 2013 +0100
527
528 Update French translation
529
530 M po/fr.po
531
532 commit acb41bfe71a4e4717707eb21aef6c2b19b331e76
533 Author: Jasper St. Pierre <jstpierre@mecheye.net>
534 Date: Tue Feb 19 15:14:48 2013 -0500
535
536 layout: Add some more items to Sundry
537
538 M layout/gnome-applications.menu
539
540 commit 1f4c3b6891637dfd2b8f42bae139166cd0e1fd8e
541 Author: Piotr Drąg <piotrdrag@gmail.com>
542 Date: Tue Feb 19 20:56:29 2013 +0100
543
544 Updated Polish translation
545
546 M po/pl.po
547
548 commit b1f831d2894df2501086f7c4bd523fe0e67f3676
549 Author: Piotr Drąg <piotrdrag@gmail.com>
550 Date: Tue Feb 19 20:44:51 2013 +0100
551
552 Updated POTFILES.in
553
554 M po/POTFILES.in
555
556 commit 36d5d699d7d4193a1b3d84777566466326f78b19
557 Author: Florian Müllner <fmuellner@gnome.org>
558 Date: Sun Feb 17 03:40:22 2013 +0100
559
560 layout: Add Sundry category
561
562 Creates a Sundry directory to contain things that either aren't really apps
563 or are scheduled for removal but that are hard to remove at the moment for
564 various reasons. We just need a temporary way to segregate these items so they
565 don't pollute the app view.
566
567 https://bugzilla.gnome.org/show_bug.cgi?id=694131
568
569 M layout/gnome-applications.menu
570
571 commit 8cb236fbf31dee1a533582f1f8ef72b7b96a33e0
572 Author: Florian Müllner <fmuellner@gnome.org>
573 Date: Sun Feb 17 02:51:00 2013 +0100
574
575 layout: Account for gcalctool => gnome-calculator name change
576
577 https://bugzilla.gnome.org/show_bug.cgi?id=694131
578
579 M layout/gnome-applications.menu
580
581 commit a06c0348c1a129ffd996e00615d5d6d25b17dcdc
582 Author: Florian Müllner <fmuellner@gnome.org>
583 Date: Sun Feb 17 02:25:42 2013 +0100
584
585 layout: Deal with some vendor renames
586
587 The menu spec doesn't offer very specific guidance for how
588 to use vendor prefixes. And it isn't even clear about what
589 a vendor is. Or how it helps avoid collisions with a naming scheme
590 that isn't fully qualified in the first place.
591
592 Longer term we should move to something that uses fully qualified
593 names like the dbus spec. In the meantime we have to deal with
594 "aliases" for app names.
595
596 https://bugzilla.gnome.org/show_bug.cgi?id=694131
597
598 M layout/gnome-applications.menu
599
600 commit e644a541b5bab530fe6649c3b8f212faca46eb66
601 Author: Florian Müllner <fmuellner@gnome.org>
602 Date: Sun Feb 17 02:18:51 2013 +0100
603
604 layout: Add a new X-GNOME-Utilities directory
605
606 Rather than using a developer-defined category, this directory
607 contains an explicit whitelist of known-good GNOME tools. This
608 more or less follows the definition set in the GNOME jhbuild
609 moduleset.
610
611 https://bugzilla.gnome.org/show_bug.cgi?id=694131
612
613 M desktop-directories/Makefile.am
614 A desktop-directories/X-GNOME-Utilities.directory.in
615 M layout/gnome-applications.menu
616
617 commit a5e2e6e4912c2dfcf6559828186063ecd6d09e57
618 Author: Jasper St. Pierre <jstpierre@mecheye.net>
619 Date: Mon Feb 18 14:36:03 2013 -0500
620
621 desktop-directories: Remove system settings desktop entries
622
623 They're unused by gnome-control-center.
624
625 D desktop-directories/Hardware.directory.in
626 M desktop-directories/Makefile.am
627 D desktop-directories/Personal.directory.in
628 D desktop-directories/System.directory.in
629
630 commit b53758987b4d04bf9c869bfd02c0ec1d252638bf
631 Author: Jasper St. Pierre <jstpierre@mecheye.net>
632 Date: Fri Feb 15 19:23:22 2013 -0500
633
634 layout: Install as gnome-applications.menu
635
636 gnome-session now sets XDG_MENU_PREFIX by default, so we should
637 install it where applications that use gnome-menus look.
638
639 M layout/Makefile.am
640 R100 layout/applications.menu layout/gnome-applications.menu
641
642 commit cfaa9d460ef9fb502585d0fcdfcf3bb4e25b19aa
643 Author: Jasper St. Pierre <jstpierre@mecheye.net>
644 Date: Fri Feb 15 17:33:00 2013 -0500
645
646 layout: Put control center apps in the applications menu
647
648 This allows gnome-shell to do app tracking for them. It should
649 not display them, as the desktop directory itself is marked as
650 NoDisplay=true.
651
652 M desktop-directories/Makefile.am
653 A desktop-directories/X-GNOME-SystemSettings.directory.in
654 M layout/applications.menu
655
656 commit a1c6559dcb1f9c9d12d9ebb6bd226a078a02d19a
657 Author: Jasper St. Pierre <jstpierre@mecheye.net>
658 Date: Fri Feb 15 20:44:48 2013 -0500
659
660 gmenu-tree: Fix error reporting
661
662 No idea why this was here..
663
664 M libmenu/gmenu-tree.c
665
666 commit 1e12d0f9f309c977702dad1363e56cd9989b7375
667 Author: Jasper St. Pierre <jstpierre@mecheye.net>
668 Date: Fri Feb 15 20:29:18 2013 -0500
669
670 configure: Have better debugging on by default
671
672 M configure.ac
673
674 commit 589ba554d79366dacf3592b3670459003e45ace4
675 Author: William Jon McCann <jmccann@redhat.com>
676 Date: Fri Sep 28 09:53:22 2012 -0400
677
678 Remove the simple editor
679
680 gnome-menus is a dependency component and we don't really want it
681 to be installing applications as a side effect. There are other
682 better and maintained options for menu editing now anyway.
683
684 https://bugzilla.gnome.org/show_bug.cgi?id=684900
685
686 M Makefile.am
687 M configure.ac
688 M po/POTFILES.in
689 D simple-editor/GMenuSimpleEditor/Makefile.am
690 D simple-editor/GMenuSimpleEditor/__init__.py
691 D simple-editor/GMenuSimpleEditor/config.py.in
692 D simple-editor/GMenuSimpleEditor/main.py
693 D simple-editor/GMenuSimpleEditor/maindialog.py
694 D simple-editor/GMenuSimpleEditor/menufilewriter.py
695 D simple-editor/GMenuSimpleEditor/menutreemodel.py
696 D simple-editor/Makefile.am
697 D simple-editor/gmenu-simple-editor.desktop.in
698 D simple-editor/gmenu-simple-editor.in
699 D simple-editor/gmenu-simple-editor.ui
700
701 commit 7d90221e27fcc72de497f45db4f3ef3c2d623fd6
702 Author: Jasper St. Pierre <jstpierre@mecheye.net>
703 Date: Fri Feb 1 21:46:13 2013 -0500
704
705 Memory leak fixes
706
707 Based on a patch by William Jon McCann <william.jon.mccann@gmail.com>
708
709 https://bugzilla.gnome.org/show_bug.cgi?id=349695
710
711 M libmenu/desktop-entries.c
712 M libmenu/entry-directories.c
713 M libmenu/gmenu-tree.c
714
715 commit db75a478f53f2619b1d96cd09d3a4f9abe682fc9
716 Author: Inaki Larranaga Murgoitio <dooteo@zundan.com>
717 Date: Wed Jan 30 21:26:01 2013 +0100
718
719 Updated Basque language
720
721 M po/eu.po
722
723 commit 2b4eb5f9db8411e62da6ec8d80ada1895772d05b
724 Author: Nuno Araujo <nuno.araujo@russo79.com>
725 Date: Tue Jan 15 22:36:11 2013 +0100
726
727 Fix the build with automake 1.13
728
729 In Automake 1.13, the long-deprecated macro AM_CONFIG_HEADER (deprecated
730 since 2002) has been removed in favour of AC_CONFIG_HEADERS.
731
732 https://bugzilla.gnome.org/show_bug.cgi?id=692108
733
734 M configure.ac
735
736 commit 86241e29cd1101fe638a5665b8c52e8d3c84444d
737 Author: Fabio Tomat <f.t.public@gmail.com>
738 Date: Sat Jan 19 02:34:16 2013 +0100
739
740 Updated Friulian translation
741
742 M po/fur.po
743
744 commit 8d161da704766d9f4a42f1213ca4dc6b8d0e7873
745 Author: Matthias Clasen <mclasen@redhat.com>
746 Date: Tue Jan 15 07:42:02 2013 -0500
747
748 Bump version
749
750 M configure.ac
751
752 commit d4a11d28df389f00550848a078c40a2438908df5
753 Author: Matthias Clasen <mclasen@redhat.com>
754 Date: Tue Jan 15 07:35:47 2013 -0500
755
756 3.6.2
757
758 M NEWS
759
760 commit 234940bf89aa82012c3622674cec151dcf4ff128
761 Author: Gheyret Kenji <gheyret@gmail.com>
762 Date: Sat Jan 12 14:00:36 2013 +0900
763
764 Updated Uyghur translation
765
766 Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
767
768 M po/ug.po
769
770 commit 0594875c19b1bf981f1bbde416a1ca440c7caeb5
771 Author: Vincent Untz <vuntz@gnome.org>
772 Date: Mon Jan 7 16:36:24 2013 +0100
773
774 misc: Remove myself from maintainers
775
776 I'm not really doing anything on gnome-menus anymore, and Jasper is
777 happy being the sole maintainer.
778
779 M MAINTAINERS
780 M gnome-menus.doap
781
782 commit 9c1c50146b8d1a92ac556ba0a0ca174426bc6ffa
783 Author: Gheyret Kenji <gheyret@gmail.com>
784 Date: Fri Jan 4 21:38:40 2013 +0900
785
786 Uyghur translation
787
788 Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
789
790 M po/ug.po
791
792 commit fd4a321b9eaf6ee11b80d0c377b8ff8873e6c777
793 Author: Khaled Hosny <khaledhosny@eglug.org>
794 Date: Mon Dec 24 13:38:26 2012 +0200
795
796 Update Arabic translation
797
798 M po/ar.po
799
800 commit 9d45c5369f4a486d2ba5c3a8c3262c84172b095a
801 Author: Alexandre Rostovtsev <tetromino@gentoo.org>
802 Date: Sat Nov 24 15:24:50 2012 -0500
803
804 libmenu: always call menu_layout_load() with non_prefixed_name parameter
805
806 We must ensure that when loading "${XDG_MENU_PREFIX}applications.menu"
807 or "applications.menu", the root layout node's name is set to "applications",
808 not "${XDG_MENU_PREFIX}applications", because the menu spec states that the
809 default merge directory for "${XDG_MENU_PREFIX}applications.menu" is
810 "applications-merged", not "${XDG_MENU_PREFIX}applications-merged".
811
812 https://bugzilla.gnome.org/show_bug.cgi?id=688972
813
814 M libmenu/gmenu-tree.c
815
816 commit dfae41dd0f0df6a72c1ef47dfe1e9efb1bfee746
817 Author: Shankar Prasad <svenkate@redhat.com>
818 Date: Thu Nov 29 14:24:44 2012 +0530
819
820 Updated kn translation
821
822 M po/kn.po
823
824 commit aad880ce305edc2fe61fb3070ec8df1d9d29f28a
825 Author: Shankar Prasad <svenkate@redhat.com>
826 Date: Thu Nov 29 14:21:37 2012 +0530
827
828 Updated kn translation
829
830 M po/kn.po
831
832 commit df21eb893653e0b3c0e0f43cd0bc0de00c28d54a
833 Author: Shankar Prasad <svenkate@redhat.com>
834 Date: Thu Nov 29 14:13:13 2012 +0530
835
836 Updated kn translation
837
838 M po/kn.po
839
840 commit 09ea3c32275547f8de8799bb47ef3f9441abf12f
841 Author: Shankar Prasad <svenkate@redhat.com>
842 Date: Tue Nov 27 16:00:31 2012 +0530
843
844 Updated kn translation
845
846 M po/kn.po
847
848 commit 6a113f67b993702417d9db189d36e63fd9e4806d
849 Author: Matthias Clasen <mclasen@redhat.com>
850 Date: Tue Nov 13 22:56:06 2012 -0500
851
852 Post-release version bump
853
854 M configure.ac
855
856 commit 0ebd911ccbd177b856d34f43a6ef680275ab0871
857 Author: Matthias Clasen <mclasen@redhat.com>
858 Date: Tue Nov 13 22:54:01 2012 -0500
859
860 3.6.1
861
862 M NEWS
863
864 commit fff8296aa0be3e257b2147e590da38cf470f4054
865 Author: Bahodir Mansurov <6ahodir@gmail.com>
866 Date: Sun Oct 14 13:42:00 2012 -0400
867
868 updating Uzbek@cyrillic translation
869
870 M po/uz@cyrillic.po
871
872 commit d9dce393a242ddc4799fdc776f0af305bf935ff5
873 Author: Bahodir Mansurov <6ahodir@gmail.com>
874 Date: Sun Oct 14 13:04:49 2012 -0400
875
876 updating Uzbek@cyrillic translation
877
878 M po/uz@cyrillic.po
879
880 commit 7acb8e2e5bff34c049c150d53190843996aa3f3d
881 Author: Pavol Klačanský <pavol@klacansky.com>
882 Date: Tue Oct 9 10:44:23 2012 +0100
883
884 Updated Slovak translation
885
886 M po/sk.po
887
888 commit 78b37e6142300931604566e2d8eb4123c70cfeb4
889 Author: Daniel Martinez Cucalon <dmartinez@src.gnome.org>
890 Date: Sat Sep 29 00:54:41 2012 +0200
891
892 Updated Aragonese translation
893
894 M po/an.po
895
896 commit 206da7e2fb133923f5898b42fbdc26db7f46d437
897 Author: Daniel Korostil <ted.korostiled@gmail.com>
898 Date: Wed Sep 26 09:15:57 2012 +0300
899
900 Added uk translation
901
902 M po/uk.po
903
904 commit 20f8d7169da967c39a92fb9bd97c74f5e1bb798d
905 Author: Carles Ferrando <carles.ferrando@gmail.com>
906 Date: Wed Sep 26 01:31:05 2012 +0200
907
908 [l10n] Updated Catalan (Valencian) translation
909
910 M po/ca@valencia.po
911
912 commit e8cda485fec0fb2480f8e232b790387c1f41c77f
913 Author: Gil Forcada <gforcada@gnome.org>
914 Date: Wed Sep 26 01:30:42 2012 +0200
915
916 [l10n] Updated Catalan translation
917
918 M po/ca.po
919
920 commit e2ad6f559992e253ee7b10db7358c709d3a54328
921 Author: Matthias Clasen <mclasen@redhat.com>
922 Date: Tue Sep 25 08:01:46 2012 -0400
923
924 post-release version bump
925
926 M configure.ac
927
928 commit ff379b515cdb3728dfd2f49c233797603b9658b8
929 Author: Matthias Clasen <mclasen@redhat.com>
930 Date: Tue Sep 25 07:54:10 2012 -0400
931
932 3.6.0
933
934 M NEWS
935
936 commit 1f596f13f5b793515dcb07cc7dd0834581f9f22e
937 Author: Rūdolfs Mazurs <rudolfsm@src.gnome.org>
938 Date: Mon Sep 24 13:22:34 2012 +0300
939
940 Updated Latvian translation
941
942 M po/lv.po
943
944 commit 3839fb3f2784f3575c454a7128fb7ff4fed12233
945 Author: Mattias Põldaru <mahfiaz@gmail.com>
946 Date: Mon Sep 24 11:15:01 2012 +0300
947
948 [l10n] Updated Estonian translation
949
950 M po/et.po
951
952 commit b2199a2b2972f37d85deab11818a94ce636a2d0a
953 Author: Timur Zhamakeev <ztimur@gmail.com>
954 Date: Mon Sep 24 09:21:40 2012 +0600
955
956 Updated Kyrgyz translation
957
958 M po/ky.po
959
960 commit d1ea18a03b123039f63e54360b5aac02d58e07fd
961 Author: Runa Bhattacharjee <runab@redhat.com>
962 Date: Fri Sep 21 19:23:07 2012 +0530
963
964 Updated Bengali India Translation
965
966 M po/bn_IN.po
967
968 commit 4883507b4742178707f227922f421e130ae0e612
969 Author: Rajesh Ranjan <rranjan@redhat.com>
970 Date: Fri Sep 21 14:21:36 2012 +0530
971
972 hindi update
973
974 M po/hi.po
975
976 commit 319bc9001ec45d837da239a4dbd1cf30546ba4ce
977 Author: Praveen Illa <mail2ipn@gmail.com>
978 Date: Wed Sep 19 22:08:18 2012 +0530
979
980 Updated Telugu Translation
981
982 M po/te.po
983
984 commit dd8991b15488f384122120ea31e8c6043e0144ea
985 Author: Ani Peter <apeter@redhat.com>
986 Date: Tue Sep 18 23:04:10 2012 +0530
987
988 Updated Malayalam file
989
990 M po/ml.po
991
992 commit e24c669b5331a6deab6730c0bb7f582ad98c138c
993 Author: Noriko Mizumoto <noriko@fedoraproject.org>
994 Date: Tue Sep 18 12:57:52 2012 +0900
995
996 [l10n] Update Japanese translation
997
998 M po/ja.po
999
1000 commit d529600f891fdd32d111e281a65677c9468d8f5c
1001 Author: Djavan Fagundes <djavanf@gnome.org>
1002 Date: Mon Sep 17 21:28:13 2012 -0300
1003
1004 Revert "Updated Brazilian Portuguese translation"
1005
1006 This reverts commit 0b8278f3dc7f834b5856a98762cda69b0d713707.
1007
1008 A po/pt_BR.po
1009
1010 commit 0b8278f3dc7f834b5856a98762cda69b0d713707
1011 Author: Djavan Fagundes <djavanf@gnome.org>
1012 Date: Mon Sep 17 20:40:04 2012 -0300
1013
1014 Updated Brazilian Portuguese translation
1015
1016 D po/pt_BR.po
1017
1018 commit 0619ec60ce602e023beb9d14df34d4958d326a31
1019 Author: Og B. Maciel <ogmaciel@gnome.org>
1020 Date: Mon Sep 17 16:51:48 2012 -0400
1021
1022 Updated translation for Brazilian Portuguese.
1023
1024 M po/pt_BR.po
1025
1026 commit 4ea3f1de69fec378262bc966f5d3e355f82c2b20
1027 Author: Vincent Untz <vuntz@gnome.org>
1028 Date: Mon Sep 17 13:10:55 2012 +0200
1029
1030 release: post-release bump to 3.6.0
1031
1032 M configure.ac
1033
1034 commit a4e3e70fb8150461af79a5314cdd3b9a8fe5956a
1035 Author: Vincent Untz <vuntz@gnome.org>
1036 Date: Mon Sep 17 13:10:14 2012 +0200
1037
1038 release: 3.5.92
1039
1040 M NEWS
1041 M configure.ac
1042
1043 commit c21dc9a2fbc2fbf288de0d688afd519e2f25da4b
1044 Author: Ask H. Larsen <asklarsen@gmail.com>
1045 Date: Sun Sep 16 13:25:58 2012 +0200
1046
1047 Updated Danish translation
1048
1049 M po/da.po
1050
1051 commit fe09bdbae726dbefa92f22d2e851b7ec5b30dfef
1052 Author: Changwoo Ryu <cwryu@debian.org>
1053 Date: Sat Sep 15 16:55:29 2012 +0900
1054
1055 Updated Korean translation
1056
1057 M po/ko.po
1058
1059 commit aceac14e0b728626c966d3ccfab51bb99a396ba6
1060 Author: Rico Tzschichholz <ricotz@t-online.de>
1061 Date: Wed Sep 12 08:40:37 2012 +0200
1062
1063 libmenu: Add proper header reference to GMenu-3.0.gir
1064
1065 M libmenu/Makefile.am
1066
1067 commit 491c7eccff4e5fedc3f68f2d9d33399d49eed9a8
1068 Author: Marek Černocký <marek@manet.cz>
1069 Date: Mon Sep 10 00:47:09 2012 +0200
1070
1071 Czech translation
1072
1073 M po/cs.po
1074
1075 commit 2c2c4f24c60952ef3e014ce0fd24c9db83c7f3fb
1076 Author: Milo Casagrande <milo@ubuntu.com>
1077 Date: Thu Sep 6 22:51:48 2012 +0200
1078
1079 [l10n] Updated Italian translation.
1080
1081 M po/it.po
1082
1083 commit f33d2b42226ae7c0d2fe871b55563b544dfcd252
1084 Author: Arash Mousavi <mousavi.arash@gmail.com>
1085 Date: Thu Sep 6 21:02:51 2012 +0430
1086
1087 l10n: Updated Persian translation
1088
1089 M po/fa.po
1090
1091 commit db8230cb5375eb951fc3385fa56e0fbd20222030
1092 Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
1093 Date: Thu Sep 6 20:23:58 2012 +0700
1094
1095 Updated Thai translation.
1096
1097 M po/th.po
1098
1099 commit b2cd372cf3ef3d5e10ca7e724366c72322a44849
1100 Author: Timo Jyrinki <timo@debian.org>
1101 Date: Thu Sep 6 08:59:09 2012 +0300
1102
1103 Finnish translation update by Jiri Grönroos
1104
1105 M po/fi.po
1106
1107 commit 103fb06fe86990bc7ec95e7cd8f61b71b69f9d9a
1108 Author: Bruce Cowan <bruce@bcowan.me.uk>
1109 Date: Wed Sep 5 19:50:45 2012 +0100
1110
1111 Updated British English translation
1112
1113 M po/en_GB.po
1114
1115 commit a8f755a4b967738261540d2efd4c3ab45a9b283b
1116 Author: Alexandre Franke <alexandre.franke@gmail.com>
1117 Date: Tue Sep 4 20:52:48 2012 +0200
1118
1119 Update French translation
1120
1121 M po/fr.po
1122
1123 commit b4c27cda6d161dbffb3878bfb1fd9164bb292de7
1124 Author: Gabor Kelemen <kelemeng@gnome.hu>
1125 Date: Tue Sep 4 13:49:16 2012 +0200
1126
1127 Updated Hungarian translation
1128
1129 M po/hu.po
1130
1131 commit c66d0da3965cb3157d08b33278220c2d8d52c5f6
1132 Author: Muhammet Kara <muhammetk@acikkaynak.name.tr>
1133 Date: Tue Sep 4 06:48:19 2012 +0300
1134
1135 [l10n]Updated Turkish translation
1136
1137 M po/tr.po
1138
1139 commit 691760dbea68b46aa6b895f0d6c739302c372806
1140 Author: Piotr Drąg <piotrdrag@gmail.com>
1141 Date: Mon Sep 3 19:09:33 2012 +0200
1142
1143 Updated Polish translation
1144
1145 M po/pl.po
1146
1147 commit a797159ac6b20b5e608290731ff0c9ccc1792848
1148 Author: Dr.T.Vasudevan <agnihot3@gmail.com>
1149 Date: Sun Sep 2 18:02:37 2012 +0530
1150
1151 updated Tamil translation
1152
1153 M po/ta.po
1154
1155 commit a44c335288e7c50db6d95bb080329bb1151d40a7
1156 Author: Daniel Nylander <po@danielnylander.se>
1157 Date: Sun Sep 2 11:59:21 2012 +0200
1158
1159 Updated Swedish translation
1160
1161 M po/sv.po
1162
1163 commit 8a09d2aad657036cb91c6d26fc370fd3a7be3d80
1164 Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
1165 Date: Sat Sep 1 22:04:28 2012 +0700
1166
1167 Updated Vietnamese translation
1168
1169 M po/vi.po
1170
1171 commit c126f269866ed323926841157c72c48df5753a99
1172 Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
1173 Date: Sat Sep 1 22:01:50 2012 +0700
1174
1175 po/vi: import from Damned Lies
1176
1177 M po/vi.po
1178
1179 commit d2b6d0a7e02d36125a455b99f2a43fb2598fc7cc
1180 Author: Duarte Loreto <happyguy_pt@hotmail.com>
1181 Date: Sat Sep 1 01:17:02 2012 +0100
1182
1183 Updated Portuguese translation
1184
1185 M po/pt.po
1186
1187 commit 6cbb7189d43207cc7abb5709255ddf8a6d5e4562
1188 Author: Aurimas Černius <aurisc4@gmail.com>
1189 Date: Wed Aug 29 22:57:58 2012 +0300
1190
1191 Updated Lithuanian translation
1192
1193 M po/lt.po
1194
1195 commit 55149c45571e54ed59599429e5c131fd64789d80
1196 Author: Chrovex Fan <pixelnecro@foxmail.com>
1197 Date: Tue Aug 28 22:32:44 2012 +0800
1198
1199 update Simplified Chinese (zh_CN) translation
1200
1201 M po/zh_CN.po
1202
1203 commit 2bfb0ab9c702b811d26c5adbd276eebdf0e04592
1204 Author: Nilamdyuti Goswami <nilamdyuti@gmail.com>
1205 Date: Tue Aug 28 00:03:50 2012 +0530
1206
1207 Implemented FUEL entries to Assamese translation
1208
1209 M po/as.po
1210
1211 commit 387804f05c1c6a8648f3930b45df939bf1b684f2
1212 Author: A S Alam <aalam@users.sf.net>
1213 Date: Mon Aug 27 19:58:58 2012 +0530
1214
1215 update Punjabi Translation
1216
1217 M po/pa.po
1218
1219 commit 3be4bc499b3df622c149f89780ad8ffc8c67319a
1220 Author: Piotr Drąg <piotrdrag@gmail.com>
1221 Date: Thu Aug 23 03:24:55 2012 +0200
1222
1223 Updated Polish translation
1224
1225 M po/pl.po
1226
1227 commit 1682e39a113f5ea19e1fd8d0da5fb27db6a95274
1228 Author: Dirgita <dirgitadevina@yahoo.co.id>
1229 Date: Tue Aug 21 22:20:32 2012 +0700
1230
1231 Updated Indonesian translation
1232
1233 M po/id.po
1234
1235 commit 0ed913bb8276b06e3f305b5e1907d87cc23d906a
1236 Author: Fran Diéguez <fran.dieguez@mabishu.com>
1237 Date: Fri Aug 17 23:37:20 2012 +0200
1238
1239 Updated Galician translations
1240
1241 M po/gl.po
1242
1243 commit d0e752350b2a9d8f85845614fda54571e143cef5
1244 Author: Sandeep Sheshrao Shedmake <sshedmak@redhat.com>
1245 Date: Thu Aug 16 12:19:50 2012 +0530
1246
1247 Updated Marathi Translations
1248
1249 M po/mr.po
1250
1251 commit 37f8b405844aedc87169ee902a8ed150978ffb1a
1252 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1253 Date: Mon Aug 6 18:42:20 2012 -0300
1254
1255 Post-release version bump
1256
1257 M configure.ac
1258
1259 commit 42ace8382ab15914f55c7dc6dffab418b38e0e50
1260 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1261 Date: Mon Aug 6 18:36:56 2012 -0300
1262
1263 Release 3.5.5
1264
1265 M NEWS
1266
1267 commit 685323a7cae56b1ced25c10f26af8eda7c9c893a
1268 Author: Мирослав Николић <miroslavnikolic@rocketmail.com>
1269 Date: Mon Aug 6 11:30:07 2012 +0200
1270
1271 Updated Serbian translation
1272
1273 M po/sr.po
1274 M po/sr@latin.po
1275
1276 commit b0c0c0afbc6a563f987df95e508c66c881bb5c27
1277 Author: Sweta Kothari <swkothar@redhat.com>
1278 Date: Mon Jul 30 13:54:26 2012 +0530
1279
1280 Updated gujarati file
1281
1282 M po/gu.po
1283
1284 commit 70f681351441c9146e1e4eb1c48154c5db1d2a5b
1285 Author: Przemysław Buczkowski <przemub@yahoo.pl>
1286 Date: Thu Jul 26 19:41:14 2012 +0200
1287
1288 Added Silesian translation
1289
1290 M po/LINGUAS
1291 A po/szl.po
1292
1293 commit 09053a26df6431e32d706eda69c0b7bf9100994b
1294 Author: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
1295 Date: Thu Jul 26 09:20:18 2012 +0600
1296
1297 Updated Kazakh translation
1298
1299 M po/kk.po
1300
1301 commit 73b36491c3a472c67a15f1684893d080c743c601
1302 Author: Tobias Endrigkeit <tobiasendrigkeit@googlemail.com>
1303 Date: Mon Jul 23 22:43:15 2012 +0200
1304
1305 Updated German translation
1306
1307 M po/de.po
1308
1309 commit 985728566f914aa8a3a3c571dd203ee4b50827f3
1310 Author: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
1311 Date: Tue Jul 17 15:01:09 2012 +0800
1312
1313 Updated Traditional Chinese translation(Hong Kong and Taiwan)
1314
1315 M po/zh_HK.po
1316 M po/zh_TW.po
1317
1318 commit 50f09c92d3418043cbead8ccc014235ab3eb9bd3
1319 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1320 Date: Mon Jul 16 20:24:57 2012 -0400
1321
1322 Post-release version bump
1323
1324 M configure.ac
1325
1326 commit f8e4cb42e10b7c2666f3771da158646a145abd34
1327 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1328 Date: Mon Jul 16 20:24:15 2012 -0400
1329
1330 Release 3.5.4
1331
1332 M NEWS
1333
1334 commit 1e62d7d67525ea5628296435bd95ef325954786d
1335 Author: chingiz <chingis091@lavabit.com>
1336 Date: Mon Jul 16 11:36:35 2012 +0400
1337
1338 Updated Kirghiz translation
1339
1340 M po/ky.po
1341
1342 commit b3f0c47b46b5456d220b7cb8b384a52e71018fa3
1343 Author: Alexander Shopov <ash@kambanaria.org>
1344 Date: Wed Jul 4 07:17:08 2012 +0300
1345
1346 Updated Bulgarian translation
1347
1348 M po/bg.po
1349
1350 commit 2c31301300f13a4ced24a0b116a010f9e20b0756
1351 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1352 Date: Tue Jun 26 13:19:56 2012 -0400
1353
1354 Post-release version bump
1355
1356 M configure.ac
1357
1358 commit 78ac358fcb3135574377cea00781edd19bad6065
1359 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1360 Date: Tue Jun 26 13:18:33 2012 -0400
1361
1362 Release 3.5.3
1363
1364 M NEWS
1365
1366 commit 1fba5a23c30af1a8cd07a6bd2f85e3c805129813
1367 Author: Sasi Bhushan Boddepalli <sasi@swecha.net>
1368 Date: Thu Jun 21 14:27:51 2012 +0530
1369
1370 Updated Telugu Translation
1371
1372 M po/te.po
1373
1374 commit 4a00f1eb30bc33afc14e647efb6ec1450ca7ff51
1375 Author: Nilamdyuti Goswami <nilamdyuti@gmail.com>
1376 Date: Thu Jun 21 14:01:14 2012 +0530
1377
1378 Assamese translation reviewed
1379
1380 M po/as.po
1381
1382 commit d1beaf075f02281e28bb730f3e43dd15dfea2ef3
1383 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1384 Date: Wed Jun 20 14:57:58 2012 -0400
1385
1386 libmenu: Allow grabbing the parent from any GMenuTreeItem
1387
1388 Oh how I wish we had real inheritance.
1389
1390 M libmenu/gmenu-tree.c
1391 M libmenu/gmenu-tree.h
1392
1393 commit ade49e7f07ef6cb0168002f6c12a4be6c1bdbee8
1394 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1395 Date: Mon Jun 18 18:08:26 2012 -0400
1396
1397 libmenu: Add a way to grab NoDisplay on an item and all of its parents
1398
1399 Some applications may want a way to show or hide a tree entry based on
1400 its visibility in the actual tree.
1401
1402 https://bugzilla.gnome.org/show_bug.cgi?id=678419
1403
1404 M libmenu/gmenu-tree.c
1405 M libmenu/gmenu-tree.h
1406
1407 commit fef1440c7b440d0360992c2178ef636b02ef777a
1408 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1409 Date: Fri Jun 1 09:16:01 2012 -0400
1410
1411 libmenu: Allow grabbing the GMenuTree from any GMenuTreeItem
1412
1413 https://bugzilla.gnome.org/show_bug.cgi?id=677270
1414
1415 M libmenu/gmenu-tree.c
1416 M libmenu/gmenu-tree.h
1417
1418 commit eec6221af6a8ee04dddb11af9dbac45819a296db
1419 Author: Vincent Untz <vuntz@gnome.org>
1420 Date: Wed Jun 20 19:56:20 2012 +0200
1421
1422 misc: Add Jasper as co-maintainer
1423
1424 Jasper is completely fixing alacarte, so he's the menu guy now :-)
1425
1426 M MAINTAINERS
1427 M gnome-menus.doap
1428
1429 commit 7a87b12a86d7f8dfebca2a33791c04d5249de692
1430 Author: Tom Tryfonidis <tomtryf@gmail.com>
1431 Date: Tue Jun 19 19:26:24 2012 +0300
1432
1433 Updated Greek translation
1434
1435 M po/el.po
1436
1437 commit 8cd6efdf03a7056ed4c7373e00a2eb7657e5c6cc
1438 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1439 Date: Sat Jun 2 13:27:24 2012 -0400
1440
1441 libmenu: Add the forgotten gmenu_tree_iter_get_separator
1442
1443 https://bugzilla.gnome.org/show_bug.cgi?id=677344
1444
1445 M libmenu/gmenu-tree.c
1446 M libmenu/gmenu-tree.h
1447
1448 commit 2a83843d381cebf95a775a9ae2c176c5ae816fc8
1449 Author: Colin Walters <walters@verbum.org>
1450 Date: Fri Jun 8 16:34:12 2012 -0400
1451
1452 gnome-menus: Fix g-ir-scanner warnings
1453
1454 M libmenu/gmenu-tree.c
1455
1456 commit 4973cf303cb9d5e8b160fb1ac0649ac2f864b8b4
1457 Author: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
1458 Date: Fri Jun 8 18:55:01 2012 +0300
1459
1460 Updated Belarusian translation.
1461
1462 M po/be.po
1463
1464 commit 175f03aeef932bf9bf0527e11624e9a8e126e769
1465 Author: Matthias Clasen <mclasen@redhat.com>
1466 Date: Tue Jun 5 09:21:45 2012 -0400
1467
1468 Post-release version bump
1469
1470 M configure.ac
1471
1472 commit c43bc6bc305b156be066fba6ae385b46e0063409
1473 Author: Matthias Clasen <mclasen@redhat.com>
1474 Date: Tue Jun 5 09:17:34 2012 -0400
1475
1476 3.5.2
1477
1478 M NEWS
1479 M configure.ac
1480
1481 commit 326c6ca76a4a739bb3d669ed4ce2d36d9b89eabe
1482 Author: Kjartan Maraas <kmaraas@gnome.org>
1483 Date: Wed May 30 14:06:31 2012 +0200
1484
1485 Updated Norwegian bokmål translation
1486
1487 M po/nb.po
1488
1489 commit efc14ec052a53b706d8d2132ec62426cd46f54ea
1490 Author: Aleksej Kabanov <ak099@mail.ru>
1491 Date: Sun May 27 00:56:26 2012 +0400
1492
1493 Updated Russian translation
1494
1495 M po/ru.po
1496
1497 commit 4693fdd844b623a69e02ec853f90888aee82a728
1498 Author: Yaron Shahrabani <sh.yaron@gmail.com>
1499 Date: Fri May 25 15:29:40 2012 +0300
1500
1501 Updated Hebrew translation.
1502
1503 M po/he.po
1504
1505 commit ef10032c3c9d20cb46482829f7bbf5e09c311dee
1506 Author: Matej Urbančič <mateju@svn.gnome.org>
1507 Date: Wed May 23 20:02:27 2012 +0200
1508
1509 Updated Slovenian translation
1510
1511 M po/sl.po
1512
1513 commit 64606ea5a3c0f3faa5f406a63c53a51a1eb8823a
1514 Author: Fran Diéguez <fran.dieguez@mabishu.com>
1515 Date: Sun May 20 17:57:35 2012 +0200
1516
1517 Updated Galician translations
1518
1519 M po/gl.po
1520
1521 commit 068bfbdbcb328c0f7eb29faecaf41c82e5633bb5
1522 Author: Daniel Mustieles <daniel.mustieles@gmail.com>
1523 Date: Mon May 14 16:49:12 2012 +0200
1524
1525 Updated Spanish translation
1526
1527 M po/es.po
1528
1529 commit 9452548505add051e3ca099332edad2dc7764181
1530 Author: Giovanni Campagna <gcampagna@src.gnome.org>
1531 Date: Tue May 1 00:23:39 2012 +0200
1532
1533 layout: Add a separate category for Web Applications
1534
1535 For technical reasons, it is not possible to guess an appropriate
1536 category for web applications created with Epiphany, so they
1537 would all end up in Others. Instead, make up a category and submenu
1538 just for them.
1539
1540 https://bugzilla.gnome.org/show_bug.cgi?id=675198
1541
1542 M desktop-directories/Makefile.am
1543 A desktop-directories/X-GNOME-WebApplications.directory.in
1544 M layout/applications.menu
1545 M po/POTFILES.in
1546
1547 commit b93cc6818c7ee7be1339f0f7bf8d3ec24790df59
1548 Author: Vincent Untz <vuntz@gnome.org>
1549 Date: Thu Feb 2 10:19:02 2012 +0100
1550
1551 util: Add --include-unallocated option to gnome-menu-spec-test
1552
1553 We want easy testing for GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED.
1554
1555 https://bugzilla.gnome.org/show_bug.cgi?id=668512
1556
1557 M util/test-menu-spec.c
1558
1559 commit 159bfe766f024598e967765a418430dfa46d2197
1560 Author: Vincent Untz <vuntz@gnome.org>
1561 Date: Thu Feb 2 10:16:40 2012 +0100
1562
1563 libmenu: Add GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED flag
1564
1565 Add a new GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED flag to add in the root
1566 directory entries that are not allocated anywhere else. This is useful
1567 if the user really wants to get absolutely all entries (in addition to
1568 using INCLUDE_EXCLUDED, which is a bit different, and
1569 INCLUDE_NODISPLAY).
1570
1571 Add gmenu_tree_entry_get_is_unallocated() API matching this flag.
1572
1573 https://bugzilla.gnome.org/show_bug.cgi?id=668512
1574
1575 M libmenu/gmenu-tree.c
1576 M libmenu/gmenu-tree.h
1577
1578 commit 6b6956b75de4566772c7144a01b39634671b364f
1579 Author: Piotr Drąg <piotrdrag@gmail.com>
1580 Date: Mon Apr 16 19:15:35 2012 +0200
1581
1582 Added Kashubian translation
1583
1584 M po/LINGUAS
1585 A po/csb.po
1586
1587 commit 9d68b854b35573d5567fe79cc58d011ae23ed23e
1588 Author: Alexander Shopov <ash@kambanaria.org>
1589 Date: Sun Apr 1 18:11:32 2012 +0300
1590
1591 Updated Bulgarian translation
1592
1593 M po/bg.po
1594
1595 commit da8b0ff0c8733d8f94d7e29f1ba67ff2e9bace98
1596 Author: Vincent Untz <vuntz@gnome.org>
1597 Date: Mon Mar 26 10:37:18 2012 +0200
1598
1599 release: post-release bump to 3.4.1
1600
1601 M configure.ac
1602
1603 commit e1b3578220871cd5e607a93ab1b251da9e56d4d6
1604 Author: Vincent Untz <vuntz@gnome.org>
1605 Date: Mon Mar 26 10:36:57 2012 +0200
1606
1607 release: 3.4.0
1608
1609 M NEWS
1610 M configure.ac
1611
1612 commit f553195fee927f128963702fc9443ce6d84fb20b
1613 Author: Khoem Sokhem <khoemsokhem@khmeros.info>
1614 Date: Sat Mar 10 13:24:57 2012 +0100
1615
1616 Add initial Khmer translation
1617
1618 M po/LINGUAS
1619 A po/km.po
1620
1621 commit f289d086d2f3162bef06eada7276cd473f73fbfe
1622 Author: Bahodir Mansurov <6ahodir@gmail.com>
1623 Date: Fri Feb 24 21:24:22 2012 -0500
1624
1625 Updated Uzbek@cyrillic translation
1626
1627 M po/uz@cyrillic.po
1628
1629 commit 17b1dc3a3c850794bfe3df028ed72483fb21489e
1630 Author: Vincent Untz <vuntz@gnome.org>
1631 Date: Wed Feb 22 15:10:35 2012 +0100
1632
1633 build: Generate ChangeLog on make dist
1634
1635 M Makefile.am
1636
1637 commit ac467f5484a8c32ccb1484147003dbea8ee51d99
1638 Author: Vincent Untz <vuntz@gnome.org>
1639 Date: Wed Feb 22 15:03:08 2012 +0100
1640
1641 build: Update git.mk and ignore generated tarballs
1642
1643 M Makefile.am
1644 M git.mk
1645
1646 commit 82f575edbd949f682bc9242263e318f7e1d4d57c
1647 Author: Vincent Untz <vuntz@gnome.org>
1648 Date: Mon Feb 6 12:27:00 2012 +0100
1649
1650 release: post-release bump to 3.3.90
1651
1652 M configure.ac
1653
1654 commit 44030054b1752ea353c010ec0588fbc804ffc662
1655 Author: Vincent Untz <vuntz@gnome.org>
1656 Date: Mon Feb 6 12:26:54 2012 +0100
1657
1658 release: 3.3.5
1659
1660 M NEWS
1661 M configure.ac
1662
1663 commit 2adf8dc80b99459450e891161b3b7f254317d9b5
1664 Author: Danishka Navin <danishka@gmail.com>
1665 Date: Wed Feb 1 17:29:09 2012 +0530
1666
1667 fixed few typos in si.po file
1668
1669 M po/si.po
1670
1671 commit 17d5a7f7942f9045acdb8d5cbe18c967169d054e
1672 Author: Danishka Navin <danishka@gmail.com>
1673 Date: Wed Feb 1 16:08:30 2012 +0530
1674
1675 fixed few typos in si.po file
1676
1677 M po/si.po
1678
1679 commit 7b895320a73ef066508d0d411c9ce1e725188a96
1680 Author: Kjartan Maraas <kmaraas@gnome.org>
1681 Date: Wed Jan 25 14:47:48 2012 +0100
1682
1683 Updated Norwegian bokmål translation
1684
1685 M po/nb.po
1686
1687 commit a84c7d360b4cb22a10cac76c95eff4654effd730
1688 Author: Andiswa Mvanyashe <andiswamva@webmail.co.za>
1689 Date: Tue Jan 17 08:09:02 2012 +0200
1690
1691 Updated translation for Xhosa (xh)
1692
1693 M po/xh.po
1694
1695 commit 91a67746970ca4327c03c2f048e48c666a1f3776
1696 Author: Vincent Untz <vuntz@gnome.org>
1697 Date: Tue Dec 20 09:45:45 2011 +0100
1698
1699 build: Create xz tarballs
1700
1701 M configure.ac
1702
1703 commit 581bdf9920d18024413fa7afcacd83e733a26089
1704 Author: Jiro Matsuzawa <jmatsuzawa@src.gnome.org>
1705 Date: Fri Nov 11 02:51:39 2011 +0900
1706
1707 Updated Japanese translation
1708
1709 M po/ja.po
1710
1711 commit 8d46c3a20c4718384b66180990258c0ad6c12f49
1712 Author: Vincent Untz <vuntz@gnome.org>
1713 Date: Mon Oct 24 13:58:21 2011 +0200
1714
1715 release: post-release bump to 3.3.2
1716
1717 M configure.ac
1718
1719 commit f258c9c144c569772a1ea7ea81179c98110fc58f
1720 Author: Vincent Untz <vuntz@gnome.org>
1721 Date: Mon Oct 24 13:58:14 2011 +0200
1722
1723 release: 3.3.1
1724
1725 M NEWS
1726 M configure.ac
1727
1728 commit fbabc41cb6f2c6520f9f117137fa296a7f8340f3
1729 Author: Florian Müllner <fmuellner@gnome.org>
1730 Date: Fri Oct 21 19:57:55 2011 +0200
1731
1732 libmenu: Ignore invalid desktop entries
1733
1734 Both "Name" and "Exec" are mandatory keys according to the desktop
1735 entry spec; some .desktop files missing one or the other have been
1736 spotted in the while, so ignore them explicitly.
1737
1738 https://bugzilla.gnome.org/show_bug.cgi?id=662409
1739
1740 M libmenu/desktop-entries.c
1741
1742 commit 2179d84e1d7ce5a5b79f2736bf64a13e7bca1b4d
1743 Author: Vincent Untz <vuntz@gnome.org>
1744 Date: Fri Oct 7 10:43:02 2011 +0200
1745
1746 layout: Put the Other menu at the end
1747
1748 It's really a special menu, which should not be handled with
1749 alphabetical order.
1750
1751 M layout/applications.menu
1752
1753 commit 480edac95baba553b3cfc471817779e50a367871
1754 Author: Vincent Untz <vuntz@gnome.org>
1755 Date: Wed Sep 28 09:24:19 2011 +0200
1756
1757 release: post-release bump to 3.2.1
1758
1759 M configure.ac
1760
1761 commit 2d5915b925791d2d3bd736704a8706553455bd26
1762 Author: Vincent Untz <vuntz@gnome.org>
1763 Date: Wed Sep 28 09:24:11 2011 +0200
1764
1765 release: 3.2.0.1
1766
1767 M NEWS
1768 M configure.ac
1769
1770 commit f1c76629d33a616089a15bd034708d21e8bd9a87
1771 Author: Vincent Untz <vuntz@gnome.org>
1772 Date: Tue Sep 27 12:09:35 2011 +0200
1773
1774 editor: Fix to work with latest pygi
1775
1776 https://bugzilla.gnome.org/show_bug.cgi?id=660112
1777
1778 M simple-editor/GMenuSimpleEditor/main.py
1779 M simple-editor/GMenuSimpleEditor/menufilewriter.py
1780 M simple-editor/GMenuSimpleEditor/menutreemodel.py
1781
1782 commit b87a8c15e95fa64c94343b0bfdc6523e8f6c1bbc
1783 Author: Vincent Untz <vuntz@gnome.org>
1784 Date: Mon Sep 26 11:09:13 2011 +0200
1785
1786 release: post-release bump to 3.2.1
1787
1788 M configure.ac
1789
1790 commit 4b0e41e9b45087402e64d90c2760c8d2101cd53e
1791 Author: Vincent Untz <vuntz@gnome.org>
1792 Date: Mon Sep 26 11:09:08 2011 +0200
1793
1794 release: 3.2.0
1795
1796 M NEWS
1797
1798 commit 36f7db2473f1d6a0c7a1b1e05e056210ac87e80b
1799 Author: Nilamdyuti Goswami <ngoswami@redhat.com>
1800 Date: Sat Sep 24 15:27:52 2011 +0530
1801
1802 Updated Assamese Translations:bugzilla#659595
1803
1804 M po/as.po
1805
1806 commit 1412cf2222ef8e0f33e9bfa234cf7fdbf6aee035
1807 Author: ipraveen <mail2ipn@gmail.com>
1808 Date: Fri Sep 23 16:32:28 2011 +0530
1809
1810 Updated Telugu Translation
1811
1812 M po/te.po
1813
1814 commit 3ecf6975346ab77b111a99c45b0f7a79228b202f
1815 Author: ipraveen <mail2ipn@gmail.com>
1816 Date: Fri Sep 23 16:26:27 2011 +0530
1817
1818 Updated Telugu Translation
1819
1820 M po/te.po
1821
1822 commit 26e1dd8864b18c5dee038a929bc23cfcadc0f6e1
1823 Author: Nilamdyuti Goswami <ngoswami@redhat.com>
1824 Date: Thu Sep 22 20:17:41 2011 +0200
1825
1826 Updated Assamese translation
1827
1828 M po/as.po
1829
1830 commit 612011be0953e15f349946ba48df5e6e8f036282
1831 Author: Vincent Untz <vuntz@gnome.org>
1832 Date: Mon Sep 19 19:34:28 2011 +0200
1833
1834 release: post-release bump to 3.2.0
1835
1836 M configure.ac
1837
1838 commit 5d7dd75fbf694cfd31f04a3f81c80786b1b5841d
1839 Author: Vincent Untz <vuntz@gnome.org>
1840 Date: Mon Sep 19 19:34:21 2011 +0200
1841
1842 release: 3.1.92
1843
1844 M NEWS
1845 M configure.ac
1846
1847 commit 49406208c5b1bfe449ed46c20d0bf16c7a363518
1848 Author: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
1849 Date: Sun Sep 18 18:22:42 2011 +0300
1850
1851 Updated Belarusian translation (some fixes after manual testing).
1852
1853 M po/be.po
1854
1855 commit c3cc2e1d2dfa4f219c01c8dfee4d14e8aebd3a1e
1856 Author: Jiro Matsuzawa <jmatsuzawa@src.gnome.org>
1857 Date: Sat Sep 17 12:08:06 2011 +0900
1858
1859 Updated Japanese translation
1860
1861 M po/ja.po
1862
1863 commit 8c4aa57ca8ff56f1941899eb3c67babd2b7a3839
1864 Author: dmustieles <daniel.mustieles@gmail.com>
1865 Date: Wed Sep 14 17:37:05 2011 +0200
1866
1867 Updated Spanish translation
1868
1869 M po/es.po
1870
1871 commit ecb47adb12c8ec9a3998efa96656dfedfe002525
1872 Author: Vincent Untz <vuntz@gnome.org>
1873 Date: Mon Aug 29 08:43:26 2011 +0200
1874
1875 libmenu: Fix build failure with --enable-debug
1876
1877 gmenu_tree_entry_get_name() was still being used.
1878
1879 https://bugzilla.gnome.org/show_bug.cgi?id=656714
1880
1881 M libmenu/gmenu-tree.c
1882
1883 commit 20d76fb2f1664aadf0b33c7c91603b47dfe04ef0
1884 Author: Matthias Clasen <mclasen@redhat.com>
1885 Date: Sun Aug 28 19:22:26 2011 -0400
1886
1887 Post-release version bump
1888
1889 M configure.ac
1890
1891 commit 002662a50ab7fbce7398596a53e7270fc6f168e3
1892 Author: Matthias Clasen <mclasen@redhat.com>
1893 Date: Sun Aug 28 19:22:00 2011 -0400
1894
1895 3.1.90
1896
1897 M NEWS
1898
1899 commit 739d3f6ef7d533544f1ec2b4d6e237bfaca99e85
1900 Author: Jasper St. Pierre <jstpierre@mecheye.net>
1901 Date: Sun Aug 21 17:27:50 2011 -0400
1902
1903 libmenu: Don't try to unref potentially NULL pointers
1904
1905 When a DIRECTORY desktop entry fails to load, we'll try to unref
1906 some NULL pointers. This was causing some warnings.
1907
1908 https://bugzilla.gnome.org/show_bug.cgi?id=657042
1909
1910 M libmenu/desktop-entries.c
1911
1912 commit 5fade40dc3ebff3b4c00cdf37e6d7198e39e9bce
1913 Author: Vincent Untz <vuntz@gnome.org>
1914 Date: Fri Aug 12 11:50:59 2011 +0200
1915
1916 release: post-release bump to 3.1.90
1917
1918 M configure.ac
1919
1920 commit 8e0ecffe8a6d4434dab086525f52d05e00edf0e9
1921 Author: Vincent Untz <vuntz@gnome.org>
1922 Date: Fri Aug 12 11:50:52 2011 +0200
1923
1924 release: 3.1.5
1925
1926 M NEWS
1927 M configure.ac
1928
1929 commit 61c87a8e66bfa1d7a823a588b073e3922edc78c3
1930 Author: Vincent Untz <vuntz@gnome.org>
1931 Date: Fri Aug 12 10:44:32 2011 +0200
1932
1933 libmenu: Support XDG_CURRENT_DESKTOP
1934
1935 https://bugzilla.gnome.org/show_bug.cgi?id=653440
1936
1937 M libmenu/desktop-entries.c
1938
1939 commit f0e41152be32a3e07772b53a6c3a0d4dbb0545d9
1940 Author: Colin Walters <walters@verbum.org>
1941 Date: Tue Aug 2 23:13:30 2011 -0400
1942
1943 gmenu_tree_get_entry_by_id: New API
1944
1945 It's useful for gnome-shell if we have an index by desktop file ID to
1946 the tree entry. The cost is very small.
1947
1948 https://bugzilla.gnome.org/show_bug.cgi?id=655868
1949
1950 M libmenu/gmenu-tree.c
1951 M libmenu/gmenu-tree.h
1952
1953 commit 2a17c07927cfc23c9837969ac43f2fbcf9e433d7
1954 Author: Vincent Untz <vuntz@gnome.org>
1955 Date: Sat Jul 23 10:06:35 2011 +0200
1956
1957 build: Require gio-unix-2.0 >= 2.29.15
1958
1959 g_desktop_app_info_get_show_in() was pushed, but after 2.29.14.
1960
1961 M configure.ac
1962
1963 commit 3fae17cc6e86b3e988df481a05a386e005b7637c
1964 Author: Vincent Untz <vuntz@gnome.org>
1965 Date: Fri Jul 22 13:21:17 2011 +0200
1966
1967 editor: Stop editing settings.menu
1968
1969 We dropped that file a while ago. We could replace this with
1970 gnomecc.menu, but gnome-control-center loads the file from the system
1971 configuration and explicitly ignore the user changes there...
1972
1973 M simple-editor/GMenuSimpleEditor/menutreemodel.py
1974
1975 commit 1cb6fe8f97cc5a12933bd77d278a16827e763c13
1976 Author: Vincent Untz <vuntz@gnome.org>
1977 Date: Fri Jul 22 08:55:19 2011 +0200
1978
1979 libmenu: Unset GMenuTree:menu-basename if GMenuTree:menu-path is set
1980
1981 Since GMenuTree:menu-basename has a non-NULL default value, we really
1982 want to unset it if the user sets GMenuTree:menu-path, to avoid any
1983 potential confusion.
1984
1985 We need a constructor to do this magic, as the properties are
1986 construct-only, and doing this anywhere else would be too late.
1987
1988 M libmenu/gmenu-tree.c
1989
1990 commit 02d0f749a1c4f406fa773254c2095e6c4f3d5979
1991 Author: Vincent Untz <vuntz@gnome.org>
1992 Date: Thu Jul 21 18:28:56 2011 +0200
1993
1994 libmenu: Group GMenuTreeFlags flags in a pseudo-consistent way
1995
1996 Since we're breaking ABI, let's go crazy and change the value of flags.
1997 Grouping flags by some sort of meaning (include ones, show ones, misc.
1998 ones) makes the header a bit nicer to read.
1999
2000 M libmenu/gmenu-tree.h
2001
2002 commit 9e2b4abdc8ec63e20f4c2a52b3047f1d767ebd8d
2003 Author: Vincent Untz <vuntz@gnome.org>
2004 Date: Thu Jul 21 18:19:24 2011 +0200
2005
2006 editor: Port to introspection-based gmenu bindings
2007
2008 M simple-editor/GMenuSimpleEditor/maindialog.py
2009 M simple-editor/GMenuSimpleEditor/menutreemodel.py
2010
2011 commit 6f4cf16ec2633ebc62cb91759dbfd01923cd3c73
2012 Author: Vincent Untz <vuntz@gnome.org>
2013 Date: Thu Jul 21 18:09:25 2011 +0200
2014
2015 libmenu, util: Rename gmenu_tree_get_menu_path()
2016
2017 Renamed to gmenu_tree_get_canonical_menu_path(), to avoid any potential
2018 confusion with the menu-path property.
2019
2020 M libmenu/gmenu-tree.c
2021 M libmenu/gmenu-tree.h
2022 M util/test-menu-spec.c
2023
2024 commit 8bc90706c9bfbf0d55c2eaddc859afb4a52a3281
2025 Author: Vincent Untz <vuntz@gnome.org>
2026 Date: Thu Jul 21 18:07:54 2011 +0200
2027
2028 libmenu: Add API to load menu file from full path
2029
2030 Add gmenu_tree_new_for_path() and GMenuTree:menu-path.
2031
2032 M libmenu/gmenu-tree.c
2033 M libmenu/gmenu-tree.h
2034
2035 commit c653bbe8904acca4340f70574357d843e549035c
2036 Author: Vincent Untz <vuntz@gnome.org>
2037 Date: Thu Jul 21 17:22:20 2011 +0200
2038
2039 libmenu, util: Rename GMenuTree:name to GMenuTree:menu-basename
2040
2041 This is a much clearer name for the property, else people might assume
2042 they can use a full path, or something that is not a basename.
2043
2044 Note that a relative path will work, but that really should not be of
2045 much use, hence the choice of basename.
2046
2047 M libmenu/gmenu-tree.c
2048 M libmenu/gmenu-tree.h
2049 M util/gnome-menus-ls.js
2050
2051 commit c45596c3d87fa3e344b9e9a32c51190e12d67d93
2052 Author: Vincent Untz <vuntz@gnome.org>
2053 Date: Thu Jul 21 17:13:18 2011 +0200
2054
2055 libmenu: Fix critical warning when trying to load "" menu
2056
2057 Yes, this is a weird use of the API, but still.
2058
2059 M libmenu/gmenu-tree.c
2060
2061 commit 4c85e0ee58a4e8b11f1e5527909eefd02133a72a
2062 Author: Vincent Untz <vuntz@gnome.org>
2063 Date: Thu Jul 21 17:00:25 2011 +0200
2064
2065 libmenu: Default GMenuTree::name property to "applications.menu"
2066
2067 This is useful for introspection bindings, since users will not
2068 necessarily think of setting the menu name property at construct time.
2069 And it's a saner default than NULL.
2070
2071 M libmenu/gmenu-tree.c
2072
2073 commit d8be0079a48bb7b486cc2b1355ee0cea2596fecb
2074 Author: Vincent Untz <vuntz@gnome.org>
2075 Date: Thu Jul 21 16:55:57 2011 +0200
2076
2077 libmenu: Do not keep internal load_error in GMenuTree
2078
2079 This is not used, and it actually gets corrupted at some point (since
2080 g_propagate_error means we lose the ownership of the GError).
2081
2082 M libmenu/gmenu-tree.c
2083
2084 commit bb3e154f60f81e97178b0cb8457827b29ee20692
2085 Author: Vincent Untz <vuntz@gnome.org>
2086 Date: Thu Jul 21 16:01:46 2011 +0200
2087
2088 build: Bump version to 3.1.4
2089
2090 This is needed so users can know which version to require for the new
2091 API.
2092
2093 M configure.ac
2094
2095 commit 70e9aaacbe0783fe11b7c69310873e0dc638b274
2096 Author: Vincent Untz <vuntz@gnome.org>
2097 Date: Thu Jul 21 15:57:18 2011 +0200
2098
2099 libmenu: Drop GMenuTreeDirectoryRoot
2100
2101 This was only used internally, but with no reason.
2102
2103 M libmenu/gmenu-tree.c
2104
2105 commit 17961198a182d5f68e4773427b1c8f735e0a01cd
2106 Author: Vincent Untz <vuntz@gnome.org>
2107 Date: Thu Jul 21 15:48:35 2011 +0200
2108
2109 libmenu: Make gmenu_tree_directory_get_icon() return a GIcon
2110
2111 It's much better to use GIcon than icon name strings.
2112
2113 M libmenu/desktop-entries.c
2114 M libmenu/desktop-entries.h
2115 M libmenu/gmenu-tree.c
2116 M libmenu/gmenu-tree.h
2117
2118 commit 3c6ad47de8cfc3581fee66107a41ba4b39dd0de0
2119 Author: Vincent Untz <vuntz@gnome.org>
2120 Date: Thu Jul 21 15:26:11 2011 +0200
2121
2122 libmenu: Correctly deal with OnlyShowIn/NotShowIn
2123
2124 We're using new glib API for this.
2125
2126 Also, we do not remove entries because of OnlyShowIn/NotShowIn before
2127 processing the layout, as we might want to add a GMenuTreeFlags value in
2128 the future, to include .desktop files that are excluded because of
2129 OnlyShowIn/NotShowIn.
2130
2131 M configure.ac
2132 M libmenu/desktop-entries.c
2133 M libmenu/desktop-entries.h
2134 M libmenu/gmenu-tree.c
2135
2136 commit 66557ef586adff091c8ce69a2f472da00dcd89ba
2137 Author: Vincent Untz <vuntz@gnome.org>
2138 Date: Mon Jul 4 17:23:32 2011 +0200
2139
2140 build: Drop check for -fno-strict-aliasing support
2141
2142 This was only needed for our previous python bindings.
2143
2144 M configure.ac
2145
2146 commit fc5492ab992fde2b8d378ed91f0b4c6c62cbe69b
2147 Author: Colin Walters <walters@verbum.org>
2148 Date: Tue Jun 14 13:52:06 2011 -0400
2149
2150 libmenu: Dispose of source before context to avoid possible double unref
2151
2152 M libmenu/menu-layout.c
2153
2154 commit 21062503fff272872fdfc5fb468288b1faa85127
2155 Author: Colin Walters <walters@verbum.org>
2156 Date: Tue Jun 14 13:25:47 2011 -0400
2157
2158 libmenu: Make refcounts volatile as g_atomic_* expect
2159
2160 M libmenu/gmenu-tree.c
2161
2162 commit b8b2471e8a3bd0f2d469dea41067721919359c22
2163 Author: Vincent Untz <vuntz@gnome.org>
2164 Date: Tue Jun 14 09:04:31 2011 +0200
2165
2166 libmenu: Correctly look up at NoDisplay for .desktop files
2167
2168 We were using Hidden instead. This requires glib 2.29.9.
2169
2170 M configure.ac
2171 M libmenu/desktop-entries.c
2172
2173 commit 6ba57847943cd74839a306ed6c8926401e370b85
2174 Author: Vincent Untz <vuntz@gnome.org>
2175 Date: Sun Jun 12 12:50:05 2011 +0200
2176
2177 libmenu: Simplify some code
2178
2179 M libmenu/desktop-entries.c
2180
2181 commit 2c47cdbebb15715d91d95aa4babc2de7a993dbd4
2182 Author: Vincent Untz <vuntz@gnome.org>
2183 Date: Sun Jun 12 12:38:30 2011 +0200
2184
2185 libmenu: Fix loading of .directory files
2186
2187 We were always returning FALSE, leaking some data and not displaying a
2188 debug message in case of error (like for .desktop files).
2189
2190 M libmenu/desktop-entries.c
2191
2192 commit 6aff671fbeccb5ff7ec3290d0fd6345fbbb632c8
2193 Author: Vincent Untz <vuntz@gnome.org>
2194 Date: Sun Jun 12 12:34:26 2011 +0200
2195
2196 util: Fix build after gmenu_tree_alias_get_item_type() renaming
2197
2198 M util/test-menu-spec.c
2199
2200 commit 398fd5c145524b7961c9d1dbc105c1cd49d98103
2201 Author: Vincent Untz <vuntz@gnome.org>
2202 Date: Sun Jun 12 12:12:55 2011 +0200
2203
2204 doc: Do not reference non-existing gmenu_tree_iter_get_next_type()
2205
2206 This is gmenu_tree_iter_next().
2207
2208 M libmenu/gmenu-tree.c
2209
2210 commit e71520d5d2ccc4392b046e5feb84349d71a2c69f
2211 Author: Vincent Untz <vuntz@gnome.org>
2212 Date: Sun Jun 12 12:11:31 2011 +0200
2213
2214 libmenu: Handle GenericName for .directory files
2215
2216 While we do not strictly need them right now, this is allowed by the
2217 specification and might be used later.
2218
2219 M libmenu/desktop-entries.c
2220 M libmenu/desktop-entries.h
2221 M libmenu/gmenu-tree.c
2222 M libmenu/gmenu-tree.h
2223
2224 commit f29590a8c3771af47debf75c929170fe59877dce
2225 Author: Vincent Untz <vuntz@gnome.org>
2226 Date: Sun Jun 12 11:53:59 2011 +0200
2227
2228 libmenu: Fix desktop_entry_copy() for .desktop file
2229
2230 We were not dealing with the appinfo field at all.
2231
2232 M libmenu/desktop-entries.c
2233
2234 commit 0d5f1909518f86d7283cde404e9470e6f55a42d2
2235 Author: Vincent Untz <vuntz@gnome.org>
2236 Date: Sun Jun 12 11:41:20 2011 +0200
2237
2238 libmenu: Rename gmenu_tree_alias_get_item_type
2239
2240 Renamed to gmenu_tree_alias_get_aliased_item_type, to avoid any
2241 potential confusion about the typoe of what item this is.
2242
2243 M libmenu/gmenu-tree.c
2244 M libmenu/gmenu-tree.h
2245
2246 commit 4d96af04a6d1d2e211c2005cc9d03d2b0e1a85c0
2247 Author: Vincent Untz <vuntz@gnome.org>
2248 Date: Sun Jun 12 11:33:16 2011 +0200
2249
2250 libmenu: Drop gmenu_tree_entry_get_is_nodisplay() from header
2251
2252 The function got dropped, and having a similar function in
2253 GDesktopAppInfo would be the right thing to do.
2254
2255 M libmenu/gmenu-tree.h
2256
2257 commit f587ca8642070892fd4172ab01735c4a0789dc19
2258 Author: Vincent Untz <vuntz@gnome.org>
2259 Date: Sun Jun 12 11:12:42 2011 +0200
2260
2261 libmenu: Remove unneeded cast
2262
2263 M libmenu/gmenu-tree.c
2264
2265 commit 2167c042bc089ba1e570ac9ba60dcdddb1d1d3c3
2266 Author: Vincent Untz <vuntz@gnome.org>
2267 Date: Sun Jun 12 11:05:52 2011 +0200
2268
2269 libmenu: Rename desktop_entry_desktop_get_icon to desktop_entry_get_icon
2270
2271 The additional desktop in the name was confusing.
2272
2273 M libmenu/desktop-entries.c
2274 M libmenu/desktop-entries.h
2275 M libmenu/gmenu-tree.c
2276
2277 commit 0f7d374006f32559893629fba47fecfaa031d4f8
2278 Author: Vincent Untz <vuntz@gnome.org>
2279 Date: Sun Jun 12 10:53:05 2011 +0200
2280
2281 libmenu: Fix getting the flags property
2282
2283 This was not handled at all.
2284
2285 M libmenu/gmenu-tree.c
2286
2287 commit 0eaed2f94d52a8b03263e5976a4d16104546929c
2288 Author: Vincent Untz <vuntz@gnome.org>
2289 Date: Sun Jun 12 10:39:54 2011 +0200
2290
2291 libmenu: Drop support for "KDE Desktop Entry" group
2292
2293 This was deprecated for years, and with the move to GDesktopAppInfo, we
2294 don't support this group for .desktop files anyway, so it makes no sense
2295 to keep supporting it for .directory files.
2296
2297 M libmenu/desktop-entries.c
2298
2299 commit 536c6d510f53bbf76ff0c4134e935c8e7cf552da
2300 Author: Vincent Untz <vuntz@gnome.org>
2301 Date: Sun Jun 12 10:31:37 2011 +0200
2302
2303 libmenu: Use explicit GMENU_TREE_FLAGS_NONE instead of 0
2304
2305 M libmenu/gmenu-tree.c
2306
2307 commit d5da147d09ca09e593e4a88c11b782ee7479268f
2308 Author: Vincent Untz <vuntz@gnome.org>
2309 Date: Sun Jun 12 09:58:20 2011 +0200
2310
2311 Spaces/tabs fixes
2312
2313 M libmenu/desktop-entries.c
2314 M libmenu/desktop-entries.h
2315 M libmenu/gmenu-tree.c
2316 M libmenu/gmenu-tree.h
2317 M libmenu/menu-layout.c
2318
2319 commit 6920649082e3c0be363094054eecc9f1185a8185
2320 Author: Vincent Untz <vuntz@gnome.org>
2321 Date: Wed Jun 8 17:55:43 2011 +0200
2322
2323 util: Do not call exit() in test tool
2324
2325 A simple return statement is enough.
2326
2327 M util/test-menu-spec.c
2328
2329 commit f88d8c4dd17055932a6b335c008b496327d536b3
2330 Author: Vincent Untz <vuntz@gnome.org>
2331 Date: Wed Jun 8 17:48:58 2011 +0200
2332
2333 build: Fix pkg-config to require gio-unix-2.0 and not glib-2.0
2334
2335 We reference gio/gdesktopappinfo.h in our public header.
2336
2337 M libmenu/libgnome-menu-3.0-uninstalled.pc.in
2338 M libmenu/libgnome-menu-3.0.pc.in
2339
2340 commit cfb20fb779eeed93a0c9571a8340251c8964ef69
2341 Author: Vincent Untz <vuntz@gnome.org>
2342 Date: Wed Jun 8 17:44:16 2011 +0200
2343
2344 gi: Add/Fix annotations to remove introspection warnings
2345
2346 M libmenu/gmenu-tree.c
2347
2348 commit 91a698f7860b3d8d5f29ffcdfcdbadf0cc347bad
2349 Author: Vincent Untz <vuntz@gnome.org>
2350 Date: Wed Jun 8 17:39:42 2011 +0200
2351
2352 build: Version the library name and the pkg-config file
2353
2354 The library is now libgnome-menu-3, the pkg-config file is
2355 libgnome-menu-3.0, the header directory is gnome-menus-3.0 and the
2356 gettext package is gnome-menus-3.0.
2357
2358 This way, it's possible to keep the old libgnome-menu around if some
2359 applications still need it.
2360
2361 M configure.ac
2362 M libmenu/Makefile.am
2363 R080 libmenu/libgnome-menu-uninstalled.pc.in libmenu/libgnome-menu-3.0-uninstalled.pc.in
2364 R072 libmenu/libgnome-menu.pc.in libmenu/libgnome-menu-3.0.pc.in
2365 M util/Makefile.am
2366
2367 commit 669f03a403ca83facf83020e9c37b894c67f1b9b
2368 Author: Vincent Untz <vuntz@gnome.org>
2369 Date: Wed Jun 8 16:19:49 2011 +0200
2370
2371 build: Remove old python-related build stuff
2372
2373 M configure.ac
2374 D m4/python.m4
2375
2376 commit 1cf4482fa3416b98916653db23b40edb26d8646d
2377 Author: Colin Walters <walters@verbum.org>
2378 Date: Thu Apr 21 13:21:57 2011 -0400
2379
2380 Bump to GMenu-4.0.gir; this matches the package version.
2381
2382 M libmenu/Makefile.am
2383
2384 commit 5aa2c53ef25f684a848312455dad396f28c96a90
2385 Author: Colin Walters <walters@verbum.org>
2386 Date: Wed Apr 20 17:48:07 2011 -0400
2387
2388 Replace Python example with JS
2389
2390 M util/Makefile.am
2391 A util/gnome-menus-ls.js
2392 D util/gnome-menus-ls.py
2393
2394 commit f0101da1c3df623f5a0023d9c787535e89476291
2395 Author: Colin Walters <walters@verbum.org>
2396 Date: Wed Apr 20 17:42:39 2011 -0400
2397
2398 Remove GMenuTreeItem from public API
2399
2400 gmenu_tree_directory_get_contents() wasn't actually bindable because
2401 there's no way to express to introspection the inheritance hierarchy
2402 (and to do the runtime type checking necessary via
2403 gmenu_tree_item_get_item_type()).
2404
2405 Therefore, drop it, and instead add explicit functions where each type
2406 is needed. So for gmenu_tree_directory_get_contents(), we instead
2407 add an explicit typesafe iterator object.
2408
2409 The only other instance was gmenu_tree_alias.
2410
2411 Note that gmenu_tree_item_ref() and gmenu_tree_item_unref() remain;
2412 they're C only, and already just took "gpointer".
2413
2414 M libmenu/gmenu-tree.c
2415 M libmenu/gmenu-tree.h
2416 M util/test-menu-spec.c
2417
2418 commit 76895ad01d450696519425d03beab8845230397b
2419 Author: Colin Walters <walters@verbum.org>
2420 Date: Wed Apr 20 17:16:25 2011 -0400
2421
2422 introspection: scan gmenu-tree.c
2423
2424 Now that we're actually adding gtk-doc.
2425
2426 M libmenu/Makefile.am
2427
2428 commit 0877f894a6c74f0dc7522e9cb93cc223097d1494
2429 Author: Colin Walters <walters@verbum.org>
2430 Date: Mon Apr 18 16:17:04 2011 -0400
2431
2432 Document a few functions
2433
2434 M libmenu/gmenu-tree.c
2435
2436 commit bd78be7ad777f70d2390309507162f5dc267ea2f
2437 Author: Colin Walters <walters@verbum.org>
2438 Date: Mon Apr 18 15:36:01 2011 -0400
2439
2440 gmenu_tree_entry_get_parent: New function
2441
2442 Earlier we moved this down to GMenuTreeDirectory, but it turns
2443 out gnome-shell does expect to be able to get the parent of a
2444 GMenuTreeEntry. In the future I want to nuke that code, but
2445 for now just readd this functionality.
2446
2447 M libmenu/gmenu-tree.c
2448 M libmenu/gmenu-tree.h
2449
2450 commit 94b2ea48a5221bd6dc82b8b468bb85ea6d420e57
2451 Author: Colin Walters <walters@verbum.org>
2452 Date: Mon Apr 18 10:10:53 2011 -0400
2453
2454 layout: Use thread-default main context for callbacks
2455
2456 Rather than hardcoding g_idle_add(); this gives us future
2457 flexibility for thread support.
2458
2459 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2460
2461 M libmenu/menu-layout.c
2462
2463 commit 52f9f7017779b6691e2b3f46f6c24e37f219abbf
2464 Author: Colin Walters <walters@verbum.org>
2465 Date: Sun Apr 17 11:22:32 2011 -0400
2466
2467 Remove gmenu_tree_directory_get_tree()
2468
2469 This causes a circular reference internally, and API consumers
2470 can just keep track of it easily enough externally.
2471
2472 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2473
2474 M libmenu/gmenu-tree.c
2475 M libmenu/gmenu-tree.h
2476
2477 commit 5d1e03adc206f52dec82f2b5e8831022321cb1f8
2478 Author: Colin Walters <walters@verbum.org>
2479 Date: Sun Apr 17 10:17:20 2011 -0400
2480
2481 Switch to gslice for most data
2482
2483 This is more efficient for the small items we have here.
2484
2485 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2486
2487 M libmenu/gmenu-tree.c
2488
2489 commit 4f47a654d91cc3b08d46ef518a42c7f484f01be3
2490 Author: Colin Walters <walters@verbum.org>
2491 Date: Sun Apr 17 09:57:47 2011 -0400
2492
2493 Rename gmenu_tree_get_menu_file() to gmenu_tree_get_menu_path()
2494
2495 Document it and clean it up.
2496
2497 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2498
2499 M libmenu/gmenu-tree.c
2500 M libmenu/gmenu-tree.h
2501 M util/test-menu-spec.c
2502
2503 commit 13920c91868f77a964b4498b00072563608f583e
2504 Author: Colin Walters <walters@verbum.org>
2505 Date: Sun Apr 17 09:51:58 2011 -0400
2506
2507 Further propagate GError for gmenu_tree_load_sync()
2508
2509 We had some GError use internally; clean things up so we propagate
2510 it more consistently to the top of gmenu_tree_load_sync().
2511
2512 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2513
2514 M libmenu/gmenu-tree.c
2515
2516 commit 8ecb1aa5d762d25f787002dd001e92e404efabe9
2517 Author: Colin Walters <walters@verbum.org>
2518 Date: Sun Apr 17 09:31:34 2011 -0400
2519
2520 Add explicit gmenu_tree_load_sync()
2521
2522 Rather than having _get_root_directory() be lazy, require users
2523 to explicitly load via this function (or in the future, an
2524 async variant).
2525
2526 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2527
2528 M libmenu/gmenu-tree.c
2529 M libmenu/gmenu-tree.h
2530 M util/test-menu-spec.c
2531
2532 commit a2bda1462b6b46b1c8e47a19977f15c294226ef9
2533 Author: Colin Walters <walters@verbum.org>
2534 Date: Sun Apr 17 08:58:19 2011 -0400
2535
2536 Lower gmenu_tree_item_get_parent to gmenu_tree_directory_get_parent
2537
2538 Introspection doesn't know about the GMenuTreeItem "subclassing",
2539 so we would have to duplicate the _get_parent method on all
2540 subclasses - but in practice it only seems to be used on directories,
2541 so just lower it there.
2542
2543 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2544
2545 M libmenu/gmenu-tree.c
2546 M libmenu/gmenu-tree.h
2547 M util/test-menu-spec.c
2548
2549 commit 14c163c8a8d35fe2daa9c0973495fb4462a3ddec
2550 Author: Colin Walters <walters@verbum.org>
2551 Date: Sun Apr 17 08:46:14 2011 -0400
2552
2553 GMenuTreeItem: Register boxed types, drop user data
2554
2555 This was a hack for the static Python bindings, no longer necessary
2556 after we register proper boxed types for the structures.
2557
2558 Convert the refcount to an atomic integer too; the _unref may be
2559 called from a garbage collector thread in bindings.
2560
2561 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2562
2563 M libmenu/gmenu-tree.c
2564 M libmenu/gmenu-tree.h
2565
2566 commit 8eaf04da66be9437c518ac21e27cbbb67abcd3f5
2567 Author: Colin Walters <walters@verbum.org>
2568 Date: Sun Apr 17 08:44:02 2011 -0400
2569
2570 Rename gmenu_tree_item_get_type() to _get_item_type()
2571
2572 The _get_type() namespace suffix is reserved for GType.
2573
2574 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2575
2576 M libmenu/gmenu-tree.c
2577 M libmenu/gmenu-tree.h
2578 M util/test-menu-spec.c
2579
2580 commit 474b86aac925d7b45d3bbbaba9111719ca0d9b8a
2581 Author: Colin Walters <walters@verbum.org>
2582 Date: Sun Apr 17 08:40:47 2011 -0400
2583
2584 Replace monitor API with a simple "changed" signal
2585
2586 So much simpler...
2587
2588 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2589
2590 M libmenu/gmenu-tree.c
2591 M libmenu/gmenu-tree.h
2592 M util/test-menu-spec.c
2593
2594 commit 21672a2d0ee94a9588fc15cf0cd4c5ffdfc818c1
2595 Author: Colin Walters <walters@verbum.org>
2596 Date: Sun Apr 17 07:50:19 2011 -0400
2597
2598 Convert to GObject, drop static Python bindings
2599
2600 GMenuTree is now a GObject. Drop the static Python bindings, since
2601 introspection gives us coverage of most of the API now.
2602
2603 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2604
2605 M Makefile.am
2606 M configure.ac
2607 M libmenu/gmenu-tree.c
2608 M libmenu/gmenu-tree.h
2609 M libmenu/menu-monitor.c
2610 D python/Makefile.am
2611 D python/gmenu.c
2612 M util/gnome-menus-ls.py
2613 M util/test-menu-spec.c
2614
2615 commit 0a7e4736d221ada2167a064c8b4aa9710a2e04bf
2616 Author: Colin Walters <walters@verbum.org>
2617 Date: Sun Apr 17 07:32:07 2011 -0400
2618
2619 Drop GMenuTree caching and support for absolute paths
2620
2621 This is work towards converting to GObject; the API to create a tree
2622 is now just gmenu_tree_new().
2623
2624 First, the internal caching makes things very complex for little gain
2625 - gnome-shell only creates one GMenuTree, and gnome-panel could pretty
2626 easily be converted to do so.
2627
2628 In a Google Code Search, I couldn't find anyone using absolute paths
2629 for menus, and looking through the revision history, I don't see
2630 a rationale for it. So, just drop it too.
2631
2632 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2633
2634 M libmenu/gmenu-tree.c
2635 M libmenu/gmenu-tree.h
2636 M python/gmenu.c
2637 M util/test-menu-spec.c
2638
2639 commit 903c144be9527f048fa1389c39872d0f22740b62
2640 Author: Colin Walters <walters@verbum.org>
2641 Date: Sun Apr 17 07:17:22 2011 -0400
2642
2643 GMenuTreeFlags: Register with GType
2644
2645 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2646
2647 M libmenu/gmenu-tree.c
2648 M libmenu/gmenu-tree.h
2649
2650 commit d660a95756c99fe053ffd4fbaf523008868f5a67
2651 Author: Colin Walters <walters@verbum.org>
2652 Date: Sun Apr 17 07:10:01 2011 -0400
2653
2654 Fold sorting into GMenuTreeFlags
2655
2656 There's only two sorts right now, and so we can make one the default
2657 and select the other with the flags.
2658
2659 Drop the ability to set the sort at runtime; this never was compatible
2660 with the current GMenuTree caching, and also I'm trying to move
2661 GMenuTree towards being immutable.
2662
2663 M libmenu/gmenu-tree.c
2664 M libmenu/gmenu-tree.h
2665 M python/gmenu.c
2666
2667 commit 4d00dcf9ce31b248c61dc66430b881ba32e2d611
2668 Author: Colin Walters <walters@verbum.org>
2669 Date: Sat Apr 16 14:09:57 2011 -0400
2670
2671 Rebase DesktopEntry on GDesktopAppInfo
2672
2673 The main motivation for this work is to avoid gnome-shell having
2674 to read all .desktop files *twice* - once from gnome-menus, and
2675 once from gio (when doing MIME assocation etc.)
2676
2677 This patch replaces almost all of the accessors for GMenuTreeEntry
2678 with the simple gmenu_tree_entry_get_app_info().
2679
2680 Note this patch depends on patches from (see bug 647967).
2681
2682 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2683
2684 M configure.ac
2685 M libmenu/Makefile.am
2686 M libmenu/desktop-entries.c
2687 M libmenu/desktop-entries.h
2688 M libmenu/gmenu-tree.c
2689 M libmenu/gmenu-tree.h
2690 M python/Makefile.am
2691 M python/gmenu.c
2692 M util/Makefile.am
2693
2694 commit 8a01f3c268a1515fb4e9ee8c924dae20a0880bb1
2695 Author: Colin Walters <walters@verbum.org>
2696 Date: Sat Apr 16 13:31:21 2011 -0400
2697
2698 desktop-entries.c: Split structure explicitly between .desktop and .directory
2699
2700 This is code cleaup preparatory work for rebasing DesktopEntry on
2701 GDesktopAppInfo.
2702
2703 These two cases are different; make this explicit via structure subclassing
2704 of a common base structure.
2705
2706 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2707
2708 M libmenu/desktop-entries.c
2709
2710 commit 5a936c77ebb7ffddbc4e282662bb2d5f62a8a814
2711 Author: Colin Walters <walters@verbum.org>
2712 Date: Sat Apr 16 11:54:17 2011 -0400
2713
2714 DesktopEntry: Clean up structure, make TryExec evaluation lazy
2715
2716 This is preparatory work for rebasing DesktopEntry on top of
2717 GDesktopAppInfo.
2718
2719 First, it doesn't make sense to represet a random subset of booleans
2720 as flags; just flatten these into a bitfield. Move the refcount to be
2721 a plain guint at top.
2722
2723 Second, previously we were calling g_find_program_in_path when
2724 creating a .desktop file, even if the caller wasn't interested in
2725 whether the TryExec succeeded. Make this lazy.
2726
2727 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2728
2729 M libmenu/desktop-entries.c
2730
2731 commit ea008b417c02e8238f58d2d419d01129c2de9226
2732 Author: Colin Walters <walters@verbum.org>
2733 Date: Sat Apr 16 11:04:26 2011 -0400
2734
2735 DesktopEntry: Make basename const reference
2736
2737 Avoids another malloc block.
2738
2739 https://bugzilla.gnome.org/show_bug.cgi?id=647968
2740
2741 M libmenu/desktop-entries.c
2742
2743 commit 6cf363f9eaf4ba8ea736ca0a9e8d427226f381f6
2744 Author: Friedel Wolff <friedel@translate.org.za>
2745 Date: Thu Jul 7 22:30:06 2011 +0200
2746
2747 Add Zulu (zu) to LINGUAS
2748
2749 M po/LINGUAS
2750
2751 commit 756d19762d1793ebe80df661328a1c7a510b9773
2752 Author: Priscilla Mahlangu <priny@translate.za>
2753 Date: Thu Jul 7 22:28:26 2011 +0200
2754
2755 New translation for Zulu (zu)
2756
2757 A po/zu.po
2758
2759 commit 5c896c6418cbc6111c823cca5401204bd62c16dc
2760 Author: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2761 Date: Sat Jun 25 20:33:13 2011 +0300
2762
2763 Updated Belarusian translation.
2764
2765 M po/be.po
2766
2767 commit 9841d10ecf88b816ea18f186b64d4f1798f0c21a
2768 Author: Carles Ferrando <carles.ferrando@gmail.com>
2769 Date: Sun May 29 18:26:56 2011 +0200
2770
2771 [l10n]Updated Catalan (Valencian) translation
2772
2773 M po/ca@valencia.po
2774
2775 commit 7336104da09a01db012c6d7e4d11abc3bac2f4e8
2776 Author: Vincent Untz <vuntz@gnome.org>
2777 Date: Tue Apr 26 09:12:06 2011 +0200
2778
2779 release: post-release bump to 3.0.2
2780
2781 M configure.ac
2782
2783 commit 582b78f2d085130fb63537c8e7b1120ff77c9979
2784 Author: Vincent Untz <vuntz@gnome.org>
2785 Date: Tue Apr 26 09:11:59 2011 +0200
2786
2787 release: 3.0.1
2788
2789 M NEWS
2790 M configure.ac
2791
2792 commit 1febd5e57900e931b9aa53774a8c3caaff4f6a2a
2793 Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
2794 Date: Mon Apr 25 08:41:18 2011 +0700
2795
2796 Updated Thai translation.
2797
2798 M po/th.po
2799
2800 commit df2f20a03a78d23665148c608b4955bb4702c2d9
2801 Author: Anousak Souphavanh <anousak@gmail.com>
2802 Date: Tue Apr 19 12:47:55 2011 +0300
2803
2804 l10n: Added Lao translation for gnome-menus
2805
2806 M po/LINGUAS
2807 A po/lo.po
2808
2809 commit 2a436ad5101f3a05a029ffaded8d60c412686540
2810 Author: Vincent Untz <vuntz@gnome.org>
2811 Date: Mon Apr 4 23:04:28 2011 +0200
2812
2813 release: post-release bump to 3.0.1
2814
2815 M configure.ac
2816
2817 commit 8f288a1114e95adf98f8186cb309e5cacad66105
2818 Author: Vincent Untz <vuntz@gnome.org>
2819 Date: Mon Apr 4 23:04:21 2011 +0200
2820
2821 release: 3.0.0
2822
2823 M NEWS
2824 M configure.ac
2825
2826 commit a153239bdf7126154ada0b7e22bf827860cad330
2827 Author: Jamil Ahmed <itsjamil@gmail.com>
2828 Date: Mon Apr 4 15:25:07 2011 +0600
2829
2830 Updated Bengali translation
2831
2832 M po/bn.po
2833
2834 commit 381752ab7db377bdabcfda08ab90353ce78770f7
2835 Author: Jordi Serratosa <serratosa@gmail.com>
2836 Date: Mon Apr 4 00:14:46 2011 +0200
2837
2838 [l10n]Fixes on Catalan translation
2839
2840 M po/ca.po
2841
2842 commit 61593b848a8f03694a7963a0cb796aa06b82330c
2843 Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
2844 Date: Sat Apr 2 10:31:35 2011 +0700
2845
2846 Updated Vietnamese translation
2847
2848 M po/vi.po
2849
2850 commit 5d9e2b6e441b907ca9724ab3fdc02fc32fa12205
2851 Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
2852 Date: Sat Apr 2 10:31:18 2011 +0700
2853
2854 po/vi.po: import from Damned Lies
2855
2856 M po/vi.po
2857
2858 commit e8d7b8fb9d128ac39e3e0f1dd6a8e96c7ce18e75
2859 Author: krishnababu k <kkrothap@redhat.ocm>
2860 Date: Fri Apr 1 13:21:53 2011 +0530
2861
2862 Updated Telugu translations done by praveen
2863
2864 M po/te.po
2865
2866 commit 4fb0ed4d0e7a4fb40e56af6d462467bd16d4c512
2867 Author: Vincent Untz <vuntz@gnome.org>
2868 Date: Wed Mar 30 12:53:39 2011 +0530
2869
2870 layout: Show administration tools and old capplets in Other
2871
2872 Right now, administration tools and capplets that used to be in the
2873 Control Center are not accessible in any way. With this patch, they
2874 appear in Other. While this is not perfect, this will make them
2875 accessible until we find the right solution.
2876
2877 To do this, we just exclude .desktop files that match panels from the
2878 Control Center instead of excludings the Settings category, which is too
2879 broad.
2880
2881 https://bugzilla.gnome.org/show_bug.cgi?id=645061
2882
2883 M layout/applications.menu
2884
2885 commit 7c73245fcbd5feaf66df50ee6ca5e8c9132a11aa
2886 Author: Abduxukur Abdurixit <abdurixit@gmail.com>
2887 Date: Sun Mar 27 19:50:01 2011 +0200
2888
2889 Added UG translation
2890
2891 M po/ug.po
2892
2893 commit d2bd20e2e09fa4791da9a9881d77d58f31328ec9
2894 Author: Sense Hofstede <sense@ubuntu.com>
2895 Date: Fri Mar 18 19:52:08 2011 +0100
2896
2897 Updated Frisian translation
2898
2899 M po/fy.po
2900
2901 commit de31041b34a03b1438407a5604a0d416ea791e31
2902 Author: Khaled Hosny <khaledhosny@eglug.org>
2903 Date: Mon Mar 7 08:07:25 2011 +0200
2904
2905 Updated Arabic translation
2906
2907 M po/ar.po
2908
2909 commit 819557fd56cd9a867bc1ed66955b70c823292b71
2910 Author: Vincent Untz <vuntz@gnome.org>
2911 Date: Sun Mar 6 23:38:58 2011 +0100
2912
2913 release: post-release bump to 2.91.92
2914
2915 M configure.ac
2916
2917 commit 764cf265fac8b7ee574d045b44431fe7cfbd4852
2918 Author: Vincent Untz <vuntz@gnome.org>
2919 Date: Sun Mar 6 23:38:51 2011 +0100
2920
2921 release: 2.91.91
2922
2923 M NEWS
2924 M configure.ac
2925
2926 commit 8e256fa080eadccecea4823f688974da34ed3790
2927 Author: Daniel Korostil <ted.korostiled@gmail.com>
2928 Date: Tue Mar 1 17:43:54 2011 +0200
2929
2930 Uploaded Ukranian
2931
2932 M po/uk.po
2933
2934 commit 715a80efbe9d2be0f329979e13073b0ece9241af
2935 Author: Changwoo Ryu <cwryu@debian.org>
2936 Date: Sun Feb 27 17:17:37 2011 +0900
2937
2938 Updated Korean translation
2939
2940 M po/ko.po
2941
2942 commit 2966b4886b300a0bba438242fa5f44ac9f16f1c0
2943 Author: Vincent Untz <vuntz@gnome.org>
2944 Date: Wed Feb 23 02:55:18 2011 +0100
2945
2946 editor: Fix to work with latest pygi
2947
2948 https://bugzilla.gnome.org/show_bug.cgi?id=643019
2949
2950 M simple-editor/GMenuSimpleEditor/maindialog.py
2951 M simple-editor/GMenuSimpleEditor/menufilewriter.py
2952 M simple-editor/GMenuSimpleEditor/menutreemodel.py
2953
2954 commit 8c66c8ad72ab512bc194cf16eadb7bf76696d817
2955 Author: Friedel Wolff <friedel@translate.org.za>
2956 Date: Mon Feb 7 07:59:47 2011 +0200
2957
2958 Updated translation for Afrikaans (af)
2959
2960 M po/af.po
2961
2962 commit 9792ac69297dc003f5ba4d9461e15874ac1a6908
2963 Author: Vincent Untz <vuntz@gnome.org>
2964 Date: Fri Feb 4 12:01:19 2011 +0100
2965
2966 build: Add ${ACLOCAL_FLAGS} to ACLOCAL_AMFLAGS
2967
2968 This is used by gnome-autogen.sh, and we need it when aclocal.m4 is
2969 to be rebuilt by make, to avoid losing some aclocal paths.
2970
2971 Also, don't set ACLOCAL_AMFLAGS in configure.
2972
2973 M Makefile.am
2974 M configure.ac
2975
2976 commit 6223b261d5a46ac170567ca4d5c0a00a07f64d43
2977 Author: Pavol Klačanský <pavol@klacansky.com>
2978 Date: Wed Feb 2 09:39:00 2011 +0100
2979
2980 Updated Slovak translation
2981
2982 M po/sk.po
2983
2984 commit 668835a8d12d1dd5c88e3bc0fdd44eb6a63272e3
2985 Author: Vincent Untz <vuntz@gnome.org>
2986 Date: Wed Feb 2 01:21:58 2011 +0100
2987
2988 release: post-release bump to 2.91.90
2989
2990 M configure.ac
2991
2992 commit c24f0b2ada3123141049ca579d080245a923b88a
2993 Author: Vincent Untz <vuntz@gnome.org>
2994 Date: Wed Feb 2 01:21:07 2011 +0100
2995
2996 release: 2.91.6
2997
2998 M NEWS
2999 M configure.ac
3000
3001 commit 8c2c9b554fdbbd10769c6028a51e230e362b9b4c
3002 Author: Vincent Untz <vuntz@gnome.org>
3003 Date: Wed Feb 2 01:19:36 2011 +0100
3004
3005 build: Fix distcheck (missing file in POTFILES.in)
3006
3007 M po/POTFILES.in
3008
3009 commit b68bcd27f44ce2c494f6e3cd9695890b9c02af04
3010 Author: Vincent Untz <vuntz@gnome.org>
3011 Date: Tue Feb 1 15:18:49 2011 +0100
3012
3013 layout: Drop settings.menu
3014
3015 It doesn't fit in the GNOME 3 world, where we use gnomecc.menu.
3016
3017 D desktop-directories/InternetAndNetwork.directory.in
3018 D desktop-directories/LookAndFeel.directory.in
3019 M desktop-directories/Makefile.am
3020 D desktop-directories/Settings-System.directory.in
3021 D desktop-directories/Settings.directory.in
3022 D desktop-directories/X-GNOME-Menu-System.directory.in
3023 M layout/Makefile.am
3024 D layout/settings.menu
3025 M po/POTFILES.in
3026
3027 commit 9ff2b267f4ae08ec38a2eb49c9de7f6778708d22
3028 Author: Fran Diéguez <fran.dieguez@mabishu.com>
3029 Date: Thu Jan 27 03:38:30 2011 +0100
3030
3031 QA of Galician translations
3032
3033 M po/gl.po
3034
3035 commit 81dcfb9938e49083eddf545ec4ad919885a041c8
3036 Author: Gheyret T.Kenji <gheyret@gmail.com>
3037 Date: Thu Dec 23 19:02:04 2010 +0100
3038
3039 Added UG translation
3040
3041 M po/ug.po
3042
3043 commit 340f2aa06c57705e9c3c7dcc62abccfa583ed2c8
3044 Author: Mattias Põldaru <mahfiaz gmail com>
3045 Date: Mon Dec 20 14:06:53 2010 +0200
3046
3047 [l10n] Updated Estonian translation
3048
3049 M po/et.po
3050
3051 commit 31c1309040172956c84a6123460e7254221ac2eb
3052 Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
3053 Date: Sun Dec 19 12:56:53 2010 +0700
3054
3055 po/vi.po: import some translations from Ubuntu/Maverick
3056
3057 M po/vi.po
3058
3059 commit faf02643fb23eb2ca0ef08b75cd77e1cae0237ab
3060 Author: Gheyret T.Kenji <gheyret@gmail.com>
3061 Date: Sat Nov 20 11:41:03 2010 +0100
3062
3063 Added UG translation
3064
3065 M po/ug.po
3066
3067 commit f921bd15a02ee98d8ad2a5301135f096e0a0621f
3068 Author: Mahyar Moghimi <mahyar.moqimi@gmail.com>
3069 Date: Fri Nov 19 16:16:58 2010 +0330
3070
3071 Updating Persian Translation
3072
3073 M po/fa.po
3074
3075 commit eb15998cee9614522a4a6018249aa449a5b9ead0
3076 Author: Gheyret T.Kenji <gheyret@gmail.com>
3077 Date: Sat Nov 13 22:20:28 2010 +0100
3078
3079 Added UG translation
3080
3081 M po/ug.po
3082
3083 commit 5062b41c9ede06f1dfaa030a72201d7cb24e28d4
3084 Author: Carles Ferrando <carles.ferrando@gmail.com>
3085 Date: Fri Oct 29 01:09:57 2010 +0100
3086
3087 Updated Catalan (Valencian) translation
3088
3089 M po/ca@valencia.po
3090
3091 commit cfaef75741125ab692e4154dcf9ceda8b554c26d
3092 Author: Vincent Untz <vuntz@gnome.org>
3093 Date: Sat Oct 9 11:48:56 2010 +0200
3094
3095 build: Update git.mk from pango
3096
3097 M git.mk
3098
3099 commit 9cbd519531eaacb61cc686c13dce94cc5efb2fb2
3100 Author: Vincent Untz <vuntz@gnome.org>
3101 Date: Wed Oct 6 16:44:29 2010 +0200
3102
3103 editor: Remove useless import
3104
3105 M simple-editor/GMenuSimpleEditor/maindialog.py
3106
3107 commit 6a776912dd1c963644b0291dbf8726ef1ec116ee
3108 Author: Vincent Untz <vuntz@gnome.org>
3109 Date: Wed Oct 6 16:42:06 2010 +0200
3110
3111 introspection: Tell g-ir-scanner what are the prefixes
3112
3113 This means we now require gobject-introspection 0.9.5.
3114
3115 M configure.ac
3116 M libmenu/Makefile.am
3117
3118 commit 5092245c4fe1449bee93b8923e370d7db339f40f
3119 Author: Vincent Untz <vuntz@gnome.org>
3120 Date: Wed Oct 6 15:45:31 2010 +0200
3121
3122 libmenu: Do not send multiple notifications for one file change
3123
3124 We emit notifications in the idle loop, which enables us to compress
3125 multiple notifications: this way, we can check if there is already a
3126 notification for a directory.
3127
3128 We do this at the CachedDir level because it enables us to get one
3129 notification for a file rename, for example. But we also need it at the
3130 MenuLayout level to be sure to compress notifications accross multiple
3131 directories. It could be argued that we only need the latter, but I like
3132 it this way :-)
3133
3134 https://bugzilla.gnome.org/show_bug.cgi?id=172046
3135
3136 M libmenu/entry-directories.c
3137 M libmenu/menu-layout.c
3138
3139 commit 2e394806107ccbf0a3b822ab299042ea441c721e
3140 Author: Vincent Untz <vuntz@gnome.org>
3141 Date: Wed Oct 6 12:01:53 2010 +0200
3142
3143 editor: Forgot to remove "import pygtk" :-)
3144
3145 M simple-editor/GMenuSimpleEditor/main.py
3146
3147 commit adb08fee8c3677e539b9d1ca8fab9be1c4bf14b9
3148 Author: Vincent Untz <vuntz@gnome.org>
3149 Date: Wed Oct 6 11:58:31 2010 +0200
3150
3151 editor: Remove has_separator property
3152
3153 It's gone in new GTK+.
3154
3155 M simple-editor/gmenu-simple-editor.ui
3156
3157 commit cd550ce70f391ba3511800a1e100213bc3ff6c45
3158 Author: Vincent Untz <vuntz@gnome.org>
3159 Date: Wed Oct 6 11:56:48 2010 +0200
3160
3161 editor: port to pygobject-based introspection bindings
3162
3163 https://bugzilla.gnome.org/show_bug.cgi?id=626256
3164
3165 M simple-editor/GMenuSimpleEditor/main.py
3166 M simple-editor/GMenuSimpleEditor/maindialog.py
3167 M simple-editor/GMenuSimpleEditor/menufilewriter.py
3168 M simple-editor/GMenuSimpleEditor/menutreemodel.py
3169
3170 commit ce014ee2884f134bcd9764043a58eb32294062ed
3171 Author: Kikongo Translation Team <lundombe01@zaya-dio.com>
3172 Date: Mon Sep 27 13:27:43 2010 +0200
3173
3174 Added Kikongo translation
3175
3176 M po/LINGUAS
3177 A po/kg.po
3178
3179 commit 15056451271dc5faf31ee2161cdb5696773275c5
3180 Author: Vincent Untz <vuntz@gnome.org>
3181 Date: Mon Sep 27 12:58:48 2010 +0200
3182
3183 release: post-release bump to 2.30.5
3184
3185 M configure.ac
3186
3187 commit 9c269a6850ca8c97edc1e41419d8f7778574c84f
3188 Author: Vincent Untz <vuntz@gnome.org>
3189 Date: Mon Sep 27 12:58:40 2010 +0200
3190
3191 release: 2.30.4
3192
3193 M NEWS
3194 M configure.ac
3195
3196 commit 90a58de1f3a7381b26206be39624a3d40d8ffb07
3197 Author: Vincent Untz <vuntz@gnome.org>
3198 Date: Mon Sep 27 12:29:45 2010 +0200
3199
3200 misc: Rename --enable-deprecations to --enable-deprecation-flags
3201
3202 This is a better name for this configure option, since it's really about
3203 enabling the use of the deprecation flags, not allowing the use of
3204 deprecated API.
3205
3206 M configure.ac
3207
3208 commit f1da5abb7c1783134cfa485b323aedb4f5bc2465
3209 Author: Vincent Untz <vuntz@gnome.org>
3210 Date: Mon Sep 27 12:04:53 2010 +0200
3211
3212 introspection: Associate .gir with pkg-config file
3213
3214 M libmenu/Makefile.am
3215
3216 commit fbd3e2c9f8fb8de4c975367f30b84121478da7d2
3217 Author: Vincent Untz <vuntz@gnome.org>
3218 Date: Thu Sep 23 19:40:47 2010 +0200
3219
3220 libmenu: Clear cache of desktop entries set when files are added/removed
3221
3222 When installing or removing an application, we get a notification of
3223 change. However, the menu tree still contained the same content.
3224
3225 We were simply not clearing the cache containing the list of desktop
3226 entries when a file got added or removed, meaning that we always got the
3227 same list of desktop entries.
3228
3229 (Note that it didn't affect gnome-panel, it's unclear why)
3230
3231 https://bugzilla.gnome.org/show_bug.cgi?id=630410
3232
3233 M libmenu/entry-directories.c
3234
3235 commit 54af0ebf8863955c0641670343ac57900092f104
3236 Author: Torstein Winterseth <kvikende@fsfe.org>
3237 Date: Wed Sep 22 14:32:00 2010 +0200
3238
3239 Updated Norwegian Nynorsk translation.
3240
3241 M po/nn.po
3242
3243 commit b8874d1d36c9b7d448b4958af5b71f2fa3606984
3244 Author: Vincent Untz <vuntz@gnome.org>
3245 Date: Mon Sep 20 17:39:28 2010 +0200
3246
3247 build: Update all Makefile.am to more recent standards
3248
3249 M Makefile.am
3250 M desktop-directories/Makefile.am
3251 M layout/Makefile.am
3252 M libmenu/Makefile.am
3253 M python/Makefile.am
3254 M simple-editor/GMenuSimpleEditor/Makefile.am
3255 M simple-editor/Makefile.am
3256 M util/Makefile.am
3257
3258 commit 7060e3c48a391c0fa96e57879575e333c3a54e67
3259 Author: Vincent Untz <vuntz@gnome.org>
3260 Date: Mon Sep 20 17:37:50 2010 +0200
3261
3262 misc: Update instructions for commit messages
3263
3264 We're switching to "tag:" instead of "[tag]".
3265
3266 M ChangeLog
3267
3268 commit 22642577f7324349b3681bc58e32004820236066
3269 Author: Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>
3270 Date: Mon Sep 20 18:06:25 2010 +0900
3271
3272 Updated Japanese translation
3273
3274 M po/ja.po
3275
3276 commit feeb6b4d64f2d3e5e0f284aa3e1bfd625a627b1f
3277 Author: Daniel Martinez <entaltoaragon@gmail.com>
3278 Date: Sat Sep 18 20:45:19 2010 +0200
3279
3280 Updated Aragonese translation
3281
3282 M po/an.po
3283
3284 commit 6010094c40eb65965622141cb09fec3a0c8b31d3
3285 Author: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
3286 Date: Wed Sep 15 12:55:46 2010 +0600
3287
3288 Updated Kazakh translation
3289
3290 M po/kk.po
3291
3292 commit fe36b5b5371404ea96a46ac6d6b4a003f54d9828
3293 Author: Vincent Untz <vuntz@gnome.org>
3294 Date: Tue Sep 14 14:40:07 2010 +0200
3295
3296 release: post-release bump to 2.30.4
3297
3298 M configure.ac
3299
3300 commit 721b241e2c5449003238d333d03063fdfe7b3aa1
3301 Author: Vincent Untz <vuntz@gnome.org>
3302 Date: Tue Sep 14 14:39:56 2010 +0200
3303
3304 release: 2.30.3
3305
3306 M NEWS
3307 M configure.ac
3308
3309 commit 328cff2e2951e817a6e999b3a3a8b563f07cd778
3310 Author: Vincent Untz <vuntz@gnome.org>
3311 Date: Wed Sep 8 19:23:00 2010 +0200
3312
3313 [misc] Update AUTHORS, HACKING, MAINTAINERS, README
3314
3315 Nothing new, but make sure this is up-to-date.
3316
3317 Also tweak a bit autogen.sh and Makefile.am to make them look similar in
3318 all my modules.
3319
3320 M AUTHORS
3321 M HACKING
3322 M MAINTAINERS
3323 M Makefile.am
3324 M README
3325 M autogen.sh
3326 M gnome-menus.doap
3327
3328 commit 4cfd7db5d1ac221bc1397854a04dc40a654f1188
3329 Author: Vincent Untz <vuntz@gnome.org>
3330 Date: Wed Sep 8 17:48:37 2010 +0200
3331
3332 [misc] Update license files to latest text
3333
3334 Note that this doesn't change the license. The license text was updated
3335 for the latest FSF address, for example.
3336
3337 M COPYING
3338 M COPYING.LIB
3339
3340 commit bd02ce500383aa04914fda89900af93cdb33809d
3341 Author: Vincent Untz <vuntz@gnome.org>
3342 Date: Wed Sep 8 17:09:44 2010 +0200
3343
3344 [build] Rename configure.in to configure.ac
3345
3346 M autogen.sh
3347 R100 configure.in configure.ac
3348
3349 commit 8b14b78f279bad26580387b69a3274ba1197f66b
3350 Author: Dirgita <dirgitadevina@yahoo.co.id>
3351 Date: Wed Aug 4 10:36:10 2010 +0700
3352
3353 Updated Indonesian translation
3354
3355 M po/id.po
3356
3357 commit d524140a28c92719bdcc81df207c38c3c96052c0
3358 Author: Pablo Castellano <pablog@src.gnome.org>
3359 Date: Tue Aug 3 19:57:18 2010 +0200
3360
3361 Update git.mk from pango
3362
3363 M git.mk
3364
3365 commit d0cbd37e93980bae0781704765c56009913b0204
3366 Author: Gheyret Tohti <gheyret@yahoo.com>
3367 Date: Tue Aug 3 13:54:06 2010 +0200
3368
3369 Updated Uyghur translation
3370
3371 M po/ug.po
3372
3373 commit 784b664c760d655ae306d2d5d718231a1d09333f
3374 Author: Fran Diéguez <fran.dieguez@mabishu.com>
3375 Date: Tue Jul 20 12:10:56 2010 +0200
3376
3377 Updated Galician translations
3378
3379 M po/gl.po
3380
3381 commit 1100aed1ec5863ebfa80e51ca7f07e2b964459dd
3382 Author: Sense Hofstede <qense@ubuntu.com>
3383 Date: Sun Jul 18 00:34:23 2010 +0200
3384
3385 Fix forgotten copyright notices in the Frisian translations.
3386
3387 M po/fy.po
3388
3389 commit e29c70ada73e7f029423361da318685d517cbd2b
3390 Author: Sense Hofstede <qense@ubuntu.com>
3391 Date: Sun Jul 18 00:31:14 2010 +0200
3392
3393 Updated Frisian translation and added it to the LINGUAS file
3394
3395 M po/LINGUAS
3396 A po/fy.po
3397
3398 commit ce67a8b1603bb878131c23b625cf48b44ea8c477
3399 Author: Reuben Potts <reuben03@live.com>
3400 Date: Wed Jul 7 13:51:56 2010 +0200
3401
3402 Added Manx translation
3403
3404 M po/LINGUAS
3405 A po/gv.po
3406
3407 commit 5e30e13fd5923befda0372473f64a81b98b35f92
3408 Author: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
3409 Date: Fri Jul 2 14:40:12 2010 +0300
3410
3411 Updated Kazakh translation for gdm
3412
3413 M po/kk.po
3414
3415 commit 2054996af842e6df1726e58d81a569f03e30d75f
3416 Author: Vincent Untz <vuntz@gnome.org>
3417 Date: Wed Jun 30 12:36:26 2010 +0200
3418
3419 [editor] Better fix for XDG_MENU_PREFIX support in editor
3420
3421 The previous fix was partly wrong, because the menu file referenced in
3422 the created user menu file was not using the prefix.
3423
3424 So instead of letting the library handle XDG_MENU_PREFIX, we handle it
3425 ourselves everywhere.
3426
3427 M simple-editor/GMenuSimpleEditor/menufilewriter.py
3428 M simple-editor/GMenuSimpleEditor/menutreemodel.py
3429
3430 commit ac425c5ac9e386fd171801496503d591d5c5ade2
3431 Author: Vincent Untz <vuntz@gnome.org>
3432 Date: Wed Jun 30 12:31:33 2010 +0200
3433
3434 [editor] Respect XDG_MENU_PREFIX when writing user menu file
3435
3436 https://bugzilla.gnome.org/show_bug.cgi?id=623197
3437
3438 M simple-editor/GMenuSimpleEditor/menufilewriter.py
3439
3440 commit e8a7198465e090f3e35fc1ac328800909574801f
3441 Author: Kristjan Schmidt <kristjan.schmidt@googlemail.com>
3442 Date: Wed Jun 23 17:15:51 2010 +0200
3443
3444 Updated Esperanto translation
3445
3446 M po/eo.po
3447
3448 commit 0e25cc961e1814cb2b6e6e2b9172a649f5542a50
3449 Author: Vincent Untz <vuntz@gnome.org>
3450 Date: Tue Jun 22 03:57:14 2010 +0200
3451
3452 [release] post-release bump to 2.30.3
3453
3454 M configure.in
3455
3456 commit 3ec065b74712c99d1cdde955e864f203afccb41b
3457 Author: Vincent Untz <vuntz@gnome.org>
3458 Date: Tue Jun 22 03:57:06 2010 +0200
3459
3460 [release] 2.30.2
3461
3462 M NEWS
3463 M README
3464 M configure.in
3465
3466 commit 320453668ea791f1d7c9f11d84363bfbae63fb25
3467 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
3468 Date: Tue Jun 15 23:00:19 2010 -0500
3469
3470 [build] Do not dist gir_DATA
3471
3472 GIR files contain a shared-library attribute which varies per platform,
3473 and therefore must not be disted; see bug 621611 for rationale.
3474
3475 https://bugzilla.gnome.org/show_bug.cgi?id=621724
3476
3477 M libmenu/Makefile.am
3478
3479 commit 612aeb7cd40f57757a733d0805a52f6a6a000152
3480 Author: Fran Diéguez <fran.dieguez@mabishu.com>
3481 Date: Sun Jun 13 19:32:21 2010 +0200
3482
3483 Updated Galician translations
3484
3485 M po/gl.po
3486
3487 commit 7e1332e718118f16ab451a622d40ec3afde79c2b
3488 Author: Matej Urbančič <mateju@svn.gnome.org>
3489 Date: Fri May 21 22:24:04 2010 +0200
3490
3491 Updated Slovenian translation
3492
3493 M po/sl.po
3494
3495 commit f93cca66736b876b8739fb900b51c82e22c7aead
3496 Author: Thomas Thurman <tthurman@gnome.org>
3497 Date: Sun May 16 18:04:30 2010 -0400
3498
3499 Updated Shavian translation
3500
3501 M po/en@shaw.po
3502
3503 commit 0928101b34ac6bc6e7da5c8bd52d39af43a9f38f
3504 Author: Thomas Thurman <tthurman@gnome.org>
3505 Date: Wed May 12 18:41:06 2010 -0400
3506
3507 Updated Shavian transliteration
3508
3509 M po/en@shaw.po
3510
3511 commit a66c03d1771a15ffe054e9e64ff5183bda951bcf
3512 Author: Peteris Krisjanis <pecisk@gmail.com>
3513 Date: Sat Apr 24 22:25:22 2010 +0300
3514
3515 Updated Latvian translation.
3516
3517 M po/lv.po
3518
3519 commit 498f225b6f9a4a146a534bacdc8b8b665cf71d95
3520 Author: Daniel Martinez <entaltoaragon@gmail.com>
3521 Date: Sat Apr 24 11:21:36 2010 +0200
3522
3523 Added Aragonese translation
3524
3525 M po/LINGUAS
3526 A po/an.po
3527
3528 commit 5b8ae6e132b31a0a0f14021ef6cf2fc2794bc87e
3529 Author: Carles Ferrando <carles.ferrando@gmail.com>
3530 Date: Wed Apr 21 23:31:15 2010 +0200
3531
3532 Updated Catalan (Valencian) translation
3533
3534 M po/ca@valencia.po
3535
3536 commit 7408013978ba989af175f2ca17526fec4eea49c6
3537 Author: Shankar Prasad <svenkate@svenkate.pnq.redhat.com>
3538 Date: Wed Apr 21 11:50:02 2010 +0530
3539
3540 Updated Kannada translations
3541
3542 M po/kn.po
3543
3544 commit 20d4732caf167f54c376d34184ca7fdcf7d834b7
3545 Author: Jordi Serratosa <jordis.lists@gmail.com>
3546 Date: Fri Apr 2 17:41:22 2010 +0200
3547
3548 Fixes to Catalan translation
3549
3550 M po/ca.po
3551
3552 commit a08bbc660cd320245ea4f3ccab4c33261e83dc7b
3553 Author: Christian Kirbach <Christian.Kirbach@googlemail.com>
3554 Date: Wed Mar 31 20:11:39 2010 +0200
3555
3556 Updated German translation
3557
3558 M po/de.po
3559
3560 commit ffbddbf28289a4ac72b284e3cc6f4db04cf0b43e
3561 Author: Wouter Bolsterlee <wbolster@gnome.org>
3562 Date: Tue Mar 30 18:01:20 2010 +0200
3563
3564 Dutch translation updated by Wouter Bolsterlee
3565
3566 M po/nl.po
3567
3568 commit 8d9f3db359acde4395645a0ea95c48567e5d79f4
3569 Author: Reşat SABIQ <tilde.birlik@gmail.com>
3570 Date: Tue Mar 30 00:46:58 2010 -0500
3571
3572 Updated Crimean Tatar (Crimean Turkish) translation
3573
3574 M po/crh.po
3575
3576 commit fe6b717216cb93b05abc547fd11c550d9d4f4f4e
3577 Author: Vincent Untz <vuntz@gnome.org>
3578 Date: Tue Mar 30 02:02:15 2010 +0200
3579
3580 [release] post-release bump to 2.30.1
3581
3582 M configure.in
3583
3584 commit ada97a6e81d2f282796938269da7280dc5a8c83f
3585 Author: Vincent Untz <vuntz@gnome.org>
3586 Date: Tue Mar 30 02:02:06 2010 +0200
3587
3588 [release] 2.30.0
3589
3590 M NEWS
3591 M README
3592 M configure.in
3593
3594 commit 2d0068dc1859b3adf21cfcc47a23aa00fc7d4502
3595 Author: Kostas Papadimas <pkst@gnome.org>
3596 Date: Sun Mar 28 10:01:00 2010 +0300
3597
3598 Updated Greek translation
3599
3600 M po/el.po
3601
3602 commit b7d6ee4f3f252b57a85787043fa3506d1640fa05
3603 Author: Inaki Larranaga Murgoitio <dooteo@zundan.com>
3604 Date: Tue Mar 23 15:10:22 2010 +0100
3605
3606 Updated Basque language
3607
3608 M po/eu.po
3609
3610 commit e74ebd36d267033054e6bf15851da0f88d12eb3a
3611 Author: Badral Sanligiin <badral@openmn.org>
3612 Date: Tue Mar 23 02:57:26 2010 +0100
3613
3614 Updated Mongolian translation
3615
3616 M po/mn.po
3617
3618 commit 1bec0581f480c3e8b485be1453de389083feff5c
3619 Author: David Planella <david.planella@gmail.com>
3620 Date: Wed Mar 17 08:24:02 2010 +0100
3621
3622 Updated Catalan translation as per fixes discussed on the translation mailing list
3623
3624 M po/ca.po
3625
3626 commit 1253c82ed7ba774cbad7794c06d31249bf591c37
3627 Author: Vincent Untz <vuntz@gnome.org>
3628 Date: Mon Mar 15 09:55:46 2010 +0100
3629
3630 [libmenu] Never ignore Menuname nodes from DefaultLayout
3631
3632 If a Menuname node applies to a subdirectory that appears because of
3633 inlining, we generally want to ignore it. However, if this Menuname node
3634 comes from a DefaultLayout, then it should really be applied.
3635
3636 M libmenu/gmenu-tree.c
3637
3638 commit 7dba2d5302b539e24131e669e2db26f3c16e1547
3639 Author: Vincent Untz <vuntz@gnome.org>
3640 Date: Mon Mar 15 09:27:44 2010 +0100
3641
3642 [libmenu] Fix layout processing for Menuname nodes
3643
3644 Because of the scope of a variable, no submenu were matching Menuname
3645 nodes in the layouts, making all the Menuname nodes non-working.
3646
3647 https://bugzilla.gnome.org/show_bug.cgi?id=612585
3648
3649 M libmenu/gmenu-tree.c
3650
3651 commit c48304179db938f7336223f99ead95dda6044f7a
3652 Author: Changwoo Ryu <cwryu@debian.org>
3653 Date: Sat Mar 13 23:55:09 2010 +0900
3654
3655 Updated Korean translation
3656
3657 M po/ko.po
3658
3659 commit 87f03667154f5c77548506218c57020e37d04c81
3660 Author: Vincent Untz <vuntz@gnome.org>
3661 Date: Tue Mar 9 14:06:21 2010 +0100
3662
3663 [build] Add configure summary
3664
3665 M configure.in
3666
3667 commit 9fbaa3d7f76ffb4076216d231acf39da0331e0bc
3668 Author: Vincent Untz <vuntz@gnome.org>
3669 Date: Mon Mar 8 14:49:09 2010 +0100
3670
3671 [release] post-release bump to 2.30.0
3672
3673 M configure.in
3674
3675 commit 076f8c42ce3e46c3b5cb761a3cd65c6f1e0a55a2
3676 Author: Vincent Untz <vuntz@gnome.org>
3677 Date: Mon Mar 8 14:49:01 2010 +0100
3678
3679 [release] 2.29.92
3680
3681 M NEWS
3682 M README
3683 M configure.in
3684
3685 commit d50ff15f43bc2311fbd06bd9664ae9571fd550ea
3686 Author: Vincent Untz <vuntz@gnome.org>
3687 Date: Mon Mar 8 14:43:18 2010 +0100
3688
3689 [libmenu] Add gobject-introspection support
3690
3691 https://bugzilla.gnome.org/show_bug.cgi?id=598406
3692
3693 M Makefile.am
3694 M autogen.sh
3695 M configure.in
3696 M libmenu/Makefile.am
3697
3698 commit d3135a15585afcb8d597fae05beadfaf1c743238
3699 Author: Vincent Untz <vuntz@gnome.org>
3700 Date: Thu Mar 4 17:55:40 2010 +0100
3701
3702 [misc] Do not call bindtextdomain() and friends in test-menu-spec.c
3703
3704 We decided to not make this application translatable in commit
3705 25c10ed7, so we don't need those calls.
3706
3707 M util/test-menu-spec.c
3708
3709 commit 57e825050cf8eafb970c8ddd2dc9c66885d25ce3
3710 Author: Nikos Charonitakis <nikosx@gmail.com>
3711 Date: Thu Feb 25 00:52:48 2010 +0200
3712
3713 Updated Greek translation
3714
3715 M po/el.po
3716
3717 commit 274a633ddb053a70e26278308a6fb52ef933e608
3718 Author: Pavol Klačanský <pavol@klacansky.com>
3719 Date: Tue Feb 23 17:55:32 2010 +0100
3720
3721 Updated Slovak translation
3722
3723 M po/sk.po
3724
3725 commit 41d1ce2320c26dce1677e0624c36119ec88e6823
3726 Author: Vincent Untz <vuntz@gnome.org>
3727 Date: Mon Feb 22 20:18:20 2010 +0100
3728
3729 [release] post-release bump to 2.29.92
3730
3731 M configure.in
3732
3733 commit 5eaf95e2c9e7755332a7c586eef34726244290dd
3734 Author: Vincent Untz <vuntz@gnome.org>
3735 Date: Mon Feb 22 20:18:05 2010 +0100
3736
3737 [release] 2.29.91
3738
3739 M NEWS
3740 M README
3741 M configure.in
3742
3743 commit ca24481c06829c7382d20ac7ee2283e22b908451
3744 Author: Vincent Untz <vuntz@gnome.org>
3745 Date: Mon Feb 22 12:11:57 2010 +0100
3746
3747 [misc] Add translator comment for Personal
3748
3749 https://bugzilla.gnome.org/show_bug.cgi?id=610661
3750
3751 M desktop-directories/Personal.directory.in
3752
3753 commit 25c10ed70c8125516537b3b731dff1c559bcab94
3754 Author: Vincent Untz <vuntz@gnome.org>
3755 Date: Mon Feb 22 12:06:48 2010 +0100
3756
3757 [misc] Do not make the string test-menu-spec.c translatable
3758
3759 This is only a test program that doesn't get installed, so there's no
3760 point in making translators work on the strings there.
3761
3762 https://bugzilla.gnome.org/show_bug.cgi?id=609441
3763
3764 M po/POTFILES.in
3765 A po/POTFILES.skip
3766 M util/test-menu-spec.c
3767
3768 commit 8f52b3c312da587fb29590559cb50370787f6116
3769 Author: Fran Diéguez <frandieguez@ubuntu.com>
3770 Date: Mon Feb 15 18:44:37 2010 +0100
3771
3772 Updated Galician Translation
3773
3774 M po/gl.po
3775
3776 commit ef1383eda9480c96ac2e5d958342c98ab1be41cb
3777 Author: Torstein Adolf Winterseth <kvikende@yahoo.no>
3778 Date: Thu Jan 28 12:10:06 2010 +0100
3779
3780 Updated Norwegian Nynorsk translation
3781
3782 M po/nn.po
3783
3784 commit a0a398d77aa2ea28d267f106880e0df1417d8fab
3785 Author: Vincent Untz <vuntz@gnome.org>
3786 Date: Wed Jan 27 16:47:53 2010 +0100
3787
3788 [release] post-release bump to 2.29.90
3789
3790 M configure.in
3791
3792 commit 2c37a7cbdd9d6f7e9f1ccfb0d2979da897e9668e
3793 Author: Vincent Untz <vuntz@gnome.org>
3794 Date: Wed Jan 27 16:47:41 2010 +0100
3795
3796 [release] 2.29.6
3797
3798 M NEWS
3799 M README
3800 M configure.in
3801
3802 commit a462be862680ee3051eef3ca238f5bc405640e16
3803 Author: Jamil Ahmed <itsjamil@gmail.com>
3804 Date: Sun Jan 24 23:15:18 2010 +0600
3805
3806 Updated Bengali translation
3807
3808 M po/bn.po
3809
3810 commit fdafd8c07a65e65fdf6f2e7d358b7eb2b14d01eb
3811 Author: Aron Xu <aronxu@gnome.org>
3812 Date: Sun Jan 24 15:34:41 2010 +0800
3813
3814 Update Simplified Chinese translation.
3815
3816 M po/zh_CN.po
3817
3818 commit 89309a8bb1e76209e147180a3fe2fd15307d6012
3819 Author: Vincent Untz <vuntz@gnome.org>
3820 Date: Fri Jan 15 00:02:07 2010 +0100
3821
3822 [libmenu] Do not count non-inlining submenus as inlining with header
3823
3824 When computing if a submenu should be inlined, we use the number of
3825 items in the subsubmenus. It was always assuming that inlining with a
3826 header would be used, because of misuse of the will_inline_header field.
3827
3828 M libmenu/gmenu-tree.c
3829
3830 commit 4b51a77fcbc1a2c3e94945c4b92a65559f7e5996
3831 Author: Vincent Untz <vuntz@gnome.org>
3832 Date: Thu Jan 14 23:30:47 2010 +0100
3833
3834 [libmenu] Support inline alias of an inline alias
3835
3836 M libmenu/gmenu-tree.c
3837
3838 commit cd1d0a199110ca94266c3e8b928e61d12cd2aac3
3839 Author: Vincent Untz <vuntz@gnome.org>
3840 Date: Thu Jan 14 23:26:49 2010 +0100
3841
3842 [libmenu] Add real support for inline aliases during layout processing
3843
3844 It looks like the inline aliases were not really tested before...
3845
3846 All the processing of the layout info (merge_subdir_by_name,
3847 merge_entry_by_id, merge_subdirs, merge_entries,
3848 merge_subdirs_and_entries) was completely ignoring the fact that some
3849 subdirs or entries might be aliases, and therefore need a different
3850 processing.
3851
3852 This is now done correctly, and we have a merge_alias() function to do
3853 the right thing when an alias is detected.
3854
3855 Also, this simplifies quite a bit the sorting of subdirs or entries
3856 since we always need to check the types of the items we compare, so we
3857 can get rid of gmenu_tree_directory_compare and
3858 gmenu_tree_entry_compare.
3859
3860 M libmenu/gmenu-tree.c
3861
3862 commit cda451cec61345d357cbc26e5a5dfd102f476ea5
3863 Author: Vincent Untz <vuntz@gnome.org>
3864 Date: Thu Jan 14 21:29:42 2010 +0100
3865
3866 [libmenu] Fix miscalulation for inlining when inline_header = true
3867
3868 When inline_header = true for a subdirectory, the length of the content
3869 of the parent directory was miscomputed: instead of adding the length of
3870 the subdirectory, it was just replacing the current length with the
3871 length of the subdirectory.
3872
3873 Also fix a typo in a comment
3874
3875 M libmenu/gmenu-tree.c
3876
3877 commit b6dc7a2443ef3d8fef1a1175532124882e95d03b
3878 Author: krishnababu k <kkrothap@redhat.ocm>
3879 Date: Wed Dec 2 14:36:36 2009 +0530
3880
3881 Updated telugu translation
3882
3883 M po/te.po
3884
3885 commit 696867378e99b410c1803412c7f894c99b386f64
3886 Author: Thomas Thurman <tthurman@gnome.org>
3887 Date: Sat Oct 31 22:26:02 2009 -0400
3888
3889 Shavian translation
3890
3891 M po/LINGUAS
3892 A po/en@shaw.po
3893
3894 commit 4c76410de345e06b879c85fa015659286f42c240
3895 Author: Nils-Christoph Fiedler <linux@medienkompanie.de>
3896 Date: Thu Oct 22 19:47:54 2009 +0200
3897
3898 Updated Low German translation
3899
3900 M po/nds.po
3901
3902 commit 5f2c53bd3fbd4b39707609955f445c96eb9b5fb3
3903 Author: Reşat SABIQ <tilde.birlik@gmail.com>
3904 Date: Wed Oct 21 00:29:46 2009 -0500
3905
3906 Update for Crimean Tatar (Crimean Turkish) translation
3907
3908 M po/crh.po
3909
3910 commit bde6cabd440da28d25983e762ed6b71849da918f
3911 Author: Leonid Kanter <leon@asplinux.ru>
3912 Date: Tue Oct 20 12:06:06 2009 +0300
3913
3914 Updated Russian translation
3915
3916 M po/ru.po
3917
3918 commit 72f4ede1ab9bbcfa29affda98e1fcfecdfcf87ef
3919 Author: Gil Forcada <gforcada@gnome.org>
3920 Date: Tue Oct 6 17:36:50 2009 +0200
3921
3922 Updated Catalan translation
3923
3924 M po/ca.po
3925
3926 commit e1c00f83d903581233e7e15655916b4079b3e500
3927 Author: Sveinn í Felli <sveinki@nett.is>
3928 Date: Fri Oct 2 06:17:30 2009 +0000
3929
3930 Updated Icelandic translation
3931
3932 M po/is.po
3933
3934 commit 5aff8025f08164699721084857a5321ed2a45abe
3935 Author: Vincent Untz <vuntz@gnome.org>
3936 Date: Thu Oct 1 13:25:58 2009 +0200
3937
3938 [release] post-release bump to 2.28.1
3939
3940 M configure.in
3941
3942 commit 1d899c5b7bafb9ea01e0f407df7acb2b0d6432f4
3943 Author: Vincent Untz <vuntz@gnome.org>
3944 Date: Thu Oct 1 13:25:50 2009 +0200
3945
3946 [release] 2.28.0.1
3947
3948 M NEWS
3949 M README
3950 M configure.in
3951
3952 commit 9d8e52a9a3e495f1e8e50a61f89510a03a4d31c9
3953 Author: Vincent Untz <vuntz@gnome.org>
3954 Date: Thu Oct 1 13:21:45 2009 +0200
3955
3956 [build] Link the python binding to libpython
3957
3958 Thanks to Frederic Crozat <fcrozat@mandriva.com> for spotting this.
3959
3960 D acinclude.m4
3961 A m4/python.m4
3962 M python/Makefile.am
3963
3964 commit 117273842932a6fb24143926513474c28e3595b4
3965 Author: Frederic Crozat <fcrozat@mandriva.com>
3966 Date: Tue Sep 29 15:35:10 2009 +0200
3967
3968 [libmenu] Make sure to use a value when sorting items during a merge
3969
3970 The name variable was not assigned any value...
3971
3972 M libmenu/gmenu-tree.c
3973
3974 commit 5713f8e66b0fe3791a57555ebd12ddb076176cd9
3975 Author: Vincent Untz <vuntz@gnome.org>
3976 Date: Mon Sep 21 18:18:27 2009 +0200
3977
3978 [release] post-release bump to 2.28.1
3979
3980 M configure.in
3981
3982 commit ddc11bf8f9d279cc2578c074ccb2c85a837e4ba7
3983 Author: Vincent Untz <vuntz@gnome.org>
3984 Date: Mon Sep 21 18:18:18 2009 +0200
3985
3986 [release] 2.28.0
3987
3988 M NEWS
3989 M README
3990 M configure.in
3991
3992 commit 87d43c2dd053ae3cb16e53341db2cb60ae348cf9
3993 Author: Amitakhya Phukan <aphukan@fedoraproject.org>
3994 Date: Mon Sep 21 11:30:34 2009 +0530
3995
3996 Updating Assamese translations
3997
3998 M po/as.po
3999
4000 commit a44cc5ae04856e05300dc189cab1a9e0ea0d7697
4001 Author: Amitakhya Phukan <aphukan@fedoraproject.org>
4002 Date: Mon Sep 21 11:29:14 2009 +0530
4003
4004 Updating Assamese translations
4005
4006 M po/as.po
4007
4008 commit e6a5afde9de461ccbc45556ca7720d0b9e1c63a8
4009 Author: Shankar Prasad <svenkate@redhat.com>
4010 Date: Mon Sep 21 10:18:37 2009 +0530
4011
4012 Updated Kannada(kn) translation
4013
4014 M po/kn.po
4015
4016 commit dc324804a5105c78f5fded62232d7f83976dec2d
4017 Author: Petr Kovar <pknbe@volny.cz>
4018 Date: Mon Sep 21 04:22:31 2009 +0200
4019
4020 Updated Czech translation
4021
4022 M po/cs.po
4023
4024 commit c7045e1d8937e7730cde99e87dce31ccb3474d76
4025 Author: Rajesh Ranjan <rranjan@rranjan.csb>
4026 Date: Sun Sep 20 12:35:22 2009 +0530
4027
4028 maithili update, translated by Sangeeta Kumari
4029
4030 M po/mai.po
4031
4032 commit 3e5f8caa3f659f4a3ea7730ea79af98c639379ac
4033 Author: Daniel Nylander <po@danielnylander.se>
4034 Date: Sat Sep 19 10:25:52 2009 +0200
4035
4036 Updated Swedish translation
4037
4038 M po/sv.po
4039
4040 commit 8af7dc29b7ccf039422d70c38f3927d1e493e726
4041 Author: Luca Ferretti <elle.uca@libero.it>
4042 Date: Fri Sep 18 15:08:11 2009 +0200
4043
4044 Added Italian translation
4045
4046 M po/it.po
4047
4048 commit b46ad5eb16a78883c09ebddcf09634368052ac72
4049 Author: krishnababu k <kkrothap@redhat.ocm>
4050 Date: Thu Sep 17 21:43:06 2009 +0530
4051
4052 Updated Telugu Translation
4053
4054 M po/te.po
4055
4056 commit 9f35303a5dbb43c2f024d001de95dd58402e4519
4057 Author: Maxim V. Dziumanenko <dziumanenko@gmail.com>
4058 Date: Thu Sep 17 13:56:16 2009 +0300
4059
4060 Added Ukrainian translation
4061
4062 M po/uk.po
4063
4064 commit 9f656630180c4328bfe95e325c4e2afbf61a22d4
4065 Author: Niels-Christoph Fiedler <linux@medienkompanie.de>
4066 Date: Wed Sep 16 18:33:04 2009 +0200
4067
4068 Updated German translation
4069
4070 M po/nds.po
4071
4072 commit 3989f3da21c0b72c2161c4476620e992ca533a02
4073 Author: Adi Roiban <adi@roiban.ro>
4074 Date: Wed Sep 16 16:01:54 2009 +0300
4075
4076 Updated Romanian translation
4077
4078 M po/ro.po
4079
4080 commit a9f05d49e0e31e5cd7ec6ca6e835b3de438f3033
4081 Author: Rajesh Ranjan <rranjan@rranjan.csb>
4082 Date: Wed Sep 16 13:47:43 2009 +0530
4083
4084 hindi update by Rajesh Ranjan
4085
4086 M po/hi.po
4087
4088 commit 19d5f458acc6001cee1446caa39163f3369af273
4089 Author: Gintautas Miliauskas <gintautas@miliauskas.lt>
4090 Date: Tue Sep 15 02:11:17 2009 +0300
4091
4092 Updated Lithuanian translation.
4093
4094 M po/lt.po
4095
4096 commit 1102f0542b4df782708eb857e638bfd5966aa7dc
4097 Author: Ask H. Larsen <asklarsen@gmail.com>
4098 Date: Sun Sep 13 03:23:56 2009 +0200
4099
4100 Updated Danish translation
4101
4102 M po/da.po
4103
4104 commit da99034888d5191a27e3029cbad6c73c7e52e10a
4105 Author: Philip Withnall <philip@tecnocode.co.uk>
4106 Date: Sat Sep 12 23:35:46 2009 +0100
4107
4108 Updated British English translation
4109
4110 M po/en_GB.po
4111
4112 commit 67c6af706c287319a7d5c73cf86d5209fd89f44f
4113 Author: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
4114 Date: Sun Sep 13 06:32:22 2009 +0800
4115
4116 Updated Traditional Chinese translation(Hong Kong and Taiwan)
4117
4118 M po/zh_HK.po
4119 M po/zh_TW.po
4120
4121 commit ebd7a9aaa45fb4b43ac7e5b35e45412ddd55dc9d
4122 Author: Ani <peter.ani@gmail.com>
4123 Date: Sat Sep 12 18:32:13 2009 +0530
4124
4125 Updaeted Malayalam Translations
4126
4127 M po/ml.po
4128
4129 commit 37d761d18917ba9167c2be84c8fd5c6948ff3139
4130 Author: Matej Urbančič <mateju@svn.gnome.org>
4131 Date: Sat Sep 12 10:31:29 2009 +0200
4132
4133 Updated Slovenian translation
4134
4135 M po/sl.po
4136
4137 commit 333ce6b4509b8137c085171b730b92f0d2870c7b
4138 Author: Sandeep Shedmake <sshedmak@redhat.com>
4139 Date: Fri Sep 11 19:35:53 2009 +0530
4140
4141 Updated Marathi Translations
4142
4143 M po/mr.po
4144
4145 commit 068006c9639123b7c7fe47855f5e1801c78c7dd0
4146 Author: A S Alam <aalam@users.sf.net>
4147 Date: Thu Sep 10 06:46:10 2009 +0530
4148
4149 updating for Punjabi
4150
4151 M po/pa.po
4152
4153 commit 7411701b1e806aa8f283ea9868d165ab150ac2c7
4154 Author: Baris Cicek <baris@teamforce.name.tr>
4155 Date: Thu Sep 10 00:25:54 2009 +0300
4156
4157 Updated Turkish translation.
4158
4159 M po/tr.po
4160
4161 commit eb43a84b5a1b55f1743e9d0b9aee036a72962b17
4162 Author: Vincent Untz <vuntz@gnome.org>
4163 Date: Wed Sep 9 02:10:28 2009 +0200
4164
4165 [build] Generate bzip2 tarballs and use foreign automake option
4166
4167 M configure.in
4168
4169 commit 4d35bde7e67f6b59c108ebc8615a342cb93cbd17
4170 Author: Vincent Untz <vuntz@gnome.org>
4171 Date: Wed Sep 9 02:08:49 2009 +0200
4172
4173 [release] post-release bump to 2.28.0
4174
4175 M configure.in
4176
4177 commit 908771796bad88ce49158f951bd7ca40c51b256b
4178 Author: Vincent Untz <vuntz@gnome.org>
4179 Date: Wed Sep 9 02:08:40 2009 +0200
4180
4181 [release] 2.27.92
4182
4183 M NEWS
4184 M README
4185 M configure.in
4186
4187 commit f1a8145230fc24f47f4818f39839aafe5b911c37
4188 Author: Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>
4189 Date: Tue Sep 8 22:14:00 2009 +0900
4190
4191 Updated Japanese translation
4192
4193 M po/ja.po
4194
4195 commit 0178e1acc5aeca2e05ddfcf67e8f03e8ee82eff6
4196 Author: Vincent Untz <vuntz@gnome.org>
4197 Date: Tue Sep 8 00:20:56 2009 +0200
4198
4199 [misc] Bump version to 2.27.92
4200
4201 M configure.in
4202
4203 commit db81a7f1194e435b538ab6710d752276fb1c7135
4204 Author: Vincent Untz <vuntz@gnome.org>
4205 Date: Mon Sep 7 23:28:56 2009 +0200
4206
4207 [editor] Use display name instead of name
4208
4209 M simple-editor/GMenuSimpleEditor/menutreemodel.py
4210
4211 commit d3fdd0ba4133c66e670561bca5b1bf4dd1a8feea
4212 Author: Vincent Untz <vuntz@gnome.org>
4213 Date: Mon Sep 7 23:13:22 2009 +0200
4214
4215 [libmenu,python] Add gmenu_tree_get_sort_key()/gmenu_tree_set_sort_key()
4216
4217 This is needed for users of gnome-menus that display applications by
4218 strings obtained via get_display_name(), since the order of entry
4219 changes if strings are different.
4220
4221 The default is to keep the sort order by name. At the moment, the only
4222 other option is to use a sort by display name.
4223
4224 Bindings for python are added too.
4225
4226 M libmenu/gmenu-tree.c
4227 M libmenu/gmenu-tree.h
4228 M python/gmenu.c
4229
4230 commit 4b007ffddf4cfd58d508a8c24d49ca8724753bb0
4231 Author: Vincent Untz <vuntz@gnome.org>
4232 Date: Mon Sep 7 23:19:49 2009 +0200
4233
4234 [python] Fix accidental swap between display_name and generic_name
4235
4236 M python/gmenu.c
4237
4238 commit 22b78e8b3cbc5d68638a1729728b682a4ce1d10b
4239 Author: Vincent Untz <vuntz@gnome.org>
4240 Date: Mon Sep 7 19:21:12 2009 +0200
4241
4242 [python] Add bindings for get_generic_name() and get_display_name()
4243
4244 M python/gmenu.c
4245
4246 commit e539c64e99a000b3a89a53bb5a6233a6b16ed96a
4247 Author: Vincent Untz <vuntz@gnome.org>
4248 Date: Mon Sep 7 19:19:41 2009 +0200
4249
4250 [libmenu] Add gmenu_tree_entry_get_display_name() API
4251
4252 This API returns the content of the X-GNOME-FullName key if available,
4253 and fallbacks to Name.
4254
4255 M libmenu/desktop-entries.c
4256 M libmenu/desktop-entries.h
4257 M libmenu/gmenu-tree.c
4258 M libmenu/gmenu-tree.h
4259
4260 commit 9767b9094ef22034be948f289473726e922e1d28
4261 Author: Gabor Kelemen <kelemeng@gnome.hu>
4262 Date: Mon Sep 7 02:30:34 2009 +0200
4263
4264 Hungarian translation updated
4265
4266 M po/hu.po
4267
4268 commit c2e0a3cedf6ceded675e6d6b8368d98dc8e64716
4269 Author: Rodrigo L. M. Flores <rlmflores@src.gnome.org>
4270 Date: Sun Aug 30 19:56:20 2009 -0300
4271
4272 Updated Brazilian Portuguese mailing list address.
4273
4274 M po/pt_BR.po
4275
4276 commit e5c016f25d380332029e4b4d78ebc795fcc06e27
4277 Author: Mario Blättermann <mariobl@gnome.org>
4278 Date: Sun Aug 30 14:54:33 2009 +0200
4279
4280 Updated German translation
4281
4282 M po/de.po
4283
4284 commit aadd320b39ccd5a713b2fc9f5fb85d894141c61f
4285 Author: Miloš Popović <mpopovic@src.gnome.org>
4286 Date: Sat Aug 29 14:43:42 2009 +0200
4287
4288 Updated Serbian translation
4289
4290 M po/sr.po
4291 M po/sr@latin.po
4292
4293 commit 900767c9056455409c0ad674d17959b50b1a0f49
4294 Author: Runa Bhattacharjee <runab@redhat.com>
4295 Date: Fri Aug 28 12:30:47 2009 +0530
4296
4297 Updated Bengali India Translations
4298
4299 M po/bn_IN.po
4300
4301 commit 66913548e742cc1a8c138fccce9302b88fe5eae9
4302 Author: Duarte Loreto <happyguy_pt@hotmail.com>
4303 Date: Thu Aug 27 08:58:37 2009 +0100
4304
4305 Updated Portuguese translation
4306
4307 M po/pt.po
4308
4309 commit 4dbf30628a5f29f8eb0b85c65ffd5b9b0caa5177
4310 Author: Claude Paroz <claude@2xlibre.net>
4311 Date: Wed Aug 26 21:33:09 2009 +0200
4312
4313 Updated French translation
4314
4315 M po/fr.po
4316
4317 commit bcf479be8e2b92c26becafe004a0f1b1c62af679
4318 Author: Inaki Larranaga Murgoitio <dooteo@zundan.com>
4319 Date: Wed Aug 26 18:27:07 2009 +0200
4320
4321 Updated Basque language
4322
4323 M po/eu.po
4324
4325 commit 5ee416dd4c7b0ddb11c7c38581bf293b3b9352dd
4326 Author: Luca Ferretti <elle.uca@libero.it>
4327 Date: Wed Aug 26 09:31:11 2009 +0200
4328
4329 Updated Italian translation
4330
4331 M po/it.po
4332
4333 commit a02a132ed3b18f156bf2c7e965c3075685f72759
4334 Author: Tomasz Dominikowski <dominikowski@gmail.com>
4335 Date: Tue Aug 25 19:26:18 2009 +0200
4336
4337 Updated Polish translation
4338
4339 M po/pl.po
4340
4341 commit 6f55d2289a2a30d03db2bf40c31f79474ff952c0
4342 Author: Frédéric Péters <fpeters@0d.be>
4343 Date: Sat Aug 22 13:44:25 2009 +0200
4344
4345 Remove deprecated Encoding key from desktop file
4346
4347 M simple-editor/gmenu-simple-editor.desktop.in
4348
4349 commit 4771bdb6af1b29f10ba39706cb2b63433d1f0480
4350 Author: Andre Klapper <a9016009@gmx.de>
4351 Date: Mon Aug 24 23:01:03 2009 +0200
4352
4353 Change nds_NFE to nds as discussed on irc
4354
4355 M po/LINGUAS
4356 R100 po/nds_NFE.po po/nds.po
4357
4358 commit 539360b4cfa0c26b884c9811acd15d943a7574a0
4359 Author: Sweta Kothari <swkothar@redhat.com>
4360 Date: Mon Aug 24 15:37:44 2009 +0530
4361
4362 Updated Gujarati Translations
4363
4364 M po/gu.po
4365
4366 commit 28501f2afe901298d74760362f47bb7f67107699
4367 Author: Changwoo Ryu <cwryu@debian.org>
4368 Date: Sun Aug 23 07:27:42 2009 +0900
4369
4370 Update Korean translation
4371
4372 M po/ko.po
4373
4374 commit b2b842dbd5fd8687562d0961ad62391d5f72004f
4375 Author: Mario Blättermann <mariobl@gnome.org>
4376 Date: Sat Aug 22 15:09:52 2009 +0200
4377
4378 Added Low German to LINGUAS
4379
4380 M po/LINGUAS
4381
4382 commit 4694660b8ebac75d9c72ef1de5654bd031a9062e
4383 Author: Mario Blättermann <mariobl@gnome.org>
4384 Date: Sat Aug 22 15:07:10 2009 +0200
4385
4386 Added Low German translation
4387
4388 A po/nds_NFE.po
4389
4390 commit 9dc36cf2b049dbca649c92911f29644b073f031b
4391 Author: Khaled Hosny <khaledhosny@eglug.org>
4392 Date: Thu Aug 20 21:19:07 2009 +0300
4393
4394 Updated Arabic translation
4395
4396 M po/ar.po
4397
4398 commit 895ba3af6f107e61cc6a4414746d94ba3df38a8f
4399 Author: Alexander Shopov <ash@contact.bg>
4400 Date: Fri Aug 14 07:48:02 2009 +0300
4401
4402 Updated Bulgarian translation
4403
4404 M po/bg.po
4405
4406 commit 761e44b26fd2315f8823d3b5f2347346f1ef9eb0
4407 Author: Manoj Kumar Giri <mgiri@mgiri.csb>
4408 Date: Thu Aug 13 20:09:24 2009 +0530
4409
4410 Updated Oriya Translation
4411
4412 M po/or.po
4413
4414 commit c49f4bb691fd51039add261b9a19c5b45bbbd0d5
4415 Author: Antón Méixome <meixome@mancoumun.org>
4416 Date: Wed Aug 12 13:25:27 2009 +0200
4417
4418 Updated Galician translation
4419
4420 M po/gl.po
4421
4422 commit 3ed6cedb4154fa399f48b036088fa703291d28d9
4423 Author: Krix Apolinário <krixapolinario@gmail.com>
4424 Date: Wed Aug 12 00:01:59 2009 -0300
4425
4426 Updated Brazilian Portuguese translation.
4427
4428 M po/pt_BR.po
4429
4430 commit 3f85e31f5fbb7e3e77ed8459af8b18f071ed3767
4431 Author: Kjartan Maraas <kmaraas@gnome.org>
4432 Date: Tue Aug 4 18:15:34 2009 +0200
4433
4434 Updated Norwegian bokmål translation.
4435
4436 M po/nb.po
4437
4438 commit ed5f86151fd103c446535bc8d1ed3d80604e2899
4439 Author: Seán de Búrca <leftmostcat@gmail.com>
4440 Date: Wed Jul 29 17:45:34 2009 -0600
4441
4442 Updated Irish translation
4443
4444 M po/ga.po
4445
4446 commit 6b5cd5918a318712237b5fc511fe122a1229a29b
4447 Author: Denis Arnaud <darnaud@src.gnome.org>
4448 Date: Wed Jul 29 12:13:13 2009 +0200
4449
4450 Updated breton translation
4451
4452 M po/br.po
4453
4454 commit c6f657e60f70bb848b70b9462591a38c973b4010
4455 Author: drtvasudevan <agnihot3@gmail.com>
4456 Date: Wed Jul 29 12:12:26 2009 +0530
4457
4458 Updated Tamil translation
4459
4460 M po/ta.po
4461
4462 commit 458924440a7f69c64272ddeb9fbe1999ac70bbcd
4463 Author: drtvasudevan <agnihot3@gmail.com>
4464 Date: Wed Jul 29 12:10:37 2009 +0530
4465
4466 Updated Tamil translation
4467
4468 M po/ta.po
4469
4470 commit 3d9f5ce3d34839e2342692a849838c9e7503c588
4471 Author: Denis Arnaud <darnaud@src.gnome.org>
4472 Date: Wed Jul 29 07:09:51 2009 +0200
4473
4474 Updated breton translation
4475
4476 M po/br.po
4477
4478 commit ea7245e45238b380a8ba11ee8dabc67775e49c6f
4479 Author: Vincent Untz <vuntz@gnome.org>
4480 Date: Wed Jul 29 00:08:38 2009 +0200
4481
4482 [misc] Update commit guidelines for referencing bugs
4483
4484 M ChangeLog
4485
4486 commit 374cdd09e33122d6a7f06eec9748130b3c85f9fe
4487 Author: Vincent Untz <vuntz@gnome.org>
4488 Date: Tue Jul 28 18:07:17 2009 +0200
4489
4490 [release] post-release bump to 2.27.90
4491
4492 M configure.in
4493
4494 commit e399908c171a0add6ab6febd405b5121b3772fd2
4495 Author: Vincent Untz <vuntz@gnome.org>
4496 Date: Tue Jul 28 18:07:07 2009 +0200
4497
4498 [release] 2.27.5
4499
4500 M NEWS
4501 M README
4502 M configure.in
4503
4504 commit 2bb16693175f59d28c8a798d50ffb9b462c916f3
4505 Author: Denis Arnaud <darnaud@src.gnome.org>
4506 Date: Tue Jul 28 14:10:04 2009 +0200
4507
4508 Updated breton translation
4509
4510 M po/br.po
4511
4512 commit b9cbf41d7c93ad8f18a5b9162dbd85a9e2774efa
4513 Author: Aron Xu <aronxu@gnome.org>
4514 Date: Sun Jul 26 18:25:28 2009 +0800
4515
4516 Updated Simplified Chinese translation.
4517
4518 M po/zh_CN.po
4519
4520 commit 0aed3c9a813e79ad57ec335e2aa410beb5d23991
4521 Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
4522 Date: Thu Jul 23 15:13:40 2009 +0700
4523
4524 Updated Thai translation.
4525
4526 M po/th.po
4527
4528 commit 83e66d9b0487b0be48ea935801d500e9857a4ae5
4529 Author: Vincent Untz <vuntz@gnome.org>
4530 Date: Tue Jul 21 19:35:18 2009 +0200
4531
4532 [build] Set m4/ as macro dir
4533
4534 M Makefile.am
4535 M configure.in
4536
4537 commit 34c1fcb2306df9ca22634a82e75865eda1031769
4538 Author: Vincent Untz <vuntz@gnome.org>
4539 Date: Tue Jul 21 18:53:35 2009 +0200
4540
4541 [build] Use silent-rules instead of shave for quiet build
4542
4543 M configure.in
4544 D m4/shave.m4
4545 D shave-libtool.in
4546 D shave.in
4547 M simple-editor/GMenuSimpleEditor/Makefile.am
4548 M simple-editor/Makefile.am
4549
4550 commit 8ca7e0223b9f0e935889c146bfb5378bfeadf0ea
4551 Author: Ilkka Tuohela <hile@iki.fi>
4552 Date: Sun Jul 19 10:39:57 2009 +0300
4553
4554 Updated Finnish translation
4555
4556 M po/fi.po
4557
4558 commit b8fa21a37017f3fe5e333a616434c5b489e7f333
4559 Author: Vincent Untz <vuntz@gnome.org>
4560 Date: Wed Jul 15 16:52:26 2009 +0200
4561
4562 [release] post-release bump to 2.27.5
4563
4564 M configure.in
4565
4566 commit c17916822f13accf78dfc4d1f3ef8bc398e398f5
4567 Author: Vincent Untz <vuntz@gnome.org>
4568 Date: Wed Jul 15 16:52:15 2009 +0200
4569
4570 [release] 2.27.4
4571
4572 M NEWS
4573 M README
4574 M configure.in
4575
4576 commit d49ae45dc30c3fbafded146e5fbccbe23215316b
4577 Author: Daniel Nylander <po@danielnylander.se>
4578 Date: Tue Jul 7 19:37:51 2009 +0200
4579
4580 Updated Swedish translation
4581
4582 M po/sv.po
4583
4584 commit 0b7478a5de36192e3bc31576c7e8114a3a6dbed3
4585 Author: Yaron Shahrabani <sh.yaron@gmail.com>
4586 Date: Sat Jul 4 22:39:12 2009 +0300
4587
4588 Updated Hebrew translation
4589
4590 M po/he.po
4591
4592 commit 8bddaf2076e094043189a20c36bf66b8c3813921
4593 Author: Vincent Untz <vuntz@gnome.org>
4594 Date: Sat Jun 27 04:18:02 2009 +0200
4595
4596 [libmenu] Sort inlined items unless inline_header is used
4597
4598 We also strip duplicate entries in a menu when we do such a sort.
4599
4600 This is actually not a trivial task since it means we have to correctly
4601 preprocess all inline data before using the layout -- else, we'd try to
4602 sort items while a layout has been used, which is too late (since you
4603 can specify that you want mixed entries and directories, eg; or even
4604 entries or directories in a specified order).
4605
4606 We make sure to evaluate the inline data at the deepest first, so we can
4607 correctly propagate as much inline items as possible to the top.
4608
4609 http://bugzilla.gnome.org/show_bug.cgi?id=490483
4610
4611 M libmenu/gmenu-tree.c
4612
4613 commit 0b1f053e07d1d4c081a58303cfe7ed6b583ed966
4614 Author: Jorge Gonzalez <jorgegonz@svn.gnome.org>
4615 Date: Sat Jun 27 14:58:46 2009 +0200
4616
4617 Updated Spanish translation
4618
4619 M po/es.po
4620
4621 commit 7a6b5b5a292357357f4458820b6e8f851472c592
4622 Author: Vincent Untz <vuntz@gnome.org>
4623 Date: Fri Jun 26 23:42:59 2009 +0200
4624
4625 [libmenu] Do not always inherit parent DefaultLayout attributes
4626
4627 We should not use the parent DefaultLayout attributes when there no
4628 DefaultLayout children for the child but there are DefaultLayout
4629 attributes for the child.
4630
4631 Ie, if the child has <DefaultLayout inline="true"/>, then it used to
4632 keep inheriting the parent DefaultLayout attributes, and then possibly
4633 lose the inline="true".
4634
4635 M libmenu/gmenu-tree.c
4636
4637 commit 89ab14f5fd34d18ef1591baf1000f5197344cd92
4638 Author: Vincent Untz <vuntz@gnome.org>
4639 Date: Fri Jun 26 23:19:47 2009 +0200
4640
4641 [libmenu] Fix DefaultLayout attributes not being inherited
4642
4643 The submenus were not inheriting the DefaultLayout attributes (eg,
4644 all the inline parameters) of their parent when there was no child to
4645 the DefaultLayout of their parent.
4646
4647 Concretely, this was ignored for submenus:
4648 <DefaultLayout inline="true"/>
4649 while this should have behaved like:
4650 <DefaultLayout inline="true"><Merge type="all"/></DefaultLayout>
4651
4652 M libmenu/gmenu-tree.c
4653
4654 commit 6f948049c368cad02b713332430b98c5daa11b5e
4655 Author: Mattias Põldaru <mahfiaz gmail com>
4656 Date: Thu Jun 25 14:29:03 2009 +0300
4657
4658 Updating Estonian translation
4659
4660 M po/et.po
4661
4662 commit 80f5477a91e11630403d60b701658c7ae242c7d7
4663 Author: Claude Paroz <claude@2xlibre.net>
4664 Date: Sun Jun 21 19:35:00 2009 +0200
4665
4666 Add translator comment
4667
4668 M simple-editor/GMenuSimpleEditor/main.py
4669
4670 commit fc7e3ebf3266a47de4dc96a2fc938e01848eb53d
4671 Author: Claude Paroz <claude@2xlibre.net>
4672 Date: Sun Jun 21 19:28:21 2009 +0200
4673
4674 Fix POTFILES.in
4675
4676 M po/POTFILES.in
4677
4678 commit dca731f53b3686436cc94cf2704035419c03b7e8
4679 Author: Robert Staudinger <robsta@gnome.org>
4680 Date: Thu May 7 17:28:08 2009 +0200
4681
4682 [libmenu] Add API to access GenericName
4683
4684 http://bugzilla.gnome.org/show_bug.cgi?id=581887
4685
4686 M libmenu/desktop-entries.c
4687 M libmenu/desktop-entries.h
4688 M libmenu/gmenu-tree.c
4689 M libmenu/gmenu-tree.h
4690
4691 commit d504fabf22e5303abd631e5a868fb5f45f4c7b05
4692 Author: Pedro Fragoso <ember@ubuntu.com>
4693 Date: Sun Jun 21 01:17:26 2009 +0200
4694
4695 [editor] Port to GtkBuilder
4696
4697 (with a few tweaks by me to make it work)
4698
4699 http://bugzilla.gnome.org/show_bug.cgi?id=580158
4700
4701 M po/POTFILES.in
4702 M simple-editor/GMenuSimpleEditor/config.py.in
4703 M simple-editor/GMenuSimpleEditor/main.py
4704 M simple-editor/GMenuSimpleEditor/maindialog.py
4705 M simple-editor/Makefile.am
4706 D simple-editor/gmenu-simple-editor.glade
4707 A simple-editor/gmenu-simple-editor.ui
4708
4709 commit fecc2847cf75048a6fe41c7423ac1e705a32b12b
4710 Author: Vincent Untz <vuntz@gnome.org>
4711 Date: Sun Jun 21 01:09:40 2009 +0200
4712
4713 [editor] Add --help and --version arguments
4714
4715 http://bugzilla.gnome.org/show_bug.cgi?id=552989
4716
4717 M simple-editor/GMenuSimpleEditor/main.py
4718
4719 commit db6d999b0ada473a3124a14dd83ed7ccb2375474
4720 Author: Seán de Búrca <leftmostcat@gmail.com>
4721 Date: Sun May 24 21:21:58 2009 +0100
4722
4723 Updated Irish translation
4724
4725 M po/ga.po
4726
4727 commit 0aa50a649aa76ea95f2cda225a87448e8a16b69c
4728 Author: Inash Zubair <inash@leptone.com>
4729 Date: Sat May 23 13:32:29 2009 +0200
4730
4731 Added Divehi translation
4732
4733 M po/LINGUAS
4734 A po/dv.po
4735
4736 commit 569e4835258906ca51b6b32e062cb3f860e5aeac
4737 Author: Michael Meeks <michael.meeks@novell.com>
4738 Date: Thu May 21 03:55:59 2009 +0200
4739
4740 [libmenu] Add a cache for listing the desktop files
4741
4742 When processing a layout, we get the list of desktop files from a set of
4743 directories. It turns out that we nearly always use the same set of
4744 directories, so adding a one-entry cache makes it possible to avoid
4745 computing things again and again.
4746
4747 I changed Michael's patch a bit, mainly to empty the cache when the last
4748 GMenuTree is unref'ed.
4749
4750 Closes: bgo#498749
4751
4752 M libmenu/entry-directories.c
4753 M libmenu/entry-directories.h
4754 M libmenu/gmenu-tree.c
4755
4756 commit 020085ed0a4086509ede57eb4fb480bbdbb5c79a
4757 Author: Vincent Untz <vuntz@gnome.org>
4758 Date: Sat May 2 02:24:07 2009 +0200
4759
4760 Update commit messages guidelines
4761
4762 M ChangeLog
4763
4764 commit 4900c5713c5caf69d4d476023fb5638fb9d60a17
4765 Author: Vincent Untz <vuntz@gnome.org>
4766 Date: Mon Apr 27 00:20:04 2009 +0200
4767
4768 Use git.mk from pango to autogenerate .gitignore files
4769
4770 M Makefile.am
4771 M desktop-directories/Makefile.am
4772 A git.mk
4773 M layout/Makefile.am
4774 M libmenu/Makefile.am
4775 M python/Makefile.am
4776 M simple-editor/GMenuSimpleEditor/Makefile.am
4777 M simple-editor/Makefile.am
4778 M util/Makefile.am
4779
4780 commit c11452a831ab1ecf15ccb516492740980bda7c18
4781 Author: Vincent Untz <vuntz@gnome.org>
4782 Date: Mon Apr 27 01:10:53 2009 +0200
4783
4784 Remove .cvsignore files
4785
4786 D .cvsignore
4787 D desktop-directories/.cvsignore
4788 D layout/.cvsignore
4789 D libmenu/.cvsignore
4790 D po/.cvsignore
4791 D python/.cvsignore
4792 D simple-editor/.cvsignore
4793 D simple-editor/GMenuSimpleEditor/.cvsignore
4794 D util/.cvsignore
4795
4796 commit 5fa8af519c166de0a0abd4d9cf0e396540270b4f
4797 Author: Vincent Untz <vuntz@gnome.org>
4798 Date: Mon Apr 27 00:13:56 2009 +0200
4799
4800 Use shave to improve build log readability
4801
4802 See http://git.lespiau.name/cgit/shave/tree/README for more details.
4803
4804 M configure.in
4805 A m4/shave.m4
4806 A shave-libtool.in
4807 A shave.in
4808 M simple-editor/GMenuSimpleEditor/Makefile.am
4809 M simple-editor/Makefile.am
4810
4811 commit 22e86da4dfd79d8f2084bce3537607fa2b9bd40e
4812 Author: Vincent Untz <vuntz@gnome.org>
4813 Date: Sun Apr 26 12:26:11 2009 +0200
4814
4815 Fix doap file to have mail address as URL (mailto:)
4816
4817 M gnome-menus.doap
4818
4819 commit 1e3078b3ef1f58c7f6e8878ff0836d312c3e57dc
4820 Author: Vincent Untz <vuntz@gnome.org>
4821 Date: Fri Apr 24 03:25:12 2009 +0200
4822
4823 Make autogen.sh more modern.
4824
4825 M autogen.sh
4826
4827 commit 2f4ef97ac8153a1460b2a1404c4f622712b3db81
4828 Author: Vincent Untz <vuntz@gnome.org>
4829 Date: Wed Apr 22 17:28:55 2009 +0200
4830
4831 Add doap file
4832
4833 A gnome-menus.doap
4834
4835 commit e5c0da200efb4a82d8478d45c62959b848085d77
4836 Author: Vincent Untz <vuntz@gnome.org>
4837 Date: Wed Apr 22 17:27:40 2009 +0200
4838
4839 ename ChangeLog files to ChangeLog.pre-git
4840
4841 M ChangeLog
4842 C100 ChangeLog ChangeLog.pre-git
4843 R100 po/ChangeLog po/ChangeLog.pre-git
4844
4845 commit 71593a96a06add451182f6b2bf848daaae3d37a0
4846 Author: Miquel Esplà <miquelespla@gmail.com>
4847 Date: Tue Apr 21 15:05:10 2009 +0200
4848
4849 Added Valencian-Catalan translation
4850
4851 M po/LINGUAS
4852 A po/ca@valencia.po
4853
4854 commit 44190fe0edccfe82eeed523af572bcda3cb55dab
4855 Author: Vincent Untz <vuntz@gnome.org>
4856 Date: Mon Apr 13 22:05:39 2009 +0000
4857
4858 post-release bump to 2.26.2
4859
4860 2009-04-14 Vincent Untz <vuntz@gnome.org>
4861
4862 * configure.in: post-release bump to 2.26.2
4863
4864 svn path=/trunk/; revision=1017
4865
4866 M ChangeLog
4867 M configure.in
4868 M po/ChangeLog
0 Hacking on gnome-menus
1 ======================
2
3 + The development occurs in git:
4
5 http://git.gnome.org/browse/gnome-menus
6
7 For information on how to access GNOME git please read:
8
9 http://live.gnome.org/Git
10
11 + Please send patches as bug reports in GNOME Bugzilla:
12
13 https://bugzilla.gnome.org/ (product gnome-menus)
14
15 Your patch should be in unified diff form (the -u option to GNU
16 diff). See also:
17
18 http://live.gnome.org/GnomeLove/SubmittingPatches
19
20 + Please try and send a patch against a recent version of this package.
21 Patches against git master are most preferable.
22
23 + Don't commit any but the most trivial patches without approval.
24
25 + Exceptions to this are:
26
27 - Translators may commit basic i18n related patches to the build
28 setup.
29 - Build sheriff are welcome - in accordance with the relevant build
30 sheriff constraints.
0 Currently active maintainers
1 ----------------------------
2
3 Jasper St. Pierre
4 E-mail: jstpierre@mecheye.net
5 Userid: jstpierre
6
7 Non-active maintainers, who have a good understanding of the code
8 -----------------------------------------------------------------
9
10 #Mark McLoughlin
11 #E-mail: mark@skynet.ie
12
13 #Vincent Untz
14 #E-mail: vuntz@gnome.org
15 #Userid: vuntz
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
1 # Makefile. Generated from Makefile.in by configure.
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14
15
16 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
17 am__make_running_with_option = \
18 case $${target_option-} in \
19 ?) ;; \
20 *) echo "am__make_running_with_option: internal error: invalid" \
21 "target option '$${target_option-}' specified" >&2; \
22 exit 1;; \
23 esac; \
24 has_opt=no; \
25 sane_makeflags=$$MAKEFLAGS; \
26 if $(am__is_gnu_make); then \
27 sane_makeflags=$$MFLAGS; \
28 else \
29 case $$MAKEFLAGS in \
30 *\\[\ \ ]*) \
31 bs=\\; \
32 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
33 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
34 esac; \
35 fi; \
36 skip_next=no; \
37 strip_trailopt () \
38 { \
39 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
40 }; \
41 for flg in $$sane_makeflags; do \
42 test $$skip_next = yes && { skip_next=no; continue; }; \
43 case $$flg in \
44 *=*|--*) continue;; \
45 -*I) strip_trailopt 'I'; skip_next=yes;; \
46 -*I?*) strip_trailopt 'I';; \
47 -*O) strip_trailopt 'O'; skip_next=yes;; \
48 -*O?*) strip_trailopt 'O';; \
49 -*l) strip_trailopt 'l'; skip_next=yes;; \
50 -*l?*) strip_trailopt 'l';; \
51 -[dEDm]) skip_next=yes;; \
52 -[JT]) skip_next=yes;; \
53 esac; \
54 case $$flg in \
55 *$$target_option*) has_opt=yes; break;; \
56 esac; \
57 done; \
58 test $$has_opt = yes
59 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
60 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
61 pkgdatadir = $(datadir)/cinnamon-menus
62 pkgincludedir = $(includedir)/cinnamon-menus
63 pkglibdir = $(libdir)/cinnamon-menus
64 pkglibexecdir = $(libexecdir)/cinnamon-menus
65 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
66 install_sh_DATA = $(install_sh) -c -m 644
67 install_sh_PROGRAM = $(install_sh) -c
68 install_sh_SCRIPT = $(install_sh) -c
69 INSTALL_HEADER = $(INSTALL_DATA)
70 transform = $(program_transform_name)
71 NORMAL_INSTALL = :
72 PRE_INSTALL = :
73 POST_INSTALL = :
74 NORMAL_UNINSTALL = :
75 PRE_UNINSTALL = :
76 POST_UNINSTALL = :
77 build_triplet = x86_64-unknown-linux-gnu
78 host_triplet = x86_64-unknown-linux-gnu
79 subdir = .
80 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
81 $(top_srcdir)/configure $(am__configure_deps) \
82 $(srcdir)/config.h.in AUTHORS COPYING COPYING.LIB ChangeLog \
83 NEWS README config.guess config.sub depcomp install-sh missing \
84 ltmain.sh
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
87 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
88 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
89 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
93 configure.lineno config.status.lineno
94 mkinstalldirs = $(install_sh) -d
95 CONFIG_HEADER = config.h
96 CONFIG_CLEAN_FILES =
97 CONFIG_CLEAN_VPATH_FILES =
98 AM_V_P = $(am__v_P_$(V))
99 am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
100 am__v_P_0 = false
101 am__v_P_1 = :
102 AM_V_GEN = $(am__v_GEN_$(V))
103 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
104 am__v_GEN_0 = @echo " GEN " $@;
105 am__v_GEN_1 =
106 AM_V_at = $(am__v_at_$(V))
107 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
108 am__v_at_0 = @
109 am__v_at_1 =
110 SOURCES =
111 DIST_SOURCES =
112 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
113 ctags-recursive dvi-recursive html-recursive info-recursive \
114 install-data-recursive install-dvi-recursive \
115 install-exec-recursive install-html-recursive \
116 install-info-recursive install-pdf-recursive \
117 install-ps-recursive install-recursive installcheck-recursive \
118 installdirs-recursive pdf-recursive ps-recursive \
119 tags-recursive uninstall-recursive
120 am__can_run_installinfo = \
121 case $$AM_UPDATE_INFO_DIR in \
122 n|no|NO) false;; \
123 *) (install-info --version) >/dev/null 2>&1;; \
124 esac
125 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
126 distclean-recursive maintainer-clean-recursive
127 am__recursive_targets = \
128 $(RECURSIVE_TARGETS) \
129 $(RECURSIVE_CLEAN_TARGETS) \
130 $(am__extra_recursive_targets)
131 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
132 cscope distdir dist dist-all distcheck
133 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
134 $(LISP)config.h.in
135 # Read a list of newline-separated strings from the standard input,
136 # and print each of them once, without duplicates. Input order is
137 # *not* preserved.
138 am__uniquify_input = $(AWK) '\
139 BEGIN { nonempty = 0; } \
140 { items[$$0] = 1; nonempty = 1; } \
141 END { if (nonempty) { for (i in items) print i; }; } \
142 '
143 # Make sure the list of sources is unique. This is necessary because,
144 # e.g., the same source file might be shared among _SOURCES variables
145 # for different programs/libraries.
146 am__define_uniq_tagged_files = \
147 list='$(am__tagged_files)'; \
148 unique=`for i in $$list; do \
149 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
150 done | $(am__uniquify_input)`
151 ETAGS = etags
152 CTAGS = ctags
153 CSCOPE = cscope
154 DIST_SUBDIRS = $(SUBDIRS)
155 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
156 distdir = $(PACKAGE)-$(VERSION)
157 top_distdir = $(distdir)
158 am__remove_distdir = \
159 if test -d "$(distdir)"; then \
160 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
161 && rm -rf "$(distdir)" \
162 || { sleep 5 && rm -rf "$(distdir)"; }; \
163 else :; fi
164 am__post_remove_distdir = $(am__remove_distdir)
165 am__relativize = \
166 dir0=`pwd`; \
167 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
168 sed_rest='s,^[^/]*/*,,'; \
169 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
170 sed_butlast='s,/*[^/]*$$,,'; \
171 while test -n "$$dir1"; do \
172 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
173 if test "$$first" != "."; then \
174 if test "$$first" = ".."; then \
175 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
176 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
177 else \
178 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
179 if test "$$first2" = "$$first"; then \
180 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
181 else \
182 dir2="../$$dir2"; \
183 fi; \
184 dir0="$$dir0"/"$$first"; \
185 fi; \
186 fi; \
187 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
188 done; \
189 reldir="$$dir2"
190 GZIP_ENV = --best
191 DIST_ARCHIVES = $(distdir).tar.xz
192 DIST_TARGETS = dist-xz
193 distuninstallcheck_listfiles = find . -type f -print
194 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
195 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
196 distcleancheck_listfiles = find . -type f -print
197 ACLOCAL = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing aclocal-1.13
198 AMTAR = $${TAR-tar}
199 AM_DEFAULT_VERBOSITY = 0
200 AR = ar
201 AS = as
202 AUTOCONF = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing autoconf
203 AUTOHEADER = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing autoheader
204 AUTOMAKE = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing automake-1.13
205 AWK = gawk
206 CC = gcc
207 CCDEPMODE = depmode=gcc3
208 CFLAGS = -g -O2
209 CPP = gcc -E
210 CPPFLAGS =
211 CYGPATH_W = echo
212 DEBUG_CFLAGS = -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS
213 DEFS = -DHAVE_CONFIG_H
214 DEPDIR = .deps
215 DISABLE_DEPRECATED = -DGCONF_DISABLE_DEPRECATED -DGCONF_DISABLE_SINGLE_INCLUDES -DBONOBO_DISABLE_DEPRECATED -DBONOBO_DISABLE_SINGLE_INCLUDES -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_SINGLE_INCLUDES -DGNOME_DISABLE_DEPRECATED -DGNOME_DISABLE_SINGLE_INCLUDES -DLIBGLADE_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_SINGLE_INCLUDES -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_SINGLE_INCLUDES -DWNCK_DISABLE_DEPRECATED -DWNCK_DISABLE_SINGLE_INCLUDES -DLIBSOUP_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_SINGLE_INCLUDES
216 DISABLE_DEPRECATED_CFLAGS =
217 DLLTOOL = dlltool
218 DSYMUTIL =
219 DUMPBIN =
220 ECHO_C =
221 ECHO_N = -n
222 ECHO_T =
223 EGREP = /bin/grep -E
224 EXEEXT =
225 FGREP = /bin/grep -F
226 GIO_UNIX_CFLAGS = -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
227 GIO_UNIX_LIBS = -lgio-2.0 -lgobject-2.0 -lglib-2.0
228 GREP = /bin/grep
229 INSTALL = /usr/bin/install -c
230 INSTALL_DATA = ${INSTALL} -m 644
231 INSTALL_PROGRAM = ${INSTALL}
232 INSTALL_SCRIPT = ${INSTALL}
233 INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
234 INTROSPECTION_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gobject-introspection-1.0
235 INTROSPECTION_COMPILER = /usr/bin/g-ir-compiler
236 INTROSPECTION_GENERATE = /usr/bin/g-ir-generate
237 INTROSPECTION_GIRDIR = /usr/share/gir-1.0
238 INTROSPECTION_LIBS = -lgirepository-1.0 -lgobject-2.0 -lglib-2.0
239 INTROSPECTION_MAKEFILE = /usr/share/gobject-introspection-1.0/Makefile.introspection
240 INTROSPECTION_SCANNER = /usr/bin/g-ir-scanner
241 INTROSPECTION_TYPELIBDIR = /usr/lib/girepository-1.0
242 LD = /usr/bin/ld -m elf_x86_64
243 LDFLAGS =
244 LIBOBJS =
245 LIBS =
246 LIBTOOL = $(SHELL) $(top_builddir)/libtool
247 LIB_MENU_LT_VERSION = 0:1:0
248 LIPO =
249 LN_S = ln -s
250 LTLIBOBJS =
251 MAINT =
252 MAKEINFO = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing makeinfo
253 MANIFEST_TOOL = :
254 MKDIR_P = /bin/mkdir -p
255 NM = /usr/bin/nm -B
256 NMEDIT =
257 OBJDUMP = objdump
258 OBJEXT = o
259 OTOOL =
260 OTOOL64 =
261 PACKAGE = cinnamon-menus
262 PACKAGE_BUGREPORT =
263 PACKAGE_NAME = cinnamon-menus
264 PACKAGE_STRING = cinnamon-menus 2.1
265 PACKAGE_TARNAME = cinnamon-menus
266 PACKAGE_URL =
267 PACKAGE_VERSION = 2.1
268 PATH_SEPARATOR = :
269 PKG_CONFIG = /usr/bin/pkg-config
270 PKG_CONFIG_LIBDIR =
271 PKG_CONFIG_PATH =
272 RANLIB = ranlib
273 SED = /bin/sed
274 SET_MAKE =
275 SHELL = /bin/bash
276 STRIP = strip
277 VERSION = 2.1
278 WARN_CFLAGS = -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs
279 abs_builddir = /home/mtwebster/bin/cinnamon-menus
280 abs_srcdir = /home/mtwebster/bin/cinnamon-menus
281 abs_top_builddir = /home/mtwebster/bin/cinnamon-menus
282 abs_top_srcdir = /home/mtwebster/bin/cinnamon-menus
283 ac_ct_AR = ar
284 ac_ct_CC = gcc
285 ac_ct_DUMPBIN =
286 am__include = include
287 am__leading_dot = .
288 am__quote =
289 am__tar = $${TAR-tar} chof - "$$tardir"
290 am__untar = $${TAR-tar} xf -
291 bindir = ${exec_prefix}/bin
292 build = x86_64-unknown-linux-gnu
293 build_alias =
294 build_cpu = x86_64
295 build_os = linux-gnu
296 build_vendor = unknown
297 builddir = .
298 datadir = ${datarootdir}
299 datarootdir = ${prefix}/share
300 docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
301 dvidir = ${docdir}
302 exec_prefix = ${prefix}
303 host = x86_64-unknown-linux-gnu
304 host_alias =
305 host_cpu = x86_64
306 host_os = linux-gnu
307 host_vendor = unknown
308 htmldir = ${docdir}
309 includedir = ${prefix}/include
310 infodir = ${datarootdir}/info
311 install_sh = ${SHELL} /home/mtwebster/bin/cinnamon-menus/install-sh
312 libdir = ${exec_prefix}/lib
313 libexecdir = ${exec_prefix}/libexec
314 localedir = ${datarootdir}/locale
315 localstatedir = ${prefix}/var
316 mandir = ${datarootdir}/man
317 mkdir_p = $(MKDIR_P)
318 oldincludedir = /usr/include
319 pdfdir = ${docdir}
320 prefix = /usr/local
321 program_transform_name = s,x,x,
322 psdir = ${docdir}
323 sbindir = ${exec_prefix}/sbin
324 sharedstatedir = ${prefix}/com
325 srcdir = .
326 sysconfdir = ${prefix}/etc
327 target_alias =
328 top_build_prefix =
329 top_builddir = .
330 top_srcdir = .
331 SUBDIRS = libmenu
332 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
333 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
334 EXTRA_DIST = \
335 HACKING \
336 MAINTAINERS
337
338 MAINTAINERCLEANFILES = \
339 $(srcdir)/INSTALL \
340 $(srcdir)/aclocal.m4 \
341 $(srcdir)/config.guess \
342 $(srcdir)/config.h.in \
343 $(srcdir)/config.sub \
344 $(srcdir)/depcomp \
345 $(srcdir)/install-sh \
346 $(srcdir)/ltmain.sh \
347 $(srcdir)/missing \
348 $(srcdir)/mkinstalldirs \
349 $(srcdir)/py-compile \
350 `find "$(srcdir)" -type f -name Makefile.in -print` \
351 $(srcdir)/configure \
352 $(srcdir)/m4/intltool.m4 \
353 $(srcdir)/m4/libtool.m4 \
354 $(srcdir)/m4/ltoptions.m4 \
355 $(srcdir)/m4/ltsugar.m4 \
356 $(srcdir)/m4/ltversion.m4 \
357 $(srcdir)/m4/lt~obsolete.m4
358
359 all: config.h
360 $(MAKE) $(AM_MAKEFLAGS) all-recursive
361
362 .SUFFIXES:
363 am--refresh: Makefile
364 @:
365 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
366 @for dep in $?; do \
367 case '$(am__configure_deps)' in \
368 *$$dep*) \
369 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
370 $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
371 && exit 0; \
372 exit 1;; \
373 esac; \
374 done; \
375 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
376 $(am__cd) $(top_srcdir) && \
377 $(AUTOMAKE) --foreign Makefile
378 .PRECIOUS: Makefile
379 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
380 @case '$?' in \
381 *config.status*) \
382 echo ' $(SHELL) ./config.status'; \
383 $(SHELL) ./config.status;; \
384 *) \
385 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
386 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
387 esac;
388
389 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
390 $(SHELL) ./config.status --recheck
391
392 $(top_srcdir)/configure: $(am__configure_deps)
393 $(am__cd) $(srcdir) && $(AUTOCONF)
394 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
395 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
396 $(am__aclocal_m4_deps):
397
398 config.h: stamp-h1
399 @if test ! -f $@; then rm -f stamp-h1; else :; fi
400 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
401
402 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
403 @rm -f stamp-h1
404 cd $(top_builddir) && $(SHELL) ./config.status config.h
405 $(srcdir)/config.h.in: $(am__configure_deps)
406 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
407 rm -f stamp-h1
408 touch $@
409
410 distclean-hdr:
411 -rm -f config.h stamp-h1
412
413 mostlyclean-libtool:
414 -rm -f *.lo
415
416 clean-libtool:
417 -rm -rf .libs _libs
418
419 distclean-libtool:
420 -rm -f libtool config.lt
421
422 # This directory's subdirectories are mostly independent; you can cd
423 # into them and run 'make' without going through this Makefile.
424 # To change the values of 'make' variables: instead of editing Makefiles,
425 # (1) if the variable is set in 'config.status', edit 'config.status'
426 # (which will cause the Makefiles to be regenerated when you run 'make');
427 # (2) otherwise, pass the desired values on the 'make' command line.
428 $(am__recursive_targets):
429 @fail=; \
430 if $(am__make_keepgoing); then \
431 failcom='fail=yes'; \
432 else \
433 failcom='exit 1'; \
434 fi; \
435 dot_seen=no; \
436 target=`echo $@ | sed s/-recursive//`; \
437 case "$@" in \
438 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
439 *) list='$(SUBDIRS)' ;; \
440 esac; \
441 for subdir in $$list; do \
442 echo "Making $$target in $$subdir"; \
443 if test "$$subdir" = "."; then \
444 dot_seen=yes; \
445 local_target="$$target-am"; \
446 else \
447 local_target="$$target"; \
448 fi; \
449 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
450 || eval $$failcom; \
451 done; \
452 if test "$$dot_seen" = "no"; then \
453 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
454 fi; test -z "$$fail"
455
456 ID: $(am__tagged_files)
457 $(am__define_uniq_tagged_files); mkid -fID $$unique
458 tags: tags-recursive
459 TAGS: tags
460
461 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
462 set x; \
463 here=`pwd`; \
464 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
465 include_option=--etags-include; \
466 empty_fix=.; \
467 else \
468 include_option=--include; \
469 empty_fix=; \
470 fi; \
471 list='$(SUBDIRS)'; for subdir in $$list; do \
472 if test "$$subdir" = .; then :; else \
473 test ! -f $$subdir/TAGS || \
474 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
475 fi; \
476 done; \
477 $(am__define_uniq_tagged_files); \
478 shift; \
479 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
480 test -n "$$unique" || unique=$$empty_fix; \
481 if test $$# -gt 0; then \
482 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
483 "$$@" $$unique; \
484 else \
485 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
486 $$unique; \
487 fi; \
488 fi
489 ctags: ctags-recursive
490
491 CTAGS: ctags
492 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
493 $(am__define_uniq_tagged_files); \
494 test -z "$(CTAGS_ARGS)$$unique" \
495 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
496 $$unique
497
498 GTAGS:
499 here=`$(am__cd) $(top_builddir) && pwd` \
500 && $(am__cd) $(top_srcdir) \
501 && gtags -i $(GTAGS_ARGS) "$$here"
502 cscope: cscope.files
503 test ! -s cscope.files \
504 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
505 clean-cscope:
506 -rm -f cscope.files
507 cscope.files: clean-cscope cscopelist
508 cscopelist: cscopelist-recursive
509
510 cscopelist-am: $(am__tagged_files)
511 list='$(am__tagged_files)'; \
512 case "$(srcdir)" in \
513 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
514 *) sdir=$(subdir)/$(srcdir) ;; \
515 esac; \
516 for i in $$list; do \
517 if test -f "$$i"; then \
518 echo "$(subdir)/$$i"; \
519 else \
520 echo "$$sdir/$$i"; \
521 fi; \
522 done >> $(top_builddir)/cscope.files
523
524 distclean-tags:
525 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
526 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
527
528 distdir: $(DISTFILES)
529 $(am__remove_distdir)
530 test -d "$(distdir)" || mkdir "$(distdir)"
531 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
532 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
533 list='$(DISTFILES)'; \
534 dist_files=`for file in $$list; do echo $$file; done | \
535 sed -e "s|^$$srcdirstrip/||;t" \
536 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
537 case $$dist_files in \
538 */*) $(MKDIR_P) `echo "$$dist_files" | \
539 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
540 sort -u` ;; \
541 esac; \
542 for file in $$dist_files; do \
543 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
544 if test -d $$d/$$file; then \
545 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
546 if test -d "$(distdir)/$$file"; then \
547 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
548 fi; \
549 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
550 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
551 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
552 fi; \
553 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
554 else \
555 test -f "$(distdir)/$$file" \
556 || cp -p $$d/$$file "$(distdir)/$$file" \
557 || exit 1; \
558 fi; \
559 done
560 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
561 if test "$$subdir" = .; then :; else \
562 $(am__make_dryrun) \
563 || test -d "$(distdir)/$$subdir" \
564 || $(MKDIR_P) "$(distdir)/$$subdir" \
565 || exit 1; \
566 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
567 $(am__relativize); \
568 new_distdir=$$reldir; \
569 dir1=$$subdir; dir2="$(top_distdir)"; \
570 $(am__relativize); \
571 new_top_distdir=$$reldir; \
572 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
573 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
574 ($(am__cd) $$subdir && \
575 $(MAKE) $(AM_MAKEFLAGS) \
576 top_distdir="$$new_top_distdir" \
577 distdir="$$new_distdir" \
578 am__remove_distdir=: \
579 am__skip_length_check=: \
580 am__skip_mode_fix=: \
581 distdir) \
582 || exit 1; \
583 fi; \
584 done
585 -test -n "$(am__skip_mode_fix)" \
586 || find "$(distdir)" -type d ! -perm -755 \
587 -exec chmod u+rwx,go+rx {} \; -o \
588 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
589 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
590 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
591 || chmod -R a+r "$(distdir)"
592 dist-gzip: distdir
593 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
594 $(am__post_remove_distdir)
595
596 dist-bzip2: distdir
597 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
598 $(am__post_remove_distdir)
599
600 dist-lzip: distdir
601 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
602 $(am__post_remove_distdir)
603 dist-xz: distdir
604 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
605 $(am__post_remove_distdir)
606
607 dist-tarZ: distdir
608 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
609 $(am__post_remove_distdir)
610
611 dist-shar: distdir
612 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
613 $(am__post_remove_distdir)
614
615 dist-zip: distdir
616 -rm -f $(distdir).zip
617 zip -rq $(distdir).zip $(distdir)
618 $(am__post_remove_distdir)
619
620 dist dist-all:
621 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
622 $(am__post_remove_distdir)
623
624 # This target untars the dist file and tries a VPATH configuration. Then
625 # it guarantees that the distribution is self-contained by making another
626 # tarfile.
627 distcheck: dist
628 case '$(DIST_ARCHIVES)' in \
629 *.tar.gz*) \
630 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
631 *.tar.bz2*) \
632 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
633 *.tar.lz*) \
634 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
635 *.tar.xz*) \
636 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
637 *.tar.Z*) \
638 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
639 *.shar.gz*) \
640 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
641 *.zip*) \
642 unzip $(distdir).zip ;;\
643 esac
644 chmod -R a-w $(distdir)
645 chmod u+w $(distdir)
646 mkdir $(distdir)/_build $(distdir)/_inst
647 chmod a-w $(distdir)
648 test -d $(distdir)/_build || exit 0; \
649 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
650 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
651 && am__cwd=`pwd` \
652 && $(am__cd) $(distdir)/_build \
653 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
654 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
655 $(DISTCHECK_CONFIGURE_FLAGS) \
656 && $(MAKE) $(AM_MAKEFLAGS) \
657 && $(MAKE) $(AM_MAKEFLAGS) dvi \
658 && $(MAKE) $(AM_MAKEFLAGS) check \
659 && $(MAKE) $(AM_MAKEFLAGS) install \
660 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
661 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
662 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
663 distuninstallcheck \
664 && chmod -R a-w "$$dc_install_base" \
665 && ({ \
666 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
667 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
668 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
669 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
670 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
671 } || { rm -rf "$$dc_destdir"; exit 1; }) \
672 && rm -rf "$$dc_destdir" \
673 && $(MAKE) $(AM_MAKEFLAGS) dist \
674 && rm -rf $(DIST_ARCHIVES) \
675 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
676 && cd "$$am__cwd" \
677 || exit 1
678 $(am__post_remove_distdir)
679 @(echo "$(distdir) archives ready for distribution: "; \
680 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
681 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
682 distuninstallcheck:
683 @test -n '$(distuninstallcheck_dir)' || { \
684 echo 'ERROR: trying to run $@ with an empty' \
685 '$$(distuninstallcheck_dir)' >&2; \
686 exit 1; \
687 }; \
688 $(am__cd) '$(distuninstallcheck_dir)' || { \
689 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
690 exit 1; \
691 }; \
692 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
693 || { echo "ERROR: files left after uninstall:" ; \
694 if test -n "$(DESTDIR)"; then \
695 echo " (check DESTDIR support)"; \
696 fi ; \
697 $(distuninstallcheck_listfiles) ; \
698 exit 1; } >&2
699 distcleancheck: distclean
700 @if test '$(srcdir)' = . ; then \
701 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
702 exit 1 ; \
703 fi
704 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
705 || { echo "ERROR: files left in build directory after distclean:" ; \
706 $(distcleancheck_listfiles) ; \
707 exit 1; } >&2
708 check-am: all-am
709 check: check-recursive
710 all-am: Makefile config.h
711 installdirs: installdirs-recursive
712 installdirs-am:
713 install: install-recursive
714 install-exec: install-exec-recursive
715 install-data: install-data-recursive
716 uninstall: uninstall-recursive
717
718 install-am: all-am
719 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
720
721 installcheck: installcheck-recursive
722 install-strip:
723 if test -z '$(STRIP)'; then \
724 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
725 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
726 install; \
727 else \
728 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
729 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
730 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
731 fi
732 mostlyclean-generic:
733
734 clean-generic:
735
736 distclean-generic:
737 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
738 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
739
740 maintainer-clean-generic:
741 @echo "This command is intended for maintainers to use"
742 @echo "it deletes files that may require special tools to rebuild."
743 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
744 clean: clean-recursive
745
746 clean-am: clean-generic clean-libtool mostlyclean-am
747
748 distclean: distclean-recursive
749 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
750 -rm -f Makefile
751 distclean-am: clean-am distclean-generic distclean-hdr \
752 distclean-libtool distclean-tags
753
754 dvi: dvi-recursive
755
756 dvi-am:
757
758 html: html-recursive
759
760 html-am:
761
762 info: info-recursive
763
764 info-am:
765
766 install-data-am:
767
768 install-dvi: install-dvi-recursive
769
770 install-dvi-am:
771
772 install-exec-am:
773
774 install-html: install-html-recursive
775
776 install-html-am:
777
778 install-info: install-info-recursive
779
780 install-info-am:
781
782 install-man:
783
784 install-pdf: install-pdf-recursive
785
786 install-pdf-am:
787
788 install-ps: install-ps-recursive
789
790 install-ps-am:
791
792 installcheck-am:
793
794 maintainer-clean: maintainer-clean-recursive
795 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
796 -rm -rf $(top_srcdir)/autom4te.cache
797 -rm -f Makefile
798 maintainer-clean-am: distclean-am maintainer-clean-generic
799
800 mostlyclean: mostlyclean-recursive
801
802 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
803
804 pdf: pdf-recursive
805
806 pdf-am:
807
808 ps: ps-recursive
809
810 ps-am:
811
812 uninstall-am:
813
814 .MAKE: $(am__recursive_targets) all install-am install-strip
815
816 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
817 am--refresh check check-am clean clean-cscope clean-generic \
818 clean-libtool cscope cscopelist-am ctags ctags-am dist \
819 dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
820 dist-xz dist-zip distcheck distclean distclean-generic \
821 distclean-hdr distclean-libtool distclean-tags distcleancheck \
822 distdir distuninstallcheck dvi dvi-am html html-am info \
823 info-am install install-am install-data install-data-am \
824 install-dvi install-dvi-am install-exec install-exec-am \
825 install-html install-html-am install-info install-info-am \
826 install-man install-pdf install-pdf-am install-ps \
827 install-ps-am install-strip installcheck installcheck-am \
828 installdirs installdirs-am maintainer-clean \
829 maintainer-clean-generic mostlyclean mostlyclean-generic \
830 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
831 uninstall-am
832
833
834 # Tell versions [3.59,3.63) of GNU make to not export all variables.
835 # Otherwise a system limit (for SysV at least) may be exceeded.
836 .NOEXPORT:
0 SUBDIRS = libmenu
1
2 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
3
4 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
5
6 EXTRA_DIST = \
7 HACKING \
8 MAINTAINERS
9
10 MAINTAINERCLEANFILES = \
11 $(srcdir)/INSTALL \
12 $(srcdir)/aclocal.m4 \
13 $(srcdir)/config.guess \
14 $(srcdir)/config.h.in \
15 $(srcdir)/config.sub \
16 $(srcdir)/depcomp \
17 $(srcdir)/install-sh \
18 $(srcdir)/ltmain.sh \
19 $(srcdir)/missing \
20 $(srcdir)/mkinstalldirs \
21 $(srcdir)/py-compile \
22 `find "$(srcdir)" -type f -name Makefile.in -print` \
23 $(srcdir)/configure \
24 $(srcdir)/m4/intltool.m4 \
25 $(srcdir)/m4/libtool.m4 \
26 $(srcdir)/m4/ltoptions.m4 \
27 $(srcdir)/m4/ltsugar.m4 \
28 $(srcdir)/m4/ltversion.m4 \
29 $(srcdir)/m4/lt~obsolete.m4
30
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
17 am__make_running_with_option = \
18 case $${target_option-} in \
19 ?) ;; \
20 *) echo "am__make_running_with_option: internal error: invalid" \
21 "target option '$${target_option-}' specified" >&2; \
22 exit 1;; \
23 esac; \
24 has_opt=no; \
25 sane_makeflags=$$MAKEFLAGS; \
26 if $(am__is_gnu_make); then \
27 sane_makeflags=$$MFLAGS; \
28 else \
29 case $$MAKEFLAGS in \
30 *\\[\ \ ]*) \
31 bs=\\; \
32 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
33 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
34 esac; \
35 fi; \
36 skip_next=no; \
37 strip_trailopt () \
38 { \
39 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
40 }; \
41 for flg in $$sane_makeflags; do \
42 test $$skip_next = yes && { skip_next=no; continue; }; \
43 case $$flg in \
44 *=*|--*) continue;; \
45 -*I) strip_trailopt 'I'; skip_next=yes;; \
46 -*I?*) strip_trailopt 'I';; \
47 -*O) strip_trailopt 'O'; skip_next=yes;; \
48 -*O?*) strip_trailopt 'O';; \
49 -*l) strip_trailopt 'l'; skip_next=yes;; \
50 -*l?*) strip_trailopt 'l';; \
51 -[dEDm]) skip_next=yes;; \
52 -[JT]) skip_next=yes;; \
53 esac; \
54 case $$flg in \
55 *$$target_option*) has_opt=yes; break;; \
56 esac; \
57 done; \
58 test $$has_opt = yes
59 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
60 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
61 pkgdatadir = $(datadir)/@PACKAGE@
62 pkgincludedir = $(includedir)/@PACKAGE@
63 pkglibdir = $(libdir)/@PACKAGE@
64 pkglibexecdir = $(libexecdir)/@PACKAGE@
65 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
66 install_sh_DATA = $(install_sh) -c -m 644
67 install_sh_PROGRAM = $(install_sh) -c
68 install_sh_SCRIPT = $(install_sh) -c
69 INSTALL_HEADER = $(INSTALL_DATA)
70 transform = $(program_transform_name)
71 NORMAL_INSTALL = :
72 PRE_INSTALL = :
73 POST_INSTALL = :
74 NORMAL_UNINSTALL = :
75 PRE_UNINSTALL = :
76 POST_UNINSTALL = :
77 build_triplet = @build@
78 host_triplet = @host@
79 subdir = .
80 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
81 $(top_srcdir)/configure $(am__configure_deps) \
82 $(srcdir)/config.h.in AUTHORS COPYING COPYING.LIB ChangeLog \
83 NEWS README config.guess config.sub depcomp install-sh missing \
84 ltmain.sh
85 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
87 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
88 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
89 $(top_srcdir)/configure.ac
90 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
91 $(ACLOCAL_M4)
92 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
93 configure.lineno config.status.lineno
94 mkinstalldirs = $(install_sh) -d
95 CONFIG_HEADER = config.h
96 CONFIG_CLEAN_FILES =
97 CONFIG_CLEAN_VPATH_FILES =
98 AM_V_P = $(am__v_P_@AM_V@)
99 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
100 am__v_P_0 = false
101 am__v_P_1 = :
102 AM_V_GEN = $(am__v_GEN_@AM_V@)
103 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
104 am__v_GEN_0 = @echo " GEN " $@;
105 am__v_GEN_1 =
106 AM_V_at = $(am__v_at_@AM_V@)
107 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
108 am__v_at_0 = @
109 am__v_at_1 =
110 SOURCES =
111 DIST_SOURCES =
112 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
113 ctags-recursive dvi-recursive html-recursive info-recursive \
114 install-data-recursive install-dvi-recursive \
115 install-exec-recursive install-html-recursive \
116 install-info-recursive install-pdf-recursive \
117 install-ps-recursive install-recursive installcheck-recursive \
118 installdirs-recursive pdf-recursive ps-recursive \
119 tags-recursive uninstall-recursive
120 am__can_run_installinfo = \
121 case $$AM_UPDATE_INFO_DIR in \
122 n|no|NO) false;; \
123 *) (install-info --version) >/dev/null 2>&1;; \
124 esac
125 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
126 distclean-recursive maintainer-clean-recursive
127 am__recursive_targets = \
128 $(RECURSIVE_TARGETS) \
129 $(RECURSIVE_CLEAN_TARGETS) \
130 $(am__extra_recursive_targets)
131 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
132 cscope distdir dist dist-all distcheck
133 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
134 $(LISP)config.h.in
135 # Read a list of newline-separated strings from the standard input,
136 # and print each of them once, without duplicates. Input order is
137 # *not* preserved.
138 am__uniquify_input = $(AWK) '\
139 BEGIN { nonempty = 0; } \
140 { items[$$0] = 1; nonempty = 1; } \
141 END { if (nonempty) { for (i in items) print i; }; } \
142 '
143 # Make sure the list of sources is unique. This is necessary because,
144 # e.g., the same source file might be shared among _SOURCES variables
145 # for different programs/libraries.
146 am__define_uniq_tagged_files = \
147 list='$(am__tagged_files)'; \
148 unique=`for i in $$list; do \
149 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
150 done | $(am__uniquify_input)`
151 ETAGS = etags
152 CTAGS = ctags
153 CSCOPE = cscope
154 DIST_SUBDIRS = $(SUBDIRS)
155 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
156 distdir = $(PACKAGE)-$(VERSION)
157 top_distdir = $(distdir)
158 am__remove_distdir = \
159 if test -d "$(distdir)"; then \
160 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
161 && rm -rf "$(distdir)" \
162 || { sleep 5 && rm -rf "$(distdir)"; }; \
163 else :; fi
164 am__post_remove_distdir = $(am__remove_distdir)
165 am__relativize = \
166 dir0=`pwd`; \
167 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
168 sed_rest='s,^[^/]*/*,,'; \
169 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
170 sed_butlast='s,/*[^/]*$$,,'; \
171 while test -n "$$dir1"; do \
172 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
173 if test "$$first" != "."; then \
174 if test "$$first" = ".."; then \
175 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
176 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
177 else \
178 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
179 if test "$$first2" = "$$first"; then \
180 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
181 else \
182 dir2="../$$dir2"; \
183 fi; \
184 dir0="$$dir0"/"$$first"; \
185 fi; \
186 fi; \
187 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
188 done; \
189 reldir="$$dir2"
190 GZIP_ENV = --best
191 DIST_ARCHIVES = $(distdir).tar.xz
192 DIST_TARGETS = dist-xz
193 distuninstallcheck_listfiles = find . -type f -print
194 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
195 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
196 distcleancheck_listfiles = find . -type f -print
197 ACLOCAL = @ACLOCAL@
198 AMTAR = @AMTAR@
199 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
200 AR = @AR@
201 AS = @AS@
202 AUTOCONF = @AUTOCONF@
203 AUTOHEADER = @AUTOHEADER@
204 AUTOMAKE = @AUTOMAKE@
205 AWK = @AWK@
206 CC = @CC@
207 CCDEPMODE = @CCDEPMODE@
208 CFLAGS = @CFLAGS@
209 CPP = @CPP@
210 CPPFLAGS = @CPPFLAGS@
211 CYGPATH_W = @CYGPATH_W@
212 DEBUG_CFLAGS = @DEBUG_CFLAGS@
213 DEFS = @DEFS@
214 DEPDIR = @DEPDIR@
215 DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
216 DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
217 DLLTOOL = @DLLTOOL@
218 DSYMUTIL = @DSYMUTIL@
219 DUMPBIN = @DUMPBIN@
220 ECHO_C = @ECHO_C@
221 ECHO_N = @ECHO_N@
222 ECHO_T = @ECHO_T@
223 EGREP = @EGREP@
224 EXEEXT = @EXEEXT@
225 FGREP = @FGREP@
226 GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
227 GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
228 GREP = @GREP@
229 INSTALL = @INSTALL@
230 INSTALL_DATA = @INSTALL_DATA@
231 INSTALL_PROGRAM = @INSTALL_PROGRAM@
232 INSTALL_SCRIPT = @INSTALL_SCRIPT@
233 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
234 INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
235 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
236 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
237 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
238 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
239 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
240 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
241 INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
242 LD = @LD@
243 LDFLAGS = @LDFLAGS@
244 LIBOBJS = @LIBOBJS@
245 LIBS = @LIBS@
246 LIBTOOL = @LIBTOOL@
247 LIB_MENU_LT_VERSION = @LIB_MENU_LT_VERSION@
248 LIPO = @LIPO@
249 LN_S = @LN_S@
250 LTLIBOBJS = @LTLIBOBJS@
251 MAINT = @MAINT@
252 MAKEINFO = @MAKEINFO@
253 MANIFEST_TOOL = @MANIFEST_TOOL@
254 MKDIR_P = @MKDIR_P@
255 NM = @NM@
256 NMEDIT = @NMEDIT@
257 OBJDUMP = @OBJDUMP@
258 OBJEXT = @OBJEXT@
259 OTOOL = @OTOOL@
260 OTOOL64 = @OTOOL64@
261 PACKAGE = @PACKAGE@
262 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
263 PACKAGE_NAME = @PACKAGE_NAME@
264 PACKAGE_STRING = @PACKAGE_STRING@
265 PACKAGE_TARNAME = @PACKAGE_TARNAME@
266 PACKAGE_URL = @PACKAGE_URL@
267 PACKAGE_VERSION = @PACKAGE_VERSION@
268 PATH_SEPARATOR = @PATH_SEPARATOR@
269 PKG_CONFIG = @PKG_CONFIG@
270 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
271 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
272 RANLIB = @RANLIB@
273 SED = @SED@
274 SET_MAKE = @SET_MAKE@
275 SHELL = @SHELL@
276 STRIP = @STRIP@
277 VERSION = @VERSION@
278 WARN_CFLAGS = @WARN_CFLAGS@
279 abs_builddir = @abs_builddir@
280 abs_srcdir = @abs_srcdir@
281 abs_top_builddir = @abs_top_builddir@
282 abs_top_srcdir = @abs_top_srcdir@
283 ac_ct_AR = @ac_ct_AR@
284 ac_ct_CC = @ac_ct_CC@
285 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
286 am__include = @am__include@
287 am__leading_dot = @am__leading_dot@
288 am__quote = @am__quote@
289 am__tar = @am__tar@
290 am__untar = @am__untar@
291 bindir = @bindir@
292 build = @build@
293 build_alias = @build_alias@
294 build_cpu = @build_cpu@
295 build_os = @build_os@
296 build_vendor = @build_vendor@
297 builddir = @builddir@
298 datadir = @datadir@
299 datarootdir = @datarootdir@
300 docdir = @docdir@
301 dvidir = @dvidir@
302 exec_prefix = @exec_prefix@
303 host = @host@
304 host_alias = @host_alias@
305 host_cpu = @host_cpu@
306 host_os = @host_os@
307 host_vendor = @host_vendor@
308 htmldir = @htmldir@
309 includedir = @includedir@
310 infodir = @infodir@
311 install_sh = @install_sh@
312 libdir = @libdir@
313 libexecdir = @libexecdir@
314 localedir = @localedir@
315 localstatedir = @localstatedir@
316 mandir = @mandir@
317 mkdir_p = @mkdir_p@
318 oldincludedir = @oldincludedir@
319 pdfdir = @pdfdir@
320 prefix = @prefix@
321 program_transform_name = @program_transform_name@
322 psdir = @psdir@
323 sbindir = @sbindir@
324 sharedstatedir = @sharedstatedir@
325 srcdir = @srcdir@
326 sysconfdir = @sysconfdir@
327 target_alias = @target_alias@
328 top_build_prefix = @top_build_prefix@
329 top_builddir = @top_builddir@
330 top_srcdir = @top_srcdir@
331 SUBDIRS = libmenu
332 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
333 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
334 EXTRA_DIST = \
335 HACKING \
336 MAINTAINERS
337
338 MAINTAINERCLEANFILES = \
339 $(srcdir)/INSTALL \
340 $(srcdir)/aclocal.m4 \
341 $(srcdir)/config.guess \
342 $(srcdir)/config.h.in \
343 $(srcdir)/config.sub \
344 $(srcdir)/depcomp \
345 $(srcdir)/install-sh \
346 $(srcdir)/ltmain.sh \
347 $(srcdir)/missing \
348 $(srcdir)/mkinstalldirs \
349 $(srcdir)/py-compile \
350 `find "$(srcdir)" -type f -name Makefile.in -print` \
351 $(srcdir)/configure \
352 $(srcdir)/m4/intltool.m4 \
353 $(srcdir)/m4/libtool.m4 \
354 $(srcdir)/m4/ltoptions.m4 \
355 $(srcdir)/m4/ltsugar.m4 \
356 $(srcdir)/m4/ltversion.m4 \
357 $(srcdir)/m4/lt~obsolete.m4
358
359 all: config.h
360 $(MAKE) $(AM_MAKEFLAGS) all-recursive
361
362 .SUFFIXES:
363 am--refresh: Makefile
364 @:
365 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
366 @for dep in $?; do \
367 case '$(am__configure_deps)' in \
368 *$$dep*) \
369 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
370 $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
371 && exit 0; \
372 exit 1;; \
373 esac; \
374 done; \
375 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
376 $(am__cd) $(top_srcdir) && \
377 $(AUTOMAKE) --foreign Makefile
378 .PRECIOUS: Makefile
379 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
380 @case '$?' in \
381 *config.status*) \
382 echo ' $(SHELL) ./config.status'; \
383 $(SHELL) ./config.status;; \
384 *) \
385 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
386 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
387 esac;
388
389 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
390 $(SHELL) ./config.status --recheck
391
392 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
393 $(am__cd) $(srcdir) && $(AUTOCONF)
394 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
395 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
396 $(am__aclocal_m4_deps):
397
398 config.h: stamp-h1
399 @if test ! -f $@; then rm -f stamp-h1; else :; fi
400 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
401
402 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
403 @rm -f stamp-h1
404 cd $(top_builddir) && $(SHELL) ./config.status config.h
405 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
406 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
407 rm -f stamp-h1
408 touch $@
409
410 distclean-hdr:
411 -rm -f config.h stamp-h1
412
413 mostlyclean-libtool:
414 -rm -f *.lo
415
416 clean-libtool:
417 -rm -rf .libs _libs
418
419 distclean-libtool:
420 -rm -f libtool config.lt
421
422 # This directory's subdirectories are mostly independent; you can cd
423 # into them and run 'make' without going through this Makefile.
424 # To change the values of 'make' variables: instead of editing Makefiles,
425 # (1) if the variable is set in 'config.status', edit 'config.status'
426 # (which will cause the Makefiles to be regenerated when you run 'make');
427 # (2) otherwise, pass the desired values on the 'make' command line.
428 $(am__recursive_targets):
429 @fail=; \
430 if $(am__make_keepgoing); then \
431 failcom='fail=yes'; \
432 else \
433 failcom='exit 1'; \
434 fi; \
435 dot_seen=no; \
436 target=`echo $@ | sed s/-recursive//`; \
437 case "$@" in \
438 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
439 *) list='$(SUBDIRS)' ;; \
440 esac; \
441 for subdir in $$list; do \
442 echo "Making $$target in $$subdir"; \
443 if test "$$subdir" = "."; then \
444 dot_seen=yes; \
445 local_target="$$target-am"; \
446 else \
447 local_target="$$target"; \
448 fi; \
449 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
450 || eval $$failcom; \
451 done; \
452 if test "$$dot_seen" = "no"; then \
453 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
454 fi; test -z "$$fail"
455
456 ID: $(am__tagged_files)
457 $(am__define_uniq_tagged_files); mkid -fID $$unique
458 tags: tags-recursive
459 TAGS: tags
460
461 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
462 set x; \
463 here=`pwd`; \
464 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
465 include_option=--etags-include; \
466 empty_fix=.; \
467 else \
468 include_option=--include; \
469 empty_fix=; \
470 fi; \
471 list='$(SUBDIRS)'; for subdir in $$list; do \
472 if test "$$subdir" = .; then :; else \
473 test ! -f $$subdir/TAGS || \
474 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
475 fi; \
476 done; \
477 $(am__define_uniq_tagged_files); \
478 shift; \
479 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
480 test -n "$$unique" || unique=$$empty_fix; \
481 if test $$# -gt 0; then \
482 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
483 "$$@" $$unique; \
484 else \
485 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
486 $$unique; \
487 fi; \
488 fi
489 ctags: ctags-recursive
490
491 CTAGS: ctags
492 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
493 $(am__define_uniq_tagged_files); \
494 test -z "$(CTAGS_ARGS)$$unique" \
495 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
496 $$unique
497
498 GTAGS:
499 here=`$(am__cd) $(top_builddir) && pwd` \
500 && $(am__cd) $(top_srcdir) \
501 && gtags -i $(GTAGS_ARGS) "$$here"
502 cscope: cscope.files
503 test ! -s cscope.files \
504 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
505 clean-cscope:
506 -rm -f cscope.files
507 cscope.files: clean-cscope cscopelist
508 cscopelist: cscopelist-recursive
509
510 cscopelist-am: $(am__tagged_files)
511 list='$(am__tagged_files)'; \
512 case "$(srcdir)" in \
513 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
514 *) sdir=$(subdir)/$(srcdir) ;; \
515 esac; \
516 for i in $$list; do \
517 if test -f "$$i"; then \
518 echo "$(subdir)/$$i"; \
519 else \
520 echo "$$sdir/$$i"; \
521 fi; \
522 done >> $(top_builddir)/cscope.files
523
524 distclean-tags:
525 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
526 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
527
528 distdir: $(DISTFILES)
529 $(am__remove_distdir)
530 test -d "$(distdir)" || mkdir "$(distdir)"
531 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
532 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
533 list='$(DISTFILES)'; \
534 dist_files=`for file in $$list; do echo $$file; done | \
535 sed -e "s|^$$srcdirstrip/||;t" \
536 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
537 case $$dist_files in \
538 */*) $(MKDIR_P) `echo "$$dist_files" | \
539 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
540 sort -u` ;; \
541 esac; \
542 for file in $$dist_files; do \
543 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
544 if test -d $$d/$$file; then \
545 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
546 if test -d "$(distdir)/$$file"; then \
547 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
548 fi; \
549 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
550 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
551 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
552 fi; \
553 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
554 else \
555 test -f "$(distdir)/$$file" \
556 || cp -p $$d/$$file "$(distdir)/$$file" \
557 || exit 1; \
558 fi; \
559 done
560 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
561 if test "$$subdir" = .; then :; else \
562 $(am__make_dryrun) \
563 || test -d "$(distdir)/$$subdir" \
564 || $(MKDIR_P) "$(distdir)/$$subdir" \
565 || exit 1; \
566 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
567 $(am__relativize); \
568 new_distdir=$$reldir; \
569 dir1=$$subdir; dir2="$(top_distdir)"; \
570 $(am__relativize); \
571 new_top_distdir=$$reldir; \
572 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
573 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
574 ($(am__cd) $$subdir && \
575 $(MAKE) $(AM_MAKEFLAGS) \
576 top_distdir="$$new_top_distdir" \
577 distdir="$$new_distdir" \
578 am__remove_distdir=: \
579 am__skip_length_check=: \
580 am__skip_mode_fix=: \
581 distdir) \
582 || exit 1; \
583 fi; \
584 done
585 -test -n "$(am__skip_mode_fix)" \
586 || find "$(distdir)" -type d ! -perm -755 \
587 -exec chmod u+rwx,go+rx {} \; -o \
588 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
589 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
590 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
591 || chmod -R a+r "$(distdir)"
592 dist-gzip: distdir
593 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
594 $(am__post_remove_distdir)
595
596 dist-bzip2: distdir
597 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
598 $(am__post_remove_distdir)
599
600 dist-lzip: distdir
601 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
602 $(am__post_remove_distdir)
603 dist-xz: distdir
604 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
605 $(am__post_remove_distdir)
606
607 dist-tarZ: distdir
608 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
609 $(am__post_remove_distdir)
610
611 dist-shar: distdir
612 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
613 $(am__post_remove_distdir)
614
615 dist-zip: distdir
616 -rm -f $(distdir).zip
617 zip -rq $(distdir).zip $(distdir)
618 $(am__post_remove_distdir)
619
620 dist dist-all:
621 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
622 $(am__post_remove_distdir)
623
624 # This target untars the dist file and tries a VPATH configuration. Then
625 # it guarantees that the distribution is self-contained by making another
626 # tarfile.
627 distcheck: dist
628 case '$(DIST_ARCHIVES)' in \
629 *.tar.gz*) \
630 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
631 *.tar.bz2*) \
632 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
633 *.tar.lz*) \
634 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
635 *.tar.xz*) \
636 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
637 *.tar.Z*) \
638 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
639 *.shar.gz*) \
640 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
641 *.zip*) \
642 unzip $(distdir).zip ;;\
643 esac
644 chmod -R a-w $(distdir)
645 chmod u+w $(distdir)
646 mkdir $(distdir)/_build $(distdir)/_inst
647 chmod a-w $(distdir)
648 test -d $(distdir)/_build || exit 0; \
649 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
650 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
651 && am__cwd=`pwd` \
652 && $(am__cd) $(distdir)/_build \
653 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
654 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
655 $(DISTCHECK_CONFIGURE_FLAGS) \
656 && $(MAKE) $(AM_MAKEFLAGS) \
657 && $(MAKE) $(AM_MAKEFLAGS) dvi \
658 && $(MAKE) $(AM_MAKEFLAGS) check \
659 && $(MAKE) $(AM_MAKEFLAGS) install \
660 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
661 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
662 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
663 distuninstallcheck \
664 && chmod -R a-w "$$dc_install_base" \
665 && ({ \
666 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
667 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
668 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
669 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
670 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
671 } || { rm -rf "$$dc_destdir"; exit 1; }) \
672 && rm -rf "$$dc_destdir" \
673 && $(MAKE) $(AM_MAKEFLAGS) dist \
674 && rm -rf $(DIST_ARCHIVES) \
675 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
676 && cd "$$am__cwd" \
677 || exit 1
678 $(am__post_remove_distdir)
679 @(echo "$(distdir) archives ready for distribution: "; \
680 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
681 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
682 distuninstallcheck:
683 @test -n '$(distuninstallcheck_dir)' || { \
684 echo 'ERROR: trying to run $@ with an empty' \
685 '$$(distuninstallcheck_dir)' >&2; \
686 exit 1; \
687 }; \
688 $(am__cd) '$(distuninstallcheck_dir)' || { \
689 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
690 exit 1; \
691 }; \
692 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
693 || { echo "ERROR: files left after uninstall:" ; \
694 if test -n "$(DESTDIR)"; then \
695 echo " (check DESTDIR support)"; \
696 fi ; \
697 $(distuninstallcheck_listfiles) ; \
698 exit 1; } >&2
699 distcleancheck: distclean
700 @if test '$(srcdir)' = . ; then \
701 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
702 exit 1 ; \
703 fi
704 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
705 || { echo "ERROR: files left in build directory after distclean:" ; \
706 $(distcleancheck_listfiles) ; \
707 exit 1; } >&2
708 check-am: all-am
709 check: check-recursive
710 all-am: Makefile config.h
711 installdirs: installdirs-recursive
712 installdirs-am:
713 install: install-recursive
714 install-exec: install-exec-recursive
715 install-data: install-data-recursive
716 uninstall: uninstall-recursive
717
718 install-am: all-am
719 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
720
721 installcheck: installcheck-recursive
722 install-strip:
723 if test -z '$(STRIP)'; then \
724 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
725 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
726 install; \
727 else \
728 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
729 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
730 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
731 fi
732 mostlyclean-generic:
733
734 clean-generic:
735
736 distclean-generic:
737 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
738 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
739
740 maintainer-clean-generic:
741 @echo "This command is intended for maintainers to use"
742 @echo "it deletes files that may require special tools to rebuild."
743 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
744 clean: clean-recursive
745
746 clean-am: clean-generic clean-libtool mostlyclean-am
747
748 distclean: distclean-recursive
749 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
750 -rm -f Makefile
751 distclean-am: clean-am distclean-generic distclean-hdr \
752 distclean-libtool distclean-tags
753
754 dvi: dvi-recursive
755
756 dvi-am:
757
758 html: html-recursive
759
760 html-am:
761
762 info: info-recursive
763
764 info-am:
765
766 install-data-am:
767
768 install-dvi: install-dvi-recursive
769
770 install-dvi-am:
771
772 install-exec-am:
773
774 install-html: install-html-recursive
775
776 install-html-am:
777
778 install-info: install-info-recursive
779
780 install-info-am:
781
782 install-man:
783
784 install-pdf: install-pdf-recursive
785
786 install-pdf-am:
787
788 install-ps: install-ps-recursive
789
790 install-ps-am:
791
792 installcheck-am:
793
794 maintainer-clean: maintainer-clean-recursive
795 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
796 -rm -rf $(top_srcdir)/autom4te.cache
797 -rm -f Makefile
798 maintainer-clean-am: distclean-am maintainer-clean-generic
799
800 mostlyclean: mostlyclean-recursive
801
802 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
803
804 pdf: pdf-recursive
805
806 pdf-am:
807
808 ps: ps-recursive
809
810 ps-am:
811
812 uninstall-am:
813
814 .MAKE: $(am__recursive_targets) all install-am install-strip
815
816 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
817 am--refresh check check-am clean clean-cscope clean-generic \
818 clean-libtool cscope cscopelist-am ctags ctags-am dist \
819 dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
820 dist-xz dist-zip distcheck distclean distclean-generic \
821 distclean-hdr distclean-libtool distclean-tags distcleancheck \
822 distdir distuninstallcheck dvi dvi-am html html-am info \
823 info-am install install-am install-data install-data-am \
824 install-dvi install-dvi-am install-exec install-exec-am \
825 install-html install-html-am install-info install-info-am \
826 install-man install-pdf install-pdf-am install-ps \
827 install-ps-am install-strip installcheck installcheck-am \
828 installdirs installdirs-am maintainer-clean \
829 maintainer-clean-generic mostlyclean mostlyclean-generic \
830 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
831 uninstall-am
832
833
834 # Tell versions [3.59,3.63) of GNU make to not export all variables.
835 # Otherwise a system limit (for SysV at least) may be exceeded.
836 .NOEXPORT:
+1790
-0
NEWS less more
0 =============
1 Version 3.8.0
2 =============
3
4 * Add more java things to sundry
5 * Add im-chooser, power statistics and personal file
6 sharing to sundry
7 * Remove special-casing for Fedora vendor prefixdd
8 * Translation updates
9
10 ==============
11 Version 3.7.90
12 ==============
13
14 Bugs Fixed:
15 * Fix error reporting
16 * Memory leak fixes (William John McCann)
17 * Remove the simple editor (William John McCann)
18 * New menu layout for gnome-shell tweaks (William John McCann,
19 Florian Muellner, Jasper St. Pierre)
20 * Remove old gnome-control-center files (Jasper St. Pierre)
21
22 Translation updates:
23 * Alexandre Franke
24 * Fabio Tomat
25 * Inaki Larranaga Murgoitio
26 * Piotr Drąg
27 * William Jon McCann
28
29 =============
30 Version 3.6.2
31 =============
32
33 * 688972 call menu_layout_load() with non_prefixed_name parameter
34 * Translation updates (Arabic, Kannada, Uyghur)
35
36 =============
37 Version 3.6.1
38 =============
39
40 * Translation updates (Catalan, Catalan (Valencian), Ukrainian,
41 Aragonese, Slovak, Uzbek)
42
43 =============
44 Version 3.6.0
45 =============
46
47 * Translation updates
48
49 ==============
50 Version 3.5.92
51 ==============
52
53 libmenu
54
55 * Add proper header reference to GMenu-3.0.gir (Rico Tzschichholz)
56
57 Translators
58
59 * Nilamdyuti Goswami (as)
60 * Petr Kovar (cs)
61 * Peter Bach (da)
62 * Bruce Cowan (en_GB)
63 * Arash Mousavi (fa)
64 * Jiri Grönroos (fi)
65 * Claude Paroz (fr)
66 * Leandro Regueiro (gl)
67 * Gabor Kelemen (hu)
68 * Dirgita (id)
69 * Milo Casagrande (it)
70 * Changwoo Ryu (ko)
71 * Aurimas Černius (lt)
72 * Sandeep Shedmake (mr)
73 * A S Alam (pa)
74 * Piotr Drąg (pl)
75 * Duarte Loreto (pt)
76 * Daniel Nylander (sv)
77 * Dr.T.Vasudevan (ta)
78 * Theppitak Karoonboonyanan (th)
79 * Muhammet Kara (tr)
80 * Nguyễn Thái Ngọc Duy (vi)
81 * Chrovex Fan (zh_CN)
82
83 =============
84 Version 3.5.5
85 =============
86
87 Translations Updates:
88
89 * Traditional Chinese (Chao-Hsiung Liao)
90 * German (Tobias Endrigkeit)
91 * Kazakh (Baurzhan Muftakhidinov)
92 * Silesian (Przemysław Buczkowski)
93 * Gujarati (Sweta Kothari)
94 * Serbian (Мирослав Николић)
95
96 =============
97 Version 3.5.4
98 =============
99
100 Translations Updates
101
102 * Belarusian (Alexander Shopov)
103
104 =============
105 Version 3.5.3
106 =============
107
108 libmenu
109
110 * Fix scanner warnings (Colin Walters)
111 * Add gmenu_tree_iter_get_separator (Jasper St. Pierre)
112 * Add a recursive NoDisplay getter (Jasper St. Pierre)
113 * Add a way to get a GMenuTree from a GMenuTreeItem (Jasper St. Pierre)
114 * Add a way to get the parent item for a GMenuTreeItem (Jasper St. Pierre)
115
116 Translations Updates
117
118 * Belarusian (Ihar Hrachyshka)
119 * Greek (Tom Tryfonidis)
120 * Assamese (Nilamdyuti Goswami)
121 * Telugu (Sasi Bhushan Boddepalli)
122
123 =============
124 Version 3.5.2
125 =============
126
127 Layout
128
129 * Add a separate category for Web Applications (Giovanni Campagna)
130
131 libmenu
132
133 * Add a new GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED flag (Vincent Untz)
134
135 Translations
136
137 * Bulgarian
138 * Kashubian
139 * Spanish
140 * Galician
141 * Slovenian
142 * Hebrew
143 * Russian
144 * Norwegian bokmål
145
146 =============
147 Version 3.4.0
148 =============
149
150 Translators
151
152 * Morn Met (km)
153 * Bahodir Mansurov (uz@cyrillic)
154
155 =============
156 Version 3.3.5
157 =============
158
159 Translators
160
161 * Jiro Matsuzawa (ja)
162 * Kjartan Maraas (nb)
163 * Danishka Navin (si)
164 * Andiswa Mvanyashe (xh)
165
166 =============
167 Version 3.3.1
168 =============
169
170 libmenu
171
172 * Ignore desktop entries with no Name or Exec key (Florian Müllner)
173
174 Layout
175
176 * Put the Other menu at the end (Vincent)
177
178 ===============
179 Version 3.2.0.1
180 ===============
181
182 Menu Editor
183
184 * Work with latest pygobject (Vincent)
185
186 =============
187 Version 3.2.0
188 =============
189
190 Translators
191
192 * Nilamdyuti Goswami (as)
193 * Praveen Illa (te)
194
195 ==============
196 Version 3.1.92
197 ==============
198
199 libmenu
200
201 * Fix build failure with --enable-debug (Vincent)
202
203 Translators
204
205 * Ігар Грачышка (be)
206 * Daniel Mustieles (es)
207 * Jiro Matsuzawa (ja)
208
209 ==============
210 Version 3.1.90
211 ==============
212
213 libmenu
214
215 * Don't try to unref potentially NULL pointers (Jasper St. Pierre)
216
217 =============
218 Version 3.1.5
219 =============
220
221 This version of gnome-menus comes with a significant API and ABI break, to
222 modernize the code. As a result, the name of the library and the pkg-config
223 filename have changed, so that this new version is parallel-installable with
224 previous ones.
225
226 As of now, there is no guide to migrate to the new API, but it is rather
227 straight-forward as changes were mostly done to improve the experience for
228 introspection-based bindings. The examples shipped in util/ are a good basis.
229
230 libmenu
231
232 * Rebase internal representation of .desktop files on top of
233 GDesktopAppInfo (Colin Walters)
234 * Make GMenuTree a GObject (Colin Walters)
235 * Use GSlice for various data (Colin Walters)
236 * Use thread-default main context for callbacks for future flexibility
237 for thread support (Colin Walters)
238 * Many API changes, see new headers for changes. The most visible one
239 is that gmenu_tree_load_sync() should explicitly be used to load the
240 menu now. (Colin Walters, Vincent)
241 * Drop support for "KDE Desktop Entry" group (Vincent)
242 * Return GIcon instead of char * for icon-related API (Vincent)
243 * Various fixes and cleanups to merge Colin's branch (Vincent, Colin
244 Walters)
245 * Add gmenu_tree_get_entry_by_id() API (Colin Walters)
246 * Support XDG_CURRENT_DESKTOP (Vincent)
247
248 Menu Editor
249
250 * Port to introspection-based bindings (Vincent)
251 * Stop editing settings.menu (Vincent)
252
253 Python
254
255 * Drop static python bindings; introspection-based ones should be used
256 now (Colin Walters)
257
258 Misc
259
260 * Replace example of python code with javascript code (Colin Walters)
261 * Change library name, header directory, pkg-config filename (Vincent)
262 * Require glib 2.29.15 for new API (Vincent)
263
264 Translators
265
266 * Ігар Грачышка (be)
267 * Gil Forcada (ca@valencia)
268 * Priscilla Mahlangu (zu)
269
270 =============
271 Version 3.0.1
272 =============
273
274 Translators
275
276 * Anousak Souphavanh (lo)
277 * Theppitak Karoonboonyanan (th)
278
279 =============
280 Version 3.0.0
281 =============
282
283 Layout
284
285 * Show administration tools and old capplets in Other (Vincent)
286
287 Translators
288
289 * Khaled Hosny (ar)
290 * Zenat Rahnuma (bn)
291 * Gil Forcada (ca)
292 * Sense Hofstede (fy)
293 * Praveen Illa (te)
294 * Sahran (ug)
295 * Clytie Siddall (vi)
296
297 ===============
298 Version 2.91.91
299 ===============
300
301 Menu Editor
302
303 * Fix to work with latest pygi (Vincent)
304
305 Misc
306
307 * Build fix (Vincent)
308
309 Translators
310
311 * F Wolff (af)
312 * Changwoo Ryu (ko)
313 * Pavol Klačanský (sk)
314 * Korostil Daniel (uk)
315
316 ==============
317 Version 2.91.6
318 ==============
319
320 libmenu
321
322 * Do not send multiple notifications for one file change (Vincent)
323
324 Menu Editor
325
326 * Port to pygobject-based introspection bindings (Vincent)
327 * Make editor GTK+ 3 ready (Vincent)
328
329 Misc
330
331 * Improve introspection build (Vincent)
332 * Drop settings.menu (Vincent)
333
334 Translators
335
336 * Gil Forcada (ca@valencia)
337 * Mattias Põldaru (et)
338 * Mahyar Moghimi (fa)
339 * Fran Diéguez (gl)
340 * Kikongo Translation Team (kg)
341 * Sahran (ug)
342 * Clytie Siddall (vi)
343
344 ==============
345 Version 2.30.4
346 ==============
347
348 libmenu
349
350 * Clear cache of desktop entries set when files are added/removed
351 (Vincent)
352
353 Misc
354
355 * Associate .gir with pkg-config file (Vincent)
356 * Rename --enable-deprecations configure option to
357 --enable-deprecation-flags (Vincent)
358
359 Translators
360
361 * Daniel Martinez (an)
362 * Takayuki KUSANO (ja)
363 * Baurzhan Muftakhidinov (kk)
364 * Torstein Winterseth (nn)
365
366 ==============
367 Version 2.30.3
368 ==============
369
370 Menu Editor
371
372 * Respect XDG_MENU_PREFIX when writing user menu file (Vincent)
373
374 Misc
375
376 * Update information in README and other files (Vincent)
377
378 Translators
379
380 * Kristjan SCHMIDT (eo)
381 * Sense Hofstede (fy)
382 * Fran Diéguez (gl)
383 * Reuben Potts (gv)
384 * Dirgita (id)
385 * Baurzhan M. (kk)
386 * Sahran (ug)
387
388 ==============
389 Version 2.30.2
390 ==============
391
392 Misc
393
394 * Do not ship gir files in the tarball (Yaakov Selkowitz)
395
396 Translators
397
398 * Daniel Martinez (an)
399 * Gil Forcada (ca)
400 * Gil Forcada (ca@valencia)
401 * Reşat SABIQ (crh)
402 * Christian Kirbach (de)
403 * Thomas Thurman (en@shaw)
404 * Fran Diéguez (gl)
405 * Shankar Prasad (kn)
406 * Peteris Krisjanis (lv)
407 * Wouter Bolsterlee (nl)
408 * Matej Urbančič (sl)
409
410 ==============
411 Version 2.30.0
412 ==============
413
414 libmenu
415
416 * Fix layout processing for Menuname nodes (Vincent)
417 * Never ignore Menuname nodes from DefaultLayout (Vincent)
418
419 Misc
420
421 * Add configure summary (Vincent)
422
423 Translators
424
425 * Gil Forcada (ca)
426 * Kostas Papadimas (el)
427 * Iñaki Larrañaga Murgoitio (eu)
428 * Changwoo Ryu (ko)
429 * Badral (mn)
430
431 ===============
432 Version 2.29.92
433 ===============
434
435 libmenu
436
437 * Add gobject-introspection support (Vincent)
438
439 Misc
440
441 * Build fix (Vincent)
442
443 Translators
444
445 * Nikos Charonitakis (el)
446 * Pavol Klačanský (sk)
447
448 ===============
449 Version 2.29.91
450 ===============
451
452 Misc
453
454 * Make some non-visible strings non-translatable (Vincent)
455 * Add translator comment (Vincent)
456
457 Translators
458
459 * Fran Diéguez (gl)
460 * Torstein Adolf Winterseth (nn)
461
462 ==============
463 Version 2.29.6
464 ==============
465
466 libmenu
467
468 * Fix miscalculation for inlining when inline_header = true (Vincent)
469 * Add real support for inline aliases during layout processing
470 (Vincent)
471 * Support inline alias of an inline alias (Vincent)
472 * Do not count non-inlining submenus as inlining with header (Vincent)
473
474 Translators
475
476 * Sadia Afroz (bn)
477 * Gil Forcada (ca)
478 * Reşat SABIQ (crh)
479 * Thomas Thurman (en@shaw)
480 * Sveinn í Felli (is)
481 * Nils-Christoph Fiedler (nds)
482 * Dmitry Yacenko (ru)
483 * Krishna Babu K (te)
484 * 甘露(Gan Lu) (zh_CN)
485
486 ================
487 Version 2.28.0.1
488 ================
489
490 libmenu
491
492 * Fix sorting of menu items during merge to actually work (and not
493 crash) (Frédéric Crozat)
494
495 Python
496
497 * Link the python module to libpython (Frédéric Crozat, Vincent)
498
499 ==============
500 Version 2.28.0
501 ==============
502
503 Translators
504
505 * Amitakhya Phukan (as)
506 * Petr Kovar (cs)
507 * Peter Bach (da)
508 * Philip Withnall (en_GB)
509 * Rajesh Ranjan (hi)
510 * Luca Ferretti (it)
511 * Shankar Prasad (kn)
512 * Gintautas Miliauskas (lt)
513 * Rajesh Ranjan (mai)
514 * Peter Ani
515 * Sandeep Shedmake (mr)
516 * Nils-Christoph Fiedler (nds)
517 * A S Alam (pa)
518 * Adi Roiban (ro)
519 * Matej Urbančič (sl)
520 * Daniel Nylander (sv)
521 * Krishna Babu K (te)
522 * Baris Cicek (tr)
523 * Maxim Dziumanenko (uk)
524 * Chao-Hsiung Liao (zh_HK)
525 * Chao-Hsiung Liao (zh_TW)
526
527 ===============
528 Version 2.27.92
529 ===============
530
531 This releases features new API that applications can use to display the full
532 name contained in .desktop files that is now in the X-GNOME-FullName key. If an
533 application chooses to use this, then it should set the sort key so that
534 .desktop files are correctly sorted.
535
536 libmenu
537
538 * Add gmenu_tree_entry_get_display_name() API (Vincent)
539 This will return X-GNOME-FullName if available, and fallback to Name.
540 * Add gmenu_tree_get_sort_key()/gmenu_tree_set_sort_key() (Vincent)
541 The default sort key is still Name. Users of
542 gmenu_tree_entry_get_display_name() should use
543 gmenu_tree_set_sort_key().
544
545 Python
546
547 * Bind new API (Vincent)
548 * Add missing bindings for gmenu_tree_entry_get_generic_name() (Vincent)
549
550 Menu Editor
551
552 * Remove deprecated Encoding key from desktop file (Frédéric Péters)
553 * Use display name instead of name (Vincent)
554
555 Translators
556
557 * Khaled Hosny (ar)
558 * Alexander Shopov (bg)
559 * Runa Bhattacharjee (bn_IN)
560 * Denis (br)
561 * Mario Blättermann (de)
562 * Iñaki Larrañaga Murgoitio (eu)
563 * Claude Paroz (fr)
564 * Seán de Búrca (ga)
565 * Anton Meixome (gl)
566 * Sweta Kothari (gu)
567 * Gabor Kelemen (hu)
568 * Francesco Marletta (it)
569 * Takayuki KUSANO (ja)
570 * Changwoo Ryu (ko)
571 * Kjartan Maraas (nb)
572 * Mario Blättermann (nds)
573 * Manoj Kumar Giri (or)
574 * Tomasz Dominikowski (pl)
575 * Duarte Loreto (pt)
576 * Krix Apolinário (pt_BR)
577 * Горан Ракић (sr)
578 * Goran Rakić (sr@latin)
579 * Dr.T.Vasudevan (ta)
580 * Theppitak Karoonboonyanan (th)
581 * 甘露 (Lu Gan) (zh_CN)
582
583 ==============
584 Version 2.27.5
585 ==============
586
587 Misc
588
589 * Use silent-rules with automake 1.11 (Vincent)
590
591 Translators
592
593 * Ilkka Tuohela (fi)
594
595 ==============
596 Version 2.27.4
597 ==============
598
599 libmenu
600
601 * Improve performance by using a cache to not compute the same thing
602 again and again (Michael Meeks, Vincent)
603 * Add API to access GenericName (Robert Staudinger)
604 * Fix DefaultLayout attributes not being inherited (Vincent)
605 * Do not always inherit parent DefaultLayout attributes (Vincent)
606 * Sort inlined items unless inline_header is used (Vincent)
607
608 Menu Editor
609
610 * Add --help and --version arguments (Vincent)
611 * Port to GtkBuilder (Pedro Fragoso, Vincent)
612
613 Misc
614
615 * Use shave to improve build log readability (Vincent)
616
617 Translators
618
619 * Jordi Mallach (ca@valencia)
620 * Huxain (dv)
621 * Jorge González (es)
622 * Mattias Põldaru (et)
623 * Seán de Búrca (ga)
624 * Yaron Shahrabani (he)
625 * Daniel Nylander (sv)
626
627 ==============
628 Version 2.26.1
629 ==============
630
631 Translators
632
633 * Khaled Hosny (ar)
634 * Daniel Nylander (sv)
635
636 ==============
637 Version 2.26.0
638 ==============
639
640 Translators
641
642 * Reşat SABIQ (crh)
643 * Suso Baleato (gl)
644 * Rajesh Ranjan (hi)
645 * Francesco Marletta (it)
646 * Manoj Kumar Giri (or)
647
648 ===============
649 Version 2.25.91
650 ===============
651
652 Translators
653
654 * Changwoo Ryu (ko)
655 * Raivis Dejus (lv)
656 * Sandeep Shedmake (mr)
657 * Горан Ракић (sr)
658 * Daniel Nylander (sv)
659 * Woodman Tuen (zh_HK)
660 * Woodman Tuen (zh_TW)
661
662 ==============
663 Version 2.25.5
664 ==============
665
666 Misc
667
668 * Use gnome-common macro to define DEPRECATED build variables (Vincent)
669
670 Translators
671
672 * Reşat SABIQ (crh)
673 * Saudat Mohammed (ha)
674 * Sylvester Onye (ig)
675 * Fajuyitan, Sunday Ayo (yo)
676
677 ==============
678 Version 2.25.2
679 ==============
680
681 Fixes
682
683 * Fix a critical warning in the python binding for monitoring a file
684 (Vincent)
685
686 Misc
687
688 * Ship a gnome-menus-ls.py script that is an example of python bindings
689 and that can be used as a replacement for gnome-menu-spec-test
690 (Vincent)
691
692 ==============
693 Version 2.24.2
694 ==============
695
696 Translators
697
698 * Mikel González (ast)
699
700 ==============
701 Version 2.24.1
702 ==============
703
704 Translators
705
706 * Khaled Hosny (ar)
707 * Rostislav "zbrox" Raykov (bg)
708 * Margulan Moldabekov (kk)
709
710 ==============
711 Version 2.24.0
712 ==============
713
714 Translators
715
716 * F Wolff (af)
717 * Khaled Hosny (ar)
718 * Roozbeh Pournader (fa)
719 * Rajesh Ranjan (hi)
720 * Gabor Kelemen (hu)
721 * Francesco Marletta (it)
722 * Shankar Prasad (kn)
723 * Leonardo Ferreira Fontenelle (pt_BR)
724 * Mișu Moldovan (ro)
725
726 ===============
727 Version 2.23.92
728 ===============
729
730 Translators
731
732 * Seán de Búrca (ga)
733 * Krešo Kunjas (hr)
734 * Praveen Arimbrathodiyil (ml)
735 * Leonardo Ferreira Fontenelle (pt_BR)
736
737 ===============
738 Version 2.23.91
739 ===============
740
741 Translators
742
743 * Khaled Hosny (ar)
744 * Reuven Gonen (he)
745 * Shankar Prasad (kn)
746
747 ==============
748 Version 2.23.6
749 ==============
750
751 Layout
752
753 * Fix the icon for the accessibility menu (Matthias Clasen)
754
755 Translators
756
757 * Khaled Hosny (ar)
758 * Fabrício Godoy (pt_BR)
759
760 ==============
761 Version 2.23.5
762 ==============
763
764 Translators
765
766 * Yannig Marchegay (Kokoyaya) (oc)
767 * Wadim Dziedzic (pl)
768 * Zabeeh Khan (ps)
769 * Laurent Dhima (sq)
770
771 ==============
772 Version 2.23.4
773 ==============
774
775 Misc
776
777 * Require intltool 0.40.0 (Vincent)
778
779 Translators
780
781 * 甘露(Lu Gan) (zh_CN)
782
783 ==============
784 Version 2.23.3
785 ==============
786
787 Features
788
789 * Implement handling of $XDG_MENU_PREFIX from the xdg menu
790 specification (Vincent)
791
792 Fixes
793
794 * Fix the values of <DefaultLayout> (ie, show_empty, inline,
795 inline_limit, etc.) not being inherited by submenus when the
796 <DefaultLayout> node is after the <Menu> node in the .menu file
797 (Vincent)
798 * Fix a bug where the fallback on the filename in <MergeFile> couldn't
799 be used (Vincent)
800
801 Translators
802
803 * Djihed Afifi (ar)
804 * Anna Ármansdóttir (is)
805 * Manoj Kumar Giri (or)
806
807 ==============
808 Version 2.23.1
809 ==============
810
811 Features
812
813 * Do not show separators at the beginning/end of a menu, or after
814 another separator, but add an option to show them (Vincent)
815
816 Fixes
817
818 * Call g_type_init() because GIO needs it and we use GIO for file
819 monitoring (Vincent)
820 * Fix a crash when a file notification is emitted with a non-ascii
821 filename (Vincent)
822 * Remove entries from the excluded set if they are included after they
823 were excluded (eg:
824 <Exclude>something</Exclude><Include>something</Include>) (Vincent)
825 * Implicitly add <Merge> nodes to <Layout> and <DefaultLayout> that are
826 missing some (Vincent)
827 * Correctly order the move operations to execute so that moving
828 something and moving it back again works as undo (Vincent)
829 * Simplify some code (William Jon McCann, Vincent)
830 * Plug leak (Vincent)
831
832 Layout
833
834 * Do not show accessibility items in the accessories submenu
835 (Josselin Mouette)
836 * Merge menus and files at the end of the layout of settings.menu
837 * Explicitly do not include gnomecc.menu in the preferences menu
838 instead of explicitly excluding it, so that alacarte doesn't know it
839 was excluded (Vincent)
840 * Rename many .directory files so they use fd.o Categories as name
841 (Vincent)
842 * Remove preferences.menu and directly include things in settings.menu
843 (Vincent)
844 * Update a few icons used in .directory files according to the icon
845 naming spec (Vincent)
846 * Remove the accessibility submenu from Preferences, since it's empty
847 now anyway (Vincent)
848
849 Misc
850
851 * Remove shebangs from non-executable Python scripts.
852
853 Translators
854
855 * Žygimantas Beručka (lt)
856 * Kjartan Maraas (nb)
857
858 ==============
859 Version 2.22.1
860 ==============
861
862 Misc
863
864 * Remove shebangs from non-executable Python scripts.
865
866 Translators
867
868 * David Lodge (en_GB)
869 * Massimo Furlani (fur)
870 * Eskild Hustvedt (nn)
871
872 ==============
873 Version 2.22.0
874 ==============
875
876 Translators
877
878 * Petr Kovar (cs)
879 * nikosCharonitakis (el)
880 * Changwoo Ryu (ko)
881 * Žygimantas Beručka (lt)
882 * Sandeep Shedmake (mr)
883 * Woodman Tuen (zh_HK)
884 * Woodman Tuen (zh_TW)
885
886 ===============
887 Version 2.21.92
888 ===============
889
890 Translators
891
892 * Massimo Furlani (fur)
893 * Sangeeta Kumari (mai)
894 * Nabin Gautam (ne)
895
896
897 ===============
898 Version 2.21.91
899 ===============
900
901 Fixes
902
903 * Remove the various monitor backends, and unconditionnaly use gio
904 (Vincent)
905
906 Misc
907
908 * Do not install gnome-menu-spec-test, it's useless for the user
909 (Vincent)
910 * Add a hard dependency on gio (Vincent)
911
912 Translators
913
914
915 * Woodman Tuen (zh_HK)
916 * Woodman Tuen (zh_TW)
917
918 ===============
919 Version 2.21.90
920 ===============
921
922 Misc
923
924 * When using gio, require version 2.15.2 (Saleem Abdulrasool)
925
926 Translators
927
928
929 * Djihed Afifi (ar)
930 * Alexander Nyakhaychyk (be)
931 * Michael Terry (io)
932
933 ==============
934 Version 2.21.5
935 ==============
936
937 Fixes
938
939 * Fix for API changes in gio (Sebastian Bacher, Wouter Bolsterlee,
940 Vincent)
941
942 Translators
943
944
945 * F Wolff (af)
946 * Iñaki Larrañaga Murgoitio (eu)
947 * Erdal Ronahi (ku)
948 * Kjartan Maraas (nn)
949 * Yannig Marchegay (Kokoyaya) (oc)
950
951 ==============
952 Version 2.21.3
953 ==============
954
955 Features
956
957 * Fix for api change in gio (Kjartan Maraas)
958 * Prevent a major memory leak (Sebastian Droge)
959
960 Translators
961
962
963 * Petr Kovar (cs)
964 * Seán de Búrca (ga)
965 * Danishka Navin (si)
966
967 ==============
968 Version 2.21.2
969 ==============
970
971 Features
972
973 * Add a new GIO-based monitor backend. It is now the preferred one.
974 The --with-monitor-backend configure flag can be used to select the
975 backend to build. (Sebastian Dröge)
976
977 Translators
978
979 * Anas Husseini (ar)
980 * Peter Bach (da)
981 * Jorge González (es)
982 * Seán de Búrca (ga)
983 * Ignacio Casal Quinteiro (gl)
984 * Huda Toriq (id)
985 * Matej Urbančič (sl)
986
987 ==============
988 Version 2.20.1
989 ==============
990
991 Translators
992
993 * Peter Bach (da)
994
995 ==============
996 Version 2.20.0
997 ==============
998
999 Translators
1000
1001 * Anas Husseini (ar)
1002 * Amitakhya Phukan (as)
1003 * Jordi Mallach (ca)
1004 * Peter Bach (da)
1005 * Simos Xenitellis (el)
1006 * Francesco Marletta (it)
1007 * Shankar Prasad (kn)
1008 * Žygimantas Beručka (lt)
1009 * Alexandru Szasz (ro)
1010 * Nickolay V. Shmyrev (ru)
1011 * Peter Tuhársky (sk)
1012 * Горан Ракић (sr)
1013 * Maxim Dziumanenko (uk)
1014
1015 ===============
1016 Version 2.19.92
1017 ===============
1018
1019 Fixes
1020
1021 * Fix potential crash (Rob Bradford)
1022
1023 Translators
1024
1025 * Rostislav "zbrox" Raykov (bg)
1026 * Stéphane Raimbault (fr)
1027 * Arangel Angov (mk)
1028 * Tomasz Dominikowski (pl)
1029 * Leonardo Ferreira Fontenelle (pt_BR)
1030 * Duarte Loreto (pt)
1031 * Funda Wang (zh_CN)
1032
1033 ===============
1034 Version 2.19.90
1035 ===============
1036
1037 Translators
1038
1039 * Ani Peter (ml)
1040 * Inaki Larranaga Murgoitio (eu)
1041 * Ankit Patel (gu)
1042 * Ilkka Tuohela (fi)
1043 * Yair Hershkovitz (he)
1044 * Sean Burke (ga)
1045
1046 ==============
1047 Version 2.19.6
1048 ==============
1049
1050 Translators
1051
1052 * Ihar Hrachyshka (be@latin)
1053 * Runa Bhattacharjee (bn_IN)
1054 * Hendrik Richter (de)
1055 * Ilkka Tuohela (fi)
1056 * Gabor Kelemen (hu)
1057 * Eunju Kim (ko)
1058 * Raivis Dejus (lv)
1059 * Wouter Bolsterlee (nl)
1060 * Bharat Kumar (te)
1061 * Nurali Abdurahmonov (uz@cyrillic)
1062
1063 ==============
1064 Version 2.19.5
1065 ==============
1066
1067 Fixes
1068
1069 * Use python-config to get python includes (Sebastien Bacher)
1070 * Don't show screensavers in the menus (Ray Strode)
1071
1072 Translators
1073
1074 * Tshewang Norbu (dz)
1075 * Takeshi AIHANA (ja)
1076 * Tomasz Dominikowski (pl)
1077 * Danishka Navin (si)
1078 * Daniel Nylander (sv)
1079 * Dr.T.Vasudevan (ta)
1080 * Bharat Kumar (te)
1081 * Nurali Abdurahmonov (uz)
1082 * Clytie Siddall (vi)
1083
1084 ==============
1085 Version 2.19.4
1086 ==============
1087
1088 Fixes
1089
1090 * Fix crashes in python bindings (Colin Walters)
1091 * Fix crash in inotify backend when ~/.config/menus is created
1092 (Vincent)
1093
1094 Translators
1095
1096 * Alexander Nyakhaychyk (be)
1097
1098 ==============
1099 Version 2.19.3
1100 ==============
1101
1102 Fixes
1103
1104 * Use G_DIR_SEPARATOR instead of '/' (Vincent)
1105 * Fix small leak (William KJon McCann)
1106
1107 Translators
1108
1109 * David Lodge (en_GB)
1110 * Jorge González (es)
1111 * Ivar Smolin (et)
1112 * Theppitak Karoonboonyanan (th)
1113
1114 ==============
1115 Version 2.19.2
1116 ==============
1117
1118 Menu Layout
1119
1120 * Fix "system-wide" typo (Vincent)
1121 * Put Preferences before Administration in the System menu (Vincent)
1122 * Use icons from the icon naming spec (Luca Ferreti, Matthias Clasen,
1123 Vincent)
1124 * Use Universal Access instead of Accessibility (Calum Benson, Vincent)
1125 * Use System instead of Desktop since the menu got renamed
1126 (Sébastien Bacher)
1127 * Do not require the Application category in the Other submenu (Vincent)
1128
1129 Menu Editor
1130
1131 * Fix a crash when unselecting the current menu (Vincent)
1132 * Require pygtk at runtime (Vincent)
1133 * Use the python executable found by configure (Vincent)
1134
1135 Misc
1136
1137 * Require automake 1.9
1138
1139 Translators
1140
1141 * Ihar Hrachyshka (be@latin)
1142 * norbu (dz)
1143 * Jorge González (es)
1144 * Iñaki Larrañaga Murgoitio (eu)
1145 * Ignacio Casal Quinteiro (gl)
1146 * Francesco Marletta (it)
1147 * Raivis Dejus (lv)
1148 * Kjartan Maraas (nb)
1149 * Yannig MARCHEGAY (Kokoyaya) (oc)
1150 * Matej Urbančič (sl)
1151 * Daniel Nylander (sv)
1152
1153 ==============
1154 Version 2.18.0
1155 ==============
1156
1157 Translators
1158
1159 * Alaksandar Navicki (be@latin)
1160 * Peter Bach (da)
1161 * Simos Xenitellis (el)
1162 * Ankit Patel (gu)
1163 * Žygimantas Beručka (lt)
1164 * wadim dziedzic (pl)
1165 * Elian Myftiu (sq)
1166 * Горан Ракић (sr)
1167
1168 ===============
1169 Version 2.17.92
1170 ===============
1171
1172 Fixes
1173
1174 * Show the system menu directories by default (as it was in 2.16)
1175 (Denis Washington)
1176
1177 Translators
1178
1179 * Peter Bach (da)
1180 * Takeshi AIHANA (ja)
1181 * Duarte Loreto (pt)
1182 * Clytie Siddall (vi)
1183 * Funda Wang (zh_CN)
1184 * Woodman Tuen (zh_HK)
1185 * Woodman Tuen (zh_TW)
1186
1187 ===============
1188 Version 2.17.91
1189 ===============
1190
1191 Features
1192
1193 * Rework the layout so that it's easy to have the old layout. The
1194 control center will ship its own menu file to have the layout for the
1195 shell. (Denis Washington)
1196
1197 Translators
1198
1199 * Khaled Hosny (ar)
1200 * Ihar Hrachyshka (be)
1201 * Alaksandar Navicki (be@latin)
1202 * Rostislav "zbrox" Raykov (bg)
1203 * Runa Bhattacharjee (bn_IN)
1204 * Mahay Alam Khan (bn)
1205 * Jordi Mallach (ca)
1206 * Jakub Friedl (cs)
1207 * Rhys Jones (cy)
1208 * Hendrik Richter (de)
1209 * David Lodge (en_GB)
1210 * Ivar Smolin (et)
1211 * Ilkka Tuohela (fi)
1212 * Robert-André Mauchin (fr)
1213 * Reuven Gonen (he)
1214 * Rajesh Ranjan (hi)
1215 * Gabor Kelemen (hu)
1216 * Young-Ho Cha (ko)
1217 * Žygimantas Beručka (lt)
1218 * Jovan Naumovski (mk)
1219 * Badral (mn)
1220 * Kjartan Maraas (nb)
1221 * Wouter Bolsterlee (nl)
1222 * Og Maciel (pt_BR)
1223 * Leonid Kanter (ru)
1224 * Steve Murphy (rw)
1225 * Daniel Nylander (sv)
1226 * Theppitak Karoonboonyanan (th)
1227 * Clytie Siddall (vi)
1228
1229 ==============
1230 Version 2.17.5
1231 ==============
1232
1233 Features
1234
1235 * New menu layout for the control center capplets (Denis Washington)
1236
1237 Translators
1238
1239 * Khaled Hosny (ar)
1240 * Ihar Hrachyshka (be)
1241
1242 ==============
1243 Version 2.17.2
1244 ==============
1245
1246 Features
1247
1248 * Flesh out inotify support (use --enable-inotify) (Mark)
1249
1250 Fixes
1251
1252 * Don't load incorrectly encoded .desktop files (Mark)
1253 * Fix compile warning (Mark)
1254
1255 Translators
1256
1257 * Khaled Hosny (ar)
1258 * Guillaume Savaton (eo)
1259
1260 ==============
1261 Version 2.16.1
1262 ==============
1263
1264 Translators
1265
1266 * David Lodge (en_GB)
1267 * Francesco Marletta (it)
1268
1269 ==============
1270 Version 2.16.0
1271 ==============
1272
1273 Translators
1274
1275 * Gabor Kelemen (hu)
1276 * Jovan Naumovski (mk)
1277 * Badral (mn)
1278 * Rahul Bhalerao (mr)
1279 * Matic Žgur (sl)
1280 * Onur Can Çakmak (tr)
1281
1282 ===============
1283 Version 2.15.91
1284 ===============
1285
1286 Translators
1287
1288 * Runa Bhattacharjee (bn_IN)
1289 * Francisco Javier F. Serrador (es)
1290 * Arangel Angov (mk)
1291 * Matic Žgur (sl)
1292
1293 ===============
1294 Version 2.15.90
1295 ===============
1296
1297 Translators
1298
1299 * Ani Peter (ml)
1300 * Subhransu Behera (or)
1301 * Theppitak Karoonboonyanan (th)
1302
1303 ================
1304 Version 2.15.4.1
1305 ================
1306
1307 Fixes
1308
1309 * Correctly update LT_VERSION (Vincent)
1310
1311 ==============
1312 Version 2.15.4
1313 ==============
1314
1315 Features
1316
1317 * Add new API to know if an application should be launched in a
1318 terminal and to know the path to the desktop file (Travis Watkins)
1319 * Complete python bindings for the "No Display" flag (Travis Watkins)
1320
1321 Menu Editor
1322
1323 * Allow specifying alternate menu files as command line arguments
1324 (William Jon McCann)
1325
1326 Misc
1327
1328 * Use po/LINGUAS (Wouter Bolsterlee)
1329 * Require intltool 0.35.0 (Vincent Untz)
1330
1331 Translators
1332
1333 * Runa Bhattacharjee (bn_IN)
1334 * Matheus Grandi (gn)
1335 * Swapnil Hajare (mr)
1336
1337 ==============
1338 Version 2.14.0
1339 ==============
1340
1341 Features
1342
1343 * Start inotify support (not compiled by default) (Mark McLoughlin)
1344
1345 Fixes
1346
1347 * Small fix for the python bindings (Mark McLoughlin)
1348 * Fix infinite loop (Mark McLoughlin)
1349
1350 Translators
1351
1352 * Ales Nyakhaychyk (be)
1353 * Jérémy Le Floc'h (br)
1354 * Petr Tomeš (cs)
1355 * Rhys Jones (cy)
1356 * Ole Laursen (da)
1357 * Hendrik Richter (de)
1358 * Pema Geyleg (dz)
1359 * Kostas Papadimas (el)
1360 * Reuven Gonen (he)
1361 * Rajesh Ranjan (hi)
1362 * Takeshi AIHANA (ja)
1363 * Vladimer Sichinava (ka)
1364 * Erdal Ronahi (ku)
1365 * Žygimantas Beručka (lt)
1366 * Raivis Dejus (lv)
1367 * Thierry Randrianiriana (mg)
1368 * Wouter Bolsterlee (nl)
1369 * Kjartan Maraas (nn)
1370 * GNOME PL Team (pl)
1371 * Evandro Fernandes Giovanini (pt_BR)
1372 * Duarte Loreto (pt)
1373 * Sebastian Ivan (ro)
1374 * Leonid Kanter (ru)
1375 * Elian Myftiu (sq)
1376 * Слободан Д. Средојевић (sr)
1377 * Maxim Dziumanenko (uk)
1378 * Funda Wang (zh_CN)
1379 * Woodman Tuen (zh_HK)
1380 * Woodman Tuen (zh_TW)
1381
1382 ==============
1383 Version 2.13.5
1384 ==============
1385
1386 Features
1387
1388 * Add "include NoDisplay" flag (Mark McLoughlin)
1389
1390 Fixes
1391
1392 * Fix issue where menu wouldn't fully reload after lots of
1393 file change events (Mark McLoughlin, Frederic Crozat)
1394 * Remove some unused code (Kjartan Maraas)
1395 * Fix incorrect escaping of C format string (The Written Word)
1396
1397 Translators
1398
1399 * Rostislav Raykov (bg)
1400 * Mahay Alam Khan (bn)
1401 * Jordi Mallach (ca)
1402 * Miloslav Trmac (cs)
1403 * Adam Weinberger (en_CA)
1404 * Francisco Javier F. Serrador (es)
1405 * Priit Laes (et)
1406 * Iñaki Larrañaga (eu)
1407 * Ilkka Tuohela (fi)
1408 * Christophe Merlet (RedFox) (fr)
1409 * Ignacio Casal Quinteiro (gl)
1410 * Ankit Patel (gu)
1411 * Gabor Kelemen (hu)
1412 * Francesco Marletta (it)
1413 * Erdal Ronahî (ku)
1414 * Timur Jamakeev (ky)
1415 * Kjartan Maraas (nb, no)
1416 * Tino Meinen (nl)
1417 * Marcel Telka (sk)
1418 * Christian Rose (sv)
1419 * Y.Kiran Chandra (te)
1420 * Theppitak Karoonboonyanan (th)
1421 * Abduxukur Abdurixit (ug)
1422 * Clytie Siddall (vi)
1423 * Woodman Tuen (zh_HK, zh_TW)
1424
1425 ==============
1426 Version 2.12.0
1427 ==============
1428
1429 Fixes
1430
1431 * Fix FAM crasher in gmenu-simple-editor (Ed Catmur)
1432
1433 Translators
1434
1435 * Rhys Jones (cy)
1436 * Vincent Untz (fr)
1437 * Ignacio Casal Quinteiro (gl)
1438 * Norayr Chilingaryan (hy)
1439 * Žygimantas Beručka (lt)
1440 * Duarte Loreto (pt)
1441 * Leonid Kanter (ru)
1442 * Elian Myftiu (sq)
1443 * Данило Шеган (sr)
1444 * Onur Can Cakmak (tr)
1445 * Clytie Siddall (vi)
1446
1447 ===============
1448 Version 2.11.92
1449 ===============
1450
1451 Fixes
1452
1453 * Fix memory corruption crasher handling notifies (Mark)
1454 * Fix python syntax warning (Mark)
1455 * Fix build when FAM isn't found (Elijah Newren)
1456 * Fix crasher when a <AppDir> references a subdir of another <AppDir> (Mark)
1457 * Fix duplicate entries after updating (Mark)
1458 * Fix infinite loop (Frederic Crozat)
1459 * Make <LegacyDir> with prefix work again (Chris Lahey, Mark)
1460
1461 Translators
1462
1463 * Rostislav "zbrox" Raykov (bg)
1464 * Jordi Mallach (ca)
1465 * Hendrik Brandt (de)
1466 * Nikos Charonitakis (el)
1467 * Roozbeh Pournader (fa)
1468 * ahmad riza h nst (id)
1469 * Takeshi AIHANA (ja)
1470 * Young-Ho Cha (ko)
1471 * GNOME PL Team (pl)
1472 * Sebastian Ivan (ro)
1473 * Maxim Dziumanenko (uk)
1474 * Clytie Siddall (vi)
1475
1476 ===============
1477 Version 2.11.91
1478 ===============
1479
1480 Fixes
1481
1482 * Install .desktop file for editor (Dennis Cranston, Mark)
1483 * Fix the window icon in the editor (Jaap A. Haitsma, Mark)
1484 * Allow running editor in different prefix from python (Mark)
1485
1486 Translators
1487
1488 * Miloslav Trmac (cs)
1489 * Hendrik Brandt (de)
1490 * Adam Weinberger (en_CA)
1491 * Francisco Javier F. Serrador (es)
1492 * Priit Laes (et)
1493 * Ilkka Tuohela (fi)
1494 * Ankit Patel (gu)
1495 * Reuven Gonen (he)
1496 * Gabor Kelemen (hu)
1497 * Takeshi AIHANA (ja)
1498 * Kjartan Maraas (nb)
1499 * Tino Meinen (nl)
1500 * Kjartan Maraas (no)
1501 * Afonso Celso Medina (pt_BR)
1502 * Marcel Telka (sk)
1503 * Theppitak Karoonboonyanan (th)
1504 * Clytie Siddall (vi)
1505 * Funda Wang (zh_CN)
1506 * Woodman Tuen (zh_TW)
1507
1508 ===============
1509 Version 2.11.90
1510 ===============
1511
1512 Fixes
1513
1514 * Fix issue with handling of filename encodings (Mark)
1515 * Only try to include ".directory" for <LegacyDir> if it exists (Mark)
1516 * Re-name the Edutainment sub-menu to Education (Mark)
1517 * Fix spec compliance issue with <Merge> tag handling (Mark)
1518 * Remove some unused code (Mark)
1519 * Plug some leaks (Mark)
1520
1521 Menu Editor
1522
1523 * HIGify menu editor (Dennis Cranston)
1524 * Make "Desktop" menu appear correctly (Mark)
1525
1526 Misc
1527
1528 * Allow building against uninstalled library (Brian Cameron)
1529
1530 Translators
1531
1532 * Ales Nyakhaychyk (be)
1533 * Rostislav "zbrox" Raykov (bg)
1534 * Miloslav Trmac (cs)
1535 * Martin Willemoes Hansen (da)
1536 * Hendrik Brandt (de)
1537 * Nikos Charonitakis (el)
1538 * Adam Weinberger (en_CA)
1539 * Francisco Javier F. Serrador (es)
1540 * Priit Laes (et)
1541 * Iñaki Larrañaga (eu)
1542 * Ilkka Tuohela (fi)
1543 * Ignacio Casal Quinteiro (gl)
1544 * Ankit Patel (gu)
1545 * Yuval Tanny (he)
1546 * Swapnil Hajare (mr)
1547 * Terance Edward Sola (nb)
1548 * Ganesh Ghimire (ne)
1549 * Tino Meinen (nl)
1550 * Terance Edward Sola (no)
1551 * Marcel Telka (sk)
1552 * Elian Myftiu (sq)
1553 * Данило Шеган (sr)
1554 * Theppitak Karoonboonyanan (th)
1555 * Onur Can Cakmak (tr)
1556 * Clytie Siddall (vi)
1557 * Funda Wang (zh_CN)
1558 * Woodman Tuen (zh_TW)
1559
1560 ================
1561 Version 2.11.1.1
1562 ================
1563
1564 Fixes
1565
1566 * Fix crasher bug in libgnome-menu triggered by editor (Mark)
1567 * Make the editor create $XDG_CONFIG_HOME/menus if it doesn't exist (Mark)
1568
1569 ==============
1570 Version 2.11.1
1571 ==============
1572
1573 Features
1574
1575 * Simple menu editor (Mark)
1576 * Python bindings (Mark)
1577 * Support for <Layout> and <DefaultLayout> (Mark, Frederic Crozat)
1578 * Use FAM directly for monitoring rather than gnome-vfs (Mark)
1579 * Add API for retaining empty sub-menus and excluded items in
1580 the GMenuTree (Mark, Christian Neumair)
1581 * Add gmenu_tree_directory_get_menu_id() API (Mark)
1582 * Add gmenu_tree_directory_get_tree() and gmenu_tree_get_menu_file()
1583 API (Mark)
1584 * Namespace the API - i.e. MenuTree -> GMenuTree (Mark)
1585
1586 Fixes
1587
1588 * Plug major memory leak when the menu is reloaded (Mark)
1589 * Fix "recursive <MergeFile> inclusion" crash (Mark)
1590 * Fix problem where you could end up with identical items in
1591 the same menu (Mark)
1592 * Fix issue where you could end up with more than one menu
1593 with the same name (Mark)
1594 * Update for changes to <Move> behaviour in spec (Mark)
1595 * Fix off-by-one errors shown up in valgrind (Mark)
1596 * Remove <LegacyDir>s from default menu (Mark)
1597
1598 Translators
1599
1600 * Vladimir "Kaladan" Petkov (bg)
1601 * Miloslav Trmac (cs)
1602 * Hendrik Brandt (de)
1603 * Adam Weinberger (en_CA)
1604 * David Lodge (en_GB)
1605 * Francisco Javier F. Serrador (es)
1606 * Priit Laes (et)
1607 * Iñaki Larrañaga (eu)
1608 * Takeshi AIHANA (ja)
1609 * Steve Murphy (rw)
1610 * Canonical Ltd (xh)
1611
1612 ==============
1613 Version 2.10.1
1614 ==============
1615
1616 Fixes
1617
1618 * Add support for new "type" argument to <MergeFile> (Mark)
1619 * Monitor <MergeDir>s for changes (Mark)
1620 * Make user desktop entries override system ones (Mark)
1621 * Make .directory files in <LegacyDir>s be pulled in (Mark)
1622 * Fix weirdess with [KDE Desktop Entry] files (Mark)
1623 * Fix <LegacyDir>s which don't contain any entries in the toplevel (Mark)
1624 * Make sure items in <LegacyDir>s as allocated (Mark)
1625 * Make <LegacyDir>s with a prefix work correctly (Mark)
1626
1627 Translators
1628
1629 * Adam Weinberger (en_CA)
1630 * Daniel van Eeden (nl)
1631
1632 ==============
1633 Version 2.10.0
1634 ==============
1635
1636 Fixes
1637
1638 * Fix 64-bit crasher (Jeremy Katz)
1639
1640 Translators
1641
1642 * Dafydd Harries (cy)
1643 * Farzaneh Sarafraz (fa)
1644 * Rajesh Ranjan (hi)
1645 * Žygimantas Beručka (lt)
1646 * Данило Шеган (sr)
1647 * Woodman Tuen (zh_TW)
1648
1649 ==============
1650 Version 2.9.92
1651 ==============
1652
1653 Fixes
1654
1655 * Fix issue with file monitoring and subdirs of <AppDir> (Mark)
1656 * Fix bug with the <Not> directive (Mark)
1657 * Make gnome-menu-spec-test work with menu-spec test framework again (Mark)
1658
1659 Translators
1660
1661 * Arafat Medini (ar)
1662 * Jordi Mallach (ca)
1663 * Martin Willemoes Hansen (da)
1664 * Nikos Charonitakis (el)
1665 * David Lodge (en_GB)
1666 * Ankit Patel (gu)
1667 * Laszlo Dvornik (hu)
1668 * ahmad riza h nst (id)
1669 * Francesco Marletta (it)
1670 * Takeshi AIHANA (ja)
1671 * Sang-Gju Kim (ko)
1672 * Rajeev Shrestha (ne)
1673 * Daniel van Eeden (nl)
1674 * GNOME PL Team (pl)
1675 * Duarte Loreto (pt)
1676 * Dan Damian (ro)
1677 * Leonid Kanter (ru)
1678 * Elian Myftiu (sq)
1679
1680 ==============
1681 Version 2.9.90
1682 ==============
1683
1684 Fixes
1685
1686 * Do not include the Core category in the Other menu (Vincent Untz)
1687
1688 Translators
1689
1690 * Vladimir "Kaladan" Petkov (bg)
1691 * Francisco Javier F. Serrador (es)
1692 * Priit Laes (et)
1693 * Tommi Vainikainen (fi)
1694 * Baptiste Mille-Mathias (fr)
1695 * Žygimantas Beručka (lt)
1696 * Kjartan Maraas (nb)
1697 * Kjartan Maraas (nn)
1698 * Raphael Higino (pt_BR)
1699 * Marcel Telka (sk)
1700 * Christian Rose (sv)
1701 * Theppitak Karoonboonyanan (th)
1702 * Maxim Dziumanenko (uk)
1703
1704 ===============
1705 Version 2.9.4.1
1706 ===============
1707
1708 Features
1709
1710 * Add menu_tree_entry_get_exec() (Richard Hult)
1711
1712 Translators
1713
1714 * Miloslav Trmac (cs)
1715 * Kjartan Maraas (nb)
1716
1717 =============
1718 Version 2.9.4
1719 =============
1720
1721 Fixes
1722
1723 * New menus layout (Vincent Untz)
1724 * Reload menus correctly when they are deleted/updated (Frederic Crozat)
1725 * Ref the return value from menu_tree_entry_get_parent() (Mark)
1726
1727 Translators
1728
1729 * Hendrik Brandt (de)
1730 * Adam Weinberger (en_CA)
1731 * Baptiste Mille-Mathias (fr)
1732 * Arangel Angov (mk)
1733
1734 =============
1735 Version 2.9.3
1736 =============
1737
1738 Fixes
1739
1740 * Find the right icon path in desktop files (Frederic Crozat)
1741 * Handle root path correctly (Mark)
1742 * Always remove file monitors (Mark)
1743 * Plug leak (Vincent Untz)
1744 * Implement behaviour defined in version 0.9 of the spec: entries that
1745 match an <Include> rule and an <Exclude> rule are marked as
1746 "allocated" (Mark)
1747
1748 Translators
1749
1750 * Vladimir "Kaladan" Petkov (bg)
1751 * David Nielsen (da)
1752 * Hendrik Brandt (de)
1753 * Simos Xenitellis (el)
1754 * Iñaki Larrañaga (eu)
1755 * Tommi Vainikainen (fi)
1756 * Gabor Kelemen (hu)
1757 * Žygimantas Beručka (lt)
1758 * Duarte Loreto (pt)
1759 * Dmitry G. Mastrukov (ru)
1760 * Marcel Telka (sk)
1761 * Данило Шеган (sr)
1762 * Christian Rose (sv)
1763 * Theppitak Karoonboonyanan (th)
1764
1765 =============
1766 Version 2.9.2
1767 =============
1768
1769 Fixes
1770
1771 * Fix a bunch of leaks (Frederic Crozat)
1772 * Fix problem where menu entries appear in random places (Mark)
1773 * Don't go into an infinite loop if $XDG_CONFIG_DIRS is set wrong (Mark)
1774 * Put the user config/data dirs before the system dirs (Mark)
1775 * Allow removing monitors from handlers (Mark)
1776
1777 Translators
1778
1779 * Miloslav Trmac (cs)
1780 * Hendrik Brandt (de)
1781 * Adam Weinberger (en_CA)
1782 * Francisco Javier F. Serrador (es)
1783 * Satoru SATOH (ja)
1784 * Hasbullah Bin Pit (ms)
1785 * Kjartan Maraas (nb)
1786 * Daniel van Eeden (nl)
1787 * Raphael Higino (pt_BR)
1788 * Funda Wang (zh_CN)
1789
0 gnome-menus
1 ===========
2
3 gnome-menus contains the libgnome-menu library, the layout configuration
4 files for the GNOME menu, as well as a simple menu editor.
5
6 The libgnome-menu library implements the "Desktop Menu Specification"
7 from freedesktop.org:
8
9 http://freedesktop.org/wiki/Specifications/menu-spec
10 http://specifications.freedesktop.org/menu-spec/menu-spec-latest.html
11
12 You may download updates to the package from:
13
14 http://download.gnome.org/sources/gnome-menus/
15
16 To discuss gnome-menus, you may use the desktop-devel-list mailing list:
17
18 http://mail.gnome.org/mailman/listinfo/desktop-devel-list
19
20
21 Installation
22 ============
23
24 See the file 'INSTALL'. If you are not using a released version of
25 gnome-menus (for example, if you checked out the code from git), you
26 first need to run './autogen.sh'.
27
28
29 How to report bugs
30 ==================
31
32 Bugs should be reported to the GNOME bug tracking system:
33
34 https://bugzilla.gnome.org/ (product gnome-menus)
35
36 You will need to create an account for yourself.
37
38 Please read the following page on how to prepare a useful bug report:
39
40 https://bugzilla.gnome.org/page.cgi?id=bug-writing.html
41
42 Please read the HACKING file for information on where to send changes or
43 bugfixes for this package.
0 # generated automatically by aclocal 1.13.3 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # gnome-common.m4
23 #
24 # serial 3
25 #
26
27 dnl GNOME_COMMON_INIT
28
29 AU_DEFUN([GNOME_COMMON_INIT],
30 [
31 dnl this macro should come after AC_CONFIG_MACRO_DIR
32 AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
33
34 dnl ensure that when the Automake generated makefile calls aclocal,
35 dnl it honours the $ACLOCAL_FLAGS environment variable
36 ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
37 if test -n "$ac_macro_dir"; then
38 ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
39 fi
40
41 AC_SUBST([ACLOCAL_AMFLAGS])
42 ],
43 [[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
44 in your top-level Makefile.am, instead, where "m4" is the macro directory set
45 with AC_CONFIG_MACRO_DIR() in your configure.ac]])
46
47 AC_DEFUN([GNOME_DEBUG_CHECK],
48 [
49 AC_ARG_ENABLE([debug],
50 AC_HELP_STRING([--enable-debug],
51 [turn on debugging]),,
52 [enable_debug=no])
53
54 if test x$enable_debug = xyes ; then
55 AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
56 [Enable additional debugging at the expense of performance and size])
57 fi
58 ])
59
60 dnl GNOME_MAINTAINER_MODE_DEFINES ()
61 dnl define DISABLE_DEPRECATED
62 dnl
63 AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
64 [
65 AC_REQUIRE([AM_MAINTAINER_MODE])
66
67 DISABLE_DEPRECATED=""
68 if test $USE_MAINTAINER_MODE = yes; then
69 DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
70 for DOMAIN in $DOMAINS; do
71 DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
72 done
73 fi
74
75 AC_SUBST(DISABLE_DEPRECATED)
76 ])
77
78 dnl GNOME_COMPILE_WARNINGS
79 dnl Turn on many useful compiler warnings and substitute the result into
80 dnl WARN_CFLAGS
81 dnl For now, only works on GCC
82 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
83 dnl ******************************
84 dnl More compiler warnings
85 dnl ******************************
86
87 AC_ARG_ENABLE(compile-warnings,
88 AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
89 [Turn on compiler warnings]),,
90 [enable_compile_warnings="m4_default([$1],[yes])"])
91
92 if test "x$GCC" != xyes; then
93 enable_compile_warnings=no
94 fi
95
96 warning_flags=
97 realsave_CFLAGS="$CFLAGS"
98
99 dnl These are warning flags that aren't marked as fatal. Can be
100 dnl overridden on a per-project basis with -Wno-foo.
101 base_warn_flags=" \
102 -Wall \
103 -Wstrict-prototypes \
104 -Wnested-externs \
105 "
106
107 dnl These compiler flags typically indicate very broken or suspicious
108 dnl code. Some of them such as implicit-function-declaration are
109 dnl just not default because gcc compiles a lot of legacy code.
110 dnl We choose to make this set into explicit errors.
111 base_error_flags=" \
112 -Werror=missing-prototypes \
113 -Werror=implicit-function-declaration \
114 -Werror=pointer-arith \
115 -Werror=init-self \
116 -Werror=format-security \
117 -Werror=format=2 \
118 -Werror=missing-include-dirs \
119 "
120
121 case "$enable_compile_warnings" in
122 no)
123 warning_flags=
124 ;;
125 minimum)
126 warning_flags="-Wall"
127 ;;
128 yes)
129 warning_flags="$base_warn_flags $base_error_flags"
130 ;;
131 maximum|error)
132 warning_flags="$base_warn_flags $base_error_flags"
133 ;;
134 *)
135 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
136 ;;
137 esac
138
139 if test "$enable_compile_warnings" = "error" ; then
140 warning_flags="$warning_flags -Werror"
141 fi
142
143 dnl Check whether GCC supports the warning options
144 for option in $warning_flags; do
145 save_CFLAGS="$CFLAGS"
146 CFLAGS="$CFLAGS $option"
147 AC_MSG_CHECKING([whether gcc understands $option])
148 AC_TRY_COMPILE([], [],
149 has_option=yes,
150 has_option=no,)
151 CFLAGS="$save_CFLAGS"
152 AC_MSG_RESULT([$has_option])
153 if test $has_option = yes; then
154 tested_warning_flags="$tested_warning_flags $option"
155 fi
156 unset has_option
157 unset save_CFLAGS
158 done
159 unset option
160 CFLAGS="$realsave_CFLAGS"
161 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
162 AC_MSG_RESULT($tested_warning_flags)
163
164 AC_ARG_ENABLE(iso-c,
165 AC_HELP_STRING([--enable-iso-c],
166 [Try to warn if code is not ISO C ]),,
167 [enable_iso_c=no])
168
169 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
170 complCFLAGS=
171 if test "x$enable_iso_c" != "xno"; then
172 if test "x$GCC" = "xyes"; then
173 case " $CFLAGS " in
174 *[\ \ ]-ansi[\ \ ]*) ;;
175 *) complCFLAGS="$complCFLAGS -ansi" ;;
176 esac
177 case " $CFLAGS " in
178 *[\ \ ]-pedantic[\ \ ]*) ;;
179 *) complCFLAGS="$complCFLAGS -pedantic" ;;
180 esac
181 fi
182 fi
183 AC_MSG_RESULT($complCFLAGS)
184
185 WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
186 AC_SUBST(WARN_CFLAGS)
187 ])
188
189 dnl For C++, do basically the same thing.
190
191 AC_DEFUN([GNOME_CXX_WARNINGS],[
192 AC_ARG_ENABLE(cxx-warnings,
193 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
194 [Turn on compiler warnings.]),,
195 [enable_cxx_warnings="m4_default([$1],[minimum])"])
196
197 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
198 warnCXXFLAGS=
199 if test "x$GXX" != xyes; then
200 enable_cxx_warnings=no
201 fi
202 if test "x$enable_cxx_warnings" != "xno"; then
203 if test "x$GXX" = "xyes"; then
204 case " $CXXFLAGS " in
205 *[\ \ ]-Wall[\ \ ]*) ;;
206 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
207 esac
208
209 ## -W is not all that useful. And it cannot be controlled
210 ## with individual -Wno-xxx flags, unlike -Wall
211 if test "x$enable_cxx_warnings" = "xyes"; then
212 warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
213 fi
214 fi
215 fi
216 AC_MSG_RESULT($warnCXXFLAGS)
217
218 AC_ARG_ENABLE(iso-cxx,
219 AC_HELP_STRING([--enable-iso-cxx],
220 [Try to warn if code is not ISO C++ ]),,
221 [enable_iso_cxx=no])
222
223 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
224 complCXXFLAGS=
225 if test "x$enable_iso_cxx" != "xno"; then
226 if test "x$GXX" = "xyes"; then
227 case " $CXXFLAGS " in
228 *[\ \ ]-ansi[\ \ ]*) ;;
229 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
230 esac
231
232 case " $CXXFLAGS " in
233 *[\ \ ]-pedantic[\ \ ]*) ;;
234 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
235 esac
236 fi
237 fi
238 AC_MSG_RESULT($complCXXFLAGS)
239
240 WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
241 AC_SUBST(WARN_CXXFLAGS)
242 ])
243
244 dnl -*- mode: autoconf -*-
245 dnl Copyright 2009 Johan Dahlin
246 dnl
247 dnl This file is free software; the author(s) gives unlimited
248 dnl permission to copy and/or distribute it, with or without
249 dnl modifications, as long as this notice is preserved.
250 dnl
251
252 # serial 1
253
254 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
255 [
256 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
257 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
258 AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
259
260 dnl enable/disable introspection
261 m4_if([$2], [require],
262 [dnl
263 enable_introspection=yes
264 ],[dnl
265 AC_ARG_ENABLE(introspection,
266 AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
267 [Enable introspection for this build]),,
268 [enable_introspection=auto])
269 ])dnl
270
271 AC_MSG_CHECKING([for gobject-introspection])
272
273 dnl presence/version checking
274 AS_CASE([$enable_introspection],
275 [no], [dnl
276 found_introspection="no (disabled, use --enable-introspection to enable)"
277 ],dnl
278 [yes],[dnl
279 PKG_CHECK_EXISTS([gobject-introspection-1.0],,
280 AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
281 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
282 found_introspection=yes,
283 AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
284 ],dnl
285 [auto],[dnl
286 PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
287 dnl Canonicalize enable_introspection
288 enable_introspection=$found_introspection
289 ],dnl
290 [dnl
291 AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
292 ])dnl
293
294 AC_MSG_RESULT([$found_introspection])
295
296 INTROSPECTION_SCANNER=
297 INTROSPECTION_COMPILER=
298 INTROSPECTION_GENERATE=
299 INTROSPECTION_GIRDIR=
300 INTROSPECTION_TYPELIBDIR=
301 if test "x$found_introspection" = "xyes"; then
302 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
303 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
304 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
305 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
306 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
307 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
308 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
309 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
310 fi
311 AC_SUBST(INTROSPECTION_SCANNER)
312 AC_SUBST(INTROSPECTION_COMPILER)
313 AC_SUBST(INTROSPECTION_GENERATE)
314 AC_SUBST(INTROSPECTION_GIRDIR)
315 AC_SUBST(INTROSPECTION_TYPELIBDIR)
316 AC_SUBST(INTROSPECTION_CFLAGS)
317 AC_SUBST(INTROSPECTION_LIBS)
318 AC_SUBST(INTROSPECTION_MAKEFILE)
319
320 AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
321 ])
322
323
324 dnl Usage:
325 dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
326
327 AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
328 [
329 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
330 ])
331
332 dnl Usage:
333 dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
334
335
336 AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
337 [
338 _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
339 ])
340
341 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
342 # serial 1 (pkg-config-0.24)
343 #
344 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
345 #
346 # This program is free software; you can redistribute it and/or modify
347 # it under the terms of the GNU General Public License as published by
348 # the Free Software Foundation; either version 2 of the License, or
349 # (at your option) any later version.
350 #
351 # This program is distributed in the hope that it will be useful, but
352 # WITHOUT ANY WARRANTY; without even the implied warranty of
353 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
354 # General Public License for more details.
355 #
356 # You should have received a copy of the GNU General Public License
357 # along with this program; if not, write to the Free Software
358 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
359 #
360 # As a special exception to the GNU General Public License, if you
361 # distribute this file as part of a program that contains a
362 # configuration script generated by Autoconf, you may include it under
363 # the same distribution terms that you use for the rest of that program.
364
365 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
366 # ----------------------------------
367 AC_DEFUN([PKG_PROG_PKG_CONFIG],
368 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
369 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
370 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
371 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
372 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
373 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
374
375 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
376 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
377 fi
378 if test -n "$PKG_CONFIG"; then
379 _pkg_min_version=m4_default([$1], [0.9.0])
380 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
381 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
382 AC_MSG_RESULT([yes])
383 else
384 AC_MSG_RESULT([no])
385 PKG_CONFIG=""
386 fi
387 fi[]dnl
388 ])# PKG_PROG_PKG_CONFIG
389
390 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
391 #
392 # Check to see whether a particular set of modules exists. Similar
393 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
394 #
395 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
396 # only at the first occurence in configure.ac, so if the first place
397 # it's called might be skipped (such as if it is within an "if", you
398 # have to call PKG_CHECK_EXISTS manually
399 # --------------------------------------------------------------
400 AC_DEFUN([PKG_CHECK_EXISTS],
401 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
402 if test -n "$PKG_CONFIG" && \
403 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
404 m4_default([$2], [:])
405 m4_ifvaln([$3], [else
406 $3])dnl
407 fi])
408
409 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
410 # ---------------------------------------------
411 m4_define([_PKG_CONFIG],
412 [if test -n "$$1"; then
413 pkg_cv_[]$1="$$1"
414 elif test -n "$PKG_CONFIG"; then
415 PKG_CHECK_EXISTS([$3],
416 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
417 test "x$?" != "x0" && pkg_failed=yes ],
418 [pkg_failed=yes])
419 else
420 pkg_failed=untried
421 fi[]dnl
422 ])# _PKG_CONFIG
423
424 # _PKG_SHORT_ERRORS_SUPPORTED
425 # -----------------------------
426 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
427 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
428 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
429 _pkg_short_errors_supported=yes
430 else
431 _pkg_short_errors_supported=no
432 fi[]dnl
433 ])# _PKG_SHORT_ERRORS_SUPPORTED
434
435
436 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
437 # [ACTION-IF-NOT-FOUND])
438 #
439 #
440 # Note that if there is a possibility the first call to
441 # PKG_CHECK_MODULES might not happen, you should be sure to include an
442 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
443 #
444 #
445 # --------------------------------------------------------------
446 AC_DEFUN([PKG_CHECK_MODULES],
447 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
448 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
449 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
450
451 pkg_failed=no
452 AC_MSG_CHECKING([for $1])
453
454 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
455 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
456
457 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
458 and $1[]_LIBS to avoid the need to call pkg-config.
459 See the pkg-config man page for more details.])
460
461 if test $pkg_failed = yes; then
462 AC_MSG_RESULT([no])
463 _PKG_SHORT_ERRORS_SUPPORTED
464 if test $_pkg_short_errors_supported = yes; then
465 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
466 else
467 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
468 fi
469 # Put the nasty error message in config.log where it belongs
470 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
471
472 m4_default([$4], [AC_MSG_ERROR(
473 [Package requirements ($2) were not met:
474
475 $$1_PKG_ERRORS
476
477 Consider adjusting the PKG_CONFIG_PATH environment variable if you
478 installed software in a non-standard prefix.
479
480 _PKG_TEXT])[]dnl
481 ])
482 elif test $pkg_failed = untried; then
483 AC_MSG_RESULT([no])
484 m4_default([$4], [AC_MSG_FAILURE(
485 [The pkg-config script could not be found or is too old. Make sure it
486 is in your PATH or set the PKG_CONFIG environment variable to the full
487 path to pkg-config.
488
489 _PKG_TEXT
490
491 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
492 ])
493 else
494 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
495 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
496 AC_MSG_RESULT([yes])
497 $3
498 fi[]dnl
499 ])# PKG_CHECK_MODULES
500
501 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
502 #
503 # This file is free software; the Free Software Foundation
504 # gives unlimited permission to copy and/or distribute it,
505 # with or without modifications, as long as this notice is preserved.
506
507 # AM_AUTOMAKE_VERSION(VERSION)
508 # ----------------------------
509 # Automake X.Y traces this macro to ensure aclocal.m4 has been
510 # generated from the m4 files accompanying Automake X.Y.
511 # (This private macro should not be called outside this file.)
512 AC_DEFUN([AM_AUTOMAKE_VERSION],
513 [am__api_version='1.13'
514 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
515 dnl require some minimum version. Point them to the right macro.
516 m4_if([$1], [1.13.3], [],
517 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
518 ])
519
520 # _AM_AUTOCONF_VERSION(VERSION)
521 # -----------------------------
522 # aclocal traces this macro to find the Autoconf version.
523 # This is a private macro too. Using m4_define simplifies
524 # the logic in aclocal, which can simply ignore this definition.
525 m4_define([_AM_AUTOCONF_VERSION], [])
526
527 # AM_SET_CURRENT_AUTOMAKE_VERSION
528 # -------------------------------
529 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
530 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
531 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
532 [AM_AUTOMAKE_VERSION([1.13.3])dnl
533 m4_ifndef([AC_AUTOCONF_VERSION],
534 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
535 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
536
537 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
538
539 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
540 #
541 # This file is free software; the Free Software Foundation
542 # gives unlimited permission to copy and/or distribute it,
543 # with or without modifications, as long as this notice is preserved.
544
545 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
546 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
547 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
548 #
549 # Of course, Automake must honor this variable whenever it calls a
550 # tool from the auxiliary directory. The problem is that $srcdir (and
551 # therefore $ac_aux_dir as well) can be either absolute or relative,
552 # depending on how configure is run. This is pretty annoying, since
553 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
554 # source directory, any form will work fine, but in subdirectories a
555 # relative path needs to be adjusted first.
556 #
557 # $ac_aux_dir/missing
558 # fails when called from a subdirectory if $ac_aux_dir is relative
559 # $top_srcdir/$ac_aux_dir/missing
560 # fails if $ac_aux_dir is absolute,
561 # fails when called from a subdirectory in a VPATH build with
562 # a relative $ac_aux_dir
563 #
564 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
565 # are both prefixed by $srcdir. In an in-source build this is usually
566 # harmless because $srcdir is '.', but things will broke when you
567 # start a VPATH build or use an absolute $srcdir.
568 #
569 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
570 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
571 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
572 # and then we would define $MISSING as
573 # MISSING="\${SHELL} $am_aux_dir/missing"
574 # This will work as long as MISSING is not called from configure, because
575 # unfortunately $(top_srcdir) has no meaning in configure.
576 # However there are other variables, like CC, which are often used in
577 # configure, and could therefore not use this "fixed" $ac_aux_dir.
578 #
579 # Another solution, used here, is to always expand $ac_aux_dir to an
580 # absolute PATH. The drawback is that using absolute paths prevent a
581 # configured tree to be moved without reconfiguration.
582
583 AC_DEFUN([AM_AUX_DIR_EXPAND],
584 [dnl Rely on autoconf to set up CDPATH properly.
585 AC_PREREQ([2.50])dnl
586 # expand $ac_aux_dir to an absolute path
587 am_aux_dir=`cd $ac_aux_dir && pwd`
588 ])
589
590 # AM_CONDITIONAL -*- Autoconf -*-
591
592 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
593 #
594 # This file is free software; the Free Software Foundation
595 # gives unlimited permission to copy and/or distribute it,
596 # with or without modifications, as long as this notice is preserved.
597
598 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
599 # -------------------------------------
600 # Define a conditional.
601 AC_DEFUN([AM_CONDITIONAL],
602 [AC_PREREQ([2.52])dnl
603 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
604 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
605 AC_SUBST([$1_TRUE])dnl
606 AC_SUBST([$1_FALSE])dnl
607 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
608 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
609 m4_define([_AM_COND_VALUE_$1], [$2])dnl
610 if $2; then
611 $1_TRUE=
612 $1_FALSE='#'
613 else
614 $1_TRUE='#'
615 $1_FALSE=
616 fi
617 AC_CONFIG_COMMANDS_PRE(
618 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
619 AC_MSG_ERROR([[conditional "$1" was never defined.
620 Usually this means the macro was only invoked conditionally.]])
621 fi])])
622
623 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
624 #
625 # This file is free software; the Free Software Foundation
626 # gives unlimited permission to copy and/or distribute it,
627 # with or without modifications, as long as this notice is preserved.
628
629
630 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
631 # written in clear, in which case automake, when reading aclocal.m4,
632 # will think it sees a *use*, and therefore will trigger all it's
633 # C support machinery. Also note that it means that autoscan, seeing
634 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
635
636
637 # _AM_DEPENDENCIES(NAME)
638 # ----------------------
639 # See how the compiler implements dependency checking.
640 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
641 # We try a few techniques and use that to set a single cache variable.
642 #
643 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
644 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
645 # dependency, and given that the user is not expected to run this macro,
646 # just rely on AC_PROG_CC.
647 AC_DEFUN([_AM_DEPENDENCIES],
648 [AC_REQUIRE([AM_SET_DEPDIR])dnl
649 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
650 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
651 AC_REQUIRE([AM_DEP_TRACK])dnl
652
653 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
654 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
655 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
656 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
657 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
658 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
659 [depcc="$$1" am_compiler_list=])
660
661 AC_CACHE_CHECK([dependency style of $depcc],
662 [am_cv_$1_dependencies_compiler_type],
663 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
664 # We make a subdir and do the tests there. Otherwise we can end up
665 # making bogus files that we don't know about and never remove. For
666 # instance it was reported that on HP-UX the gcc test will end up
667 # making a dummy file named 'D' -- because '-MD' means "put the output
668 # in D".
669 rm -rf conftest.dir
670 mkdir conftest.dir
671 # Copy depcomp to subdir because otherwise we won't find it if we're
672 # using a relative directory.
673 cp "$am_depcomp" conftest.dir
674 cd conftest.dir
675 # We will build objects and dependencies in a subdirectory because
676 # it helps to detect inapplicable dependency modes. For instance
677 # both Tru64's cc and ICC support -MD to output dependencies as a
678 # side effect of compilation, but ICC will put the dependencies in
679 # the current directory while Tru64 will put them in the object
680 # directory.
681 mkdir sub
682
683 am_cv_$1_dependencies_compiler_type=none
684 if test "$am_compiler_list" = ""; then
685 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
686 fi
687 am__universal=false
688 m4_case([$1], [CC],
689 [case " $depcc " in #(
690 *\ -arch\ *\ -arch\ *) am__universal=true ;;
691 esac],
692 [CXX],
693 [case " $depcc " in #(
694 *\ -arch\ *\ -arch\ *) am__universal=true ;;
695 esac])
696
697 for depmode in $am_compiler_list; do
698 # Setup a source with many dependencies, because some compilers
699 # like to wrap large dependency lists on column 80 (with \), and
700 # we should not choose a depcomp mode which is confused by this.
701 #
702 # We need to recreate these files for each test, as the compiler may
703 # overwrite some of them when testing with obscure command lines.
704 # This happens at least with the AIX C compiler.
705 : > sub/conftest.c
706 for i in 1 2 3 4 5 6; do
707 echo '#include "conftst'$i'.h"' >> sub/conftest.c
708 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
709 # Solaris 10 /bin/sh.
710 echo '/* dummy */' > sub/conftst$i.h
711 done
712 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
713
714 # We check with '-c' and '-o' for the sake of the "dashmstdout"
715 # mode. It turns out that the SunPro C++ compiler does not properly
716 # handle '-M -o', and we need to detect this. Also, some Intel
717 # versions had trouble with output in subdirs.
718 am__obj=sub/conftest.${OBJEXT-o}
719 am__minus_obj="-o $am__obj"
720 case $depmode in
721 gcc)
722 # This depmode causes a compiler race in universal mode.
723 test "$am__universal" = false || continue
724 ;;
725 nosideeffect)
726 # After this tag, mechanisms are not by side-effect, so they'll
727 # only be used when explicitly requested.
728 if test "x$enable_dependency_tracking" = xyes; then
729 continue
730 else
731 break
732 fi
733 ;;
734 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
735 # This compiler won't grok '-c -o', but also, the minuso test has
736 # not run yet. These depmodes are late enough in the game, and
737 # so weak that their functioning should not be impacted.
738 am__obj=conftest.${OBJEXT-o}
739 am__minus_obj=
740 ;;
741 none) break ;;
742 esac
743 if depmode=$depmode \
744 source=sub/conftest.c object=$am__obj \
745 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
746 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
747 >/dev/null 2>conftest.err &&
748 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
749 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
750 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
751 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
752 # icc doesn't choke on unknown options, it will just issue warnings
753 # or remarks (even with -Werror). So we grep stderr for any message
754 # that says an option was ignored or not supported.
755 # When given -MP, icc 7.0 and 7.1 complain thusly:
756 # icc: Command line warning: ignoring option '-M'; no argument required
757 # The diagnosis changed in icc 8.0:
758 # icc: Command line remark: option '-MP' not supported
759 if (grep 'ignoring option' conftest.err ||
760 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
761 am_cv_$1_dependencies_compiler_type=$depmode
762 break
763 fi
764 fi
765 done
766
767 cd ..
768 rm -rf conftest.dir
769 else
770 am_cv_$1_dependencies_compiler_type=none
771 fi
772 ])
773 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
774 AM_CONDITIONAL([am__fastdep$1], [
775 test "x$enable_dependency_tracking" != xno \
776 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
777 ])
778
779
780 # AM_SET_DEPDIR
781 # -------------
782 # Choose a directory name for dependency files.
783 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
784 AC_DEFUN([AM_SET_DEPDIR],
785 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
786 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
787 ])
788
789
790 # AM_DEP_TRACK
791 # ------------
792 AC_DEFUN([AM_DEP_TRACK],
793 [AC_ARG_ENABLE([dependency-tracking], [dnl
794 AS_HELP_STRING(
795 [--enable-dependency-tracking],
796 [do not reject slow dependency extractors])
797 AS_HELP_STRING(
798 [--disable-dependency-tracking],
799 [speeds up one-time build])])
800 if test "x$enable_dependency_tracking" != xno; then
801 am_depcomp="$ac_aux_dir/depcomp"
802 AMDEPBACKSLASH='\'
803 am__nodep='_no'
804 fi
805 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
806 AC_SUBST([AMDEPBACKSLASH])dnl
807 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
808 AC_SUBST([am__nodep])dnl
809 _AM_SUBST_NOTMAKE([am__nodep])dnl
810 ])
811
812 # Generate code to set up dependency tracking. -*- Autoconf -*-
813
814 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
815 #
816 # This file is free software; the Free Software Foundation
817 # gives unlimited permission to copy and/or distribute it,
818 # with or without modifications, as long as this notice is preserved.
819
820
821 # _AM_OUTPUT_DEPENDENCY_COMMANDS
822 # ------------------------------
823 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
824 [{
825 # Older Autoconf quotes --file arguments for eval, but not when files
826 # are listed without --file. Let's play safe and only enable the eval
827 # if we detect the quoting.
828 case $CONFIG_FILES in
829 *\'*) eval set x "$CONFIG_FILES" ;;
830 *) set x $CONFIG_FILES ;;
831 esac
832 shift
833 for mf
834 do
835 # Strip MF so we end up with the name of the file.
836 mf=`echo "$mf" | sed -e 's/:.*$//'`
837 # Check whether this is an Automake generated Makefile or not.
838 # We used to match only the files named 'Makefile.in', but
839 # some people rename them; so instead we look at the file content.
840 # Grep'ing the first line is not enough: some people post-process
841 # each Makefile.in and add a new line on top of each file to say so.
842 # Grep'ing the whole file is not good either: AIX grep has a line
843 # limit of 2048, but all sed's we know have understand at least 4000.
844 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
845 dirpart=`AS_DIRNAME("$mf")`
846 else
847 continue
848 fi
849 # Extract the definition of DEPDIR, am__include, and am__quote
850 # from the Makefile without running 'make'.
851 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
852 test -z "$DEPDIR" && continue
853 am__include=`sed -n 's/^am__include = //p' < "$mf"`
854 test -z "$am__include" && continue
855 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
856 # Find all dependency output files, they are included files with
857 # $(DEPDIR) in their names. We invoke sed twice because it is the
858 # simplest approach to changing $(DEPDIR) to its actual value in the
859 # expansion.
860 for file in `sed -n "
861 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
862 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
863 # Make sure the directory exists.
864 test -f "$dirpart/$file" && continue
865 fdir=`AS_DIRNAME(["$file"])`
866 AS_MKDIR_P([$dirpart/$fdir])
867 # echo "creating $dirpart/$file"
868 echo '# dummy' > "$dirpart/$file"
869 done
870 done
871 }
872 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
873
874
875 # AM_OUTPUT_DEPENDENCY_COMMANDS
876 # -----------------------------
877 # This macro should only be invoked once -- use via AC_REQUIRE.
878 #
879 # This code is only required when automatic dependency tracking
880 # is enabled. FIXME. This creates each '.P' file that we will
881 # need in order to bootstrap the dependency handling code.
882 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
883 [AC_CONFIG_COMMANDS([depfiles],
884 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
885 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
886 ])
887
888 # Do all the work for Automake. -*- Autoconf -*-
889
890 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
891 #
892 # This file is free software; the Free Software Foundation
893 # gives unlimited permission to copy and/or distribute it,
894 # with or without modifications, as long as this notice is preserved.
895
896 # This macro actually does too much. Some checks are only needed if
897 # your package does certain things. But this isn't really a big deal.
898
899 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
900 # AM_INIT_AUTOMAKE([OPTIONS])
901 # -----------------------------------------------
902 # The call with PACKAGE and VERSION arguments is the old style
903 # call (pre autoconf-2.50), which is being phased out. PACKAGE
904 # and VERSION should now be passed to AC_INIT and removed from
905 # the call to AM_INIT_AUTOMAKE.
906 # We support both call styles for the transition. After
907 # the next Automake release, Autoconf can make the AC_INIT
908 # arguments mandatory, and then we can depend on a new Autoconf
909 # release and drop the old call support.
910 AC_DEFUN([AM_INIT_AUTOMAKE],
911 [AC_PREREQ([2.65])dnl
912 dnl Autoconf wants to disallow AM_ names. We explicitly allow
913 dnl the ones we care about.
914 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
915 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
916 AC_REQUIRE([AC_PROG_INSTALL])dnl
917 if test "`cd $srcdir && pwd`" != "`pwd`"; then
918 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
919 # is not polluted with repeated "-I."
920 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
921 # test to see if srcdir already configured
922 if test -f $srcdir/config.status; then
923 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
924 fi
925 fi
926
927 # test whether we have cygpath
928 if test -z "$CYGPATH_W"; then
929 if (cygpath --version) >/dev/null 2>/dev/null; then
930 CYGPATH_W='cygpath -w'
931 else
932 CYGPATH_W=echo
933 fi
934 fi
935 AC_SUBST([CYGPATH_W])
936
937 # Define the identity of the package.
938 dnl Distinguish between old-style and new-style calls.
939 m4_ifval([$2],
940 [AC_DIAGNOSE([obsolete],
941 [$0: two- and three-arguments forms are deprecated.])
942 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
943 AC_SUBST([PACKAGE], [$1])dnl
944 AC_SUBST([VERSION], [$2])],
945 [_AM_SET_OPTIONS([$1])dnl
946 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
947 m4_if(
948 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
949 [ok:ok],,
950 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
951 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
952 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
953
954 _AM_IF_OPTION([no-define],,
955 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
956 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
957
958 # Some tools Automake needs.
959 AC_REQUIRE([AM_SANITY_CHECK])dnl
960 AC_REQUIRE([AC_ARG_PROGRAM])dnl
961 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
962 AM_MISSING_PROG([AUTOCONF], [autoconf])
963 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
964 AM_MISSING_PROG([AUTOHEADER], [autoheader])
965 AM_MISSING_PROG([MAKEINFO], [makeinfo])
966 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
967 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
968 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
969 # For better backward compatibility. To be removed once Automake 1.9.x
970 # dies out for good. For more background, see:
971 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
972 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
973 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
974 # We need awk for the "check" target. The system "awk" is bad on
975 # some platforms.
976 AC_REQUIRE([AC_PROG_AWK])dnl
977 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
978 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
979 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
980 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
981 [_AM_PROG_TAR([v7])])])
982 _AM_IF_OPTION([no-dependencies],,
983 [AC_PROVIDE_IFELSE([AC_PROG_CC],
984 [_AM_DEPENDENCIES([CC])],
985 [m4_define([AC_PROG_CC],
986 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
987 AC_PROVIDE_IFELSE([AC_PROG_CXX],
988 [_AM_DEPENDENCIES([CXX])],
989 [m4_define([AC_PROG_CXX],
990 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
991 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
992 [_AM_DEPENDENCIES([OBJC])],
993 [m4_define([AC_PROG_OBJC],
994 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
995 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
996 [_AM_DEPENDENCIES([OBJCXX])],
997 [m4_define([AC_PROG_OBJCXX],
998 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
999 ])
1000 AC_REQUIRE([AM_SILENT_RULES])dnl
1001 dnl The testsuite driver may need to know about EXEEXT, so add the
1002 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
1003 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
1004 AC_CONFIG_COMMANDS_PRE(dnl
1005 [m4_provide_if([_AM_COMPILER_EXEEXT],
1006 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1007 ])
1008
1009 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1010 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1011 dnl mangled by Autoconf and run in a shell conditional statement.
1012 m4_define([_AC_COMPILER_EXEEXT],
1013 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1014
1015
1016 # When config.status generates a header, we must update the stamp-h file.
1017 # This file resides in the same directory as the config header
1018 # that is generated. The stamp files are numbered to have different names.
1019
1020 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1021 # loop where config.status creates the headers, so we can generate
1022 # our stamp files there.
1023 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1024 [# Compute $1's index in $config_headers.
1025 _am_arg=$1
1026 _am_stamp_count=1
1027 for _am_header in $config_headers :; do
1028 case $_am_header in
1029 $_am_arg | $_am_arg:* )
1030 break ;;
1031 * )
1032 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1033 esac
1034 done
1035 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1036
1037 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1038 #
1039 # This file is free software; the Free Software Foundation
1040 # gives unlimited permission to copy and/or distribute it,
1041 # with or without modifications, as long as this notice is preserved.
1042
1043 # AM_PROG_INSTALL_SH
1044 # ------------------
1045 # Define $install_sh.
1046 AC_DEFUN([AM_PROG_INSTALL_SH],
1047 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1048 if test x"${install_sh}" != xset; then
1049 case $am_aux_dir in
1050 *\ * | *\ *)
1051 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1052 *)
1053 install_sh="\${SHELL} $am_aux_dir/install-sh"
1054 esac
1055 fi
1056 AC_SUBST([install_sh])])
1057
1058 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
1059 #
1060 # This file is free software; the Free Software Foundation
1061 # gives unlimited permission to copy and/or distribute it,
1062 # with or without modifications, as long as this notice is preserved.
1063
1064 # Check whether the underlying file-system supports filenames
1065 # with a leading dot. For instance MS-DOS doesn't.
1066 AC_DEFUN([AM_SET_LEADING_DOT],
1067 [rm -rf .tst 2>/dev/null
1068 mkdir .tst 2>/dev/null
1069 if test -d .tst; then
1070 am__leading_dot=.
1071 else
1072 am__leading_dot=_
1073 fi
1074 rmdir .tst 2>/dev/null
1075 AC_SUBST([am__leading_dot])])
1076
1077 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1078 # From Jim Meyering
1079
1080 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1081 #
1082 # This file is free software; the Free Software Foundation
1083 # gives unlimited permission to copy and/or distribute it,
1084 # with or without modifications, as long as this notice is preserved.
1085
1086 # AM_MAINTAINER_MODE([DEFAULT-MODE])
1087 # ----------------------------------
1088 # Control maintainer-specific portions of Makefiles.
1089 # Default is to disable them, unless 'enable' is passed literally.
1090 # For symmetry, 'disable' may be passed as well. Anyway, the user
1091 # can override the default with the --enable/--disable switch.
1092 AC_DEFUN([AM_MAINTAINER_MODE],
1093 [m4_case(m4_default([$1], [disable]),
1094 [enable], [m4_define([am_maintainer_other], [disable])],
1095 [disable], [m4_define([am_maintainer_other], [enable])],
1096 [m4_define([am_maintainer_other], [enable])
1097 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1098 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1099 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1100 AC_ARG_ENABLE([maintainer-mode],
1101 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
1102 am_maintainer_other[ make rules and dependencies not useful
1103 (and sometimes confusing) to the casual installer])],
1104 [USE_MAINTAINER_MODE=$enableval],
1105 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1106 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1107 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1108 MAINT=$MAINTAINER_MODE_TRUE
1109 AC_SUBST([MAINT])dnl
1110 ]
1111 )
1112
1113 # Check to see how 'make' treats includes. -*- Autoconf -*-
1114
1115 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1116 #
1117 # This file is free software; the Free Software Foundation
1118 # gives unlimited permission to copy and/or distribute it,
1119 # with or without modifications, as long as this notice is preserved.
1120
1121 # AM_MAKE_INCLUDE()
1122 # -----------------
1123 # Check to see how make treats includes.
1124 AC_DEFUN([AM_MAKE_INCLUDE],
1125 [am_make=${MAKE-make}
1126 cat > confinc << 'END'
1127 am__doit:
1128 @echo this is the am__doit target
1129 .PHONY: am__doit
1130 END
1131 # If we don't find an include directive, just comment out the code.
1132 AC_MSG_CHECKING([for style of include used by $am_make])
1133 am__include="#"
1134 am__quote=
1135 _am_result=none
1136 # First try GNU make style include.
1137 echo "include confinc" > confmf
1138 # Ignore all kinds of additional output from 'make'.
1139 case `$am_make -s -f confmf 2> /dev/null` in #(
1140 *the\ am__doit\ target*)
1141 am__include=include
1142 am__quote=
1143 _am_result=GNU
1144 ;;
1145 esac
1146 # Now try BSD make style include.
1147 if test "$am__include" = "#"; then
1148 echo '.include "confinc"' > confmf
1149 case `$am_make -s -f confmf 2> /dev/null` in #(
1150 *the\ am__doit\ target*)
1151 am__include=.include
1152 am__quote="\""
1153 _am_result=BSD
1154 ;;
1155 esac
1156 fi
1157 AC_SUBST([am__include])
1158 AC_SUBST([am__quote])
1159 AC_MSG_RESULT([$_am_result])
1160 rm -f confinc confmf
1161 ])
1162
1163 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1164
1165 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
1166 #
1167 # This file is free software; the Free Software Foundation
1168 # gives unlimited permission to copy and/or distribute it,
1169 # with or without modifications, as long as this notice is preserved.
1170
1171 # AM_MISSING_PROG(NAME, PROGRAM)
1172 # ------------------------------
1173 AC_DEFUN([AM_MISSING_PROG],
1174 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1175 $1=${$1-"${am_missing_run}$2"}
1176 AC_SUBST($1)])
1177
1178 # AM_MISSING_HAS_RUN
1179 # ------------------
1180 # Define MISSING if not defined so far and test if it is modern enough.
1181 # If it is, set am_missing_run to use it, otherwise, to nothing.
1182 AC_DEFUN([AM_MISSING_HAS_RUN],
1183 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1184 AC_REQUIRE_AUX_FILE([missing])dnl
1185 if test x"${MISSING+set}" != xset; then
1186 case $am_aux_dir in
1187 *\ * | *\ *)
1188 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1189 *)
1190 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1191 esac
1192 fi
1193 # Use eval to expand $SHELL
1194 if eval "$MISSING --is-lightweight"; then
1195 am_missing_run="$MISSING "
1196 else
1197 am_missing_run=
1198 AC_MSG_WARN(['missing' script is too old or missing])
1199 fi
1200 ])
1201
1202 # Helper functions for option handling. -*- Autoconf -*-
1203
1204 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1205 #
1206 # This file is free software; the Free Software Foundation
1207 # gives unlimited permission to copy and/or distribute it,
1208 # with or without modifications, as long as this notice is preserved.
1209
1210 # _AM_MANGLE_OPTION(NAME)
1211 # -----------------------
1212 AC_DEFUN([_AM_MANGLE_OPTION],
1213 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1214
1215 # _AM_SET_OPTION(NAME)
1216 # --------------------
1217 # Set option NAME. Presently that only means defining a flag for this option.
1218 AC_DEFUN([_AM_SET_OPTION],
1219 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1220
1221 # _AM_SET_OPTIONS(OPTIONS)
1222 # ------------------------
1223 # OPTIONS is a space-separated list of Automake options.
1224 AC_DEFUN([_AM_SET_OPTIONS],
1225 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1226
1227 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1228 # -------------------------------------------
1229 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1230 AC_DEFUN([_AM_IF_OPTION],
1231 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1232
1233 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1234
1235 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1236 #
1237 # This file is free software; the Free Software Foundation
1238 # gives unlimited permission to copy and/or distribute it,
1239 # with or without modifications, as long as this notice is preserved.
1240
1241 # AM_SANITY_CHECK
1242 # ---------------
1243 AC_DEFUN([AM_SANITY_CHECK],
1244 [AC_MSG_CHECKING([whether build environment is sane])
1245 # Reject unsafe characters in $srcdir or the absolute working directory
1246 # name. Accept space and tab only in the latter.
1247 am_lf='
1248 '
1249 case `pwd` in
1250 *[[\\\"\#\$\&\'\`$am_lf]]*)
1251 AC_MSG_ERROR([unsafe absolute working directory name]);;
1252 esac
1253 case $srcdir in
1254 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1255 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1256 esac
1257
1258 # Do 'set' in a subshell so we don't clobber the current shell's
1259 # arguments. Must try -L first in case configure is actually a
1260 # symlink; some systems play weird games with the mod time of symlinks
1261 # (eg FreeBSD returns the mod time of the symlink's containing
1262 # directory).
1263 if (
1264 am_has_slept=no
1265 for am_try in 1 2; do
1266 echo "timestamp, slept: $am_has_slept" > conftest.file
1267 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1268 if test "$[*]" = "X"; then
1269 # -L didn't work.
1270 set X `ls -t "$srcdir/configure" conftest.file`
1271 fi
1272 if test "$[*]" != "X $srcdir/configure conftest.file" \
1273 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1274
1275 # If neither matched, then we have a broken ls. This can happen
1276 # if, for instance, CONFIG_SHELL is bash and it inherits a
1277 # broken ls alias from the environment. This has actually
1278 # happened. Such a system could not be considered "sane".
1279 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1280 alias in your environment])
1281 fi
1282 if test "$[2]" = conftest.file || test $am_try -eq 2; then
1283 break
1284 fi
1285 # Just in case.
1286 sleep 1
1287 am_has_slept=yes
1288 done
1289 test "$[2]" = conftest.file
1290 )
1291 then
1292 # Ok.
1293 :
1294 else
1295 AC_MSG_ERROR([newly created file is older than distributed files!
1296 Check your system clock])
1297 fi
1298 AC_MSG_RESULT([yes])
1299 # If we didn't sleep, we still need to ensure time stamps of config.status and
1300 # generated files are strictly newer.
1301 am_sleep_pid=
1302 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1303 ( sleep 1 ) &
1304 am_sleep_pid=$!
1305 fi
1306 AC_CONFIG_COMMANDS_PRE(
1307 [AC_MSG_CHECKING([that generated files are newer than configure])
1308 if test -n "$am_sleep_pid"; then
1309 # Hide warnings about reused PIDs.
1310 wait $am_sleep_pid 2>/dev/null
1311 fi
1312 AC_MSG_RESULT([done])])
1313 rm -f conftest.file
1314 ])
1315
1316 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1317 #
1318 # This file is free software; the Free Software Foundation
1319 # gives unlimited permission to copy and/or distribute it,
1320 # with or without modifications, as long as this notice is preserved.
1321
1322 # AM_SILENT_RULES([DEFAULT])
1323 # --------------------------
1324 # Enable less verbose build rules; with the default set to DEFAULT
1325 # ("yes" being less verbose, "no" or empty being verbose).
1326 AC_DEFUN([AM_SILENT_RULES],
1327 [AC_ARG_ENABLE([silent-rules], [dnl
1328 AS_HELP_STRING(
1329 [--enable-silent-rules],
1330 [less verbose build output (undo: "make V=1")])
1331 AS_HELP_STRING(
1332 [--disable-silent-rules],
1333 [verbose build output (undo: "make V=0")])dnl
1334 ])
1335 case $enable_silent_rules in @%:@ (((
1336 yes) AM_DEFAULT_VERBOSITY=0;;
1337 no) AM_DEFAULT_VERBOSITY=1;;
1338 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1339 esac
1340 dnl
1341 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1342 dnl do not support nested variable expansions.
1343 dnl See automake bug#9928 and bug#10237.
1344 am_make=${MAKE-make}
1345 AC_CACHE_CHECK([whether $am_make supports nested variables],
1346 [am_cv_make_support_nested_variables],
1347 [if AS_ECHO([['TRUE=$(BAR$(V))
1348 BAR0=false
1349 BAR1=true
1350 V=1
1351 am__doit:
1352 @$(TRUE)
1353 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1354 am_cv_make_support_nested_variables=yes
1355 else
1356 am_cv_make_support_nested_variables=no
1357 fi])
1358 if test $am_cv_make_support_nested_variables = yes; then
1359 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1360 AM_V='$(V)'
1361 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1362 else
1363 AM_V=$AM_DEFAULT_VERBOSITY
1364 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1365 fi
1366 AC_SUBST([AM_V])dnl
1367 AM_SUBST_NOTMAKE([AM_V])dnl
1368 AC_SUBST([AM_DEFAULT_V])dnl
1369 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1370 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1371 AM_BACKSLASH='\'
1372 AC_SUBST([AM_BACKSLASH])dnl
1373 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1374 ])
1375
1376 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1377 #
1378 # This file is free software; the Free Software Foundation
1379 # gives unlimited permission to copy and/or distribute it,
1380 # with or without modifications, as long as this notice is preserved.
1381
1382 # AM_PROG_INSTALL_STRIP
1383 # ---------------------
1384 # One issue with vendor 'install' (even GNU) is that you can't
1385 # specify the program used to strip binaries. This is especially
1386 # annoying in cross-compiling environments, where the build's strip
1387 # is unlikely to handle the host's binaries.
1388 # Fortunately install-sh will honor a STRIPPROG variable, so we
1389 # always use install-sh in "make install-strip", and initialize
1390 # STRIPPROG with the value of the STRIP variable (set by the user).
1391 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1392 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1393 # Installed binaries are usually stripped using 'strip' when the user
1394 # run "make install-strip". However 'strip' might not be the right
1395 # tool to use in cross-compilation environments, therefore Automake
1396 # will honor the 'STRIP' environment variable to overrule this program.
1397 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1398 if test "$cross_compiling" != no; then
1399 AC_CHECK_TOOL([STRIP], [strip], :)
1400 fi
1401 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1402 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1403
1404 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1405 #
1406 # This file is free software; the Free Software Foundation
1407 # gives unlimited permission to copy and/or distribute it,
1408 # with or without modifications, as long as this notice is preserved.
1409
1410 # _AM_SUBST_NOTMAKE(VARIABLE)
1411 # ---------------------------
1412 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1413 # This macro is traced by Automake.
1414 AC_DEFUN([_AM_SUBST_NOTMAKE])
1415
1416 # AM_SUBST_NOTMAKE(VARIABLE)
1417 # --------------------------
1418 # Public sister of _AM_SUBST_NOTMAKE.
1419 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1420
1421 # Check how to create a tarball. -*- Autoconf -*-
1422
1423 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1424 #
1425 # This file is free software; the Free Software Foundation
1426 # gives unlimited permission to copy and/or distribute it,
1427 # with or without modifications, as long as this notice is preserved.
1428
1429 # _AM_PROG_TAR(FORMAT)
1430 # --------------------
1431 # Check how to create a tarball in format FORMAT.
1432 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1433 #
1434 # Substitute a variable $(am__tar) that is a command
1435 # writing to stdout a FORMAT-tarball containing the directory
1436 # $tardir.
1437 # tardir=directory && $(am__tar) > result.tar
1438 #
1439 # Substitute a variable $(am__untar) that extract such
1440 # a tarball read from stdin.
1441 # $(am__untar) < result.tar
1442 #
1443 AC_DEFUN([_AM_PROG_TAR],
1444 [# Always define AMTAR for backward compatibility. Yes, it's still used
1445 # in the wild :-( We should find a proper way to deprecate it ...
1446 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1447
1448 # We'll loop over all known methods to create a tar archive until one works.
1449 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1450
1451 m4_if([$1], [v7],
1452 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1453
1454 [m4_case([$1],
1455 [ustar],
1456 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1457 # There is notably a 21 bits limit for the UID and the GID. In fact,
1458 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1459 # and bug#13588).
1460 am_max_uid=2097151 # 2^21 - 1
1461 am_max_gid=$am_max_uid
1462 # The $UID and $GID variables are not portable, so we need to resort
1463 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1464 # below are definitely unexpected, so allow the users to see them
1465 # (that is, avoid stderr redirection).
1466 am_uid=`id -u || echo unknown`
1467 am_gid=`id -g || echo unknown`
1468 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1469 if test $am_uid -le $am_max_uid; then
1470 AC_MSG_RESULT([yes])
1471 else
1472 AC_MSG_RESULT([no])
1473 _am_tools=none
1474 fi
1475 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1476 if test $am_gid -le $am_max_gid; then
1477 AC_MSG_RESULT([yes])
1478 else
1479 AC_MSG_RESULT([no])
1480 _am_tools=none
1481 fi],
1482
1483 [pax],
1484 [],
1485
1486 [m4_fatal([Unknown tar format])])
1487
1488 AC_MSG_CHECKING([how to create a $1 tar archive])
1489
1490 # Go ahead even if we have the value already cached. We do so because we
1491 # need to set the values for the 'am__tar' and 'am__untar' variables.
1492 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1493
1494 for _am_tool in $_am_tools; do
1495 case $_am_tool in
1496 gnutar)
1497 for _am_tar in tar gnutar gtar; do
1498 AM_RUN_LOG([$_am_tar --version]) && break
1499 done
1500 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1501 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1502 am__untar="$_am_tar -xf -"
1503 ;;
1504 plaintar)
1505 # Must skip GNU tar: if it does not support --format= it doesn't create
1506 # ustar tarball either.
1507 (tar --version) >/dev/null 2>&1 && continue
1508 am__tar='tar chf - "$$tardir"'
1509 am__tar_='tar chf - "$tardir"'
1510 am__untar='tar xf -'
1511 ;;
1512 pax)
1513 am__tar='pax -L -x $1 -w "$$tardir"'
1514 am__tar_='pax -L -x $1 -w "$tardir"'
1515 am__untar='pax -r'
1516 ;;
1517 cpio)
1518 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1519 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1520 am__untar='cpio -i -H $1 -d'
1521 ;;
1522 none)
1523 am__tar=false
1524 am__tar_=false
1525 am__untar=false
1526 ;;
1527 esac
1528
1529 # If the value was cached, stop now. We just wanted to have am__tar
1530 # and am__untar set.
1531 test -n "${am_cv_prog_tar_$1}" && break
1532
1533 # tar/untar a dummy directory, and stop if the command works.
1534 rm -rf conftest.dir
1535 mkdir conftest.dir
1536 echo GrepMe > conftest.dir/file
1537 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1538 rm -rf conftest.dir
1539 if test -s conftest.tar; then
1540 AM_RUN_LOG([$am__untar <conftest.tar])
1541 AM_RUN_LOG([cat conftest.dir/file])
1542 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1543 fi
1544 done
1545 rm -rf conftest.dir
1546
1547 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1548 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1549
1550 AC_SUBST([am__tar])
1551 AC_SUBST([am__untar])
1552 ]) # _AM_PROG_TAR
1553
1554 m4_include([m4/libtool.m4])
1555 m4_include([m4/ltoptions.m4])
1556 m4_include([m4/ltsugar.m4])
1557 m4_include([m4/ltversion.m4])
1558 m4_include([m4/lt~obsolete.m4])
0 #!/bin/bash
1 # Run this to generate all the initial makefiles, etc.
2
3 srcdir=`dirname $0`
4 test -z "$srcdir" && srcdir=.
5
6 PKG_NAME="cinnamon-menus"
7 REQUIRED_AUTOMAKE_VERSION=1.10
8
9 which gnome-autogen.sh || {
10 echo "You need to install gnome-common from GNOME Subversion (or from"
11 echo "your distribution's package manager)."
12 exit 1
13 }
14 USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-06-10'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 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, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # 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, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25 #
26 # Originally written by Per Bothner.
27 #
28 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
30 #
31 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
32
33
34 me=`echo "$0" | sed -e 's,.*/,,'`
35
36 usage="\
37 Usage: $0 [OPTION]
38
39 Output the configuration name of the system \`$me' is run on.
40
41 Operation modes:
42 -h, --help print this help, then exit
43 -t, --time-stamp print date of last modification, then exit
44 -v, --version print version number, then exit
45
46 Report bugs and patches to <config-patches@gnu.org>."
47
48 version="\
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52 Copyright 1992-2013 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 trap 'exit 1' 1 2 15
87
88 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89 # compiler to aid in system detection is discouraged as it requires
90 # temporary files to be created and, as you can see below, it is a
91 # headache to deal with in a portable fashion.
92
93 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
94 # use `HOST_CC' if defined, but it is deprecated.
95
96 # Portable tmp directory creation inspired by the Autoconf team.
97
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
122
123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
126 PATH=$PATH:/.attbin ; export PATH
127 fi
128
129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "${UNAME_SYSTEM}" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
152 ;;
153 esac
154
155 # Note: order is significant - the case branches are not exclusive.
156
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
158 *:NetBSD:*:*)
159 # NetBSD (nbsd) targets should (where applicable) match one or
160 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
161 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
162 # switched to ELF, *-*-netbsd* would select the old
163 # object file format. This provides both forward
164 # compatibility and a consistent mechanism for selecting the
165 # object file format.
166 #
167 # Note: NetBSD doesn't particularly care about the vendor
168 # portion of the name. We always set it to "unknown".
169 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
171 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
172 case "${UNAME_MACHINE_ARCH}" in
173 armeb) machine=armeb-unknown ;;
174 arm*) machine=arm-unknown ;;
175 sh3el) machine=shl-unknown ;;
176 sh3eb) machine=sh-unknown ;;
177 sh5el) machine=sh5le-unknown ;;
178 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
179 esac
180 # The Operating System including object format, if it has switched
181 # to ELF recently, or will in the future.
182 case "${UNAME_MACHINE_ARCH}" in
183 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
184 eval $set_cc_for_build
185 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
186 | grep -q __ELF__
187 then
188 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
189 # Return netbsd for either. FIX?
190 os=netbsd
191 else
192 os=netbsdelf
193 fi
194 ;;
195 *)
196 os=netbsd
197 ;;
198 esac
199 # The OS release
200 # Debian GNU/NetBSD machines have a different userland, and
201 # thus, need a distinct triplet. However, they do not need
202 # kernel version information, so it can be replaced with a
203 # suitable tag, in the style of linux-gnu.
204 case "${UNAME_VERSION}" in
205 Debian*)
206 release='-gnu'
207 ;;
208 *)
209 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
210 ;;
211 esac
212 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
213 # contains redundant information, the shorter form:
214 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
215 echo "${machine}-${os}${release}"
216 exit ;;
217 *:Bitrig:*:*)
218 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
219 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
220 exit ;;
221 *:OpenBSD:*:*)
222 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
223 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
224 exit ;;
225 *:ekkoBSD:*:*)
226 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
227 exit ;;
228 *:SolidBSD:*:*)
229 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
230 exit ;;
231 macppc:MirBSD:*:*)
232 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
233 exit ;;
234 *:MirBSD:*:*)
235 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
236 exit ;;
237 alpha:OSF1:*:*)
238 case $UNAME_RELEASE in
239 *4.0)
240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
241 ;;
242 *5.*)
243 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
244 ;;
245 esac
246 # According to Compaq, /usr/sbin/psrinfo has been available on
247 # OSF/1 and Tru64 systems produced since 1995. I hope that
248 # covers most systems running today. This code pipes the CPU
249 # types through head -n 1, so we only detect the type of CPU 0.
250 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
251 case "$ALPHA_CPU_TYPE" in
252 "EV4 (21064)")
253 UNAME_MACHINE="alpha" ;;
254 "EV4.5 (21064)")
255 UNAME_MACHINE="alpha" ;;
256 "LCA4 (21066/21068)")
257 UNAME_MACHINE="alpha" ;;
258 "EV5 (21164)")
259 UNAME_MACHINE="alphaev5" ;;
260 "EV5.6 (21164A)")
261 UNAME_MACHINE="alphaev56" ;;
262 "EV5.6 (21164PC)")
263 UNAME_MACHINE="alphapca56" ;;
264 "EV5.7 (21164PC)")
265 UNAME_MACHINE="alphapca57" ;;
266 "EV6 (21264)")
267 UNAME_MACHINE="alphaev6" ;;
268 "EV6.7 (21264A)")
269 UNAME_MACHINE="alphaev67" ;;
270 "EV6.8CB (21264C)")
271 UNAME_MACHINE="alphaev68" ;;
272 "EV6.8AL (21264B)")
273 UNAME_MACHINE="alphaev68" ;;
274 "EV6.8CX (21264D)")
275 UNAME_MACHINE="alphaev68" ;;
276 "EV6.9A (21264/EV69A)")
277 UNAME_MACHINE="alphaev69" ;;
278 "EV7 (21364)")
279 UNAME_MACHINE="alphaev7" ;;
280 "EV7.9 (21364A)")
281 UNAME_MACHINE="alphaev79" ;;
282 esac
283 # A Pn.n version is a patched version.
284 # A Vn.n version is a released version.
285 # A Tn.n version is a released field test version.
286 # A Xn.n version is an unreleased experimental baselevel.
287 # 1.2 uses "1.2" for uname -r.
288 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
289 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
290 exitcode=$?
291 trap '' 0
292 exit $exitcode ;;
293 Alpha\ *:Windows_NT*:*)
294 # How do we know it's Interix rather than the generic POSIX subsystem?
295 # Should we change UNAME_MACHINE based on the output of uname instead
296 # of the specific Alpha model?
297 echo alpha-pc-interix
298 exit ;;
299 21064:Windows_NT:50:3)
300 echo alpha-dec-winnt3.5
301 exit ;;
302 Amiga*:UNIX_System_V:4.0:*)
303 echo m68k-unknown-sysv4
304 exit ;;
305 *:[Aa]miga[Oo][Ss]:*:*)
306 echo ${UNAME_MACHINE}-unknown-amigaos
307 exit ;;
308 *:[Mm]orph[Oo][Ss]:*:*)
309 echo ${UNAME_MACHINE}-unknown-morphos
310 exit ;;
311 *:OS/390:*:*)
312 echo i370-ibm-openedition
313 exit ;;
314 *:z/VM:*:*)
315 echo s390-ibm-zvmoe
316 exit ;;
317 *:OS400:*:*)
318 echo powerpc-ibm-os400
319 exit ;;
320 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
321 echo arm-acorn-riscix${UNAME_RELEASE}
322 exit ;;
323 arm*:riscos:*:*|arm*:RISCOS:*:*)
324 echo arm-unknown-riscos
325 exit ;;
326 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
327 echo hppa1.1-hitachi-hiuxmpp
328 exit ;;
329 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
330 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
331 if test "`(/bin/universe) 2>/dev/null`" = att ; then
332 echo pyramid-pyramid-sysv3
333 else
334 echo pyramid-pyramid-bsd
335 fi
336 exit ;;
337 NILE*:*:*:dcosx)
338 echo pyramid-pyramid-svr4
339 exit ;;
340 DRS?6000:unix:4.0:6*)
341 echo sparc-icl-nx6
342 exit ;;
343 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
344 case `/usr/bin/uname -p` in
345 sparc) echo sparc-icl-nx7; exit ;;
346 esac ;;
347 s390x:SunOS:*:*)
348 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
349 exit ;;
350 sun4H:SunOS:5.*:*)
351 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
352 exit ;;
353 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
354 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
356 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
357 echo i386-pc-auroraux${UNAME_RELEASE}
358 exit ;;
359 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
360 eval $set_cc_for_build
361 SUN_ARCH="i386"
362 # If there is a compiler, see if it is configured for 64-bit objects.
363 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
364 # This test works for both compilers.
365 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
366 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
367 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
368 grep IS_64BIT_ARCH >/dev/null
369 then
370 SUN_ARCH="x86_64"
371 fi
372 fi
373 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
374 exit ;;
375 sun4*:SunOS:6*:*)
376 # According to config.sub, this is the proper way to canonicalize
377 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
378 # it's likely to be more like Solaris than SunOS4.
379 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
380 exit ;;
381 sun4*:SunOS:*:*)
382 case "`/usr/bin/arch -k`" in
383 Series*|S4*)
384 UNAME_RELEASE=`uname -v`
385 ;;
386 esac
387 # Japanese Language versions have a version number like `4.1.3-JL'.
388 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
389 exit ;;
390 sun3*:SunOS:*:*)
391 echo m68k-sun-sunos${UNAME_RELEASE}
392 exit ;;
393 sun*:*:4.2BSD:*)
394 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
395 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
396 case "`/bin/arch`" in
397 sun3)
398 echo m68k-sun-sunos${UNAME_RELEASE}
399 ;;
400 sun4)
401 echo sparc-sun-sunos${UNAME_RELEASE}
402 ;;
403 esac
404 exit ;;
405 aushp:SunOS:*:*)
406 echo sparc-auspex-sunos${UNAME_RELEASE}
407 exit ;;
408 # The situation for MiNT is a little confusing. The machine name
409 # can be virtually everything (everything which is not
410 # "atarist" or "atariste" at least should have a processor
411 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
412 # to the lowercase version "mint" (or "freemint"). Finally
413 # the system name "TOS" denotes a system which is actually not
414 # MiNT. But MiNT is downward compatible to TOS, so this should
415 # be no problem.
416 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
417 echo m68k-atari-mint${UNAME_RELEASE}
418 exit ;;
419 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
420 echo m68k-atari-mint${UNAME_RELEASE}
421 exit ;;
422 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
423 echo m68k-atari-mint${UNAME_RELEASE}
424 exit ;;
425 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
426 echo m68k-milan-mint${UNAME_RELEASE}
427 exit ;;
428 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
429 echo m68k-hades-mint${UNAME_RELEASE}
430 exit ;;
431 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
432 echo m68k-unknown-mint${UNAME_RELEASE}
433 exit ;;
434 m68k:machten:*:*)
435 echo m68k-apple-machten${UNAME_RELEASE}
436 exit ;;
437 powerpc:machten:*:*)
438 echo powerpc-apple-machten${UNAME_RELEASE}
439 exit ;;
440 RISC*:Mach:*:*)
441 echo mips-dec-mach_bsd4.3
442 exit ;;
443 RISC*:ULTRIX:*:*)
444 echo mips-dec-ultrix${UNAME_RELEASE}
445 exit ;;
446 VAX*:ULTRIX*:*:*)
447 echo vax-dec-ultrix${UNAME_RELEASE}
448 exit ;;
449 2020:CLIX:*:* | 2430:CLIX:*:*)
450 echo clipper-intergraph-clix${UNAME_RELEASE}
451 exit ;;
452 mips:*:*:UMIPS | mips:*:*:RISCos)
453 eval $set_cc_for_build
454 sed 's/^ //' << EOF >$dummy.c
455 #ifdef __cplusplus
456 #include <stdio.h> /* for printf() prototype */
457 int main (int argc, char *argv[]) {
458 #else
459 int main (argc, argv) int argc; char *argv[]; {
460 #endif
461 #if defined (host_mips) && defined (MIPSEB)
462 #if defined (SYSTYPE_SYSV)
463 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
464 #endif
465 #if defined (SYSTYPE_SVR4)
466 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
467 #endif
468 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
469 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
470 #endif
471 #endif
472 exit (-1);
473 }
474 EOF
475 $CC_FOR_BUILD -o $dummy $dummy.c &&
476 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
477 SYSTEM_NAME=`$dummy $dummyarg` &&
478 { echo "$SYSTEM_NAME"; exit; }
479 echo mips-mips-riscos${UNAME_RELEASE}
480 exit ;;
481 Motorola:PowerMAX_OS:*:*)
482 echo powerpc-motorola-powermax
483 exit ;;
484 Motorola:*:4.3:PL8-*)
485 echo powerpc-harris-powermax
486 exit ;;
487 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
488 echo powerpc-harris-powermax
489 exit ;;
490 Night_Hawk:Power_UNIX:*:*)
491 echo powerpc-harris-powerunix
492 exit ;;
493 m88k:CX/UX:7*:*)
494 echo m88k-harris-cxux7
495 exit ;;
496 m88k:*:4*:R4*)
497 echo m88k-motorola-sysv4
498 exit ;;
499 m88k:*:3*:R3*)
500 echo m88k-motorola-sysv3
501 exit ;;
502 AViiON:dgux:*:*)
503 # DG/UX returns AViiON for all architectures
504 UNAME_PROCESSOR=`/usr/bin/uname -p`
505 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
506 then
507 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
508 [ ${TARGET_BINARY_INTERFACE}x = x ]
509 then
510 echo m88k-dg-dgux${UNAME_RELEASE}
511 else
512 echo m88k-dg-dguxbcs${UNAME_RELEASE}
513 fi
514 else
515 echo i586-dg-dgux${UNAME_RELEASE}
516 fi
517 exit ;;
518 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
519 echo m88k-dolphin-sysv3
520 exit ;;
521 M88*:*:R3*:*)
522 # Delta 88k system running SVR3
523 echo m88k-motorola-sysv3
524 exit ;;
525 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
526 echo m88k-tektronix-sysv3
527 exit ;;
528 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
529 echo m68k-tektronix-bsd
530 exit ;;
531 *:IRIX*:*:*)
532 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
533 exit ;;
534 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
535 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
536 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
537 i*86:AIX:*:*)
538 echo i386-ibm-aix
539 exit ;;
540 ia64:AIX:*:*)
541 if [ -x /usr/bin/oslevel ] ; then
542 IBM_REV=`/usr/bin/oslevel`
543 else
544 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545 fi
546 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
547 exit ;;
548 *:AIX:2:3)
549 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
550 eval $set_cc_for_build
551 sed 's/^ //' << EOF >$dummy.c
552 #include <sys/systemcfg.h>
553
554 main()
555 {
556 if (!__power_pc())
557 exit(1);
558 puts("powerpc-ibm-aix3.2.5");
559 exit(0);
560 }
561 EOF
562 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
563 then
564 echo "$SYSTEM_NAME"
565 else
566 echo rs6000-ibm-aix3.2.5
567 fi
568 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
569 echo rs6000-ibm-aix3.2.4
570 else
571 echo rs6000-ibm-aix3.2
572 fi
573 exit ;;
574 *:AIX:*:[4567])
575 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
576 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
577 IBM_ARCH=rs6000
578 else
579 IBM_ARCH=powerpc
580 fi
581 if [ -x /usr/bin/oslevel ] ; then
582 IBM_REV=`/usr/bin/oslevel`
583 else
584 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
585 fi
586 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
587 exit ;;
588 *:AIX:*:*)
589 echo rs6000-ibm-aix
590 exit ;;
591 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
592 echo romp-ibm-bsd4.4
593 exit ;;
594 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
595 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
596 exit ;; # report: romp-ibm BSD 4.3
597 *:BOSX:*:*)
598 echo rs6000-bull-bosx
599 exit ;;
600 DPX/2?00:B.O.S.:*:*)
601 echo m68k-bull-sysv3
602 exit ;;
603 9000/[34]??:4.3bsd:1.*:*)
604 echo m68k-hp-bsd
605 exit ;;
606 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
607 echo m68k-hp-bsd4.4
608 exit ;;
609 9000/[34678]??:HP-UX:*:*)
610 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
611 case "${UNAME_MACHINE}" in
612 9000/31? ) HP_ARCH=m68000 ;;
613 9000/[34]?? ) HP_ARCH=m68k ;;
614 9000/[678][0-9][0-9])
615 if [ -x /usr/bin/getconf ]; then
616 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
617 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
618 case "${sc_cpu_version}" in
619 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
620 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
621 532) # CPU_PA_RISC2_0
622 case "${sc_kernel_bits}" in
623 32) HP_ARCH="hppa2.0n" ;;
624 64) HP_ARCH="hppa2.0w" ;;
625 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
626 esac ;;
627 esac
628 fi
629 if [ "${HP_ARCH}" = "" ]; then
630 eval $set_cc_for_build
631 sed 's/^ //' << EOF >$dummy.c
632
633 #define _HPUX_SOURCE
634 #include <stdlib.h>
635 #include <unistd.h>
636
637 int main ()
638 {
639 #if defined(_SC_KERNEL_BITS)
640 long bits = sysconf(_SC_KERNEL_BITS);
641 #endif
642 long cpu = sysconf (_SC_CPU_VERSION);
643
644 switch (cpu)
645 {
646 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
647 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
648 case CPU_PA_RISC2_0:
649 #if defined(_SC_KERNEL_BITS)
650 switch (bits)
651 {
652 case 64: puts ("hppa2.0w"); break;
653 case 32: puts ("hppa2.0n"); break;
654 default: puts ("hppa2.0"); break;
655 } break;
656 #else /* !defined(_SC_KERNEL_BITS) */
657 puts ("hppa2.0"); break;
658 #endif
659 default: puts ("hppa1.0"); break;
660 }
661 exit (0);
662 }
663 EOF
664 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
665 test -z "$HP_ARCH" && HP_ARCH=hppa
666 fi ;;
667 esac
668 if [ ${HP_ARCH} = "hppa2.0w" ]
669 then
670 eval $set_cc_for_build
671
672 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
673 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
674 # generating 64-bit code. GNU and HP use different nomenclature:
675 #
676 # $ CC_FOR_BUILD=cc ./config.guess
677 # => hppa2.0w-hp-hpux11.23
678 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
679 # => hppa64-hp-hpux11.23
680
681 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
682 grep -q __LP64__
683 then
684 HP_ARCH="hppa2.0w"
685 else
686 HP_ARCH="hppa64"
687 fi
688 fi
689 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
690 exit ;;
691 ia64:HP-UX:*:*)
692 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
693 echo ia64-hp-hpux${HPUX_REV}
694 exit ;;
695 3050*:HI-UX:*:*)
696 eval $set_cc_for_build
697 sed 's/^ //' << EOF >$dummy.c
698 #include <unistd.h>
699 int
700 main ()
701 {
702 long cpu = sysconf (_SC_CPU_VERSION);
703 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
704 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
705 results, however. */
706 if (CPU_IS_PA_RISC (cpu))
707 {
708 switch (cpu)
709 {
710 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
711 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
712 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
713 default: puts ("hppa-hitachi-hiuxwe2"); break;
714 }
715 }
716 else if (CPU_IS_HP_MC68K (cpu))
717 puts ("m68k-hitachi-hiuxwe2");
718 else puts ("unknown-hitachi-hiuxwe2");
719 exit (0);
720 }
721 EOF
722 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
723 { echo "$SYSTEM_NAME"; exit; }
724 echo unknown-hitachi-hiuxwe2
725 exit ;;
726 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
727 echo hppa1.1-hp-bsd
728 exit ;;
729 9000/8??:4.3bsd:*:*)
730 echo hppa1.0-hp-bsd
731 exit ;;
732 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
733 echo hppa1.0-hp-mpeix
734 exit ;;
735 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
736 echo hppa1.1-hp-osf
737 exit ;;
738 hp8??:OSF1:*:*)
739 echo hppa1.0-hp-osf
740 exit ;;
741 i*86:OSF1:*:*)
742 if [ -x /usr/sbin/sysversion ] ; then
743 echo ${UNAME_MACHINE}-unknown-osf1mk
744 else
745 echo ${UNAME_MACHINE}-unknown-osf1
746 fi
747 exit ;;
748 parisc*:Lites*:*:*)
749 echo hppa1.1-hp-lites
750 exit ;;
751 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
752 echo c1-convex-bsd
753 exit ;;
754 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
755 if getsysinfo -f scalar_acc
756 then echo c32-convex-bsd
757 else echo c2-convex-bsd
758 fi
759 exit ;;
760 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
761 echo c34-convex-bsd
762 exit ;;
763 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
764 echo c38-convex-bsd
765 exit ;;
766 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
767 echo c4-convex-bsd
768 exit ;;
769 CRAY*Y-MP:*:*:*)
770 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
771 exit ;;
772 CRAY*[A-Z]90:*:*:*)
773 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
774 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
775 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
776 -e 's/\.[^.]*$/.X/'
777 exit ;;
778 CRAY*TS:*:*:*)
779 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
780 exit ;;
781 CRAY*T3E:*:*:*)
782 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
783 exit ;;
784 CRAY*SV1:*:*:*)
785 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
786 exit ;;
787 *:UNICOS/mp:*:*)
788 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
789 exit ;;
790 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
791 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
792 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
793 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
794 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
795 exit ;;
796 5000:UNIX_System_V:4.*:*)
797 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
798 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
799 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
800 exit ;;
801 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
802 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
803 exit ;;
804 sparc*:BSD/OS:*:*)
805 echo sparc-unknown-bsdi${UNAME_RELEASE}
806 exit ;;
807 *:BSD/OS:*:*)
808 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
809 exit ;;
810 *:FreeBSD:*:*)
811 UNAME_PROCESSOR=`/usr/bin/uname -p`
812 case ${UNAME_PROCESSOR} in
813 amd64)
814 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
815 *)
816 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
817 esac
818 exit ;;
819 i*:CYGWIN*:*)
820 echo ${UNAME_MACHINE}-pc-cygwin
821 exit ;;
822 *:MINGW64*:*)
823 echo ${UNAME_MACHINE}-pc-mingw64
824 exit ;;
825 *:MINGW*:*)
826 echo ${UNAME_MACHINE}-pc-mingw32
827 exit ;;
828 i*:MSYS*:*)
829 echo ${UNAME_MACHINE}-pc-msys
830 exit ;;
831 i*:windows32*:*)
832 # uname -m includes "-pc" on this system.
833 echo ${UNAME_MACHINE}-mingw32
834 exit ;;
835 i*:PW*:*)
836 echo ${UNAME_MACHINE}-pc-pw32
837 exit ;;
838 *:Interix*:*)
839 case ${UNAME_MACHINE} in
840 x86)
841 echo i586-pc-interix${UNAME_RELEASE}
842 exit ;;
843 authenticamd | genuineintel | EM64T)
844 echo x86_64-unknown-interix${UNAME_RELEASE}
845 exit ;;
846 IA64)
847 echo ia64-unknown-interix${UNAME_RELEASE}
848 exit ;;
849 esac ;;
850 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
851 echo i${UNAME_MACHINE}-pc-mks
852 exit ;;
853 8664:Windows_NT:*)
854 echo x86_64-pc-mks
855 exit ;;
856 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
857 # How do we know it's Interix rather than the generic POSIX subsystem?
858 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
859 # UNAME_MACHINE based on the output of uname instead of i386?
860 echo i586-pc-interix
861 exit ;;
862 i*:UWIN*:*)
863 echo ${UNAME_MACHINE}-pc-uwin
864 exit ;;
865 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
866 echo x86_64-unknown-cygwin
867 exit ;;
868 p*:CYGWIN*:*)
869 echo powerpcle-unknown-cygwin
870 exit ;;
871 prep*:SunOS:5.*:*)
872 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
873 exit ;;
874 *:GNU:*:*)
875 # the GNU system
876 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
877 exit ;;
878 *:GNU/*:*:*)
879 # other systems with GNU libc and userland
880 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
881 exit ;;
882 i*86:Minix:*:*)
883 echo ${UNAME_MACHINE}-pc-minix
884 exit ;;
885 aarch64:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
887 exit ;;
888 aarch64_be:Linux:*:*)
889 UNAME_MACHINE=aarch64_be
890 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891 exit ;;
892 alpha:Linux:*:*)
893 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
894 EV5) UNAME_MACHINE=alphaev5 ;;
895 EV56) UNAME_MACHINE=alphaev56 ;;
896 PCA56) UNAME_MACHINE=alphapca56 ;;
897 PCA57) UNAME_MACHINE=alphapca56 ;;
898 EV6) UNAME_MACHINE=alphaev6 ;;
899 EV67) UNAME_MACHINE=alphaev67 ;;
900 EV68*) UNAME_MACHINE=alphaev68 ;;
901 esac
902 objdump --private-headers /bin/sh | grep -q ld.so.1
903 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
904 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
905 exit ;;
906 arc:Linux:*:* | arceb:Linux:*:*)
907 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
908 exit ;;
909 arm*:Linux:*:*)
910 eval $set_cc_for_build
911 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
912 | grep -q __ARM_EABI__
913 then
914 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915 else
916 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
917 | grep -q __ARM_PCS_VFP
918 then
919 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
920 else
921 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
922 fi
923 fi
924 exit ;;
925 avr32*:Linux:*:*)
926 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
927 exit ;;
928 cris:Linux:*:*)
929 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
930 exit ;;
931 crisv32:Linux:*:*)
932 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
933 exit ;;
934 frv:Linux:*:*)
935 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
936 exit ;;
937 hexagon:Linux:*:*)
938 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
939 exit ;;
940 i*86:Linux:*:*)
941 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
942 exit ;;
943 ia64:Linux:*:*)
944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
945 exit ;;
946 m32r*:Linux:*:*)
947 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
948 exit ;;
949 m68*:Linux:*:*)
950 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
951 exit ;;
952 mips:Linux:*:* | mips64:Linux:*:*)
953 eval $set_cc_for_build
954 sed 's/^ //' << EOF >$dummy.c
955 #undef CPU
956 #undef ${UNAME_MACHINE}
957 #undef ${UNAME_MACHINE}el
958 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
959 CPU=${UNAME_MACHINE}el
960 #else
961 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
962 CPU=${UNAME_MACHINE}
963 #else
964 CPU=
965 #endif
966 #endif
967 EOF
968 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
969 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
970 ;;
971 or1k:Linux:*:*)
972 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 exit ;;
974 or32:Linux:*:*)
975 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 exit ;;
977 padre:Linux:*:*)
978 echo sparc-unknown-linux-${LIBC}
979 exit ;;
980 parisc64:Linux:*:* | hppa64:Linux:*:*)
981 echo hppa64-unknown-linux-${LIBC}
982 exit ;;
983 parisc:Linux:*:* | hppa:Linux:*:*)
984 # Look for CPU level
985 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
986 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
987 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
988 *) echo hppa-unknown-linux-${LIBC} ;;
989 esac
990 exit ;;
991 ppc64:Linux:*:*)
992 echo powerpc64-unknown-linux-${LIBC}
993 exit ;;
994 ppc:Linux:*:*)
995 echo powerpc-unknown-linux-${LIBC}
996 exit ;;
997 ppc64le:Linux:*:*)
998 echo powerpc64le-unknown-linux-${LIBC}
999 exit ;;
1000 ppcle:Linux:*:*)
1001 echo powerpcle-unknown-linux-${LIBC}
1002 exit ;;
1003 s390:Linux:*:* | s390x:Linux:*:*)
1004 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1005 exit ;;
1006 sh64*:Linux:*:*)
1007 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1008 exit ;;
1009 sh*:Linux:*:*)
1010 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1011 exit ;;
1012 sparc:Linux:*:* | sparc64:Linux:*:*)
1013 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1014 exit ;;
1015 tile*:Linux:*:*)
1016 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1017 exit ;;
1018 vax:Linux:*:*)
1019 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1020 exit ;;
1021 x86_64:Linux:*:*)
1022 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1023 exit ;;
1024 xtensa*:Linux:*:*)
1025 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1026 exit ;;
1027 i*86:DYNIX/ptx:4*:*)
1028 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1029 # earlier versions are messed up and put the nodename in both
1030 # sysname and nodename.
1031 echo i386-sequent-sysv4
1032 exit ;;
1033 i*86:UNIX_SV:4.2MP:2.*)
1034 # Unixware is an offshoot of SVR4, but it has its own version
1035 # number series starting with 2...
1036 # I am not positive that other SVR4 systems won't match this,
1037 # I just have to hope. -- rms.
1038 # Use sysv4.2uw... so that sysv4* matches it.
1039 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1040 exit ;;
1041 i*86:OS/2:*:*)
1042 # If we were able to find `uname', then EMX Unix compatibility
1043 # is probably installed.
1044 echo ${UNAME_MACHINE}-pc-os2-emx
1045 exit ;;
1046 i*86:XTS-300:*:STOP)
1047 echo ${UNAME_MACHINE}-unknown-stop
1048 exit ;;
1049 i*86:atheos:*:*)
1050 echo ${UNAME_MACHINE}-unknown-atheos
1051 exit ;;
1052 i*86:syllable:*:*)
1053 echo ${UNAME_MACHINE}-pc-syllable
1054 exit ;;
1055 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1056 echo i386-unknown-lynxos${UNAME_RELEASE}
1057 exit ;;
1058 i*86:*DOS:*:*)
1059 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1060 exit ;;
1061 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1062 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1063 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1064 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1065 else
1066 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1067 fi
1068 exit ;;
1069 i*86:*:5:[678]*)
1070 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1071 case `/bin/uname -X | grep "^Machine"` in
1072 *486*) UNAME_MACHINE=i486 ;;
1073 *Pentium) UNAME_MACHINE=i586 ;;
1074 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1075 esac
1076 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1077 exit ;;
1078 i*86:*:3.2:*)
1079 if test -f /usr/options/cb.name; then
1080 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1081 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1082 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1083 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1084 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1085 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1086 && UNAME_MACHINE=i586
1087 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1088 && UNAME_MACHINE=i686
1089 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1090 && UNAME_MACHINE=i686
1091 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1092 else
1093 echo ${UNAME_MACHINE}-pc-sysv32
1094 fi
1095 exit ;;
1096 pc:*:*:*)
1097 # Left here for compatibility:
1098 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1099 # the processor, so we play safe by assuming i586.
1100 # Note: whatever this is, it MUST be the same as what config.sub
1101 # prints for the "djgpp" host, or else GDB configury will decide that
1102 # this is a cross-build.
1103 echo i586-pc-msdosdjgpp
1104 exit ;;
1105 Intel:Mach:3*:*)
1106 echo i386-pc-mach3
1107 exit ;;
1108 paragon:*:*:*)
1109 echo i860-intel-osf1
1110 exit ;;
1111 i860:*:4.*:*) # i860-SVR4
1112 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1113 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1114 else # Add other i860-SVR4 vendors below as they are discovered.
1115 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1116 fi
1117 exit ;;
1118 mini*:CTIX:SYS*5:*)
1119 # "miniframe"
1120 echo m68010-convergent-sysv
1121 exit ;;
1122 mc68k:UNIX:SYSTEM5:3.51m)
1123 echo m68k-convergent-sysv
1124 exit ;;
1125 M680?0:D-NIX:5.3:*)
1126 echo m68k-diab-dnix
1127 exit ;;
1128 M68*:*:R3V[5678]*:*)
1129 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1130 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)
1131 OS_REL=''
1132 test -r /etc/.relid \
1133 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1134 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1135 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1136 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1137 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1138 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1139 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1140 && { echo i486-ncr-sysv4; exit; } ;;
1141 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1142 OS_REL='.3'
1143 test -r /etc/.relid \
1144 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1145 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1146 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1147 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1148 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1149 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1150 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1151 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1152 echo m68k-unknown-lynxos${UNAME_RELEASE}
1153 exit ;;
1154 mc68030:UNIX_System_V:4.*:*)
1155 echo m68k-atari-sysv4
1156 exit ;;
1157 TSUNAMI:LynxOS:2.*:*)
1158 echo sparc-unknown-lynxos${UNAME_RELEASE}
1159 exit ;;
1160 rs6000:LynxOS:2.*:*)
1161 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1162 exit ;;
1163 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1164 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1165 exit ;;
1166 SM[BE]S:UNIX_SV:*:*)
1167 echo mips-dde-sysv${UNAME_RELEASE}
1168 exit ;;
1169 RM*:ReliantUNIX-*:*:*)
1170 echo mips-sni-sysv4
1171 exit ;;
1172 RM*:SINIX-*:*:*)
1173 echo mips-sni-sysv4
1174 exit ;;
1175 *:SINIX-*:*:*)
1176 if uname -p 2>/dev/null >/dev/null ; then
1177 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1178 echo ${UNAME_MACHINE}-sni-sysv4
1179 else
1180 echo ns32k-sni-sysv
1181 fi
1182 exit ;;
1183 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1184 # says <Richard.M.Bartel@ccMail.Census.GOV>
1185 echo i586-unisys-sysv4
1186 exit ;;
1187 *:UNIX_System_V:4*:FTX*)
1188 # From Gerald Hewes <hewes@openmarket.com>.
1189 # How about differentiating between stratus architectures? -djm
1190 echo hppa1.1-stratus-sysv4
1191 exit ;;
1192 *:*:*:FTX*)
1193 # From seanf@swdc.stratus.com.
1194 echo i860-stratus-sysv4
1195 exit ;;
1196 i*86:VOS:*:*)
1197 # From Paul.Green@stratus.com.
1198 echo ${UNAME_MACHINE}-stratus-vos
1199 exit ;;
1200 *:VOS:*:*)
1201 # From Paul.Green@stratus.com.
1202 echo hppa1.1-stratus-vos
1203 exit ;;
1204 mc68*:A/UX:*:*)
1205 echo m68k-apple-aux${UNAME_RELEASE}
1206 exit ;;
1207 news*:NEWS-OS:6*:*)
1208 echo mips-sony-newsos6
1209 exit ;;
1210 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1211 if [ -d /usr/nec ]; then
1212 echo mips-nec-sysv${UNAME_RELEASE}
1213 else
1214 echo mips-unknown-sysv${UNAME_RELEASE}
1215 fi
1216 exit ;;
1217 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1218 echo powerpc-be-beos
1219 exit ;;
1220 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1221 echo powerpc-apple-beos
1222 exit ;;
1223 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1224 echo i586-pc-beos
1225 exit ;;
1226 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1227 echo i586-pc-haiku
1228 exit ;;
1229 x86_64:Haiku:*:*)
1230 echo x86_64-unknown-haiku
1231 exit ;;
1232 SX-4:SUPER-UX:*:*)
1233 echo sx4-nec-superux${UNAME_RELEASE}
1234 exit ;;
1235 SX-5:SUPER-UX:*:*)
1236 echo sx5-nec-superux${UNAME_RELEASE}
1237 exit ;;
1238 SX-6:SUPER-UX:*:*)
1239 echo sx6-nec-superux${UNAME_RELEASE}
1240 exit ;;
1241 SX-7:SUPER-UX:*:*)
1242 echo sx7-nec-superux${UNAME_RELEASE}
1243 exit ;;
1244 SX-8:SUPER-UX:*:*)
1245 echo sx8-nec-superux${UNAME_RELEASE}
1246 exit ;;
1247 SX-8R:SUPER-UX:*:*)
1248 echo sx8r-nec-superux${UNAME_RELEASE}
1249 exit ;;
1250 Power*:Rhapsody:*:*)
1251 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1252 exit ;;
1253 *:Rhapsody:*:*)
1254 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1255 exit ;;
1256 *:Darwin:*:*)
1257 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1258 eval $set_cc_for_build
1259 if test "$UNAME_PROCESSOR" = unknown ; then
1260 UNAME_PROCESSOR=powerpc
1261 fi
1262 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1263 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1264 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1265 grep IS_64BIT_ARCH >/dev/null
1266 then
1267 case $UNAME_PROCESSOR in
1268 i386) UNAME_PROCESSOR=x86_64 ;;
1269 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1270 esac
1271 fi
1272 fi
1273 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1274 exit ;;
1275 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1276 UNAME_PROCESSOR=`uname -p`
1277 if test "$UNAME_PROCESSOR" = "x86"; then
1278 UNAME_PROCESSOR=i386
1279 UNAME_MACHINE=pc
1280 fi
1281 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1282 exit ;;
1283 *:QNX:*:4*)
1284 echo i386-pc-qnx
1285 exit ;;
1286 NEO-?:NONSTOP_KERNEL:*:*)
1287 echo neo-tandem-nsk${UNAME_RELEASE}
1288 exit ;;
1289 NSE-*:NONSTOP_KERNEL:*:*)
1290 echo nse-tandem-nsk${UNAME_RELEASE}
1291 exit ;;
1292 NSR-?:NONSTOP_KERNEL:*:*)
1293 echo nsr-tandem-nsk${UNAME_RELEASE}
1294 exit ;;
1295 *:NonStop-UX:*:*)
1296 echo mips-compaq-nonstopux
1297 exit ;;
1298 BS2000:POSIX*:*:*)
1299 echo bs2000-siemens-sysv
1300 exit ;;
1301 DS/*:UNIX_System_V:*:*)
1302 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1303 exit ;;
1304 *:Plan9:*:*)
1305 # "uname -m" is not consistent, so use $cputype instead. 386
1306 # is converted to i386 for consistency with other x86
1307 # operating systems.
1308 if test "$cputype" = "386"; then
1309 UNAME_MACHINE=i386
1310 else
1311 UNAME_MACHINE="$cputype"
1312 fi
1313 echo ${UNAME_MACHINE}-unknown-plan9
1314 exit ;;
1315 *:TOPS-10:*:*)
1316 echo pdp10-unknown-tops10
1317 exit ;;
1318 *:TENEX:*:*)
1319 echo pdp10-unknown-tenex
1320 exit ;;
1321 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1322 echo pdp10-dec-tops20
1323 exit ;;
1324 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1325 echo pdp10-xkl-tops20
1326 exit ;;
1327 *:TOPS-20:*:*)
1328 echo pdp10-unknown-tops20
1329 exit ;;
1330 *:ITS:*:*)
1331 echo pdp10-unknown-its
1332 exit ;;
1333 SEI:*:*:SEIUX)
1334 echo mips-sei-seiux${UNAME_RELEASE}
1335 exit ;;
1336 *:DragonFly:*:*)
1337 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1338 exit ;;
1339 *:*VMS:*:*)
1340 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1341 case "${UNAME_MACHINE}" in
1342 A*) echo alpha-dec-vms ; exit ;;
1343 I*) echo ia64-dec-vms ; exit ;;
1344 V*) echo vax-dec-vms ; exit ;;
1345 esac ;;
1346 *:XENIX:*:SysV)
1347 echo i386-pc-xenix
1348 exit ;;
1349 i*86:skyos:*:*)
1350 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1351 exit ;;
1352 i*86:rdos:*:*)
1353 echo ${UNAME_MACHINE}-pc-rdos
1354 exit ;;
1355 i*86:AROS:*:*)
1356 echo ${UNAME_MACHINE}-pc-aros
1357 exit ;;
1358 x86_64:VMkernel:*:*)
1359 echo ${UNAME_MACHINE}-unknown-esx
1360 exit ;;
1361 esac
1362
1363 eval $set_cc_for_build
1364 cat >$dummy.c <<EOF
1365 #ifdef _SEQUENT_
1366 # include <sys/types.h>
1367 # include <sys/utsname.h>
1368 #endif
1369 main ()
1370 {
1371 #if defined (sony)
1372 #if defined (MIPSEB)
1373 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1374 I don't know.... */
1375 printf ("mips-sony-bsd\n"); exit (0);
1376 #else
1377 #include <sys/param.h>
1378 printf ("m68k-sony-newsos%s\n",
1379 #ifdef NEWSOS4
1380 "4"
1381 #else
1382 ""
1383 #endif
1384 ); exit (0);
1385 #endif
1386 #endif
1387
1388 #if defined (__arm) && defined (__acorn) && defined (__unix)
1389 printf ("arm-acorn-riscix\n"); exit (0);
1390 #endif
1391
1392 #if defined (hp300) && !defined (hpux)
1393 printf ("m68k-hp-bsd\n"); exit (0);
1394 #endif
1395
1396 #if defined (NeXT)
1397 #if !defined (__ARCHITECTURE__)
1398 #define __ARCHITECTURE__ "m68k"
1399 #endif
1400 int version;
1401 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1402 if (version < 4)
1403 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1404 else
1405 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1406 exit (0);
1407 #endif
1408
1409 #if defined (MULTIMAX) || defined (n16)
1410 #if defined (UMAXV)
1411 printf ("ns32k-encore-sysv\n"); exit (0);
1412 #else
1413 #if defined (CMU)
1414 printf ("ns32k-encore-mach\n"); exit (0);
1415 #else
1416 printf ("ns32k-encore-bsd\n"); exit (0);
1417 #endif
1418 #endif
1419 #endif
1420
1421 #if defined (__386BSD__)
1422 printf ("i386-pc-bsd\n"); exit (0);
1423 #endif
1424
1425 #if defined (sequent)
1426 #if defined (i386)
1427 printf ("i386-sequent-dynix\n"); exit (0);
1428 #endif
1429 #if defined (ns32000)
1430 printf ("ns32k-sequent-dynix\n"); exit (0);
1431 #endif
1432 #endif
1433
1434 #if defined (_SEQUENT_)
1435 struct utsname un;
1436
1437 uname(&un);
1438
1439 if (strncmp(un.version, "V2", 2) == 0) {
1440 printf ("i386-sequent-ptx2\n"); exit (0);
1441 }
1442 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1443 printf ("i386-sequent-ptx1\n"); exit (0);
1444 }
1445 printf ("i386-sequent-ptx\n"); exit (0);
1446
1447 #endif
1448
1449 #if defined (vax)
1450 # if !defined (ultrix)
1451 # include <sys/param.h>
1452 # if defined (BSD)
1453 # if BSD == 43
1454 printf ("vax-dec-bsd4.3\n"); exit (0);
1455 # else
1456 # if BSD == 199006
1457 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1458 # else
1459 printf ("vax-dec-bsd\n"); exit (0);
1460 # endif
1461 # endif
1462 # else
1463 printf ("vax-dec-bsd\n"); exit (0);
1464 # endif
1465 # else
1466 printf ("vax-dec-ultrix\n"); exit (0);
1467 # endif
1468 #endif
1469
1470 #if defined (alliant) && defined (i860)
1471 printf ("i860-alliant-bsd\n"); exit (0);
1472 #endif
1473
1474 exit (1);
1475 }
1476 EOF
1477
1478 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1479 { echo "$SYSTEM_NAME"; exit; }
1480
1481 # Apollos put the system type in the environment.
1482
1483 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1484
1485 # Convex versions that predate uname can use getsysinfo(1)
1486
1487 if [ -x /usr/convex/getsysinfo ]
1488 then
1489 case `getsysinfo -f cpu_type` in
1490 c1*)
1491 echo c1-convex-bsd
1492 exit ;;
1493 c2*)
1494 if getsysinfo -f scalar_acc
1495 then echo c32-convex-bsd
1496 else echo c2-convex-bsd
1497 fi
1498 exit ;;
1499 c34*)
1500 echo c34-convex-bsd
1501 exit ;;
1502 c38*)
1503 echo c38-convex-bsd
1504 exit ;;
1505 c4*)
1506 echo c4-convex-bsd
1507 exit ;;
1508 esac
1509 fi
1510
1511 cat >&2 <<EOF
1512 $0: unable to guess system type
1513
1514 This script, last modified $timestamp, has failed to recognize
1515 the operating system you are using. It is advised that you
1516 download the most up to date version of the config scripts from
1517
1518 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1519 and
1520 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1521
1522 If the version you run ($0) is already up to date, please
1523 send the following data and any information you think might be
1524 pertinent to <config-patches@gnu.org> in order to provide the needed
1525 information to handle your system.
1526
1527 config.guess timestamp = $timestamp
1528
1529 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1530 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1531 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1532 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1533
1534 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1535 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1536
1537 hostinfo = `(hostinfo) 2>/dev/null`
1538 /bin/universe = `(/bin/universe) 2>/dev/null`
1539 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1540 /bin/arch = `(/bin/arch) 2>/dev/null`
1541 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1542 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1543
1544 UNAME_MACHINE = ${UNAME_MACHINE}
1545 UNAME_RELEASE = ${UNAME_RELEASE}
1546 UNAME_SYSTEM = ${UNAME_SYSTEM}
1547 UNAME_VERSION = ${UNAME_VERSION}
1548 EOF
1549
1550 exit 1
1551
1552 # Local variables:
1553 # eval: (add-hook 'write-file-hooks 'time-stamp)
1554 # time-stamp-start: "timestamp='"
1555 # time-stamp-format: "%:y-%02m-%02d"
1556 # time-stamp-end: "'"
1557 # End:
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-06-10'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 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, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # 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, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25 #
26 # Originally written by Per Bothner.
27 #
28 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
30 #
31 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
32
33
34 me=`echo "$0" | sed -e 's,.*/,,'`
35
36 usage="\
37 Usage: $0 [OPTION]
38
39 Output the configuration name of the system \`$me' is run on.
40
41 Operation modes:
42 -h, --help print this help, then exit
43 -t, --time-stamp print date of last modification, then exit
44 -v, --version print version number, then exit
45
46 Report bugs and patches to <config-patches@gnu.org>."
47
48 version="\
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52 Copyright 1992-2013 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 trap 'exit 1' 1 2 15
87
88 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89 # compiler to aid in system detection is discouraged as it requires
90 # temporary files to be created and, as you can see below, it is a
91 # headache to deal with in a portable fashion.
92
93 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
94 # use `HOST_CC' if defined, but it is deprecated.
95
96 # Portable tmp directory creation inspired by the Autoconf team.
97
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
122
123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
126 PATH=$PATH:/.attbin ; export PATH
127 fi
128
129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "${UNAME_SYSTEM}" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
152 ;;
153 esac
154
155 # Note: order is significant - the case branches are not exclusive.
156
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
158 *:NetBSD:*:*)
159 # NetBSD (nbsd) targets should (where applicable) match one or
160 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
161 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
162 # switched to ELF, *-*-netbsd* would select the old
163 # object file format. This provides both forward
164 # compatibility and a consistent mechanism for selecting the
165 # object file format.
166 #
167 # Note: NetBSD doesn't particularly care about the vendor
168 # portion of the name. We always set it to "unknown".
169 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
171 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
172 case "${UNAME_MACHINE_ARCH}" in
173 armeb) machine=armeb-unknown ;;
174 arm*) machine=arm-unknown ;;
175 sh3el) machine=shl-unknown ;;
176 sh3eb) machine=sh-unknown ;;
177 sh5el) machine=sh5le-unknown ;;
178 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
179 esac
180 # The Operating System including object format, if it has switched
181 # to ELF recently, or will in the future.
182 case "${UNAME_MACHINE_ARCH}" in
183 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
184 eval $set_cc_for_build
185 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
186 | grep -q __ELF__
187 then
188 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
189 # Return netbsd for either. FIX?
190 os=netbsd
191 else
192 os=netbsdelf
193 fi
194 ;;
195 *)
196 os=netbsd
197 ;;
198 esac
199 # The OS release
200 # Debian GNU/NetBSD machines have a different userland, and
201 # thus, need a distinct triplet. However, they do not need
202 # kernel version information, so it can be replaced with a
203 # suitable tag, in the style of linux-gnu.
204 case "${UNAME_VERSION}" in
205 Debian*)
206 release='-gnu'
207 ;;
208 *)
209 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
210 ;;
211 esac
212 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
213 # contains redundant information, the shorter form:
214 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
215 echo "${machine}-${os}${release}"
216 exit ;;
217 *:Bitrig:*:*)
218 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
219 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
220 exit ;;
221 *:OpenBSD:*:*)
222 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
223 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
224 exit ;;
225 *:ekkoBSD:*:*)
226 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
227 exit ;;
228 *:SolidBSD:*:*)
229 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
230 exit ;;
231 macppc:MirBSD:*:*)
232 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
233 exit ;;
234 *:MirBSD:*:*)
235 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
236 exit ;;
237 alpha:OSF1:*:*)
238 case $UNAME_RELEASE in
239 *4.0)
240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
241 ;;
242 *5.*)
243 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
244 ;;
245 esac
246 # According to Compaq, /usr/sbin/psrinfo has been available on
247 # OSF/1 and Tru64 systems produced since 1995. I hope that
248 # covers most systems running today. This code pipes the CPU
249 # types through head -n 1, so we only detect the type of CPU 0.
250 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
251 case "$ALPHA_CPU_TYPE" in
252 "EV4 (21064)")
253 UNAME_MACHINE="alpha" ;;
254 "EV4.5 (21064)")
255 UNAME_MACHINE="alpha" ;;
256 "LCA4 (21066/21068)")
257 UNAME_MACHINE="alpha" ;;
258 "EV5 (21164)")
259 UNAME_MACHINE="alphaev5" ;;
260 "EV5.6 (21164A)")
261 UNAME_MACHINE="alphaev56" ;;
262 "EV5.6 (21164PC)")
263 UNAME_MACHINE="alphapca56" ;;
264 "EV5.7 (21164PC)")
265 UNAME_MACHINE="alphapca57" ;;
266 "EV6 (21264)")
267 UNAME_MACHINE="alphaev6" ;;
268 "EV6.7 (21264A)")
269 UNAME_MACHINE="alphaev67" ;;
270 "EV6.8CB (21264C)")
271 UNAME_MACHINE="alphaev68" ;;
272 "EV6.8AL (21264B)")
273 UNAME_MACHINE="alphaev68" ;;
274 "EV6.8CX (21264D)")
275 UNAME_MACHINE="alphaev68" ;;
276 "EV6.9A (21264/EV69A)")
277 UNAME_MACHINE="alphaev69" ;;
278 "EV7 (21364)")
279 UNAME_MACHINE="alphaev7" ;;
280 "EV7.9 (21364A)")
281 UNAME_MACHINE="alphaev79" ;;
282 esac
283 # A Pn.n version is a patched version.
284 # A Vn.n version is a released version.
285 # A Tn.n version is a released field test version.
286 # A Xn.n version is an unreleased experimental baselevel.
287 # 1.2 uses "1.2" for uname -r.
288 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
289 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
290 exitcode=$?
291 trap '' 0
292 exit $exitcode ;;
293 Alpha\ *:Windows_NT*:*)
294 # How do we know it's Interix rather than the generic POSIX subsystem?
295 # Should we change UNAME_MACHINE based on the output of uname instead
296 # of the specific Alpha model?
297 echo alpha-pc-interix
298 exit ;;
299 21064:Windows_NT:50:3)
300 echo alpha-dec-winnt3.5
301 exit ;;
302 Amiga*:UNIX_System_V:4.0:*)
303 echo m68k-unknown-sysv4
304 exit ;;
305 *:[Aa]miga[Oo][Ss]:*:*)
306 echo ${UNAME_MACHINE}-unknown-amigaos
307 exit ;;
308 *:[Mm]orph[Oo][Ss]:*:*)
309 echo ${UNAME_MACHINE}-unknown-morphos
310 exit ;;
311 *:OS/390:*:*)
312 echo i370-ibm-openedition
313 exit ;;
314 *:z/VM:*:*)
315 echo s390-ibm-zvmoe
316 exit ;;
317 *:OS400:*:*)
318 echo powerpc-ibm-os400
319 exit ;;
320 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
321 echo arm-acorn-riscix${UNAME_RELEASE}
322 exit ;;
323 arm*:riscos:*:*|arm*:RISCOS:*:*)
324 echo arm-unknown-riscos
325 exit ;;
326 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
327 echo hppa1.1-hitachi-hiuxmpp
328 exit ;;
329 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
330 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
331 if test "`(/bin/universe) 2>/dev/null`" = att ; then
332 echo pyramid-pyramid-sysv3
333 else
334 echo pyramid-pyramid-bsd
335 fi
336 exit ;;
337 NILE*:*:*:dcosx)
338 echo pyramid-pyramid-svr4
339 exit ;;
340 DRS?6000:unix:4.0:6*)
341 echo sparc-icl-nx6
342 exit ;;
343 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
344 case `/usr/bin/uname -p` in
345 sparc) echo sparc-icl-nx7; exit ;;
346 esac ;;
347 s390x:SunOS:*:*)
348 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
349 exit ;;
350 sun4H:SunOS:5.*:*)
351 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
352 exit ;;
353 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
354 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
356 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
357 echo i386-pc-auroraux${UNAME_RELEASE}
358 exit ;;
359 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
360 eval $set_cc_for_build
361 SUN_ARCH="i386"
362 # If there is a compiler, see if it is configured for 64-bit objects.
363 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
364 # This test works for both compilers.
365 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
366 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
367 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
368 grep IS_64BIT_ARCH >/dev/null
369 then
370 SUN_ARCH="x86_64"
371 fi
372 fi
373 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
374 exit ;;
375 sun4*:SunOS:6*:*)
376 # According to config.sub, this is the proper way to canonicalize
377 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
378 # it's likely to be more like Solaris than SunOS4.
379 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
380 exit ;;
381 sun4*:SunOS:*:*)
382 case "`/usr/bin/arch -k`" in
383 Series*|S4*)
384 UNAME_RELEASE=`uname -v`
385 ;;
386 esac
387 # Japanese Language versions have a version number like `4.1.3-JL'.
388 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
389 exit ;;
390 sun3*:SunOS:*:*)
391 echo m68k-sun-sunos${UNAME_RELEASE}
392 exit ;;
393 sun*:*:4.2BSD:*)
394 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
395 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
396 case "`/bin/arch`" in
397 sun3)
398 echo m68k-sun-sunos${UNAME_RELEASE}
399 ;;
400 sun4)
401 echo sparc-sun-sunos${UNAME_RELEASE}
402 ;;
403 esac
404 exit ;;
405 aushp:SunOS:*:*)
406 echo sparc-auspex-sunos${UNAME_RELEASE}
407 exit ;;
408 # The situation for MiNT is a little confusing. The machine name
409 # can be virtually everything (everything which is not
410 # "atarist" or "atariste" at least should have a processor
411 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
412 # to the lowercase version "mint" (or "freemint"). Finally
413 # the system name "TOS" denotes a system which is actually not
414 # MiNT. But MiNT is downward compatible to TOS, so this should
415 # be no problem.
416 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
417 echo m68k-atari-mint${UNAME_RELEASE}
418 exit ;;
419 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
420 echo m68k-atari-mint${UNAME_RELEASE}
421 exit ;;
422 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
423 echo m68k-atari-mint${UNAME_RELEASE}
424 exit ;;
425 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
426 echo m68k-milan-mint${UNAME_RELEASE}
427 exit ;;
428 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
429 echo m68k-hades-mint${UNAME_RELEASE}
430 exit ;;
431 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
432 echo m68k-unknown-mint${UNAME_RELEASE}
433 exit ;;
434 m68k:machten:*:*)
435 echo m68k-apple-machten${UNAME_RELEASE}
436 exit ;;
437 powerpc:machten:*:*)
438 echo powerpc-apple-machten${UNAME_RELEASE}
439 exit ;;
440 RISC*:Mach:*:*)
441 echo mips-dec-mach_bsd4.3
442 exit ;;
443 RISC*:ULTRIX:*:*)
444 echo mips-dec-ultrix${UNAME_RELEASE}
445 exit ;;
446 VAX*:ULTRIX*:*:*)
447 echo vax-dec-ultrix${UNAME_RELEASE}
448 exit ;;
449 2020:CLIX:*:* | 2430:CLIX:*:*)
450 echo clipper-intergraph-clix${UNAME_RELEASE}
451 exit ;;
452 mips:*:*:UMIPS | mips:*:*:RISCos)
453 eval $set_cc_for_build
454 sed 's/^ //' << EOF >$dummy.c
455 #ifdef __cplusplus
456 #include <stdio.h> /* for printf() prototype */
457 int main (int argc, char *argv[]) {
458 #else
459 int main (argc, argv) int argc; char *argv[]; {
460 #endif
461 #if defined (host_mips) && defined (MIPSEB)
462 #if defined (SYSTYPE_SYSV)
463 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
464 #endif
465 #if defined (SYSTYPE_SVR4)
466 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
467 #endif
468 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
469 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
470 #endif
471 #endif
472 exit (-1);
473 }
474 EOF
475 $CC_FOR_BUILD -o $dummy $dummy.c &&
476 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
477 SYSTEM_NAME=`$dummy $dummyarg` &&
478 { echo "$SYSTEM_NAME"; exit; }
479 echo mips-mips-riscos${UNAME_RELEASE}
480 exit ;;
481 Motorola:PowerMAX_OS:*:*)
482 echo powerpc-motorola-powermax
483 exit ;;
484 Motorola:*:4.3:PL8-*)
485 echo powerpc-harris-powermax
486 exit ;;
487 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
488 echo powerpc-harris-powermax
489 exit ;;
490 Night_Hawk:Power_UNIX:*:*)
491 echo powerpc-harris-powerunix
492 exit ;;
493 m88k:CX/UX:7*:*)
494 echo m88k-harris-cxux7
495 exit ;;
496 m88k:*:4*:R4*)
497 echo m88k-motorola-sysv4
498 exit ;;
499 m88k:*:3*:R3*)
500 echo m88k-motorola-sysv3
501 exit ;;
502 AViiON:dgux:*:*)
503 # DG/UX returns AViiON for all architectures
504 UNAME_PROCESSOR=`/usr/bin/uname -p`
505 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
506 then
507 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
508 [ ${TARGET_BINARY_INTERFACE}x = x ]
509 then
510 echo m88k-dg-dgux${UNAME_RELEASE}
511 else
512 echo m88k-dg-dguxbcs${UNAME_RELEASE}
513 fi
514 else
515 echo i586-dg-dgux${UNAME_RELEASE}
516 fi
517 exit ;;
518 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
519 echo m88k-dolphin-sysv3
520 exit ;;
521 M88*:*:R3*:*)
522 # Delta 88k system running SVR3
523 echo m88k-motorola-sysv3
524 exit ;;
525 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
526 echo m88k-tektronix-sysv3
527 exit ;;
528 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
529 echo m68k-tektronix-bsd
530 exit ;;
531 *:IRIX*:*:*)
532 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
533 exit ;;
534 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
535 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
536 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
537 i*86:AIX:*:*)
538 echo i386-ibm-aix
539 exit ;;
540 ia64:AIX:*:*)
541 if [ -x /usr/bin/oslevel ] ; then
542 IBM_REV=`/usr/bin/oslevel`
543 else
544 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545 fi
546 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
547 exit ;;
548 *:AIX:2:3)
549 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
550 eval $set_cc_for_build
551 sed 's/^ //' << EOF >$dummy.c
552 #include <sys/systemcfg.h>
553
554 main()
555 {
556 if (!__power_pc())
557 exit(1);
558 puts("powerpc-ibm-aix3.2.5");
559 exit(0);
560 }
561 EOF
562 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
563 then
564 echo "$SYSTEM_NAME"
565 else
566 echo rs6000-ibm-aix3.2.5
567 fi
568 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
569 echo rs6000-ibm-aix3.2.4
570 else
571 echo rs6000-ibm-aix3.2
572 fi
573 exit ;;
574 *:AIX:*:[4567])
575 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
576 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
577 IBM_ARCH=rs6000
578 else
579 IBM_ARCH=powerpc
580 fi
581 if [ -x /usr/bin/oslevel ] ; then
582 IBM_REV=`/usr/bin/oslevel`
583 else
584 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
585 fi
586 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
587 exit ;;
588 *:AIX:*:*)
589 echo rs6000-ibm-aix
590 exit ;;
591 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
592 echo romp-ibm-bsd4.4
593 exit ;;
594 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
595 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
596 exit ;; # report: romp-ibm BSD 4.3
597 *:BOSX:*:*)
598 echo rs6000-bull-bosx
599 exit ;;
600 DPX/2?00:B.O.S.:*:*)
601 echo m68k-bull-sysv3
602 exit ;;
603 9000/[34]??:4.3bsd:1.*:*)
604 echo m68k-hp-bsd
605 exit ;;
606 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
607 echo m68k-hp-bsd4.4
608 exit ;;
609 9000/[34678]??:HP-UX:*:*)
610 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
611 case "${UNAME_MACHINE}" in
612 9000/31? ) HP_ARCH=m68000 ;;
613 9000/[34]?? ) HP_ARCH=m68k ;;
614 9000/[678][0-9][0-9])
615 if [ -x /usr/bin/getconf ]; then
616 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
617 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
618 case "${sc_cpu_version}" in
619 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
620 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
621 532) # CPU_PA_RISC2_0
622 case "${sc_kernel_bits}" in
623 32) HP_ARCH="hppa2.0n" ;;
624 64) HP_ARCH="hppa2.0w" ;;
625 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
626 esac ;;
627 esac
628 fi
629 if [ "${HP_ARCH}" = "" ]; then
630 eval $set_cc_for_build
631 sed 's/^ //' << EOF >$dummy.c
632
633 #define _HPUX_SOURCE
634 #include <stdlib.h>
635 #include <unistd.h>
636
637 int main ()
638 {
639 #if defined(_SC_KERNEL_BITS)
640 long bits = sysconf(_SC_KERNEL_BITS);
641 #endif
642 long cpu = sysconf (_SC_CPU_VERSION);
643
644 switch (cpu)
645 {
646 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
647 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
648 case CPU_PA_RISC2_0:
649 #if defined(_SC_KERNEL_BITS)
650 switch (bits)
651 {
652 case 64: puts ("hppa2.0w"); break;
653 case 32: puts ("hppa2.0n"); break;
654 default: puts ("hppa2.0"); break;
655 } break;
656 #else /* !defined(_SC_KERNEL_BITS) */
657 puts ("hppa2.0"); break;
658 #endif
659 default: puts ("hppa1.0"); break;
660 }
661 exit (0);
662 }
663 EOF
664 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
665 test -z "$HP_ARCH" && HP_ARCH=hppa
666 fi ;;
667 esac
668 if [ ${HP_ARCH} = "hppa2.0w" ]
669 then
670 eval $set_cc_for_build
671
672 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
673 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
674 # generating 64-bit code. GNU and HP use different nomenclature:
675 #
676 # $ CC_FOR_BUILD=cc ./config.guess
677 # => hppa2.0w-hp-hpux11.23
678 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
679 # => hppa64-hp-hpux11.23
680
681 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
682 grep -q __LP64__
683 then
684 HP_ARCH="hppa2.0w"
685 else
686 HP_ARCH="hppa64"
687 fi
688 fi
689 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
690 exit ;;
691 ia64:HP-UX:*:*)
692 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
693 echo ia64-hp-hpux${HPUX_REV}
694 exit ;;
695 3050*:HI-UX:*:*)
696 eval $set_cc_for_build
697 sed 's/^ //' << EOF >$dummy.c
698 #include <unistd.h>
699 int
700 main ()
701 {
702 long cpu = sysconf (_SC_CPU_VERSION);
703 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
704 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
705 results, however. */
706 if (CPU_IS_PA_RISC (cpu))
707 {
708 switch (cpu)
709 {
710 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
711 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
712 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
713 default: puts ("hppa-hitachi-hiuxwe2"); break;
714 }
715 }
716 else if (CPU_IS_HP_MC68K (cpu))
717 puts ("m68k-hitachi-hiuxwe2");
718 else puts ("unknown-hitachi-hiuxwe2");
719 exit (0);
720 }
721 EOF
722 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
723 { echo "$SYSTEM_NAME"; exit; }
724 echo unknown-hitachi-hiuxwe2
725 exit ;;
726 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
727 echo hppa1.1-hp-bsd
728 exit ;;
729 9000/8??:4.3bsd:*:*)
730 echo hppa1.0-hp-bsd
731 exit ;;
732 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
733 echo hppa1.0-hp-mpeix
734 exit ;;
735 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
736 echo hppa1.1-hp-osf
737 exit ;;
738 hp8??:OSF1:*:*)
739 echo hppa1.0-hp-osf
740 exit ;;
741 i*86:OSF1:*:*)
742 if [ -x /usr/sbin/sysversion ] ; then
743 echo ${UNAME_MACHINE}-unknown-osf1mk
744 else
745 echo ${UNAME_MACHINE}-unknown-osf1
746 fi
747 exit ;;
748 parisc*:Lites*:*:*)
749 echo hppa1.1-hp-lites
750 exit ;;
751 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
752 echo c1-convex-bsd
753 exit ;;
754 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
755 if getsysinfo -f scalar_acc
756 then echo c32-convex-bsd
757 else echo c2-convex-bsd
758 fi
759 exit ;;
760 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
761 echo c34-convex-bsd
762 exit ;;
763 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
764 echo c38-convex-bsd
765 exit ;;
766 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
767 echo c4-convex-bsd
768 exit ;;
769 CRAY*Y-MP:*:*:*)
770 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
771 exit ;;
772 CRAY*[A-Z]90:*:*:*)
773 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
774 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
775 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
776 -e 's/\.[^.]*$/.X/'
777 exit ;;
778 CRAY*TS:*:*:*)
779 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
780 exit ;;
781 CRAY*T3E:*:*:*)
782 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
783 exit ;;
784 CRAY*SV1:*:*:*)
785 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
786 exit ;;
787 *:UNICOS/mp:*:*)
788 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
789 exit ;;
790 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
791 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
792 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
793 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
794 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
795 exit ;;
796 5000:UNIX_System_V:4.*:*)
797 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
798 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
799 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
800 exit ;;
801 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
802 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
803 exit ;;
804 sparc*:BSD/OS:*:*)
805 echo sparc-unknown-bsdi${UNAME_RELEASE}
806 exit ;;
807 *:BSD/OS:*:*)
808 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
809 exit ;;
810 *:FreeBSD:*:*)
811 UNAME_PROCESSOR=`/usr/bin/uname -p`
812 case ${UNAME_PROCESSOR} in
813 amd64)
814 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
815 *)
816 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
817 esac
818 exit ;;
819 i*:CYGWIN*:*)
820 echo ${UNAME_MACHINE}-pc-cygwin
821 exit ;;
822 *:MINGW64*:*)
823 echo ${UNAME_MACHINE}-pc-mingw64
824 exit ;;
825 *:MINGW*:*)
826 echo ${UNAME_MACHINE}-pc-mingw32
827 exit ;;
828 i*:MSYS*:*)
829 echo ${UNAME_MACHINE}-pc-msys
830 exit ;;
831 i*:windows32*:*)
832 # uname -m includes "-pc" on this system.
833 echo ${UNAME_MACHINE}-mingw32
834 exit ;;
835 i*:PW*:*)
836 echo ${UNAME_MACHINE}-pc-pw32
837 exit ;;
838 *:Interix*:*)
839 case ${UNAME_MACHINE} in
840 x86)
841 echo i586-pc-interix${UNAME_RELEASE}
842 exit ;;
843 authenticamd | genuineintel | EM64T)
844 echo x86_64-unknown-interix${UNAME_RELEASE}
845 exit ;;
846 IA64)
847 echo ia64-unknown-interix${UNAME_RELEASE}
848 exit ;;
849 esac ;;
850 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
851 echo i${UNAME_MACHINE}-pc-mks
852 exit ;;
853 8664:Windows_NT:*)
854 echo x86_64-pc-mks
855 exit ;;
856 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
857 # How do we know it's Interix rather than the generic POSIX subsystem?
858 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
859 # UNAME_MACHINE based on the output of uname instead of i386?
860 echo i586-pc-interix
861 exit ;;
862 i*:UWIN*:*)
863 echo ${UNAME_MACHINE}-pc-uwin
864 exit ;;
865 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
866 echo x86_64-unknown-cygwin
867 exit ;;
868 p*:CYGWIN*:*)
869 echo powerpcle-unknown-cygwin
870 exit ;;
871 prep*:SunOS:5.*:*)
872 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
873 exit ;;
874 *:GNU:*:*)
875 # the GNU system
876 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
877 exit ;;
878 *:GNU/*:*:*)
879 # other systems with GNU libc and userland
880 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
881 exit ;;
882 i*86:Minix:*:*)
883 echo ${UNAME_MACHINE}-pc-minix
884 exit ;;
885 aarch64:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
887 exit ;;
888 aarch64_be:Linux:*:*)
889 UNAME_MACHINE=aarch64_be
890 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891 exit ;;
892 alpha:Linux:*:*)
893 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
894 EV5) UNAME_MACHINE=alphaev5 ;;
895 EV56) UNAME_MACHINE=alphaev56 ;;
896 PCA56) UNAME_MACHINE=alphapca56 ;;
897 PCA57) UNAME_MACHINE=alphapca56 ;;
898 EV6) UNAME_MACHINE=alphaev6 ;;
899 EV67) UNAME_MACHINE=alphaev67 ;;
900 EV68*) UNAME_MACHINE=alphaev68 ;;
901 esac
902 objdump --private-headers /bin/sh | grep -q ld.so.1
903 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
904 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
905 exit ;;
906 arc:Linux:*:* | arceb:Linux:*:*)
907 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
908 exit ;;
909 arm*:Linux:*:*)
910 eval $set_cc_for_build
911 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
912 | grep -q __ARM_EABI__
913 then
914 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915 else
916 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
917 | grep -q __ARM_PCS_VFP
918 then
919 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
920 else
921 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
922 fi
923 fi
924 exit ;;
925 avr32*:Linux:*:*)
926 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
927 exit ;;
928 cris:Linux:*:*)
929 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
930 exit ;;
931 crisv32:Linux:*:*)
932 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
933 exit ;;
934 frv:Linux:*:*)
935 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
936 exit ;;
937 hexagon:Linux:*:*)
938 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
939 exit ;;
940 i*86:Linux:*:*)
941 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
942 exit ;;
943 ia64:Linux:*:*)
944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
945 exit ;;
946 m32r*:Linux:*:*)
947 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
948 exit ;;
949 m68*:Linux:*:*)
950 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
951 exit ;;
952 mips:Linux:*:* | mips64:Linux:*:*)
953 eval $set_cc_for_build
954 sed 's/^ //' << EOF >$dummy.c
955 #undef CPU
956 #undef ${UNAME_MACHINE}
957 #undef ${UNAME_MACHINE}el
958 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
959 CPU=${UNAME_MACHINE}el
960 #else
961 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
962 CPU=${UNAME_MACHINE}
963 #else
964 CPU=
965 #endif
966 #endif
967 EOF
968 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
969 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
970 ;;
971 or1k:Linux:*:*)
972 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 exit ;;
974 or32:Linux:*:*)
975 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 exit ;;
977 padre:Linux:*:*)
978 echo sparc-unknown-linux-${LIBC}
979 exit ;;
980 parisc64:Linux:*:* | hppa64:Linux:*:*)
981 echo hppa64-unknown-linux-${LIBC}
982 exit ;;
983 parisc:Linux:*:* | hppa:Linux:*:*)
984 # Look for CPU level
985 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
986 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
987 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
988 *) echo hppa-unknown-linux-${LIBC} ;;
989 esac
990 exit ;;
991 ppc64:Linux:*:*)
992 echo powerpc64-unknown-linux-${LIBC}
993 exit ;;
994 ppc:Linux:*:*)
995 echo powerpc-unknown-linux-${LIBC}
996 exit ;;
997 ppc64le:Linux:*:*)
998 echo powerpc64le-unknown-linux-${LIBC}
999 exit ;;
1000 ppcle:Linux:*:*)
1001 echo powerpcle-unknown-linux-${LIBC}
1002 exit ;;
1003 s390:Linux:*:* | s390x:Linux:*:*)
1004 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1005 exit ;;
1006 sh64*:Linux:*:*)
1007 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1008 exit ;;
1009 sh*:Linux:*:*)
1010 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1011 exit ;;
1012 sparc:Linux:*:* | sparc64:Linux:*:*)
1013 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1014 exit ;;
1015 tile*:Linux:*:*)
1016 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1017 exit ;;
1018 vax:Linux:*:*)
1019 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1020 exit ;;
1021 x86_64:Linux:*:*)
1022 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1023 exit ;;
1024 xtensa*:Linux:*:*)
1025 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1026 exit ;;
1027 i*86:DYNIX/ptx:4*:*)
1028 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1029 # earlier versions are messed up and put the nodename in both
1030 # sysname and nodename.
1031 echo i386-sequent-sysv4
1032 exit ;;
1033 i*86:UNIX_SV:4.2MP:2.*)
1034 # Unixware is an offshoot of SVR4, but it has its own version
1035 # number series starting with 2...
1036 # I am not positive that other SVR4 systems won't match this,
1037 # I just have to hope. -- rms.
1038 # Use sysv4.2uw... so that sysv4* matches it.
1039 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1040 exit ;;
1041 i*86:OS/2:*:*)
1042 # If we were able to find `uname', then EMX Unix compatibility
1043 # is probably installed.
1044 echo ${UNAME_MACHINE}-pc-os2-emx
1045 exit ;;
1046 i*86:XTS-300:*:STOP)
1047 echo ${UNAME_MACHINE}-unknown-stop
1048 exit ;;
1049 i*86:atheos:*:*)
1050 echo ${UNAME_MACHINE}-unknown-atheos
1051 exit ;;
1052 i*86:syllable:*:*)
1053 echo ${UNAME_MACHINE}-pc-syllable
1054 exit ;;
1055 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1056 echo i386-unknown-lynxos${UNAME_RELEASE}
1057 exit ;;
1058 i*86:*DOS:*:*)
1059 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1060 exit ;;
1061 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1062 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1063 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1064 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1065 else
1066 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1067 fi
1068 exit ;;
1069 i*86:*:5:[678]*)
1070 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1071 case `/bin/uname -X | grep "^Machine"` in
1072 *486*) UNAME_MACHINE=i486 ;;
1073 *Pentium) UNAME_MACHINE=i586 ;;
1074 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1075 esac
1076 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1077 exit ;;
1078 i*86:*:3.2:*)
1079 if test -f /usr/options/cb.name; then
1080 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1081 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1082 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1083 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1084 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1085 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1086 && UNAME_MACHINE=i586
1087 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1088 && UNAME_MACHINE=i686
1089 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1090 && UNAME_MACHINE=i686
1091 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1092 else
1093 echo ${UNAME_MACHINE}-pc-sysv32
1094 fi
1095 exit ;;
1096 pc:*:*:*)
1097 # Left here for compatibility:
1098 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1099 # the processor, so we play safe by assuming i586.
1100 # Note: whatever this is, it MUST be the same as what config.sub
1101 # prints for the "djgpp" host, or else GDB configury will decide that
1102 # this is a cross-build.
1103 echo i586-pc-msdosdjgpp
1104 exit ;;
1105 Intel:Mach:3*:*)
1106 echo i386-pc-mach3
1107 exit ;;
1108 paragon:*:*:*)
1109 echo i860-intel-osf1
1110 exit ;;
1111 i860:*:4.*:*) # i860-SVR4
1112 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1113 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1114 else # Add other i860-SVR4 vendors below as they are discovered.
1115 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1116 fi
1117 exit ;;
1118 mini*:CTIX:SYS*5:*)
1119 # "miniframe"
1120 echo m68010-convergent-sysv
1121 exit ;;
1122 mc68k:UNIX:SYSTEM5:3.51m)
1123 echo m68k-convergent-sysv
1124 exit ;;
1125 M680?0:D-NIX:5.3:*)
1126 echo m68k-diab-dnix
1127 exit ;;
1128 M68*:*:R3V[5678]*:*)
1129 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1130 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)
1131 OS_REL=''
1132 test -r /etc/.relid \
1133 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1134 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1135 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1136 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1137 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1138 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1139 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1140 && { echo i486-ncr-sysv4; exit; } ;;
1141 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1142 OS_REL='.3'
1143 test -r /etc/.relid \
1144 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1145 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1146 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1147 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1148 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1149 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1150 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1151 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1152 echo m68k-unknown-lynxos${UNAME_RELEASE}
1153 exit ;;
1154 mc68030:UNIX_System_V:4.*:*)
1155 echo m68k-atari-sysv4
1156 exit ;;
1157 TSUNAMI:LynxOS:2.*:*)
1158 echo sparc-unknown-lynxos${UNAME_RELEASE}
1159 exit ;;
1160 rs6000:LynxOS:2.*:*)
1161 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1162 exit ;;
1163 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1164 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1165 exit ;;
1166 SM[BE]S:UNIX_SV:*:*)
1167 echo mips-dde-sysv${UNAME_RELEASE}
1168 exit ;;
1169 RM*:ReliantUNIX-*:*:*)
1170 echo mips-sni-sysv4
1171 exit ;;
1172 RM*:SINIX-*:*:*)
1173 echo mips-sni-sysv4
1174 exit ;;
1175 *:SINIX-*:*:*)
1176 if uname -p 2>/dev/null >/dev/null ; then
1177 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1178 echo ${UNAME_MACHINE}-sni-sysv4
1179 else
1180 echo ns32k-sni-sysv
1181 fi
1182 exit ;;
1183 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1184 # says <Richard.M.Bartel@ccMail.Census.GOV>
1185 echo i586-unisys-sysv4
1186 exit ;;
1187 *:UNIX_System_V:4*:FTX*)
1188 # From Gerald Hewes <hewes@openmarket.com>.
1189 # How about differentiating between stratus architectures? -djm
1190 echo hppa1.1-stratus-sysv4
1191 exit ;;
1192 *:*:*:FTX*)
1193 # From seanf@swdc.stratus.com.
1194 echo i860-stratus-sysv4
1195 exit ;;
1196 i*86:VOS:*:*)
1197 # From Paul.Green@stratus.com.
1198 echo ${UNAME_MACHINE}-stratus-vos
1199 exit ;;
1200 *:VOS:*:*)
1201 # From Paul.Green@stratus.com.
1202 echo hppa1.1-stratus-vos
1203 exit ;;
1204 mc68*:A/UX:*:*)
1205 echo m68k-apple-aux${UNAME_RELEASE}
1206 exit ;;
1207 news*:NEWS-OS:6*:*)
1208 echo mips-sony-newsos6
1209 exit ;;
1210 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1211 if [ -d /usr/nec ]; then
1212 echo mips-nec-sysv${UNAME_RELEASE}
1213 else
1214 echo mips-unknown-sysv${UNAME_RELEASE}
1215 fi
1216 exit ;;
1217 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1218 echo powerpc-be-beos
1219 exit ;;
1220 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1221 echo powerpc-apple-beos
1222 exit ;;
1223 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1224 echo i586-pc-beos
1225 exit ;;
1226 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1227 echo i586-pc-haiku
1228 exit ;;
1229 x86_64:Haiku:*:*)
1230 echo x86_64-unknown-haiku
1231 exit ;;
1232 SX-4:SUPER-UX:*:*)
1233 echo sx4-nec-superux${UNAME_RELEASE}
1234 exit ;;
1235 SX-5:SUPER-UX:*:*)
1236 echo sx5-nec-superux${UNAME_RELEASE}
1237 exit ;;
1238 SX-6:SUPER-UX:*:*)
1239 echo sx6-nec-superux${UNAME_RELEASE}
1240 exit ;;
1241 SX-7:SUPER-UX:*:*)
1242 echo sx7-nec-superux${UNAME_RELEASE}
1243 exit ;;
1244 SX-8:SUPER-UX:*:*)
1245 echo sx8-nec-superux${UNAME_RELEASE}
1246 exit ;;
1247 SX-8R:SUPER-UX:*:*)
1248 echo sx8r-nec-superux${UNAME_RELEASE}
1249 exit ;;
1250 Power*:Rhapsody:*:*)
1251 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1252 exit ;;
1253 *:Rhapsody:*:*)
1254 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1255 exit ;;
1256 *:Darwin:*:*)
1257 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1258 eval $set_cc_for_build
1259 if test "$UNAME_PROCESSOR" = unknown ; then
1260 UNAME_PROCESSOR=powerpc
1261 fi
1262 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1263 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1264 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1265 grep IS_64BIT_ARCH >/dev/null
1266 then
1267 case $UNAME_PROCESSOR in
1268 i386) UNAME_PROCESSOR=x86_64 ;;
1269 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1270 esac
1271 fi
1272 fi
1273 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1274 exit ;;
1275 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1276 UNAME_PROCESSOR=`uname -p`
1277 if test "$UNAME_PROCESSOR" = "x86"; then
1278 UNAME_PROCESSOR=i386
1279 UNAME_MACHINE=pc
1280 fi
1281 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1282 exit ;;
1283 *:QNX:*:4*)
1284 echo i386-pc-qnx
1285 exit ;;
1286 NEO-?:NONSTOP_KERNEL:*:*)
1287 echo neo-tandem-nsk${UNAME_RELEASE}
1288 exit ;;
1289 NSE-*:NONSTOP_KERNEL:*:*)
1290 echo nse-tandem-nsk${UNAME_RELEASE}
1291 exit ;;
1292 NSR-?:NONSTOP_KERNEL:*:*)
1293 echo nsr-tandem-nsk${UNAME_RELEASE}
1294 exit ;;
1295 *:NonStop-UX:*:*)
1296 echo mips-compaq-nonstopux
1297 exit ;;
1298 BS2000:POSIX*:*:*)
1299 echo bs2000-siemens-sysv
1300 exit ;;
1301 DS/*:UNIX_System_V:*:*)
1302 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1303 exit ;;
1304 *:Plan9:*:*)
1305 # "uname -m" is not consistent, so use $cputype instead. 386
1306 # is converted to i386 for consistency with other x86
1307 # operating systems.
1308 if test "$cputype" = "386"; then
1309 UNAME_MACHINE=i386
1310 else
1311 UNAME_MACHINE="$cputype"
1312 fi
1313 echo ${UNAME_MACHINE}-unknown-plan9
1314 exit ;;
1315 *:TOPS-10:*:*)
1316 echo pdp10-unknown-tops10
1317 exit ;;
1318 *:TENEX:*:*)
1319 echo pdp10-unknown-tenex
1320 exit ;;
1321 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1322 echo pdp10-dec-tops20
1323 exit ;;
1324 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1325 echo pdp10-xkl-tops20
1326 exit ;;
1327 *:TOPS-20:*:*)
1328 echo pdp10-unknown-tops20
1329 exit ;;
1330 *:ITS:*:*)
1331 echo pdp10-unknown-its
1332 exit ;;
1333 SEI:*:*:SEIUX)
1334 echo mips-sei-seiux${UNAME_RELEASE}
1335 exit ;;
1336 *:DragonFly:*:*)
1337 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1338 exit ;;
1339 *:*VMS:*:*)
1340 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1341 case "${UNAME_MACHINE}" in
1342 A*) echo alpha-dec-vms ; exit ;;
1343 I*) echo ia64-dec-vms ; exit ;;
1344 V*) echo vax-dec-vms ; exit ;;
1345 esac ;;
1346 *:XENIX:*:SysV)
1347 echo i386-pc-xenix
1348 exit ;;
1349 i*86:skyos:*:*)
1350 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1351 exit ;;
1352 i*86:rdos:*:*)
1353 echo ${UNAME_MACHINE}-pc-rdos
1354 exit ;;
1355 i*86:AROS:*:*)
1356 echo ${UNAME_MACHINE}-pc-aros
1357 exit ;;
1358 x86_64:VMkernel:*:*)
1359 echo ${UNAME_MACHINE}-unknown-esx
1360 exit ;;
1361 esac
1362
1363 eval $set_cc_for_build
1364 cat >$dummy.c <<EOF
1365 #ifdef _SEQUENT_
1366 # include <sys/types.h>
1367 # include <sys/utsname.h>
1368 #endif
1369 main ()
1370 {
1371 #if defined (sony)
1372 #if defined (MIPSEB)
1373 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1374 I don't know.... */
1375 printf ("mips-sony-bsd\n"); exit (0);
1376 #else
1377 #include <sys/param.h>
1378 printf ("m68k-sony-newsos%s\n",
1379 #ifdef NEWSOS4
1380 "4"
1381 #else
1382 ""
1383 #endif
1384 ); exit (0);
1385 #endif
1386 #endif
1387
1388 #if defined (__arm) && defined (__acorn) && defined (__unix)
1389 printf ("arm-acorn-riscix\n"); exit (0);
1390 #endif
1391
1392 #if defined (hp300) && !defined (hpux)
1393 printf ("m68k-hp-bsd\n"); exit (0);
1394 #endif
1395
1396 #if defined (NeXT)
1397 #if !defined (__ARCHITECTURE__)
1398 #define __ARCHITECTURE__ "m68k"
1399 #endif
1400 int version;
1401 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1402 if (version < 4)
1403 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1404 else
1405 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1406 exit (0);
1407 #endif
1408
1409 #if defined (MULTIMAX) || defined (n16)
1410 #if defined (UMAXV)
1411 printf ("ns32k-encore-sysv\n"); exit (0);
1412 #else
1413 #if defined (CMU)
1414 printf ("ns32k-encore-mach\n"); exit (0);
1415 #else
1416 printf ("ns32k-encore-bsd\n"); exit (0);
1417 #endif
1418 #endif
1419 #endif
1420
1421 #if defined (__386BSD__)
1422 printf ("i386-pc-bsd\n"); exit (0);
1423 #endif
1424
1425 #if defined (sequent)
1426 #if defined (i386)
1427 printf ("i386-sequent-dynix\n"); exit (0);
1428 #endif
1429 #if defined (ns32000)
1430 printf ("ns32k-sequent-dynix\n"); exit (0);
1431 #endif
1432 #endif
1433
1434 #if defined (_SEQUENT_)
1435 struct utsname un;
1436
1437 uname(&un);
1438
1439 if (strncmp(un.version, "V2", 2) == 0) {
1440 printf ("i386-sequent-ptx2\n"); exit (0);
1441 }
1442 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1443 printf ("i386-sequent-ptx1\n"); exit (0);
1444 }
1445 printf ("i386-sequent-ptx\n"); exit (0);
1446
1447 #endif
1448
1449 #if defined (vax)
1450 # if !defined (ultrix)
1451 # include <sys/param.h>
1452 # if defined (BSD)
1453 # if BSD == 43
1454 printf ("vax-dec-bsd4.3\n"); exit (0);
1455 # else
1456 # if BSD == 199006
1457 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1458 # else
1459 printf ("vax-dec-bsd\n"); exit (0);
1460 # endif
1461 # endif
1462 # else
1463 printf ("vax-dec-bsd\n"); exit (0);
1464 # endif
1465 # else
1466 printf ("vax-dec-ultrix\n"); exit (0);
1467 # endif
1468 #endif
1469
1470 #if defined (alliant) && defined (i860)
1471 printf ("i860-alliant-bsd\n"); exit (0);
1472 #endif
1473
1474 exit (1);
1475 }
1476 EOF
1477
1478 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1479 { echo "$SYSTEM_NAME"; exit; }
1480
1481 # Apollos put the system type in the environment.
1482
1483 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1484
1485 # Convex versions that predate uname can use getsysinfo(1)
1486
1487 if [ -x /usr/convex/getsysinfo ]
1488 then
1489 case `getsysinfo -f cpu_type` in
1490 c1*)
1491 echo c1-convex-bsd
1492 exit ;;
1493 c2*)
1494 if getsysinfo -f scalar_acc
1495 then echo c32-convex-bsd
1496 else echo c2-convex-bsd
1497 fi
1498 exit ;;
1499 c34*)
1500 echo c34-convex-bsd
1501 exit ;;
1502 c38*)
1503 echo c38-convex-bsd
1504 exit ;;
1505 c4*)
1506 echo c4-convex-bsd
1507 exit ;;
1508 esac
1509 fi
1510
1511 cat >&2 <<EOF
1512 $0: unable to guess system type
1513
1514 This script, last modified $timestamp, has failed to recognize
1515 the operating system you are using. It is advised that you
1516 download the most up to date version of the config scripts from
1517
1518 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1519 and
1520 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1521
1522 If the version you run ($0) is already up to date, please
1523 send the following data and any information you think might be
1524 pertinent to <config-patches@gnu.org> in order to provide the needed
1525 information to handle your system.
1526
1527 config.guess timestamp = $timestamp
1528
1529 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1530 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1531 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1532 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1533
1534 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1535 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1536
1537 hostinfo = `(hostinfo) 2>/dev/null`
1538 /bin/universe = `(/bin/universe) 2>/dev/null`
1539 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1540 /bin/arch = `(/bin/arch) 2>/dev/null`
1541 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1542 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1543
1544 UNAME_MACHINE = ${UNAME_MACHINE}
1545 UNAME_RELEASE = ${UNAME_RELEASE}
1546 UNAME_SYSTEM = ${UNAME_SYSTEM}
1547 UNAME_VERSION = ${UNAME_VERSION}
1548 EOF
1549
1550 exit 1
1551
1552 # Local variables:
1553 # eval: (add-hook 'write-file-hooks 'time-stamp)
1554 # time-stamp-start: "timestamp='"
1555 # time-stamp-format: "%:y-%02m-%02d"
1556 # time-stamp-end: "'"
1557 # End:
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if you have the <dlfcn.h> header file. */
3 #undef HAVE_DLFCN_H
4
5 /* Define to 1 if you have the <inttypes.h> header file. */
6 #undef HAVE_INTTYPES_H
7
8 /* Define to 1 if you have the <memory.h> header file. */
9 #undef HAVE_MEMORY_H
10
11 /* Define to 1 if you have the <stdint.h> header file. */
12 #undef HAVE_STDINT_H
13
14 /* Define to 1 if you have the <stdlib.h> header file. */
15 #undef HAVE_STDLIB_H
16
17 /* Define to 1 if you have the <strings.h> header file. */
18 #undef HAVE_STRINGS_H
19
20 /* Define to 1 if you have the <string.h> header file. */
21 #undef HAVE_STRING_H
22
23 /* Define to 1 if you have the <sys/stat.h> header file. */
24 #undef HAVE_SYS_STAT_H
25
26 /* Define to 1 if you have the <sys/types.h> header file. */
27 #undef HAVE_SYS_TYPES_H
28
29 /* Define to 1 if you have the <unistd.h> header file. */
30 #undef HAVE_UNISTD_H
31
32 /* Define to the sub-directory in which libtool stores uninstalled libraries.
33 */
34 #undef LT_OBJDIR
35
36 /* Name of package */
37 #undef PACKAGE
38
39 /* Define to the address where bug reports for this package should be sent. */
40 #undef PACKAGE_BUGREPORT
41
42 /* Define to the full name of this package. */
43 #undef PACKAGE_NAME
44
45 /* Define to the full name and version of this package. */
46 #undef PACKAGE_STRING
47
48 /* Define to the one symbol short name of this package. */
49 #undef PACKAGE_TARNAME
50
51 /* Define to the home page for this package. */
52 #undef PACKAGE_URL
53
54 /* Define to the version of this package. */
55 #undef PACKAGE_VERSION
56
57 /* Define to 1 if you have the ANSI C header files. */
58 #undef STDC_HEADERS
59
60 /* Version number of package */
61 #undef VERSION
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-08-10'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 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, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # 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, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
28 #
29 # Configuration subroutine to validate and canonicalize a configuration type.
30 # Supply the specified configuration type as an argument.
31 # If it is invalid, we print an error message on stderr and exit with code 1.
32 # Otherwise, we print the canonical config type on stdout and succeed.
33
34 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
36
37 # This file is supposed to be the same for all GNU packages
38 # and recognize all the CPU types, system types and aliases
39 # that are meaningful with *any* GNU software.
40 # Each package is responsible for reporting which valid configurations
41 # it does not support. The user should be able to distinguish
42 # a failure to support a valid configuration from a meaningless
43 # configuration.
44
45 # The goal of this file is to map all the various variations of a given
46 # machine specification into a single specification in the form:
47 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
48 # or in some cases, the newer four-part form:
49 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
50 # It is wrong to echo any other type of specification.
51
52 me=`echo "$0" | sed -e 's,.*/,,'`
53
54 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS
56 $0 [OPTION] ALIAS
57
58 Canonicalize a configuration name.
59
60 Operation modes:
61 -h, --help print this help, then exit
62 -t, --time-stamp print date of last modification, then exit
63 -v, --version print version number, then exit
64
65 Report bugs and patches to <config-patches@gnu.org>."
66
67 version="\
68 GNU config.sub ($timestamp)
69
70 Copyright 1992-2013 Free Software Foundation, Inc.
71
72 This is free software; see the source for copying conditions. There is NO
73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
74
75 help="
76 Try \`$me --help' for more information."
77
78 # Parse command line
79 while test $# -gt 0 ; do
80 case $1 in
81 --time-stamp | --time* | -t )
82 echo "$timestamp" ; exit ;;
83 --version | -v )
84 echo "$version" ; exit ;;
85 --help | --h* | -h )
86 echo "$usage"; exit ;;
87 -- ) # Stop option processing
88 shift; break ;;
89 - ) # Use stdin as input.
90 break ;;
91 -* )
92 echo "$me: invalid option $1$help"
93 exit 1 ;;
94
95 *local*)
96 # First pass through any local machine types.
97 echo $1
98 exit ;;
99
100 * )
101 break ;;
102 esac
103 done
104
105 case $# in
106 0) echo "$me: missing argument$help" >&2
107 exit 1;;
108 1) ;;
109 *) echo "$me: too many arguments$help" >&2
110 exit 1;;
111 esac
112
113 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114 # Here we must recognize all the valid KERNEL-OS combinations.
115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116 case $maybe_os in
117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | \
120 kopensolaris*-gnu* | \
121 storm-chaos* | os2-emx* | rtmk-nova*)
122 os=-$maybe_os
123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124 ;;
125 android-linux)
126 os=-linux-android
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
135 esac
136
137 ### Let's recognize common machines as not being operating systems so
138 ### that things like config.sub decstation-3100 work. We also
139 ### recognize some manufacturers as not being operating systems, so we
140 ### can provide default operating systems below.
141 case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray | -microblaze*)
152 os=
153 basic_machine=$1
154 ;;
155 -bluegene*)
156 os=-cnk
157 ;;
158 -sim | -cisco | -oki | -wec | -winbond)
159 os=
160 basic_machine=$1
161 ;;
162 -scout)
163 ;;
164 -wrs)
165 os=-vxworks
166 basic_machine=$1
167 ;;
168 -chorusos*)
169 os=-chorusos
170 basic_machine=$1
171 ;;
172 -chorusrdb)
173 os=-chorusrdb
174 basic_machine=$1
175 ;;
176 -hiux*)
177 os=-hiuxwe2
178 ;;
179 -sco6)
180 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco5)
184 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco4)
188 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2.[4-9]*)
192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco3.2v[4-9]*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco5v6*)
200 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -sco*)
204 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -isc)
211 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 ;;
214 -clix*)
215 basic_machine=clipper-intergraph
216 ;;
217 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
219 ;;
220 -lynx*178)
221 os=-lynxos178
222 ;;
223 -lynx*5)
224 os=-lynxos5
225 ;;
226 -lynx*)
227 os=-lynxos
228 ;;
229 -ptx*)
230 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231 ;;
232 -windowsnt*)
233 os=`echo $os | sed -e 's/windowsnt/winnt/'`
234 ;;
235 -psos*)
236 os=-psos
237 ;;
238 -mint | -mint[0-9]*)
239 basic_machine=m68k-atari
240 os=-mint
241 ;;
242 esac
243
244 # Decode aliases for certain CPU-COMPANY combinations.
245 case $basic_machine in
246 # Recognize the basic CPU types without company name.
247 # Some are omitted here because they have special meanings below.
248 1750a | 580 \
249 | a29k \
250 | aarch64 | aarch64_be \
251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
253 | am33_2.0 \
254 | arc | arceb \
255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256 | avr | avr32 \
257 | be32 | be64 \
258 | bfin \
259 | c4x | c8051 | clipper \
260 | d10v | d30v | dlx | dsp16xx \
261 | epiphany \
262 | fido | fr30 | frv \
263 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264 | hexagon \
265 | i370 | i860 | i960 | ia64 \
266 | ip2k | iq2000 \
267 | le32 | le64 \
268 | lm32 \
269 | m32c | m32r | m32rle | m68000 | m68k | m88k \
270 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
271 | mips | mipsbe | mipseb | mipsel | mipsle \
272 | mips16 \
273 | mips64 | mips64el \
274 | mips64octeon | mips64octeonel \
275 | mips64orion | mips64orionel \
276 | mips64r5900 | mips64r5900el \
277 | mips64vr | mips64vrel \
278 | mips64vr4100 | mips64vr4100el \
279 | mips64vr4300 | mips64vr4300el \
280 | mips64vr5000 | mips64vr5000el \
281 | mips64vr5900 | mips64vr5900el \
282 | mipsisa32 | mipsisa32el \
283 | mipsisa32r2 | mipsisa32r2el \
284 | mipsisa64 | mipsisa64el \
285 | mipsisa64r2 | mipsisa64r2el \
286 | mipsisa64sb1 | mipsisa64sb1el \
287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipsr5900 | mipsr5900el \
289 | mipstx39 | mipstx39el \
290 | mn10200 | mn10300 \
291 | moxie \
292 | mt \
293 | msp430 \
294 | nds32 | nds32le | nds32be \
295 | nios | nios2 | nios2eb | nios2el \
296 | ns16k | ns32k \
297 | open8 \
298 | or1k | or32 \
299 | pdp10 | pdp11 | pj | pjl \
300 | powerpc | powerpc64 | powerpc64le | powerpcle \
301 | pyramid \
302 | rl78 | rx \
303 | score \
304 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
305 | sh64 | sh64le \
306 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
307 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
308 | spu \
309 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
310 | ubicom32 \
311 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
312 | we32k \
313 | x86 | xc16x | xstormy16 | xtensa \
314 | z8k | z80)
315 basic_machine=$basic_machine-unknown
316 ;;
317 c54x)
318 basic_machine=tic54x-unknown
319 ;;
320 c55x)
321 basic_machine=tic55x-unknown
322 ;;
323 c6x)
324 basic_machine=tic6x-unknown
325 ;;
326 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
327 basic_machine=$basic_machine-unknown
328 os=-none
329 ;;
330 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
331 ;;
332 ms1)
333 basic_machine=mt-unknown
334 ;;
335
336 strongarm | thumb | xscale)
337 basic_machine=arm-unknown
338 ;;
339 xgate)
340 basic_machine=$basic_machine-unknown
341 os=-none
342 ;;
343 xscaleeb)
344 basic_machine=armeb-unknown
345 ;;
346
347 xscaleel)
348 basic_machine=armel-unknown
349 ;;
350
351 # We use `pc' rather than `unknown'
352 # because (1) that's what they normally are, and
353 # (2) the word "unknown" tends to confuse beginning users.
354 i*86 | x86_64)
355 basic_machine=$basic_machine-pc
356 ;;
357 # Object if more than one company name word.
358 *-*-*)
359 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
360 exit 1
361 ;;
362 # Recognize the basic CPU types with company name.
363 580-* \
364 | a29k-* \
365 | aarch64-* | aarch64_be-* \
366 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
367 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
368 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
369 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
370 | avr-* | avr32-* \
371 | be32-* | be64-* \
372 | bfin-* | bs2000-* \
373 | c[123]* | c30-* | [cjt]90-* | c4x-* \
374 | c8051-* | clipper-* | craynv-* | cydra-* \
375 | d10v-* | d30v-* | dlx-* \
376 | elxsi-* \
377 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
378 | h8300-* | h8500-* \
379 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
380 | hexagon-* \
381 | i*86-* | i860-* | i960-* | ia64-* \
382 | ip2k-* | iq2000-* \
383 | le32-* | le64-* \
384 | lm32-* \
385 | m32c-* | m32r-* | m32rle-* \
386 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
387 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
388 | microblaze-* | microblazeel-* \
389 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
390 | mips16-* \
391 | mips64-* | mips64el-* \
392 | mips64octeon-* | mips64octeonel-* \
393 | mips64orion-* | mips64orionel-* \
394 | mips64r5900-* | mips64r5900el-* \
395 | mips64vr-* | mips64vrel-* \
396 | mips64vr4100-* | mips64vr4100el-* \
397 | mips64vr4300-* | mips64vr4300el-* \
398 | mips64vr5000-* | mips64vr5000el-* \
399 | mips64vr5900-* | mips64vr5900el-* \
400 | mipsisa32-* | mipsisa32el-* \
401 | mipsisa32r2-* | mipsisa32r2el-* \
402 | mipsisa64-* | mipsisa64el-* \
403 | mipsisa64r2-* | mipsisa64r2el-* \
404 | mipsisa64sb1-* | mipsisa64sb1el-* \
405 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
406 | mipsr5900-* | mipsr5900el-* \
407 | mipstx39-* | mipstx39el-* \
408 | mmix-* \
409 | mt-* \
410 | msp430-* \
411 | nds32-* | nds32le-* | nds32be-* \
412 | nios-* | nios2-* | nios2eb-* | nios2el-* \
413 | none-* | np1-* | ns16k-* | ns32k-* \
414 | open8-* \
415 | orion-* \
416 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
417 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
418 | pyramid-* \
419 | rl78-* | romp-* | rs6000-* | rx-* \
420 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
421 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
422 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
423 | sparclite-* \
424 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
425 | tahoe-* \
426 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
427 | tile*-* \
428 | tron-* \
429 | ubicom32-* \
430 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
431 | vax-* \
432 | we32k-* \
433 | x86-* | x86_64-* | xc16x-* | xps100-* \
434 | xstormy16-* | xtensa*-* \
435 | ymp-* \
436 | z8k-* | z80-*)
437 ;;
438 # Recognize the basic CPU types without company name, with glob match.
439 xtensa*)
440 basic_machine=$basic_machine-unknown
441 ;;
442 # Recognize the various machine names and aliases which stand
443 # for a CPU type and a company and sometimes even an OS.
444 386bsd)
445 basic_machine=i386-unknown
446 os=-bsd
447 ;;
448 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
449 basic_machine=m68000-att
450 ;;
451 3b*)
452 basic_machine=we32k-att
453 ;;
454 a29khif)
455 basic_machine=a29k-amd
456 os=-udi
457 ;;
458 abacus)
459 basic_machine=abacus-unknown
460 ;;
461 adobe68k)
462 basic_machine=m68010-adobe
463 os=-scout
464 ;;
465 alliant | fx80)
466 basic_machine=fx80-alliant
467 ;;
468 altos | altos3068)
469 basic_machine=m68k-altos
470 ;;
471 am29k)
472 basic_machine=a29k-none
473 os=-bsd
474 ;;
475 amd64)
476 basic_machine=x86_64-pc
477 ;;
478 amd64-*)
479 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
480 ;;
481 amdahl)
482 basic_machine=580-amdahl
483 os=-sysv
484 ;;
485 amiga | amiga-*)
486 basic_machine=m68k-unknown
487 ;;
488 amigaos | amigados)
489 basic_machine=m68k-unknown
490 os=-amigaos
491 ;;
492 amigaunix | amix)
493 basic_machine=m68k-unknown
494 os=-sysv4
495 ;;
496 apollo68)
497 basic_machine=m68k-apollo
498 os=-sysv
499 ;;
500 apollo68bsd)
501 basic_machine=m68k-apollo
502 os=-bsd
503 ;;
504 aros)
505 basic_machine=i386-pc
506 os=-aros
507 ;;
508 aux)
509 basic_machine=m68k-apple
510 os=-aux
511 ;;
512 balance)
513 basic_machine=ns32k-sequent
514 os=-dynix
515 ;;
516 blackfin)
517 basic_machine=bfin-unknown
518 os=-linux
519 ;;
520 blackfin-*)
521 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
522 os=-linux
523 ;;
524 bluegene*)
525 basic_machine=powerpc-ibm
526 os=-cnk
527 ;;
528 c54x-*)
529 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
530 ;;
531 c55x-*)
532 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
533 ;;
534 c6x-*)
535 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
536 ;;
537 c90)
538 basic_machine=c90-cray
539 os=-unicos
540 ;;
541 cegcc)
542 basic_machine=arm-unknown
543 os=-cegcc
544 ;;
545 convex-c1)
546 basic_machine=c1-convex
547 os=-bsd
548 ;;
549 convex-c2)
550 basic_machine=c2-convex
551 os=-bsd
552 ;;
553 convex-c32)
554 basic_machine=c32-convex
555 os=-bsd
556 ;;
557 convex-c34)
558 basic_machine=c34-convex
559 os=-bsd
560 ;;
561 convex-c38)
562 basic_machine=c38-convex
563 os=-bsd
564 ;;
565 cray | j90)
566 basic_machine=j90-cray
567 os=-unicos
568 ;;
569 craynv)
570 basic_machine=craynv-cray
571 os=-unicosmp
572 ;;
573 cr16 | cr16-*)
574 basic_machine=cr16-unknown
575 os=-elf
576 ;;
577 crds | unos)
578 basic_machine=m68k-crds
579 ;;
580 crisv32 | crisv32-* | etraxfs*)
581 basic_machine=crisv32-axis
582 ;;
583 cris | cris-* | etrax*)
584 basic_machine=cris-axis
585 ;;
586 crx)
587 basic_machine=crx-unknown
588 os=-elf
589 ;;
590 da30 | da30-*)
591 basic_machine=m68k-da30
592 ;;
593 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
594 basic_machine=mips-dec
595 ;;
596 decsystem10* | dec10*)
597 basic_machine=pdp10-dec
598 os=-tops10
599 ;;
600 decsystem20* | dec20*)
601 basic_machine=pdp10-dec
602 os=-tops20
603 ;;
604 delta | 3300 | motorola-3300 | motorola-delta \
605 | 3300-motorola | delta-motorola)
606 basic_machine=m68k-motorola
607 ;;
608 delta88)
609 basic_machine=m88k-motorola
610 os=-sysv3
611 ;;
612 dicos)
613 basic_machine=i686-pc
614 os=-dicos
615 ;;
616 djgpp)
617 basic_machine=i586-pc
618 os=-msdosdjgpp
619 ;;
620 dpx20 | dpx20-*)
621 basic_machine=rs6000-bull
622 os=-bosx
623 ;;
624 dpx2* | dpx2*-bull)
625 basic_machine=m68k-bull
626 os=-sysv3
627 ;;
628 ebmon29k)
629 basic_machine=a29k-amd
630 os=-ebmon
631 ;;
632 elxsi)
633 basic_machine=elxsi-elxsi
634 os=-bsd
635 ;;
636 encore | umax | mmax)
637 basic_machine=ns32k-encore
638 ;;
639 es1800 | OSE68k | ose68k | ose | OSE)
640 basic_machine=m68k-ericsson
641 os=-ose
642 ;;
643 fx2800)
644 basic_machine=i860-alliant
645 ;;
646 genix)
647 basic_machine=ns32k-ns
648 ;;
649 gmicro)
650 basic_machine=tron-gmicro
651 os=-sysv
652 ;;
653 go32)
654 basic_machine=i386-pc
655 os=-go32
656 ;;
657 h3050r* | hiux*)
658 basic_machine=hppa1.1-hitachi
659 os=-hiuxwe2
660 ;;
661 h8300hms)
662 basic_machine=h8300-hitachi
663 os=-hms
664 ;;
665 h8300xray)
666 basic_machine=h8300-hitachi
667 os=-xray
668 ;;
669 h8500hms)
670 basic_machine=h8500-hitachi
671 os=-hms
672 ;;
673 harris)
674 basic_machine=m88k-harris
675 os=-sysv3
676 ;;
677 hp300-*)
678 basic_machine=m68k-hp
679 ;;
680 hp300bsd)
681 basic_machine=m68k-hp
682 os=-bsd
683 ;;
684 hp300hpux)
685 basic_machine=m68k-hp
686 os=-hpux
687 ;;
688 hp3k9[0-9][0-9] | hp9[0-9][0-9])
689 basic_machine=hppa1.0-hp
690 ;;
691 hp9k2[0-9][0-9] | hp9k31[0-9])
692 basic_machine=m68000-hp
693 ;;
694 hp9k3[2-9][0-9])
695 basic_machine=m68k-hp
696 ;;
697 hp9k6[0-9][0-9] | hp6[0-9][0-9])
698 basic_machine=hppa1.0-hp
699 ;;
700 hp9k7[0-79][0-9] | hp7[0-79][0-9])
701 basic_machine=hppa1.1-hp
702 ;;
703 hp9k78[0-9] | hp78[0-9])
704 # FIXME: really hppa2.0-hp
705 basic_machine=hppa1.1-hp
706 ;;
707 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
708 # FIXME: really hppa2.0-hp
709 basic_machine=hppa1.1-hp
710 ;;
711 hp9k8[0-9][13679] | hp8[0-9][13679])
712 basic_machine=hppa1.1-hp
713 ;;
714 hp9k8[0-9][0-9] | hp8[0-9][0-9])
715 basic_machine=hppa1.0-hp
716 ;;
717 hppa-next)
718 os=-nextstep3
719 ;;
720 hppaosf)
721 basic_machine=hppa1.1-hp
722 os=-osf
723 ;;
724 hppro)
725 basic_machine=hppa1.1-hp
726 os=-proelf
727 ;;
728 i370-ibm* | ibm*)
729 basic_machine=i370-ibm
730 ;;
731 i*86v32)
732 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
733 os=-sysv32
734 ;;
735 i*86v4*)
736 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
737 os=-sysv4
738 ;;
739 i*86v)
740 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
741 os=-sysv
742 ;;
743 i*86sol2)
744 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
745 os=-solaris2
746 ;;
747 i386mach)
748 basic_machine=i386-mach
749 os=-mach
750 ;;
751 i386-vsta | vsta)
752 basic_machine=i386-unknown
753 os=-vsta
754 ;;
755 iris | iris4d)
756 basic_machine=mips-sgi
757 case $os in
758 -irix*)
759 ;;
760 *)
761 os=-irix4
762 ;;
763 esac
764 ;;
765 isi68 | isi)
766 basic_machine=m68k-isi
767 os=-sysv
768 ;;
769 m68knommu)
770 basic_machine=m68k-unknown
771 os=-linux
772 ;;
773 m68knommu-*)
774 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
775 os=-linux
776 ;;
777 m88k-omron*)
778 basic_machine=m88k-omron
779 ;;
780 magnum | m3230)
781 basic_machine=mips-mips
782 os=-sysv
783 ;;
784 merlin)
785 basic_machine=ns32k-utek
786 os=-sysv
787 ;;
788 microblaze*)
789 basic_machine=microblaze-xilinx
790 ;;
791 mingw64)
792 basic_machine=x86_64-pc
793 os=-mingw64
794 ;;
795 mingw32)
796 basic_machine=i686-pc
797 os=-mingw32
798 ;;
799 mingw32ce)
800 basic_machine=arm-unknown
801 os=-mingw32ce
802 ;;
803 miniframe)
804 basic_machine=m68000-convergent
805 ;;
806 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
807 basic_machine=m68k-atari
808 os=-mint
809 ;;
810 mips3*-*)
811 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
812 ;;
813 mips3*)
814 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
815 ;;
816 monitor)
817 basic_machine=m68k-rom68k
818 os=-coff
819 ;;
820 morphos)
821 basic_machine=powerpc-unknown
822 os=-morphos
823 ;;
824 msdos)
825 basic_machine=i386-pc
826 os=-msdos
827 ;;
828 ms1-*)
829 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
830 ;;
831 msys)
832 basic_machine=i686-pc
833 os=-msys
834 ;;
835 mvs)
836 basic_machine=i370-ibm
837 os=-mvs
838 ;;
839 nacl)
840 basic_machine=le32-unknown
841 os=-nacl
842 ;;
843 ncr3000)
844 basic_machine=i486-ncr
845 os=-sysv4
846 ;;
847 netbsd386)
848 basic_machine=i386-unknown
849 os=-netbsd
850 ;;
851 netwinder)
852 basic_machine=armv4l-rebel
853 os=-linux
854 ;;
855 news | news700 | news800 | news900)
856 basic_machine=m68k-sony
857 os=-newsos
858 ;;
859 news1000)
860 basic_machine=m68030-sony
861 os=-newsos
862 ;;
863 news-3600 | risc-news)
864 basic_machine=mips-sony
865 os=-newsos
866 ;;
867 necv70)
868 basic_machine=v70-nec
869 os=-sysv
870 ;;
871 next | m*-next )
872 basic_machine=m68k-next
873 case $os in
874 -nextstep* )
875 ;;
876 -ns2*)
877 os=-nextstep2
878 ;;
879 *)
880 os=-nextstep3
881 ;;
882 esac
883 ;;
884 nh3000)
885 basic_machine=m68k-harris
886 os=-cxux
887 ;;
888 nh[45]000)
889 basic_machine=m88k-harris
890 os=-cxux
891 ;;
892 nindy960)
893 basic_machine=i960-intel
894 os=-nindy
895 ;;
896 mon960)
897 basic_machine=i960-intel
898 os=-mon960
899 ;;
900 nonstopux)
901 basic_machine=mips-compaq
902 os=-nonstopux
903 ;;
904 np1)
905 basic_machine=np1-gould
906 ;;
907 neo-tandem)
908 basic_machine=neo-tandem
909 ;;
910 nse-tandem)
911 basic_machine=nse-tandem
912 ;;
913 nsr-tandem)
914 basic_machine=nsr-tandem
915 ;;
916 op50n-* | op60c-*)
917 basic_machine=hppa1.1-oki
918 os=-proelf
919 ;;
920 openrisc | openrisc-*)
921 basic_machine=or32-unknown
922 ;;
923 os400)
924 basic_machine=powerpc-ibm
925 os=-os400
926 ;;
927 OSE68000 | ose68000)
928 basic_machine=m68000-ericsson
929 os=-ose
930 ;;
931 os68k)
932 basic_machine=m68k-none
933 os=-os68k
934 ;;
935 pa-hitachi)
936 basic_machine=hppa1.1-hitachi
937 os=-hiuxwe2
938 ;;
939 paragon)
940 basic_machine=i860-intel
941 os=-osf
942 ;;
943 parisc)
944 basic_machine=hppa-unknown
945 os=-linux
946 ;;
947 parisc-*)
948 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
949 os=-linux
950 ;;
951 pbd)
952 basic_machine=sparc-tti
953 ;;
954 pbb)
955 basic_machine=m68k-tti
956 ;;
957 pc532 | pc532-*)
958 basic_machine=ns32k-pc532
959 ;;
960 pc98)
961 basic_machine=i386-pc
962 ;;
963 pc98-*)
964 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
965 ;;
966 pentium | p5 | k5 | k6 | nexgen | viac3)
967 basic_machine=i586-pc
968 ;;
969 pentiumpro | p6 | 6x86 | athlon | athlon_*)
970 basic_machine=i686-pc
971 ;;
972 pentiumii | pentium2 | pentiumiii | pentium3)
973 basic_machine=i686-pc
974 ;;
975 pentium4)
976 basic_machine=i786-pc
977 ;;
978 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
979 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
980 ;;
981 pentiumpro-* | p6-* | 6x86-* | athlon-*)
982 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
983 ;;
984 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
985 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
986 ;;
987 pentium4-*)
988 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
989 ;;
990 pn)
991 basic_machine=pn-gould
992 ;;
993 power) basic_machine=power-ibm
994 ;;
995 ppc | ppcbe) basic_machine=powerpc-unknown
996 ;;
997 ppc-* | ppcbe-*)
998 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
999 ;;
1000 ppcle | powerpclittle | ppc-le | powerpc-little)
1001 basic_machine=powerpcle-unknown
1002 ;;
1003 ppcle-* | powerpclittle-*)
1004 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1005 ;;
1006 ppc64) basic_machine=powerpc64-unknown
1007 ;;
1008 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1009 ;;
1010 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1011 basic_machine=powerpc64le-unknown
1012 ;;
1013 ppc64le-* | powerpc64little-*)
1014 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1015 ;;
1016 ps2)
1017 basic_machine=i386-ibm
1018 ;;
1019 pw32)
1020 basic_machine=i586-unknown
1021 os=-pw32
1022 ;;
1023 rdos | rdos64)
1024 basic_machine=x86_64-pc
1025 os=-rdos
1026 ;;
1027 rdos32)
1028 basic_machine=i386-pc
1029 os=-rdos
1030 ;;
1031 rom68k)
1032 basic_machine=m68k-rom68k
1033 os=-coff
1034 ;;
1035 rm[46]00)
1036 basic_machine=mips-siemens
1037 ;;
1038 rtpc | rtpc-*)
1039 basic_machine=romp-ibm
1040 ;;
1041 s390 | s390-*)
1042 basic_machine=s390-ibm
1043 ;;
1044 s390x | s390x-*)
1045 basic_machine=s390x-ibm
1046 ;;
1047 sa29200)
1048 basic_machine=a29k-amd
1049 os=-udi
1050 ;;
1051 sb1)
1052 basic_machine=mipsisa64sb1-unknown
1053 ;;
1054 sb1el)
1055 basic_machine=mipsisa64sb1el-unknown
1056 ;;
1057 sde)
1058 basic_machine=mipsisa32-sde
1059 os=-elf
1060 ;;
1061 sei)
1062 basic_machine=mips-sei
1063 os=-seiux
1064 ;;
1065 sequent)
1066 basic_machine=i386-sequent
1067 ;;
1068 sh)
1069 basic_machine=sh-hitachi
1070 os=-hms
1071 ;;
1072 sh5el)
1073 basic_machine=sh5le-unknown
1074 ;;
1075 sh64)
1076 basic_machine=sh64-unknown
1077 ;;
1078 sparclite-wrs | simso-wrs)
1079 basic_machine=sparclite-wrs
1080 os=-vxworks
1081 ;;
1082 sps7)
1083 basic_machine=m68k-bull
1084 os=-sysv2
1085 ;;
1086 spur)
1087 basic_machine=spur-unknown
1088 ;;
1089 st2000)
1090 basic_machine=m68k-tandem
1091 ;;
1092 stratus)
1093 basic_machine=i860-stratus
1094 os=-sysv4
1095 ;;
1096 strongarm-* | thumb-*)
1097 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1098 ;;
1099 sun2)
1100 basic_machine=m68000-sun
1101 ;;
1102 sun2os3)
1103 basic_machine=m68000-sun
1104 os=-sunos3
1105 ;;
1106 sun2os4)
1107 basic_machine=m68000-sun
1108 os=-sunos4
1109 ;;
1110 sun3os3)
1111 basic_machine=m68k-sun
1112 os=-sunos3
1113 ;;
1114 sun3os4)
1115 basic_machine=m68k-sun
1116 os=-sunos4
1117 ;;
1118 sun4os3)
1119 basic_machine=sparc-sun
1120 os=-sunos3
1121 ;;
1122 sun4os4)
1123 basic_machine=sparc-sun
1124 os=-sunos4
1125 ;;
1126 sun4sol2)
1127 basic_machine=sparc-sun
1128 os=-solaris2
1129 ;;
1130 sun3 | sun3-*)
1131 basic_machine=m68k-sun
1132 ;;
1133 sun4)
1134 basic_machine=sparc-sun
1135 ;;
1136 sun386 | sun386i | roadrunner)
1137 basic_machine=i386-sun
1138 ;;
1139 sv1)
1140 basic_machine=sv1-cray
1141 os=-unicos
1142 ;;
1143 symmetry)
1144 basic_machine=i386-sequent
1145 os=-dynix
1146 ;;
1147 t3e)
1148 basic_machine=alphaev5-cray
1149 os=-unicos
1150 ;;
1151 t90)
1152 basic_machine=t90-cray
1153 os=-unicos
1154 ;;
1155 tile*)
1156 basic_machine=$basic_machine-unknown
1157 os=-linux-gnu
1158 ;;
1159 tx39)
1160 basic_machine=mipstx39-unknown
1161 ;;
1162 tx39el)
1163 basic_machine=mipstx39el-unknown
1164 ;;
1165 toad1)
1166 basic_machine=pdp10-xkl
1167 os=-tops20
1168 ;;
1169 tower | tower-32)
1170 basic_machine=m68k-ncr
1171 ;;
1172 tpf)
1173 basic_machine=s390x-ibm
1174 os=-tpf
1175 ;;
1176 udi29k)
1177 basic_machine=a29k-amd
1178 os=-udi
1179 ;;
1180 ultra3)
1181 basic_machine=a29k-nyu
1182 os=-sym1
1183 ;;
1184 v810 | necv810)
1185 basic_machine=v810-nec
1186 os=-none
1187 ;;
1188 vaxv)
1189 basic_machine=vax-dec
1190 os=-sysv
1191 ;;
1192 vms)
1193 basic_machine=vax-dec
1194 os=-vms
1195 ;;
1196 vpp*|vx|vx-*)
1197 basic_machine=f301-fujitsu
1198 ;;
1199 vxworks960)
1200 basic_machine=i960-wrs
1201 os=-vxworks
1202 ;;
1203 vxworks68)
1204 basic_machine=m68k-wrs
1205 os=-vxworks
1206 ;;
1207 vxworks29k)
1208 basic_machine=a29k-wrs
1209 os=-vxworks
1210 ;;
1211 w65*)
1212 basic_machine=w65-wdc
1213 os=-none
1214 ;;
1215 w89k-*)
1216 basic_machine=hppa1.1-winbond
1217 os=-proelf
1218 ;;
1219 xbox)
1220 basic_machine=i686-pc
1221 os=-mingw32
1222 ;;
1223 xps | xps100)
1224 basic_machine=xps100-honeywell
1225 ;;
1226 xscale-* | xscalee[bl]-*)
1227 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1228 ;;
1229 ymp)
1230 basic_machine=ymp-cray
1231 os=-unicos
1232 ;;
1233 z8k-*-coff)
1234 basic_machine=z8k-unknown
1235 os=-sim
1236 ;;
1237 z80-*-coff)
1238 basic_machine=z80-unknown
1239 os=-sim
1240 ;;
1241 none)
1242 basic_machine=none-none
1243 os=-none
1244 ;;
1245
1246 # Here we handle the default manufacturer of certain CPU types. It is in
1247 # some cases the only manufacturer, in others, it is the most popular.
1248 w89k)
1249 basic_machine=hppa1.1-winbond
1250 ;;
1251 op50n)
1252 basic_machine=hppa1.1-oki
1253 ;;
1254 op60c)
1255 basic_machine=hppa1.1-oki
1256 ;;
1257 romp)
1258 basic_machine=romp-ibm
1259 ;;
1260 mmix)
1261 basic_machine=mmix-knuth
1262 ;;
1263 rs6000)
1264 basic_machine=rs6000-ibm
1265 ;;
1266 vax)
1267 basic_machine=vax-dec
1268 ;;
1269 pdp10)
1270 # there are many clones, so DEC is not a safe bet
1271 basic_machine=pdp10-unknown
1272 ;;
1273 pdp11)
1274 basic_machine=pdp11-dec
1275 ;;
1276 we32k)
1277 basic_machine=we32k-att
1278 ;;
1279 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1280 basic_machine=sh-unknown
1281 ;;
1282 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1283 basic_machine=sparc-sun
1284 ;;
1285 cydra)
1286 basic_machine=cydra-cydrome
1287 ;;
1288 orion)
1289 basic_machine=orion-highlevel
1290 ;;
1291 orion105)
1292 basic_machine=clipper-highlevel
1293 ;;
1294 mac | mpw | mac-mpw)
1295 basic_machine=m68k-apple
1296 ;;
1297 pmac | pmac-mpw)
1298 basic_machine=powerpc-apple
1299 ;;
1300 *-unknown)
1301 # Make sure to match an already-canonicalized machine name.
1302 ;;
1303 *)
1304 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1305 exit 1
1306 ;;
1307 esac
1308
1309 # Here we canonicalize certain aliases for manufacturers.
1310 case $basic_machine in
1311 *-digital*)
1312 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1313 ;;
1314 *-commodore*)
1315 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1316 ;;
1317 *)
1318 ;;
1319 esac
1320
1321 # Decode manufacturer-specific aliases for certain operating systems.
1322
1323 if [ x"$os" != x"" ]
1324 then
1325 case $os in
1326 # First match some system type aliases
1327 # that might get confused with valid system types.
1328 # -solaris* is a basic system type, with this one exception.
1329 -auroraux)
1330 os=-auroraux
1331 ;;
1332 -solaris1 | -solaris1.*)
1333 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1334 ;;
1335 -solaris)
1336 os=-solaris2
1337 ;;
1338 -svr4*)
1339 os=-sysv4
1340 ;;
1341 -unixware*)
1342 os=-sysv4.2uw
1343 ;;
1344 -gnu/linux*)
1345 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1346 ;;
1347 # First accept the basic system types.
1348 # The portable systems comes first.
1349 # Each alternative MUST END IN A *, to match a version number.
1350 # -sysv* is not here because it comes later, after sysvr4.
1351 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1352 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1353 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1354 | -sym* | -kopensolaris* | -plan9* \
1355 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1356 | -aos* | -aros* \
1357 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1358 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1359 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1360 | -bitrig* | -openbsd* | -solidbsd* \
1361 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1362 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1363 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1364 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1365 | -chorusos* | -chorusrdb* | -cegcc* \
1366 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1367 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1368 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1369 | -uxpv* | -beos* | -mpeix* | -udk* \
1370 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1371 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1372 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1373 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1374 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1375 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1376 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1377 # Remember, each alternative MUST END IN *, to match a version number.
1378 ;;
1379 -qnx*)
1380 case $basic_machine in
1381 x86-* | i*86-*)
1382 ;;
1383 *)
1384 os=-nto$os
1385 ;;
1386 esac
1387 ;;
1388 -nto-qnx*)
1389 ;;
1390 -nto*)
1391 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1392 ;;
1393 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1394 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1395 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1396 ;;
1397 -mac*)
1398 os=`echo $os | sed -e 's|mac|macos|'`
1399 ;;
1400 -linux-dietlibc)
1401 os=-linux-dietlibc
1402 ;;
1403 -linux*)
1404 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1405 ;;
1406 -sunos5*)
1407 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1408 ;;
1409 -sunos6*)
1410 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1411 ;;
1412 -opened*)
1413 os=-openedition
1414 ;;
1415 -os400*)
1416 os=-os400
1417 ;;
1418 -wince*)
1419 os=-wince
1420 ;;
1421 -osfrose*)
1422 os=-osfrose
1423 ;;
1424 -osf*)
1425 os=-osf
1426 ;;
1427 -utek*)
1428 os=-bsd
1429 ;;
1430 -dynix*)
1431 os=-bsd
1432 ;;
1433 -acis*)
1434 os=-aos
1435 ;;
1436 -atheos*)
1437 os=-atheos
1438 ;;
1439 -syllable*)
1440 os=-syllable
1441 ;;
1442 -386bsd)
1443 os=-bsd
1444 ;;
1445 -ctix* | -uts*)
1446 os=-sysv
1447 ;;
1448 -nova*)
1449 os=-rtmk-nova
1450 ;;
1451 -ns2 )
1452 os=-nextstep2
1453 ;;
1454 -nsk*)
1455 os=-nsk
1456 ;;
1457 # Preserve the version number of sinix5.
1458 -sinix5.*)
1459 os=`echo $os | sed -e 's|sinix|sysv|'`
1460 ;;
1461 -sinix*)
1462 os=-sysv4
1463 ;;
1464 -tpf*)
1465 os=-tpf
1466 ;;
1467 -triton*)
1468 os=-sysv3
1469 ;;
1470 -oss*)
1471 os=-sysv3
1472 ;;
1473 -svr4)
1474 os=-sysv4
1475 ;;
1476 -svr3)
1477 os=-sysv3
1478 ;;
1479 -sysvr4)
1480 os=-sysv4
1481 ;;
1482 # This must come after -sysvr4.
1483 -sysv*)
1484 ;;
1485 -ose*)
1486 os=-ose
1487 ;;
1488 -es1800*)
1489 os=-ose
1490 ;;
1491 -xenix)
1492 os=-xenix
1493 ;;
1494 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1495 os=-mint
1496 ;;
1497 -aros*)
1498 os=-aros
1499 ;;
1500 -zvmoe)
1501 os=-zvmoe
1502 ;;
1503 -dicos*)
1504 os=-dicos
1505 ;;
1506 -nacl*)
1507 ;;
1508 -none)
1509 ;;
1510 *)
1511 # Get rid of the `-' at the beginning of $os.
1512 os=`echo $os | sed 's/[^-]*-//'`
1513 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1514 exit 1
1515 ;;
1516 esac
1517 else
1518
1519 # Here we handle the default operating systems that come with various machines.
1520 # The value should be what the vendor currently ships out the door with their
1521 # machine or put another way, the most popular os provided with the machine.
1522
1523 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1524 # "-sun"), then you have to tell the case statement up towards the top
1525 # that MANUFACTURER isn't an operating system. Otherwise, code above
1526 # will signal an error saying that MANUFACTURER isn't an operating
1527 # system, and we'll never get to this point.
1528
1529 case $basic_machine in
1530 score-*)
1531 os=-elf
1532 ;;
1533 spu-*)
1534 os=-elf
1535 ;;
1536 *-acorn)
1537 os=-riscix1.2
1538 ;;
1539 arm*-rebel)
1540 os=-linux
1541 ;;
1542 arm*-semi)
1543 os=-aout
1544 ;;
1545 c4x-* | tic4x-*)
1546 os=-coff
1547 ;;
1548 c8051-*)
1549 os=-elf
1550 ;;
1551 hexagon-*)
1552 os=-elf
1553 ;;
1554 tic54x-*)
1555 os=-coff
1556 ;;
1557 tic55x-*)
1558 os=-coff
1559 ;;
1560 tic6x-*)
1561 os=-coff
1562 ;;
1563 # This must come before the *-dec entry.
1564 pdp10-*)
1565 os=-tops20
1566 ;;
1567 pdp11-*)
1568 os=-none
1569 ;;
1570 *-dec | vax-*)
1571 os=-ultrix4.2
1572 ;;
1573 m68*-apollo)
1574 os=-domain
1575 ;;
1576 i386-sun)
1577 os=-sunos4.0.2
1578 ;;
1579 m68000-sun)
1580 os=-sunos3
1581 ;;
1582 m68*-cisco)
1583 os=-aout
1584 ;;
1585 mep-*)
1586 os=-elf
1587 ;;
1588 mips*-cisco)
1589 os=-elf
1590 ;;
1591 mips*-*)
1592 os=-elf
1593 ;;
1594 or1k-*)
1595 os=-elf
1596 ;;
1597 or32-*)
1598 os=-coff
1599 ;;
1600 *-tti) # must be before sparc entry or we get the wrong os.
1601 os=-sysv3
1602 ;;
1603 sparc-* | *-sun)
1604 os=-sunos4.1.1
1605 ;;
1606 *-be)
1607 os=-beos
1608 ;;
1609 *-haiku)
1610 os=-haiku
1611 ;;
1612 *-ibm)
1613 os=-aix
1614 ;;
1615 *-knuth)
1616 os=-mmixware
1617 ;;
1618 *-wec)
1619 os=-proelf
1620 ;;
1621 *-winbond)
1622 os=-proelf
1623 ;;
1624 *-oki)
1625 os=-proelf
1626 ;;
1627 *-hp)
1628 os=-hpux
1629 ;;
1630 *-hitachi)
1631 os=-hiux
1632 ;;
1633 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1634 os=-sysv
1635 ;;
1636 *-cbm)
1637 os=-amigaos
1638 ;;
1639 *-dg)
1640 os=-dgux
1641 ;;
1642 *-dolphin)
1643 os=-sysv3
1644 ;;
1645 m68k-ccur)
1646 os=-rtu
1647 ;;
1648 m88k-omron*)
1649 os=-luna
1650 ;;
1651 *-next )
1652 os=-nextstep
1653 ;;
1654 *-sequent)
1655 os=-ptx
1656 ;;
1657 *-crds)
1658 os=-unos
1659 ;;
1660 *-ns)
1661 os=-genix
1662 ;;
1663 i370-*)
1664 os=-mvs
1665 ;;
1666 *-next)
1667 os=-nextstep3
1668 ;;
1669 *-gould)
1670 os=-sysv
1671 ;;
1672 *-highlevel)
1673 os=-bsd
1674 ;;
1675 *-encore)
1676 os=-bsd
1677 ;;
1678 *-sgi)
1679 os=-irix
1680 ;;
1681 *-siemens)
1682 os=-sysv4
1683 ;;
1684 *-masscomp)
1685 os=-rtu
1686 ;;
1687 f30[01]-fujitsu | f700-fujitsu)
1688 os=-uxpv
1689 ;;
1690 *-rom68k)
1691 os=-coff
1692 ;;
1693 *-*bug)
1694 os=-coff
1695 ;;
1696 *-apple)
1697 os=-macos
1698 ;;
1699 *-atari*)
1700 os=-mint
1701 ;;
1702 *)
1703 os=-none
1704 ;;
1705 esac
1706 fi
1707
1708 # Here we handle the case where we know the os, and the CPU type, but not the
1709 # manufacturer. We pick the logical manufacturer.
1710 vendor=unknown
1711 case $basic_machine in
1712 *-unknown)
1713 case $os in
1714 -riscix*)
1715 vendor=acorn
1716 ;;
1717 -sunos*)
1718 vendor=sun
1719 ;;
1720 -cnk*|-aix*)
1721 vendor=ibm
1722 ;;
1723 -beos*)
1724 vendor=be
1725 ;;
1726 -hpux*)
1727 vendor=hp
1728 ;;
1729 -mpeix*)
1730 vendor=hp
1731 ;;
1732 -hiux*)
1733 vendor=hitachi
1734 ;;
1735 -unos*)
1736 vendor=crds
1737 ;;
1738 -dgux*)
1739 vendor=dg
1740 ;;
1741 -luna*)
1742 vendor=omron
1743 ;;
1744 -genix*)
1745 vendor=ns
1746 ;;
1747 -mvs* | -opened*)
1748 vendor=ibm
1749 ;;
1750 -os400*)
1751 vendor=ibm
1752 ;;
1753 -ptx*)
1754 vendor=sequent
1755 ;;
1756 -tpf*)
1757 vendor=ibm
1758 ;;
1759 -vxsim* | -vxworks* | -windiss*)
1760 vendor=wrs
1761 ;;
1762 -aux*)
1763 vendor=apple
1764 ;;
1765 -hms*)
1766 vendor=hitachi
1767 ;;
1768 -mpw* | -macos*)
1769 vendor=apple
1770 ;;
1771 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1772 vendor=atari
1773 ;;
1774 -vos*)
1775 vendor=stratus
1776 ;;
1777 esac
1778 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1779 ;;
1780 esac
1781
1782 echo $basic_machine$os
1783 exit
1784
1785 # Local variables:
1786 # eval: (add-hook 'write-file-hooks 'time-stamp)
1787 # time-stamp-start: "timestamp='"
1788 # time-stamp-format: "%:y-%02m-%02d"
1789 # time-stamp-end: "'"
1790 # End:
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-08-10'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 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, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # 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, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
28 #
29 # Configuration subroutine to validate and canonicalize a configuration type.
30 # Supply the specified configuration type as an argument.
31 # If it is invalid, we print an error message on stderr and exit with code 1.
32 # Otherwise, we print the canonical config type on stdout and succeed.
33
34 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
36
37 # This file is supposed to be the same for all GNU packages
38 # and recognize all the CPU types, system types and aliases
39 # that are meaningful with *any* GNU software.
40 # Each package is responsible for reporting which valid configurations
41 # it does not support. The user should be able to distinguish
42 # a failure to support a valid configuration from a meaningless
43 # configuration.
44
45 # The goal of this file is to map all the various variations of a given
46 # machine specification into a single specification in the form:
47 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
48 # or in some cases, the newer four-part form:
49 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
50 # It is wrong to echo any other type of specification.
51
52 me=`echo "$0" | sed -e 's,.*/,,'`
53
54 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS
56 $0 [OPTION] ALIAS
57
58 Canonicalize a configuration name.
59
60 Operation modes:
61 -h, --help print this help, then exit
62 -t, --time-stamp print date of last modification, then exit
63 -v, --version print version number, then exit
64
65 Report bugs and patches to <config-patches@gnu.org>."
66
67 version="\
68 GNU config.sub ($timestamp)
69
70 Copyright 1992-2013 Free Software Foundation, Inc.
71
72 This is free software; see the source for copying conditions. There is NO
73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
74
75 help="
76 Try \`$me --help' for more information."
77
78 # Parse command line
79 while test $# -gt 0 ; do
80 case $1 in
81 --time-stamp | --time* | -t )
82 echo "$timestamp" ; exit ;;
83 --version | -v )
84 echo "$version" ; exit ;;
85 --help | --h* | -h )
86 echo "$usage"; exit ;;
87 -- ) # Stop option processing
88 shift; break ;;
89 - ) # Use stdin as input.
90 break ;;
91 -* )
92 echo "$me: invalid option $1$help"
93 exit 1 ;;
94
95 *local*)
96 # First pass through any local machine types.
97 echo $1
98 exit ;;
99
100 * )
101 break ;;
102 esac
103 done
104
105 case $# in
106 0) echo "$me: missing argument$help" >&2
107 exit 1;;
108 1) ;;
109 *) echo "$me: too many arguments$help" >&2
110 exit 1;;
111 esac
112
113 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114 # Here we must recognize all the valid KERNEL-OS combinations.
115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116 case $maybe_os in
117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 knetbsd*-gnu* | netbsd*-gnu* | \
120 kopensolaris*-gnu* | \
121 storm-chaos* | os2-emx* | rtmk-nova*)
122 os=-$maybe_os
123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124 ;;
125 android-linux)
126 os=-linux-android
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
135 esac
136
137 ### Let's recognize common machines as not being operating systems so
138 ### that things like config.sub decstation-3100 work. We also
139 ### recognize some manufacturers as not being operating systems, so we
140 ### can provide default operating systems below.
141 case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray | -microblaze*)
152 os=
153 basic_machine=$1
154 ;;
155 -bluegene*)
156 os=-cnk
157 ;;
158 -sim | -cisco | -oki | -wec | -winbond)
159 os=
160 basic_machine=$1
161 ;;
162 -scout)
163 ;;
164 -wrs)
165 os=-vxworks
166 basic_machine=$1
167 ;;
168 -chorusos*)
169 os=-chorusos
170 basic_machine=$1
171 ;;
172 -chorusrdb)
173 os=-chorusrdb
174 basic_machine=$1
175 ;;
176 -hiux*)
177 os=-hiuxwe2
178 ;;
179 -sco6)
180 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco5)
184 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco4)
188 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2.[4-9]*)
192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco3.2v[4-9]*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco5v6*)
200 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -sco*)
204 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -isc)
211 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 ;;
214 -clix*)
215 basic_machine=clipper-intergraph
216 ;;
217 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
219 ;;
220 -lynx*178)
221 os=-lynxos178
222 ;;
223 -lynx*5)
224 os=-lynxos5
225 ;;
226 -lynx*)
227 os=-lynxos
228 ;;
229 -ptx*)
230 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231 ;;
232 -windowsnt*)
233 os=`echo $os | sed -e 's/windowsnt/winnt/'`
234 ;;
235 -psos*)
236 os=-psos
237 ;;
238 -mint | -mint[0-9]*)
239 basic_machine=m68k-atari
240 os=-mint
241 ;;
242 esac
243
244 # Decode aliases for certain CPU-COMPANY combinations.
245 case $basic_machine in
246 # Recognize the basic CPU types without company name.
247 # Some are omitted here because they have special meanings below.
248 1750a | 580 \
249 | a29k \
250 | aarch64 | aarch64_be \
251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
253 | am33_2.0 \
254 | arc | arceb \
255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256 | avr | avr32 \
257 | be32 | be64 \
258 | bfin \
259 | c4x | c8051 | clipper \
260 | d10v | d30v | dlx | dsp16xx \
261 | epiphany \
262 | fido | fr30 | frv \
263 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264 | hexagon \
265 | i370 | i860 | i960 | ia64 \
266 | ip2k | iq2000 \
267 | le32 | le64 \
268 | lm32 \
269 | m32c | m32r | m32rle | m68000 | m68k | m88k \
270 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
271 | mips | mipsbe | mipseb | mipsel | mipsle \
272 | mips16 \
273 | mips64 | mips64el \
274 | mips64octeon | mips64octeonel \
275 | mips64orion | mips64orionel \
276 | mips64r5900 | mips64r5900el \
277 | mips64vr | mips64vrel \
278 | mips64vr4100 | mips64vr4100el \
279 | mips64vr4300 | mips64vr4300el \
280 | mips64vr5000 | mips64vr5000el \
281 | mips64vr5900 | mips64vr5900el \
282 | mipsisa32 | mipsisa32el \
283 | mipsisa32r2 | mipsisa32r2el \
284 | mipsisa64 | mipsisa64el \
285 | mipsisa64r2 | mipsisa64r2el \
286 | mipsisa64sb1 | mipsisa64sb1el \
287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipsr5900 | mipsr5900el \
289 | mipstx39 | mipstx39el \
290 | mn10200 | mn10300 \
291 | moxie \
292 | mt \
293 | msp430 \
294 | nds32 | nds32le | nds32be \
295 | nios | nios2 | nios2eb | nios2el \
296 | ns16k | ns32k \
297 | open8 \
298 | or1k | or32 \
299 | pdp10 | pdp11 | pj | pjl \
300 | powerpc | powerpc64 | powerpc64le | powerpcle \
301 | pyramid \
302 | rl78 | rx \
303 | score \
304 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
305 | sh64 | sh64le \
306 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
307 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
308 | spu \
309 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
310 | ubicom32 \
311 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
312 | we32k \
313 | x86 | xc16x | xstormy16 | xtensa \
314 | z8k | z80)
315 basic_machine=$basic_machine-unknown
316 ;;
317 c54x)
318 basic_machine=tic54x-unknown
319 ;;
320 c55x)
321 basic_machine=tic55x-unknown
322 ;;
323 c6x)
324 basic_machine=tic6x-unknown
325 ;;
326 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
327 basic_machine=$basic_machine-unknown
328 os=-none
329 ;;
330 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
331 ;;
332 ms1)
333 basic_machine=mt-unknown
334 ;;
335
336 strongarm | thumb | xscale)
337 basic_machine=arm-unknown
338 ;;
339 xgate)
340 basic_machine=$basic_machine-unknown
341 os=-none
342 ;;
343 xscaleeb)
344 basic_machine=armeb-unknown
345 ;;
346
347 xscaleel)
348 basic_machine=armel-unknown
349 ;;
350
351 # We use `pc' rather than `unknown'
352 # because (1) that's what they normally are, and
353 # (2) the word "unknown" tends to confuse beginning users.
354 i*86 | x86_64)
355 basic_machine=$basic_machine-pc
356 ;;
357 # Object if more than one company name word.
358 *-*-*)
359 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
360 exit 1
361 ;;
362 # Recognize the basic CPU types with company name.
363 580-* \
364 | a29k-* \
365 | aarch64-* | aarch64_be-* \
366 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
367 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
368 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
369 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
370 | avr-* | avr32-* \
371 | be32-* | be64-* \
372 | bfin-* | bs2000-* \
373 | c[123]* | c30-* | [cjt]90-* | c4x-* \
374 | c8051-* | clipper-* | craynv-* | cydra-* \
375 | d10v-* | d30v-* | dlx-* \
376 | elxsi-* \
377 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
378 | h8300-* | h8500-* \
379 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
380 | hexagon-* \
381 | i*86-* | i860-* | i960-* | ia64-* \
382 | ip2k-* | iq2000-* \
383 | le32-* | le64-* \
384 | lm32-* \
385 | m32c-* | m32r-* | m32rle-* \
386 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
387 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
388 | microblaze-* | microblazeel-* \
389 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
390 | mips16-* \
391 | mips64-* | mips64el-* \
392 | mips64octeon-* | mips64octeonel-* \
393 | mips64orion-* | mips64orionel-* \
394 | mips64r5900-* | mips64r5900el-* \
395 | mips64vr-* | mips64vrel-* \
396 | mips64vr4100-* | mips64vr4100el-* \
397 | mips64vr4300-* | mips64vr4300el-* \
398 | mips64vr5000-* | mips64vr5000el-* \
399 | mips64vr5900-* | mips64vr5900el-* \
400 | mipsisa32-* | mipsisa32el-* \
401 | mipsisa32r2-* | mipsisa32r2el-* \
402 | mipsisa64-* | mipsisa64el-* \
403 | mipsisa64r2-* | mipsisa64r2el-* \
404 | mipsisa64sb1-* | mipsisa64sb1el-* \
405 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
406 | mipsr5900-* | mipsr5900el-* \
407 | mipstx39-* | mipstx39el-* \
408 | mmix-* \
409 | mt-* \
410 | msp430-* \
411 | nds32-* | nds32le-* | nds32be-* \
412 | nios-* | nios2-* | nios2eb-* | nios2el-* \
413 | none-* | np1-* | ns16k-* | ns32k-* \
414 | open8-* \
415 | orion-* \
416 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
417 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
418 | pyramid-* \
419 | rl78-* | romp-* | rs6000-* | rx-* \
420 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
421 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
422 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
423 | sparclite-* \
424 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
425 | tahoe-* \
426 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
427 | tile*-* \
428 | tron-* \
429 | ubicom32-* \
430 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
431 | vax-* \
432 | we32k-* \
433 | x86-* | x86_64-* | xc16x-* | xps100-* \
434 | xstormy16-* | xtensa*-* \
435 | ymp-* \
436 | z8k-* | z80-*)
437 ;;
438 # Recognize the basic CPU types without company name, with glob match.
439 xtensa*)
440 basic_machine=$basic_machine-unknown
441 ;;
442 # Recognize the various machine names and aliases which stand
443 # for a CPU type and a company and sometimes even an OS.
444 386bsd)
445 basic_machine=i386-unknown
446 os=-bsd
447 ;;
448 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
449 basic_machine=m68000-att
450 ;;
451 3b*)
452 basic_machine=we32k-att
453 ;;
454 a29khif)
455 basic_machine=a29k-amd
456 os=-udi
457 ;;
458 abacus)
459 basic_machine=abacus-unknown
460 ;;
461 adobe68k)
462 basic_machine=m68010-adobe
463 os=-scout
464 ;;
465 alliant | fx80)
466 basic_machine=fx80-alliant
467 ;;
468 altos | altos3068)
469 basic_machine=m68k-altos
470 ;;
471 am29k)
472 basic_machine=a29k-none
473 os=-bsd
474 ;;
475 amd64)
476 basic_machine=x86_64-pc
477 ;;
478 amd64-*)
479 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
480 ;;
481 amdahl)
482 basic_machine=580-amdahl
483 os=-sysv
484 ;;
485 amiga | amiga-*)
486 basic_machine=m68k-unknown
487 ;;
488 amigaos | amigados)
489 basic_machine=m68k-unknown
490 os=-amigaos
491 ;;
492 amigaunix | amix)
493 basic_machine=m68k-unknown
494 os=-sysv4
495 ;;
496 apollo68)
497 basic_machine=m68k-apollo
498 os=-sysv
499 ;;
500 apollo68bsd)
501 basic_machine=m68k-apollo
502 os=-bsd
503 ;;
504 aros)
505 basic_machine=i386-pc
506 os=-aros
507 ;;
508 aux)
509 basic_machine=m68k-apple
510 os=-aux
511 ;;
512 balance)
513 basic_machine=ns32k-sequent
514 os=-dynix
515 ;;
516 blackfin)
517 basic_machine=bfin-unknown
518 os=-linux
519 ;;
520 blackfin-*)
521 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
522 os=-linux
523 ;;
524 bluegene*)
525 basic_machine=powerpc-ibm
526 os=-cnk
527 ;;
528 c54x-*)
529 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
530 ;;
531 c55x-*)
532 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
533 ;;
534 c6x-*)
535 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
536 ;;
537 c90)
538 basic_machine=c90-cray
539 os=-unicos
540 ;;
541 cegcc)
542 basic_machine=arm-unknown
543 os=-cegcc
544 ;;
545 convex-c1)
546 basic_machine=c1-convex
547 os=-bsd
548 ;;
549 convex-c2)
550 basic_machine=c2-convex
551 os=-bsd
552 ;;
553 convex-c32)
554 basic_machine=c32-convex
555 os=-bsd
556 ;;
557 convex-c34)
558 basic_machine=c34-convex
559 os=-bsd
560 ;;
561 convex-c38)
562 basic_machine=c38-convex
563 os=-bsd
564 ;;
565 cray | j90)
566 basic_machine=j90-cray
567 os=-unicos
568 ;;
569 craynv)
570 basic_machine=craynv-cray
571 os=-unicosmp
572 ;;
573 cr16 | cr16-*)
574 basic_machine=cr16-unknown
575 os=-elf
576 ;;
577 crds | unos)
578 basic_machine=m68k-crds
579 ;;
580 crisv32 | crisv32-* | etraxfs*)
581 basic_machine=crisv32-axis
582 ;;
583 cris | cris-* | etrax*)
584 basic_machine=cris-axis
585 ;;
586 crx)
587 basic_machine=crx-unknown
588 os=-elf
589 ;;
590 da30 | da30-*)
591 basic_machine=m68k-da30
592 ;;
593 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
594 basic_machine=mips-dec
595 ;;
596 decsystem10* | dec10*)
597 basic_machine=pdp10-dec
598 os=-tops10
599 ;;
600 decsystem20* | dec20*)
601 basic_machine=pdp10-dec
602 os=-tops20
603 ;;
604 delta | 3300 | motorola-3300 | motorola-delta \
605 | 3300-motorola | delta-motorola)
606 basic_machine=m68k-motorola
607 ;;
608 delta88)
609 basic_machine=m88k-motorola
610 os=-sysv3
611 ;;
612 dicos)
613 basic_machine=i686-pc
614 os=-dicos
615 ;;
616 djgpp)
617 basic_machine=i586-pc
618 os=-msdosdjgpp
619 ;;
620 dpx20 | dpx20-*)
621 basic_machine=rs6000-bull
622 os=-bosx
623 ;;
624 dpx2* | dpx2*-bull)
625 basic_machine=m68k-bull
626 os=-sysv3
627 ;;
628 ebmon29k)
629 basic_machine=a29k-amd
630 os=-ebmon
631 ;;
632 elxsi)
633 basic_machine=elxsi-elxsi
634 os=-bsd
635 ;;
636 encore | umax | mmax)
637 basic_machine=ns32k-encore
638 ;;
639 es1800 | OSE68k | ose68k | ose | OSE)
640 basic_machine=m68k-ericsson
641 os=-ose
642 ;;
643 fx2800)
644 basic_machine=i860-alliant
645 ;;
646 genix)
647 basic_machine=ns32k-ns
648 ;;
649 gmicro)
650 basic_machine=tron-gmicro
651 os=-sysv
652 ;;
653 go32)
654 basic_machine=i386-pc
655 os=-go32
656 ;;
657 h3050r* | hiux*)
658 basic_machine=hppa1.1-hitachi
659 os=-hiuxwe2
660 ;;
661 h8300hms)
662 basic_machine=h8300-hitachi
663 os=-hms
664 ;;
665 h8300xray)
666 basic_machine=h8300-hitachi
667 os=-xray
668 ;;
669 h8500hms)
670 basic_machine=h8500-hitachi
671 os=-hms
672 ;;
673 harris)
674 basic_machine=m88k-harris
675 os=-sysv3
676 ;;
677 hp300-*)
678 basic_machine=m68k-hp
679 ;;
680 hp300bsd)
681 basic_machine=m68k-hp
682 os=-bsd
683 ;;
684 hp300hpux)
685 basic_machine=m68k-hp
686 os=-hpux
687 ;;
688 hp3k9[0-9][0-9] | hp9[0-9][0-9])
689 basic_machine=hppa1.0-hp
690 ;;
691 hp9k2[0-9][0-9] | hp9k31[0-9])
692 basic_machine=m68000-hp
693 ;;
694 hp9k3[2-9][0-9])
695 basic_machine=m68k-hp
696 ;;
697 hp9k6[0-9][0-9] | hp6[0-9][0-9])
698 basic_machine=hppa1.0-hp
699 ;;
700 hp9k7[0-79][0-9] | hp7[0-79][0-9])
701 basic_machine=hppa1.1-hp
702 ;;
703 hp9k78[0-9] | hp78[0-9])
704 # FIXME: really hppa2.0-hp
705 basic_machine=hppa1.1-hp
706 ;;
707 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
708 # FIXME: really hppa2.0-hp
709 basic_machine=hppa1.1-hp
710 ;;
711 hp9k8[0-9][13679] | hp8[0-9][13679])
712 basic_machine=hppa1.1-hp
713 ;;
714 hp9k8[0-9][0-9] | hp8[0-9][0-9])
715 basic_machine=hppa1.0-hp
716 ;;
717 hppa-next)
718 os=-nextstep3
719 ;;
720 hppaosf)
721 basic_machine=hppa1.1-hp
722 os=-osf
723 ;;
724 hppro)
725 basic_machine=hppa1.1-hp
726 os=-proelf
727 ;;
728 i370-ibm* | ibm*)
729 basic_machine=i370-ibm
730 ;;
731 i*86v32)
732 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
733 os=-sysv32
734 ;;
735 i*86v4*)
736 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
737 os=-sysv4
738 ;;
739 i*86v)
740 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
741 os=-sysv
742 ;;
743 i*86sol2)
744 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
745 os=-solaris2
746 ;;
747 i386mach)
748 basic_machine=i386-mach
749 os=-mach
750 ;;
751 i386-vsta | vsta)
752 basic_machine=i386-unknown
753 os=-vsta
754 ;;
755 iris | iris4d)
756 basic_machine=mips-sgi
757 case $os in
758 -irix*)
759 ;;
760 *)
761 os=-irix4
762 ;;
763 esac
764 ;;
765 isi68 | isi)
766 basic_machine=m68k-isi
767 os=-sysv
768 ;;
769 m68knommu)
770 basic_machine=m68k-unknown
771 os=-linux
772 ;;
773 m68knommu-*)
774 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
775 os=-linux
776 ;;
777 m88k-omron*)
778 basic_machine=m88k-omron
779 ;;
780 magnum | m3230)
781 basic_machine=mips-mips
782 os=-sysv
783 ;;
784 merlin)
785 basic_machine=ns32k-utek
786 os=-sysv
787 ;;
788 microblaze*)
789 basic_machine=microblaze-xilinx
790 ;;
791 mingw64)
792 basic_machine=x86_64-pc
793 os=-mingw64
794 ;;
795 mingw32)
796 basic_machine=i686-pc
797 os=-mingw32
798 ;;
799 mingw32ce)
800 basic_machine=arm-unknown
801 os=-mingw32ce
802 ;;
803 miniframe)
804 basic_machine=m68000-convergent
805 ;;
806 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
807 basic_machine=m68k-atari
808 os=-mint
809 ;;
810 mips3*-*)
811 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
812 ;;
813 mips3*)
814 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
815 ;;
816 monitor)
817 basic_machine=m68k-rom68k
818 os=-coff
819 ;;
820 morphos)
821 basic_machine=powerpc-unknown
822 os=-morphos
823 ;;
824 msdos)
825 basic_machine=i386-pc
826 os=-msdos
827 ;;
828 ms1-*)
829 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
830 ;;
831 msys)
832 basic_machine=i686-pc
833 os=-msys
834 ;;
835 mvs)
836 basic_machine=i370-ibm
837 os=-mvs
838 ;;
839 nacl)
840 basic_machine=le32-unknown
841 os=-nacl
842 ;;
843 ncr3000)
844 basic_machine=i486-ncr
845 os=-sysv4
846 ;;
847 netbsd386)
848 basic_machine=i386-unknown
849 os=-netbsd
850 ;;
851 netwinder)
852 basic_machine=armv4l-rebel
853 os=-linux
854 ;;
855 news | news700 | news800 | news900)
856 basic_machine=m68k-sony
857 os=-newsos
858 ;;
859 news1000)
860 basic_machine=m68030-sony
861 os=-newsos
862 ;;
863 news-3600 | risc-news)
864 basic_machine=mips-sony
865 os=-newsos
866 ;;
867 necv70)
868 basic_machine=v70-nec
869 os=-sysv
870 ;;
871 next | m*-next )
872 basic_machine=m68k-next
873 case $os in
874 -nextstep* )
875 ;;
876 -ns2*)
877 os=-nextstep2
878 ;;
879 *)
880 os=-nextstep3
881 ;;
882 esac
883 ;;
884 nh3000)
885 basic_machine=m68k-harris
886 os=-cxux
887 ;;
888 nh[45]000)
889 basic_machine=m88k-harris
890 os=-cxux
891 ;;
892 nindy960)
893 basic_machine=i960-intel
894 os=-nindy
895 ;;
896 mon960)
897 basic_machine=i960-intel
898 os=-mon960
899 ;;
900 nonstopux)
901 basic_machine=mips-compaq
902 os=-nonstopux
903 ;;
904 np1)
905 basic_machine=np1-gould
906 ;;
907 neo-tandem)
908 basic_machine=neo-tandem
909 ;;
910 nse-tandem)
911 basic_machine=nse-tandem
912 ;;
913 nsr-tandem)
914 basic_machine=nsr-tandem
915 ;;
916 op50n-* | op60c-*)
917 basic_machine=hppa1.1-oki
918 os=-proelf
919 ;;
920 openrisc | openrisc-*)
921 basic_machine=or32-unknown
922 ;;
923 os400)
924 basic_machine=powerpc-ibm
925 os=-os400
926 ;;
927 OSE68000 | ose68000)
928 basic_machine=m68000-ericsson
929 os=-ose
930 ;;
931 os68k)
932 basic_machine=m68k-none
933 os=-os68k
934 ;;
935 pa-hitachi)
936 basic_machine=hppa1.1-hitachi
937 os=-hiuxwe2
938 ;;
939 paragon)
940 basic_machine=i860-intel
941 os=-osf
942 ;;
943 parisc)
944 basic_machine=hppa-unknown
945 os=-linux
946 ;;
947 parisc-*)
948 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
949 os=-linux
950 ;;
951 pbd)
952 basic_machine=sparc-tti
953 ;;
954 pbb)
955 basic_machine=m68k-tti
956 ;;
957 pc532 | pc532-*)
958 basic_machine=ns32k-pc532
959 ;;
960 pc98)
961 basic_machine=i386-pc
962 ;;
963 pc98-*)
964 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
965 ;;
966 pentium | p5 | k5 | k6 | nexgen | viac3)
967 basic_machine=i586-pc
968 ;;
969 pentiumpro | p6 | 6x86 | athlon | athlon_*)
970 basic_machine=i686-pc
971 ;;
972 pentiumii | pentium2 | pentiumiii | pentium3)
973 basic_machine=i686-pc
974 ;;
975 pentium4)
976 basic_machine=i786-pc
977 ;;
978 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
979 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
980 ;;
981 pentiumpro-* | p6-* | 6x86-* | athlon-*)
982 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
983 ;;
984 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
985 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
986 ;;
987 pentium4-*)
988 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
989 ;;
990 pn)
991 basic_machine=pn-gould
992 ;;
993 power) basic_machine=power-ibm
994 ;;
995 ppc | ppcbe) basic_machine=powerpc-unknown
996 ;;
997 ppc-* | ppcbe-*)
998 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
999 ;;
1000 ppcle | powerpclittle | ppc-le | powerpc-little)
1001 basic_machine=powerpcle-unknown
1002 ;;
1003 ppcle-* | powerpclittle-*)
1004 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1005 ;;
1006 ppc64) basic_machine=powerpc64-unknown
1007 ;;
1008 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1009 ;;
1010 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1011 basic_machine=powerpc64le-unknown
1012 ;;
1013 ppc64le-* | powerpc64little-*)
1014 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1015 ;;
1016 ps2)
1017 basic_machine=i386-ibm
1018 ;;
1019 pw32)
1020 basic_machine=i586-unknown
1021 os=-pw32
1022 ;;
1023 rdos | rdos64)
1024 basic_machine=x86_64-pc
1025 os=-rdos
1026 ;;
1027 rdos32)
1028 basic_machine=i386-pc
1029 os=-rdos
1030 ;;
1031 rom68k)
1032 basic_machine=m68k-rom68k
1033 os=-coff
1034 ;;
1035 rm[46]00)
1036 basic_machine=mips-siemens
1037 ;;
1038 rtpc | rtpc-*)
1039 basic_machine=romp-ibm
1040 ;;
1041 s390 | s390-*)
1042 basic_machine=s390-ibm
1043 ;;
1044 s390x | s390x-*)
1045 basic_machine=s390x-ibm
1046 ;;
1047 sa29200)
1048 basic_machine=a29k-amd
1049 os=-udi
1050 ;;
1051 sb1)
1052 basic_machine=mipsisa64sb1-unknown
1053 ;;
1054 sb1el)
1055 basic_machine=mipsisa64sb1el-unknown
1056 ;;
1057 sde)
1058 basic_machine=mipsisa32-sde
1059 os=-elf
1060 ;;
1061 sei)
1062 basic_machine=mips-sei
1063 os=-seiux
1064 ;;
1065 sequent)
1066 basic_machine=i386-sequent
1067 ;;
1068 sh)
1069 basic_machine=sh-hitachi
1070 os=-hms
1071 ;;
1072 sh5el)
1073 basic_machine=sh5le-unknown
1074 ;;
1075 sh64)
1076 basic_machine=sh64-unknown
1077 ;;
1078 sparclite-wrs | simso-wrs)
1079 basic_machine=sparclite-wrs
1080 os=-vxworks
1081 ;;
1082 sps7)
1083 basic_machine=m68k-bull
1084 os=-sysv2
1085 ;;
1086 spur)
1087 basic_machine=spur-unknown
1088 ;;
1089 st2000)
1090 basic_machine=m68k-tandem
1091 ;;
1092 stratus)
1093 basic_machine=i860-stratus
1094 os=-sysv4
1095 ;;
1096 strongarm-* | thumb-*)
1097 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1098 ;;
1099 sun2)
1100 basic_machine=m68000-sun
1101 ;;
1102 sun2os3)
1103 basic_machine=m68000-sun
1104 os=-sunos3
1105 ;;
1106 sun2os4)
1107 basic_machine=m68000-sun
1108 os=-sunos4
1109 ;;
1110 sun3os3)
1111 basic_machine=m68k-sun
1112 os=-sunos3
1113 ;;
1114 sun3os4)
1115 basic_machine=m68k-sun
1116 os=-sunos4
1117 ;;
1118 sun4os3)
1119 basic_machine=sparc-sun
1120 os=-sunos3
1121 ;;
1122 sun4os4)
1123 basic_machine=sparc-sun
1124 os=-sunos4
1125 ;;
1126 sun4sol2)
1127 basic_machine=sparc-sun
1128 os=-solaris2
1129 ;;
1130 sun3 | sun3-*)
1131 basic_machine=m68k-sun
1132 ;;
1133 sun4)
1134 basic_machine=sparc-sun
1135 ;;
1136 sun386 | sun386i | roadrunner)
1137 basic_machine=i386-sun
1138 ;;
1139 sv1)
1140 basic_machine=sv1-cray
1141 os=-unicos
1142 ;;
1143 symmetry)
1144 basic_machine=i386-sequent
1145 os=-dynix
1146 ;;
1147 t3e)
1148 basic_machine=alphaev5-cray
1149 os=-unicos
1150 ;;
1151 t90)
1152 basic_machine=t90-cray
1153 os=-unicos
1154 ;;
1155 tile*)
1156 basic_machine=$basic_machine-unknown
1157 os=-linux-gnu
1158 ;;
1159 tx39)
1160 basic_machine=mipstx39-unknown
1161 ;;
1162 tx39el)
1163 basic_machine=mipstx39el-unknown
1164 ;;
1165 toad1)
1166 basic_machine=pdp10-xkl
1167 os=-tops20
1168 ;;
1169 tower | tower-32)
1170 basic_machine=m68k-ncr
1171 ;;
1172 tpf)
1173 basic_machine=s390x-ibm
1174 os=-tpf
1175 ;;
1176 udi29k)
1177 basic_machine=a29k-amd
1178 os=-udi
1179 ;;
1180 ultra3)
1181 basic_machine=a29k-nyu
1182 os=-sym1
1183 ;;
1184 v810 | necv810)
1185 basic_machine=v810-nec
1186 os=-none
1187 ;;
1188 vaxv)
1189 basic_machine=vax-dec
1190 os=-sysv
1191 ;;
1192 vms)
1193 basic_machine=vax-dec
1194 os=-vms
1195 ;;
1196 vpp*|vx|vx-*)
1197 basic_machine=f301-fujitsu
1198 ;;
1199 vxworks960)
1200 basic_machine=i960-wrs
1201 os=-vxworks
1202 ;;
1203 vxworks68)
1204 basic_machine=m68k-wrs
1205 os=-vxworks
1206 ;;
1207 vxworks29k)
1208 basic_machine=a29k-wrs
1209 os=-vxworks
1210 ;;
1211 w65*)
1212 basic_machine=w65-wdc
1213 os=-none
1214 ;;
1215 w89k-*)
1216 basic_machine=hppa1.1-winbond
1217 os=-proelf
1218 ;;
1219 xbox)
1220 basic_machine=i686-pc
1221 os=-mingw32
1222 ;;
1223 xps | xps100)
1224 basic_machine=xps100-honeywell
1225 ;;
1226 xscale-* | xscalee[bl]-*)
1227 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1228 ;;
1229 ymp)
1230 basic_machine=ymp-cray
1231 os=-unicos
1232 ;;
1233 z8k-*-coff)
1234 basic_machine=z8k-unknown
1235 os=-sim
1236 ;;
1237 z80-*-coff)
1238 basic_machine=z80-unknown
1239 os=-sim
1240 ;;
1241 none)
1242 basic_machine=none-none
1243 os=-none
1244 ;;
1245
1246 # Here we handle the default manufacturer of certain CPU types. It is in
1247 # some cases the only manufacturer, in others, it is the most popular.
1248 w89k)
1249 basic_machine=hppa1.1-winbond
1250 ;;
1251 op50n)
1252 basic_machine=hppa1.1-oki
1253 ;;
1254 op60c)
1255 basic_machine=hppa1.1-oki
1256 ;;
1257 romp)
1258 basic_machine=romp-ibm
1259 ;;
1260 mmix)
1261 basic_machine=mmix-knuth
1262 ;;
1263 rs6000)
1264 basic_machine=rs6000-ibm
1265 ;;
1266 vax)
1267 basic_machine=vax-dec
1268 ;;
1269 pdp10)
1270 # there are many clones, so DEC is not a safe bet
1271 basic_machine=pdp10-unknown
1272 ;;
1273 pdp11)
1274 basic_machine=pdp11-dec
1275 ;;
1276 we32k)
1277 basic_machine=we32k-att
1278 ;;
1279 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1280 basic_machine=sh-unknown
1281 ;;
1282 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1283 basic_machine=sparc-sun
1284 ;;
1285 cydra)
1286 basic_machine=cydra-cydrome
1287 ;;
1288 orion)
1289 basic_machine=orion-highlevel
1290 ;;
1291 orion105)
1292 basic_machine=clipper-highlevel
1293 ;;
1294 mac | mpw | mac-mpw)
1295 basic_machine=m68k-apple
1296 ;;
1297 pmac | pmac-mpw)
1298 basic_machine=powerpc-apple
1299 ;;
1300 *-unknown)
1301 # Make sure to match an already-canonicalized machine name.
1302 ;;
1303 *)
1304 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1305 exit 1
1306 ;;
1307 esac
1308
1309 # Here we canonicalize certain aliases for manufacturers.
1310 case $basic_machine in
1311 *-digital*)
1312 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1313 ;;
1314 *-commodore*)
1315 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1316 ;;
1317 *)
1318 ;;
1319 esac
1320
1321 # Decode manufacturer-specific aliases for certain operating systems.
1322
1323 if [ x"$os" != x"" ]
1324 then
1325 case $os in
1326 # First match some system type aliases
1327 # that might get confused with valid system types.
1328 # -solaris* is a basic system type, with this one exception.
1329 -auroraux)
1330 os=-auroraux
1331 ;;
1332 -solaris1 | -solaris1.*)
1333 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1334 ;;
1335 -solaris)
1336 os=-solaris2
1337 ;;
1338 -svr4*)
1339 os=-sysv4
1340 ;;
1341 -unixware*)
1342 os=-sysv4.2uw
1343 ;;
1344 -gnu/linux*)
1345 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1346 ;;
1347 # First accept the basic system types.
1348 # The portable systems comes first.
1349 # Each alternative MUST END IN A *, to match a version number.
1350 # -sysv* is not here because it comes later, after sysvr4.
1351 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1352 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1353 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1354 | -sym* | -kopensolaris* | -plan9* \
1355 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1356 | -aos* | -aros* \
1357 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1358 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1359 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1360 | -bitrig* | -openbsd* | -solidbsd* \
1361 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1362 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1363 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1364 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1365 | -chorusos* | -chorusrdb* | -cegcc* \
1366 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1367 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1368 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1369 | -uxpv* | -beos* | -mpeix* | -udk* \
1370 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1371 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1372 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1373 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1374 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1375 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1376 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1377 # Remember, each alternative MUST END IN *, to match a version number.
1378 ;;
1379 -qnx*)
1380 case $basic_machine in
1381 x86-* | i*86-*)
1382 ;;
1383 *)
1384 os=-nto$os
1385 ;;
1386 esac
1387 ;;
1388 -nto-qnx*)
1389 ;;
1390 -nto*)
1391 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1392 ;;
1393 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1394 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1395 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1396 ;;
1397 -mac*)
1398 os=`echo $os | sed -e 's|mac|macos|'`
1399 ;;
1400 -linux-dietlibc)
1401 os=-linux-dietlibc
1402 ;;
1403 -linux*)
1404 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1405 ;;
1406 -sunos5*)
1407 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1408 ;;
1409 -sunos6*)
1410 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1411 ;;
1412 -opened*)
1413 os=-openedition
1414 ;;
1415 -os400*)
1416 os=-os400
1417 ;;
1418 -wince*)
1419 os=-wince
1420 ;;
1421 -osfrose*)
1422 os=-osfrose
1423 ;;
1424 -osf*)
1425 os=-osf
1426 ;;
1427 -utek*)
1428 os=-bsd
1429 ;;
1430 -dynix*)
1431 os=-bsd
1432 ;;
1433 -acis*)
1434 os=-aos
1435 ;;
1436 -atheos*)
1437 os=-atheos
1438 ;;
1439 -syllable*)
1440 os=-syllable
1441 ;;
1442 -386bsd)
1443 os=-bsd
1444 ;;
1445 -ctix* | -uts*)
1446 os=-sysv
1447 ;;
1448 -nova*)
1449 os=-rtmk-nova
1450 ;;
1451 -ns2 )
1452 os=-nextstep2
1453 ;;
1454 -nsk*)
1455 os=-nsk
1456 ;;
1457 # Preserve the version number of sinix5.
1458 -sinix5.*)
1459 os=`echo $os | sed -e 's|sinix|sysv|'`
1460 ;;
1461 -sinix*)
1462 os=-sysv4
1463 ;;
1464 -tpf*)
1465 os=-tpf
1466 ;;
1467 -triton*)
1468 os=-sysv3
1469 ;;
1470 -oss*)
1471 os=-sysv3
1472 ;;
1473 -svr4)
1474 os=-sysv4
1475 ;;
1476 -svr3)
1477 os=-sysv3
1478 ;;
1479 -sysvr4)
1480 os=-sysv4
1481 ;;
1482 # This must come after -sysvr4.
1483 -sysv*)
1484 ;;
1485 -ose*)
1486 os=-ose
1487 ;;
1488 -es1800*)
1489 os=-ose
1490 ;;
1491 -xenix)
1492 os=-xenix
1493 ;;
1494 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1495 os=-mint
1496 ;;
1497 -aros*)
1498 os=-aros
1499 ;;
1500 -zvmoe)
1501 os=-zvmoe
1502 ;;
1503 -dicos*)
1504 os=-dicos
1505 ;;
1506 -nacl*)
1507 ;;
1508 -none)
1509 ;;
1510 *)
1511 # Get rid of the `-' at the beginning of $os.
1512 os=`echo $os | sed 's/[^-]*-//'`
1513 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1514 exit 1
1515 ;;
1516 esac
1517 else
1518
1519 # Here we handle the default operating systems that come with various machines.
1520 # The value should be what the vendor currently ships out the door with their
1521 # machine or put another way, the most popular os provided with the machine.
1522
1523 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1524 # "-sun"), then you have to tell the case statement up towards the top
1525 # that MANUFACTURER isn't an operating system. Otherwise, code above
1526 # will signal an error saying that MANUFACTURER isn't an operating
1527 # system, and we'll never get to this point.
1528
1529 case $basic_machine in
1530 score-*)
1531 os=-elf
1532 ;;
1533 spu-*)
1534 os=-elf
1535 ;;
1536 *-acorn)
1537 os=-riscix1.2
1538 ;;
1539 arm*-rebel)
1540 os=-linux
1541 ;;
1542 arm*-semi)
1543 os=-aout
1544 ;;
1545 c4x-* | tic4x-*)
1546 os=-coff
1547 ;;
1548 c8051-*)
1549 os=-elf
1550 ;;
1551 hexagon-*)
1552 os=-elf
1553 ;;
1554 tic54x-*)
1555 os=-coff
1556 ;;
1557 tic55x-*)
1558 os=-coff
1559 ;;
1560 tic6x-*)
1561 os=-coff
1562 ;;
1563 # This must come before the *-dec entry.
1564 pdp10-*)
1565 os=-tops20
1566 ;;
1567 pdp11-*)
1568 os=-none
1569 ;;
1570 *-dec | vax-*)
1571 os=-ultrix4.2
1572 ;;
1573 m68*-apollo)
1574 os=-domain
1575 ;;
1576 i386-sun)
1577 os=-sunos4.0.2
1578 ;;
1579 m68000-sun)
1580 os=-sunos3
1581 ;;
1582 m68*-cisco)
1583 os=-aout
1584 ;;
1585 mep-*)
1586 os=-elf
1587 ;;
1588 mips*-cisco)
1589 os=-elf
1590 ;;
1591 mips*-*)
1592 os=-elf
1593 ;;
1594 or1k-*)
1595 os=-elf
1596 ;;
1597 or32-*)
1598 os=-coff
1599 ;;
1600 *-tti) # must be before sparc entry or we get the wrong os.
1601 os=-sysv3
1602 ;;
1603 sparc-* | *-sun)
1604 os=-sunos4.1.1
1605 ;;
1606 *-be)
1607 os=-beos
1608 ;;
1609 *-haiku)
1610 os=-haiku
1611 ;;
1612 *-ibm)
1613 os=-aix
1614 ;;
1615 *-knuth)
1616 os=-mmixware
1617 ;;
1618 *-wec)
1619 os=-proelf
1620 ;;
1621 *-winbond)
1622 os=-proelf
1623 ;;
1624 *-oki)
1625 os=-proelf
1626 ;;
1627 *-hp)
1628 os=-hpux
1629 ;;
1630 *-hitachi)
1631 os=-hiux
1632 ;;
1633 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1634 os=-sysv
1635 ;;
1636 *-cbm)
1637 os=-amigaos
1638 ;;
1639 *-dg)
1640 os=-dgux
1641 ;;
1642 *-dolphin)
1643 os=-sysv3
1644 ;;
1645 m68k-ccur)
1646 os=-rtu
1647 ;;
1648 m88k-omron*)
1649 os=-luna
1650 ;;
1651 *-next )
1652 os=-nextstep
1653 ;;
1654 *-sequent)
1655 os=-ptx
1656 ;;
1657 *-crds)
1658 os=-unos
1659 ;;
1660 *-ns)
1661 os=-genix
1662 ;;
1663 i370-*)
1664 os=-mvs
1665 ;;
1666 *-next)
1667 os=-nextstep3
1668 ;;
1669 *-gould)
1670 os=-sysv
1671 ;;
1672 *-highlevel)
1673 os=-bsd
1674 ;;
1675 *-encore)
1676 os=-bsd
1677 ;;
1678 *-sgi)
1679 os=-irix
1680 ;;
1681 *-siemens)
1682 os=-sysv4
1683 ;;
1684 *-masscomp)
1685 os=-rtu
1686 ;;
1687 f30[01]-fujitsu | f700-fujitsu)
1688 os=-uxpv
1689 ;;
1690 *-rom68k)
1691 os=-coff
1692 ;;
1693 *-*bug)
1694 os=-coff
1695 ;;
1696 *-apple)
1697 os=-macos
1698 ;;
1699 *-atari*)
1700 os=-mint
1701 ;;
1702 *)
1703 os=-none
1704 ;;
1705 esac
1706 fi
1707
1708 # Here we handle the case where we know the os, and the CPU type, but not the
1709 # manufacturer. We pick the logical manufacturer.
1710 vendor=unknown
1711 case $basic_machine in
1712 *-unknown)
1713 case $os in
1714 -riscix*)
1715 vendor=acorn
1716 ;;
1717 -sunos*)
1718 vendor=sun
1719 ;;
1720 -cnk*|-aix*)
1721 vendor=ibm
1722 ;;
1723 -beos*)
1724 vendor=be
1725 ;;
1726 -hpux*)
1727 vendor=hp
1728 ;;
1729 -mpeix*)
1730 vendor=hp
1731 ;;
1732 -hiux*)
1733 vendor=hitachi
1734 ;;
1735 -unos*)
1736 vendor=crds
1737 ;;
1738 -dgux*)
1739 vendor=dg
1740 ;;
1741 -luna*)
1742 vendor=omron
1743 ;;
1744 -genix*)
1745 vendor=ns
1746 ;;
1747 -mvs* | -opened*)
1748 vendor=ibm
1749 ;;
1750 -os400*)
1751 vendor=ibm
1752 ;;
1753 -ptx*)
1754 vendor=sequent
1755 ;;
1756 -tpf*)
1757 vendor=ibm
1758 ;;
1759 -vxsim* | -vxworks* | -windiss*)
1760 vendor=wrs
1761 ;;
1762 -aux*)
1763 vendor=apple
1764 ;;
1765 -hms*)
1766 vendor=hitachi
1767 ;;
1768 -mpw* | -macos*)
1769 vendor=apple
1770 ;;
1771 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1772 vendor=atari
1773 ;;
1774 -vos*)
1775 vendor=stratus
1776 ;;
1777 esac
1778 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1779 ;;
1780 esac
1781
1782 echo $basic_machine$os
1783 exit
1784
1785 # Local variables:
1786 # eval: (add-hook 'write-file-hooks 'time-stamp)
1787 # time-stamp-start: "timestamp='"
1788 # time-stamp-format: "%:y-%02m-%02d"
1789 # time-stamp-end: "'"
1790 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for cinnamon-menus 2.1.
3 #
4 #
5 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
6 #
7 #
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 ## -------------------- ##
11 ## M4sh Initialization. ##
12 ## -------------------- ##
13
14 # Be more Bourne compatible
15 DUALCASE=1; export DUALCASE # for MKS sh
16 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17 emulate sh
18 NULLCMD=:
19 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
22 setopt NO_GLOB_SUBST
23 else
24 case `(set -o) 2>/dev/null` in #(
25 *posix*) :
26 set -o posix ;; #(
27 *) :
28 ;;
29 esac
30 fi
31
32
33 as_nl='
34 '
35 export as_nl
36 # Printing a long string crashes Solaris 7 /usr/bin/printf.
37 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
38 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
40 # Prefer a ksh shell builtin over an external printf program on Solaris,
41 # but without wasting forks for bash or zsh.
42 if test -z "$BASH_VERSION$ZSH_VERSION" \
43 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
44 as_echo='print -r --'
45 as_echo_n='print -rn --'
46 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='printf %s\n'
48 as_echo_n='printf %s'
49 else
50 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52 as_echo_n='/usr/ucb/echo -n'
53 else
54 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55 as_echo_n_body='eval
56 arg=$1;
57 case $arg in #(
58 *"$as_nl"*)
59 expr "X$arg" : "X\\(.*\\)$as_nl";
60 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61 esac;
62 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63 '
64 export as_echo_n_body
65 as_echo_n='sh -c $as_echo_n_body as_echo'
66 fi
67 export as_echo_body
68 as_echo='sh -c $as_echo_body as_echo'
69 fi
70
71 # The user is always right.
72 if test "${PATH_SEPARATOR+set}" != set; then
73 PATH_SEPARATOR=:
74 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
75 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
76 PATH_SEPARATOR=';'
77 }
78 fi
79
80
81 # IFS
82 # We need space, tab and new line, in precisely that order. Quoting is
83 # there to prevent editors from complaining about space-tab.
84 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
85 # splitting by setting IFS to empty value.)
86 IFS=" "" $as_nl"
87
88 # Find who we are. Look in the path if we contain no directory separator.
89 as_myself=
90 case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93 for as_dir in $PATH
94 do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99 IFS=$as_save_IFS
100
101 ;;
102 esac
103 # We did not find ourselves, most probably we were run as `sh COMMAND'
104 # in which case we are not to be found in the path.
105 if test "x$as_myself" = x; then
106 as_myself=$0
107 fi
108 if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111 fi
112
113 # Unset variables that we do not need and which cause bugs (e.g. in
114 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115 # suppresses any "Segmentation fault" message there. '((' could
116 # trigger a bug in pdksh 5.2.14.
117 for as_var in BASH_ENV ENV MAIL MAILPATH
118 do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120 done
121 PS1='$ '
122 PS2='> '
123 PS4='+ '
124
125 # NLS nuisances.
126 LC_ALL=C
127 export LC_ALL
128 LANGUAGE=C
129 export LANGUAGE
130
131 # CDPATH.
132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134 # Use a proper internal environment variable to ensure we don't fall
135 # into an infinite loop, continuously re-executing ourselves.
136 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
137 _as_can_reexec=no; export _as_can_reexec;
138 # We cannot yet assume a decent shell, so we have to provide a
139 # neutralization value for shells without unset; and this also
140 # works around shells that cannot unset nonexistent variables.
141 # Preserve -v and -x to the replacement shell.
142 BASH_ENV=/dev/null
143 ENV=/dev/null
144 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
145 case $- in # ((((
146 *v*x* | *x*v* ) as_opts=-vx ;;
147 *v* ) as_opts=-v ;;
148 *x* ) as_opts=-x ;;
149 * ) as_opts= ;;
150 esac
151 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
152 # Admittedly, this is quite paranoid, since all the known shells bail
153 # out after a failed `exec'.
154 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
155 as_fn_exit 255
156 fi
157 # We don't want this to propagate to other subprocesses.
158 { _as_can_reexec=; unset _as_can_reexec;}
159 if test "x$CONFIG_SHELL" = x; then
160 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
161 emulate sh
162 NULLCMD=:
163 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
164 # is contrary to our usage. Disable this feature.
165 alias -g '\${1+\"\$@\"}'='\"\$@\"'
166 setopt NO_GLOB_SUBST
167 else
168 case \`(set -o) 2>/dev/null\` in #(
169 *posix*) :
170 set -o posix ;; #(
171 *) :
172 ;;
173 esac
174 fi
175 "
176 as_required="as_fn_return () { (exit \$1); }
177 as_fn_success () { as_fn_return 0; }
178 as_fn_failure () { as_fn_return 1; }
179 as_fn_ret_success () { return 0; }
180 as_fn_ret_failure () { return 1; }
181
182 exitcode=0
183 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
184 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
185 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
186 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
187 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
188
189 else
190 exitcode=1; echo positional parameters were not saved.
191 fi
192 test x\$exitcode = x0 || exit 1
193 test -x / || exit 1"
194 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
195 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
196 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
197 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
198 test \$(( 1 + 1 )) = 2 || exit 1
199
200 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
201 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
202 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
203 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
204 PATH=/empty FPATH=/empty; export PATH FPATH
205 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
206 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
207 if (eval "$as_required") 2>/dev/null; then :
208 as_have_required=yes
209 else
210 as_have_required=no
211 fi
212 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
213
214 else
215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
216 as_found=false
217 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
218 do
219 IFS=$as_save_IFS
220 test -z "$as_dir" && as_dir=.
221 as_found=:
222 case $as_dir in #(
223 /*)
224 for as_base in sh bash ksh sh5; do
225 # Try only shells that exist, to save several forks.
226 as_shell=$as_dir/$as_base
227 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
228 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
229 CONFIG_SHELL=$as_shell as_have_required=yes
230 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
231 break 2
232 fi
233 fi
234 done;;
235 esac
236 as_found=false
237 done
238 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
239 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
240 CONFIG_SHELL=$SHELL as_have_required=yes
241 fi; }
242 IFS=$as_save_IFS
243
244
245 if test "x$CONFIG_SHELL" != x; then :
246 export CONFIG_SHELL
247 # We cannot yet assume a decent shell, so we have to provide a
248 # neutralization value for shells without unset; and this also
249 # works around shells that cannot unset nonexistent variables.
250 # Preserve -v and -x to the replacement shell.
251 BASH_ENV=/dev/null
252 ENV=/dev/null
253 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
254 case $- in # ((((
255 *v*x* | *x*v* ) as_opts=-vx ;;
256 *v* ) as_opts=-v ;;
257 *x* ) as_opts=-x ;;
258 * ) as_opts= ;;
259 esac
260 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
261 # Admittedly, this is quite paranoid, since all the known shells bail
262 # out after a failed `exec'.
263 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
264 exit 255
265 fi
266
267 if test x$as_have_required = xno; then :
268 $as_echo "$0: This script requires a shell more modern than all"
269 $as_echo "$0: the shells that I found on your system."
270 if test x${ZSH_VERSION+set} = xset ; then
271 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
272 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
273 else
274 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
275 $0: including any error possibly output before this
276 $0: message. Then install a modern shell, or manually run
277 $0: the script under such a shell if you do have one."
278 fi
279 exit 1
280 fi
281 fi
282 fi
283 SHELL=${CONFIG_SHELL-/bin/sh}
284 export SHELL
285 # Unset more variables known to interfere with behavior of common tools.
286 CLICOLOR_FORCE= GREP_OPTIONS=
287 unset CLICOLOR_FORCE GREP_OPTIONS
288
289 ## --------------------- ##
290 ## M4sh Shell Functions. ##
291 ## --------------------- ##
292 # as_fn_unset VAR
293 # ---------------
294 # Portably unset VAR.
295 as_fn_unset ()
296 {
297 { eval $1=; unset $1;}
298 }
299 as_unset=as_fn_unset
300
301 # as_fn_set_status STATUS
302 # -----------------------
303 # Set $? to STATUS, without forking.
304 as_fn_set_status ()
305 {
306 return $1
307 } # as_fn_set_status
308
309 # as_fn_exit STATUS
310 # -----------------
311 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
312 as_fn_exit ()
313 {
314 set +e
315 as_fn_set_status $1
316 exit $1
317 } # as_fn_exit
318
319 # as_fn_mkdir_p
320 # -------------
321 # Create "$as_dir" as a directory, including parents if necessary.
322 as_fn_mkdir_p ()
323 {
324
325 case $as_dir in #(
326 -*) as_dir=./$as_dir;;
327 esac
328 test -d "$as_dir" || eval $as_mkdir_p || {
329 as_dirs=
330 while :; do
331 case $as_dir in #(
332 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
333 *) as_qdir=$as_dir;;
334 esac
335 as_dirs="'$as_qdir' $as_dirs"
336 as_dir=`$as_dirname -- "$as_dir" ||
337 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
338 X"$as_dir" : 'X\(//\)[^/]' \| \
339 X"$as_dir" : 'X\(//\)$' \| \
340 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
341 $as_echo X"$as_dir" |
342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)[^/].*/{
347 s//\1/
348 q
349 }
350 /^X\(\/\/\)$/{
351 s//\1/
352 q
353 }
354 /^X\(\/\).*/{
355 s//\1/
356 q
357 }
358 s/.*/./; q'`
359 test -d "$as_dir" && break
360 done
361 test -z "$as_dirs" || eval "mkdir $as_dirs"
362 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363
364
365 } # as_fn_mkdir_p
366
367 # as_fn_executable_p FILE
368 # -----------------------
369 # Test if FILE is an executable regular file.
370 as_fn_executable_p ()
371 {
372 test -f "$1" && test -x "$1"
373 } # as_fn_executable_p
374 # as_fn_append VAR VALUE
375 # ----------------------
376 # Append the text in VALUE to the end of the definition contained in VAR. Take
377 # advantage of any shell optimizations that allow amortized linear growth over
378 # repeated appends, instead of the typical quadratic growth present in naive
379 # implementations.
380 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
381 eval 'as_fn_append ()
382 {
383 eval $1+=\$2
384 }'
385 else
386 as_fn_append ()
387 {
388 eval $1=\$$1\$2
389 }
390 fi # as_fn_append
391
392 # as_fn_arith ARG...
393 # ------------------
394 # Perform arithmetic evaluation on the ARGs, and store the result in the
395 # global $as_val. Take advantage of shells that can avoid forks. The arguments
396 # must be portable across $(()) and expr.
397 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
398 eval 'as_fn_arith ()
399 {
400 as_val=$(( $* ))
401 }'
402 else
403 as_fn_arith ()
404 {
405 as_val=`expr "$@" || test $? -eq 1`
406 }
407 fi # as_fn_arith
408
409
410 # as_fn_error STATUS ERROR [LINENO LOG_FD]
411 # ----------------------------------------
412 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
413 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
414 # script with STATUS, using 1 if that was 0.
415 as_fn_error ()
416 {
417 as_status=$1; test $as_status -eq 0 && as_status=1
418 if test "$4"; then
419 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
420 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
421 fi
422 $as_echo "$as_me: error: $2" >&2
423 as_fn_exit $as_status
424 } # as_fn_error
425
426 if expr a : '\(a\)' >/dev/null 2>&1 &&
427 test "X`expr 00001 : '.*\(...\)'`" = X001; then
428 as_expr=expr
429 else
430 as_expr=false
431 fi
432
433 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
434 as_basename=basename
435 else
436 as_basename=false
437 fi
438
439 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
440 as_dirname=dirname
441 else
442 as_dirname=false
443 fi
444
445 as_me=`$as_basename -- "$0" ||
446 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
447 X"$0" : 'X\(//\)$' \| \
448 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
449 $as_echo X/"$0" |
450 sed '/^.*\/\([^/][^/]*\)\/*$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\/\)$/{
455 s//\1/
456 q
457 }
458 /^X\/\(\/\).*/{
459 s//\1/
460 q
461 }
462 s/.*/./; q'`
463
464 # Avoid depending upon Character Ranges.
465 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
466 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
467 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
468 as_cr_digits='0123456789'
469 as_cr_alnum=$as_cr_Letters$as_cr_digits
470
471
472 as_lineno_1=$LINENO as_lineno_1a=$LINENO
473 as_lineno_2=$LINENO as_lineno_2a=$LINENO
474 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
475 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
476 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
477 sed -n '
478 p
479 /[$]LINENO/=
480 ' <$as_myself |
481 sed '
482 s/[$]LINENO.*/&-/
483 t lineno
484 b
485 :lineno
486 N
487 :loop
488 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
489 t loop
490 s/-\n.*//
491 ' >$as_me.lineno &&
492 chmod +x "$as_me.lineno" ||
493 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
494
495 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
496 # already done that, so ensure we don't try to do so again and fall
497 # in an infinite loop. This has already happened in practice.
498 _as_can_reexec=no; export _as_can_reexec
499 # Don't try to exec as it changes $[0], causing all sort of problems
500 # (the dirname of $[0] is not the place where we might find the
501 # original and so on. Autoconf is especially sensitive to this).
502 . "./$as_me.lineno"
503 # Exit status is that of the last command.
504 exit
505 }
506
507 ECHO_C= ECHO_N= ECHO_T=
508 case `echo -n x` in #(((((
509 -n*)
510 case `echo 'xy\c'` in
511 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
512 xy) ECHO_C='\c';;
513 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
514 ECHO_T=' ';;
515 esac;;
516 *)
517 ECHO_N='-n';;
518 esac
519
520 rm -f conf$$ conf$$.exe conf$$.file
521 if test -d conf$$.dir; then
522 rm -f conf$$.dir/conf$$.file
523 else
524 rm -f conf$$.dir
525 mkdir conf$$.dir 2>/dev/null
526 fi
527 if (echo >conf$$.file) 2>/dev/null; then
528 if ln -s conf$$.file conf$$ 2>/dev/null; then
529 as_ln_s='ln -s'
530 # ... but there are two gotchas:
531 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
532 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
533 # In both cases, we have to default to `cp -pR'.
534 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
535 as_ln_s='cp -pR'
536 elif ln conf$$.file conf$$ 2>/dev/null; then
537 as_ln_s=ln
538 else
539 as_ln_s='cp -pR'
540 fi
541 else
542 as_ln_s='cp -pR'
543 fi
544 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
545 rmdir conf$$.dir 2>/dev/null
546
547 if mkdir -p . 2>/dev/null; then
548 as_mkdir_p='mkdir -p "$as_dir"'
549 else
550 test -d ./-p && rmdir ./-p
551 as_mkdir_p=false
552 fi
553
554 as_test_x='test -x'
555 as_executable_p=as_fn_executable_p
556
557 # Sed expression to map a string onto a valid CPP name.
558 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
559
560 # Sed expression to map a string onto a valid variable name.
561 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562
563 SHELL=${CONFIG_SHELL-/bin/sh}
564
565
566 test -n "$DJDIR" || exec 7<&0 </dev/null
567 exec 6>&1
568
569 # Name of the host.
570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571 # so uname gets run too.
572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574 #
575 # Initializations.
576 #
577 ac_default_prefix=/usr/local
578 ac_clean_files=
579 ac_config_libobj_dir=.
580 LIBOBJS=
581 cross_compiling=no
582 subdirs=
583 MFLAGS=
584 MAKEFLAGS=
585
586 # Identity of this package.
587 PACKAGE_NAME='cinnamon-menus'
588 PACKAGE_TARNAME='cinnamon-menus'
589 PACKAGE_VERSION='2.1'
590 PACKAGE_STRING='cinnamon-menus 2.1'
591 PACKAGE_BUGREPORT=''
592 PACKAGE_URL=''
593
594 ac_unique_file="libmenu/gmenu-tree.h"
595 # Factoring default headers for most tests.
596 ac_includes_default="\
597 #include <stdio.h>
598 #ifdef HAVE_SYS_TYPES_H
599 # include <sys/types.h>
600 #endif
601 #ifdef HAVE_SYS_STAT_H
602 # include <sys/stat.h>
603 #endif
604 #ifdef STDC_HEADERS
605 # include <stdlib.h>
606 # include <stddef.h>
607 #else
608 # ifdef HAVE_STDLIB_H
609 # include <stdlib.h>
610 # endif
611 #endif
612 #ifdef HAVE_STRING_H
613 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
614 # include <memory.h>
615 # endif
616 # include <string.h>
617 #endif
618 #ifdef HAVE_STRINGS_H
619 # include <strings.h>
620 #endif
621 #ifdef HAVE_INTTYPES_H
622 # include <inttypes.h>
623 #endif
624 #ifdef HAVE_STDINT_H
625 # include <stdint.h>
626 #endif
627 #ifdef HAVE_UNISTD_H
628 # include <unistd.h>
629 #endif"
630
631 ac_subst_vars='am__EXEEXT_FALSE
632 am__EXEEXT_TRUE
633 LTLIBOBJS
634 LIBOBJS
635 HAVE_INTROSPECTION_FALSE
636 HAVE_INTROSPECTION_TRUE
637 INTROSPECTION_MAKEFILE
638 INTROSPECTION_LIBS
639 INTROSPECTION_CFLAGS
640 INTROSPECTION_TYPELIBDIR
641 INTROSPECTION_GIRDIR
642 INTROSPECTION_GENERATE
643 INTROSPECTION_COMPILER
644 INTROSPECTION_SCANNER
645 DEBUG_CFLAGS
646 DISABLE_DEPRECATED_CFLAGS
647 WARN_CFLAGS
648 GIO_UNIX_LIBS
649 GIO_UNIX_CFLAGS
650 PKG_CONFIG_LIBDIR
651 PKG_CONFIG_PATH
652 PKG_CONFIG
653 OTOOL64
654 OTOOL
655 LIPO
656 NMEDIT
657 DSYMUTIL
658 MANIFEST_TOOL
659 RANLIB
660 ac_ct_AR
661 AR
662 LN_S
663 NM
664 ac_ct_DUMPBIN
665 DUMPBIN
666 LD
667 FGREP
668 SED
669 LIBTOOL
670 OBJDUMP
671 DLLTOOL
672 AS
673 host_os
674 host_vendor
675 host_cpu
676 host
677 build_os
678 build_vendor
679 build_cpu
680 build
681 EGREP
682 GREP
683 CPP
684 am__fastdepCC_FALSE
685 am__fastdepCC_TRUE
686 CCDEPMODE
687 am__nodep
688 AMDEPBACKSLASH
689 AMDEP_FALSE
690 AMDEP_TRUE
691 am__quote
692 am__include
693 DEPDIR
694 OBJEXT
695 EXEEXT
696 ac_ct_CC
697 CPPFLAGS
698 LDFLAGS
699 CFLAGS
700 CC
701 LIB_MENU_LT_VERSION
702 DISABLE_DEPRECATED
703 MAINT
704 MAINTAINER_MODE_FALSE
705 MAINTAINER_MODE_TRUE
706 AM_BACKSLASH
707 AM_DEFAULT_VERBOSITY
708 AM_DEFAULT_V
709 AM_V
710 am__untar
711 am__tar
712 AMTAR
713 am__leading_dot
714 SET_MAKE
715 AWK
716 mkdir_p
717 MKDIR_P
718 INSTALL_STRIP_PROGRAM
719 STRIP
720 install_sh
721 MAKEINFO
722 AUTOHEADER
723 AUTOMAKE
724 AUTOCONF
725 ACLOCAL
726 VERSION
727 PACKAGE
728 CYGPATH_W
729 am__isrc
730 INSTALL_DATA
731 INSTALL_SCRIPT
732 INSTALL_PROGRAM
733 target_alias
734 host_alias
735 build_alias
736 LIBS
737 ECHO_T
738 ECHO_N
739 ECHO_C
740 DEFS
741 mandir
742 localedir
743 libdir
744 psdir
745 pdfdir
746 dvidir
747 htmldir
748 infodir
749 docdir
750 oldincludedir
751 includedir
752 localstatedir
753 sharedstatedir
754 sysconfdir
755 datadir
756 datarootdir
757 libexecdir
758 sbindir
759 bindir
760 program_transform_name
761 prefix
762 exec_prefix
763 PACKAGE_URL
764 PACKAGE_BUGREPORT
765 PACKAGE_STRING
766 PACKAGE_VERSION
767 PACKAGE_TARNAME
768 PACKAGE_NAME
769 PATH_SEPARATOR
770 SHELL'
771 ac_subst_files=''
772 ac_user_opts='
773 enable_option_checking
774 enable_silent_rules
775 enable_maintainer_mode
776 enable_dependency_tracking
777 enable_shared
778 enable_static
779 with_pic
780 enable_fast_install
781 with_gnu_ld
782 with_sysroot
783 enable_libtool_lock
784 enable_compile_warnings
785 enable_iso_c
786 enable_deprecation_flags
787 enable_debug
788 enable_introspection
789 '
790 ac_precious_vars='build_alias
791 host_alias
792 target_alias
793 CC
794 CFLAGS
795 LDFLAGS
796 LIBS
797 CPPFLAGS
798 CPP
799 PKG_CONFIG
800 PKG_CONFIG_PATH
801 PKG_CONFIG_LIBDIR
802 GIO_UNIX_CFLAGS
803 GIO_UNIX_LIBS'
804
805
806 # Initialize some variables set by options.
807 ac_init_help=
808 ac_init_version=false
809 ac_unrecognized_opts=
810 ac_unrecognized_sep=
811 # The variables have the same names as the options, with
812 # dashes changed to underlines.
813 cache_file=/dev/null
814 exec_prefix=NONE
815 no_create=
816 no_recursion=
817 prefix=NONE
818 program_prefix=NONE
819 program_suffix=NONE
820 program_transform_name=s,x,x,
821 silent=
822 site=
823 srcdir=
824 verbose=
825 x_includes=NONE
826 x_libraries=NONE
827
828 # Installation directory options.
829 # These are left unexpanded so users can "make install exec_prefix=/foo"
830 # and all the variables that are supposed to be based on exec_prefix
831 # by default will actually change.
832 # Use braces instead of parens because sh, perl, etc. also accept them.
833 # (The list follows the same order as the GNU Coding Standards.)
834 bindir='${exec_prefix}/bin'
835 sbindir='${exec_prefix}/sbin'
836 libexecdir='${exec_prefix}/libexec'
837 datarootdir='${prefix}/share'
838 datadir='${datarootdir}'
839 sysconfdir='${prefix}/etc'
840 sharedstatedir='${prefix}/com'
841 localstatedir='${prefix}/var'
842 includedir='${prefix}/include'
843 oldincludedir='/usr/include'
844 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
845 infodir='${datarootdir}/info'
846 htmldir='${docdir}'
847 dvidir='${docdir}'
848 pdfdir='${docdir}'
849 psdir='${docdir}'
850 libdir='${exec_prefix}/lib'
851 localedir='${datarootdir}/locale'
852 mandir='${datarootdir}/man'
853
854 ac_prev=
855 ac_dashdash=
856 for ac_option
857 do
858 # If the previous option needs an argument, assign it.
859 if test -n "$ac_prev"; then
860 eval $ac_prev=\$ac_option
861 ac_prev=
862 continue
863 fi
864
865 case $ac_option in
866 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
867 *=) ac_optarg= ;;
868 *) ac_optarg=yes ;;
869 esac
870
871 # Accept the important Cygnus configure options, so we can diagnose typos.
872
873 case $ac_dashdash$ac_option in
874 --)
875 ac_dashdash=yes ;;
876
877 -bindir | --bindir | --bindi | --bind | --bin | --bi)
878 ac_prev=bindir ;;
879 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
880 bindir=$ac_optarg ;;
881
882 -build | --build | --buil | --bui | --bu)
883 ac_prev=build_alias ;;
884 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
885 build_alias=$ac_optarg ;;
886
887 -cache-file | --cache-file | --cache-fil | --cache-fi \
888 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
889 ac_prev=cache_file ;;
890 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
891 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
892 cache_file=$ac_optarg ;;
893
894 --config-cache | -C)
895 cache_file=config.cache ;;
896
897 -datadir | --datadir | --datadi | --datad)
898 ac_prev=datadir ;;
899 -datadir=* | --datadir=* | --datadi=* | --datad=*)
900 datadir=$ac_optarg ;;
901
902 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
903 | --dataroo | --dataro | --datar)
904 ac_prev=datarootdir ;;
905 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
906 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
907 datarootdir=$ac_optarg ;;
908
909 -disable-* | --disable-*)
910 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
911 # Reject names that are not valid shell variable names.
912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
913 as_fn_error $? "invalid feature name: $ac_useropt"
914 ac_useropt_orig=$ac_useropt
915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
916 case $ac_user_opts in
917 *"
918 "enable_$ac_useropt"
919 "*) ;;
920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
921 ac_unrecognized_sep=', ';;
922 esac
923 eval enable_$ac_useropt=no ;;
924
925 -docdir | --docdir | --docdi | --doc | --do)
926 ac_prev=docdir ;;
927 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
928 docdir=$ac_optarg ;;
929
930 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
931 ac_prev=dvidir ;;
932 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
933 dvidir=$ac_optarg ;;
934
935 -enable-* | --enable-*)
936 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
937 # Reject names that are not valid shell variable names.
938 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
939 as_fn_error $? "invalid feature name: $ac_useropt"
940 ac_useropt_orig=$ac_useropt
941 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
942 case $ac_user_opts in
943 *"
944 "enable_$ac_useropt"
945 "*) ;;
946 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
947 ac_unrecognized_sep=', ';;
948 esac
949 eval enable_$ac_useropt=\$ac_optarg ;;
950
951 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
952 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
953 | --exec | --exe | --ex)
954 ac_prev=exec_prefix ;;
955 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
956 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
957 | --exec=* | --exe=* | --ex=*)
958 exec_prefix=$ac_optarg ;;
959
960 -gas | --gas | --ga | --g)
961 # Obsolete; use --with-gas.
962 with_gas=yes ;;
963
964 -help | --help | --hel | --he | -h)
965 ac_init_help=long ;;
966 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
967 ac_init_help=recursive ;;
968 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
969 ac_init_help=short ;;
970
971 -host | --host | --hos | --ho)
972 ac_prev=host_alias ;;
973 -host=* | --host=* | --hos=* | --ho=*)
974 host_alias=$ac_optarg ;;
975
976 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
977 ac_prev=htmldir ;;
978 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
979 | --ht=*)
980 htmldir=$ac_optarg ;;
981
982 -includedir | --includedir | --includedi | --included | --include \
983 | --includ | --inclu | --incl | --inc)
984 ac_prev=includedir ;;
985 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
986 | --includ=* | --inclu=* | --incl=* | --inc=*)
987 includedir=$ac_optarg ;;
988
989 -infodir | --infodir | --infodi | --infod | --info | --inf)
990 ac_prev=infodir ;;
991 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
992 infodir=$ac_optarg ;;
993
994 -libdir | --libdir | --libdi | --libd)
995 ac_prev=libdir ;;
996 -libdir=* | --libdir=* | --libdi=* | --libd=*)
997 libdir=$ac_optarg ;;
998
999 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1000 | --libexe | --libex | --libe)
1001 ac_prev=libexecdir ;;
1002 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1003 | --libexe=* | --libex=* | --libe=*)
1004 libexecdir=$ac_optarg ;;
1005
1006 -localedir | --localedir | --localedi | --localed | --locale)
1007 ac_prev=localedir ;;
1008 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1009 localedir=$ac_optarg ;;
1010
1011 -localstatedir | --localstatedir | --localstatedi | --localstated \
1012 | --localstate | --localstat | --localsta | --localst | --locals)
1013 ac_prev=localstatedir ;;
1014 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1015 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1016 localstatedir=$ac_optarg ;;
1017
1018 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1019 ac_prev=mandir ;;
1020 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1021 mandir=$ac_optarg ;;
1022
1023 -nfp | --nfp | --nf)
1024 # Obsolete; use --without-fp.
1025 with_fp=no ;;
1026
1027 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1028 | --no-cr | --no-c | -n)
1029 no_create=yes ;;
1030
1031 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1032 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1033 no_recursion=yes ;;
1034
1035 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1036 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1037 | --oldin | --oldi | --old | --ol | --o)
1038 ac_prev=oldincludedir ;;
1039 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1040 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1041 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1042 oldincludedir=$ac_optarg ;;
1043
1044 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1045 ac_prev=prefix ;;
1046 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1047 prefix=$ac_optarg ;;
1048
1049 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1050 | --program-pre | --program-pr | --program-p)
1051 ac_prev=program_prefix ;;
1052 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1053 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1054 program_prefix=$ac_optarg ;;
1055
1056 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1057 | --program-suf | --program-su | --program-s)
1058 ac_prev=program_suffix ;;
1059 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1060 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1061 program_suffix=$ac_optarg ;;
1062
1063 -program-transform-name | --program-transform-name \
1064 | --program-transform-nam | --program-transform-na \
1065 | --program-transform-n | --program-transform- \
1066 | --program-transform | --program-transfor \
1067 | --program-transfo | --program-transf \
1068 | --program-trans | --program-tran \
1069 | --progr-tra | --program-tr | --program-t)
1070 ac_prev=program_transform_name ;;
1071 -program-transform-name=* | --program-transform-name=* \
1072 | --program-transform-nam=* | --program-transform-na=* \
1073 | --program-transform-n=* | --program-transform-=* \
1074 | --program-transform=* | --program-transfor=* \
1075 | --program-transfo=* | --program-transf=* \
1076 | --program-trans=* | --program-tran=* \
1077 | --progr-tra=* | --program-tr=* | --program-t=*)
1078 program_transform_name=$ac_optarg ;;
1079
1080 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1081 ac_prev=pdfdir ;;
1082 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1083 pdfdir=$ac_optarg ;;
1084
1085 -psdir | --psdir | --psdi | --psd | --ps)
1086 ac_prev=psdir ;;
1087 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1088 psdir=$ac_optarg ;;
1089
1090 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1091 | -silent | --silent | --silen | --sile | --sil)
1092 silent=yes ;;
1093
1094 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1095 ac_prev=sbindir ;;
1096 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1097 | --sbi=* | --sb=*)
1098 sbindir=$ac_optarg ;;
1099
1100 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1101 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1102 | --sharedst | --shareds | --shared | --share | --shar \
1103 | --sha | --sh)
1104 ac_prev=sharedstatedir ;;
1105 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1106 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1107 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1108 | --sha=* | --sh=*)
1109 sharedstatedir=$ac_optarg ;;
1110
1111 -site | --site | --sit)
1112 ac_prev=site ;;
1113 -site=* | --site=* | --sit=*)
1114 site=$ac_optarg ;;
1115
1116 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1117 ac_prev=srcdir ;;
1118 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1119 srcdir=$ac_optarg ;;
1120
1121 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1122 | --syscon | --sysco | --sysc | --sys | --sy)
1123 ac_prev=sysconfdir ;;
1124 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1125 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1126 sysconfdir=$ac_optarg ;;
1127
1128 -target | --target | --targe | --targ | --tar | --ta | --t)
1129 ac_prev=target_alias ;;
1130 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1131 target_alias=$ac_optarg ;;
1132
1133 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1134 verbose=yes ;;
1135
1136 -version | --version | --versio | --versi | --vers | -V)
1137 ac_init_version=: ;;
1138
1139 -with-* | --with-*)
1140 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1141 # Reject names that are not valid shell variable names.
1142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1143 as_fn_error $? "invalid package name: $ac_useropt"
1144 ac_useropt_orig=$ac_useropt
1145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146 case $ac_user_opts in
1147 *"
1148 "with_$ac_useropt"
1149 "*) ;;
1150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1151 ac_unrecognized_sep=', ';;
1152 esac
1153 eval with_$ac_useropt=\$ac_optarg ;;
1154
1155 -without-* | --without-*)
1156 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1157 # Reject names that are not valid shell variable names.
1158 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1159 as_fn_error $? "invalid package name: $ac_useropt"
1160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164 "with_$ac_useropt"
1165 "*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=no ;;
1170
1171 --x)
1172 # Obsolete; use --with-x.
1173 with_x=yes ;;
1174
1175 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1176 | --x-incl | --x-inc | --x-in | --x-i)
1177 ac_prev=x_includes ;;
1178 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1179 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1180 x_includes=$ac_optarg ;;
1181
1182 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1183 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1184 ac_prev=x_libraries ;;
1185 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1186 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1187 x_libraries=$ac_optarg ;;
1188
1189 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1190 Try \`$0 --help' for more information"
1191 ;;
1192
1193 *=*)
1194 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1195 # Reject names that are not valid shell variable names.
1196 case $ac_envvar in #(
1197 '' | [0-9]* | *[!_$as_cr_alnum]* )
1198 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1199 esac
1200 eval $ac_envvar=\$ac_optarg
1201 export $ac_envvar ;;
1202
1203 *)
1204 # FIXME: should be removed in autoconf 3.0.
1205 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1206 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1207 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1208 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1209 ;;
1210
1211 esac
1212 done
1213
1214 if test -n "$ac_prev"; then
1215 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1216 as_fn_error $? "missing argument to $ac_option"
1217 fi
1218
1219 if test -n "$ac_unrecognized_opts"; then
1220 case $enable_option_checking in
1221 no) ;;
1222 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1223 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1224 esac
1225 fi
1226
1227 # Check all directory arguments for consistency.
1228 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1229 datadir sysconfdir sharedstatedir localstatedir includedir \
1230 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1231 libdir localedir mandir
1232 do
1233 eval ac_val=\$$ac_var
1234 # Remove trailing slashes.
1235 case $ac_val in
1236 */ )
1237 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1238 eval $ac_var=\$ac_val;;
1239 esac
1240 # Be sure to have absolute directory names.
1241 case $ac_val in
1242 [\\/$]* | ?:[\\/]* ) continue;;
1243 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1244 esac
1245 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1246 done
1247
1248 # There might be people who depend on the old broken behavior: `$host'
1249 # used to hold the argument of --host etc.
1250 # FIXME: To remove some day.
1251 build=$build_alias
1252 host=$host_alias
1253 target=$target_alias
1254
1255 # FIXME: To remove some day.
1256 if test "x$host_alias" != x; then
1257 if test "x$build_alias" = x; then
1258 cross_compiling=maybe
1259 elif test "x$build_alias" != "x$host_alias"; then
1260 cross_compiling=yes
1261 fi
1262 fi
1263
1264 ac_tool_prefix=
1265 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1266
1267 test "$silent" = yes && exec 6>/dev/null
1268
1269
1270 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1271 ac_ls_di=`ls -di .` &&
1272 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1273 as_fn_error $? "working directory cannot be determined"
1274 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1275 as_fn_error $? "pwd does not report name of working directory"
1276
1277
1278 # Find the source files, if location was not specified.
1279 if test -z "$srcdir"; then
1280 ac_srcdir_defaulted=yes
1281 # Try the directory containing this script, then the parent directory.
1282 ac_confdir=`$as_dirname -- "$as_myself" ||
1283 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1284 X"$as_myself" : 'X\(//\)[^/]' \| \
1285 X"$as_myself" : 'X\(//\)$' \| \
1286 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1287 $as_echo X"$as_myself" |
1288 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1289 s//\1/
1290 q
1291 }
1292 /^X\(\/\/\)[^/].*/{
1293 s//\1/
1294 q
1295 }
1296 /^X\(\/\/\)$/{
1297 s//\1/
1298 q
1299 }
1300 /^X\(\/\).*/{
1301 s//\1/
1302 q
1303 }
1304 s/.*/./; q'`
1305 srcdir=$ac_confdir
1306 if test ! -r "$srcdir/$ac_unique_file"; then
1307 srcdir=..
1308 fi
1309 else
1310 ac_srcdir_defaulted=no
1311 fi
1312 if test ! -r "$srcdir/$ac_unique_file"; then
1313 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1314 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1315 fi
1316 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1317 ac_abs_confdir=`(
1318 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1319 pwd)`
1320 # When building in place, set srcdir=.
1321 if test "$ac_abs_confdir" = "$ac_pwd"; then
1322 srcdir=.
1323 fi
1324 # Remove unnecessary trailing slashes from srcdir.
1325 # Double slashes in file names in object file debugging info
1326 # mess up M-x gdb in Emacs.
1327 case $srcdir in
1328 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1329 esac
1330 for ac_var in $ac_precious_vars; do
1331 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1332 eval ac_env_${ac_var}_value=\$${ac_var}
1333 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1334 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1335 done
1336
1337 #
1338 # Report the --help message.
1339 #
1340 if test "$ac_init_help" = "long"; then
1341 # Omit some internal or obsolete options to make the list less imposing.
1342 # This message is too long to be a string in the A/UX 3.1 sh.
1343 cat <<_ACEOF
1344 \`configure' configures cinnamon-menus 2.1 to adapt to many kinds of systems.
1345
1346 Usage: $0 [OPTION]... [VAR=VALUE]...
1347
1348 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1349 VAR=VALUE. See below for descriptions of some of the useful variables.
1350
1351 Defaults for the options are specified in brackets.
1352
1353 Configuration:
1354 -h, --help display this help and exit
1355 --help=short display options specific to this package
1356 --help=recursive display the short help of all the included packages
1357 -V, --version display version information and exit
1358 -q, --quiet, --silent do not print \`checking ...' messages
1359 --cache-file=FILE cache test results in FILE [disabled]
1360 -C, --config-cache alias for \`--cache-file=config.cache'
1361 -n, --no-create do not create output files
1362 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1363
1364 Installation directories:
1365 --prefix=PREFIX install architecture-independent files in PREFIX
1366 [$ac_default_prefix]
1367 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1368 [PREFIX]
1369
1370 By default, \`make install' will install all the files in
1371 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1372 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1373 for instance \`--prefix=\$HOME'.
1374
1375 For better control, use the options below.
1376
1377 Fine tuning of the installation directories:
1378 --bindir=DIR user executables [EPREFIX/bin]
1379 --sbindir=DIR system admin executables [EPREFIX/sbin]
1380 --libexecdir=DIR program executables [EPREFIX/libexec]
1381 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1382 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1383 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1384 --libdir=DIR object code libraries [EPREFIX/lib]
1385 --includedir=DIR C header files [PREFIX/include]
1386 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1387 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1388 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1389 --infodir=DIR info documentation [DATAROOTDIR/info]
1390 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1391 --mandir=DIR man documentation [DATAROOTDIR/man]
1392 --docdir=DIR documentation root [DATAROOTDIR/doc/cinnamon-menus]
1393 --htmldir=DIR html documentation [DOCDIR]
1394 --dvidir=DIR dvi documentation [DOCDIR]
1395 --pdfdir=DIR pdf documentation [DOCDIR]
1396 --psdir=DIR ps documentation [DOCDIR]
1397 _ACEOF
1398
1399 cat <<\_ACEOF
1400
1401 Program names:
1402 --program-prefix=PREFIX prepend PREFIX to installed program names
1403 --program-suffix=SUFFIX append SUFFIX to installed program names
1404 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1405
1406 System types:
1407 --build=BUILD configure for building on BUILD [guessed]
1408 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1409 _ACEOF
1410 fi
1411
1412 if test -n "$ac_init_help"; then
1413 case $ac_init_help in
1414 short | recursive ) echo "Configuration of cinnamon-menus 2.1:";;
1415 esac
1416 cat <<\_ACEOF
1417
1418 Optional Features:
1419 --disable-option-checking ignore unrecognized --enable/--with options
1420 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1421 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1422 --enable-silent-rules less verbose build output (undo: "make V=1")
1423 --disable-silent-rules verbose build output (undo: "make V=0")
1424 --enable-maintainer-mode
1425 enable make rules and dependencies not useful (and
1426 sometimes confusing) to the casual installer
1427 --enable-dependency-tracking
1428 do not reject slow dependency extractors
1429 --disable-dependency-tracking
1430 speeds up one-time build
1431 --enable-shared[=PKGS] build shared libraries [default=yes]
1432 --enable-static[=PKGS] build static libraries [default=yes]
1433 --enable-fast-install[=PKGS]
1434 optimize for fast installation [default=yes]
1435 --disable-libtool-lock avoid locking (might break parallel builds)
1436 --enable-compile-warnings=[no/minimum/yes/maximum/error]
1437 Turn on compiler warnings
1438 --enable-iso-c Try to warn if code is not ISO C
1439 --enable-deprecation-flags
1440 use *_DISABLE_DEPRECATED flags [default=no]
1441 --enable-debug=[no/minimum/yes]
1442 turn on debugging [default=debug_default]
1443 --enable-introspection=[no/auto/yes]
1444 Enable introspection for this build
1445
1446 Optional Packages:
1447 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1448 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1449 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1450 both]
1451 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1452 --with-sysroot=DIR Search for dependent libraries within DIR
1453 (or the compiler's sysroot if not specified).
1454
1455 Some influential environment variables:
1456 CC C compiler command
1457 CFLAGS C compiler flags
1458 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1459 nonstandard directory <lib dir>
1460 LIBS libraries to pass to the linker, e.g. -l<library>
1461 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1462 you have headers in a nonstandard directory <include dir>
1463 CPP C preprocessor
1464 PKG_CONFIG path to pkg-config utility
1465 PKG_CONFIG_PATH
1466 directories to add to pkg-config's search path
1467 PKG_CONFIG_LIBDIR
1468 path overriding pkg-config's built-in search path
1469 GIO_UNIX_CFLAGS
1470 C compiler flags for GIO_UNIX, overriding pkg-config
1471 GIO_UNIX_LIBS
1472 linker flags for GIO_UNIX, overriding pkg-config
1473
1474 Use these variables to override the choices made by `configure' or to help
1475 it to find libraries and programs with nonstandard names/locations.
1476
1477 Report bugs to the package provider.
1478 _ACEOF
1479 ac_status=$?
1480 fi
1481
1482 if test "$ac_init_help" = "recursive"; then
1483 # If there are subdirs, report their specific --help.
1484 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1485 test -d "$ac_dir" ||
1486 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1487 continue
1488 ac_builddir=.
1489
1490 case "$ac_dir" in
1491 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1492 *)
1493 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1494 # A ".." for each directory in $ac_dir_suffix.
1495 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1496 case $ac_top_builddir_sub in
1497 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1498 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1499 esac ;;
1500 esac
1501 ac_abs_top_builddir=$ac_pwd
1502 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1503 # for backward compatibility:
1504 ac_top_builddir=$ac_top_build_prefix
1505
1506 case $srcdir in
1507 .) # We are building in place.
1508 ac_srcdir=.
1509 ac_top_srcdir=$ac_top_builddir_sub
1510 ac_abs_top_srcdir=$ac_pwd ;;
1511 [\\/]* | ?:[\\/]* ) # Absolute name.
1512 ac_srcdir=$srcdir$ac_dir_suffix;
1513 ac_top_srcdir=$srcdir
1514 ac_abs_top_srcdir=$srcdir ;;
1515 *) # Relative name.
1516 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1517 ac_top_srcdir=$ac_top_build_prefix$srcdir
1518 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1519 esac
1520 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1521
1522 cd "$ac_dir" || { ac_status=$?; continue; }
1523 # Check for guested configure.
1524 if test -f "$ac_srcdir/configure.gnu"; then
1525 echo &&
1526 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1527 elif test -f "$ac_srcdir/configure"; then
1528 echo &&
1529 $SHELL "$ac_srcdir/configure" --help=recursive
1530 else
1531 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1532 fi || ac_status=$?
1533 cd "$ac_pwd" || { ac_status=$?; break; }
1534 done
1535 fi
1536
1537 test -n "$ac_init_help" && exit $ac_status
1538 if $ac_init_version; then
1539 cat <<\_ACEOF
1540 cinnamon-menus configure 2.1
1541 generated by GNU Autoconf 2.69
1542
1543 Copyright (C) 2012 Free Software Foundation, Inc.
1544 This configure script is free software; the Free Software Foundation
1545 gives unlimited permission to copy, distribute and modify it.
1546 _ACEOF
1547 exit
1548 fi
1549
1550 ## ------------------------ ##
1551 ## Autoconf initialization. ##
1552 ## ------------------------ ##
1553
1554 # ac_fn_c_try_compile LINENO
1555 # --------------------------
1556 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1557 ac_fn_c_try_compile ()
1558 {
1559 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1560 rm -f conftest.$ac_objext
1561 if { { ac_try="$ac_compile"
1562 case "(($ac_try" in
1563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1564 *) ac_try_echo=$ac_try;;
1565 esac
1566 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1567 $as_echo "$ac_try_echo"; } >&5
1568 (eval "$ac_compile") 2>conftest.err
1569 ac_status=$?
1570 if test -s conftest.err; then
1571 grep -v '^ *+' conftest.err >conftest.er1
1572 cat conftest.er1 >&5
1573 mv -f conftest.er1 conftest.err
1574 fi
1575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1576 test $ac_status = 0; } && {
1577 test -z "$ac_c_werror_flag" ||
1578 test ! -s conftest.err
1579 } && test -s conftest.$ac_objext; then :
1580 ac_retval=0
1581 else
1582 $as_echo "$as_me: failed program was:" >&5
1583 sed 's/^/| /' conftest.$ac_ext >&5
1584
1585 ac_retval=1
1586 fi
1587 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1588 as_fn_set_status $ac_retval
1589
1590 } # ac_fn_c_try_compile
1591
1592 # ac_fn_c_try_link LINENO
1593 # -----------------------
1594 # Try to link conftest.$ac_ext, and return whether this succeeded.
1595 ac_fn_c_try_link ()
1596 {
1597 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1598 rm -f conftest.$ac_objext conftest$ac_exeext
1599 if { { ac_try="$ac_link"
1600 case "(($ac_try" in
1601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1602 *) ac_try_echo=$ac_try;;
1603 esac
1604 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1605 $as_echo "$ac_try_echo"; } >&5
1606 (eval "$ac_link") 2>conftest.err
1607 ac_status=$?
1608 if test -s conftest.err; then
1609 grep -v '^ *+' conftest.err >conftest.er1
1610 cat conftest.er1 >&5
1611 mv -f conftest.er1 conftest.err
1612 fi
1613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1614 test $ac_status = 0; } && {
1615 test -z "$ac_c_werror_flag" ||
1616 test ! -s conftest.err
1617 } && test -s conftest$ac_exeext && {
1618 test "$cross_compiling" = yes ||
1619 test -x conftest$ac_exeext
1620 }; then :
1621 ac_retval=0
1622 else
1623 $as_echo "$as_me: failed program was:" >&5
1624 sed 's/^/| /' conftest.$ac_ext >&5
1625
1626 ac_retval=1
1627 fi
1628 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1629 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1630 # interfere with the next link command; also delete a directory that is
1631 # left behind by Apple's compiler. We do this before executing the actions.
1632 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1633 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1634 as_fn_set_status $ac_retval
1635
1636 } # ac_fn_c_try_link
1637
1638 # ac_fn_c_try_cpp LINENO
1639 # ----------------------
1640 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1641 ac_fn_c_try_cpp ()
1642 {
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 if { { ac_try="$ac_cpp conftest.$ac_ext"
1645 case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648 esac
1649 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650 $as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1659 test $ac_status = 0; } > conftest.i && {
1660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 }; then :
1663 ac_retval=0
1664 else
1665 $as_echo "$as_me: failed program was:" >&5
1666 sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669 fi
1670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1671 as_fn_set_status $ac_retval
1672
1673 } # ac_fn_c_try_cpp
1674
1675 # ac_fn_c_try_run LINENO
1676 # ----------------------
1677 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1678 # that executables *can* be run.
1679 ac_fn_c_try_run ()
1680 {
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_link"
1683 case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686 esac
1687 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688 $as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_link") 2>&5
1690 ac_status=$?
1691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1692 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1693 { { case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696 esac
1697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698 $as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_try") 2>&5
1700 ac_status=$?
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; }; }; then :
1703 ac_retval=0
1704 else
1705 $as_echo "$as_me: program exited with status $ac_status" >&5
1706 $as_echo "$as_me: failed program was:" >&5
1707 sed 's/^/| /' conftest.$ac_ext >&5
1708
1709 ac_retval=$ac_status
1710 fi
1711 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1712 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1713 as_fn_set_status $ac_retval
1714
1715 } # ac_fn_c_try_run
1716
1717 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1718 # -------------------------------------------------------
1719 # Tests whether HEADER exists and can be compiled using the include files in
1720 # INCLUDES, setting the cache variable VAR accordingly.
1721 ac_fn_c_check_header_compile ()
1722 {
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1725 $as_echo_n "checking for $2... " >&6; }
1726 if eval \${$3+:} false; then :
1727 $as_echo_n "(cached) " >&6
1728 else
1729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1730 /* end confdefs.h. */
1731 $4
1732 #include <$2>
1733 _ACEOF
1734 if ac_fn_c_try_compile "$LINENO"; then :
1735 eval "$3=yes"
1736 else
1737 eval "$3=no"
1738 fi
1739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1740 fi
1741 eval ac_res=\$$3
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1743 $as_echo "$ac_res" >&6; }
1744 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1745
1746 } # ac_fn_c_check_header_compile
1747
1748 # ac_fn_c_check_func LINENO FUNC VAR
1749 # ----------------------------------
1750 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1751 ac_fn_c_check_func ()
1752 {
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1755 $as_echo_n "checking for $2... " >&6; }
1756 if eval \${$3+:} false; then :
1757 $as_echo_n "(cached) " >&6
1758 else
1759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1760 /* end confdefs.h. */
1761 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1762 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1763 #define $2 innocuous_$2
1764
1765 /* System header to define __stub macros and hopefully few prototypes,
1766 which can conflict with char $2 (); below.
1767 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1768 <limits.h> exists even on freestanding compilers. */
1769
1770 #ifdef __STDC__
1771 # include <limits.h>
1772 #else
1773 # include <assert.h>
1774 #endif
1775
1776 #undef $2
1777
1778 /* Override any GCC internal prototype to avoid an error.
1779 Use char because int might match the return type of a GCC
1780 builtin and then its argument prototype would still apply. */
1781 #ifdef __cplusplus
1782 extern "C"
1783 #endif
1784 char $2 ();
1785 /* The GNU C library defines this for functions which it implements
1786 to always fail with ENOSYS. Some functions are actually named
1787 something starting with __ and the normal name is an alias. */
1788 #if defined __stub_$2 || defined __stub___$2
1789 choke me
1790 #endif
1791
1792 int
1793 main ()
1794 {
1795 return $2 ();
1796 ;
1797 return 0;
1798 }
1799 _ACEOF
1800 if ac_fn_c_try_link "$LINENO"; then :
1801 eval "$3=yes"
1802 else
1803 eval "$3=no"
1804 fi
1805 rm -f core conftest.err conftest.$ac_objext \
1806 conftest$ac_exeext conftest.$ac_ext
1807 fi
1808 eval ac_res=\$$3
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1810 $as_echo "$ac_res" >&6; }
1811 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1812
1813 } # ac_fn_c_check_func
1814 cat >config.log <<_ACEOF
1815 This file contains any messages produced by compilers while
1816 running configure, to aid debugging if configure makes a mistake.
1817
1818 It was created by cinnamon-menus $as_me 2.1, which was
1819 generated by GNU Autoconf 2.69. Invocation command line was
1820
1821 $ $0 $@
1822
1823 _ACEOF
1824 exec 5>>config.log
1825 {
1826 cat <<_ASUNAME
1827 ## --------- ##
1828 ## Platform. ##
1829 ## --------- ##
1830
1831 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1832 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1833 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1834 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1835 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1836
1837 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1838 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1839
1840 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1841 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1842 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1843 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1844 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1845 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1846 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1847
1848 _ASUNAME
1849
1850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1851 for as_dir in $PATH
1852 do
1853 IFS=$as_save_IFS
1854 test -z "$as_dir" && as_dir=.
1855 $as_echo "PATH: $as_dir"
1856 done
1857 IFS=$as_save_IFS
1858
1859 } >&5
1860
1861 cat >&5 <<_ACEOF
1862
1863
1864 ## ----------- ##
1865 ## Core tests. ##
1866 ## ----------- ##
1867
1868 _ACEOF
1869
1870
1871 # Keep a trace of the command line.
1872 # Strip out --no-create and --no-recursion so they do not pile up.
1873 # Strip out --silent because we don't want to record it for future runs.
1874 # Also quote any args containing shell meta-characters.
1875 # Make two passes to allow for proper duplicate-argument suppression.
1876 ac_configure_args=
1877 ac_configure_args0=
1878 ac_configure_args1=
1879 ac_must_keep_next=false
1880 for ac_pass in 1 2
1881 do
1882 for ac_arg
1883 do
1884 case $ac_arg in
1885 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1886 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1887 | -silent | --silent | --silen | --sile | --sil)
1888 continue ;;
1889 *\'*)
1890 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1891 esac
1892 case $ac_pass in
1893 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1894 2)
1895 as_fn_append ac_configure_args1 " '$ac_arg'"
1896 if test $ac_must_keep_next = true; then
1897 ac_must_keep_next=false # Got value, back to normal.
1898 else
1899 case $ac_arg in
1900 *=* | --config-cache | -C | -disable-* | --disable-* \
1901 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1902 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1903 | -with-* | --with-* | -without-* | --without-* | --x)
1904 case "$ac_configure_args0 " in
1905 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1906 esac
1907 ;;
1908 -* ) ac_must_keep_next=true ;;
1909 esac
1910 fi
1911 as_fn_append ac_configure_args " '$ac_arg'"
1912 ;;
1913 esac
1914 done
1915 done
1916 { ac_configure_args0=; unset ac_configure_args0;}
1917 { ac_configure_args1=; unset ac_configure_args1;}
1918
1919 # When interrupted or exit'd, cleanup temporary files, and complete
1920 # config.log. We remove comments because anyway the quotes in there
1921 # would cause problems or look ugly.
1922 # WARNING: Use '\'' to represent an apostrophe within the trap.
1923 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1924 trap 'exit_status=$?
1925 # Save into config.log some information that might help in debugging.
1926 {
1927 echo
1928
1929 $as_echo "## ---------------- ##
1930 ## Cache variables. ##
1931 ## ---------------- ##"
1932 echo
1933 # The following way of writing the cache mishandles newlines in values,
1934 (
1935 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1936 eval ac_val=\$$ac_var
1937 case $ac_val in #(
1938 *${as_nl}*)
1939 case $ac_var in #(
1940 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1941 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1942 esac
1943 case $ac_var in #(
1944 _ | IFS | as_nl) ;; #(
1945 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1946 *) { eval $ac_var=; unset $ac_var;} ;;
1947 esac ;;
1948 esac
1949 done
1950 (set) 2>&1 |
1951 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1952 *${as_nl}ac_space=\ *)
1953 sed -n \
1954 "s/'\''/'\''\\\\'\'''\''/g;
1955 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1956 ;; #(
1957 *)
1958 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1959 ;;
1960 esac |
1961 sort
1962 )
1963 echo
1964
1965 $as_echo "## ----------------- ##
1966 ## Output variables. ##
1967 ## ----------------- ##"
1968 echo
1969 for ac_var in $ac_subst_vars
1970 do
1971 eval ac_val=\$$ac_var
1972 case $ac_val in
1973 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1974 esac
1975 $as_echo "$ac_var='\''$ac_val'\''"
1976 done | sort
1977 echo
1978
1979 if test -n "$ac_subst_files"; then
1980 $as_echo "## ------------------- ##
1981 ## File substitutions. ##
1982 ## ------------------- ##"
1983 echo
1984 for ac_var in $ac_subst_files
1985 do
1986 eval ac_val=\$$ac_var
1987 case $ac_val in
1988 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1989 esac
1990 $as_echo "$ac_var='\''$ac_val'\''"
1991 done | sort
1992 echo
1993 fi
1994
1995 if test -s confdefs.h; then
1996 $as_echo "## ----------- ##
1997 ## confdefs.h. ##
1998 ## ----------- ##"
1999 echo
2000 cat confdefs.h
2001 echo
2002 fi
2003 test "$ac_signal" != 0 &&
2004 $as_echo "$as_me: caught signal $ac_signal"
2005 $as_echo "$as_me: exit $exit_status"
2006 } >&5
2007 rm -f core *.core core.conftest.* &&
2008 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2009 exit $exit_status
2010 ' 0
2011 for ac_signal in 1 2 13 15; do
2012 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2013 done
2014 ac_signal=0
2015
2016 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2017 rm -f -r conftest* confdefs.h
2018
2019 $as_echo "/* confdefs.h */" > confdefs.h
2020
2021 # Predefined preprocessor variables.
2022
2023 cat >>confdefs.h <<_ACEOF
2024 #define PACKAGE_NAME "$PACKAGE_NAME"
2025 _ACEOF
2026
2027 cat >>confdefs.h <<_ACEOF
2028 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2029 _ACEOF
2030
2031 cat >>confdefs.h <<_ACEOF
2032 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2033 _ACEOF
2034
2035 cat >>confdefs.h <<_ACEOF
2036 #define PACKAGE_STRING "$PACKAGE_STRING"
2037 _ACEOF
2038
2039 cat >>confdefs.h <<_ACEOF
2040 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2041 _ACEOF
2042
2043 cat >>confdefs.h <<_ACEOF
2044 #define PACKAGE_URL "$PACKAGE_URL"
2045 _ACEOF
2046
2047
2048 # Let the site file select an alternate cache file if it wants to.
2049 # Prefer an explicitly selected file to automatically selected ones.
2050 ac_site_file1=NONE
2051 ac_site_file2=NONE
2052 if test -n "$CONFIG_SITE"; then
2053 # We do not want a PATH search for config.site.
2054 case $CONFIG_SITE in #((
2055 -*) ac_site_file1=./$CONFIG_SITE;;
2056 */*) ac_site_file1=$CONFIG_SITE;;
2057 *) ac_site_file1=./$CONFIG_SITE;;
2058 esac
2059 elif test "x$prefix" != xNONE; then
2060 ac_site_file1=$prefix/share/config.site
2061 ac_site_file2=$prefix/etc/config.site
2062 else
2063 ac_site_file1=$ac_default_prefix/share/config.site
2064 ac_site_file2=$ac_default_prefix/etc/config.site
2065 fi
2066 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2067 do
2068 test "x$ac_site_file" = xNONE && continue
2069 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2070 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2071 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2072 sed 's/^/| /' "$ac_site_file" >&5
2073 . "$ac_site_file" \
2074 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2075 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2076 as_fn_error $? "failed to load site script $ac_site_file
2077 See \`config.log' for more details" "$LINENO" 5; }
2078 fi
2079 done
2080
2081 if test -r "$cache_file"; then
2082 # Some versions of bash will fail to source /dev/null (special files
2083 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2084 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2086 $as_echo "$as_me: loading cache $cache_file" >&6;}
2087 case $cache_file in
2088 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2089 *) . "./$cache_file";;
2090 esac
2091 fi
2092 else
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2094 $as_echo "$as_me: creating cache $cache_file" >&6;}
2095 >$cache_file
2096 fi
2097
2098 # Check that the precious variables saved in the cache have kept the same
2099 # value.
2100 ac_cache_corrupted=false
2101 for ac_var in $ac_precious_vars; do
2102 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2103 eval ac_new_set=\$ac_env_${ac_var}_set
2104 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2105 eval ac_new_val=\$ac_env_${ac_var}_value
2106 case $ac_old_set,$ac_new_set in
2107 set,)
2108 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2109 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2110 ac_cache_corrupted=: ;;
2111 ,set)
2112 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2113 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2114 ac_cache_corrupted=: ;;
2115 ,);;
2116 *)
2117 if test "x$ac_old_val" != "x$ac_new_val"; then
2118 # differences in whitespace do not lead to failure.
2119 ac_old_val_w=`echo x $ac_old_val`
2120 ac_new_val_w=`echo x $ac_new_val`
2121 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2122 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2123 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2124 ac_cache_corrupted=:
2125 else
2126 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2127 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2128 eval $ac_var=\$ac_old_val
2129 fi
2130 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2131 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2133 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2134 fi;;
2135 esac
2136 # Pass precious variables to config.status.
2137 if test "$ac_new_set" = set; then
2138 case $ac_new_val in
2139 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2140 *) ac_arg=$ac_var=$ac_new_val ;;
2141 esac
2142 case " $ac_configure_args " in
2143 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2144 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2145 esac
2146 fi
2147 done
2148 if $ac_cache_corrupted; then
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2150 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2151 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2152 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2153 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2154 fi
2155 ## -------------------- ##
2156 ## Main body of script. ##
2157 ## -------------------- ##
2158
2159 ac_ext=c
2160 ac_cpp='$CPP $CPPFLAGS'
2161 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2162 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2163 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2164
2165
2166
2167
2168 am__api_version='1.13'
2169
2170 ac_aux_dir=
2171 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2172 if test -f "$ac_dir/install-sh"; then
2173 ac_aux_dir=$ac_dir
2174 ac_install_sh="$ac_aux_dir/install-sh -c"
2175 break
2176 elif test -f "$ac_dir/install.sh"; then
2177 ac_aux_dir=$ac_dir
2178 ac_install_sh="$ac_aux_dir/install.sh -c"
2179 break
2180 elif test -f "$ac_dir/shtool"; then
2181 ac_aux_dir=$ac_dir
2182 ac_install_sh="$ac_aux_dir/shtool install -c"
2183 break
2184 fi
2185 done
2186 if test -z "$ac_aux_dir"; then
2187 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2188 fi
2189
2190 # These three variables are undocumented and unsupported,
2191 # and are intended to be withdrawn in a future Autoconf release.
2192 # They can cause serious problems if a builder's source tree is in a directory
2193 # whose full name contains unusual characters.
2194 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2195 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2196 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2197
2198
2199 # Find a good install program. We prefer a C program (faster),
2200 # so one script is as good as another. But avoid the broken or
2201 # incompatible versions:
2202 # SysV /etc/install, /usr/sbin/install
2203 # SunOS /usr/etc/install
2204 # IRIX /sbin/install
2205 # AIX /bin/install
2206 # AmigaOS /C/install, which installs bootblocks on floppy discs
2207 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2208 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2209 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2210 # OS/2's system install, which has a completely different semantic
2211 # ./install, which can be erroneously created by make from ./install.sh.
2212 # Reject install programs that cannot install multiple files.
2213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2214 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2215 if test -z "$INSTALL"; then
2216 if ${ac_cv_path_install+:} false; then :
2217 $as_echo_n "(cached) " >&6
2218 else
2219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2220 for as_dir in $PATH
2221 do
2222 IFS=$as_save_IFS
2223 test -z "$as_dir" && as_dir=.
2224 # Account for people who put trailing slashes in PATH elements.
2225 case $as_dir/ in #((
2226 ./ | .// | /[cC]/* | \
2227 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2228 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2229 /usr/ucb/* ) ;;
2230 *)
2231 # OSF1 and SCO ODT 3.0 have their own names for install.
2232 # Don't use installbsd from OSF since it installs stuff as root
2233 # by default.
2234 for ac_prog in ginstall scoinst install; do
2235 for ac_exec_ext in '' $ac_executable_extensions; do
2236 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2237 if test $ac_prog = install &&
2238 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2239 # AIX install. It has an incompatible calling convention.
2240 :
2241 elif test $ac_prog = install &&
2242 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2243 # program-specific install script used by HP pwplus--don't use.
2244 :
2245 else
2246 rm -rf conftest.one conftest.two conftest.dir
2247 echo one > conftest.one
2248 echo two > conftest.two
2249 mkdir conftest.dir
2250 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2251 test -s conftest.one && test -s conftest.two &&
2252 test -s conftest.dir/conftest.one &&
2253 test -s conftest.dir/conftest.two
2254 then
2255 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2256 break 3
2257 fi
2258 fi
2259 fi
2260 done
2261 done
2262 ;;
2263 esac
2264
2265 done
2266 IFS=$as_save_IFS
2267
2268 rm -rf conftest.one conftest.two conftest.dir
2269
2270 fi
2271 if test "${ac_cv_path_install+set}" = set; then
2272 INSTALL=$ac_cv_path_install
2273 else
2274 # As a last resort, use the slow shell script. Don't cache a
2275 # value for INSTALL within a source directory, because that will
2276 # break other packages using the cache if that directory is
2277 # removed, or if the value is a relative name.
2278 INSTALL=$ac_install_sh
2279 fi
2280 fi
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2282 $as_echo "$INSTALL" >&6; }
2283
2284 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2285 # It thinks the first close brace ends the variable substitution.
2286 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2287
2288 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2289
2290 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2291
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2293 $as_echo_n "checking whether build environment is sane... " >&6; }
2294 # Reject unsafe characters in $srcdir or the absolute working directory
2295 # name. Accept space and tab only in the latter.
2296 am_lf='
2297 '
2298 case `pwd` in
2299 *[\\\"\#\$\&\'\`$am_lf]*)
2300 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2301 esac
2302 case $srcdir in
2303 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2304 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2305 esac
2306
2307 # Do 'set' in a subshell so we don't clobber the current shell's
2308 # arguments. Must try -L first in case configure is actually a
2309 # symlink; some systems play weird games with the mod time of symlinks
2310 # (eg FreeBSD returns the mod time of the symlink's containing
2311 # directory).
2312 if (
2313 am_has_slept=no
2314 for am_try in 1 2; do
2315 echo "timestamp, slept: $am_has_slept" > conftest.file
2316 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2317 if test "$*" = "X"; then
2318 # -L didn't work.
2319 set X `ls -t "$srcdir/configure" conftest.file`
2320 fi
2321 if test "$*" != "X $srcdir/configure conftest.file" \
2322 && test "$*" != "X conftest.file $srcdir/configure"; then
2323
2324 # If neither matched, then we have a broken ls. This can happen
2325 # if, for instance, CONFIG_SHELL is bash and it inherits a
2326 # broken ls alias from the environment. This has actually
2327 # happened. Such a system could not be considered "sane".
2328 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2329 alias in your environment" "$LINENO" 5
2330 fi
2331 if test "$2" = conftest.file || test $am_try -eq 2; then
2332 break
2333 fi
2334 # Just in case.
2335 sleep 1
2336 am_has_slept=yes
2337 done
2338 test "$2" = conftest.file
2339 )
2340 then
2341 # Ok.
2342 :
2343 else
2344 as_fn_error $? "newly created file is older than distributed files!
2345 Check your system clock" "$LINENO" 5
2346 fi
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2348 $as_echo "yes" >&6; }
2349 # If we didn't sleep, we still need to ensure time stamps of config.status and
2350 # generated files are strictly newer.
2351 am_sleep_pid=
2352 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2353 ( sleep 1 ) &
2354 am_sleep_pid=$!
2355 fi
2356
2357 rm -f conftest.file
2358
2359 test "$program_prefix" != NONE &&
2360 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2361 # Use a double $ so make ignores it.
2362 test "$program_suffix" != NONE &&
2363 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2364 # Double any \ or $.
2365 # By default was `s,x,x', remove it if useless.
2366 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2367 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2368
2369 # expand $ac_aux_dir to an absolute path
2370 am_aux_dir=`cd $ac_aux_dir && pwd`
2371
2372 if test x"${MISSING+set}" != xset; then
2373 case $am_aux_dir in
2374 *\ * | *\ *)
2375 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2376 *)
2377 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2378 esac
2379 fi
2380 # Use eval to expand $SHELL
2381 if eval "$MISSING --is-lightweight"; then
2382 am_missing_run="$MISSING "
2383 else
2384 am_missing_run=
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2386 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2387 fi
2388
2389 if test x"${install_sh}" != xset; then
2390 case $am_aux_dir in
2391 *\ * | *\ *)
2392 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2393 *)
2394 install_sh="\${SHELL} $am_aux_dir/install-sh"
2395 esac
2396 fi
2397
2398 # Installed binaries are usually stripped using 'strip' when the user
2399 # run "make install-strip". However 'strip' might not be the right
2400 # tool to use in cross-compilation environments, therefore Automake
2401 # will honor the 'STRIP' environment variable to overrule this program.
2402 if test "$cross_compiling" != no; then
2403 if test -n "$ac_tool_prefix"; then
2404 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2405 set dummy ${ac_tool_prefix}strip; ac_word=$2
2406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2407 $as_echo_n "checking for $ac_word... " >&6; }
2408 if ${ac_cv_prog_STRIP+:} false; then :
2409 $as_echo_n "(cached) " >&6
2410 else
2411 if test -n "$STRIP"; then
2412 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2413 else
2414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2415 for as_dir in $PATH
2416 do
2417 IFS=$as_save_IFS
2418 test -z "$as_dir" && as_dir=.
2419 for ac_exec_ext in '' $ac_executable_extensions; do
2420 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2421 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2423 break 2
2424 fi
2425 done
2426 done
2427 IFS=$as_save_IFS
2428
2429 fi
2430 fi
2431 STRIP=$ac_cv_prog_STRIP
2432 if test -n "$STRIP"; then
2433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2434 $as_echo "$STRIP" >&6; }
2435 else
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2437 $as_echo "no" >&6; }
2438 fi
2439
2440
2441 fi
2442 if test -z "$ac_cv_prog_STRIP"; then
2443 ac_ct_STRIP=$STRIP
2444 # Extract the first word of "strip", so it can be a program name with args.
2445 set dummy strip; ac_word=$2
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2447 $as_echo_n "checking for $ac_word... " >&6; }
2448 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2449 $as_echo_n "(cached) " >&6
2450 else
2451 if test -n "$ac_ct_STRIP"; then
2452 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2453 else
2454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2455 for as_dir in $PATH
2456 do
2457 IFS=$as_save_IFS
2458 test -z "$as_dir" && as_dir=.
2459 for ac_exec_ext in '' $ac_executable_extensions; do
2460 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2461 ac_cv_prog_ac_ct_STRIP="strip"
2462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2463 break 2
2464 fi
2465 done
2466 done
2467 IFS=$as_save_IFS
2468
2469 fi
2470 fi
2471 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2472 if test -n "$ac_ct_STRIP"; then
2473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2474 $as_echo "$ac_ct_STRIP" >&6; }
2475 else
2476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2477 $as_echo "no" >&6; }
2478 fi
2479
2480 if test "x$ac_ct_STRIP" = x; then
2481 STRIP=":"
2482 else
2483 case $cross_compiling:$ac_tool_warned in
2484 yes:)
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2486 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2487 ac_tool_warned=yes ;;
2488 esac
2489 STRIP=$ac_ct_STRIP
2490 fi
2491 else
2492 STRIP="$ac_cv_prog_STRIP"
2493 fi
2494
2495 fi
2496 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2497
2498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2499 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2500 if test -z "$MKDIR_P"; then
2501 if ${ac_cv_path_mkdir+:} false; then :
2502 $as_echo_n "(cached) " >&6
2503 else
2504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2505 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2506 do
2507 IFS=$as_save_IFS
2508 test -z "$as_dir" && as_dir=.
2509 for ac_prog in mkdir gmkdir; do
2510 for ac_exec_ext in '' $ac_executable_extensions; do
2511 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
2512 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2513 'mkdir (GNU coreutils) '* | \
2514 'mkdir (coreutils) '* | \
2515 'mkdir (fileutils) '4.1*)
2516 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2517 break 3;;
2518 esac
2519 done
2520 done
2521 done
2522 IFS=$as_save_IFS
2523
2524 fi
2525
2526 test -d ./--version && rmdir ./--version
2527 if test "${ac_cv_path_mkdir+set}" = set; then
2528 MKDIR_P="$ac_cv_path_mkdir -p"
2529 else
2530 # As a last resort, use the slow shell script. Don't cache a
2531 # value for MKDIR_P within a source directory, because that will
2532 # break other packages using the cache if that directory is
2533 # removed, or if the value is a relative name.
2534 MKDIR_P="$ac_install_sh -d"
2535 fi
2536 fi
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2538 $as_echo "$MKDIR_P" >&6; }
2539
2540 for ac_prog in gawk mawk nawk awk
2541 do
2542 # Extract the first word of "$ac_prog", so it can be a program name with args.
2543 set dummy $ac_prog; ac_word=$2
2544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2545 $as_echo_n "checking for $ac_word... " >&6; }
2546 if ${ac_cv_prog_AWK+:} false; then :
2547 $as_echo_n "(cached) " >&6
2548 else
2549 if test -n "$AWK"; then
2550 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2551 else
2552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2553 for as_dir in $PATH
2554 do
2555 IFS=$as_save_IFS
2556 test -z "$as_dir" && as_dir=.
2557 for ac_exec_ext in '' $ac_executable_extensions; do
2558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2559 ac_cv_prog_AWK="$ac_prog"
2560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2561 break 2
2562 fi
2563 done
2564 done
2565 IFS=$as_save_IFS
2566
2567 fi
2568 fi
2569 AWK=$ac_cv_prog_AWK
2570 if test -n "$AWK"; then
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2572 $as_echo "$AWK" >&6; }
2573 else
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2575 $as_echo "no" >&6; }
2576 fi
2577
2578
2579 test -n "$AWK" && break
2580 done
2581
2582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2583 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2584 set x ${MAKE-make}
2585 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2586 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2587 $as_echo_n "(cached) " >&6
2588 else
2589 cat >conftest.make <<\_ACEOF
2590 SHELL = /bin/sh
2591 all:
2592 @echo '@@@%%%=$(MAKE)=@@@%%%'
2593 _ACEOF
2594 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2595 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2596 *@@@%%%=?*=@@@%%%*)
2597 eval ac_cv_prog_make_${ac_make}_set=yes;;
2598 *)
2599 eval ac_cv_prog_make_${ac_make}_set=no;;
2600 esac
2601 rm -f conftest.make
2602 fi
2603 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2605 $as_echo "yes" >&6; }
2606 SET_MAKE=
2607 else
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2609 $as_echo "no" >&6; }
2610 SET_MAKE="MAKE=${MAKE-make}"
2611 fi
2612
2613 rm -rf .tst 2>/dev/null
2614 mkdir .tst 2>/dev/null
2615 if test -d .tst; then
2616 am__leading_dot=.
2617 else
2618 am__leading_dot=_
2619 fi
2620 rmdir .tst 2>/dev/null
2621
2622 # Check whether --enable-silent-rules was given.
2623 if test "${enable_silent_rules+set}" = set; then :
2624 enableval=$enable_silent_rules;
2625 fi
2626
2627 case $enable_silent_rules in # (((
2628 yes) AM_DEFAULT_VERBOSITY=0;;
2629 no) AM_DEFAULT_VERBOSITY=1;;
2630 *) AM_DEFAULT_VERBOSITY=1;;
2631 esac
2632 am_make=${MAKE-make}
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2634 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2635 if ${am_cv_make_support_nested_variables+:} false; then :
2636 $as_echo_n "(cached) " >&6
2637 else
2638 if $as_echo 'TRUE=$(BAR$(V))
2639 BAR0=false
2640 BAR1=true
2641 V=1
2642 am__doit:
2643 @$(TRUE)
2644 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2645 am_cv_make_support_nested_variables=yes
2646 else
2647 am_cv_make_support_nested_variables=no
2648 fi
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2651 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2652 if test $am_cv_make_support_nested_variables = yes; then
2653 AM_V='$(V)'
2654 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2655 else
2656 AM_V=$AM_DEFAULT_VERBOSITY
2657 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2658 fi
2659 AM_BACKSLASH='\'
2660
2661 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2662 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2663 # is not polluted with repeated "-I."
2664 am__isrc=' -I$(srcdir)'
2665 # test to see if srcdir already configured
2666 if test -f $srcdir/config.status; then
2667 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2668 fi
2669 fi
2670
2671 # test whether we have cygpath
2672 if test -z "$CYGPATH_W"; then
2673 if (cygpath --version) >/dev/null 2>/dev/null; then
2674 CYGPATH_W='cygpath -w'
2675 else
2676 CYGPATH_W=echo
2677 fi
2678 fi
2679
2680
2681 # Define the identity of the package.
2682 PACKAGE='cinnamon-menus'
2683 VERSION='2.1'
2684
2685
2686 cat >>confdefs.h <<_ACEOF
2687 #define PACKAGE "$PACKAGE"
2688 _ACEOF
2689
2690
2691 cat >>confdefs.h <<_ACEOF
2692 #define VERSION "$VERSION"
2693 _ACEOF
2694
2695 # Some tools Automake needs.
2696
2697 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2698
2699
2700 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2701
2702
2703 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2704
2705
2706 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2707
2708
2709 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2710
2711 # For better backward compatibility. To be removed once Automake 1.9.x
2712 # dies out for good. For more background, see:
2713 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2714 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2715 mkdir_p='$(MKDIR_P)'
2716
2717 # We need awk for the "check" target. The system "awk" is bad on
2718 # some platforms.
2719 # Always define AMTAR for backward compatibility. Yes, it's still used
2720 # in the wild :-( We should find a proper way to deprecate it ...
2721 AMTAR='$${TAR-tar}'
2722
2723
2724 # We'll loop over all known methods to create a tar archive until one works.
2725 _am_tools='gnutar pax cpio none'
2726
2727 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
2728
2729
2730
2731
2732
2733
2734 # Check whether --enable-silent-rules was given.
2735 if test "${enable_silent_rules+set}" = set; then :
2736 enableval=$enable_silent_rules;
2737 fi
2738
2739 case $enable_silent_rules in # (((
2740 yes) AM_DEFAULT_VERBOSITY=0;;
2741 no) AM_DEFAULT_VERBOSITY=1;;
2742 *) AM_DEFAULT_VERBOSITY=0;;
2743 esac
2744 am_make=${MAKE-make}
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2746 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2747 if ${am_cv_make_support_nested_variables+:} false; then :
2748 $as_echo_n "(cached) " >&6
2749 else
2750 if $as_echo 'TRUE=$(BAR$(V))
2751 BAR0=false
2752 BAR1=true
2753 V=1
2754 am__doit:
2755 @$(TRUE)
2756 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2757 am_cv_make_support_nested_variables=yes
2758 else
2759 am_cv_make_support_nested_variables=no
2760 fi
2761 fi
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2763 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2764 if test $am_cv_make_support_nested_variables = yes; then
2765 AM_V='$(V)'
2766 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2767 else
2768 AM_V=$AM_DEFAULT_VERBOSITY
2769 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2770 fi
2771 AM_BACKSLASH='\'
2772
2773
2774 ac_config_headers="$ac_config_headers config.h"
2775
2776
2777
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2779 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2780 # Check whether --enable-maintainer-mode was given.
2781 if test "${enable_maintainer_mode+set}" = set; then :
2782 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2783 else
2784 USE_MAINTAINER_MODE=no
2785 fi
2786
2787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2788 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2789 if test $USE_MAINTAINER_MODE = yes; then
2790 MAINTAINER_MODE_TRUE=
2791 MAINTAINER_MODE_FALSE='#'
2792 else
2793 MAINTAINER_MODE_TRUE='#'
2794 MAINTAINER_MODE_FALSE=
2795 fi
2796
2797 MAINT=$MAINTAINER_MODE_TRUE
2798
2799
2800
2801
2802
2803 DISABLE_DEPRECATED=""
2804 if test $USE_MAINTAINER_MODE = yes; then
2805 DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
2806 for DOMAIN in $DOMAINS; do
2807 DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
2808 done
2809 fi
2810
2811
2812
2813
2814 # Before making a release, the LT_VERSION string should be modified.
2815 # The string is of the form C:R:A.
2816 # - If interfaces have been changed or added, but binary compatibility has
2817 # been preserved, change to C+1:0:A+1
2818 # - If binary compatibility has been broken (eg removed or changed interfaces)
2819 # change to C+1:0:0
2820 # - If the interface is the same as the previous version, change to C:R+1:A
2821
2822 LIB_MENU_LT_VERSION=0:1:0
2823
2824
2825 DEPDIR="${am__leading_dot}deps"
2826
2827 ac_config_commands="$ac_config_commands depfiles"
2828
2829
2830 am_make=${MAKE-make}
2831 cat > confinc << 'END'
2832 am__doit:
2833 @echo this is the am__doit target
2834 .PHONY: am__doit
2835 END
2836 # If we don't find an include directive, just comment out the code.
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
2838 $as_echo_n "checking for style of include used by $am_make... " >&6; }
2839 am__include="#"
2840 am__quote=
2841 _am_result=none
2842 # First try GNU make style include.
2843 echo "include confinc" > confmf
2844 # Ignore all kinds of additional output from 'make'.
2845 case `$am_make -s -f confmf 2> /dev/null` in #(
2846 *the\ am__doit\ target*)
2847 am__include=include
2848 am__quote=
2849 _am_result=GNU
2850 ;;
2851 esac
2852 # Now try BSD make style include.
2853 if test "$am__include" = "#"; then
2854 echo '.include "confinc"' > confmf
2855 case `$am_make -s -f confmf 2> /dev/null` in #(
2856 *the\ am__doit\ target*)
2857 am__include=.include
2858 am__quote="\""
2859 _am_result=BSD
2860 ;;
2861 esac
2862 fi
2863
2864
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
2866 $as_echo "$_am_result" >&6; }
2867 rm -f confinc confmf
2868
2869 # Check whether --enable-dependency-tracking was given.
2870 if test "${enable_dependency_tracking+set}" = set; then :
2871 enableval=$enable_dependency_tracking;
2872 fi
2873
2874 if test "x$enable_dependency_tracking" != xno; then
2875 am_depcomp="$ac_aux_dir/depcomp"
2876 AMDEPBACKSLASH='\'
2877 am__nodep='_no'
2878 fi
2879 if test "x$enable_dependency_tracking" != xno; then
2880 AMDEP_TRUE=
2881 AMDEP_FALSE='#'
2882 else
2883 AMDEP_TRUE='#'
2884 AMDEP_FALSE=
2885 fi
2886
2887
2888 ac_ext=c
2889 ac_cpp='$CPP $CPPFLAGS'
2890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2893 if test -n "$ac_tool_prefix"; then
2894 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2895 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2897 $as_echo_n "checking for $ac_word... " >&6; }
2898 if ${ac_cv_prog_CC+:} false; then :
2899 $as_echo_n "(cached) " >&6
2900 else
2901 if test -n "$CC"; then
2902 ac_cv_prog_CC="$CC" # Let the user override the test.
2903 else
2904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2905 for as_dir in $PATH
2906 do
2907 IFS=$as_save_IFS
2908 test -z "$as_dir" && as_dir=.
2909 for ac_exec_ext in '' $ac_executable_extensions; do
2910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2911 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2913 break 2
2914 fi
2915 done
2916 done
2917 IFS=$as_save_IFS
2918
2919 fi
2920 fi
2921 CC=$ac_cv_prog_CC
2922 if test -n "$CC"; then
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2924 $as_echo "$CC" >&6; }
2925 else
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2927 $as_echo "no" >&6; }
2928 fi
2929
2930
2931 fi
2932 if test -z "$ac_cv_prog_CC"; then
2933 ac_ct_CC=$CC
2934 # Extract the first word of "gcc", so it can be a program name with args.
2935 set dummy gcc; ac_word=$2
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2937 $as_echo_n "checking for $ac_word... " >&6; }
2938 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2939 $as_echo_n "(cached) " >&6
2940 else
2941 if test -n "$ac_ct_CC"; then
2942 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2943 else
2944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2945 for as_dir in $PATH
2946 do
2947 IFS=$as_save_IFS
2948 test -z "$as_dir" && as_dir=.
2949 for ac_exec_ext in '' $ac_executable_extensions; do
2950 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2951 ac_cv_prog_ac_ct_CC="gcc"
2952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2953 break 2
2954 fi
2955 done
2956 done
2957 IFS=$as_save_IFS
2958
2959 fi
2960 fi
2961 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2962 if test -n "$ac_ct_CC"; then
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2964 $as_echo "$ac_ct_CC" >&6; }
2965 else
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2967 $as_echo "no" >&6; }
2968 fi
2969
2970 if test "x$ac_ct_CC" = x; then
2971 CC=""
2972 else
2973 case $cross_compiling:$ac_tool_warned in
2974 yes:)
2975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2976 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2977 ac_tool_warned=yes ;;
2978 esac
2979 CC=$ac_ct_CC
2980 fi
2981 else
2982 CC="$ac_cv_prog_CC"
2983 fi
2984
2985 if test -z "$CC"; then
2986 if test -n "$ac_tool_prefix"; then
2987 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2988 set dummy ${ac_tool_prefix}cc; ac_word=$2
2989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990 $as_echo_n "checking for $ac_word... " >&6; }
2991 if ${ac_cv_prog_CC+:} false; then :
2992 $as_echo_n "(cached) " >&6
2993 else
2994 if test -n "$CC"; then
2995 ac_cv_prog_CC="$CC" # Let the user override the test.
2996 else
2997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998 for as_dir in $PATH
2999 do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3004 ac_cv_prog_CC="${ac_tool_prefix}cc"
3005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3006 break 2
3007 fi
3008 done
3009 done
3010 IFS=$as_save_IFS
3011
3012 fi
3013 fi
3014 CC=$ac_cv_prog_CC
3015 if test -n "$CC"; then
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017 $as_echo "$CC" >&6; }
3018 else
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020 $as_echo "no" >&6; }
3021 fi
3022
3023
3024 fi
3025 fi
3026 if test -z "$CC"; then
3027 # Extract the first word of "cc", so it can be a program name with args.
3028 set dummy cc; ac_word=$2
3029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3030 $as_echo_n "checking for $ac_word... " >&6; }
3031 if ${ac_cv_prog_CC+:} false; then :
3032 $as_echo_n "(cached) " >&6
3033 else
3034 if test -n "$CC"; then
3035 ac_cv_prog_CC="$CC" # Let the user override the test.
3036 else
3037 ac_prog_rejected=no
3038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3039 for as_dir in $PATH
3040 do
3041 IFS=$as_save_IFS
3042 test -z "$as_dir" && as_dir=.
3043 for ac_exec_ext in '' $ac_executable_extensions; do
3044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3045 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3046 ac_prog_rejected=yes
3047 continue
3048 fi
3049 ac_cv_prog_CC="cc"
3050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3051 break 2
3052 fi
3053 done
3054 done
3055 IFS=$as_save_IFS
3056
3057 if test $ac_prog_rejected = yes; then
3058 # We found a bogon in the path, so make sure we never use it.
3059 set dummy $ac_cv_prog_CC
3060 shift
3061 if test $# != 0; then
3062 # We chose a different compiler from the bogus one.
3063 # However, it has the same basename, so the bogon will be chosen
3064 # first if we set CC to just the basename; use the full file name.
3065 shift
3066 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3067 fi
3068 fi
3069 fi
3070 fi
3071 CC=$ac_cv_prog_CC
3072 if test -n "$CC"; then
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3074 $as_echo "$CC" >&6; }
3075 else
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3077 $as_echo "no" >&6; }
3078 fi
3079
3080
3081 fi
3082 if test -z "$CC"; then
3083 if test -n "$ac_tool_prefix"; then
3084 for ac_prog in cl.exe
3085 do
3086 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3087 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3089 $as_echo_n "checking for $ac_word... " >&6; }
3090 if ${ac_cv_prog_CC+:} false; then :
3091 $as_echo_n "(cached) " >&6
3092 else
3093 if test -n "$CC"; then
3094 ac_cv_prog_CC="$CC" # Let the user override the test.
3095 else
3096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3097 for as_dir in $PATH
3098 do
3099 IFS=$as_save_IFS
3100 test -z "$as_dir" && as_dir=.
3101 for ac_exec_ext in '' $ac_executable_extensions; do
3102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3103 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3105 break 2
3106 fi
3107 done
3108 done
3109 IFS=$as_save_IFS
3110
3111 fi
3112 fi
3113 CC=$ac_cv_prog_CC
3114 if test -n "$CC"; then
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3116 $as_echo "$CC" >&6; }
3117 else
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3119 $as_echo "no" >&6; }
3120 fi
3121
3122
3123 test -n "$CC" && break
3124 done
3125 fi
3126 if test -z "$CC"; then
3127 ac_ct_CC=$CC
3128 for ac_prog in cl.exe
3129 do
3130 # Extract the first word of "$ac_prog", so it can be a program name with args.
3131 set dummy $ac_prog; ac_word=$2
3132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3133 $as_echo_n "checking for $ac_word... " >&6; }
3134 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3135 $as_echo_n "(cached) " >&6
3136 else
3137 if test -n "$ac_ct_CC"; then
3138 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3139 else
3140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3141 for as_dir in $PATH
3142 do
3143 IFS=$as_save_IFS
3144 test -z "$as_dir" && as_dir=.
3145 for ac_exec_ext in '' $ac_executable_extensions; do
3146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3147 ac_cv_prog_ac_ct_CC="$ac_prog"
3148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3149 break 2
3150 fi
3151 done
3152 done
3153 IFS=$as_save_IFS
3154
3155 fi
3156 fi
3157 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3158 if test -n "$ac_ct_CC"; then
3159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3160 $as_echo "$ac_ct_CC" >&6; }
3161 else
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3163 $as_echo "no" >&6; }
3164 fi
3165
3166
3167 test -n "$ac_ct_CC" && break
3168 done
3169
3170 if test "x$ac_ct_CC" = x; then
3171 CC=""
3172 else
3173 case $cross_compiling:$ac_tool_warned in
3174 yes:)
3175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3176 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3177 ac_tool_warned=yes ;;
3178 esac
3179 CC=$ac_ct_CC
3180 fi
3181 fi
3182
3183 fi
3184
3185
3186 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3187 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3188 as_fn_error $? "no acceptable C compiler found in \$PATH
3189 See \`config.log' for more details" "$LINENO" 5; }
3190
3191 # Provide some information about the compiler.
3192 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3193 set X $ac_compile
3194 ac_compiler=$2
3195 for ac_option in --version -v -V -qversion; do
3196 { { ac_try="$ac_compiler $ac_option >&5"
3197 case "(($ac_try" in
3198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199 *) ac_try_echo=$ac_try;;
3200 esac
3201 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3202 $as_echo "$ac_try_echo"; } >&5
3203 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3204 ac_status=$?
3205 if test -s conftest.err; then
3206 sed '10a\
3207 ... rest of stderr output deleted ...
3208 10q' conftest.err >conftest.er1
3209 cat conftest.er1 >&5
3210 fi
3211 rm -f conftest.er1 conftest.err
3212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3213 test $ac_status = 0; }
3214 done
3215
3216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3217 /* end confdefs.h. */
3218
3219 int
3220 main ()
3221 {
3222
3223 ;
3224 return 0;
3225 }
3226 _ACEOF
3227 ac_clean_files_save=$ac_clean_files
3228 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3229 # Try to create an executable without -o first, disregard a.out.
3230 # It will help us diagnose broken compilers, and finding out an intuition
3231 # of exeext.
3232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3233 $as_echo_n "checking whether the C compiler works... " >&6; }
3234 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3235
3236 # The possible output files:
3237 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3238
3239 ac_rmfiles=
3240 for ac_file in $ac_files
3241 do
3242 case $ac_file in
3243 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3244 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3245 esac
3246 done
3247 rm -f $ac_rmfiles
3248
3249 if { { ac_try="$ac_link_default"
3250 case "(($ac_try" in
3251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3252 *) ac_try_echo=$ac_try;;
3253 esac
3254 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3255 $as_echo "$ac_try_echo"; } >&5
3256 (eval "$ac_link_default") 2>&5
3257 ac_status=$?
3258 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3259 test $ac_status = 0; }; then :
3260 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3261 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3262 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3263 # so that the user can short-circuit this test for compilers unknown to
3264 # Autoconf.
3265 for ac_file in $ac_files ''
3266 do
3267 test -f "$ac_file" || continue
3268 case $ac_file in
3269 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3270 ;;
3271 [ab].out )
3272 # We found the default executable, but exeext='' is most
3273 # certainly right.
3274 break;;
3275 *.* )
3276 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3277 then :; else
3278 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3279 fi
3280 # We set ac_cv_exeext here because the later test for it is not
3281 # safe: cross compilers may not add the suffix if given an `-o'
3282 # argument, so we may need to know it at that point already.
3283 # Even if this section looks crufty: it has the advantage of
3284 # actually working.
3285 break;;
3286 * )
3287 break;;
3288 esac
3289 done
3290 test "$ac_cv_exeext" = no && ac_cv_exeext=
3291
3292 else
3293 ac_file=''
3294 fi
3295 if test -z "$ac_file"; then :
3296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3297 $as_echo "no" >&6; }
3298 $as_echo "$as_me: failed program was:" >&5
3299 sed 's/^/| /' conftest.$ac_ext >&5
3300
3301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3302 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3303 as_fn_error 77 "C compiler cannot create executables
3304 See \`config.log' for more details" "$LINENO" 5; }
3305 else
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3307 $as_echo "yes" >&6; }
3308 fi
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3310 $as_echo_n "checking for C compiler default output file name... " >&6; }
3311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3312 $as_echo "$ac_file" >&6; }
3313 ac_exeext=$ac_cv_exeext
3314
3315 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3316 ac_clean_files=$ac_clean_files_save
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3318 $as_echo_n "checking for suffix of executables... " >&6; }
3319 if { { ac_try="$ac_link"
3320 case "(($ac_try" in
3321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3322 *) ac_try_echo=$ac_try;;
3323 esac
3324 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3325 $as_echo "$ac_try_echo"; } >&5
3326 (eval "$ac_link") 2>&5
3327 ac_status=$?
3328 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3329 test $ac_status = 0; }; then :
3330 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3331 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3332 # work properly (i.e., refer to `conftest.exe'), while it won't with
3333 # `rm'.
3334 for ac_file in conftest.exe conftest conftest.*; do
3335 test -f "$ac_file" || continue
3336 case $ac_file in
3337 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3338 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3339 break;;
3340 * ) break;;
3341 esac
3342 done
3343 else
3344 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3345 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3346 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3347 See \`config.log' for more details" "$LINENO" 5; }
3348 fi
3349 rm -f conftest conftest$ac_cv_exeext
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3351 $as_echo "$ac_cv_exeext" >&6; }
3352
3353 rm -f conftest.$ac_ext
3354 EXEEXT=$ac_cv_exeext
3355 ac_exeext=$EXEEXT
3356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3357 /* end confdefs.h. */
3358 #include <stdio.h>
3359 int
3360 main ()
3361 {
3362 FILE *f = fopen ("conftest.out", "w");
3363 return ferror (f) || fclose (f) != 0;
3364
3365 ;
3366 return 0;
3367 }
3368 _ACEOF
3369 ac_clean_files="$ac_clean_files conftest.out"
3370 # Check that the compiler produces executables we can run. If not, either
3371 # the compiler is broken, or we cross compile.
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3373 $as_echo_n "checking whether we are cross compiling... " >&6; }
3374 if test "$cross_compiling" != yes; then
3375 { { ac_try="$ac_link"
3376 case "(($ac_try" in
3377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3378 *) ac_try_echo=$ac_try;;
3379 esac
3380 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3381 $as_echo "$ac_try_echo"; } >&5
3382 (eval "$ac_link") 2>&5
3383 ac_status=$?
3384 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3385 test $ac_status = 0; }
3386 if { ac_try='./conftest$ac_cv_exeext'
3387 { { case "(($ac_try" in
3388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3389 *) ac_try_echo=$ac_try;;
3390 esac
3391 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3392 $as_echo "$ac_try_echo"; } >&5
3393 (eval "$ac_try") 2>&5
3394 ac_status=$?
3395 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3396 test $ac_status = 0; }; }; then
3397 cross_compiling=no
3398 else
3399 if test "$cross_compiling" = maybe; then
3400 cross_compiling=yes
3401 else
3402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3403 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3404 as_fn_error $? "cannot run C compiled programs.
3405 If you meant to cross compile, use \`--host'.
3406 See \`config.log' for more details" "$LINENO" 5; }
3407 fi
3408 fi
3409 fi
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3411 $as_echo "$cross_compiling" >&6; }
3412
3413 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3414 ac_clean_files=$ac_clean_files_save
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3416 $as_echo_n "checking for suffix of object files... " >&6; }
3417 if ${ac_cv_objext+:} false; then :
3418 $as_echo_n "(cached) " >&6
3419 else
3420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3421 /* end confdefs.h. */
3422
3423 int
3424 main ()
3425 {
3426
3427 ;
3428 return 0;
3429 }
3430 _ACEOF
3431 rm -f conftest.o conftest.obj
3432 if { { ac_try="$ac_compile"
3433 case "(($ac_try" in
3434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3435 *) ac_try_echo=$ac_try;;
3436 esac
3437 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3438 $as_echo "$ac_try_echo"; } >&5
3439 (eval "$ac_compile") 2>&5
3440 ac_status=$?
3441 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3442 test $ac_status = 0; }; then :
3443 for ac_file in conftest.o conftest.obj conftest.*; do
3444 test -f "$ac_file" || continue;
3445 case $ac_file in
3446 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3447 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3448 break;;
3449 esac
3450 done
3451 else
3452 $as_echo "$as_me: failed program was:" >&5
3453 sed 's/^/| /' conftest.$ac_ext >&5
3454
3455 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3456 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3457 as_fn_error $? "cannot compute suffix of object files: cannot compile
3458 See \`config.log' for more details" "$LINENO" 5; }
3459 fi
3460 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3461 fi
3462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3463 $as_echo "$ac_cv_objext" >&6; }
3464 OBJEXT=$ac_cv_objext
3465 ac_objext=$OBJEXT
3466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3467 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3468 if ${ac_cv_c_compiler_gnu+:} false; then :
3469 $as_echo_n "(cached) " >&6
3470 else
3471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3472 /* end confdefs.h. */
3473
3474 int
3475 main ()
3476 {
3477 #ifndef __GNUC__
3478 choke me
3479 #endif
3480
3481 ;
3482 return 0;
3483 }
3484 _ACEOF
3485 if ac_fn_c_try_compile "$LINENO"; then :
3486 ac_compiler_gnu=yes
3487 else
3488 ac_compiler_gnu=no
3489 fi
3490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3491 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3492
3493 fi
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3495 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3496 if test $ac_compiler_gnu = yes; then
3497 GCC=yes
3498 else
3499 GCC=
3500 fi
3501 ac_test_CFLAGS=${CFLAGS+set}
3502 ac_save_CFLAGS=$CFLAGS
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3504 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3505 if ${ac_cv_prog_cc_g+:} false; then :
3506 $as_echo_n "(cached) " >&6
3507 else
3508 ac_save_c_werror_flag=$ac_c_werror_flag
3509 ac_c_werror_flag=yes
3510 ac_cv_prog_cc_g=no
3511 CFLAGS="-g"
3512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3513 /* end confdefs.h. */
3514
3515 int
3516 main ()
3517 {
3518
3519 ;
3520 return 0;
3521 }
3522 _ACEOF
3523 if ac_fn_c_try_compile "$LINENO"; then :
3524 ac_cv_prog_cc_g=yes
3525 else
3526 CFLAGS=""
3527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3528 /* end confdefs.h. */
3529
3530 int
3531 main ()
3532 {
3533
3534 ;
3535 return 0;
3536 }
3537 _ACEOF
3538 if ac_fn_c_try_compile "$LINENO"; then :
3539
3540 else
3541 ac_c_werror_flag=$ac_save_c_werror_flag
3542 CFLAGS="-g"
3543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3544 /* end confdefs.h. */
3545
3546 int
3547 main ()
3548 {
3549
3550 ;
3551 return 0;
3552 }
3553 _ACEOF
3554 if ac_fn_c_try_compile "$LINENO"; then :
3555 ac_cv_prog_cc_g=yes
3556 fi
3557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3558 fi
3559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3560 fi
3561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3562 ac_c_werror_flag=$ac_save_c_werror_flag
3563 fi
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3565 $as_echo "$ac_cv_prog_cc_g" >&6; }
3566 if test "$ac_test_CFLAGS" = set; then
3567 CFLAGS=$ac_save_CFLAGS
3568 elif test $ac_cv_prog_cc_g = yes; then
3569 if test "$GCC" = yes; then
3570 CFLAGS="-g -O2"
3571 else
3572 CFLAGS="-g"
3573 fi
3574 else
3575 if test "$GCC" = yes; then
3576 CFLAGS="-O2"
3577 else
3578 CFLAGS=
3579 fi
3580 fi
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3582 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3583 if ${ac_cv_prog_cc_c89+:} false; then :
3584 $as_echo_n "(cached) " >&6
3585 else
3586 ac_cv_prog_cc_c89=no
3587 ac_save_CC=$CC
3588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3589 /* end confdefs.h. */
3590 #include <stdarg.h>
3591 #include <stdio.h>
3592 struct stat;
3593 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3594 struct buf { int x; };
3595 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3596 static char *e (p, i)
3597 char **p;
3598 int i;
3599 {
3600 return p[i];
3601 }
3602 static char *f (char * (*g) (char **, int), char **p, ...)
3603 {
3604 char *s;
3605 va_list v;
3606 va_start (v,p);
3607 s = g (p, va_arg (v,int));
3608 va_end (v);
3609 return s;
3610 }
3611
3612 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3613 function prototypes and stuff, but not '\xHH' hex character constants.
3614 These don't provoke an error unfortunately, instead are silently treated
3615 as 'x'. The following induces an error, until -std is added to get
3616 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3617 array size at least. It's necessary to write '\x00'==0 to get something
3618 that's true only with -std. */
3619 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3620
3621 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3622 inside strings and character constants. */
3623 #define FOO(x) 'x'
3624 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3625
3626 int test (int i, double x);
3627 struct s1 {int (*f) (int a);};
3628 struct s2 {int (*f) (double a);};
3629 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3630 int argc;
3631 char **argv;
3632 int
3633 main ()
3634 {
3635 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3636 ;
3637 return 0;
3638 }
3639 _ACEOF
3640 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3641 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3642 do
3643 CC="$ac_save_CC $ac_arg"
3644 if ac_fn_c_try_compile "$LINENO"; then :
3645 ac_cv_prog_cc_c89=$ac_arg
3646 fi
3647 rm -f core conftest.err conftest.$ac_objext
3648 test "x$ac_cv_prog_cc_c89" != "xno" && break
3649 done
3650 rm -f conftest.$ac_ext
3651 CC=$ac_save_CC
3652
3653 fi
3654 # AC_CACHE_VAL
3655 case "x$ac_cv_prog_cc_c89" in
3656 x)
3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3658 $as_echo "none needed" >&6; } ;;
3659 xno)
3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3661 $as_echo "unsupported" >&6; } ;;
3662 *)
3663 CC="$CC $ac_cv_prog_cc_c89"
3664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3665 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3666 esac
3667 if test "x$ac_cv_prog_cc_c89" != xno; then :
3668
3669 fi
3670
3671 ac_ext=c
3672 ac_cpp='$CPP $CPPFLAGS'
3673 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3674 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3675 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3676
3677 depcc="$CC" am_compiler_list=
3678
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
3680 $as_echo_n "checking dependency style of $depcc... " >&6; }
3681 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
3682 $as_echo_n "(cached) " >&6
3683 else
3684 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3685 # We make a subdir and do the tests there. Otherwise we can end up
3686 # making bogus files that we don't know about and never remove. For
3687 # instance it was reported that on HP-UX the gcc test will end up
3688 # making a dummy file named 'D' -- because '-MD' means "put the output
3689 # in D".
3690 rm -rf conftest.dir
3691 mkdir conftest.dir
3692 # Copy depcomp to subdir because otherwise we won't find it if we're
3693 # using a relative directory.
3694 cp "$am_depcomp" conftest.dir
3695 cd conftest.dir
3696 # We will build objects and dependencies in a subdirectory because
3697 # it helps to detect inapplicable dependency modes. For instance
3698 # both Tru64's cc and ICC support -MD to output dependencies as a
3699 # side effect of compilation, but ICC will put the dependencies in
3700 # the current directory while Tru64 will put them in the object
3701 # directory.
3702 mkdir sub
3703
3704 am_cv_CC_dependencies_compiler_type=none
3705 if test "$am_compiler_list" = ""; then
3706 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3707 fi
3708 am__universal=false
3709 case " $depcc " in #(
3710 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3711 esac
3712
3713 for depmode in $am_compiler_list; do
3714 # Setup a source with many dependencies, because some compilers
3715 # like to wrap large dependency lists on column 80 (with \), and
3716 # we should not choose a depcomp mode which is confused by this.
3717 #
3718 # We need to recreate these files for each test, as the compiler may
3719 # overwrite some of them when testing with obscure command lines.
3720 # This happens at least with the AIX C compiler.
3721 : > sub/conftest.c
3722 for i in 1 2 3 4 5 6; do
3723 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3724 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3725 # Solaris 10 /bin/sh.
3726 echo '/* dummy */' > sub/conftst$i.h
3727 done
3728 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3729
3730 # We check with '-c' and '-o' for the sake of the "dashmstdout"
3731 # mode. It turns out that the SunPro C++ compiler does not properly
3732 # handle '-M -o', and we need to detect this. Also, some Intel
3733 # versions had trouble with output in subdirs.
3734 am__obj=sub/conftest.${OBJEXT-o}
3735 am__minus_obj="-o $am__obj"
3736 case $depmode in
3737 gcc)
3738 # This depmode causes a compiler race in universal mode.
3739 test "$am__universal" = false || continue
3740 ;;
3741 nosideeffect)
3742 # After this tag, mechanisms are not by side-effect, so they'll
3743 # only be used when explicitly requested.
3744 if test "x$enable_dependency_tracking" = xyes; then
3745 continue
3746 else
3747 break
3748 fi
3749 ;;
3750 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3751 # This compiler won't grok '-c -o', but also, the minuso test has
3752 # not run yet. These depmodes are late enough in the game, and
3753 # so weak that their functioning should not be impacted.
3754 am__obj=conftest.${OBJEXT-o}
3755 am__minus_obj=
3756 ;;
3757 none) break ;;
3758 esac
3759 if depmode=$depmode \
3760 source=sub/conftest.c object=$am__obj \
3761 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3762 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3763 >/dev/null 2>conftest.err &&
3764 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3765 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3766 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3767 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3768 # icc doesn't choke on unknown options, it will just issue warnings
3769 # or remarks (even with -Werror). So we grep stderr for any message
3770 # that says an option was ignored or not supported.
3771 # When given -MP, icc 7.0 and 7.1 complain thusly:
3772 # icc: Command line warning: ignoring option '-M'; no argument required
3773 # The diagnosis changed in icc 8.0:
3774 # icc: Command line remark: option '-MP' not supported
3775 if (grep 'ignoring option' conftest.err ||
3776 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3777 am_cv_CC_dependencies_compiler_type=$depmode
3778 break
3779 fi
3780 fi
3781 done
3782
3783 cd ..
3784 rm -rf conftest.dir
3785 else
3786 am_cv_CC_dependencies_compiler_type=none
3787 fi
3788
3789 fi
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
3791 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
3792 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3793
3794 if
3795 test "x$enable_dependency_tracking" != xno \
3796 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3797 am__fastdepCC_TRUE=
3798 am__fastdepCC_FALSE='#'
3799 else
3800 am__fastdepCC_TRUE='#'
3801 am__fastdepCC_FALSE=
3802 fi
3803
3804
3805
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
3807 $as_echo_n "checking for library containing strerror... " >&6; }
3808 if ${ac_cv_search_strerror+:} false; then :
3809 $as_echo_n "(cached) " >&6
3810 else
3811 ac_func_search_save_LIBS=$LIBS
3812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3813 /* end confdefs.h. */
3814
3815 /* Override any GCC internal prototype to avoid an error.
3816 Use char because int might match the return type of a GCC
3817 builtin and then its argument prototype would still apply. */
3818 #ifdef __cplusplus
3819 extern "C"
3820 #endif
3821 char strerror ();
3822 int
3823 main ()
3824 {
3825 return strerror ();
3826 ;
3827 return 0;
3828 }
3829 _ACEOF
3830 for ac_lib in '' cposix; do
3831 if test -z "$ac_lib"; then
3832 ac_res="none required"
3833 else
3834 ac_res=-l$ac_lib
3835 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
3836 fi
3837 if ac_fn_c_try_link "$LINENO"; then :
3838 ac_cv_search_strerror=$ac_res
3839 fi
3840 rm -f core conftest.err conftest.$ac_objext \
3841 conftest$ac_exeext
3842 if ${ac_cv_search_strerror+:} false; then :
3843 break
3844 fi
3845 done
3846 if ${ac_cv_search_strerror+:} false; then :
3847
3848 else
3849 ac_cv_search_strerror=no
3850 fi
3851 rm conftest.$ac_ext
3852 LIBS=$ac_func_search_save_LIBS
3853 fi
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
3855 $as_echo "$ac_cv_search_strerror" >&6; }
3856 ac_res=$ac_cv_search_strerror
3857 if test "$ac_res" != no; then :
3858 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3859
3860 fi
3861
3862 ac_ext=c
3863 ac_cpp='$CPP $CPPFLAGS'
3864 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3865 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3866 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3867 if test -n "$ac_tool_prefix"; then
3868 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3869 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if ${ac_cv_prog_CC+:} false; then :
3873 $as_echo_n "(cached) " >&6
3874 else
3875 if test -n "$CC"; then
3876 ac_cv_prog_CC="$CC" # Let the user override the test.
3877 else
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH
3880 do
3881 IFS=$as_save_IFS
3882 test -z "$as_dir" && as_dir=.
3883 for ac_exec_ext in '' $ac_executable_extensions; do
3884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3885 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887 break 2
3888 fi
3889 done
3890 done
3891 IFS=$as_save_IFS
3892
3893 fi
3894 fi
3895 CC=$ac_cv_prog_CC
3896 if test -n "$CC"; then
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3898 $as_echo "$CC" >&6; }
3899 else
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3902 fi
3903
3904
3905 fi
3906 if test -z "$ac_cv_prog_CC"; then
3907 ac_ct_CC=$CC
3908 # Extract the first word of "gcc", so it can be a program name with args.
3909 set dummy gcc; ac_word=$2
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3911 $as_echo_n "checking for $ac_word... " >&6; }
3912 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3913 $as_echo_n "(cached) " >&6
3914 else
3915 if test -n "$ac_ct_CC"; then
3916 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3917 else
3918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3919 for as_dir in $PATH
3920 do
3921 IFS=$as_save_IFS
3922 test -z "$as_dir" && as_dir=.
3923 for ac_exec_ext in '' $ac_executable_extensions; do
3924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3925 ac_cv_prog_ac_ct_CC="gcc"
3926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3927 break 2
3928 fi
3929 done
3930 done
3931 IFS=$as_save_IFS
3932
3933 fi
3934 fi
3935 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3936 if test -n "$ac_ct_CC"; then
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3938 $as_echo "$ac_ct_CC" >&6; }
3939 else
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941 $as_echo "no" >&6; }
3942 fi
3943
3944 if test "x$ac_ct_CC" = x; then
3945 CC=""
3946 else
3947 case $cross_compiling:$ac_tool_warned in
3948 yes:)
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3950 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3951 ac_tool_warned=yes ;;
3952 esac
3953 CC=$ac_ct_CC
3954 fi
3955 else
3956 CC="$ac_cv_prog_CC"
3957 fi
3958
3959 if test -z "$CC"; then
3960 if test -n "$ac_tool_prefix"; then
3961 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3962 set dummy ${ac_tool_prefix}cc; ac_word=$2
3963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3964 $as_echo_n "checking for $ac_word... " >&6; }
3965 if ${ac_cv_prog_CC+:} false; then :
3966 $as_echo_n "(cached) " >&6
3967 else
3968 if test -n "$CC"; then
3969 ac_cv_prog_CC="$CC" # Let the user override the test.
3970 else
3971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972 for as_dir in $PATH
3973 do
3974 IFS=$as_save_IFS
3975 test -z "$as_dir" && as_dir=.
3976 for ac_exec_ext in '' $ac_executable_extensions; do
3977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3978 ac_cv_prog_CC="${ac_tool_prefix}cc"
3979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3980 break 2
3981 fi
3982 done
3983 done
3984 IFS=$as_save_IFS
3985
3986 fi
3987 fi
3988 CC=$ac_cv_prog_CC
3989 if test -n "$CC"; then
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3991 $as_echo "$CC" >&6; }
3992 else
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3994 $as_echo "no" >&6; }
3995 fi
3996
3997
3998 fi
3999 fi
4000 if test -z "$CC"; then
4001 # Extract the first word of "cc", so it can be a program name with args.
4002 set dummy cc; ac_word=$2
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4004 $as_echo_n "checking for $ac_word... " >&6; }
4005 if ${ac_cv_prog_CC+:} false; then :
4006 $as_echo_n "(cached) " >&6
4007 else
4008 if test -n "$CC"; then
4009 ac_cv_prog_CC="$CC" # Let the user override the test.
4010 else
4011 ac_prog_rejected=no
4012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4013 for as_dir in $PATH
4014 do
4015 IFS=$as_save_IFS
4016 test -z "$as_dir" && as_dir=.
4017 for ac_exec_ext in '' $ac_executable_extensions; do
4018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4019 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4020 ac_prog_rejected=yes
4021 continue
4022 fi
4023 ac_cv_prog_CC="cc"
4024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025 break 2
4026 fi
4027 done
4028 done
4029 IFS=$as_save_IFS
4030
4031 if test $ac_prog_rejected = yes; then
4032 # We found a bogon in the path, so make sure we never use it.
4033 set dummy $ac_cv_prog_CC
4034 shift
4035 if test $# != 0; then
4036 # We chose a different compiler from the bogus one.
4037 # However, it has the same basename, so the bogon will be chosen
4038 # first if we set CC to just the basename; use the full file name.
4039 shift
4040 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4041 fi
4042 fi
4043 fi
4044 fi
4045 CC=$ac_cv_prog_CC
4046 if test -n "$CC"; then
4047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4048 $as_echo "$CC" >&6; }
4049 else
4050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4051 $as_echo "no" >&6; }
4052 fi
4053
4054
4055 fi
4056 if test -z "$CC"; then
4057 if test -n "$ac_tool_prefix"; then
4058 for ac_prog in cl.exe
4059 do
4060 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4061 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4063 $as_echo_n "checking for $ac_word... " >&6; }
4064 if ${ac_cv_prog_CC+:} false; then :
4065 $as_echo_n "(cached) " >&6
4066 else
4067 if test -n "$CC"; then
4068 ac_cv_prog_CC="$CC" # Let the user override the test.
4069 else
4070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4071 for as_dir in $PATH
4072 do
4073 IFS=$as_save_IFS
4074 test -z "$as_dir" && as_dir=.
4075 for ac_exec_ext in '' $ac_executable_extensions; do
4076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4077 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4079 break 2
4080 fi
4081 done
4082 done
4083 IFS=$as_save_IFS
4084
4085 fi
4086 fi
4087 CC=$ac_cv_prog_CC
4088 if test -n "$CC"; then
4089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4090 $as_echo "$CC" >&6; }
4091 else
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4093 $as_echo "no" >&6; }
4094 fi
4095
4096
4097 test -n "$CC" && break
4098 done
4099 fi
4100 if test -z "$CC"; then
4101 ac_ct_CC=$CC
4102 for ac_prog in cl.exe
4103 do
4104 # Extract the first word of "$ac_prog", so it can be a program name with args.
4105 set dummy $ac_prog; ac_word=$2
4106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4107 $as_echo_n "checking for $ac_word... " >&6; }
4108 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4109 $as_echo_n "(cached) " >&6
4110 else
4111 if test -n "$ac_ct_CC"; then
4112 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4113 else
4114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4115 for as_dir in $PATH
4116 do
4117 IFS=$as_save_IFS
4118 test -z "$as_dir" && as_dir=.
4119 for ac_exec_ext in '' $ac_executable_extensions; do
4120 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4121 ac_cv_prog_ac_ct_CC="$ac_prog"
4122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4123 break 2
4124 fi
4125 done
4126 done
4127 IFS=$as_save_IFS
4128
4129 fi
4130 fi
4131 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4132 if test -n "$ac_ct_CC"; then
4133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4134 $as_echo "$ac_ct_CC" >&6; }
4135 else
4136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4137 $as_echo "no" >&6; }
4138 fi
4139
4140
4141 test -n "$ac_ct_CC" && break
4142 done
4143
4144 if test "x$ac_ct_CC" = x; then
4145 CC=""
4146 else
4147 case $cross_compiling:$ac_tool_warned in
4148 yes:)
4149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4150 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4151 ac_tool_warned=yes ;;
4152 esac
4153 CC=$ac_ct_CC
4154 fi
4155 fi
4156
4157 fi
4158
4159
4160 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4161 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4162 as_fn_error $? "no acceptable C compiler found in \$PATH
4163 See \`config.log' for more details" "$LINENO" 5; }
4164
4165 # Provide some information about the compiler.
4166 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4167 set X $ac_compile
4168 ac_compiler=$2
4169 for ac_option in --version -v -V -qversion; do
4170 { { ac_try="$ac_compiler $ac_option >&5"
4171 case "(($ac_try" in
4172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4173 *) ac_try_echo=$ac_try;;
4174 esac
4175 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4176 $as_echo "$ac_try_echo"; } >&5
4177 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4178 ac_status=$?
4179 if test -s conftest.err; then
4180 sed '10a\
4181 ... rest of stderr output deleted ...
4182 10q' conftest.err >conftest.er1
4183 cat conftest.er1 >&5
4184 fi
4185 rm -f conftest.er1 conftest.err
4186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4187 test $ac_status = 0; }
4188 done
4189
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4191 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4192 if ${ac_cv_c_compiler_gnu+:} false; then :
4193 $as_echo_n "(cached) " >&6
4194 else
4195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4196 /* end confdefs.h. */
4197
4198 int
4199 main ()
4200 {
4201 #ifndef __GNUC__
4202 choke me
4203 #endif
4204
4205 ;
4206 return 0;
4207 }
4208 _ACEOF
4209 if ac_fn_c_try_compile "$LINENO"; then :
4210 ac_compiler_gnu=yes
4211 else
4212 ac_compiler_gnu=no
4213 fi
4214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4215 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4216
4217 fi
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4219 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4220 if test $ac_compiler_gnu = yes; then
4221 GCC=yes
4222 else
4223 GCC=
4224 fi
4225 ac_test_CFLAGS=${CFLAGS+set}
4226 ac_save_CFLAGS=$CFLAGS
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4228 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4229 if ${ac_cv_prog_cc_g+:} false; then :
4230 $as_echo_n "(cached) " >&6
4231 else
4232 ac_save_c_werror_flag=$ac_c_werror_flag
4233 ac_c_werror_flag=yes
4234 ac_cv_prog_cc_g=no
4235 CFLAGS="-g"
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h. */
4238
4239 int
4240 main ()
4241 {
4242
4243 ;
4244 return 0;
4245 }
4246 _ACEOF
4247 if ac_fn_c_try_compile "$LINENO"; then :
4248 ac_cv_prog_cc_g=yes
4249 else
4250 CFLAGS=""
4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252 /* end confdefs.h. */
4253
4254 int
4255 main ()
4256 {
4257
4258 ;
4259 return 0;
4260 }
4261 _ACEOF
4262 if ac_fn_c_try_compile "$LINENO"; then :
4263
4264 else
4265 ac_c_werror_flag=$ac_save_c_werror_flag
4266 CFLAGS="-g"
4267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4268 /* end confdefs.h. */
4269
4270 int
4271 main ()
4272 {
4273
4274 ;
4275 return 0;
4276 }
4277 _ACEOF
4278 if ac_fn_c_try_compile "$LINENO"; then :
4279 ac_cv_prog_cc_g=yes
4280 fi
4281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4282 fi
4283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 fi
4285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4286 ac_c_werror_flag=$ac_save_c_werror_flag
4287 fi
4288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4289 $as_echo "$ac_cv_prog_cc_g" >&6; }
4290 if test "$ac_test_CFLAGS" = set; then
4291 CFLAGS=$ac_save_CFLAGS
4292 elif test $ac_cv_prog_cc_g = yes; then
4293 if test "$GCC" = yes; then
4294 CFLAGS="-g -O2"
4295 else
4296 CFLAGS="-g"
4297 fi
4298 else
4299 if test "$GCC" = yes; then
4300 CFLAGS="-O2"
4301 else
4302 CFLAGS=
4303 fi
4304 fi
4305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4306 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4307 if ${ac_cv_prog_cc_c89+:} false; then :
4308 $as_echo_n "(cached) " >&6
4309 else
4310 ac_cv_prog_cc_c89=no
4311 ac_save_CC=$CC
4312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4313 /* end confdefs.h. */
4314 #include <stdarg.h>
4315 #include <stdio.h>
4316 struct stat;
4317 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4318 struct buf { int x; };
4319 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4320 static char *e (p, i)
4321 char **p;
4322 int i;
4323 {
4324 return p[i];
4325 }
4326 static char *f (char * (*g) (char **, int), char **p, ...)
4327 {
4328 char *s;
4329 va_list v;
4330 va_start (v,p);
4331 s = g (p, va_arg (v,int));
4332 va_end (v);
4333 return s;
4334 }
4335
4336 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4337 function prototypes and stuff, but not '\xHH' hex character constants.
4338 These don't provoke an error unfortunately, instead are silently treated
4339 as 'x'. The following induces an error, until -std is added to get
4340 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4341 array size at least. It's necessary to write '\x00'==0 to get something
4342 that's true only with -std. */
4343 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4344
4345 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4346 inside strings and character constants. */
4347 #define FOO(x) 'x'
4348 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4349
4350 int test (int i, double x);
4351 struct s1 {int (*f) (int a);};
4352 struct s2 {int (*f) (double a);};
4353 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4354 int argc;
4355 char **argv;
4356 int
4357 main ()
4358 {
4359 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4360 ;
4361 return 0;
4362 }
4363 _ACEOF
4364 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4365 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4366 do
4367 CC="$ac_save_CC $ac_arg"
4368 if ac_fn_c_try_compile "$LINENO"; then :
4369 ac_cv_prog_cc_c89=$ac_arg
4370 fi
4371 rm -f core conftest.err conftest.$ac_objext
4372 test "x$ac_cv_prog_cc_c89" != "xno" && break
4373 done
4374 rm -f conftest.$ac_ext
4375 CC=$ac_save_CC
4376
4377 fi
4378 # AC_CACHE_VAL
4379 case "x$ac_cv_prog_cc_c89" in
4380 x)
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4382 $as_echo "none needed" >&6; } ;;
4383 xno)
4384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4385 $as_echo "unsupported" >&6; } ;;
4386 *)
4387 CC="$CC $ac_cv_prog_cc_c89"
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4389 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4390 esac
4391 if test "x$ac_cv_prog_cc_c89" != xno; then :
4392
4393 fi
4394
4395 ac_ext=c
4396 ac_cpp='$CPP $CPPFLAGS'
4397 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4398 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4399 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4400
4401 depcc="$CC" am_compiler_list=
4402
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4404 $as_echo_n "checking dependency style of $depcc... " >&6; }
4405 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4406 $as_echo_n "(cached) " >&6
4407 else
4408 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4409 # We make a subdir and do the tests there. Otherwise we can end up
4410 # making bogus files that we don't know about and never remove. For
4411 # instance it was reported that on HP-UX the gcc test will end up
4412 # making a dummy file named 'D' -- because '-MD' means "put the output
4413 # in D".
4414 rm -rf conftest.dir
4415 mkdir conftest.dir
4416 # Copy depcomp to subdir because otherwise we won't find it if we're
4417 # using a relative directory.
4418 cp "$am_depcomp" conftest.dir
4419 cd conftest.dir
4420 # We will build objects and dependencies in a subdirectory because
4421 # it helps to detect inapplicable dependency modes. For instance
4422 # both Tru64's cc and ICC support -MD to output dependencies as a
4423 # side effect of compilation, but ICC will put the dependencies in
4424 # the current directory while Tru64 will put them in the object
4425 # directory.
4426 mkdir sub
4427
4428 am_cv_CC_dependencies_compiler_type=none
4429 if test "$am_compiler_list" = ""; then
4430 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4431 fi
4432 am__universal=false
4433 case " $depcc " in #(
4434 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4435 esac
4436
4437 for depmode in $am_compiler_list; do
4438 # Setup a source with many dependencies, because some compilers
4439 # like to wrap large dependency lists on column 80 (with \), and
4440 # we should not choose a depcomp mode which is confused by this.
4441 #
4442 # We need to recreate these files for each test, as the compiler may
4443 # overwrite some of them when testing with obscure command lines.
4444 # This happens at least with the AIX C compiler.
4445 : > sub/conftest.c
4446 for i in 1 2 3 4 5 6; do
4447 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4448 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4449 # Solaris 10 /bin/sh.
4450 echo '/* dummy */' > sub/conftst$i.h
4451 done
4452 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4453
4454 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4455 # mode. It turns out that the SunPro C++ compiler does not properly
4456 # handle '-M -o', and we need to detect this. Also, some Intel
4457 # versions had trouble with output in subdirs.
4458 am__obj=sub/conftest.${OBJEXT-o}
4459 am__minus_obj="-o $am__obj"
4460 case $depmode in
4461 gcc)
4462 # This depmode causes a compiler race in universal mode.
4463 test "$am__universal" = false || continue
4464 ;;
4465 nosideeffect)
4466 # After this tag, mechanisms are not by side-effect, so they'll
4467 # only be used when explicitly requested.
4468 if test "x$enable_dependency_tracking" = xyes; then
4469 continue
4470 else
4471 break
4472 fi
4473 ;;
4474 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4475 # This compiler won't grok '-c -o', but also, the minuso test has
4476 # not run yet. These depmodes are late enough in the game, and
4477 # so weak that their functioning should not be impacted.
4478 am__obj=conftest.${OBJEXT-o}
4479 am__minus_obj=
4480 ;;
4481 none) break ;;
4482 esac
4483 if depmode=$depmode \
4484 source=sub/conftest.c object=$am__obj \
4485 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4486 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4487 >/dev/null 2>conftest.err &&
4488 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4489 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4490 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4491 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4492 # icc doesn't choke on unknown options, it will just issue warnings
4493 # or remarks (even with -Werror). So we grep stderr for any message
4494 # that says an option was ignored or not supported.
4495 # When given -MP, icc 7.0 and 7.1 complain thusly:
4496 # icc: Command line warning: ignoring option '-M'; no argument required
4497 # The diagnosis changed in icc 8.0:
4498 # icc: Command line remark: option '-MP' not supported
4499 if (grep 'ignoring option' conftest.err ||
4500 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4501 am_cv_CC_dependencies_compiler_type=$depmode
4502 break
4503 fi
4504 fi
4505 done
4506
4507 cd ..
4508 rm -rf conftest.dir
4509 else
4510 am_cv_CC_dependencies_compiler_type=none
4511 fi
4512
4513 fi
4514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4515 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4516 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4517
4518 if
4519 test "x$enable_dependency_tracking" != xno \
4520 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4521 am__fastdepCC_TRUE=
4522 am__fastdepCC_FALSE='#'
4523 else
4524 am__fastdepCC_TRUE='#'
4525 am__fastdepCC_FALSE=
4526 fi
4527
4528
4529 ac_ext=c
4530 ac_cpp='$CPP $CPPFLAGS'
4531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4535 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4536 # On Suns, sometimes $CPP names a directory.
4537 if test -n "$CPP" && test -d "$CPP"; then
4538 CPP=
4539 fi
4540 if test -z "$CPP"; then
4541 if ${ac_cv_prog_CPP+:} false; then :
4542 $as_echo_n "(cached) " >&6
4543 else
4544 # Double quotes because CPP needs to be expanded
4545 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4546 do
4547 ac_preproc_ok=false
4548 for ac_c_preproc_warn_flag in '' yes
4549 do
4550 # Use a header file that comes with gcc, so configuring glibc
4551 # with a fresh cross-compiler works.
4552 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4553 # <limits.h> exists even on freestanding compilers.
4554 # On the NeXT, cc -E runs the code through the compiler's parser,
4555 # not just through cpp. "Syntax error" is here to catch this case.
4556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4557 /* end confdefs.h. */
4558 #ifdef __STDC__
4559 # include <limits.h>
4560 #else
4561 # include <assert.h>
4562 #endif
4563 Syntax error
4564 _ACEOF
4565 if ac_fn_c_try_cpp "$LINENO"; then :
4566
4567 else
4568 # Broken: fails on valid input.
4569 continue
4570 fi
4571 rm -f conftest.err conftest.i conftest.$ac_ext
4572
4573 # OK, works on sane cases. Now check whether nonexistent headers
4574 # can be detected and how.
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576 /* end confdefs.h. */
4577 #include <ac_nonexistent.h>
4578 _ACEOF
4579 if ac_fn_c_try_cpp "$LINENO"; then :
4580 # Broken: success on invalid input.
4581 continue
4582 else
4583 # Passes both tests.
4584 ac_preproc_ok=:
4585 break
4586 fi
4587 rm -f conftest.err conftest.i conftest.$ac_ext
4588
4589 done
4590 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4591 rm -f conftest.i conftest.err conftest.$ac_ext
4592 if $ac_preproc_ok; then :
4593 break
4594 fi
4595
4596 done
4597 ac_cv_prog_CPP=$CPP
4598
4599 fi
4600 CPP=$ac_cv_prog_CPP
4601 else
4602 ac_cv_prog_CPP=$CPP
4603 fi
4604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4605 $as_echo "$CPP" >&6; }
4606 ac_preproc_ok=false
4607 for ac_c_preproc_warn_flag in '' yes
4608 do
4609 # Use a header file that comes with gcc, so configuring glibc
4610 # with a fresh cross-compiler works.
4611 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4612 # <limits.h> exists even on freestanding compilers.
4613 # On the NeXT, cc -E runs the code through the compiler's parser,
4614 # not just through cpp. "Syntax error" is here to catch this case.
4615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616 /* end confdefs.h. */
4617 #ifdef __STDC__
4618 # include <limits.h>
4619 #else
4620 # include <assert.h>
4621 #endif
4622 Syntax error
4623 _ACEOF
4624 if ac_fn_c_try_cpp "$LINENO"; then :
4625
4626 else
4627 # Broken: fails on valid input.
4628 continue
4629 fi
4630 rm -f conftest.err conftest.i conftest.$ac_ext
4631
4632 # OK, works on sane cases. Now check whether nonexistent headers
4633 # can be detected and how.
4634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4635 /* end confdefs.h. */
4636 #include <ac_nonexistent.h>
4637 _ACEOF
4638 if ac_fn_c_try_cpp "$LINENO"; then :
4639 # Broken: success on invalid input.
4640 continue
4641 else
4642 # Passes both tests.
4643 ac_preproc_ok=:
4644 break
4645 fi
4646 rm -f conftest.err conftest.i conftest.$ac_ext
4647
4648 done
4649 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4650 rm -f conftest.i conftest.err conftest.$ac_ext
4651 if $ac_preproc_ok; then :
4652
4653 else
4654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4656 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4657 See \`config.log' for more details" "$LINENO" 5; }
4658 fi
4659
4660 ac_ext=c
4661 ac_cpp='$CPP $CPPFLAGS'
4662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4665
4666
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4668 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4669 if ${ac_cv_path_GREP+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671 else
4672 if test -z "$GREP"; then
4673 ac_path_GREP_found=false
4674 # Loop through the user's path and test for each of PROGNAME-LIST
4675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4676 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4677 do
4678 IFS=$as_save_IFS
4679 test -z "$as_dir" && as_dir=.
4680 for ac_prog in grep ggrep; do
4681 for ac_exec_ext in '' $ac_executable_extensions; do
4682 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4683 as_fn_executable_p "$ac_path_GREP" || continue
4684 # Check for GNU ac_path_GREP and select it if it is found.
4685 # Check for GNU $ac_path_GREP
4686 case `"$ac_path_GREP" --version 2>&1` in
4687 *GNU*)
4688 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4689 *)
4690 ac_count=0
4691 $as_echo_n 0123456789 >"conftest.in"
4692 while :
4693 do
4694 cat "conftest.in" "conftest.in" >"conftest.tmp"
4695 mv "conftest.tmp" "conftest.in"
4696 cp "conftest.in" "conftest.nl"
4697 $as_echo 'GREP' >> "conftest.nl"
4698 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4699 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4700 as_fn_arith $ac_count + 1 && ac_count=$as_val
4701 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4702 # Best one so far, save it but keep looking for a better one
4703 ac_cv_path_GREP="$ac_path_GREP"
4704 ac_path_GREP_max=$ac_count
4705 fi
4706 # 10*(2^10) chars as input seems more than enough
4707 test $ac_count -gt 10 && break
4708 done
4709 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4710 esac
4711
4712 $ac_path_GREP_found && break 3
4713 done
4714 done
4715 done
4716 IFS=$as_save_IFS
4717 if test -z "$ac_cv_path_GREP"; then
4718 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4719 fi
4720 else
4721 ac_cv_path_GREP=$GREP
4722 fi
4723
4724 fi
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4726 $as_echo "$ac_cv_path_GREP" >&6; }
4727 GREP="$ac_cv_path_GREP"
4728
4729
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4731 $as_echo_n "checking for egrep... " >&6; }
4732 if ${ac_cv_path_EGREP+:} false; then :
4733 $as_echo_n "(cached) " >&6
4734 else
4735 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4736 then ac_cv_path_EGREP="$GREP -E"
4737 else
4738 if test -z "$EGREP"; then
4739 ac_path_EGREP_found=false
4740 # Loop through the user's path and test for each of PROGNAME-LIST
4741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4743 do
4744 IFS=$as_save_IFS
4745 test -z "$as_dir" && as_dir=.
4746 for ac_prog in egrep; do
4747 for ac_exec_ext in '' $ac_executable_extensions; do
4748 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4749 as_fn_executable_p "$ac_path_EGREP" || continue
4750 # Check for GNU ac_path_EGREP and select it if it is found.
4751 # Check for GNU $ac_path_EGREP
4752 case `"$ac_path_EGREP" --version 2>&1` in
4753 *GNU*)
4754 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4755 *)
4756 ac_count=0
4757 $as_echo_n 0123456789 >"conftest.in"
4758 while :
4759 do
4760 cat "conftest.in" "conftest.in" >"conftest.tmp"
4761 mv "conftest.tmp" "conftest.in"
4762 cp "conftest.in" "conftest.nl"
4763 $as_echo 'EGREP' >> "conftest.nl"
4764 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4765 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4766 as_fn_arith $ac_count + 1 && ac_count=$as_val
4767 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4768 # Best one so far, save it but keep looking for a better one
4769 ac_cv_path_EGREP="$ac_path_EGREP"
4770 ac_path_EGREP_max=$ac_count
4771 fi
4772 # 10*(2^10) chars as input seems more than enough
4773 test $ac_count -gt 10 && break
4774 done
4775 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4776 esac
4777
4778 $ac_path_EGREP_found && break 3
4779 done
4780 done
4781 done
4782 IFS=$as_save_IFS
4783 if test -z "$ac_cv_path_EGREP"; then
4784 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4785 fi
4786 else
4787 ac_cv_path_EGREP=$EGREP
4788 fi
4789
4790 fi
4791 fi
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4793 $as_echo "$ac_cv_path_EGREP" >&6; }
4794 EGREP="$ac_cv_path_EGREP"
4795
4796
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4798 $as_echo_n "checking for ANSI C header files... " >&6; }
4799 if ${ac_cv_header_stdc+:} false; then :
4800 $as_echo_n "(cached) " >&6
4801 else
4802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803 /* end confdefs.h. */
4804 #include <stdlib.h>
4805 #include <stdarg.h>
4806 #include <string.h>
4807 #include <float.h>
4808
4809 int
4810 main ()
4811 {
4812
4813 ;
4814 return 0;
4815 }
4816 _ACEOF
4817 if ac_fn_c_try_compile "$LINENO"; then :
4818 ac_cv_header_stdc=yes
4819 else
4820 ac_cv_header_stdc=no
4821 fi
4822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4823
4824 if test $ac_cv_header_stdc = yes; then
4825 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827 /* end confdefs.h. */
4828 #include <string.h>
4829
4830 _ACEOF
4831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4832 $EGREP "memchr" >/dev/null 2>&1; then :
4833
4834 else
4835 ac_cv_header_stdc=no
4836 fi
4837 rm -f conftest*
4838
4839 fi
4840
4841 if test $ac_cv_header_stdc = yes; then
4842 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4844 /* end confdefs.h. */
4845 #include <stdlib.h>
4846
4847 _ACEOF
4848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4849 $EGREP "free" >/dev/null 2>&1; then :
4850
4851 else
4852 ac_cv_header_stdc=no
4853 fi
4854 rm -f conftest*
4855
4856 fi
4857
4858 if test $ac_cv_header_stdc = yes; then
4859 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4860 if test "$cross_compiling" = yes; then :
4861 :
4862 else
4863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4864 /* end confdefs.h. */
4865 #include <ctype.h>
4866 #include <stdlib.h>
4867 #if ((' ' & 0x0FF) == 0x020)
4868 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4869 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4870 #else
4871 # define ISLOWER(c) \
4872 (('a' <= (c) && (c) <= 'i') \
4873 || ('j' <= (c) && (c) <= 'r') \
4874 || ('s' <= (c) && (c) <= 'z'))
4875 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4876 #endif
4877
4878 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4879 int
4880 main ()
4881 {
4882 int i;
4883 for (i = 0; i < 256; i++)
4884 if (XOR (islower (i), ISLOWER (i))
4885 || toupper (i) != TOUPPER (i))
4886 return 2;
4887 return 0;
4888 }
4889 _ACEOF
4890 if ac_fn_c_try_run "$LINENO"; then :
4891
4892 else
4893 ac_cv_header_stdc=no
4894 fi
4895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4896 conftest.$ac_objext conftest.beam conftest.$ac_ext
4897 fi
4898
4899 fi
4900 fi
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4902 $as_echo "$ac_cv_header_stdc" >&6; }
4903 if test $ac_cv_header_stdc = yes; then
4904
4905 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4906
4907 fi
4908
4909
4910 # Make sure we can run config.sub.
4911 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4912 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4913
4914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4915 $as_echo_n "checking build system type... " >&6; }
4916 if ${ac_cv_build+:} false; then :
4917 $as_echo_n "(cached) " >&6
4918 else
4919 ac_build_alias=$build_alias
4920 test "x$ac_build_alias" = x &&
4921 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4922 test "x$ac_build_alias" = x &&
4923 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4924 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4925 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4926
4927 fi
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4929 $as_echo "$ac_cv_build" >&6; }
4930 case $ac_cv_build in
4931 *-*-*) ;;
4932 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4933 esac
4934 build=$ac_cv_build
4935 ac_save_IFS=$IFS; IFS='-'
4936 set x $ac_cv_build
4937 shift
4938 build_cpu=$1
4939 build_vendor=$2
4940 shift; shift
4941 # Remember, the first character of IFS is used to create $*,
4942 # except with old shells:
4943 build_os=$*
4944 IFS=$ac_save_IFS
4945 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4946
4947
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4949 $as_echo_n "checking host system type... " >&6; }
4950 if ${ac_cv_host+:} false; then :
4951 $as_echo_n "(cached) " >&6
4952 else
4953 if test "x$host_alias" = x; then
4954 ac_cv_host=$ac_cv_build
4955 else
4956 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4957 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4958 fi
4959
4960 fi
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4962 $as_echo "$ac_cv_host" >&6; }
4963 case $ac_cv_host in
4964 *-*-*) ;;
4965 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4966 esac
4967 host=$ac_cv_host
4968 ac_save_IFS=$IFS; IFS='-'
4969 set x $ac_cv_host
4970 shift
4971 host_cpu=$1
4972 host_vendor=$2
4973 shift; shift
4974 # Remember, the first character of IFS is used to create $*,
4975 # except with old shells:
4976 host_os=$*
4977 IFS=$ac_save_IFS
4978 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4979
4980
4981 enable_win32_dll=yes
4982
4983 case $host in
4984 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
4985 if test -n "$ac_tool_prefix"; then
4986 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4987 set dummy ${ac_tool_prefix}as; ac_word=$2
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4989 $as_echo_n "checking for $ac_word... " >&6; }
4990 if ${ac_cv_prog_AS+:} false; then :
4991 $as_echo_n "(cached) " >&6
4992 else
4993 if test -n "$AS"; then
4994 ac_cv_prog_AS="$AS" # Let the user override the test.
4995 else
4996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4997 for as_dir in $PATH
4998 do
4999 IFS=$as_save_IFS
5000 test -z "$as_dir" && as_dir=.
5001 for ac_exec_ext in '' $ac_executable_extensions; do
5002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5003 ac_cv_prog_AS="${ac_tool_prefix}as"
5004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5005 break 2
5006 fi
5007 done
5008 done
5009 IFS=$as_save_IFS
5010
5011 fi
5012 fi
5013 AS=$ac_cv_prog_AS
5014 if test -n "$AS"; then
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
5016 $as_echo "$AS" >&6; }
5017 else
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5019 $as_echo "no" >&6; }
5020 fi
5021
5022
5023 fi
5024 if test -z "$ac_cv_prog_AS"; then
5025 ac_ct_AS=$AS
5026 # Extract the first word of "as", so it can be a program name with args.
5027 set dummy as; ac_word=$2
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029 $as_echo_n "checking for $ac_word... " >&6; }
5030 if ${ac_cv_prog_ac_ct_AS+:} false; then :
5031 $as_echo_n "(cached) " >&6
5032 else
5033 if test -n "$ac_ct_AS"; then
5034 ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
5035 else
5036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037 for as_dir in $PATH
5038 do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
5041 for ac_exec_ext in '' $ac_executable_extensions; do
5042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5043 ac_cv_prog_ac_ct_AS="as"
5044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5045 break 2
5046 fi
5047 done
5048 done
5049 IFS=$as_save_IFS
5050
5051 fi
5052 fi
5053 ac_ct_AS=$ac_cv_prog_ac_ct_AS
5054 if test -n "$ac_ct_AS"; then
5055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
5056 $as_echo "$ac_ct_AS" >&6; }
5057 else
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059 $as_echo "no" >&6; }
5060 fi
5061
5062 if test "x$ac_ct_AS" = x; then
5063 AS="false"
5064 else
5065 case $cross_compiling:$ac_tool_warned in
5066 yes:)
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5068 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5069 ac_tool_warned=yes ;;
5070 esac
5071 AS=$ac_ct_AS
5072 fi
5073 else
5074 AS="$ac_cv_prog_AS"
5075 fi
5076
5077 if test -n "$ac_tool_prefix"; then
5078 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5079 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081 $as_echo_n "checking for $ac_word... " >&6; }
5082 if ${ac_cv_prog_DLLTOOL+:} false; then :
5083 $as_echo_n "(cached) " >&6
5084 else
5085 if test -n "$DLLTOOL"; then
5086 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5087 else
5088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089 for as_dir in $PATH
5090 do
5091 IFS=$as_save_IFS
5092 test -z "$as_dir" && as_dir=.
5093 for ac_exec_ext in '' $ac_executable_extensions; do
5094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5095 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5097 break 2
5098 fi
5099 done
5100 done
5101 IFS=$as_save_IFS
5102
5103 fi
5104 fi
5105 DLLTOOL=$ac_cv_prog_DLLTOOL
5106 if test -n "$DLLTOOL"; then
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5108 $as_echo "$DLLTOOL" >&6; }
5109 else
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5111 $as_echo "no" >&6; }
5112 fi
5113
5114
5115 fi
5116 if test -z "$ac_cv_prog_DLLTOOL"; then
5117 ac_ct_DLLTOOL=$DLLTOOL
5118 # Extract the first word of "dlltool", so it can be a program name with args.
5119 set dummy dlltool; ac_word=$2
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121 $as_echo_n "checking for $ac_word... " >&6; }
5122 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
5123 $as_echo_n "(cached) " >&6
5124 else
5125 if test -n "$ac_ct_DLLTOOL"; then
5126 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5127 else
5128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5129 for as_dir in $PATH
5130 do
5131 IFS=$as_save_IFS
5132 test -z "$as_dir" && as_dir=.
5133 for ac_exec_ext in '' $ac_executable_extensions; do
5134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5135 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5137 break 2
5138 fi
5139 done
5140 done
5141 IFS=$as_save_IFS
5142
5143 fi
5144 fi
5145 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5146 if test -n "$ac_ct_DLLTOOL"; then
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5148 $as_echo "$ac_ct_DLLTOOL" >&6; }
5149 else
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151 $as_echo "no" >&6; }
5152 fi
5153
5154 if test "x$ac_ct_DLLTOOL" = x; then
5155 DLLTOOL="false"
5156 else
5157 case $cross_compiling:$ac_tool_warned in
5158 yes:)
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5160 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5161 ac_tool_warned=yes ;;
5162 esac
5163 DLLTOOL=$ac_ct_DLLTOOL
5164 fi
5165 else
5166 DLLTOOL="$ac_cv_prog_DLLTOOL"
5167 fi
5168
5169 if test -n "$ac_tool_prefix"; then
5170 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5171 set dummy ${ac_tool_prefix}objdump; ac_word=$2
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5173 $as_echo_n "checking for $ac_word... " >&6; }
5174 if ${ac_cv_prog_OBJDUMP+:} false; then :
5175 $as_echo_n "(cached) " >&6
5176 else
5177 if test -n "$OBJDUMP"; then
5178 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
5179 else
5180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5181 for as_dir in $PATH
5182 do
5183 IFS=$as_save_IFS
5184 test -z "$as_dir" && as_dir=.
5185 for ac_exec_ext in '' $ac_executable_extensions; do
5186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5187 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5189 break 2
5190 fi
5191 done
5192 done
5193 IFS=$as_save_IFS
5194
5195 fi
5196 fi
5197 OBJDUMP=$ac_cv_prog_OBJDUMP
5198 if test -n "$OBJDUMP"; then
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
5200 $as_echo "$OBJDUMP" >&6; }
5201 else
5202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5203 $as_echo "no" >&6; }
5204 fi
5205
5206
5207 fi
5208 if test -z "$ac_cv_prog_OBJDUMP"; then
5209 ac_ct_OBJDUMP=$OBJDUMP
5210 # Extract the first word of "objdump", so it can be a program name with args.
5211 set dummy objdump; ac_word=$2
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5213 $as_echo_n "checking for $ac_word... " >&6; }
5214 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
5215 $as_echo_n "(cached) " >&6
5216 else
5217 if test -n "$ac_ct_OBJDUMP"; then
5218 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
5219 else
5220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5221 for as_dir in $PATH
5222 do
5223 IFS=$as_save_IFS
5224 test -z "$as_dir" && as_dir=.
5225 for ac_exec_ext in '' $ac_executable_extensions; do
5226 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5227 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5229 break 2
5230 fi
5231 done
5232 done
5233 IFS=$as_save_IFS
5234
5235 fi
5236 fi
5237 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
5238 if test -n "$ac_ct_OBJDUMP"; then
5239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
5240 $as_echo "$ac_ct_OBJDUMP" >&6; }
5241 else
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243 $as_echo "no" >&6; }
5244 fi
5245
5246 if test "x$ac_ct_OBJDUMP" = x; then
5247 OBJDUMP="false"
5248 else
5249 case $cross_compiling:$ac_tool_warned in
5250 yes:)
5251 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5252 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5253 ac_tool_warned=yes ;;
5254 esac
5255 OBJDUMP=$ac_ct_OBJDUMP
5256 fi
5257 else
5258 OBJDUMP="$ac_cv_prog_OBJDUMP"
5259 fi
5260
5261 ;;
5262 esac
5263
5264 test -z "$AS" && AS=as
5265
5266
5267
5268
5269
5270 test -z "$DLLTOOL" && DLLTOOL=dlltool
5271
5272
5273
5274
5275
5276 test -z "$OBJDUMP" && OBJDUMP=objdump
5277
5278
5279
5280
5281
5282
5283
5284 case `pwd` in
5285 *\ * | *\ *)
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
5287 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
5288 esac
5289
5290
5291
5292 macro_version='2.4.2'
5293 macro_revision='1.3337'
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307 ltmain="$ac_aux_dir/ltmain.sh"
5308
5309 # Backslashify metacharacters that are still active within
5310 # double-quoted strings.
5311 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
5312
5313 # Same as above, but do not quote variable references.
5314 double_quote_subst='s/\(["`\\]\)/\\\1/g'
5315
5316 # Sed substitution to delay expansion of an escaped shell variable in a
5317 # double_quote_subst'ed string.
5318 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5319
5320 # Sed substitution to delay expansion of an escaped single quote.
5321 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
5322
5323 # Sed substitution to avoid accidental globbing in evaled expressions
5324 no_glob_subst='s/\*/\\\*/g'
5325
5326 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
5327 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
5328 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
5329
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
5331 $as_echo_n "checking how to print strings... " >&6; }
5332 # Test print first, because it will be a builtin if present.
5333 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
5334 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
5335 ECHO='print -r --'
5336 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
5337 ECHO='printf %s\n'
5338 else
5339 # Use this function as a fallback that always works.
5340 func_fallback_echo ()
5341 {
5342 eval 'cat <<_LTECHO_EOF
5343 $1
5344 _LTECHO_EOF'
5345 }
5346 ECHO='func_fallback_echo'
5347 fi
5348
5349 # func_echo_all arg...
5350 # Invoke $ECHO with all args, space-separated.
5351 func_echo_all ()
5352 {
5353 $ECHO ""
5354 }
5355
5356 case "$ECHO" in
5357 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
5358 $as_echo "printf" >&6; } ;;
5359 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
5360 $as_echo "print -r" >&6; } ;;
5361 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
5362 $as_echo "cat" >&6; } ;;
5363 esac
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5379 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
5380 if ${ac_cv_path_SED+:} false; then :
5381 $as_echo_n "(cached) " >&6
5382 else
5383 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5384 for ac_i in 1 2 3 4 5 6 7; do
5385 ac_script="$ac_script$as_nl$ac_script"
5386 done
5387 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5388 { ac_script=; unset ac_script;}
5389 if test -z "$SED"; then
5390 ac_path_SED_found=false
5391 # Loop through the user's path and test for each of PROGNAME-LIST
5392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393 for as_dir in $PATH
5394 do
5395 IFS=$as_save_IFS
5396 test -z "$as_dir" && as_dir=.
5397 for ac_prog in sed gsed; do
5398 for ac_exec_ext in '' $ac_executable_extensions; do
5399 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5400 as_fn_executable_p "$ac_path_SED" || continue
5401 # Check for GNU ac_path_SED and select it if it is found.
5402 # Check for GNU $ac_path_SED
5403 case `"$ac_path_SED" --version 2>&1` in
5404 *GNU*)
5405 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5406 *)
5407 ac_count=0
5408 $as_echo_n 0123456789 >"conftest.in"
5409 while :
5410 do
5411 cat "conftest.in" "conftest.in" >"conftest.tmp"
5412 mv "conftest.tmp" "conftest.in"
5413 cp "conftest.in" "conftest.nl"
5414 $as_echo '' >> "conftest.nl"
5415 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5416 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5417 as_fn_arith $ac_count + 1 && ac_count=$as_val
5418 if test $ac_count -gt ${ac_path_SED_max-0}; then
5419 # Best one so far, save it but keep looking for a better one
5420 ac_cv_path_SED="$ac_path_SED"
5421 ac_path_SED_max=$ac_count
5422 fi
5423 # 10*(2^10) chars as input seems more than enough
5424 test $ac_count -gt 10 && break
5425 done
5426 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5427 esac
5428
5429 $ac_path_SED_found && break 3
5430 done
5431 done
5432 done
5433 IFS=$as_save_IFS
5434 if test -z "$ac_cv_path_SED"; then
5435 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5436 fi
5437 else
5438 ac_cv_path_SED=$SED
5439 fi
5440
5441 fi
5442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5443 $as_echo "$ac_cv_path_SED" >&6; }
5444 SED="$ac_cv_path_SED"
5445 rm -f conftest.sed
5446
5447 test -z "$SED" && SED=sed
5448 Xsed="$SED -e 1s/^X//"
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5461 $as_echo_n "checking for fgrep... " >&6; }
5462 if ${ac_cv_path_FGREP+:} false; then :
5463 $as_echo_n "(cached) " >&6
5464 else
5465 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5466 then ac_cv_path_FGREP="$GREP -F"
5467 else
5468 if test -z "$FGREP"; then
5469 ac_path_FGREP_found=false
5470 # Loop through the user's path and test for each of PROGNAME-LIST
5471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5472 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5473 do
5474 IFS=$as_save_IFS
5475 test -z "$as_dir" && as_dir=.
5476 for ac_prog in fgrep; do
5477 for ac_exec_ext in '' $ac_executable_extensions; do
5478 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5479 as_fn_executable_p "$ac_path_FGREP" || continue
5480 # Check for GNU ac_path_FGREP and select it if it is found.
5481 # Check for GNU $ac_path_FGREP
5482 case `"$ac_path_FGREP" --version 2>&1` in
5483 *GNU*)
5484 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5485 *)
5486 ac_count=0
5487 $as_echo_n 0123456789 >"conftest.in"
5488 while :
5489 do
5490 cat "conftest.in" "conftest.in" >"conftest.tmp"
5491 mv "conftest.tmp" "conftest.in"
5492 cp "conftest.in" "conftest.nl"
5493 $as_echo 'FGREP' >> "conftest.nl"
5494 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5495 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5496 as_fn_arith $ac_count + 1 && ac_count=$as_val
5497 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5498 # Best one so far, save it but keep looking for a better one
5499 ac_cv_path_FGREP="$ac_path_FGREP"
5500 ac_path_FGREP_max=$ac_count
5501 fi
5502 # 10*(2^10) chars as input seems more than enough
5503 test $ac_count -gt 10 && break
5504 done
5505 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5506 esac
5507
5508 $ac_path_FGREP_found && break 3
5509 done
5510 done
5511 done
5512 IFS=$as_save_IFS
5513 if test -z "$ac_cv_path_FGREP"; then
5514 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5515 fi
5516 else
5517 ac_cv_path_FGREP=$FGREP
5518 fi
5519
5520 fi
5521 fi
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5523 $as_echo "$ac_cv_path_FGREP" >&6; }
5524 FGREP="$ac_cv_path_FGREP"
5525
5526
5527 test -z "$GREP" && GREP=grep
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547 # Check whether --with-gnu-ld was given.
5548 if test "${with_gnu_ld+set}" = set; then :
5549 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5550 else
5551 with_gnu_ld=no
5552 fi
5553
5554 ac_prog=ld
5555 if test "$GCC" = yes; then
5556 # Check if gcc -print-prog-name=ld gives a path.
5557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5558 $as_echo_n "checking for ld used by $CC... " >&6; }
5559 case $host in
5560 *-*-mingw*)
5561 # gcc leaves a trailing carriage return which upsets mingw
5562 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5563 *)
5564 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5565 esac
5566 case $ac_prog in
5567 # Accept absolute paths.
5568 [\\/]* | ?:[\\/]*)
5569 re_direlt='/[^/][^/]*/\.\./'
5570 # Canonicalize the pathname of ld
5571 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5572 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5573 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5574 done
5575 test -z "$LD" && LD="$ac_prog"
5576 ;;
5577 "")
5578 # If it fails, then pretend we aren't using GCC.
5579 ac_prog=ld
5580 ;;
5581 *)
5582 # If it is relative, then search for the first ld in PATH.
5583 with_gnu_ld=unknown
5584 ;;
5585 esac
5586 elif test "$with_gnu_ld" = yes; then
5587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5588 $as_echo_n "checking for GNU ld... " >&6; }
5589 else
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5591 $as_echo_n "checking for non-GNU ld... " >&6; }
5592 fi
5593 if ${lt_cv_path_LD+:} false; then :
5594 $as_echo_n "(cached) " >&6
5595 else
5596 if test -z "$LD"; then
5597 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5598 for ac_dir in $PATH; do
5599 IFS="$lt_save_ifs"
5600 test -z "$ac_dir" && ac_dir=.
5601 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5602 lt_cv_path_LD="$ac_dir/$ac_prog"
5603 # Check to see if the program is GNU ld. I'd rather use --version,
5604 # but apparently some variants of GNU ld only accept -v.
5605 # Break only if it was the GNU/non-GNU ld that we prefer.
5606 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5607 *GNU* | *'with BFD'*)
5608 test "$with_gnu_ld" != no && break
5609 ;;
5610 *)
5611 test "$with_gnu_ld" != yes && break
5612 ;;
5613 esac
5614 fi
5615 done
5616 IFS="$lt_save_ifs"
5617 else
5618 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5619 fi
5620 fi
5621
5622 LD="$lt_cv_path_LD"
5623 if test -n "$LD"; then
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5625 $as_echo "$LD" >&6; }
5626 else
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5628 $as_echo "no" >&6; }
5629 fi
5630 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5632 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5633 if ${lt_cv_prog_gnu_ld+:} false; then :
5634 $as_echo_n "(cached) " >&6
5635 else
5636 # I'd rather use --version here, but apparently some GNU lds only accept -v.
5637 case `$LD -v 2>&1 </dev/null` in
5638 *GNU* | *'with BFD'*)
5639 lt_cv_prog_gnu_ld=yes
5640 ;;
5641 *)
5642 lt_cv_prog_gnu_ld=no
5643 ;;
5644 esac
5645 fi
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
5647 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
5648 with_gnu_ld=$lt_cv_prog_gnu_ld
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
5659 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
5660 if ${lt_cv_path_NM+:} false; then :
5661 $as_echo_n "(cached) " >&6
5662 else
5663 if test -n "$NM"; then
5664 # Let the user override the test.
5665 lt_cv_path_NM="$NM"
5666 else
5667 lt_nm_to_check="${ac_tool_prefix}nm"
5668 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5669 lt_nm_to_check="$lt_nm_to_check nm"
5670 fi
5671 for lt_tmp_nm in $lt_nm_to_check; do
5672 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5673 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5674 IFS="$lt_save_ifs"
5675 test -z "$ac_dir" && ac_dir=.
5676 tmp_nm="$ac_dir/$lt_tmp_nm"
5677 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5678 # Check to see if the nm accepts a BSD-compat flag.
5679 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5680 # nm: unknown option "B" ignored
5681 # Tru64's nm complains that /dev/null is an invalid object file
5682 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5683 */dev/null* | *'Invalid file or object type'*)
5684 lt_cv_path_NM="$tmp_nm -B"
5685 break
5686 ;;
5687 *)
5688 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5689 */dev/null*)
5690 lt_cv_path_NM="$tmp_nm -p"
5691 break
5692 ;;
5693 *)
5694 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5695 continue # so that we can try to find one that supports BSD flags
5696 ;;
5697 esac
5698 ;;
5699 esac
5700 fi
5701 done
5702 IFS="$lt_save_ifs"
5703 done
5704 : ${lt_cv_path_NM=no}
5705 fi
5706 fi
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
5708 $as_echo "$lt_cv_path_NM" >&6; }
5709 if test "$lt_cv_path_NM" != "no"; then
5710 NM="$lt_cv_path_NM"
5711 else
5712 # Didn't find any BSD compatible name lister, look for dumpbin.
5713 if test -n "$DUMPBIN"; then :
5714 # Let the user override the test.
5715 else
5716 if test -n "$ac_tool_prefix"; then
5717 for ac_prog in dumpbin "link -dump"
5718 do
5719 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5720 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5722 $as_echo_n "checking for $ac_word... " >&6; }
5723 if ${ac_cv_prog_DUMPBIN+:} false; then :
5724 $as_echo_n "(cached) " >&6
5725 else
5726 if test -n "$DUMPBIN"; then
5727 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
5728 else
5729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730 for as_dir in $PATH
5731 do
5732 IFS=$as_save_IFS
5733 test -z "$as_dir" && as_dir=.
5734 for ac_exec_ext in '' $ac_executable_extensions; do
5735 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738 break 2
5739 fi
5740 done
5741 done
5742 IFS=$as_save_IFS
5743
5744 fi
5745 fi
5746 DUMPBIN=$ac_cv_prog_DUMPBIN
5747 if test -n "$DUMPBIN"; then
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
5749 $as_echo "$DUMPBIN" >&6; }
5750 else
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5752 $as_echo "no" >&6; }
5753 fi
5754
5755
5756 test -n "$DUMPBIN" && break
5757 done
5758 fi
5759 if test -z "$DUMPBIN"; then
5760 ac_ct_DUMPBIN=$DUMPBIN
5761 for ac_prog in dumpbin "link -dump"
5762 do
5763 # Extract the first word of "$ac_prog", so it can be a program name with args.
5764 set dummy $ac_prog; ac_word=$2
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5766 $as_echo_n "checking for $ac_word... " >&6; }
5767 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
5768 $as_echo_n "(cached) " >&6
5769 else
5770 if test -n "$ac_ct_DUMPBIN"; then
5771 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
5772 else
5773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774 for as_dir in $PATH
5775 do
5776 IFS=$as_save_IFS
5777 test -z "$as_dir" && as_dir=.
5778 for ac_exec_ext in '' $ac_executable_extensions; do
5779 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5780 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5781 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5782 break 2
5783 fi
5784 done
5785 done
5786 IFS=$as_save_IFS
5787
5788 fi
5789 fi
5790 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
5791 if test -n "$ac_ct_DUMPBIN"; then
5792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
5793 $as_echo "$ac_ct_DUMPBIN" >&6; }
5794 else
5795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5796 $as_echo "no" >&6; }
5797 fi
5798
5799
5800 test -n "$ac_ct_DUMPBIN" && break
5801 done
5802
5803 if test "x$ac_ct_DUMPBIN" = x; then
5804 DUMPBIN=":"
5805 else
5806 case $cross_compiling:$ac_tool_warned in
5807 yes:)
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5809 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5810 ac_tool_warned=yes ;;
5811 esac
5812 DUMPBIN=$ac_ct_DUMPBIN
5813 fi
5814 fi
5815
5816 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5817 *COFF*)
5818 DUMPBIN="$DUMPBIN -symbols"
5819 ;;
5820 *)
5821 DUMPBIN=:
5822 ;;
5823 esac
5824 fi
5825
5826 if test "$DUMPBIN" != ":"; then
5827 NM="$DUMPBIN"
5828 fi
5829 fi
5830 test -z "$NM" && NM=nm
5831
5832
5833
5834
5835
5836
5837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
5838 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
5839 if ${lt_cv_nm_interface+:} false; then :
5840 $as_echo_n "(cached) " >&6
5841 else
5842 lt_cv_nm_interface="BSD nm"
5843 echo "int some_variable = 0;" > conftest.$ac_ext
5844 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
5845 (eval "$ac_compile" 2>conftest.err)
5846 cat conftest.err >&5
5847 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5848 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5849 cat conftest.err >&5
5850 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
5851 cat conftest.out >&5
5852 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5853 lt_cv_nm_interface="MS dumpbin"
5854 fi
5855 rm -f conftest*
5856 fi
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
5858 $as_echo "$lt_cv_nm_interface" >&6; }
5859
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5861 $as_echo_n "checking whether ln -s works... " >&6; }
5862 LN_S=$as_ln_s
5863 if test "$LN_S" = "ln -s"; then
5864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5865 $as_echo "yes" >&6; }
5866 else
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5868 $as_echo "no, using $LN_S" >&6; }
5869 fi
5870
5871 # find the maximum length of command line arguments
5872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
5873 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
5874 if ${lt_cv_sys_max_cmd_len+:} false; then :
5875 $as_echo_n "(cached) " >&6
5876 else
5877 i=0
5878 teststring="ABCD"
5879
5880 case $build_os in
5881 msdosdjgpp*)
5882 # On DJGPP, this test can blow up pretty badly due to problems in libc
5883 # (any single argument exceeding 2000 bytes causes a buffer overrun
5884 # during glob expansion). Even if it were fixed, the result of this
5885 # check would be larger than it should be.
5886 lt_cv_sys_max_cmd_len=12288; # 12K is about right
5887 ;;
5888
5889 gnu*)
5890 # Under GNU Hurd, this test is not required because there is
5891 # no limit to the length of command line arguments.
5892 # Libtool will interpret -1 as no limit whatsoever
5893 lt_cv_sys_max_cmd_len=-1;
5894 ;;
5895
5896 cygwin* | mingw* | cegcc*)
5897 # On Win9x/ME, this test blows up -- it succeeds, but takes
5898 # about 5 minutes as the teststring grows exponentially.
5899 # Worse, since 9x/ME are not pre-emptively multitasking,
5900 # you end up with a "frozen" computer, even though with patience
5901 # the test eventually succeeds (with a max line length of 256k).
5902 # Instead, let's just punt: use the minimum linelength reported by
5903 # all of the supported platforms: 8192 (on NT/2K/XP).
5904 lt_cv_sys_max_cmd_len=8192;
5905 ;;
5906
5907 mint*)
5908 # On MiNT this can take a long time and run out of memory.
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
5932 interix*)
5933 # We know the value 262144 and hardcode it with a safety zone (like BSD)
5934 lt_cv_sys_max_cmd_len=196608
5935 ;;
5936
5937 os2*)
5938 # The test takes a long time on OS/2.
5939 lt_cv_sys_max_cmd_len=8192
5940 ;;
5941
5942 osf*)
5943 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5944 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5945 # nice to cause kernel panics so lets avoid the loop below.
5946 # First set a reasonable default.
5947 lt_cv_sys_max_cmd_len=16384
5948 #
5949 if test -x /sbin/sysconfig; then
5950 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5951 *1*) lt_cv_sys_max_cmd_len=-1 ;;
5952 esac
5953 fi
5954 ;;
5955 sco3.2v5*)
5956 lt_cv_sys_max_cmd_len=102400
5957 ;;
5958 sysv5* | sco5v6* | sysv4.2uw2*)
5959 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5960 if test -n "$kargmax"; then
5961 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
5962 else
5963 lt_cv_sys_max_cmd_len=32768
5964 fi
5965 ;;
5966 *)
5967 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5968 if test -n "$lt_cv_sys_max_cmd_len" && \
5969 test undefined != "$lt_cv_sys_max_cmd_len"; then
5970 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5971 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5972 else
5973 # Make teststring a little bigger before we do anything with it.
5974 # a 1K string should be a reasonable start.
5975 for i in 1 2 3 4 5 6 7 8 ; do
5976 teststring=$teststring$teststring
5977 done
5978 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5979 # If test is not a shell built-in, we'll probably end up computing a
5980 # maximum length that is only half of the actual maximum length, but
5981 # we can't tell.
5982 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
5983 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5984 test $i != 17 # 1/2 MB should be enough
5985 do
5986 i=`expr $i + 1`
5987 teststring=$teststring$teststring
5988 done
5989 # Only check the string length outside the loop.
5990 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5991 teststring=
5992 # Add a significant safety factor because C++ compilers can tack on
5993 # massive amounts of additional arguments before passing them to the
5994 # linker. It appears as though 1/2 is a usable value.
5995 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5996 fi
5997 ;;
5998 esac
5999
6000 fi
6001
6002 if test -n $lt_cv_sys_max_cmd_len ; then
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6004 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
6005 else
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
6007 $as_echo "none" >&6; }
6008 fi
6009 max_cmd_len=$lt_cv_sys_max_cmd_len
6010
6011
6012
6013
6014
6015
6016 : ${CP="cp -f"}
6017 : ${MV="mv -f"}
6018 : ${RM="rm -f"}
6019
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
6021 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
6022 # Try some XSI features
6023 xsi_shell=no
6024 ( _lt_dummy="a/b/c"
6025 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
6026 = c,a/b,b/c, \
6027 && eval 'test $(( 1 + 1 )) -eq 2 \
6028 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
6029 && xsi_shell=yes
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
6031 $as_echo "$xsi_shell" >&6; }
6032
6033
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
6035 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
6036 lt_shell_append=no
6037 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
6038 >/dev/null 2>&1 \
6039 && lt_shell_append=yes
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
6041 $as_echo "$lt_shell_append" >&6; }
6042
6043
6044 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6045 lt_unset=unset
6046 else
6047 lt_unset=false
6048 fi
6049
6050
6051
6052
6053
6054 # test EBCDIC or ASCII
6055 case `echo X|tr X '\101'` in
6056 A) # ASCII based system
6057 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6058 lt_SP2NL='tr \040 \012'
6059 lt_NL2SP='tr \015\012 \040\040'
6060 ;;
6061 *) # EBCDIC based system
6062 lt_SP2NL='tr \100 \n'
6063 lt_NL2SP='tr \r\n \100\100'
6064 ;;
6065 esac
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
6076 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
6077 if ${lt_cv_to_host_file_cmd+:} false; then :
6078 $as_echo_n "(cached) " >&6
6079 else
6080 case $host in
6081 *-*-mingw* )
6082 case $build in
6083 *-*-mingw* ) # actually msys
6084 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
6085 ;;
6086 *-*-cygwin* )
6087 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
6088 ;;
6089 * ) # otherwise, assume *nix
6090 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
6091 ;;
6092 esac
6093 ;;
6094 *-*-cygwin* )
6095 case $build in
6096 *-*-mingw* ) # actually msys
6097 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
6098 ;;
6099 *-*-cygwin* )
6100 lt_cv_to_host_file_cmd=func_convert_file_noop
6101 ;;
6102 * ) # otherwise, assume *nix
6103 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
6104 ;;
6105 esac
6106 ;;
6107 * ) # unhandled hosts (and "normal" native builds)
6108 lt_cv_to_host_file_cmd=func_convert_file_noop
6109 ;;
6110 esac
6111
6112 fi
6113
6114 to_host_file_cmd=$lt_cv_to_host_file_cmd
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
6116 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
6117
6118
6119
6120
6121
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
6123 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
6124 if ${lt_cv_to_tool_file_cmd+:} false; then :
6125 $as_echo_n "(cached) " >&6
6126 else
6127 #assume ordinary cross tools, or native build.
6128 lt_cv_to_tool_file_cmd=func_convert_file_noop
6129 case $host in
6130 *-*-mingw* )
6131 case $build in
6132 *-*-mingw* ) # actually msys
6133 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
6134 ;;
6135 esac
6136 ;;
6137 esac
6138
6139 fi
6140
6141 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
6143 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
6144
6145
6146
6147
6148
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6150 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6151 if ${lt_cv_ld_reload_flag+:} false; then :
6152 $as_echo_n "(cached) " >&6
6153 else
6154 lt_cv_ld_reload_flag='-r'
6155 fi
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6157 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6158 reload_flag=$lt_cv_ld_reload_flag
6159 case $reload_flag in
6160 "" | " "*) ;;
6161 *) reload_flag=" $reload_flag" ;;
6162 esac
6163 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6164 case $host_os in
6165 cygwin* | mingw* | pw32* | cegcc*)
6166 if test "$GCC" != yes; then
6167 reload_cmds=false
6168 fi
6169 ;;
6170 darwin*)
6171 if test "$GCC" = yes; then
6172 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
6173 else
6174 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6175 fi
6176 ;;
6177 esac
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187 if test -n "$ac_tool_prefix"; then
6188 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6189 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6191 $as_echo_n "checking for $ac_word... " >&6; }
6192 if ${ac_cv_prog_OBJDUMP+:} false; then :
6193 $as_echo_n "(cached) " >&6
6194 else
6195 if test -n "$OBJDUMP"; then
6196 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6197 else
6198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199 for as_dir in $PATH
6200 do
6201 IFS=$as_save_IFS
6202 test -z "$as_dir" && as_dir=.
6203 for ac_exec_ext in '' $ac_executable_extensions; do
6204 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6205 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207 break 2
6208 fi
6209 done
6210 done
6211 IFS=$as_save_IFS
6212
6213 fi
6214 fi
6215 OBJDUMP=$ac_cv_prog_OBJDUMP
6216 if test -n "$OBJDUMP"; then
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6218 $as_echo "$OBJDUMP" >&6; }
6219 else
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221 $as_echo "no" >&6; }
6222 fi
6223
6224
6225 fi
6226 if test -z "$ac_cv_prog_OBJDUMP"; then
6227 ac_ct_OBJDUMP=$OBJDUMP
6228 # Extract the first word of "objdump", so it can be a program name with args.
6229 set dummy objdump; ac_word=$2
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6231 $as_echo_n "checking for $ac_word... " >&6; }
6232 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
6233 $as_echo_n "(cached) " >&6
6234 else
6235 if test -n "$ac_ct_OBJDUMP"; then
6236 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6237 else
6238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6239 for as_dir in $PATH
6240 do
6241 IFS=$as_save_IFS
6242 test -z "$as_dir" && as_dir=.
6243 for ac_exec_ext in '' $ac_executable_extensions; do
6244 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6245 ac_cv_prog_ac_ct_OBJDUMP="objdump"
6246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6247 break 2
6248 fi
6249 done
6250 done
6251 IFS=$as_save_IFS
6252
6253 fi
6254 fi
6255 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6256 if test -n "$ac_ct_OBJDUMP"; then
6257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6258 $as_echo "$ac_ct_OBJDUMP" >&6; }
6259 else
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6261 $as_echo "no" >&6; }
6262 fi
6263
6264 if test "x$ac_ct_OBJDUMP" = x; then
6265 OBJDUMP="false"
6266 else
6267 case $cross_compiling:$ac_tool_warned in
6268 yes:)
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6270 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6271 ac_tool_warned=yes ;;
6272 esac
6273 OBJDUMP=$ac_ct_OBJDUMP
6274 fi
6275 else
6276 OBJDUMP="$ac_cv_prog_OBJDUMP"
6277 fi
6278
6279 test -z "$OBJDUMP" && OBJDUMP=objdump
6280
6281
6282
6283
6284
6285
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6287 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
6288 if ${lt_cv_deplibs_check_method+:} false; then :
6289 $as_echo_n "(cached) " >&6
6290 else
6291 lt_cv_file_magic_cmd='$MAGIC_CMD'
6292 lt_cv_file_magic_test_file=
6293 lt_cv_deplibs_check_method='unknown'
6294 # Need to set the preceding variable on all platforms that support
6295 # interlibrary dependencies.
6296 # 'none' -- dependencies not supported.
6297 # `unknown' -- same as none, but documents that we really don't know.
6298 # 'pass_all' -- all dependencies passed with no checks.
6299 # 'test_compile' -- check by making test program.
6300 # 'file_magic [[regex]]' -- check by looking for files in library path
6301 # which responds to the $file_magic_cmd with a given extended regex.
6302 # If you have `file' or equivalent on your system and you're not sure
6303 # whether `pass_all' will *always* work, you probably want this one.
6304
6305 case $host_os in
6306 aix[4-9]*)
6307 lt_cv_deplibs_check_method=pass_all
6308 ;;
6309
6310 beos*)
6311 lt_cv_deplibs_check_method=pass_all
6312 ;;
6313
6314 bsdi[45]*)
6315 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6316 lt_cv_file_magic_cmd='/usr/bin/file -L'
6317 lt_cv_file_magic_test_file=/shlib/libc.so
6318 ;;
6319
6320 cygwin*)
6321 # func_win32_libid is a shell function defined in ltmain.sh
6322 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6323 lt_cv_file_magic_cmd='func_win32_libid'
6324 ;;
6325
6326 mingw* | pw32*)
6327 # Base MSYS/MinGW do not provide the 'file' command needed by
6328 # func_win32_libid shell function, so use a weaker test based on 'objdump',
6329 # unless we find 'file', for example because we are cross-compiling.
6330 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
6331 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
6332 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6333 lt_cv_file_magic_cmd='func_win32_libid'
6334 else
6335 # Keep this pattern in sync with the one in func_win32_libid.
6336 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6337 lt_cv_file_magic_cmd='$OBJDUMP -f'
6338 fi
6339 ;;
6340
6341 cegcc*)
6342 # use the weaker test based on 'objdump'. See mingw*.
6343 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6344 lt_cv_file_magic_cmd='$OBJDUMP -f'
6345 ;;
6346
6347 darwin* | rhapsody*)
6348 lt_cv_deplibs_check_method=pass_all
6349 ;;
6350
6351 freebsd* | dragonfly*)
6352 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6353 case $host_cpu in
6354 i*86 )
6355 # Not sure whether the presence of OpenBSD here was a mistake.
6356 # Let's accept both of them until this is cleared up.
6357 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6358 lt_cv_file_magic_cmd=/usr/bin/file
6359 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6360 ;;
6361 esac
6362 else
6363 lt_cv_deplibs_check_method=pass_all
6364 fi
6365 ;;
6366
6367 haiku*)
6368 lt_cv_deplibs_check_method=pass_all
6369 ;;
6370
6371 hpux10.20* | hpux11*)
6372 lt_cv_file_magic_cmd=/usr/bin/file
6373 case $host_cpu in
6374 ia64*)
6375 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6376 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6377 ;;
6378 hppa*64*)
6379 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
6380 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6381 ;;
6382 *)
6383 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
6384 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6385 ;;
6386 esac
6387 ;;
6388
6389 interix[3-9]*)
6390 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6391 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6392 ;;
6393
6394 irix5* | irix6* | nonstopux*)
6395 case $LD in
6396 *-32|*"-32 ") libmagic=32-bit;;
6397 *-n32|*"-n32 ") libmagic=N32;;
6398 *-64|*"-64 ") libmagic=64-bit;;
6399 *) libmagic=never-match;;
6400 esac
6401 lt_cv_deplibs_check_method=pass_all
6402 ;;
6403
6404 # This must be glibc/ELF.
6405 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6406 lt_cv_deplibs_check_method=pass_all
6407 ;;
6408
6409 netbsd* | netbsdelf*-gnu)
6410 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6411 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6412 else
6413 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6414 fi
6415 ;;
6416
6417 newos6*)
6418 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6419 lt_cv_file_magic_cmd=/usr/bin/file
6420 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6421 ;;
6422
6423 *nto* | *qnx*)
6424 lt_cv_deplibs_check_method=pass_all
6425 ;;
6426
6427 openbsd*)
6428 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6429 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6430 else
6431 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6432 fi
6433 ;;
6434
6435 osf3* | osf4* | osf5*)
6436 lt_cv_deplibs_check_method=pass_all
6437 ;;
6438
6439 rdos*)
6440 lt_cv_deplibs_check_method=pass_all
6441 ;;
6442
6443 solaris*)
6444 lt_cv_deplibs_check_method=pass_all
6445 ;;
6446
6447 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6448 lt_cv_deplibs_check_method=pass_all
6449 ;;
6450
6451 sysv4 | sysv4.3*)
6452 case $host_vendor in
6453 motorola)
6454 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]'
6455 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6456 ;;
6457 ncr)
6458 lt_cv_deplibs_check_method=pass_all
6459 ;;
6460 sequent)
6461 lt_cv_file_magic_cmd='/bin/file'
6462 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6463 ;;
6464 sni)
6465 lt_cv_file_magic_cmd='/bin/file'
6466 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6467 lt_cv_file_magic_test_file=/lib/libc.so
6468 ;;
6469 siemens)
6470 lt_cv_deplibs_check_method=pass_all
6471 ;;
6472 pc)
6473 lt_cv_deplibs_check_method=pass_all
6474 ;;
6475 esac
6476 ;;
6477
6478 tpf*)
6479 lt_cv_deplibs_check_method=pass_all
6480 ;;
6481 esac
6482
6483 fi
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6485 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6486
6487 file_magic_glob=
6488 want_nocaseglob=no
6489 if test "$build" = "$host"; then
6490 case $host_os in
6491 mingw* | pw32*)
6492 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6493 want_nocaseglob=yes
6494 else
6495 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
6496 fi
6497 ;;
6498 esac
6499 fi
6500
6501 file_magic_cmd=$lt_cv_file_magic_cmd
6502 deplibs_check_method=$lt_cv_deplibs_check_method
6503 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526 if test -n "$ac_tool_prefix"; then
6527 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6528 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6530 $as_echo_n "checking for $ac_word... " >&6; }
6531 if ${ac_cv_prog_DLLTOOL+:} false; then :
6532 $as_echo_n "(cached) " >&6
6533 else
6534 if test -n "$DLLTOOL"; then
6535 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6536 else
6537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6538 for as_dir in $PATH
6539 do
6540 IFS=$as_save_IFS
6541 test -z "$as_dir" && as_dir=.
6542 for ac_exec_ext in '' $ac_executable_extensions; do
6543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6544 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6546 break 2
6547 fi
6548 done
6549 done
6550 IFS=$as_save_IFS
6551
6552 fi
6553 fi
6554 DLLTOOL=$ac_cv_prog_DLLTOOL
6555 if test -n "$DLLTOOL"; then
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6557 $as_echo "$DLLTOOL" >&6; }
6558 else
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6560 $as_echo "no" >&6; }
6561 fi
6562
6563
6564 fi
6565 if test -z "$ac_cv_prog_DLLTOOL"; then
6566 ac_ct_DLLTOOL=$DLLTOOL
6567 # Extract the first word of "dlltool", so it can be a program name with args.
6568 set dummy dlltool; ac_word=$2
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6570 $as_echo_n "checking for $ac_word... " >&6; }
6571 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6572 $as_echo_n "(cached) " >&6
6573 else
6574 if test -n "$ac_ct_DLLTOOL"; then
6575 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6576 else
6577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578 for as_dir in $PATH
6579 do
6580 IFS=$as_save_IFS
6581 test -z "$as_dir" && as_dir=.
6582 for ac_exec_ext in '' $ac_executable_extensions; do
6583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586 break 2
6587 fi
6588 done
6589 done
6590 IFS=$as_save_IFS
6591
6592 fi
6593 fi
6594 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6595 if test -n "$ac_ct_DLLTOOL"; then
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6597 $as_echo "$ac_ct_DLLTOOL" >&6; }
6598 else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600 $as_echo "no" >&6; }
6601 fi
6602
6603 if test "x$ac_ct_DLLTOOL" = x; then
6604 DLLTOOL="false"
6605 else
6606 case $cross_compiling:$ac_tool_warned in
6607 yes:)
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6609 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6610 ac_tool_warned=yes ;;
6611 esac
6612 DLLTOOL=$ac_ct_DLLTOOL
6613 fi
6614 else
6615 DLLTOOL="$ac_cv_prog_DLLTOOL"
6616 fi
6617
6618 test -z "$DLLTOOL" && DLLTOOL=dlltool
6619
6620
6621
6622
6623
6624
6625
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
6627 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
6628 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
6629 $as_echo_n "(cached) " >&6
6630 else
6631 lt_cv_sharedlib_from_linklib_cmd='unknown'
6632
6633 case $host_os in
6634 cygwin* | mingw* | pw32* | cegcc*)
6635 # two different shell functions defined in ltmain.sh
6636 # decide which to use based on capabilities of $DLLTOOL
6637 case `$DLLTOOL --help 2>&1` in
6638 *--identify-strict*)
6639 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6640 ;;
6641 *)
6642 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6643 ;;
6644 esac
6645 ;;
6646 *)
6647 # fallback: assume linklib IS sharedlib
6648 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6649 ;;
6650 esac
6651
6652 fi
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
6654 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
6655 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6656 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6657
6658
6659
6660
6661
6662
6663
6664 if test -n "$ac_tool_prefix"; then
6665 for ac_prog in ar
6666 do
6667 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6668 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6670 $as_echo_n "checking for $ac_word... " >&6; }
6671 if ${ac_cv_prog_AR+:} false; then :
6672 $as_echo_n "(cached) " >&6
6673 else
6674 if test -n "$AR"; then
6675 ac_cv_prog_AR="$AR" # Let the user override the test.
6676 else
6677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678 for as_dir in $PATH
6679 do
6680 IFS=$as_save_IFS
6681 test -z "$as_dir" && as_dir=.
6682 for ac_exec_ext in '' $ac_executable_extensions; do
6683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686 break 2
6687 fi
6688 done
6689 done
6690 IFS=$as_save_IFS
6691
6692 fi
6693 fi
6694 AR=$ac_cv_prog_AR
6695 if test -n "$AR"; then
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6697 $as_echo "$AR" >&6; }
6698 else
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6700 $as_echo "no" >&6; }
6701 fi
6702
6703
6704 test -n "$AR" && break
6705 done
6706 fi
6707 if test -z "$AR"; then
6708 ac_ct_AR=$AR
6709 for ac_prog in ar
6710 do
6711 # Extract the first word of "$ac_prog", so it can be a program name with args.
6712 set dummy $ac_prog; ac_word=$2
6713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6714 $as_echo_n "checking for $ac_word... " >&6; }
6715 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6716 $as_echo_n "(cached) " >&6
6717 else
6718 if test -n "$ac_ct_AR"; then
6719 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6720 else
6721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6722 for as_dir in $PATH
6723 do
6724 IFS=$as_save_IFS
6725 test -z "$as_dir" && as_dir=.
6726 for ac_exec_ext in '' $ac_executable_extensions; do
6727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6728 ac_cv_prog_ac_ct_AR="$ac_prog"
6729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6730 break 2
6731 fi
6732 done
6733 done
6734 IFS=$as_save_IFS
6735
6736 fi
6737 fi
6738 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6739 if test -n "$ac_ct_AR"; then
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6741 $as_echo "$ac_ct_AR" >&6; }
6742 else
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744 $as_echo "no" >&6; }
6745 fi
6746
6747
6748 test -n "$ac_ct_AR" && break
6749 done
6750
6751 if test "x$ac_ct_AR" = x; then
6752 AR="false"
6753 else
6754 case $cross_compiling:$ac_tool_warned in
6755 yes:)
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6757 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6758 ac_tool_warned=yes ;;
6759 esac
6760 AR=$ac_ct_AR
6761 fi
6762 fi
6763
6764 : ${AR=ar}
6765 : ${AR_FLAGS=cru}
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
6778 $as_echo_n "checking for archiver @FILE support... " >&6; }
6779 if ${lt_cv_ar_at_file+:} false; then :
6780 $as_echo_n "(cached) " >&6
6781 else
6782 lt_cv_ar_at_file=no
6783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6784 /* end confdefs.h. */
6785
6786 int
6787 main ()
6788 {
6789
6790 ;
6791 return 0;
6792 }
6793 _ACEOF
6794 if ac_fn_c_try_compile "$LINENO"; then :
6795 echo conftest.$ac_objext > conftest.lst
6796 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
6797 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6798 (eval $lt_ar_try) 2>&5
6799 ac_status=$?
6800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6801 test $ac_status = 0; }
6802 if test "$ac_status" -eq 0; then
6803 # Ensure the archiver fails upon bogus file names.
6804 rm -f conftest.$ac_objext libconftest.a
6805 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6806 (eval $lt_ar_try) 2>&5
6807 ac_status=$?
6808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6809 test $ac_status = 0; }
6810 if test "$ac_status" -ne 0; then
6811 lt_cv_ar_at_file=@
6812 fi
6813 fi
6814 rm -f conftest.* libconftest.a
6815
6816 fi
6817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6818
6819 fi
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
6821 $as_echo "$lt_cv_ar_at_file" >&6; }
6822
6823 if test "x$lt_cv_ar_at_file" = xno; then
6824 archiver_list_spec=
6825 else
6826 archiver_list_spec=$lt_cv_ar_at_file
6827 fi
6828
6829
6830
6831
6832
6833
6834
6835 if test -n "$ac_tool_prefix"; then
6836 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6837 set dummy ${ac_tool_prefix}strip; ac_word=$2
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6839 $as_echo_n "checking for $ac_word... " >&6; }
6840 if ${ac_cv_prog_STRIP+:} false; then :
6841 $as_echo_n "(cached) " >&6
6842 else
6843 if test -n "$STRIP"; then
6844 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6845 else
6846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6847 for as_dir in $PATH
6848 do
6849 IFS=$as_save_IFS
6850 test -z "$as_dir" && as_dir=.
6851 for ac_exec_ext in '' $ac_executable_extensions; do
6852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6853 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6855 break 2
6856 fi
6857 done
6858 done
6859 IFS=$as_save_IFS
6860
6861 fi
6862 fi
6863 STRIP=$ac_cv_prog_STRIP
6864 if test -n "$STRIP"; then
6865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6866 $as_echo "$STRIP" >&6; }
6867 else
6868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6869 $as_echo "no" >&6; }
6870 fi
6871
6872
6873 fi
6874 if test -z "$ac_cv_prog_STRIP"; then
6875 ac_ct_STRIP=$STRIP
6876 # Extract the first word of "strip", so it can be a program name with args.
6877 set dummy strip; ac_word=$2
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6879 $as_echo_n "checking for $ac_word... " >&6; }
6880 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6881 $as_echo_n "(cached) " >&6
6882 else
6883 if test -n "$ac_ct_STRIP"; then
6884 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6885 else
6886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6887 for as_dir in $PATH
6888 do
6889 IFS=$as_save_IFS
6890 test -z "$as_dir" && as_dir=.
6891 for ac_exec_ext in '' $ac_executable_extensions; do
6892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6893 ac_cv_prog_ac_ct_STRIP="strip"
6894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6895 break 2
6896 fi
6897 done
6898 done
6899 IFS=$as_save_IFS
6900
6901 fi
6902 fi
6903 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6904 if test -n "$ac_ct_STRIP"; then
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6906 $as_echo "$ac_ct_STRIP" >&6; }
6907 else
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909 $as_echo "no" >&6; }
6910 fi
6911
6912 if test "x$ac_ct_STRIP" = x; then
6913 STRIP=":"
6914 else
6915 case $cross_compiling:$ac_tool_warned in
6916 yes:)
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6918 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6919 ac_tool_warned=yes ;;
6920 esac
6921 STRIP=$ac_ct_STRIP
6922 fi
6923 else
6924 STRIP="$ac_cv_prog_STRIP"
6925 fi
6926
6927 test -z "$STRIP" && STRIP=:
6928
6929
6930
6931
6932
6933
6934 if test -n "$ac_tool_prefix"; then
6935 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6936 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6938 $as_echo_n "checking for $ac_word... " >&6; }
6939 if ${ac_cv_prog_RANLIB+:} false; then :
6940 $as_echo_n "(cached) " >&6
6941 else
6942 if test -n "$RANLIB"; then
6943 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6944 else
6945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6946 for as_dir in $PATH
6947 do
6948 IFS=$as_save_IFS
6949 test -z "$as_dir" && as_dir=.
6950 for ac_exec_ext in '' $ac_executable_extensions; do
6951 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6952 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6954 break 2
6955 fi
6956 done
6957 done
6958 IFS=$as_save_IFS
6959
6960 fi
6961 fi
6962 RANLIB=$ac_cv_prog_RANLIB
6963 if test -n "$RANLIB"; then
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6965 $as_echo "$RANLIB" >&6; }
6966 else
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6968 $as_echo "no" >&6; }
6969 fi
6970
6971
6972 fi
6973 if test -z "$ac_cv_prog_RANLIB"; then
6974 ac_ct_RANLIB=$RANLIB
6975 # Extract the first word of "ranlib", so it can be a program name with args.
6976 set dummy ranlib; ac_word=$2
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6978 $as_echo_n "checking for $ac_word... " >&6; }
6979 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6980 $as_echo_n "(cached) " >&6
6981 else
6982 if test -n "$ac_ct_RANLIB"; then
6983 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6984 else
6985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6986 for as_dir in $PATH
6987 do
6988 IFS=$as_save_IFS
6989 test -z "$as_dir" && as_dir=.
6990 for ac_exec_ext in '' $ac_executable_extensions; do
6991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6992 ac_cv_prog_ac_ct_RANLIB="ranlib"
6993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6994 break 2
6995 fi
6996 done
6997 done
6998 IFS=$as_save_IFS
6999
7000 fi
7001 fi
7002 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7003 if test -n "$ac_ct_RANLIB"; then
7004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7005 $as_echo "$ac_ct_RANLIB" >&6; }
7006 else
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7008 $as_echo "no" >&6; }
7009 fi
7010
7011 if test "x$ac_ct_RANLIB" = x; then
7012 RANLIB=":"
7013 else
7014 case $cross_compiling:$ac_tool_warned in
7015 yes:)
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7017 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7018 ac_tool_warned=yes ;;
7019 esac
7020 RANLIB=$ac_ct_RANLIB
7021 fi
7022 else
7023 RANLIB="$ac_cv_prog_RANLIB"
7024 fi
7025
7026 test -z "$RANLIB" && RANLIB=:
7027
7028
7029
7030
7031
7032
7033 # Determine commands to create old-style static archives.
7034 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
7035 old_postinstall_cmds='chmod 644 $oldlib'
7036 old_postuninstall_cmds=
7037
7038 if test -n "$RANLIB"; then
7039 case $host_os in
7040 openbsd*)
7041 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
7042 ;;
7043 *)
7044 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
7045 ;;
7046 esac
7047 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
7048 fi
7049
7050 case $host_os in
7051 darwin*)
7052 lock_old_archive_extraction=yes ;;
7053 *)
7054 lock_old_archive_extraction=no ;;
7055 esac
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095 # If no C compiler was specified, use CC.
7096 LTCC=${LTCC-"$CC"}
7097
7098 # If no C compiler flags were specified, use CFLAGS.
7099 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7100
7101 # Allow CC to be a program name with arguments.
7102 compiler=$CC
7103
7104
7105 # Check for command to grab the raw symbol name followed by C symbol from nm.
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7107 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7108 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
7109 $as_echo_n "(cached) " >&6
7110 else
7111
7112 # These are sane defaults that work on at least a few old systems.
7113 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7114
7115 # Character class describing NM global symbol codes.
7116 symcode='[BCDEGRST]'
7117
7118 # Regexp to match symbols that can be accessed directly from C.
7119 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7120
7121 # Define system-specific variables.
7122 case $host_os in
7123 aix*)
7124 symcode='[BCDT]'
7125 ;;
7126 cygwin* | mingw* | pw32* | cegcc*)
7127 symcode='[ABCDGISTW]'
7128 ;;
7129 hpux*)
7130 if test "$host_cpu" = ia64; then
7131 symcode='[ABCDEGRST]'
7132 fi
7133 ;;
7134 irix* | nonstopux*)
7135 symcode='[BCDEGRST]'
7136 ;;
7137 osf*)
7138 symcode='[BCDEGQRST]'
7139 ;;
7140 solaris*)
7141 symcode='[BDRT]'
7142 ;;
7143 sco3.2v5*)
7144 symcode='[DT]'
7145 ;;
7146 sysv4.2uw2*)
7147 symcode='[DT]'
7148 ;;
7149 sysv5* | sco5v6* | unixware* | OpenUNIX*)
7150 symcode='[ABDT]'
7151 ;;
7152 sysv4)
7153 symcode='[DFNSTU]'
7154 ;;
7155 esac
7156
7157 # If we're using GNU nm, then use its standard symbol codes.
7158 case `$NM -V 2>&1` in
7159 *GNU* | *'with BFD'*)
7160 symcode='[ABCDGIRSTW]' ;;
7161 esac
7162
7163 # Transform an extracted symbol line into a proper C declaration.
7164 # Some systems (esp. on ia64) link data and code symbols differently,
7165 # so use this general approach.
7166 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7167
7168 # Transform an extracted symbol line into symbol name and symbol address
7169 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
7170 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
7171
7172 # Handle CRLF in mingw tool chain
7173 opt_cr=
7174 case $build_os in
7175 mingw*)
7176 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7177 ;;
7178 esac
7179
7180 # Try without a prefix underscore, then with it.
7181 for ac_symprfx in "" "_"; do
7182
7183 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7184 symxfrm="\\1 $ac_symprfx\\2 \\2"
7185
7186 # Write the raw and C identifiers.
7187 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7188 # Fake it for dumpbin and say T for any non-static function
7189 # and D for any global variable.
7190 # Also find C++ and __fastcall symbols from MSVC++,
7191 # which start with @ or ?.
7192 lt_cv_sys_global_symbol_pipe="$AWK '"\
7193 " {last_section=section; section=\$ 3};"\
7194 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7195 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7196 " \$ 0!~/External *\|/{next};"\
7197 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7198 " {if(hide[section]) next};"\
7199 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
7200 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
7201 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
7202 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
7203 " ' prfx=^$ac_symprfx"
7204 else
7205 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7206 fi
7207 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
7208
7209 # Check to see that the pipe works correctly.
7210 pipe_works=no
7211
7212 rm -f conftest*
7213 cat > conftest.$ac_ext <<_LT_EOF
7214 #ifdef __cplusplus
7215 extern "C" {
7216 #endif
7217 char nm_test_var;
7218 void nm_test_func(void);
7219 void nm_test_func(void){}
7220 #ifdef __cplusplus
7221 }
7222 #endif
7223 int main(){nm_test_var='a';nm_test_func();return(0);}
7224 _LT_EOF
7225
7226 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7227 (eval $ac_compile) 2>&5
7228 ac_status=$?
7229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7230 test $ac_status = 0; }; then
7231 # Now try to grab the symbols.
7232 nlist=conftest.nm
7233 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
7234 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
7235 ac_status=$?
7236 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7237 test $ac_status = 0; } && test -s "$nlist"; then
7238 # Try sorting and uniquifying the output.
7239 if sort "$nlist" | uniq > "$nlist"T; then
7240 mv -f "$nlist"T "$nlist"
7241 else
7242 rm -f "$nlist"T
7243 fi
7244
7245 # Make sure that we snagged all the symbols we need.
7246 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7247 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7248 cat <<_LT_EOF > conftest.$ac_ext
7249 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
7250 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
7251 /* DATA imports from DLLs on WIN32 con't be const, because runtime
7252 relocations are performed -- see ld's documentation on pseudo-relocs. */
7253 # define LT_DLSYM_CONST
7254 #elif defined(__osf__)
7255 /* This system does not cope well with relocations in const data. */
7256 # define LT_DLSYM_CONST
7257 #else
7258 # define LT_DLSYM_CONST const
7259 #endif
7260
7261 #ifdef __cplusplus
7262 extern "C" {
7263 #endif
7264
7265 _LT_EOF
7266 # Now generate the symbol file.
7267 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7268
7269 cat <<_LT_EOF >> conftest.$ac_ext
7270
7271 /* The mapping between symbol names and symbols. */
7272 LT_DLSYM_CONST struct {
7273 const char *name;
7274 void *address;
7275 }
7276 lt__PROGRAM__LTX_preloaded_symbols[] =
7277 {
7278 { "@PROGRAM@", (void *) 0 },
7279 _LT_EOF
7280 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7281 cat <<\_LT_EOF >> conftest.$ac_ext
7282 {0, (void *) 0}
7283 };
7284
7285 /* This works around a problem in FreeBSD linker */
7286 #ifdef FREEBSD_WORKAROUND
7287 static const void *lt_preloaded_setup() {
7288 return lt__PROGRAM__LTX_preloaded_symbols;
7289 }
7290 #endif
7291
7292 #ifdef __cplusplus
7293 }
7294 #endif
7295 _LT_EOF
7296 # Now try linking the two files.
7297 mv conftest.$ac_objext conftstm.$ac_objext
7298 lt_globsym_save_LIBS=$LIBS
7299 lt_globsym_save_CFLAGS=$CFLAGS
7300 LIBS="conftstm.$ac_objext"
7301 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7302 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7303 (eval $ac_link) 2>&5
7304 ac_status=$?
7305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7306 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7307 pipe_works=yes
7308 fi
7309 LIBS=$lt_globsym_save_LIBS
7310 CFLAGS=$lt_globsym_save_CFLAGS
7311 else
7312 echo "cannot find nm_test_func in $nlist" >&5
7313 fi
7314 else
7315 echo "cannot find nm_test_var in $nlist" >&5
7316 fi
7317 else
7318 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7319 fi
7320 else
7321 echo "$progname: failed program was:" >&5
7322 cat conftest.$ac_ext >&5
7323 fi
7324 rm -rf conftest* conftst*
7325
7326 # Do not use the global_symbol_pipe unless it works.
7327 if test "$pipe_works" = yes; then
7328 break
7329 else
7330 lt_cv_sys_global_symbol_pipe=
7331 fi
7332 done
7333
7334 fi
7335
7336 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7337 lt_cv_sys_global_symbol_to_cdecl=
7338 fi
7339 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7341 $as_echo "failed" >&6; }
7342 else
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7344 $as_echo "ok" >&6; }
7345 fi
7346
7347 # Response file support.
7348 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7349 nm_file_list_spec='@'
7350 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
7351 nm_file_list_spec='@'
7352 fi
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
7381 $as_echo_n "checking for sysroot... " >&6; }
7382
7383 # Check whether --with-sysroot was given.
7384 if test "${with_sysroot+set}" = set; then :
7385 withval=$with_sysroot;
7386 else
7387 with_sysroot=no
7388 fi
7389
7390
7391 lt_sysroot=
7392 case ${with_sysroot} in #(
7393 yes)
7394 if test "$GCC" = yes; then
7395 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
7396 fi
7397 ;; #(
7398 /*)
7399 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
7400 ;; #(
7401 no|'')
7402 ;; #(
7403 *)
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
7405 $as_echo "${with_sysroot}" >&6; }
7406 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
7407 ;;
7408 esac
7409
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
7411 $as_echo "${lt_sysroot:-no}" >&6; }
7412
7413
7414
7415
7416
7417 # Check whether --enable-libtool-lock was given.
7418 if test "${enable_libtool_lock+set}" = set; then :
7419 enableval=$enable_libtool_lock;
7420 fi
7421
7422 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7423
7424 # Some flags need to be propagated to the compiler or linker for good
7425 # libtool support.
7426 case $host in
7427 ia64-*-hpux*)
7428 # Find out which ABI we are using.
7429 echo 'int i;' > conftest.$ac_ext
7430 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7431 (eval $ac_compile) 2>&5
7432 ac_status=$?
7433 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7434 test $ac_status = 0; }; then
7435 case `/usr/bin/file conftest.$ac_objext` in
7436 *ELF-32*)
7437 HPUX_IA64_MODE="32"
7438 ;;
7439 *ELF-64*)
7440 HPUX_IA64_MODE="64"
7441 ;;
7442 esac
7443 fi
7444 rm -rf conftest*
7445 ;;
7446 *-*-irix6*)
7447 # Find out which ABI we are using.
7448 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
7449 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7450 (eval $ac_compile) 2>&5
7451 ac_status=$?
7452 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7453 test $ac_status = 0; }; then
7454 if test "$lt_cv_prog_gnu_ld" = yes; then
7455 case `/usr/bin/file conftest.$ac_objext` in
7456 *32-bit*)
7457 LD="${LD-ld} -melf32bsmip"
7458 ;;
7459 *N32*)
7460 LD="${LD-ld} -melf32bmipn32"
7461 ;;
7462 *64-bit*)
7463 LD="${LD-ld} -melf64bmip"
7464 ;;
7465 esac
7466 else
7467 case `/usr/bin/file conftest.$ac_objext` in
7468 *32-bit*)
7469 LD="${LD-ld} -32"
7470 ;;
7471 *N32*)
7472 LD="${LD-ld} -n32"
7473 ;;
7474 *64-bit*)
7475 LD="${LD-ld} -64"
7476 ;;
7477 esac
7478 fi
7479 fi
7480 rm -rf conftest*
7481 ;;
7482
7483 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
7484 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
7485 # Find out which ABI we are using.
7486 echo 'int i;' > conftest.$ac_ext
7487 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7488 (eval $ac_compile) 2>&5
7489 ac_status=$?
7490 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7491 test $ac_status = 0; }; then
7492 case `/usr/bin/file conftest.o` in
7493 *32-bit*)
7494 case $host in
7495 x86_64-*kfreebsd*-gnu)
7496 LD="${LD-ld} -m elf_i386_fbsd"
7497 ;;
7498 x86_64-*linux*)
7499 case `/usr/bin/file conftest.o` in
7500 *x86-64*)
7501 LD="${LD-ld} -m elf32_x86_64"
7502 ;;
7503 *)
7504 LD="${LD-ld} -m elf_i386"
7505 ;;
7506 esac
7507 ;;
7508 ppc64-*linux*|powerpc64-*linux*)
7509 LD="${LD-ld} -m elf32ppclinux"
7510 ;;
7511 s390x-*linux*)
7512 LD="${LD-ld} -m elf_s390"
7513 ;;
7514 sparc64-*linux*)
7515 LD="${LD-ld} -m elf32_sparc"
7516 ;;
7517 esac
7518 ;;
7519 *64-bit*)
7520 case $host in
7521 x86_64-*kfreebsd*-gnu)
7522 LD="${LD-ld} -m elf_x86_64_fbsd"
7523 ;;
7524 x86_64-*linux*)
7525 LD="${LD-ld} -m elf_x86_64"
7526 ;;
7527 ppc*-*linux*|powerpc*-*linux*)
7528 LD="${LD-ld} -m elf64ppc"
7529 ;;
7530 s390*-*linux*|s390*-*tpf*)
7531 LD="${LD-ld} -m elf64_s390"
7532 ;;
7533 sparc*-*linux*)
7534 LD="${LD-ld} -m elf64_sparc"
7535 ;;
7536 esac
7537 ;;
7538 esac
7539 fi
7540 rm -rf conftest*
7541 ;;
7542
7543 *-*-sco3.2v5*)
7544 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7545 SAVE_CFLAGS="$CFLAGS"
7546 CFLAGS="$CFLAGS -belf"
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7548 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7549 if ${lt_cv_cc_needs_belf+:} false; then :
7550 $as_echo_n "(cached) " >&6
7551 else
7552 ac_ext=c
7553 ac_cpp='$CPP $CPPFLAGS'
7554 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7555 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7556 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7557
7558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7559 /* end confdefs.h. */
7560
7561 int
7562 main ()
7563 {
7564
7565 ;
7566 return 0;
7567 }
7568 _ACEOF
7569 if ac_fn_c_try_link "$LINENO"; then :
7570 lt_cv_cc_needs_belf=yes
7571 else
7572 lt_cv_cc_needs_belf=no
7573 fi
7574 rm -f core conftest.err conftest.$ac_objext \
7575 conftest$ac_exeext conftest.$ac_ext
7576 ac_ext=c
7577 ac_cpp='$CPP $CPPFLAGS'
7578 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7579 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7580 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7581
7582 fi
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7584 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7585 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7586 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7587 CFLAGS="$SAVE_CFLAGS"
7588 fi
7589 ;;
7590 *-*solaris*)
7591 # Find out which ABI we are using.
7592 echo 'int i;' > conftest.$ac_ext
7593 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7594 (eval $ac_compile) 2>&5
7595 ac_status=$?
7596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7597 test $ac_status = 0; }; then
7598 case `/usr/bin/file conftest.o` in
7599 *64-bit*)
7600 case $lt_cv_prog_gnu_ld in
7601 yes*)
7602 case $host in
7603 i?86-*-solaris*)
7604 LD="${LD-ld} -m elf_x86_64"
7605 ;;
7606 sparc*-*-solaris*)
7607 LD="${LD-ld} -m elf64_sparc"
7608 ;;
7609 esac
7610 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
7611 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
7612 LD="${LD-ld}_sol2"
7613 fi
7614 ;;
7615 *)
7616 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
7617 LD="${LD-ld} -64"
7618 fi
7619 ;;
7620 esac
7621 ;;
7622 esac
7623 fi
7624 rm -rf conftest*
7625 ;;
7626 esac
7627
7628 need_locks="$enable_libtool_lock"
7629
7630 if test -n "$ac_tool_prefix"; then
7631 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
7632 set dummy ${ac_tool_prefix}mt; ac_word=$2
7633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7634 $as_echo_n "checking for $ac_word... " >&6; }
7635 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
7636 $as_echo_n "(cached) " >&6
7637 else
7638 if test -n "$MANIFEST_TOOL"; then
7639 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
7640 else
7641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7642 for as_dir in $PATH
7643 do
7644 IFS=$as_save_IFS
7645 test -z "$as_dir" && as_dir=.
7646 for ac_exec_ext in '' $ac_executable_extensions; do
7647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7648 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
7649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7650 break 2
7651 fi
7652 done
7653 done
7654 IFS=$as_save_IFS
7655
7656 fi
7657 fi
7658 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
7659 if test -n "$MANIFEST_TOOL"; then
7660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
7661 $as_echo "$MANIFEST_TOOL" >&6; }
7662 else
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7664 $as_echo "no" >&6; }
7665 fi
7666
7667
7668 fi
7669 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
7670 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
7671 # Extract the first word of "mt", so it can be a program name with args.
7672 set dummy mt; ac_word=$2
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674 $as_echo_n "checking for $ac_word... " >&6; }
7675 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
7676 $as_echo_n "(cached) " >&6
7677 else
7678 if test -n "$ac_ct_MANIFEST_TOOL"; then
7679 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
7680 else
7681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682 for as_dir in $PATH
7683 do
7684 IFS=$as_save_IFS
7685 test -z "$as_dir" && as_dir=.
7686 for ac_exec_ext in '' $ac_executable_extensions; do
7687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7688 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
7689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7690 break 2
7691 fi
7692 done
7693 done
7694 IFS=$as_save_IFS
7695
7696 fi
7697 fi
7698 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
7699 if test -n "$ac_ct_MANIFEST_TOOL"; then
7700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
7701 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
7702 else
7703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704 $as_echo "no" >&6; }
7705 fi
7706
7707 if test "x$ac_ct_MANIFEST_TOOL" = x; then
7708 MANIFEST_TOOL=":"
7709 else
7710 case $cross_compiling:$ac_tool_warned in
7711 yes:)
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7713 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7714 ac_tool_warned=yes ;;
7715 esac
7716 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
7717 fi
7718 else
7719 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
7720 fi
7721
7722 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
7724 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
7725 if ${lt_cv_path_mainfest_tool+:} false; then :
7726 $as_echo_n "(cached) " >&6
7727 else
7728 lt_cv_path_mainfest_tool=no
7729 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
7730 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7731 cat conftest.err >&5
7732 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7733 lt_cv_path_mainfest_tool=yes
7734 fi
7735 rm -f conftest*
7736 fi
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
7738 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
7739 if test "x$lt_cv_path_mainfest_tool" != xyes; then
7740 MANIFEST_TOOL=:
7741 fi
7742
7743
7744
7745
7746
7747
7748 case $host_os in
7749 rhapsody* | darwin*)
7750 if test -n "$ac_tool_prefix"; then
7751 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7752 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7754 $as_echo_n "checking for $ac_word... " >&6; }
7755 if ${ac_cv_prog_DSYMUTIL+:} false; then :
7756 $as_echo_n "(cached) " >&6
7757 else
7758 if test -n "$DSYMUTIL"; then
7759 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7760 else
7761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7762 for as_dir in $PATH
7763 do
7764 IFS=$as_save_IFS
7765 test -z "$as_dir" && as_dir=.
7766 for ac_exec_ext in '' $ac_executable_extensions; do
7767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7768 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
7769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7770 break 2
7771 fi
7772 done
7773 done
7774 IFS=$as_save_IFS
7775
7776 fi
7777 fi
7778 DSYMUTIL=$ac_cv_prog_DSYMUTIL
7779 if test -n "$DSYMUTIL"; then
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
7781 $as_echo "$DSYMUTIL" >&6; }
7782 else
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7784 $as_echo "no" >&6; }
7785 fi
7786
7787
7788 fi
7789 if test -z "$ac_cv_prog_DSYMUTIL"; then
7790 ac_ct_DSYMUTIL=$DSYMUTIL
7791 # Extract the first word of "dsymutil", so it can be a program name with args.
7792 set dummy dsymutil; ac_word=$2
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7794 $as_echo_n "checking for $ac_word... " >&6; }
7795 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
7796 $as_echo_n "(cached) " >&6
7797 else
7798 if test -n "$ac_ct_DSYMUTIL"; then
7799 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7800 else
7801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7802 for as_dir in $PATH
7803 do
7804 IFS=$as_save_IFS
7805 test -z "$as_dir" && as_dir=.
7806 for ac_exec_ext in '' $ac_executable_extensions; do
7807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7808 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
7809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7810 break 2
7811 fi
7812 done
7813 done
7814 IFS=$as_save_IFS
7815
7816 fi
7817 fi
7818 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7819 if test -n "$ac_ct_DSYMUTIL"; then
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
7821 $as_echo "$ac_ct_DSYMUTIL" >&6; }
7822 else
7823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7824 $as_echo "no" >&6; }
7825 fi
7826
7827 if test "x$ac_ct_DSYMUTIL" = x; then
7828 DSYMUTIL=":"
7829 else
7830 case $cross_compiling:$ac_tool_warned in
7831 yes:)
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7833 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7834 ac_tool_warned=yes ;;
7835 esac
7836 DSYMUTIL=$ac_ct_DSYMUTIL
7837 fi
7838 else
7839 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
7840 fi
7841
7842 if test -n "$ac_tool_prefix"; then
7843 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7844 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7846 $as_echo_n "checking for $ac_word... " >&6; }
7847 if ${ac_cv_prog_NMEDIT+:} false; then :
7848 $as_echo_n "(cached) " >&6
7849 else
7850 if test -n "$NMEDIT"; then
7851 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7852 else
7853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854 for as_dir in $PATH
7855 do
7856 IFS=$as_save_IFS
7857 test -z "$as_dir" && as_dir=.
7858 for ac_exec_ext in '' $ac_executable_extensions; do
7859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7860 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7862 break 2
7863 fi
7864 done
7865 done
7866 IFS=$as_save_IFS
7867
7868 fi
7869 fi
7870 NMEDIT=$ac_cv_prog_NMEDIT
7871 if test -n "$NMEDIT"; then
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
7873 $as_echo "$NMEDIT" >&6; }
7874 else
7875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7876 $as_echo "no" >&6; }
7877 fi
7878
7879
7880 fi
7881 if test -z "$ac_cv_prog_NMEDIT"; then
7882 ac_ct_NMEDIT=$NMEDIT
7883 # Extract the first word of "nmedit", so it can be a program name with args.
7884 set dummy nmedit; ac_word=$2
7885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7886 $as_echo_n "checking for $ac_word... " >&6; }
7887 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
7888 $as_echo_n "(cached) " >&6
7889 else
7890 if test -n "$ac_ct_NMEDIT"; then
7891 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7892 else
7893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7894 for as_dir in $PATH
7895 do
7896 IFS=$as_save_IFS
7897 test -z "$as_dir" && as_dir=.
7898 for ac_exec_ext in '' $ac_executable_extensions; do
7899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7900 ac_cv_prog_ac_ct_NMEDIT="nmedit"
7901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7902 break 2
7903 fi
7904 done
7905 done
7906 IFS=$as_save_IFS
7907
7908 fi
7909 fi
7910 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7911 if test -n "$ac_ct_NMEDIT"; then
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
7913 $as_echo "$ac_ct_NMEDIT" >&6; }
7914 else
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7916 $as_echo "no" >&6; }
7917 fi
7918
7919 if test "x$ac_ct_NMEDIT" = x; then
7920 NMEDIT=":"
7921 else
7922 case $cross_compiling:$ac_tool_warned in
7923 yes:)
7924 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7925 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7926 ac_tool_warned=yes ;;
7927 esac
7928 NMEDIT=$ac_ct_NMEDIT
7929 fi
7930 else
7931 NMEDIT="$ac_cv_prog_NMEDIT"
7932 fi
7933
7934 if test -n "$ac_tool_prefix"; then
7935 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
7936 set dummy ${ac_tool_prefix}lipo; ac_word=$2
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7938 $as_echo_n "checking for $ac_word... " >&6; }
7939 if ${ac_cv_prog_LIPO+:} false; then :
7940 $as_echo_n "(cached) " >&6
7941 else
7942 if test -n "$LIPO"; then
7943 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
7944 else
7945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7946 for as_dir in $PATH
7947 do
7948 IFS=$as_save_IFS
7949 test -z "$as_dir" && as_dir=.
7950 for ac_exec_ext in '' $ac_executable_extensions; do
7951 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7952 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
7953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7954 break 2
7955 fi
7956 done
7957 done
7958 IFS=$as_save_IFS
7959
7960 fi
7961 fi
7962 LIPO=$ac_cv_prog_LIPO
7963 if test -n "$LIPO"; then
7964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
7965 $as_echo "$LIPO" >&6; }
7966 else
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7968 $as_echo "no" >&6; }
7969 fi
7970
7971
7972 fi
7973 if test -z "$ac_cv_prog_LIPO"; then
7974 ac_ct_LIPO=$LIPO
7975 # Extract the first word of "lipo", so it can be a program name with args.
7976 set dummy lipo; ac_word=$2
7977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7978 $as_echo_n "checking for $ac_word... " >&6; }
7979 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
7980 $as_echo_n "(cached) " >&6
7981 else
7982 if test -n "$ac_ct_LIPO"; then
7983 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
7984 else
7985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7986 for as_dir in $PATH
7987 do
7988 IFS=$as_save_IFS
7989 test -z "$as_dir" && as_dir=.
7990 for ac_exec_ext in '' $ac_executable_extensions; do
7991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7992 ac_cv_prog_ac_ct_LIPO="lipo"
7993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7994 break 2
7995 fi
7996 done
7997 done
7998 IFS=$as_save_IFS
7999
8000 fi
8001 fi
8002 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
8003 if test -n "$ac_ct_LIPO"; then
8004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
8005 $as_echo "$ac_ct_LIPO" >&6; }
8006 else
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8008 $as_echo "no" >&6; }
8009 fi
8010
8011 if test "x$ac_ct_LIPO" = x; then
8012 LIPO=":"
8013 else
8014 case $cross_compiling:$ac_tool_warned in
8015 yes:)
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8017 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8018 ac_tool_warned=yes ;;
8019 esac
8020 LIPO=$ac_ct_LIPO
8021 fi
8022 else
8023 LIPO="$ac_cv_prog_LIPO"
8024 fi
8025
8026 if test -n "$ac_tool_prefix"; then
8027 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
8028 set dummy ${ac_tool_prefix}otool; ac_word=$2
8029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8030 $as_echo_n "checking for $ac_word... " >&6; }
8031 if ${ac_cv_prog_OTOOL+:} false; then :
8032 $as_echo_n "(cached) " >&6
8033 else
8034 if test -n "$OTOOL"; then
8035 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
8036 else
8037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8038 for as_dir in $PATH
8039 do
8040 IFS=$as_save_IFS
8041 test -z "$as_dir" && as_dir=.
8042 for ac_exec_ext in '' $ac_executable_extensions; do
8043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8044 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
8045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8046 break 2
8047 fi
8048 done
8049 done
8050 IFS=$as_save_IFS
8051
8052 fi
8053 fi
8054 OTOOL=$ac_cv_prog_OTOOL
8055 if test -n "$OTOOL"; then
8056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
8057 $as_echo "$OTOOL" >&6; }
8058 else
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8060 $as_echo "no" >&6; }
8061 fi
8062
8063
8064 fi
8065 if test -z "$ac_cv_prog_OTOOL"; then
8066 ac_ct_OTOOL=$OTOOL
8067 # Extract the first word of "otool", so it can be a program name with args.
8068 set dummy otool; ac_word=$2
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8070 $as_echo_n "checking for $ac_word... " >&6; }
8071 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
8072 $as_echo_n "(cached) " >&6
8073 else
8074 if test -n "$ac_ct_OTOOL"; then
8075 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
8076 else
8077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8078 for as_dir in $PATH
8079 do
8080 IFS=$as_save_IFS
8081 test -z "$as_dir" && as_dir=.
8082 for ac_exec_ext in '' $ac_executable_extensions; do
8083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8084 ac_cv_prog_ac_ct_OTOOL="otool"
8085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8086 break 2
8087 fi
8088 done
8089 done
8090 IFS=$as_save_IFS
8091
8092 fi
8093 fi
8094 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
8095 if test -n "$ac_ct_OTOOL"; then
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
8097 $as_echo "$ac_ct_OTOOL" >&6; }
8098 else
8099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8100 $as_echo "no" >&6; }
8101 fi
8102
8103 if test "x$ac_ct_OTOOL" = x; then
8104 OTOOL=":"
8105 else
8106 case $cross_compiling:$ac_tool_warned in
8107 yes:)
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8109 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8110 ac_tool_warned=yes ;;
8111 esac
8112 OTOOL=$ac_ct_OTOOL
8113 fi
8114 else
8115 OTOOL="$ac_cv_prog_OTOOL"
8116 fi
8117
8118 if test -n "$ac_tool_prefix"; then
8119 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
8120 set dummy ${ac_tool_prefix}otool64; ac_word=$2
8121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8122 $as_echo_n "checking for $ac_word... " >&6; }
8123 if ${ac_cv_prog_OTOOL64+:} false; then :
8124 $as_echo_n "(cached) " >&6
8125 else
8126 if test -n "$OTOOL64"; then
8127 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
8128 else
8129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8130 for as_dir in $PATH
8131 do
8132 IFS=$as_save_IFS
8133 test -z "$as_dir" && as_dir=.
8134 for ac_exec_ext in '' $ac_executable_extensions; do
8135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8136 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
8137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8138 break 2
8139 fi
8140 done
8141 done
8142 IFS=$as_save_IFS
8143
8144 fi
8145 fi
8146 OTOOL64=$ac_cv_prog_OTOOL64
8147 if test -n "$OTOOL64"; then
8148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
8149 $as_echo "$OTOOL64" >&6; }
8150 else
8151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8152 $as_echo "no" >&6; }
8153 fi
8154
8155
8156 fi
8157 if test -z "$ac_cv_prog_OTOOL64"; then
8158 ac_ct_OTOOL64=$OTOOL64
8159 # Extract the first word of "otool64", so it can be a program name with args.
8160 set dummy otool64; ac_word=$2
8161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8162 $as_echo_n "checking for $ac_word... " >&6; }
8163 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
8164 $as_echo_n "(cached) " >&6
8165 else
8166 if test -n "$ac_ct_OTOOL64"; then
8167 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
8168 else
8169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170 for as_dir in $PATH
8171 do
8172 IFS=$as_save_IFS
8173 test -z "$as_dir" && as_dir=.
8174 for ac_exec_ext in '' $ac_executable_extensions; do
8175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8176 ac_cv_prog_ac_ct_OTOOL64="otool64"
8177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178 break 2
8179 fi
8180 done
8181 done
8182 IFS=$as_save_IFS
8183
8184 fi
8185 fi
8186 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
8187 if test -n "$ac_ct_OTOOL64"; then
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
8189 $as_echo "$ac_ct_OTOOL64" >&6; }
8190 else
8191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8192 $as_echo "no" >&6; }
8193 fi
8194
8195 if test "x$ac_ct_OTOOL64" = x; then
8196 OTOOL64=":"
8197 else
8198 case $cross_compiling:$ac_tool_warned in
8199 yes:)
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8201 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8202 ac_tool_warned=yes ;;
8203 esac
8204 OTOOL64=$ac_ct_OTOOL64
8205 fi
8206 else
8207 OTOOL64="$ac_cv_prog_OTOOL64"
8208 fi
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
8237 $as_echo_n "checking for -single_module linker flag... " >&6; }
8238 if ${lt_cv_apple_cc_single_mod+:} false; then :
8239 $as_echo_n "(cached) " >&6
8240 else
8241 lt_cv_apple_cc_single_mod=no
8242 if test -z "${LT_MULTI_MODULE}"; then
8243 # By default we will add the -single_module flag. You can override
8244 # by either setting the environment variable LT_MULTI_MODULE
8245 # non-empty at configure time, or by adding -multi_module to the
8246 # link flags.
8247 rm -rf libconftest.dylib*
8248 echo "int foo(void){return 1;}" > conftest.c
8249 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8250 -dynamiclib -Wl,-single_module conftest.c" >&5
8251 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8252 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
8253 _lt_result=$?
8254 # If there is a non-empty error log, and "single_module"
8255 # appears in it, assume the flag caused a linker warning
8256 if test -s conftest.err && $GREP single_module conftest.err; then
8257 cat conftest.err >&5
8258 # Otherwise, if the output was created with a 0 exit code from
8259 # the compiler, it worked.
8260 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
8261 lt_cv_apple_cc_single_mod=yes
8262 else
8263 cat conftest.err >&5
8264 fi
8265 rm -rf libconftest.dylib*
8266 rm -f conftest.*
8267 fi
8268 fi
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
8270 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
8271
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
8273 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
8274 if ${lt_cv_ld_exported_symbols_list+:} false; then :
8275 $as_echo_n "(cached) " >&6
8276 else
8277 lt_cv_ld_exported_symbols_list=no
8278 save_LDFLAGS=$LDFLAGS
8279 echo "_main" > conftest.sym
8280 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
8281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8282 /* end confdefs.h. */
8283
8284 int
8285 main ()
8286 {
8287
8288 ;
8289 return 0;
8290 }
8291 _ACEOF
8292 if ac_fn_c_try_link "$LINENO"; then :
8293 lt_cv_ld_exported_symbols_list=yes
8294 else
8295 lt_cv_ld_exported_symbols_list=no
8296 fi
8297 rm -f core conftest.err conftest.$ac_objext \
8298 conftest$ac_exeext conftest.$ac_ext
8299 LDFLAGS="$save_LDFLAGS"
8300
8301 fi
8302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
8303 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
8304
8305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
8306 $as_echo_n "checking for -force_load linker flag... " >&6; }
8307 if ${lt_cv_ld_force_load+:} false; then :
8308 $as_echo_n "(cached) " >&6
8309 else
8310 lt_cv_ld_force_load=no
8311 cat > conftest.c << _LT_EOF
8312 int forced_loaded() { return 2;}
8313 _LT_EOF
8314 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
8315 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8316 echo "$AR cru libconftest.a conftest.o" >&5
8317 $AR cru libconftest.a conftest.o 2>&5
8318 echo "$RANLIB libconftest.a" >&5
8319 $RANLIB libconftest.a 2>&5
8320 cat > conftest.c << _LT_EOF
8321 int main() { return 0;}
8322 _LT_EOF
8323 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
8324 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
8325 _lt_result=$?
8326 if test -s conftest.err && $GREP force_load conftest.err; then
8327 cat conftest.err >&5
8328 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
8329 lt_cv_ld_force_load=yes
8330 else
8331 cat conftest.err >&5
8332 fi
8333 rm -f conftest.err libconftest.a conftest conftest.c
8334 rm -rf conftest.dSYM
8335
8336 fi
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
8338 $as_echo "$lt_cv_ld_force_load" >&6; }
8339 case $host_os in
8340 rhapsody* | darwin1.[012])
8341 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
8342 darwin1.*)
8343 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8344 darwin*) # darwin 5.x on
8345 # if running on 10.5 or later, the deployment target defaults
8346 # to the OS version, if on x86, and 10.4, the deployment
8347 # target defaults to 10.4. Don't you love it?
8348 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
8349 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
8350 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8351 10.[012]*)
8352 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8353 10.*)
8354 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8355 esac
8356 ;;
8357 esac
8358 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
8359 _lt_dar_single_mod='$single_module'
8360 fi
8361 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
8362 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
8363 else
8364 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
8365 fi
8366 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
8367 _lt_dsymutil='~$DSYMUTIL $lib || :'
8368 else
8369 _lt_dsymutil=
8370 fi
8371 ;;
8372 esac
8373
8374 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8375 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8376 inttypes.h stdint.h unistd.h
8377 do :
8378 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8379 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8380 "
8381 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8382 cat >>confdefs.h <<_ACEOF
8383 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8384 _ACEOF
8385
8386 fi
8387
8388 done
8389
8390
8391 for ac_header in dlfcn.h
8392 do :
8393 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
8394 "
8395 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
8396 cat >>confdefs.h <<_ACEOF
8397 #define HAVE_DLFCN_H 1
8398 _ACEOF
8399
8400 fi
8401
8402 done
8403
8404
8405
8406
8407
8408 # Set options
8409
8410
8411
8412 enable_dlopen=no
8413
8414
8415
8416 # Check whether --enable-shared was given.
8417 if test "${enable_shared+set}" = set; then :
8418 enableval=$enable_shared; p=${PACKAGE-default}
8419 case $enableval in
8420 yes) enable_shared=yes ;;
8421 no) enable_shared=no ;;
8422 *)
8423 enable_shared=no
8424 # Look at the argument we got. We use all the common list separators.
8425 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8426 for pkg in $enableval; do
8427 IFS="$lt_save_ifs"
8428 if test "X$pkg" = "X$p"; then
8429 enable_shared=yes
8430 fi
8431 done
8432 IFS="$lt_save_ifs"
8433 ;;
8434 esac
8435 else
8436 enable_shared=yes
8437 fi
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447 # Check whether --enable-static was given.
8448 if test "${enable_static+set}" = set; then :
8449 enableval=$enable_static; p=${PACKAGE-default}
8450 case $enableval in
8451 yes) enable_static=yes ;;
8452 no) enable_static=no ;;
8453 *)
8454 enable_static=no
8455 # Look at the argument we got. We use all the common list separators.
8456 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8457 for pkg in $enableval; do
8458 IFS="$lt_save_ifs"
8459 if test "X$pkg" = "X$p"; then
8460 enable_static=yes
8461 fi
8462 done
8463 IFS="$lt_save_ifs"
8464 ;;
8465 esac
8466 else
8467 enable_static=yes
8468 fi
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479 # Check whether --with-pic was given.
8480 if test "${with_pic+set}" = set; then :
8481 withval=$with_pic; lt_p=${PACKAGE-default}
8482 case $withval in
8483 yes|no) pic_mode=$withval ;;
8484 *)
8485 pic_mode=default
8486 # Look at the argument we got. We use all the common list separators.
8487 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8488 for lt_pkg in $withval; do
8489 IFS="$lt_save_ifs"
8490 if test "X$lt_pkg" = "X$lt_p"; then
8491 pic_mode=yes
8492 fi
8493 done
8494 IFS="$lt_save_ifs"
8495 ;;
8496 esac
8497 else
8498 pic_mode=default
8499 fi
8500
8501
8502 test -z "$pic_mode" && pic_mode=default
8503
8504
8505
8506
8507
8508
8509
8510 # Check whether --enable-fast-install was given.
8511 if test "${enable_fast_install+set}" = set; then :
8512 enableval=$enable_fast_install; p=${PACKAGE-default}
8513 case $enableval in
8514 yes) enable_fast_install=yes ;;
8515 no) enable_fast_install=no ;;
8516 *)
8517 enable_fast_install=no
8518 # Look at the argument we got. We use all the common list separators.
8519 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8520 for pkg in $enableval; do
8521 IFS="$lt_save_ifs"
8522 if test "X$pkg" = "X$p"; then
8523 enable_fast_install=yes
8524 fi
8525 done
8526 IFS="$lt_save_ifs"
8527 ;;
8528 esac
8529 else
8530 enable_fast_install=yes
8531 fi
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543 # This can be used to rebuild libtool when needed
8544 LIBTOOL_DEPS="$ltmain"
8545
8546 # Always use our own libtool.
8547 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578 test -z "$LN_S" && LN_S="ln -s"
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593 if test -n "${ZSH_VERSION+set}" ; then
8594 setopt NO_GLOB_SUBST
8595 fi
8596
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8598 $as_echo_n "checking for objdir... " >&6; }
8599 if ${lt_cv_objdir+:} false; then :
8600 $as_echo_n "(cached) " >&6
8601 else
8602 rm -f .libs 2>/dev/null
8603 mkdir .libs 2>/dev/null
8604 if test -d .libs; then
8605 lt_cv_objdir=.libs
8606 else
8607 # MS-DOS does not allow filenames that begin with a dot.
8608 lt_cv_objdir=_libs
8609 fi
8610 rmdir .libs 2>/dev/null
8611 fi
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8613 $as_echo "$lt_cv_objdir" >&6; }
8614 objdir=$lt_cv_objdir
8615
8616
8617
8618
8619
8620 cat >>confdefs.h <<_ACEOF
8621 #define LT_OBJDIR "$lt_cv_objdir/"
8622 _ACEOF
8623
8624
8625
8626
8627 case $host_os in
8628 aix3*)
8629 # AIX sometimes has problems with the GCC collect2 program. For some
8630 # reason, if we set the COLLECT_NAMES environment variable, the problems
8631 # vanish in a puff of smoke.
8632 if test "X${COLLECT_NAMES+set}" != Xset; then
8633 COLLECT_NAMES=
8634 export COLLECT_NAMES
8635 fi
8636 ;;
8637 esac
8638
8639 # Global variables:
8640 ofile=libtool
8641 can_build_shared=yes
8642
8643 # All known linkers require a `.a' archive for static linking (except MSVC,
8644 # which needs '.lib').
8645 libext=a
8646
8647 with_gnu_ld="$lt_cv_prog_gnu_ld"
8648
8649 old_CC="$CC"
8650 old_CFLAGS="$CFLAGS"
8651
8652 # Set sane defaults for various variables
8653 test -z "$CC" && CC=cc
8654 test -z "$LTCC" && LTCC=$CC
8655 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
8656 test -z "$LD" && LD=ld
8657 test -z "$ac_objext" && ac_objext=o
8658
8659 for cc_temp in $compiler""; do
8660 case $cc_temp in
8661 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8662 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8663 \-*) ;;
8664 *) break;;
8665 esac
8666 done
8667 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
8668
8669
8670 # Only perform the check for file, if the check method requires it
8671 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8672 case $deplibs_check_method in
8673 file_magic*)
8674 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8676 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8677 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8678 $as_echo_n "(cached) " >&6
8679 else
8680 case $MAGIC_CMD in
8681 [\\/*] | ?:[\\/]*)
8682 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8683 ;;
8684 *)
8685 lt_save_MAGIC_CMD="$MAGIC_CMD"
8686 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8687 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8688 for ac_dir in $ac_dummy; do
8689 IFS="$lt_save_ifs"
8690 test -z "$ac_dir" && ac_dir=.
8691 if test -f $ac_dir/${ac_tool_prefix}file; then
8692 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8693 if test -n "$file_magic_test_file"; then
8694 case $deplibs_check_method in
8695 "file_magic "*)
8696 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8697 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8698 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8699 $EGREP "$file_magic_regex" > /dev/null; then
8700 :
8701 else
8702 cat <<_LT_EOF 1>&2
8703
8704 *** Warning: the command libtool uses to detect shared libraries,
8705 *** $file_magic_cmd, produces output that libtool cannot recognize.
8706 *** The result is that libtool may fail to recognize shared libraries
8707 *** as such. This will affect the creation of libtool libraries that
8708 *** depend on shared libraries, but programs linked with such libtool
8709 *** libraries will work regardless of this problem. Nevertheless, you
8710 *** may want to report the problem to your system manager and/or to
8711 *** bug-libtool@gnu.org
8712
8713 _LT_EOF
8714 fi ;;
8715 esac
8716 fi
8717 break
8718 fi
8719 done
8720 IFS="$lt_save_ifs"
8721 MAGIC_CMD="$lt_save_MAGIC_CMD"
8722 ;;
8723 esac
8724 fi
8725
8726 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8727 if test -n "$MAGIC_CMD"; then
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8729 $as_echo "$MAGIC_CMD" >&6; }
8730 else
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8732 $as_echo "no" >&6; }
8733 fi
8734
8735
8736
8737
8738
8739 if test -z "$lt_cv_path_MAGIC_CMD"; then
8740 if test -n "$ac_tool_prefix"; then
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8742 $as_echo_n "checking for file... " >&6; }
8743 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8744 $as_echo_n "(cached) " >&6
8745 else
8746 case $MAGIC_CMD in
8747 [\\/*] | ?:[\\/]*)
8748 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8749 ;;
8750 *)
8751 lt_save_MAGIC_CMD="$MAGIC_CMD"
8752 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8753 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8754 for ac_dir in $ac_dummy; do
8755 IFS="$lt_save_ifs"
8756 test -z "$ac_dir" && ac_dir=.
8757 if test -f $ac_dir/file; then
8758 lt_cv_path_MAGIC_CMD="$ac_dir/file"
8759 if test -n "$file_magic_test_file"; then
8760 case $deplibs_check_method in
8761 "file_magic "*)
8762 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8763 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8764 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8765 $EGREP "$file_magic_regex" > /dev/null; then
8766 :
8767 else
8768 cat <<_LT_EOF 1>&2
8769
8770 *** Warning: the command libtool uses to detect shared libraries,
8771 *** $file_magic_cmd, produces output that libtool cannot recognize.
8772 *** The result is that libtool may fail to recognize shared libraries
8773 *** as such. This will affect the creation of libtool libraries that
8774 *** depend on shared libraries, but programs linked with such libtool
8775 *** libraries will work regardless of this problem. Nevertheless, you
8776 *** may want to report the problem to your system manager and/or to
8777 *** bug-libtool@gnu.org
8778
8779 _LT_EOF
8780 fi ;;
8781 esac
8782 fi
8783 break
8784 fi
8785 done
8786 IFS="$lt_save_ifs"
8787 MAGIC_CMD="$lt_save_MAGIC_CMD"
8788 ;;
8789 esac
8790 fi
8791
8792 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8793 if test -n "$MAGIC_CMD"; then
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8795 $as_echo "$MAGIC_CMD" >&6; }
8796 else
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8798 $as_echo "no" >&6; }
8799 fi
8800
8801
8802 else
8803 MAGIC_CMD=:
8804 fi
8805 fi
8806
8807 fi
8808 ;;
8809 esac
8810
8811 # Use C for the default configuration in the libtool script
8812
8813 lt_save_CC="$CC"
8814 ac_ext=c
8815 ac_cpp='$CPP $CPPFLAGS'
8816 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8817 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8819
8820
8821 # Source file extension for C test sources.
8822 ac_ext=c
8823
8824 # Object file extension for compiled C test sources.
8825 objext=o
8826 objext=$objext
8827
8828 # Code to be used in simple compile tests
8829 lt_simple_compile_test_code="int some_variable = 0;"
8830
8831 # Code to be used in simple link tests
8832 lt_simple_link_test_code='int main(){return(0);}'
8833
8834
8835
8836
8837
8838
8839
8840 # If no C compiler was specified, use CC.
8841 LTCC=${LTCC-"$CC"}
8842
8843 # If no C compiler flags were specified, use CFLAGS.
8844 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8845
8846 # Allow CC to be a program name with arguments.
8847 compiler=$CC
8848
8849 # Save the default compiler, since it gets overwritten when the other
8850 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8851 compiler_DEFAULT=$CC
8852
8853 # save warnings/boilerplate of simple test code
8854 ac_outfile=conftest.$ac_objext
8855 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
8856 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8857 _lt_compiler_boilerplate=`cat conftest.err`
8858 $RM conftest*
8859
8860 ac_outfile=conftest.$ac_objext
8861 echo "$lt_simple_link_test_code" >conftest.$ac_ext
8862 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
8863 _lt_linker_boilerplate=`cat conftest.err`
8864 $RM -r conftest*
8865
8866
8867 ## CAVEAT EMPTOR:
8868 ## There is no encapsulation within the following macros, do not change
8869 ## the running order or otherwise move them around unless you know exactly
8870 ## what you are doing...
8871 if test -n "$compiler"; then
8872
8873 lt_prog_compiler_no_builtin_flag=
8874
8875 if test "$GCC" = yes; then
8876 case $cc_basename in
8877 nvcc*)
8878 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
8879 *)
8880 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
8881 esac
8882
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8884 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8885 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
8886 $as_echo_n "(cached) " >&6
8887 else
8888 lt_cv_prog_compiler_rtti_exceptions=no
8889 ac_outfile=conftest.$ac_objext
8890 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8891 lt_compiler_flag="-fno-rtti -fno-exceptions"
8892 # Insert the option either (1) after the last *FLAGS variable, or
8893 # (2) before a word containing "conftest.", or (3) at the end.
8894 # Note that $ac_compile itself does not contain backslashes and begins
8895 # with a dollar sign (not a hyphen), so the echo should work correctly.
8896 # The option is referenced via a variable to avoid confusing sed.
8897 lt_compile=`echo "$ac_compile" | $SED \
8898 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8899 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8900 -e 's:$: $lt_compiler_flag:'`
8901 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
8902 (eval "$lt_compile" 2>conftest.err)
8903 ac_status=$?
8904 cat conftest.err >&5
8905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8906 if (exit $ac_status) && test -s "$ac_outfile"; then
8907 # The compiler can only warn and ignore the option if not recognized
8908 # So say no if there are warnings other than the usual output.
8909 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
8910 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8911 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8912 lt_cv_prog_compiler_rtti_exceptions=yes
8913 fi
8914 fi
8915 $RM conftest*
8916
8917 fi
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8919 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8920
8921 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8922 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8923 else
8924 :
8925 fi
8926
8927 fi
8928
8929
8930
8931
8932
8933
8934 lt_prog_compiler_wl=
8935 lt_prog_compiler_pic=
8936 lt_prog_compiler_static=
8937
8938
8939 if test "$GCC" = yes; then
8940 lt_prog_compiler_wl='-Wl,'
8941 lt_prog_compiler_static='-static'
8942
8943 case $host_os in
8944 aix*)
8945 # All AIX code is PIC.
8946 if test "$host_cpu" = ia64; then
8947 # AIX 5 now supports IA64 processor
8948 lt_prog_compiler_static='-Bstatic'
8949 fi
8950 ;;
8951
8952 amigaos*)
8953 case $host_cpu in
8954 powerpc)
8955 # see comment about AmigaOS4 .so support
8956 lt_prog_compiler_pic='-fPIC'
8957 ;;
8958 m68k)
8959 # FIXME: we need at least 68020 code to build shared libraries, but
8960 # adding the `-m68020' flag to GCC prevents building anything better,
8961 # like `-m68040'.
8962 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8963 ;;
8964 esac
8965 ;;
8966
8967 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8968 # PIC is the default for these OSes.
8969 ;;
8970
8971 mingw* | cygwin* | pw32* | os2* | cegcc*)
8972 # This hack is so that the source file can tell whether it is being
8973 # built for inclusion in a dll (and should export symbols for example).
8974 # Although the cygwin gcc ignores -fPIC, still need this for old-style
8975 # (--disable-auto-import) libraries
8976 lt_prog_compiler_pic='-DDLL_EXPORT'
8977 ;;
8978
8979 darwin* | rhapsody*)
8980 # PIC is the default on this platform
8981 # Common symbols not allowed in MH_DYLIB files
8982 lt_prog_compiler_pic='-fno-common'
8983 ;;
8984
8985 haiku*)
8986 # PIC is the default for Haiku.
8987 # The "-static" flag exists, but is broken.
8988 lt_prog_compiler_static=
8989 ;;
8990
8991 hpux*)
8992 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8993 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
8994 # sets the default TLS model and affects inlining.
8995 case $host_cpu in
8996 hppa*64*)
8997 # +Z the default
8998 ;;
8999 *)
9000 lt_prog_compiler_pic='-fPIC'
9001 ;;
9002 esac
9003 ;;
9004
9005 interix[3-9]*)
9006 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
9007 # Instead, we relocate shared libraries at runtime.
9008 ;;
9009
9010 msdosdjgpp*)
9011 # Just because we use GCC doesn't mean we suddenly get shared libraries
9012 # on systems that don't support them.
9013 lt_prog_compiler_can_build_shared=no
9014 enable_shared=no
9015 ;;
9016
9017 *nto* | *qnx*)
9018 # QNX uses GNU C++, but need to define -shared option too, otherwise
9019 # it will coredump.
9020 lt_prog_compiler_pic='-fPIC -shared'
9021 ;;
9022
9023 sysv4*MP*)
9024 if test -d /usr/nec; then
9025 lt_prog_compiler_pic=-Kconform_pic
9026 fi
9027 ;;
9028
9029 *)
9030 lt_prog_compiler_pic='-fPIC'
9031 ;;
9032 esac
9033
9034 case $cc_basename in
9035 nvcc*) # Cuda Compiler Driver 2.2
9036 lt_prog_compiler_wl='-Xlinker '
9037 if test -n "$lt_prog_compiler_pic"; then
9038 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
9039 fi
9040 ;;
9041 esac
9042 else
9043 # PORTME Check for flag to pass linker flags through the system compiler.
9044 case $host_os in
9045 aix*)
9046 lt_prog_compiler_wl='-Wl,'
9047 if test "$host_cpu" = ia64; then
9048 # AIX 5 now supports IA64 processor
9049 lt_prog_compiler_static='-Bstatic'
9050 else
9051 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
9052 fi
9053 ;;
9054
9055 mingw* | cygwin* | pw32* | os2* | cegcc*)
9056 # This hack is so that the source file can tell whether it is being
9057 # built for inclusion in a dll (and should export symbols for example).
9058 lt_prog_compiler_pic='-DDLL_EXPORT'
9059 ;;
9060
9061 hpux9* | hpux10* | hpux11*)
9062 lt_prog_compiler_wl='-Wl,'
9063 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9064 # not for PA HP-UX.
9065 case $host_cpu in
9066 hppa*64*|ia64*)
9067 # +Z the default
9068 ;;
9069 *)
9070 lt_prog_compiler_pic='+Z'
9071 ;;
9072 esac
9073 # Is there a better lt_prog_compiler_static that works with the bundled CC?
9074 lt_prog_compiler_static='${wl}-a ${wl}archive'
9075 ;;
9076
9077 irix5* | irix6* | nonstopux*)
9078 lt_prog_compiler_wl='-Wl,'
9079 # PIC (with -KPIC) is the default.
9080 lt_prog_compiler_static='-non_shared'
9081 ;;
9082
9083 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9084 case $cc_basename in
9085 # old Intel for x86_64 which still supported -KPIC.
9086 ecc*)
9087 lt_prog_compiler_wl='-Wl,'
9088 lt_prog_compiler_pic='-KPIC'
9089 lt_prog_compiler_static='-static'
9090 ;;
9091 # icc used to be incompatible with GCC.
9092 # ICC 10 doesn't accept -KPIC any more.
9093 icc* | ifort*)
9094 lt_prog_compiler_wl='-Wl,'
9095 lt_prog_compiler_pic='-fPIC'
9096 lt_prog_compiler_static='-static'
9097 ;;
9098 # Lahey Fortran 8.1.
9099 lf95*)
9100 lt_prog_compiler_wl='-Wl,'
9101 lt_prog_compiler_pic='--shared'
9102 lt_prog_compiler_static='--static'
9103 ;;
9104 nagfor*)
9105 # NAG Fortran compiler
9106 lt_prog_compiler_wl='-Wl,-Wl,,'
9107 lt_prog_compiler_pic='-PIC'
9108 lt_prog_compiler_static='-Bstatic'
9109 ;;
9110 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
9111 # Portland Group compilers (*not* the Pentium gcc compiler,
9112 # which looks to be a dead project)
9113 lt_prog_compiler_wl='-Wl,'
9114 lt_prog_compiler_pic='-fpic'
9115 lt_prog_compiler_static='-Bstatic'
9116 ;;
9117 ccc*)
9118 lt_prog_compiler_wl='-Wl,'
9119 # All Alpha code is PIC.
9120 lt_prog_compiler_static='-non_shared'
9121 ;;
9122 xl* | bgxl* | bgf* | mpixl*)
9123 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
9124 lt_prog_compiler_wl='-Wl,'
9125 lt_prog_compiler_pic='-qpic'
9126 lt_prog_compiler_static='-qstaticlink'
9127 ;;
9128 *)
9129 case `$CC -V 2>&1 | sed 5q` in
9130 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
9131 # Sun Fortran 8.3 passes all unrecognized flags to the linker
9132 lt_prog_compiler_pic='-KPIC'
9133 lt_prog_compiler_static='-Bstatic'
9134 lt_prog_compiler_wl=''
9135 ;;
9136 *Sun\ F* | *Sun*Fortran*)
9137 lt_prog_compiler_pic='-KPIC'
9138 lt_prog_compiler_static='-Bstatic'
9139 lt_prog_compiler_wl='-Qoption ld '
9140 ;;
9141 *Sun\ C*)
9142 # Sun C 5.9
9143 lt_prog_compiler_pic='-KPIC'
9144 lt_prog_compiler_static='-Bstatic'
9145 lt_prog_compiler_wl='-Wl,'
9146 ;;
9147 *Intel*\ [CF]*Compiler*)
9148 lt_prog_compiler_wl='-Wl,'
9149 lt_prog_compiler_pic='-fPIC'
9150 lt_prog_compiler_static='-static'
9151 ;;
9152 *Portland\ Group*)
9153 lt_prog_compiler_wl='-Wl,'
9154 lt_prog_compiler_pic='-fpic'
9155 lt_prog_compiler_static='-Bstatic'
9156 ;;
9157 esac
9158 ;;
9159 esac
9160 ;;
9161
9162 newsos6)
9163 lt_prog_compiler_pic='-KPIC'
9164 lt_prog_compiler_static='-Bstatic'
9165 ;;
9166
9167 *nto* | *qnx*)
9168 # QNX uses GNU C++, but need to define -shared option too, otherwise
9169 # it will coredump.
9170 lt_prog_compiler_pic='-fPIC -shared'
9171 ;;
9172
9173 osf3* | osf4* | osf5*)
9174 lt_prog_compiler_wl='-Wl,'
9175 # All OSF/1 code is PIC.
9176 lt_prog_compiler_static='-non_shared'
9177 ;;
9178
9179 rdos*)
9180 lt_prog_compiler_static='-non_shared'
9181 ;;
9182
9183 solaris*)
9184 lt_prog_compiler_pic='-KPIC'
9185 lt_prog_compiler_static='-Bstatic'
9186 case $cc_basename in
9187 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
9188 lt_prog_compiler_wl='-Qoption ld ';;
9189 *)
9190 lt_prog_compiler_wl='-Wl,';;
9191 esac
9192 ;;
9193
9194 sunos4*)
9195 lt_prog_compiler_wl='-Qoption ld '
9196 lt_prog_compiler_pic='-PIC'
9197 lt_prog_compiler_static='-Bstatic'
9198 ;;
9199
9200 sysv4 | sysv4.2uw2* | sysv4.3*)
9201 lt_prog_compiler_wl='-Wl,'
9202 lt_prog_compiler_pic='-KPIC'
9203 lt_prog_compiler_static='-Bstatic'
9204 ;;
9205
9206 sysv4*MP*)
9207 if test -d /usr/nec ;then
9208 lt_prog_compiler_pic='-Kconform_pic'
9209 lt_prog_compiler_static='-Bstatic'
9210 fi
9211 ;;
9212
9213 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
9214 lt_prog_compiler_wl='-Wl,'
9215 lt_prog_compiler_pic='-KPIC'
9216 lt_prog_compiler_static='-Bstatic'
9217 ;;
9218
9219 unicos*)
9220 lt_prog_compiler_wl='-Wl,'
9221 lt_prog_compiler_can_build_shared=no
9222 ;;
9223
9224 uts4*)
9225 lt_prog_compiler_pic='-pic'
9226 lt_prog_compiler_static='-Bstatic'
9227 ;;
9228
9229 *)
9230 lt_prog_compiler_can_build_shared=no
9231 ;;
9232 esac
9233 fi
9234
9235 case $host_os in
9236 # For platforms which do not support PIC, -DPIC is meaningless:
9237 *djgpp*)
9238 lt_prog_compiler_pic=
9239 ;;
9240 *)
9241 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
9242 ;;
9243 esac
9244
9245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
9246 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
9247 if ${lt_cv_prog_compiler_pic+:} false; then :
9248 $as_echo_n "(cached) " >&6
9249 else
9250 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
9251 fi
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
9253 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
9254 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
9255
9256 #
9257 # Check to make sure the PIC flag actually works.
9258 #
9259 if test -n "$lt_prog_compiler_pic"; then
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
9261 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
9262 if ${lt_cv_prog_compiler_pic_works+:} false; then :
9263 $as_echo_n "(cached) " >&6
9264 else
9265 lt_cv_prog_compiler_pic_works=no
9266 ac_outfile=conftest.$ac_objext
9267 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9268 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
9269 # Insert the option either (1) after the last *FLAGS variable, or
9270 # (2) before a word containing "conftest.", or (3) at the end.
9271 # Note that $ac_compile itself does not contain backslashes and begins
9272 # with a dollar sign (not a hyphen), so the echo should work correctly.
9273 # The option is referenced via a variable to avoid confusing sed.
9274 lt_compile=`echo "$ac_compile" | $SED \
9275 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9276 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9277 -e 's:$: $lt_compiler_flag:'`
9278 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9279 (eval "$lt_compile" 2>conftest.err)
9280 ac_status=$?
9281 cat conftest.err >&5
9282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9283 if (exit $ac_status) && test -s "$ac_outfile"; then
9284 # The compiler can only warn and ignore the option if not recognized
9285 # So say no if there are warnings other than the usual output.
9286 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9287 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9288 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9289 lt_cv_prog_compiler_pic_works=yes
9290 fi
9291 fi
9292 $RM conftest*
9293
9294 fi
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
9296 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
9297
9298 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
9299 case $lt_prog_compiler_pic in
9300 "" | " "*) ;;
9301 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
9302 esac
9303 else
9304 lt_prog_compiler_pic=
9305 lt_prog_compiler_can_build_shared=no
9306 fi
9307
9308 fi
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320 #
9321 # Check to make sure the static flag actually works.
9322 #
9323 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
9325 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
9326 if ${lt_cv_prog_compiler_static_works+:} false; then :
9327 $as_echo_n "(cached) " >&6
9328 else
9329 lt_cv_prog_compiler_static_works=no
9330 save_LDFLAGS="$LDFLAGS"
9331 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
9332 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9333 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9334 # The linker can only warn and ignore the option if not recognized
9335 # So say no if there are warnings
9336 if test -s conftest.err; then
9337 # Append any errors to the config.log.
9338 cat conftest.err 1>&5
9339 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9340 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9341 if diff conftest.exp conftest.er2 >/dev/null; then
9342 lt_cv_prog_compiler_static_works=yes
9343 fi
9344 else
9345 lt_cv_prog_compiler_static_works=yes
9346 fi
9347 fi
9348 $RM -r conftest*
9349 LDFLAGS="$save_LDFLAGS"
9350
9351 fi
9352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
9353 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
9354
9355 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
9356 :
9357 else
9358 lt_prog_compiler_static=
9359 fi
9360
9361
9362
9363
9364
9365
9366
9367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9368 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9369 if ${lt_cv_prog_compiler_c_o+:} false; then :
9370 $as_echo_n "(cached) " >&6
9371 else
9372 lt_cv_prog_compiler_c_o=no
9373 $RM -r conftest 2>/dev/null
9374 mkdir conftest
9375 cd conftest
9376 mkdir out
9377 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9378
9379 lt_compiler_flag="-o out/conftest2.$ac_objext"
9380 # Insert the option either (1) after the last *FLAGS variable, or
9381 # (2) before a word containing "conftest.", or (3) at the end.
9382 # Note that $ac_compile itself does not contain backslashes and begins
9383 # with a dollar sign (not a hyphen), so the echo should work correctly.
9384 lt_compile=`echo "$ac_compile" | $SED \
9385 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9386 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9387 -e 's:$: $lt_compiler_flag:'`
9388 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9389 (eval "$lt_compile" 2>out/conftest.err)
9390 ac_status=$?
9391 cat out/conftest.err >&5
9392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9394 then
9395 # The compiler can only warn and ignore the option if not recognized
9396 # So say no if there are warnings
9397 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9398 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9399 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9400 lt_cv_prog_compiler_c_o=yes
9401 fi
9402 fi
9403 chmod u+w . 2>&5
9404 $RM conftest*
9405 # SGI C++ compiler will create directory out/ii_files/ for
9406 # template instantiation
9407 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9408 $RM out/* && rmdir out
9409 cd ..
9410 $RM -r conftest
9411 $RM conftest*
9412
9413 fi
9414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9415 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9416
9417
9418
9419
9420
9421
9422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9423 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9424 if ${lt_cv_prog_compiler_c_o+:} false; then :
9425 $as_echo_n "(cached) " >&6
9426 else
9427 lt_cv_prog_compiler_c_o=no
9428 $RM -r conftest 2>/dev/null
9429 mkdir conftest
9430 cd conftest
9431 mkdir out
9432 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9433
9434 lt_compiler_flag="-o out/conftest2.$ac_objext"
9435 # Insert the option either (1) after the last *FLAGS variable, or
9436 # (2) before a word containing "conftest.", or (3) at the end.
9437 # Note that $ac_compile itself does not contain backslashes and begins
9438 # with a dollar sign (not a hyphen), so the echo should work correctly.
9439 lt_compile=`echo "$ac_compile" | $SED \
9440 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9441 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9442 -e 's:$: $lt_compiler_flag:'`
9443 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9444 (eval "$lt_compile" 2>out/conftest.err)
9445 ac_status=$?
9446 cat out/conftest.err >&5
9447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9448 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9449 then
9450 # The compiler can only warn and ignore the option if not recognized
9451 # So say no if there are warnings
9452 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9453 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9454 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9455 lt_cv_prog_compiler_c_o=yes
9456 fi
9457 fi
9458 chmod u+w . 2>&5
9459 $RM conftest*
9460 # SGI C++ compiler will create directory out/ii_files/ for
9461 # template instantiation
9462 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9463 $RM out/* && rmdir out
9464 cd ..
9465 $RM -r conftest
9466 $RM conftest*
9467
9468 fi
9469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9470 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9471
9472
9473
9474
9475 hard_links="nottested"
9476 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9477 # do not overwrite the value of need_locks provided by the user
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9479 $as_echo_n "checking if we can lock with hard links... " >&6; }
9480 hard_links=yes
9481 $RM conftest*
9482 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9483 touch conftest.a
9484 ln conftest.a conftest.b 2>&5 || hard_links=no
9485 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9487 $as_echo "$hard_links" >&6; }
9488 if test "$hard_links" = no; then
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9490 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9491 need_locks=warn
9492 fi
9493 else
9494 need_locks=no
9495 fi
9496
9497
9498
9499
9500
9501
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9503 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9504
9505 runpath_var=
9506 allow_undefined_flag=
9507 always_export_symbols=no
9508 archive_cmds=
9509 archive_expsym_cmds=
9510 compiler_needs_object=no
9511 enable_shared_with_static_runtimes=no
9512 export_dynamic_flag_spec=
9513 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9514 hardcode_automatic=no
9515 hardcode_direct=no
9516 hardcode_direct_absolute=no
9517 hardcode_libdir_flag_spec=
9518 hardcode_libdir_separator=
9519 hardcode_minus_L=no
9520 hardcode_shlibpath_var=unsupported
9521 inherit_rpath=no
9522 link_all_deplibs=unknown
9523 module_cmds=
9524 module_expsym_cmds=
9525 old_archive_from_new_cmds=
9526 old_archive_from_expsyms_cmds=
9527 thread_safe_flag_spec=
9528 whole_archive_flag_spec=
9529 # include_expsyms should be a list of space-separated symbols to be *always*
9530 # included in the symbol list
9531 include_expsyms=
9532 # exclude_expsyms can be an extended regexp of symbols to exclude
9533 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9534 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9535 # as well as any symbol that contains `d'.
9536 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
9537 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9538 # platforms (ab)use it in PIC code, but their linkers get confused if
9539 # the symbol is explicitly referenced. Since portable code cannot
9540 # rely on this symbol name, it's probably fine to never include it in
9541 # preloaded symbol tables.
9542 # Exclude shared library initialization/finalization symbols.
9543 extract_expsyms_cmds=
9544
9545 case $host_os in
9546 cygwin* | mingw* | pw32* | cegcc*)
9547 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9548 # When not using gcc, we currently assume that we are using
9549 # Microsoft Visual C++.
9550 if test "$GCC" != yes; then
9551 with_gnu_ld=no
9552 fi
9553 ;;
9554 interix*)
9555 # we just hope/assume this is gcc and not c89 (= MSVC++)
9556 with_gnu_ld=yes
9557 ;;
9558 openbsd*)
9559 with_gnu_ld=no
9560 ;;
9561 linux* | k*bsd*-gnu | gnu*)
9562 link_all_deplibs=no
9563 ;;
9564 esac
9565
9566 ld_shlibs=yes
9567
9568 # On some targets, GNU ld is compatible enough with the native linker
9569 # that we're better off using the native interface for both.
9570 lt_use_gnu_ld_interface=no
9571 if test "$with_gnu_ld" = yes; then
9572 case $host_os in
9573 aix*)
9574 # The AIX port of GNU ld has always aspired to compatibility
9575 # with the native linker. However, as the warning in the GNU ld
9576 # block says, versions before 2.19.5* couldn't really create working
9577 # shared libraries, regardless of the interface used.
9578 case `$LD -v 2>&1` in
9579 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
9580 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
9581 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
9582 *)
9583 lt_use_gnu_ld_interface=yes
9584 ;;
9585 esac
9586 ;;
9587 *)
9588 lt_use_gnu_ld_interface=yes
9589 ;;
9590 esac
9591 fi
9592
9593 if test "$lt_use_gnu_ld_interface" = yes; then
9594 # If archive_cmds runs LD, not CC, wlarc should be empty
9595 wlarc='${wl}'
9596
9597 # Set some defaults for GNU ld with shared library support. These
9598 # are reset later if shared libraries are not supported. Putting them
9599 # here allows them to be overridden if necessary.
9600 runpath_var=LD_RUN_PATH
9601 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9602 export_dynamic_flag_spec='${wl}--export-dynamic'
9603 # ancient GNU ld didn't support --whole-archive et. al.
9604 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9605 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9606 else
9607 whole_archive_flag_spec=
9608 fi
9609 supports_anon_versioning=no
9610 case `$LD -v 2>&1` in
9611 *GNU\ gold*) supports_anon_versioning=yes ;;
9612 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9613 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9614 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9615 *\ 2.11.*) ;; # other 2.11 versions
9616 *) supports_anon_versioning=yes ;;
9617 esac
9618
9619 # See if GNU ld supports shared libraries.
9620 case $host_os in
9621 aix[3-9]*)
9622 # On AIX/PPC, the GNU linker is very broken
9623 if test "$host_cpu" != ia64; then
9624 ld_shlibs=no
9625 cat <<_LT_EOF 1>&2
9626
9627 *** Warning: the GNU linker, at least up to release 2.19, is reported
9628 *** to be unable to reliably create shared libraries on AIX.
9629 *** Therefore, libtool is disabling shared libraries support. If you
9630 *** really care for shared libraries, you may want to install binutils
9631 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
9632 *** You will then need to restart the configuration process.
9633
9634 _LT_EOF
9635 fi
9636 ;;
9637
9638 amigaos*)
9639 case $host_cpu in
9640 powerpc)
9641 # see comment about AmigaOS4 .so support
9642 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9643 archive_expsym_cmds=''
9644 ;;
9645 m68k)
9646 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)'
9647 hardcode_libdir_flag_spec='-L$libdir'
9648 hardcode_minus_L=yes
9649 ;;
9650 esac
9651 ;;
9652
9653 beos*)
9654 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9655 allow_undefined_flag=unsupported
9656 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9657 # support --undefined. This deserves some investigation. FIXME
9658 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9659 else
9660 ld_shlibs=no
9661 fi
9662 ;;
9663
9664 cygwin* | mingw* | pw32* | cegcc*)
9665 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9666 # as there is no search path for DLLs.
9667 hardcode_libdir_flag_spec='-L$libdir'
9668 export_dynamic_flag_spec='${wl}--export-all-symbols'
9669 allow_undefined_flag=unsupported
9670 always_export_symbols=no
9671 enable_shared_with_static_runtimes=yes
9672 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
9673 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
9674
9675 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9676 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9677 # If the export-symbols file already is a .def file (1st line
9678 # is EXPORTS), use it as is; otherwise, prepend...
9679 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9680 cp $export_symbols $output_objdir/$soname.def;
9681 else
9682 echo EXPORTS > $output_objdir/$soname.def;
9683 cat $export_symbols >> $output_objdir/$soname.def;
9684 fi~
9685 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9686 else
9687 ld_shlibs=no
9688 fi
9689 ;;
9690
9691 haiku*)
9692 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9693 link_all_deplibs=yes
9694 ;;
9695
9696 interix[3-9]*)
9697 hardcode_direct=no
9698 hardcode_shlibpath_var=no
9699 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9700 export_dynamic_flag_spec='${wl}-E'
9701 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9702 # Instead, shared libraries are loaded at an image base (0x10000000 by
9703 # default) and relocated if they conflict, which is a slow very memory
9704 # consuming and fragmenting process. To avoid this, we pick a random,
9705 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9706 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
9707 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9708 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9709 ;;
9710
9711 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
9712 tmp_diet=no
9713 if test "$host_os" = linux-dietlibc; then
9714 case $cc_basename in
9715 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
9716 esac
9717 fi
9718 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9719 && test "$tmp_diet" = no
9720 then
9721 tmp_addflag=' $pic_flag'
9722 tmp_sharedflag='-shared'
9723 case $cc_basename,$host_cpu in
9724 pgcc*) # Portland Group C compiler
9725 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9726 tmp_addflag=' $pic_flag'
9727 ;;
9728 pgf77* | pgf90* | pgf95* | pgfortran*)
9729 # Portland Group f77 and f90 compilers
9730 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9731 tmp_addflag=' $pic_flag -Mnomain' ;;
9732 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
9733 tmp_addflag=' -i_dynamic' ;;
9734 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
9735 tmp_addflag=' -i_dynamic -nofor_main' ;;
9736 ifc* | ifort*) # Intel Fortran compiler
9737 tmp_addflag=' -nofor_main' ;;
9738 lf95*) # Lahey Fortran 8.1
9739 whole_archive_flag_spec=
9740 tmp_sharedflag='--shared' ;;
9741 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9742 tmp_sharedflag='-qmkshrobj'
9743 tmp_addflag= ;;
9744 nvcc*) # Cuda Compiler Driver 2.2
9745 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9746 compiler_needs_object=yes
9747 ;;
9748 esac
9749 case `$CC -V 2>&1 | sed 5q` in
9750 *Sun\ C*) # Sun C 5.9
9751 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9752 compiler_needs_object=yes
9753 tmp_sharedflag='-G' ;;
9754 *Sun\ F*) # Sun Fortran 8.3
9755 tmp_sharedflag='-G' ;;
9756 esac
9757 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9758
9759 if test "x$supports_anon_versioning" = xyes; then
9760 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9761 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9762 echo "local: *; };" >> $output_objdir/$libname.ver~
9763 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9764 fi
9765
9766 case $cc_basename in
9767 xlf* | bgf* | bgxlf* | mpixlf*)
9768 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
9769 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
9770 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9771 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
9772 if test "x$supports_anon_versioning" = xyes; then
9773 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
9774 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9775 echo "local: *; };" >> $output_objdir/$libname.ver~
9776 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
9777 fi
9778 ;;
9779 esac
9780 else
9781 ld_shlibs=no
9782 fi
9783 ;;
9784
9785 netbsd* | netbsdelf*-gnu)
9786 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9787 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9788 wlarc=
9789 else
9790 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9791 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9792 fi
9793 ;;
9794
9795 solaris*)
9796 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
9797 ld_shlibs=no
9798 cat <<_LT_EOF 1>&2
9799
9800 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9801 *** create shared libraries on Solaris systems. Therefore, libtool
9802 *** is disabling shared libraries support. We urge you to upgrade GNU
9803 *** binutils to release 2.9.1 or newer. Another option is to modify
9804 *** your PATH or compiler configuration so that the native linker is
9805 *** used, and then restart.
9806
9807 _LT_EOF
9808 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9809 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9810 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9811 else
9812 ld_shlibs=no
9813 fi
9814 ;;
9815
9816 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
9817 case `$LD -v 2>&1` in
9818 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
9819 ld_shlibs=no
9820 cat <<_LT_EOF 1>&2
9821
9822 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
9823 *** reliably create shared libraries on SCO systems. Therefore, libtool
9824 *** is disabling shared libraries support. We urge you to upgrade GNU
9825 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
9826 *** your PATH or compiler configuration so that the native linker is
9827 *** used, and then restart.
9828
9829 _LT_EOF
9830 ;;
9831 *)
9832 # For security reasons, it is highly recommended that you always
9833 # use absolute paths for naming shared libraries, and exclude the
9834 # DT_RUNPATH tag from executables and libraries. But doing so
9835 # requires that you compile everything twice, which is a pain.
9836 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9837 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9838 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9839 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9840 else
9841 ld_shlibs=no
9842 fi
9843 ;;
9844 esac
9845 ;;
9846
9847 sunos4*)
9848 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9849 wlarc=
9850 hardcode_direct=yes
9851 hardcode_shlibpath_var=no
9852 ;;
9853
9854 *)
9855 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9856 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9857 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9858 else
9859 ld_shlibs=no
9860 fi
9861 ;;
9862 esac
9863
9864 if test "$ld_shlibs" = no; then
9865 runpath_var=
9866 hardcode_libdir_flag_spec=
9867 export_dynamic_flag_spec=
9868 whole_archive_flag_spec=
9869 fi
9870 else
9871 # PORTME fill in a description of your system's linker (not GNU ld)
9872 case $host_os in
9873 aix3*)
9874 allow_undefined_flag=unsupported
9875 always_export_symbols=yes
9876 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'
9877 # Note: this linker hardcodes the directories in LIBPATH if there
9878 # are no directories specified by -L.
9879 hardcode_minus_L=yes
9880 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
9881 # Neither direct hardcoding nor static linking is supported with a
9882 # broken collect2.
9883 hardcode_direct=unsupported
9884 fi
9885 ;;
9886
9887 aix[4-9]*)
9888 if test "$host_cpu" = ia64; then
9889 # On IA64, the linker does run time linking by default, so we don't
9890 # have to do anything special.
9891 aix_use_runtimelinking=no
9892 exp_sym_flag='-Bexport'
9893 no_entry_flag=""
9894 else
9895 # If we're using GNU nm, then we don't want the "-C" option.
9896 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9897 # Also, AIX nm treats weak defined symbols like other global
9898 # defined symbols, whereas GNU nm marks them as "W".
9899 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9900 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
9901 else
9902 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'
9903 fi
9904 aix_use_runtimelinking=no
9905
9906 # Test if we are trying to use run time linking or normal
9907 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9908 # need to do runtime linking.
9909 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
9910 for ld_flag in $LDFLAGS; do
9911 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9912 aix_use_runtimelinking=yes
9913 break
9914 fi
9915 done
9916 ;;
9917 esac
9918
9919 exp_sym_flag='-bexport'
9920 no_entry_flag='-bnoentry'
9921 fi
9922
9923 # When large executables or shared objects are built, AIX ld can
9924 # have problems creating the table of contents. If linking a library
9925 # or program results in "error TOC overflow" add -mminimal-toc to
9926 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
9927 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9928
9929 archive_cmds=''
9930 hardcode_direct=yes
9931 hardcode_direct_absolute=yes
9932 hardcode_libdir_separator=':'
9933 link_all_deplibs=yes
9934 file_list_spec='${wl}-f,'
9935
9936 if test "$GCC" = yes; then
9937 case $host_os in aix4.[012]|aix4.[012].*)
9938 # We only want to do this on AIX 4.2 and lower, the check
9939 # below for broken collect2 doesn't work under 4.3+
9940 collect2name=`${CC} -print-prog-name=collect2`
9941 if test -f "$collect2name" &&
9942 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9943 then
9944 # We have reworked collect2
9945 :
9946 else
9947 # We have old collect2
9948 hardcode_direct=unsupported
9949 # It fails to find uninstalled libraries when the uninstalled
9950 # path is not listed in the libpath. Setting hardcode_minus_L
9951 # to unsupported forces relinking
9952 hardcode_minus_L=yes
9953 hardcode_libdir_flag_spec='-L$libdir'
9954 hardcode_libdir_separator=
9955 fi
9956 ;;
9957 esac
9958 shared_flag='-shared'
9959 if test "$aix_use_runtimelinking" = yes; then
9960 shared_flag="$shared_flag "'${wl}-G'
9961 fi
9962 link_all_deplibs=no
9963 else
9964 # not using gcc
9965 if test "$host_cpu" = ia64; then
9966 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9967 # chokes on -Wl,-G. The following line is correct:
9968 shared_flag='-G'
9969 else
9970 if test "$aix_use_runtimelinking" = yes; then
9971 shared_flag='${wl}-G'
9972 else
9973 shared_flag='${wl}-bM:SRE'
9974 fi
9975 fi
9976 fi
9977
9978 export_dynamic_flag_spec='${wl}-bexpall'
9979 # It seems that -bexpall does not export symbols beginning with
9980 # underscore (_), so it is better to generate a list of symbols to export.
9981 always_export_symbols=yes
9982 if test "$aix_use_runtimelinking" = yes; then
9983 # Warning - without using the other runtime loading flags (-brtl),
9984 # -berok will link without error, but may produce a broken library.
9985 allow_undefined_flag='-berok'
9986 # Determine the default libpath from the value encoded in an
9987 # empty executable.
9988 if test "${lt_cv_aix_libpath+set}" = set; then
9989 aix_libpath=$lt_cv_aix_libpath
9990 else
9991 if ${lt_cv_aix_libpath_+:} false; then :
9992 $as_echo_n "(cached) " >&6
9993 else
9994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9995 /* end confdefs.h. */
9996
9997 int
9998 main ()
9999 {
10000
10001 ;
10002 return 0;
10003 }
10004 _ACEOF
10005 if ac_fn_c_try_link "$LINENO"; then :
10006
10007 lt_aix_libpath_sed='
10008 /Import File Strings/,/^$/ {
10009 /^0/ {
10010 s/^0 *\([^ ]*\) *$/\1/
10011 p
10012 }
10013 }'
10014 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10015 # Check for a 64-bit object if we didn't find anything.
10016 if test -z "$lt_cv_aix_libpath_"; then
10017 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10018 fi
10019 fi
10020 rm -f core conftest.err conftest.$ac_objext \
10021 conftest$ac_exeext conftest.$ac_ext
10022 if test -z "$lt_cv_aix_libpath_"; then
10023 lt_cv_aix_libpath_="/usr/lib:/lib"
10024 fi
10025
10026 fi
10027
10028 aix_libpath=$lt_cv_aix_libpath_
10029 fi
10030
10031 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10032 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10033 else
10034 if test "$host_cpu" = ia64; then
10035 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
10036 allow_undefined_flag="-z nodefs"
10037 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
10038 else
10039 # Determine the default libpath from the value encoded in an
10040 # empty executable.
10041 if test "${lt_cv_aix_libpath+set}" = set; then
10042 aix_libpath=$lt_cv_aix_libpath
10043 else
10044 if ${lt_cv_aix_libpath_+:} false; then :
10045 $as_echo_n "(cached) " >&6
10046 else
10047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10048 /* end confdefs.h. */
10049
10050 int
10051 main ()
10052 {
10053
10054 ;
10055 return 0;
10056 }
10057 _ACEOF
10058 if ac_fn_c_try_link "$LINENO"; then :
10059
10060 lt_aix_libpath_sed='
10061 /Import File Strings/,/^$/ {
10062 /^0/ {
10063 s/^0 *\([^ ]*\) *$/\1/
10064 p
10065 }
10066 }'
10067 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10068 # Check for a 64-bit object if we didn't find anything.
10069 if test -z "$lt_cv_aix_libpath_"; then
10070 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10071 fi
10072 fi
10073 rm -f core conftest.err conftest.$ac_objext \
10074 conftest$ac_exeext conftest.$ac_ext
10075 if test -z "$lt_cv_aix_libpath_"; then
10076 lt_cv_aix_libpath_="/usr/lib:/lib"
10077 fi
10078
10079 fi
10080
10081 aix_libpath=$lt_cv_aix_libpath_
10082 fi
10083
10084 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10085 # Warning - without using the other run time loading flags,
10086 # -berok will link without error, but may produce a broken library.
10087 no_undefined_flag=' ${wl}-bernotok'
10088 allow_undefined_flag=' ${wl}-berok'
10089 if test "$with_gnu_ld" = yes; then
10090 # We only use this code for GNU lds that support --whole-archive.
10091 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
10092 else
10093 # Exported symbols can be pulled into shared objects from archives
10094 whole_archive_flag_spec='$convenience'
10095 fi
10096 archive_cmds_need_lc=yes
10097 # This is similar to how AIX traditionally builds its shared libraries.
10098 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10099 fi
10100 fi
10101 ;;
10102
10103 amigaos*)
10104 case $host_cpu in
10105 powerpc)
10106 # see comment about AmigaOS4 .so support
10107 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10108 archive_expsym_cmds=''
10109 ;;
10110 m68k)
10111 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)'
10112 hardcode_libdir_flag_spec='-L$libdir'
10113 hardcode_minus_L=yes
10114 ;;
10115 esac
10116 ;;
10117
10118 bsdi[45]*)
10119 export_dynamic_flag_spec=-rdynamic
10120 ;;
10121
10122 cygwin* | mingw* | pw32* | cegcc*)
10123 # When not using gcc, we currently assume that we are using
10124 # Microsoft Visual C++.
10125 # hardcode_libdir_flag_spec is actually meaningless, as there is
10126 # no search path for DLLs.
10127 case $cc_basename in
10128 cl*)
10129 # Native MSVC
10130 hardcode_libdir_flag_spec=' '
10131 allow_undefined_flag=unsupported
10132 always_export_symbols=yes
10133 file_list_spec='@'
10134 # Tell ltmain to make .lib files, not .a files.
10135 libext=lib
10136 # Tell ltmain to make .dll files, not .so files.
10137 shrext_cmds=".dll"
10138 # FIXME: Setting linknames here is a bad hack.
10139 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
10140 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10141 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
10142 else
10143 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
10144 fi~
10145 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10146 linknames='
10147 # The linker will not automatically build a static lib if we build a DLL.
10148 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
10149 enable_shared_with_static_runtimes=yes
10150 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
10151 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
10152 # Don't use ranlib
10153 old_postinstall_cmds='chmod 644 $oldlib'
10154 postlink_cmds='lt_outputfile="@OUTPUT@"~
10155 lt_tool_outputfile="@TOOL_OUTPUT@"~
10156 case $lt_outputfile in
10157 *.exe|*.EXE) ;;
10158 *)
10159 lt_outputfile="$lt_outputfile.exe"
10160 lt_tool_outputfile="$lt_tool_outputfile.exe"
10161 ;;
10162 esac~
10163 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
10164 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10165 $RM "$lt_outputfile.manifest";
10166 fi'
10167 ;;
10168 *)
10169 # Assume MSVC wrapper
10170 hardcode_libdir_flag_spec=' '
10171 allow_undefined_flag=unsupported
10172 # Tell ltmain to make .lib files, not .a files.
10173 libext=lib
10174 # Tell ltmain to make .dll files, not .so files.
10175 shrext_cmds=".dll"
10176 # FIXME: Setting linknames here is a bad hack.
10177 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
10178 # The linker will automatically build a .lib file if we build a DLL.
10179 old_archive_from_new_cmds='true'
10180 # FIXME: Should let the user specify the lib program.
10181 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
10182 enable_shared_with_static_runtimes=yes
10183 ;;
10184 esac
10185 ;;
10186
10187 darwin* | rhapsody*)
10188
10189
10190 archive_cmds_need_lc=no
10191 hardcode_direct=no
10192 hardcode_automatic=yes
10193 hardcode_shlibpath_var=unsupported
10194 if test "$lt_cv_ld_force_load" = "yes"; then
10195 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
10196
10197 else
10198 whole_archive_flag_spec=''
10199 fi
10200 link_all_deplibs=yes
10201 allow_undefined_flag="$_lt_dar_allow_undefined"
10202 case $cc_basename in
10203 ifort*) _lt_dar_can_shared=yes ;;
10204 *) _lt_dar_can_shared=$GCC ;;
10205 esac
10206 if test "$_lt_dar_can_shared" = "yes"; then
10207 output_verbose_link_cmd=func_echo_all
10208 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
10209 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
10210 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
10211 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
10212
10213 else
10214 ld_shlibs=no
10215 fi
10216
10217 ;;
10218
10219 dgux*)
10220 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10221 hardcode_libdir_flag_spec='-L$libdir'
10222 hardcode_shlibpath_var=no
10223 ;;
10224
10225 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10226 # support. Future versions do this automatically, but an explicit c++rt0.o
10227 # does not break anything, and helps significantly (at the cost of a little
10228 # extra space).
10229 freebsd2.2*)
10230 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10231 hardcode_libdir_flag_spec='-R$libdir'
10232 hardcode_direct=yes
10233 hardcode_shlibpath_var=no
10234 ;;
10235
10236 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10237 freebsd2.*)
10238 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10239 hardcode_direct=yes
10240 hardcode_minus_L=yes
10241 hardcode_shlibpath_var=no
10242 ;;
10243
10244 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10245 freebsd* | dragonfly*)
10246 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10247 hardcode_libdir_flag_spec='-R$libdir'
10248 hardcode_direct=yes
10249 hardcode_shlibpath_var=no
10250 ;;
10251
10252 hpux9*)
10253 if test "$GCC" = yes; then
10254 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10255 else
10256 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'
10257 fi
10258 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10259 hardcode_libdir_separator=:
10260 hardcode_direct=yes
10261
10262 # hardcode_minus_L: Not really in the search PATH,
10263 # but as the default location of the library.
10264 hardcode_minus_L=yes
10265 export_dynamic_flag_spec='${wl}-E'
10266 ;;
10267
10268 hpux10*)
10269 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10270 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10271 else
10272 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10273 fi
10274 if test "$with_gnu_ld" = no; then
10275 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10276 hardcode_libdir_separator=:
10277 hardcode_direct=yes
10278 hardcode_direct_absolute=yes
10279 export_dynamic_flag_spec='${wl}-E'
10280 # hardcode_minus_L: Not really in the search PATH,
10281 # but as the default location of the library.
10282 hardcode_minus_L=yes
10283 fi
10284 ;;
10285
10286 hpux11*)
10287 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10288 case $host_cpu in
10289 hppa*64*)
10290 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10291 ;;
10292 ia64*)
10293 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10294 ;;
10295 *)
10296 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10297 ;;
10298 esac
10299 else
10300 case $host_cpu in
10301 hppa*64*)
10302 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10303 ;;
10304 ia64*)
10305 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10306 ;;
10307 *)
10308
10309 # Older versions of the 11.00 compiler do not understand -b yet
10310 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
10312 $as_echo_n "checking if $CC understands -b... " >&6; }
10313 if ${lt_cv_prog_compiler__b+:} false; then :
10314 $as_echo_n "(cached) " >&6
10315 else
10316 lt_cv_prog_compiler__b=no
10317 save_LDFLAGS="$LDFLAGS"
10318 LDFLAGS="$LDFLAGS -b"
10319 echo "$lt_simple_link_test_code" > conftest.$ac_ext
10320 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10321 # The linker can only warn and ignore the option if not recognized
10322 # So say no if there are warnings
10323 if test -s conftest.err; then
10324 # Append any errors to the config.log.
10325 cat conftest.err 1>&5
10326 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10327 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10328 if diff conftest.exp conftest.er2 >/dev/null; then
10329 lt_cv_prog_compiler__b=yes
10330 fi
10331 else
10332 lt_cv_prog_compiler__b=yes
10333 fi
10334 fi
10335 $RM -r conftest*
10336 LDFLAGS="$save_LDFLAGS"
10337
10338 fi
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
10340 $as_echo "$lt_cv_prog_compiler__b" >&6; }
10341
10342 if test x"$lt_cv_prog_compiler__b" = xyes; then
10343 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10344 else
10345 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10346 fi
10347
10348 ;;
10349 esac
10350 fi
10351 if test "$with_gnu_ld" = no; then
10352 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10353 hardcode_libdir_separator=:
10354
10355 case $host_cpu in
10356 hppa*64*|ia64*)
10357 hardcode_direct=no
10358 hardcode_shlibpath_var=no
10359 ;;
10360 *)
10361 hardcode_direct=yes
10362 hardcode_direct_absolute=yes
10363 export_dynamic_flag_spec='${wl}-E'
10364
10365 # hardcode_minus_L: Not really in the search PATH,
10366 # but as the default location of the library.
10367 hardcode_minus_L=yes
10368 ;;
10369 esac
10370 fi
10371 ;;
10372
10373 irix5* | irix6* | nonstopux*)
10374 if test "$GCC" = yes; then
10375 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10376 # Try to use the -exported_symbol ld option, if it does not
10377 # work, assume that -exports_file does not work either and
10378 # implicitly export all symbols.
10379 # This should be the same for all languages, so no per-tag cache variable.
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
10381 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
10382 if ${lt_cv_irix_exported_symbol+:} false; then :
10383 $as_echo_n "(cached) " >&6
10384 else
10385 save_LDFLAGS="$LDFLAGS"
10386 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10388 /* end confdefs.h. */
10389 int foo (void) { return 0; }
10390 _ACEOF
10391 if ac_fn_c_try_link "$LINENO"; then :
10392 lt_cv_irix_exported_symbol=yes
10393 else
10394 lt_cv_irix_exported_symbol=no
10395 fi
10396 rm -f core conftest.err conftest.$ac_objext \
10397 conftest$ac_exeext conftest.$ac_ext
10398 LDFLAGS="$save_LDFLAGS"
10399 fi
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
10401 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
10402 if test "$lt_cv_irix_exported_symbol" = yes; then
10403 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
10404 fi
10405 else
10406 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10407 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
10408 fi
10409 archive_cmds_need_lc='no'
10410 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10411 hardcode_libdir_separator=:
10412 inherit_rpath=yes
10413 link_all_deplibs=yes
10414 ;;
10415
10416 netbsd* | netbsdelf*-gnu)
10417 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10418 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10419 else
10420 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10421 fi
10422 hardcode_libdir_flag_spec='-R$libdir'
10423 hardcode_direct=yes
10424 hardcode_shlibpath_var=no
10425 ;;
10426
10427 newsos6)
10428 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10429 hardcode_direct=yes
10430 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10431 hardcode_libdir_separator=:
10432 hardcode_shlibpath_var=no
10433 ;;
10434
10435 *nto* | *qnx*)
10436 ;;
10437
10438 openbsd*)
10439 if test -f /usr/libexec/ld.so; then
10440 hardcode_direct=yes
10441 hardcode_shlibpath_var=no
10442 hardcode_direct_absolute=yes
10443 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10444 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10445 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
10446 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10447 export_dynamic_flag_spec='${wl}-E'
10448 else
10449 case $host_os in
10450 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
10451 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10452 hardcode_libdir_flag_spec='-R$libdir'
10453 ;;
10454 *)
10455 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10456 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10457 ;;
10458 esac
10459 fi
10460 else
10461 ld_shlibs=no
10462 fi
10463 ;;
10464
10465 os2*)
10466 hardcode_libdir_flag_spec='-L$libdir'
10467 hardcode_minus_L=yes
10468 allow_undefined_flag=unsupported
10469 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'
10470 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10471 ;;
10472
10473 osf3*)
10474 if test "$GCC" = yes; then
10475 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10476 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10477 else
10478 allow_undefined_flag=' -expect_unresolved \*'
10479 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10480 fi
10481 archive_cmds_need_lc='no'
10482 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10483 hardcode_libdir_separator=:
10484 ;;
10485
10486 osf4* | osf5*) # as osf3* with the addition of -msym flag
10487 if test "$GCC" = yes; then
10488 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10489 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10490 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10491 else
10492 allow_undefined_flag=' -expect_unresolved \*'
10493 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
10494 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
10495 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
10496
10497 # Both c and cxx compiler support -rpath directly
10498 hardcode_libdir_flag_spec='-rpath $libdir'
10499 fi
10500 archive_cmds_need_lc='no'
10501 hardcode_libdir_separator=:
10502 ;;
10503
10504 solaris*)
10505 no_undefined_flag=' -z defs'
10506 if test "$GCC" = yes; then
10507 wlarc='${wl}'
10508 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10509 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10510 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10511 else
10512 case `$CC -V 2>&1` in
10513 *"Compilers 5.0"*)
10514 wlarc=''
10515 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10516 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10517 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
10518 ;;
10519 *)
10520 wlarc='${wl}'
10521 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
10522 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10523 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10524 ;;
10525 esac
10526 fi
10527 hardcode_libdir_flag_spec='-R$libdir'
10528 hardcode_shlibpath_var=no
10529 case $host_os in
10530 solaris2.[0-5] | solaris2.[0-5].*) ;;
10531 *)
10532 # The compiler driver will combine and reorder linker options,
10533 # but understands `-z linker_flag'. GCC discards it without `$wl',
10534 # but is careful enough not to reorder.
10535 # Supported since Solaris 2.6 (maybe 2.5.1?)
10536 if test "$GCC" = yes; then
10537 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
10538 else
10539 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
10540 fi
10541 ;;
10542 esac
10543 link_all_deplibs=yes
10544 ;;
10545
10546 sunos4*)
10547 if test "x$host_vendor" = xsequent; then
10548 # Use $CC to link under sequent, because it throws in some extra .o
10549 # files that make .init and .fini sections work.
10550 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10551 else
10552 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10553 fi
10554 hardcode_libdir_flag_spec='-L$libdir'
10555 hardcode_direct=yes
10556 hardcode_minus_L=yes
10557 hardcode_shlibpath_var=no
10558 ;;
10559
10560 sysv4)
10561 case $host_vendor in
10562 sni)
10563 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10564 hardcode_direct=yes # is this really true???
10565 ;;
10566 siemens)
10567 ## LD is ld it makes a PLAMLIB
10568 ## CC just makes a GrossModule.
10569 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10570 reload_cmds='$CC -r -o $output$reload_objs'
10571 hardcode_direct=no
10572 ;;
10573 motorola)
10574 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10575 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
10576 ;;
10577 esac
10578 runpath_var='LD_RUN_PATH'
10579 hardcode_shlibpath_var=no
10580 ;;
10581
10582 sysv4.3*)
10583 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10584 hardcode_shlibpath_var=no
10585 export_dynamic_flag_spec='-Bexport'
10586 ;;
10587
10588 sysv4*MP*)
10589 if test -d /usr/nec; then
10590 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10591 hardcode_shlibpath_var=no
10592 runpath_var=LD_RUN_PATH
10593 hardcode_runpath_var=yes
10594 ld_shlibs=yes
10595 fi
10596 ;;
10597
10598 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
10599 no_undefined_flag='${wl}-z,text'
10600 archive_cmds_need_lc=no
10601 hardcode_shlibpath_var=no
10602 runpath_var='LD_RUN_PATH'
10603
10604 if test "$GCC" = yes; then
10605 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10606 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10607 else
10608 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10609 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10610 fi
10611 ;;
10612
10613 sysv5* | sco3.2v5* | sco5v6*)
10614 # Note: We can NOT use -z defs as we might desire, because we do not
10615 # link with -lc, and that would cause any symbols used from libc to
10616 # always be unresolved, which means just about no library would
10617 # ever link correctly. If we're not using GNU ld we use -z text
10618 # though, which does catch some bad symbols but isn't as heavy-handed
10619 # as -z defs.
10620 no_undefined_flag='${wl}-z,text'
10621 allow_undefined_flag='${wl}-z,nodefs'
10622 archive_cmds_need_lc=no
10623 hardcode_shlibpath_var=no
10624 hardcode_libdir_flag_spec='${wl}-R,$libdir'
10625 hardcode_libdir_separator=':'
10626 link_all_deplibs=yes
10627 export_dynamic_flag_spec='${wl}-Bexport'
10628 runpath_var='LD_RUN_PATH'
10629
10630 if test "$GCC" = yes; then
10631 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10632 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10633 else
10634 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10635 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10636 fi
10637 ;;
10638
10639 uts4*)
10640 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10641 hardcode_libdir_flag_spec='-L$libdir'
10642 hardcode_shlibpath_var=no
10643 ;;
10644
10645 *)
10646 ld_shlibs=no
10647 ;;
10648 esac
10649
10650 if test x$host_vendor = xsni; then
10651 case $host in
10652 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10653 export_dynamic_flag_spec='${wl}-Blargedynsym'
10654 ;;
10655 esac
10656 fi
10657 fi
10658
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
10660 $as_echo "$ld_shlibs" >&6; }
10661 test "$ld_shlibs" = no && can_build_shared=no
10662
10663 with_gnu_ld=$with_gnu_ld
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679 #
10680 # Do we need to explicitly link libc?
10681 #
10682 case "x$archive_cmds_need_lc" in
10683 x|xyes)
10684 # Assume -lc should be added
10685 archive_cmds_need_lc=yes
10686
10687 if test "$enable_shared" = yes && test "$GCC" = yes; then
10688 case $archive_cmds in
10689 *'~'*)
10690 # FIXME: we may have to deal with multi-command sequences.
10691 ;;
10692 '$CC '*)
10693 # Test whether the compiler implicitly links with -lc since on some
10694 # systems, -lgcc has to come before -lc. If gcc already passes -lc
10695 # to ld, don't add -lc before -lgcc.
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
10697 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
10698 if ${lt_cv_archive_cmds_need_lc+:} false; then :
10699 $as_echo_n "(cached) " >&6
10700 else
10701 $RM conftest*
10702 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10703
10704 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10705 (eval $ac_compile) 2>&5
10706 ac_status=$?
10707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10708 test $ac_status = 0; } 2>conftest.err; then
10709 soname=conftest
10710 lib=conftest
10711 libobjs=conftest.$ac_objext
10712 deplibs=
10713 wl=$lt_prog_compiler_wl
10714 pic_flag=$lt_prog_compiler_pic
10715 compiler_flags=-v
10716 linker_flags=-v
10717 verstring=
10718 output_objdir=.
10719 libname=conftest
10720 lt_save_allow_undefined_flag=$allow_undefined_flag
10721 allow_undefined_flag=
10722 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
10723 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
10724 ac_status=$?
10725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10726 test $ac_status = 0; }
10727 then
10728 lt_cv_archive_cmds_need_lc=no
10729 else
10730 lt_cv_archive_cmds_need_lc=yes
10731 fi
10732 allow_undefined_flag=$lt_save_allow_undefined_flag
10733 else
10734 cat conftest.err 1>&5
10735 fi
10736 $RM conftest*
10737
10738 fi
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
10740 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
10741 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
10742 ;;
10743 esac
10744 fi
10745 ;;
10746 esac
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
10900 $as_echo_n "checking dynamic linker characteristics... " >&6; }
10901
10902 if test "$GCC" = yes; then
10903 case $host_os in
10904 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
10905 *) lt_awk_arg="/^libraries:/" ;;
10906 esac
10907 case $host_os in
10908 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
10909 *) lt_sed_strip_eq="s,=/,/,g" ;;
10910 esac
10911 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
10912 case $lt_search_path_spec in
10913 *\;*)
10914 # if the path contains ";" then we assume it to be the separator
10915 # otherwise default to the standard path separator (i.e. ":") - it is
10916 # assumed that no part of a normal pathname contains ";" but that should
10917 # okay in the real world where ";" in dirpaths is itself problematic.
10918 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
10919 ;;
10920 *)
10921 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
10922 ;;
10923 esac
10924 # Ok, now we have the path, separated by spaces, we can step through it
10925 # and add multilib dir if necessary.
10926 lt_tmp_lt_search_path_spec=
10927 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
10928 for lt_sys_path in $lt_search_path_spec; do
10929 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
10930 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
10931 else
10932 test -d "$lt_sys_path" && \
10933 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
10934 fi
10935 done
10936 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
10937 BEGIN {RS=" "; FS="/|\n";} {
10938 lt_foo="";
10939 lt_count=0;
10940 for (lt_i = NF; lt_i > 0; lt_i--) {
10941 if ($lt_i != "" && $lt_i != ".") {
10942 if ($lt_i == "..") {
10943 lt_count++;
10944 } else {
10945 if (lt_count == 0) {
10946 lt_foo="/" $lt_i lt_foo;
10947 } else {
10948 lt_count--;
10949 }
10950 }
10951 }
10952 }
10953 if (lt_foo != "") { lt_freq[lt_foo]++; }
10954 if (lt_freq[lt_foo] == 1) { print lt_foo; }
10955 }'`
10956 # AWK program above erroneously prepends '/' to C:/dos/paths
10957 # for these hosts.
10958 case $host_os in
10959 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
10960 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
10961 esac
10962 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
10963 else
10964 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
10965 fi
10966 library_names_spec=
10967 libname_spec='lib$name'
10968 soname_spec=
10969 shrext_cmds=".so"
10970 postinstall_cmds=
10971 postuninstall_cmds=
10972 finish_cmds=
10973 finish_eval=
10974 shlibpath_var=
10975 shlibpath_overrides_runpath=unknown
10976 version_type=none
10977 dynamic_linker="$host_os ld.so"
10978 sys_lib_dlsearch_path_spec="/lib /usr/lib"
10979 need_lib_prefix=unknown
10980 hardcode_into_libs=no
10981
10982 # when you set need_version to no, make sure it does not cause -set_version
10983 # flags to be left without arguments
10984 need_version=unknown
10985
10986 case $host_os in
10987 aix3*)
10988 version_type=linux # correct to gnu/linux during the next big refactor
10989 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
10990 shlibpath_var=LIBPATH
10991
10992 # AIX 3 has no versioning support, so we append a major version to the name.
10993 soname_spec='${libname}${release}${shared_ext}$major'
10994 ;;
10995
10996 aix[4-9]*)
10997 version_type=linux # correct to gnu/linux during the next big refactor
10998 need_lib_prefix=no
10999 need_version=no
11000 hardcode_into_libs=yes
11001 if test "$host_cpu" = ia64; then
11002 # AIX 5 supports IA64
11003 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
11004 shlibpath_var=LD_LIBRARY_PATH
11005 else
11006 # With GCC up to 2.95.x, collect2 would create an import file
11007 # for dependence libraries. The import file would start with
11008 # the line `#! .'. This would cause the generated library to
11009 # depend on `.', always an invalid library. This was fixed in
11010 # development snapshots of GCC prior to 3.0.
11011 case $host_os in
11012 aix4 | aix4.[01] | aix4.[01].*)
11013 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
11014 echo ' yes '
11015 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
11016 :
11017 else
11018 can_build_shared=no
11019 fi
11020 ;;
11021 esac
11022 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
11023 # soname into executable. Probably we can add versioning support to
11024 # collect2, so additional links can be useful in future.
11025 if test "$aix_use_runtimelinking" = yes; then
11026 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
11027 # instead of lib<name>.a to let people know that these are not
11028 # typical AIX shared libraries.
11029 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11030 else
11031 # We preserve .a as extension for shared libraries through AIX4.2
11032 # and later when we are not doing run time linking.
11033 library_names_spec='${libname}${release}.a $libname.a'
11034 soname_spec='${libname}${release}${shared_ext}$major'
11035 fi
11036 shlibpath_var=LIBPATH
11037 fi
11038 ;;
11039
11040 amigaos*)
11041 case $host_cpu in
11042 powerpc)
11043 # Since July 2007 AmigaOS4 officially supports .so libraries.
11044 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
11045 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11046 ;;
11047 m68k)
11048 library_names_spec='$libname.ixlibrary $libname.a'
11049 # Create ${libname}_ixlibrary.a entries in /sys/libs.
11050 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
11051 ;;
11052 esac
11053 ;;
11054
11055 beos*)
11056 library_names_spec='${libname}${shared_ext}'
11057 dynamic_linker="$host_os ld.so"
11058 shlibpath_var=LIBRARY_PATH
11059 ;;
11060
11061 bsdi[45]*)
11062 version_type=linux # correct to gnu/linux during the next big refactor
11063 need_version=no
11064 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11065 soname_spec='${libname}${release}${shared_ext}$major'
11066 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
11067 shlibpath_var=LD_LIBRARY_PATH
11068 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
11069 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
11070 # the default ld.so.conf also contains /usr/contrib/lib and
11071 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
11072 # libtool to hard-code these into programs
11073 ;;
11074
11075 cygwin* | mingw* | pw32* | cegcc*)
11076 version_type=windows
11077 shrext_cmds=".dll"
11078 need_version=no
11079 need_lib_prefix=no
11080
11081 case $GCC,$cc_basename in
11082 yes,*)
11083 # gcc
11084 library_names_spec='$libname.dll.a'
11085 # DLL is installed to $(libdir)/../bin by postinstall_cmds
11086 postinstall_cmds='base_file=`basename \${file}`~
11087 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11088 dldir=$destdir/`dirname \$dlpath`~
11089 test -d \$dldir || mkdir -p \$dldir~
11090 $install_prog $dir/$dlname \$dldir/$dlname~
11091 chmod a+x \$dldir/$dlname~
11092 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
11093 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
11094 fi'
11095 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11096 dlpath=$dir/\$dldll~
11097 $RM \$dlpath'
11098 shlibpath_overrides_runpath=yes
11099
11100 case $host_os in
11101 cygwin*)
11102 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
11103 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11104
11105 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
11106 ;;
11107 mingw* | cegcc*)
11108 # MinGW DLLs use traditional 'lib' prefix
11109 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11110 ;;
11111 pw32*)
11112 # pw32 DLLs use 'pw' prefix rather than 'lib'
11113 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11114 ;;
11115 esac
11116 dynamic_linker='Win32 ld.exe'
11117 ;;
11118
11119 *,cl*)
11120 # Native MSVC
11121 libname_spec='$name'
11122 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11123 library_names_spec='${libname}.dll.lib'
11124
11125 case $build_os in
11126 mingw*)
11127 sys_lib_search_path_spec=
11128 lt_save_ifs=$IFS
11129 IFS=';'
11130 for lt_path in $LIB
11131 do
11132 IFS=$lt_save_ifs
11133 # Let DOS variable expansion print the short 8.3 style file name.
11134 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
11135 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
11136 done
11137 IFS=$lt_save_ifs
11138 # Convert to MSYS style.
11139 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
11140 ;;
11141 cygwin*)
11142 # Convert to unix form, then to dos form, then back to unix form
11143 # but this time dos style (no spaces!) so that the unix form looks
11144 # like /cygdrive/c/PROGRA~1:/cygdr...
11145 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
11146 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
11147 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11148 ;;
11149 *)
11150 sys_lib_search_path_spec="$LIB"
11151 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
11152 # It is most probably a Windows format PATH.
11153 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
11154 else
11155 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11156 fi
11157 # FIXME: find the short name or the path components, as spaces are
11158 # common. (e.g. "Program Files" -> "PROGRA~1")
11159 ;;
11160 esac
11161
11162 # DLL is installed to $(libdir)/../bin by postinstall_cmds
11163 postinstall_cmds='base_file=`basename \${file}`~
11164 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11165 dldir=$destdir/`dirname \$dlpath`~
11166 test -d \$dldir || mkdir -p \$dldir~
11167 $install_prog $dir/$dlname \$dldir/$dlname'
11168 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11169 dlpath=$dir/\$dldll~
11170 $RM \$dlpath'
11171 shlibpath_overrides_runpath=yes
11172 dynamic_linker='Win32 link.exe'
11173 ;;
11174
11175 *)
11176 # Assume MSVC wrapper
11177 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
11178 dynamic_linker='Win32 ld.exe'
11179 ;;
11180 esac
11181 # FIXME: first we should search . and the directory the executable is in
11182 shlibpath_var=PATH
11183 ;;
11184
11185 darwin* | rhapsody*)
11186 dynamic_linker="$host_os dyld"
11187 version_type=darwin
11188 need_lib_prefix=no
11189 need_version=no
11190 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
11191 soname_spec='${libname}${release}${major}$shared_ext'
11192 shlibpath_overrides_runpath=yes
11193 shlibpath_var=DYLD_LIBRARY_PATH
11194 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
11195
11196 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
11197 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
11198 ;;
11199
11200 dgux*)
11201 version_type=linux # correct to gnu/linux during the next big refactor
11202 need_lib_prefix=no
11203 need_version=no
11204 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
11205 soname_spec='${libname}${release}${shared_ext}$major'
11206 shlibpath_var=LD_LIBRARY_PATH
11207 ;;
11208
11209 freebsd* | dragonfly*)
11210 # DragonFly does not have aout. When/if they implement a new
11211 # versioning mechanism, adjust this.
11212 if test -x /usr/bin/objformat; then
11213 objformat=`/usr/bin/objformat`
11214 else
11215 case $host_os in
11216 freebsd[23].*) objformat=aout ;;
11217 *) objformat=elf ;;
11218 esac
11219 fi
11220 version_type=freebsd-$objformat
11221 case $version_type in
11222 freebsd-elf*)
11223 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11224 need_version=no
11225 need_lib_prefix=no
11226 ;;
11227 freebsd-*)
11228 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
11229 need_version=yes
11230 ;;
11231 esac
11232 shlibpath_var=LD_LIBRARY_PATH
11233 case $host_os in
11234 freebsd2.*)
11235 shlibpath_overrides_runpath=yes
11236 ;;
11237 freebsd3.[01]* | freebsdelf3.[01]*)
11238 shlibpath_overrides_runpath=yes
11239 hardcode_into_libs=yes
11240 ;;
11241 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
11242 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
11243 shlibpath_overrides_runpath=no
11244 hardcode_into_libs=yes
11245 ;;
11246 *) # from 4.6 on, and DragonFly
11247 shlibpath_overrides_runpath=yes
11248 hardcode_into_libs=yes
11249 ;;
11250 esac
11251 ;;
11252
11253 haiku*)
11254 version_type=linux # correct to gnu/linux during the next big refactor
11255 need_lib_prefix=no
11256 need_version=no
11257 dynamic_linker="$host_os runtime_loader"
11258 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
11259 soname_spec='${libname}${release}${shared_ext}$major'
11260 shlibpath_var=LIBRARY_PATH
11261 shlibpath_overrides_runpath=yes
11262 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
11263 hardcode_into_libs=yes
11264 ;;
11265
11266 hpux9* | hpux10* | hpux11*)
11267 # Give a soname corresponding to the major version so that dld.sl refuses to
11268 # link against other versions.
11269 version_type=sunos
11270 need_lib_prefix=no
11271 need_version=no
11272 case $host_cpu in
11273 ia64*)
11274 shrext_cmds='.so'
11275 hardcode_into_libs=yes
11276 dynamic_linker="$host_os dld.so"
11277 shlibpath_var=LD_LIBRARY_PATH
11278 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11279 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11280 soname_spec='${libname}${release}${shared_ext}$major'
11281 if test "X$HPUX_IA64_MODE" = X32; then
11282 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
11283 else
11284 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
11285 fi
11286 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11287 ;;
11288 hppa*64*)
11289 shrext_cmds='.sl'
11290 hardcode_into_libs=yes
11291 dynamic_linker="$host_os dld.sl"
11292 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
11293 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11294 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11295 soname_spec='${libname}${release}${shared_ext}$major'
11296 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
11297 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11298 ;;
11299 *)
11300 shrext_cmds='.sl'
11301 dynamic_linker="$host_os dld.sl"
11302 shlibpath_var=SHLIB_PATH
11303 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
11304 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11305 soname_spec='${libname}${release}${shared_ext}$major'
11306 ;;
11307 esac
11308 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
11309 postinstall_cmds='chmod 555 $lib'
11310 # or fails outright, so override atomically:
11311 install_override_mode=555
11312 ;;
11313
11314 interix[3-9]*)
11315 version_type=linux # correct to gnu/linux during the next big refactor
11316 need_lib_prefix=no
11317 need_version=no
11318 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11319 soname_spec='${libname}${release}${shared_ext}$major'
11320 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
11321 shlibpath_var=LD_LIBRARY_PATH
11322 shlibpath_overrides_runpath=no
11323 hardcode_into_libs=yes
11324 ;;
11325
11326 irix5* | irix6* | nonstopux*)
11327 case $host_os in
11328 nonstopux*) version_type=nonstopux ;;
11329 *)
11330 if test "$lt_cv_prog_gnu_ld" = yes; then
11331 version_type=linux # correct to gnu/linux during the next big refactor
11332 else
11333 version_type=irix
11334 fi ;;
11335 esac
11336 need_lib_prefix=no
11337 need_version=no
11338 soname_spec='${libname}${release}${shared_ext}$major'
11339 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
11340 case $host_os in
11341 irix5* | nonstopux*)
11342 libsuff= shlibsuff=
11343 ;;
11344 *)
11345 case $LD in # libtool.m4 will add one of these switches to LD
11346 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
11347 libsuff= shlibsuff= libmagic=32-bit;;
11348 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
11349 libsuff=32 shlibsuff=N32 libmagic=N32;;
11350 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
11351 libsuff=64 shlibsuff=64 libmagic=64-bit;;
11352 *) libsuff= shlibsuff= libmagic=never-match;;
11353 esac
11354 ;;
11355 esac
11356 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
11357 shlibpath_overrides_runpath=no
11358 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
11359 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
11360 hardcode_into_libs=yes
11361 ;;
11362
11363 # No shared lib support for Linux oldld, aout, or coff.
11364 linux*oldld* | linux*aout* | linux*coff*)
11365 dynamic_linker=no
11366 ;;
11367
11368 # This must be glibc/ELF.
11369 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11370 version_type=linux # correct to gnu/linux during the next big refactor
11371 need_lib_prefix=no
11372 need_version=no
11373 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11374 soname_spec='${libname}${release}${shared_ext}$major'
11375 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
11376 shlibpath_var=LD_LIBRARY_PATH
11377 shlibpath_overrides_runpath=no
11378
11379 # Some binutils ld are patched to set DT_RUNPATH
11380 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
11381 $as_echo_n "(cached) " >&6
11382 else
11383 lt_cv_shlibpath_overrides_runpath=no
11384 save_LDFLAGS=$LDFLAGS
11385 save_libdir=$libdir
11386 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
11387 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
11388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11389 /* end confdefs.h. */
11390
11391 int
11392 main ()
11393 {
11394
11395 ;
11396 return 0;
11397 }
11398 _ACEOF
11399 if ac_fn_c_try_link "$LINENO"; then :
11400 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
11401 lt_cv_shlibpath_overrides_runpath=yes
11402 fi
11403 fi
11404 rm -f core conftest.err conftest.$ac_objext \
11405 conftest$ac_exeext conftest.$ac_ext
11406 LDFLAGS=$save_LDFLAGS
11407 libdir=$save_libdir
11408
11409 fi
11410
11411 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
11412
11413 # This implies no fast_install, which is unacceptable.
11414 # Some rework will be needed to allow for fast_install
11415 # before this can be enabled.
11416 hardcode_into_libs=yes
11417
11418 # Append ld.so.conf contents to the search path
11419 if test -f /etc/ld.so.conf; then
11420 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
11421 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
11422 fi
11423
11424 # We used to test for /lib/ld.so.1 and disable shared libraries on
11425 # powerpc, because MkLinux only supported shared libraries with the
11426 # GNU dynamic linker. Since this was broken with cross compilers,
11427 # most powerpc-linux boxes support dynamic linking these days and
11428 # people can always --disable-shared, the test was removed, and we
11429 # assume the GNU/Linux dynamic linker is in use.
11430 dynamic_linker='GNU/Linux ld.so'
11431 ;;
11432
11433 netbsdelf*-gnu)
11434 version_type=linux
11435 need_lib_prefix=no
11436 need_version=no
11437 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11438 soname_spec='${libname}${release}${shared_ext}$major'
11439 shlibpath_var=LD_LIBRARY_PATH
11440 shlibpath_overrides_runpath=no
11441 hardcode_into_libs=yes
11442 dynamic_linker='NetBSD ld.elf_so'
11443 ;;
11444
11445 netbsd*)
11446 version_type=sunos
11447 need_lib_prefix=no
11448 need_version=no
11449 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11450 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11451 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11452 dynamic_linker='NetBSD (a.out) ld.so'
11453 else
11454 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11455 soname_spec='${libname}${release}${shared_ext}$major'
11456 dynamic_linker='NetBSD ld.elf_so'
11457 fi
11458 shlibpath_var=LD_LIBRARY_PATH
11459 shlibpath_overrides_runpath=yes
11460 hardcode_into_libs=yes
11461 ;;
11462
11463 newsos6)
11464 version_type=linux # correct to gnu/linux during the next big refactor
11465 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11466 shlibpath_var=LD_LIBRARY_PATH
11467 shlibpath_overrides_runpath=yes
11468 ;;
11469
11470 *nto* | *qnx*)
11471 version_type=qnx
11472 need_lib_prefix=no
11473 need_version=no
11474 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11475 soname_spec='${libname}${release}${shared_ext}$major'
11476 shlibpath_var=LD_LIBRARY_PATH
11477 shlibpath_overrides_runpath=no
11478 hardcode_into_libs=yes
11479 dynamic_linker='ldqnx.so'
11480 ;;
11481
11482 openbsd*)
11483 version_type=sunos
11484 sys_lib_dlsearch_path_spec="/usr/lib"
11485 need_lib_prefix=no
11486 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
11487 case $host_os in
11488 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
11489 *) need_version=no ;;
11490 esac
11491 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11492 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11493 shlibpath_var=LD_LIBRARY_PATH
11494 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11495 case $host_os in
11496 openbsd2.[89] | openbsd2.[89].*)
11497 shlibpath_overrides_runpath=no
11498 ;;
11499 *)
11500 shlibpath_overrides_runpath=yes
11501 ;;
11502 esac
11503 else
11504 shlibpath_overrides_runpath=yes
11505 fi
11506 ;;
11507
11508 os2*)
11509 libname_spec='$name'
11510 shrext_cmds=".dll"
11511 need_lib_prefix=no
11512 library_names_spec='$libname${shared_ext} $libname.a'
11513 dynamic_linker='OS/2 ld.exe'
11514 shlibpath_var=LIBPATH
11515 ;;
11516
11517 osf3* | osf4* | osf5*)
11518 version_type=osf
11519 need_lib_prefix=no
11520 need_version=no
11521 soname_spec='${libname}${release}${shared_ext}$major'
11522 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11523 shlibpath_var=LD_LIBRARY_PATH
11524 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
11525 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
11526 ;;
11527
11528 rdos*)
11529 dynamic_linker=no
11530 ;;
11531
11532 solaris*)
11533 version_type=linux # correct to gnu/linux during the next big refactor
11534 need_lib_prefix=no
11535 need_version=no
11536 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11537 soname_spec='${libname}${release}${shared_ext}$major'
11538 shlibpath_var=LD_LIBRARY_PATH
11539 shlibpath_overrides_runpath=yes
11540 hardcode_into_libs=yes
11541 # ldd complains unless libraries are executable
11542 postinstall_cmds='chmod +x $lib'
11543 ;;
11544
11545 sunos4*)
11546 version_type=sunos
11547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11548 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
11549 shlibpath_var=LD_LIBRARY_PATH
11550 shlibpath_overrides_runpath=yes
11551 if test "$with_gnu_ld" = yes; then
11552 need_lib_prefix=no
11553 fi
11554 need_version=yes
11555 ;;
11556
11557 sysv4 | sysv4.3*)
11558 version_type=linux # correct to gnu/linux during the next big refactor
11559 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11560 soname_spec='${libname}${release}${shared_ext}$major'
11561 shlibpath_var=LD_LIBRARY_PATH
11562 case $host_vendor in
11563 sni)
11564 shlibpath_overrides_runpath=no
11565 need_lib_prefix=no
11566 runpath_var=LD_RUN_PATH
11567 ;;
11568 siemens)
11569 need_lib_prefix=no
11570 ;;
11571 motorola)
11572 need_lib_prefix=no
11573 need_version=no
11574 shlibpath_overrides_runpath=no
11575 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
11576 ;;
11577 esac
11578 ;;
11579
11580 sysv4*MP*)
11581 if test -d /usr/nec ;then
11582 version_type=linux # correct to gnu/linux during the next big refactor
11583 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
11584 soname_spec='$libname${shared_ext}.$major'
11585 shlibpath_var=LD_LIBRARY_PATH
11586 fi
11587 ;;
11588
11589 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
11590 version_type=freebsd-elf
11591 need_lib_prefix=no
11592 need_version=no
11593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11594 soname_spec='${libname}${release}${shared_ext}$major'
11595 shlibpath_var=LD_LIBRARY_PATH
11596 shlibpath_overrides_runpath=yes
11597 hardcode_into_libs=yes
11598 if test "$with_gnu_ld" = yes; then
11599 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
11600 else
11601 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
11602 case $host_os in
11603 sco3.2v5*)
11604 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
11605 ;;
11606 esac
11607 fi
11608 sys_lib_dlsearch_path_spec='/usr/lib'
11609 ;;
11610
11611 tpf*)
11612 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
11613 version_type=linux # correct to gnu/linux during the next big refactor
11614 need_lib_prefix=no
11615 need_version=no
11616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11617 shlibpath_var=LD_LIBRARY_PATH
11618 shlibpath_overrides_runpath=no
11619 hardcode_into_libs=yes
11620 ;;
11621
11622 uts4*)
11623 version_type=linux # correct to gnu/linux during the next big refactor
11624 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11625 soname_spec='${libname}${release}${shared_ext}$major'
11626 shlibpath_var=LD_LIBRARY_PATH
11627 ;;
11628
11629 *)
11630 dynamic_linker=no
11631 ;;
11632 esac
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
11634 $as_echo "$dynamic_linker" >&6; }
11635 test "$dynamic_linker" = no && can_build_shared=no
11636
11637 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11638 if test "$GCC" = yes; then
11639 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11640 fi
11641
11642 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
11643 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
11644 fi
11645 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
11646 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
11647 fi
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
11741 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
11742 hardcode_action=
11743 if test -n "$hardcode_libdir_flag_spec" ||
11744 test -n "$runpath_var" ||
11745 test "X$hardcode_automatic" = "Xyes" ; then
11746
11747 # We can hardcode non-existent directories.
11748 if test "$hardcode_direct" != no &&
11749 # If the only mechanism to avoid hardcoding is shlibpath_var, we
11750 # have to relink, otherwise we might link with an installed library
11751 # when we should be linking with a yet-to-be-installed one
11752 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
11753 test "$hardcode_minus_L" != no; then
11754 # Linking always hardcodes the temporary library directory.
11755 hardcode_action=relink
11756 else
11757 # We can link without hardcoding, and we can hardcode nonexisting dirs.
11758 hardcode_action=immediate
11759 fi
11760 else
11761 # We cannot hardcode anything, or else we can only hardcode existing
11762 # directories.
11763 hardcode_action=unsupported
11764 fi
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
11766 $as_echo "$hardcode_action" >&6; }
11767
11768 if test "$hardcode_action" = relink ||
11769 test "$inherit_rpath" = yes; then
11770 # Fast installation is not supported
11771 enable_fast_install=no
11772 elif test "$shlibpath_overrides_runpath" = yes ||
11773 test "$enable_shared" = no; then
11774 # Fast installation is not necessary
11775 enable_fast_install=needless
11776 fi
11777
11778
11779
11780
11781
11782
11783 if test "x$enable_dlopen" != xyes; then
11784 enable_dlopen=unknown
11785 enable_dlopen_self=unknown
11786 enable_dlopen_self_static=unknown
11787 else
11788 lt_cv_dlopen=no
11789 lt_cv_dlopen_libs=
11790
11791 case $host_os in
11792 beos*)
11793 lt_cv_dlopen="load_add_on"
11794 lt_cv_dlopen_libs=
11795 lt_cv_dlopen_self=yes
11796 ;;
11797
11798 mingw* | pw32* | cegcc*)
11799 lt_cv_dlopen="LoadLibrary"
11800 lt_cv_dlopen_libs=
11801 ;;
11802
11803 cygwin*)
11804 lt_cv_dlopen="dlopen"
11805 lt_cv_dlopen_libs=
11806 ;;
11807
11808 darwin*)
11809 # if libdl is installed we need to link against it
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11811 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11812 if ${ac_cv_lib_dl_dlopen+:} false; then :
11813 $as_echo_n "(cached) " >&6
11814 else
11815 ac_check_lib_save_LIBS=$LIBS
11816 LIBS="-ldl $LIBS"
11817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11818 /* end confdefs.h. */
11819
11820 /* Override any GCC internal prototype to avoid an error.
11821 Use char because int might match the return type of a GCC
11822 builtin and then its argument prototype would still apply. */
11823 #ifdef __cplusplus
11824 extern "C"
11825 #endif
11826 char dlopen ();
11827 int
11828 main ()
11829 {
11830 return dlopen ();
11831 ;
11832 return 0;
11833 }
11834 _ACEOF
11835 if ac_fn_c_try_link "$LINENO"; then :
11836 ac_cv_lib_dl_dlopen=yes
11837 else
11838 ac_cv_lib_dl_dlopen=no
11839 fi
11840 rm -f core conftest.err conftest.$ac_objext \
11841 conftest$ac_exeext conftest.$ac_ext
11842 LIBS=$ac_check_lib_save_LIBS
11843 fi
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11845 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11846 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11847 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11848 else
11849
11850 lt_cv_dlopen="dyld"
11851 lt_cv_dlopen_libs=
11852 lt_cv_dlopen_self=yes
11853
11854 fi
11855
11856 ;;
11857
11858 *)
11859 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
11860 if test "x$ac_cv_func_shl_load" = xyes; then :
11861 lt_cv_dlopen="shl_load"
11862 else
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
11864 $as_echo_n "checking for shl_load in -ldld... " >&6; }
11865 if ${ac_cv_lib_dld_shl_load+:} false; then :
11866 $as_echo_n "(cached) " >&6
11867 else
11868 ac_check_lib_save_LIBS=$LIBS
11869 LIBS="-ldld $LIBS"
11870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11871 /* end confdefs.h. */
11872
11873 /* Override any GCC internal prototype to avoid an error.
11874 Use char because int might match the return type of a GCC
11875 builtin and then its argument prototype would still apply. */
11876 #ifdef __cplusplus
11877 extern "C"
11878 #endif
11879 char shl_load ();
11880 int
11881 main ()
11882 {
11883 return shl_load ();
11884 ;
11885 return 0;
11886 }
11887 _ACEOF
11888 if ac_fn_c_try_link "$LINENO"; then :
11889 ac_cv_lib_dld_shl_load=yes
11890 else
11891 ac_cv_lib_dld_shl_load=no
11892 fi
11893 rm -f core conftest.err conftest.$ac_objext \
11894 conftest$ac_exeext conftest.$ac_ext
11895 LIBS=$ac_check_lib_save_LIBS
11896 fi
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
11898 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
11899 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
11900 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
11901 else
11902 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11903 if test "x$ac_cv_func_dlopen" = xyes; then :
11904 lt_cv_dlopen="dlopen"
11905 else
11906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11907 $as_echo_n "checking for dlopen in -ldl... " >&6; }
11908 if ${ac_cv_lib_dl_dlopen+:} false; then :
11909 $as_echo_n "(cached) " >&6
11910 else
11911 ac_check_lib_save_LIBS=$LIBS
11912 LIBS="-ldl $LIBS"
11913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914 /* end confdefs.h. */
11915
11916 /* Override any GCC internal prototype to avoid an error.
11917 Use char because int might match the return type of a GCC
11918 builtin and then its argument prototype would still apply. */
11919 #ifdef __cplusplus
11920 extern "C"
11921 #endif
11922 char dlopen ();
11923 int
11924 main ()
11925 {
11926 return dlopen ();
11927 ;
11928 return 0;
11929 }
11930 _ACEOF
11931 if ac_fn_c_try_link "$LINENO"; then :
11932 ac_cv_lib_dl_dlopen=yes
11933 else
11934 ac_cv_lib_dl_dlopen=no
11935 fi
11936 rm -f core conftest.err conftest.$ac_objext \
11937 conftest$ac_exeext conftest.$ac_ext
11938 LIBS=$ac_check_lib_save_LIBS
11939 fi
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11941 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11942 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11943 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
11944 else
11945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
11946 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
11947 if ${ac_cv_lib_svld_dlopen+:} false; then :
11948 $as_echo_n "(cached) " >&6
11949 else
11950 ac_check_lib_save_LIBS=$LIBS
11951 LIBS="-lsvld $LIBS"
11952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11953 /* end confdefs.h. */
11954
11955 /* Override any GCC internal prototype to avoid an error.
11956 Use char because int might match the return type of a GCC
11957 builtin and then its argument prototype would still apply. */
11958 #ifdef __cplusplus
11959 extern "C"
11960 #endif
11961 char dlopen ();
11962 int
11963 main ()
11964 {
11965 return dlopen ();
11966 ;
11967 return 0;
11968 }
11969 _ACEOF
11970 if ac_fn_c_try_link "$LINENO"; then :
11971 ac_cv_lib_svld_dlopen=yes
11972 else
11973 ac_cv_lib_svld_dlopen=no
11974 fi
11975 rm -f core conftest.err conftest.$ac_objext \
11976 conftest$ac_exeext conftest.$ac_ext
11977 LIBS=$ac_check_lib_save_LIBS
11978 fi
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
11980 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
11981 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
11982 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
11983 else
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
11985 $as_echo_n "checking for dld_link in -ldld... " >&6; }
11986 if ${ac_cv_lib_dld_dld_link+:} false; then :
11987 $as_echo_n "(cached) " >&6
11988 else
11989 ac_check_lib_save_LIBS=$LIBS
11990 LIBS="-ldld $LIBS"
11991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11992 /* end confdefs.h. */
11993
11994 /* Override any GCC internal prototype to avoid an error.
11995 Use char because int might match the return type of a GCC
11996 builtin and then its argument prototype would still apply. */
11997 #ifdef __cplusplus
11998 extern "C"
11999 #endif
12000 char dld_link ();
12001 int
12002 main ()
12003 {
12004 return dld_link ();
12005 ;
12006 return 0;
12007 }
12008 _ACEOF
12009 if ac_fn_c_try_link "$LINENO"; then :
12010 ac_cv_lib_dld_dld_link=yes
12011 else
12012 ac_cv_lib_dld_dld_link=no
12013 fi
12014 rm -f core conftest.err conftest.$ac_objext \
12015 conftest$ac_exeext conftest.$ac_ext
12016 LIBS=$ac_check_lib_save_LIBS
12017 fi
12018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
12019 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
12020 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
12021 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
12022 fi
12023
12024
12025 fi
12026
12027
12028 fi
12029
12030
12031 fi
12032
12033
12034 fi
12035
12036
12037 fi
12038
12039 ;;
12040 esac
12041
12042 if test "x$lt_cv_dlopen" != xno; then
12043 enable_dlopen=yes
12044 else
12045 enable_dlopen=no
12046 fi
12047
12048 case $lt_cv_dlopen in
12049 dlopen)
12050 save_CPPFLAGS="$CPPFLAGS"
12051 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
12052
12053 save_LDFLAGS="$LDFLAGS"
12054 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
12055
12056 save_LIBS="$LIBS"
12057 LIBS="$lt_cv_dlopen_libs $LIBS"
12058
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
12060 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
12061 if ${lt_cv_dlopen_self+:} false; then :
12062 $as_echo_n "(cached) " >&6
12063 else
12064 if test "$cross_compiling" = yes; then :
12065 lt_cv_dlopen_self=cross
12066 else
12067 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12068 lt_status=$lt_dlunknown
12069 cat > conftest.$ac_ext <<_LT_EOF
12070 #line $LINENO "configure"
12071 #include "confdefs.h"
12072
12073 #if HAVE_DLFCN_H
12074 #include <dlfcn.h>
12075 #endif
12076
12077 #include <stdio.h>
12078
12079 #ifdef RTLD_GLOBAL
12080 # define LT_DLGLOBAL RTLD_GLOBAL
12081 #else
12082 # ifdef DL_GLOBAL
12083 # define LT_DLGLOBAL DL_GLOBAL
12084 # else
12085 # define LT_DLGLOBAL 0
12086 # endif
12087 #endif
12088
12089 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12090 find out it does not work in some platform. */
12091 #ifndef LT_DLLAZY_OR_NOW
12092 # ifdef RTLD_LAZY
12093 # define LT_DLLAZY_OR_NOW RTLD_LAZY
12094 # else
12095 # ifdef DL_LAZY
12096 # define LT_DLLAZY_OR_NOW DL_LAZY
12097 # else
12098 # ifdef RTLD_NOW
12099 # define LT_DLLAZY_OR_NOW RTLD_NOW
12100 # else
12101 # ifdef DL_NOW
12102 # define LT_DLLAZY_OR_NOW DL_NOW
12103 # else
12104 # define LT_DLLAZY_OR_NOW 0
12105 # endif
12106 # endif
12107 # endif
12108 # endif
12109 #endif
12110
12111 /* When -fvisbility=hidden is used, assume the code has been annotated
12112 correspondingly for the symbols needed. */
12113 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12114 int fnord () __attribute__((visibility("default")));
12115 #endif
12116
12117 int fnord () { return 42; }
12118 int main ()
12119 {
12120 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12121 int status = $lt_dlunknown;
12122
12123 if (self)
12124 {
12125 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12126 else
12127 {
12128 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12129 else puts (dlerror ());
12130 }
12131 /* dlclose (self); */
12132 }
12133 else
12134 puts (dlerror ());
12135
12136 return status;
12137 }
12138 _LT_EOF
12139 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12140 (eval $ac_link) 2>&5
12141 ac_status=$?
12142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12143 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12144 (./conftest; exit; ) >&5 2>/dev/null
12145 lt_status=$?
12146 case x$lt_status in
12147 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
12148 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
12149 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
12150 esac
12151 else :
12152 # compilation failed
12153 lt_cv_dlopen_self=no
12154 fi
12155 fi
12156 rm -fr conftest*
12157
12158
12159 fi
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
12161 $as_echo "$lt_cv_dlopen_self" >&6; }
12162
12163 if test "x$lt_cv_dlopen_self" = xyes; then
12164 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
12166 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
12167 if ${lt_cv_dlopen_self_static+:} false; then :
12168 $as_echo_n "(cached) " >&6
12169 else
12170 if test "$cross_compiling" = yes; then :
12171 lt_cv_dlopen_self_static=cross
12172 else
12173 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12174 lt_status=$lt_dlunknown
12175 cat > conftest.$ac_ext <<_LT_EOF
12176 #line $LINENO "configure"
12177 #include "confdefs.h"
12178
12179 #if HAVE_DLFCN_H
12180 #include <dlfcn.h>
12181 #endif
12182
12183 #include <stdio.h>
12184
12185 #ifdef RTLD_GLOBAL
12186 # define LT_DLGLOBAL RTLD_GLOBAL
12187 #else
12188 # ifdef DL_GLOBAL
12189 # define LT_DLGLOBAL DL_GLOBAL
12190 # else
12191 # define LT_DLGLOBAL 0
12192 # endif
12193 #endif
12194
12195 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12196 find out it does not work in some platform. */
12197 #ifndef LT_DLLAZY_OR_NOW
12198 # ifdef RTLD_LAZY
12199 # define LT_DLLAZY_OR_NOW RTLD_LAZY
12200 # else
12201 # ifdef DL_LAZY
12202 # define LT_DLLAZY_OR_NOW DL_LAZY
12203 # else
12204 # ifdef RTLD_NOW
12205 # define LT_DLLAZY_OR_NOW RTLD_NOW
12206 # else
12207 # ifdef DL_NOW
12208 # define LT_DLLAZY_OR_NOW DL_NOW
12209 # else
12210 # define LT_DLLAZY_OR_NOW 0
12211 # endif
12212 # endif
12213 # endif
12214 # endif
12215 #endif
12216
12217 /* When -fvisbility=hidden is used, assume the code has been annotated
12218 correspondingly for the symbols needed. */
12219 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12220 int fnord () __attribute__((visibility("default")));
12221 #endif
12222
12223 int fnord () { return 42; }
12224 int main ()
12225 {
12226 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12227 int status = $lt_dlunknown;
12228
12229 if (self)
12230 {
12231 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12232 else
12233 {
12234 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12235 else puts (dlerror ());
12236 }
12237 /* dlclose (self); */
12238 }
12239 else
12240 puts (dlerror ());
12241
12242 return status;
12243 }
12244 _LT_EOF
12245 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12246 (eval $ac_link) 2>&5
12247 ac_status=$?
12248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12249 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12250 (./conftest; exit; ) >&5 2>/dev/null
12251 lt_status=$?
12252 case x$lt_status in
12253 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
12254 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
12255 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
12256 esac
12257 else :
12258 # compilation failed
12259 lt_cv_dlopen_self_static=no
12260 fi
12261 fi
12262 rm -fr conftest*
12263
12264
12265 fi
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
12267 $as_echo "$lt_cv_dlopen_self_static" >&6; }
12268 fi
12269
12270 CPPFLAGS="$save_CPPFLAGS"
12271 LDFLAGS="$save_LDFLAGS"
12272 LIBS="$save_LIBS"
12273 ;;
12274 esac
12275
12276 case $lt_cv_dlopen_self in
12277 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
12278 *) enable_dlopen_self=unknown ;;
12279 esac
12280
12281 case $lt_cv_dlopen_self_static in
12282 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
12283 *) enable_dlopen_self_static=unknown ;;
12284 esac
12285 fi
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303 striplib=
12304 old_striplib=
12305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
12306 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
12307 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12308 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12309 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12311 $as_echo "yes" >&6; }
12312 else
12313 # FIXME - insert some real tests, host_os isn't really good enough
12314 case $host_os in
12315 darwin*)
12316 if test -n "$STRIP" ; then
12317 striplib="$STRIP -x"
12318 old_striplib="$STRIP -S"
12319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12320 $as_echo "yes" >&6; }
12321 else
12322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12323 $as_echo "no" >&6; }
12324 fi
12325 ;;
12326 *)
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12328 $as_echo "no" >&6; }
12329 ;;
12330 esac
12331 fi
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344 # Report which library types will actually be built
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
12346 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
12348 $as_echo "$can_build_shared" >&6; }
12349
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
12351 $as_echo_n "checking whether to build shared libraries... " >&6; }
12352 test "$can_build_shared" = "no" && enable_shared=no
12353
12354 # On AIX, shared libraries and static libraries use the same namespace, and
12355 # are all built from PIC.
12356 case $host_os in
12357 aix3*)
12358 test "$enable_shared" = yes && enable_static=no
12359 if test -n "$RANLIB"; then
12360 archive_cmds="$archive_cmds~\$RANLIB \$lib"
12361 postinstall_cmds='$RANLIB $lib'
12362 fi
12363 ;;
12364
12365 aix[4-9]*)
12366 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
12367 test "$enable_shared" = yes && enable_static=no
12368 fi
12369 ;;
12370 esac
12371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
12372 $as_echo "$enable_shared" >&6; }
12373
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
12375 $as_echo_n "checking whether to build static libraries... " >&6; }
12376 # Make sure either enable_shared or enable_static is yes.
12377 test "$enable_shared" = yes || enable_static=yes
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
12379 $as_echo "$enable_static" >&6; }
12380
12381
12382
12383
12384 fi
12385 ac_ext=c
12386 ac_cpp='$CPP $CPPFLAGS'
12387 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12388 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12389 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12390
12391 CC="$lt_save_CC"
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407 ac_config_commands="$ac_config_commands libtool"
12408
12409
12410
12411
12412 # Only expand once:
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12424 if test -n "$ac_tool_prefix"; then
12425 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
12426 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
12427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12428 $as_echo_n "checking for $ac_word... " >&6; }
12429 if ${ac_cv_path_PKG_CONFIG+:} false; then :
12430 $as_echo_n "(cached) " >&6
12431 else
12432 case $PKG_CONFIG in
12433 [\\/]* | ?:[\\/]*)
12434 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12435 ;;
12436 *)
12437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12438 for as_dir in $PATH
12439 do
12440 IFS=$as_save_IFS
12441 test -z "$as_dir" && as_dir=.
12442 for ac_exec_ext in '' $ac_executable_extensions; do
12443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12444 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12446 break 2
12447 fi
12448 done
12449 done
12450 IFS=$as_save_IFS
12451
12452 ;;
12453 esac
12454 fi
12455 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12456 if test -n "$PKG_CONFIG"; then
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12458 $as_echo "$PKG_CONFIG" >&6; }
12459 else
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12461 $as_echo "no" >&6; }
12462 fi
12463
12464
12465 fi
12466 if test -z "$ac_cv_path_PKG_CONFIG"; then
12467 ac_pt_PKG_CONFIG=$PKG_CONFIG
12468 # Extract the first word of "pkg-config", so it can be a program name with args.
12469 set dummy pkg-config; ac_word=$2
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12471 $as_echo_n "checking for $ac_word... " >&6; }
12472 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
12473 $as_echo_n "(cached) " >&6
12474 else
12475 case $ac_pt_PKG_CONFIG in
12476 [\\/]* | ?:[\\/]*)
12477 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12478 ;;
12479 *)
12480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12481 for as_dir in $PATH
12482 do
12483 IFS=$as_save_IFS
12484 test -z "$as_dir" && as_dir=.
12485 for ac_exec_ext in '' $ac_executable_extensions; do
12486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12487 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12489 break 2
12490 fi
12491 done
12492 done
12493 IFS=$as_save_IFS
12494
12495 ;;
12496 esac
12497 fi
12498 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12499 if test -n "$ac_pt_PKG_CONFIG"; then
12500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
12501 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
12502 else
12503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12504 $as_echo "no" >&6; }
12505 fi
12506
12507 if test "x$ac_pt_PKG_CONFIG" = x; then
12508 PKG_CONFIG=""
12509 else
12510 case $cross_compiling:$ac_tool_warned in
12511 yes:)
12512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12513 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12514 ac_tool_warned=yes ;;
12515 esac
12516 PKG_CONFIG=$ac_pt_PKG_CONFIG
12517 fi
12518 else
12519 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12520 fi
12521
12522 fi
12523 if test -n "$PKG_CONFIG"; then
12524 _pkg_min_version=0.9.0
12525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12526 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12527 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12529 $as_echo "yes" >&6; }
12530 else
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12532 $as_echo "no" >&6; }
12533 PKG_CONFIG=""
12534 fi
12535 fi
12536
12537 pkg_failed=no
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO_UNIX" >&5
12539 $as_echo_n "checking for GIO_UNIX... " >&6; }
12540
12541 if test -n "$GIO_UNIX_CFLAGS"; then
12542 pkg_cv_GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS"
12543 elif test -n "$PKG_CONFIG"; then
12544 if test -n "$PKG_CONFIG" && \
12545 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.29.15\""; } >&5
12546 ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.29.15") 2>&5
12547 ac_status=$?
12548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12549 test $ac_status = 0; }; then
12550 pkg_cv_GIO_UNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0 >= 2.29.15" 2>/dev/null`
12551 test "x$?" != "x0" && pkg_failed=yes
12552 else
12553 pkg_failed=yes
12554 fi
12555 else
12556 pkg_failed=untried
12557 fi
12558 if test -n "$GIO_UNIX_LIBS"; then
12559 pkg_cv_GIO_UNIX_LIBS="$GIO_UNIX_LIBS"
12560 elif test -n "$PKG_CONFIG"; then
12561 if test -n "$PKG_CONFIG" && \
12562 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.29.15\""; } >&5
12563 ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.29.15") 2>&5
12564 ac_status=$?
12565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12566 test $ac_status = 0; }; then
12567 pkg_cv_GIO_UNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0 >= 2.29.15" 2>/dev/null`
12568 test "x$?" != "x0" && pkg_failed=yes
12569 else
12570 pkg_failed=yes
12571 fi
12572 else
12573 pkg_failed=untried
12574 fi
12575
12576
12577
12578 if test $pkg_failed = yes; then
12579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580 $as_echo "no" >&6; }
12581
12582 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12583 _pkg_short_errors_supported=yes
12584 else
12585 _pkg_short_errors_supported=no
12586 fi
12587 if test $_pkg_short_errors_supported = yes; then
12588 GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-unix-2.0 >= 2.29.15" 2>&1`
12589 else
12590 GIO_UNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-unix-2.0 >= 2.29.15" 2>&1`
12591 fi
12592 # Put the nasty error message in config.log where it belongs
12593 echo "$GIO_UNIX_PKG_ERRORS" >&5
12594
12595 as_fn_error $? "Package requirements (gio-unix-2.0 >= 2.29.15) were not met:
12596
12597 $GIO_UNIX_PKG_ERRORS
12598
12599 Consider adjusting the PKG_CONFIG_PATH environment variable if you
12600 installed software in a non-standard prefix.
12601
12602 Alternatively, you may set the environment variables GIO_UNIX_CFLAGS
12603 and GIO_UNIX_LIBS to avoid the need to call pkg-config.
12604 See the pkg-config man page for more details." "$LINENO" 5
12605 elif test $pkg_failed = untried; then
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12607 $as_echo "no" >&6; }
12608 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12609 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12610 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
12611 is in your PATH or set the PKG_CONFIG environment variable to the full
12612 path to pkg-config.
12613
12614 Alternatively, you may set the environment variables GIO_UNIX_CFLAGS
12615 and GIO_UNIX_LIBS to avoid the need to call pkg-config.
12616 See the pkg-config man page for more details.
12617
12618 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
12619 See \`config.log' for more details" "$LINENO" 5; }
12620 else
12621 GIO_UNIX_CFLAGS=$pkg_cv_GIO_UNIX_CFLAGS
12622 GIO_UNIX_LIBS=$pkg_cv_GIO_UNIX_LIBS
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12624 $as_echo "yes" >&6; }
12625
12626 fi
12627
12628
12629
12630
12631
12632 # Check whether --enable-compile-warnings was given.
12633 if test "${enable_compile_warnings+set}" = set; then :
12634 enableval=$enable_compile_warnings;
12635 else
12636 enable_compile_warnings="yes"
12637 fi
12638
12639
12640 if test "x$GCC" != xyes; then
12641 enable_compile_warnings=no
12642 fi
12643
12644 warning_flags=
12645 realsave_CFLAGS="$CFLAGS"
12646
12647 base_warn_flags=" \
12648 -Wall \
12649 -Wstrict-prototypes \
12650 -Wnested-externs \
12651 "
12652
12653 base_error_flags=" \
12654 -Werror=missing-prototypes \
12655 -Werror=implicit-function-declaration \
12656 -Werror=pointer-arith \
12657 -Werror=init-self \
12658 -Werror=format-security \
12659 -Werror=format=2 \
12660 -Werror=missing-include-dirs \
12661 "
12662
12663 case "$enable_compile_warnings" in
12664 no)
12665 warning_flags=
12666 ;;
12667 minimum)
12668 warning_flags="-Wall"
12669 ;;
12670 yes)
12671 warning_flags="$base_warn_flags $base_error_flags"
12672 ;;
12673 maximum|error)
12674 warning_flags="$base_warn_flags $base_error_flags"
12675 ;;
12676 *)
12677 as_fn_error $? "Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" "$LINENO" 5
12678 ;;
12679 esac
12680
12681 if test "$enable_compile_warnings" = "error" ; then
12682 warning_flags="$warning_flags -Werror"
12683 fi
12684
12685 for option in $warning_flags; do
12686 save_CFLAGS="$CFLAGS"
12687 CFLAGS="$CFLAGS $option"
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5
12689 $as_echo_n "checking whether gcc understands $option... " >&6; }
12690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12691 /* end confdefs.h. */
12692
12693 int
12694 main ()
12695 {
12696
12697 ;
12698 return 0;
12699 }
12700 _ACEOF
12701 if ac_fn_c_try_compile "$LINENO"; then :
12702 has_option=yes
12703 else
12704 has_option=no
12705 fi
12706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12707 CFLAGS="$save_CFLAGS"
12708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
12709 $as_echo "$has_option" >&6; }
12710 if test $has_option = yes; then
12711 tested_warning_flags="$tested_warning_flags $option"
12712 fi
12713 unset has_option
12714 unset save_CFLAGS
12715 done
12716 unset option
12717 CFLAGS="$realsave_CFLAGS"
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5
12719 $as_echo_n "checking what warning flags to pass to the C compiler... " >&6; }
12720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tested_warning_flags" >&5
12721 $as_echo "$tested_warning_flags" >&6; }
12722
12723 # Check whether --enable-iso-c was given.
12724 if test "${enable_iso_c+set}" = set; then :
12725 enableval=$enable_iso_c;
12726 else
12727 enable_iso_c=no
12728 fi
12729
12730
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what language compliance flags to pass to the C compiler" >&5
12732 $as_echo_n "checking what language compliance flags to pass to the C compiler... " >&6; }
12733 complCFLAGS=
12734 if test "x$enable_iso_c" != "xno"; then
12735 if test "x$GCC" = "xyes"; then
12736 case " $CFLAGS " in
12737 *\ \ -ansi\ \ *) ;;
12738 *) complCFLAGS="$complCFLAGS -ansi" ;;
12739 esac
12740 case " $CFLAGS " in
12741 *\ \ -pedantic\ \ *) ;;
12742 *) complCFLAGS="$complCFLAGS -pedantic" ;;
12743 esac
12744 fi
12745 fi
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $complCFLAGS" >&5
12747 $as_echo "$complCFLAGS" >&6; }
12748
12749 WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
12750
12751
12752
12753 # Check whether --enable-deprecation_flags was given.
12754 if test "${enable_deprecation_flags+set}" = set; then :
12755 enableval=$enable_deprecation_flags;
12756 else
12757 enable_deprecation_flags=no
12758 fi
12759
12760
12761 if test "x$enable_deprecation_flags" = "xyes"; then
12762 DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
12763
12764 fi
12765
12766 # Check whether --enable-debug was given.
12767 if test "${enable_debug+set}" = set; then :
12768 enableval=$enable_debug;
12769 else
12770 enable_debug=debug_default
12771 fi
12772
12773 if test "x$enable_debug" = "xyes"; then
12774 DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
12775 else
12776 if test "x$enable_debug" = "xno"; then
12777 DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
12778 else
12779 DEBUG_CFLAGS="-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"
12780 fi
12781 fi
12782
12783
12784
12785
12786
12787 # Check whether --enable-introspection was given.
12788 if test "${enable_introspection+set}" = set; then :
12789 enableval=$enable_introspection;
12790 else
12791 enable_introspection=auto
12792 fi
12793
12794
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5
12796 $as_echo_n "checking for gobject-introspection... " >&6; }
12797
12798 case $enable_introspection in #(
12799 no) :
12800 found_introspection="no (disabled, use --enable-introspection to enable)"
12801 ;; #(
12802 yes) :
12803 if test -n "$PKG_CONFIG" && \
12804 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5
12805 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0") 2>&5
12806 ac_status=$?
12807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12808 test $ac_status = 0; }; then
12809 :
12810 else
12811 as_fn_error $? "gobject-introspection-1.0 is not installed" "$LINENO" 5
12812 fi
12813 if test -n "$PKG_CONFIG" && \
12814 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.9.5\""; } >&5
12815 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.9.5") 2>&5
12816 ac_status=$?
12817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12818 test $ac_status = 0; }; then
12819 found_introspection=yes
12820 else
12821 as_fn_error $? "You need to have gobject-introspection >= 0.9.5 installed to build cinnamon-menus" "$LINENO" 5
12822 fi
12823 ;; #(
12824 auto) :
12825 if test -n "$PKG_CONFIG" && \
12826 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.9.5\""; } >&5
12827 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.9.5") 2>&5
12828 ac_status=$?
12829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12830 test $ac_status = 0; }; then
12831 found_introspection=yes
12832 else
12833 found_introspection=no
12834 fi
12835 enable_introspection=$found_introspection
12836 ;; #(
12837 *) :
12838 as_fn_error $? "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5
12839 ;;
12840 esac
12841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5
12842 $as_echo "$found_introspection" >&6; }
12843
12844 INTROSPECTION_SCANNER=
12845 INTROSPECTION_COMPILER=
12846 INTROSPECTION_GENERATE=
12847 INTROSPECTION_GIRDIR=
12848 INTROSPECTION_TYPELIBDIR=
12849 if test "x$found_introspection" = "xyes"; then
12850 INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
12851 INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
12852 INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
12853 INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
12854 INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
12855 INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
12856 INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
12857 INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
12858 fi
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868 if test "x$found_introspection" = "xyes"; then
12869 HAVE_INTROSPECTION_TRUE=
12870 HAVE_INTROSPECTION_FALSE='#'
12871 else
12872 HAVE_INTROSPECTION_TRUE='#'
12873 HAVE_INTROSPECTION_FALSE=
12874 fi
12875
12876
12877
12878
12879 ac_config_files="$ac_config_files Makefile libmenu/Makefile libmenu/libcinnamon-menu-3.0.pc libmenu/libcinnamon-menu-3.0-uninstalled.pc"
12880
12881 cat >confcache <<\_ACEOF
12882 # This file is a shell script that caches the results of configure
12883 # tests run on this system so they can be shared between configure
12884 # scripts and configure runs, see configure's option --config-cache.
12885 # It is not useful on other systems. If it contains results you don't
12886 # want to keep, you may remove or edit it.
12887 #
12888 # config.status only pays attention to the cache file if you give it
12889 # the --recheck option to rerun configure.
12890 #
12891 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12892 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12893 # following values.
12894
12895 _ACEOF
12896
12897 # The following way of writing the cache mishandles newlines in values,
12898 # but we know of no workaround that is simple, portable, and efficient.
12899 # So, we kill variables containing newlines.
12900 # Ultrix sh set writes to stderr and can't be redirected directly,
12901 # and sets the high bit in the cache file unless we assign to the vars.
12902 (
12903 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12904 eval ac_val=\$$ac_var
12905 case $ac_val in #(
12906 *${as_nl}*)
12907 case $ac_var in #(
12908 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12909 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12910 esac
12911 case $ac_var in #(
12912 _ | IFS | as_nl) ;; #(
12913 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12914 *) { eval $ac_var=; unset $ac_var;} ;;
12915 esac ;;
12916 esac
12917 done
12918
12919 (set) 2>&1 |
12920 case $as_nl`(ac_space=' '; set) 2>&1` in #(
12921 *${as_nl}ac_space=\ *)
12922 # `set' does not quote correctly, so add quotes: double-quote
12923 # substitution turns \\\\ into \\, and sed turns \\ into \.
12924 sed -n \
12925 "s/'/'\\\\''/g;
12926 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12927 ;; #(
12928 *)
12929 # `set' quotes correctly as required by POSIX, so do not add quotes.
12930 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12931 ;;
12932 esac |
12933 sort
12934 ) |
12935 sed '
12936 /^ac_cv_env_/b end
12937 t clear
12938 :clear
12939 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12940 t end
12941 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12942 :end' >>confcache
12943 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12944 if test -w "$cache_file"; then
12945 if test "x$cache_file" != "x/dev/null"; then
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12947 $as_echo "$as_me: updating cache $cache_file" >&6;}
12948 if test ! -f "$cache_file" || test -h "$cache_file"; then
12949 cat confcache >"$cache_file"
12950 else
12951 case $cache_file in #(
12952 */* | ?:*)
12953 mv -f confcache "$cache_file"$$ &&
12954 mv -f "$cache_file"$$ "$cache_file" ;; #(
12955 *)
12956 mv -f confcache "$cache_file" ;;
12957 esac
12958 fi
12959 fi
12960 else
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12962 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12963 fi
12964 fi
12965 rm -f confcache
12966
12967 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12968 # Let make expand exec_prefix.
12969 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12970
12971 DEFS=-DHAVE_CONFIG_H
12972
12973 ac_libobjs=
12974 ac_ltlibobjs=
12975 U=
12976 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12977 # 1. Remove the extension, and $U if already installed.
12978 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12979 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12980 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
12981 # will be set to the directory where LIBOBJS objects are built.
12982 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12983 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12984 done
12985 LIBOBJS=$ac_libobjs
12986
12987 LTLIBOBJS=$ac_ltlibobjs
12988
12989
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
12991 $as_echo_n "checking that generated files are newer than configure... " >&6; }
12992 if test -n "$am_sleep_pid"; then
12993 # Hide warnings about reused PIDs.
12994 wait $am_sleep_pid 2>/dev/null
12995 fi
12996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
12997 $as_echo "done" >&6; }
12998 if test -n "$EXEEXT"; then
12999 am__EXEEXT_TRUE=
13000 am__EXEEXT_FALSE='#'
13001 else
13002 am__EXEEXT_TRUE='#'
13003 am__EXEEXT_FALSE=
13004 fi
13005
13006 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
13007 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
13008 Usually this means the macro was only invoked conditionally." "$LINENO" 5
13009 fi
13010 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
13011 as_fn_error $? "conditional \"AMDEP\" was never defined.
13012 Usually this means the macro was only invoked conditionally." "$LINENO" 5
13013 fi
13014 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
13015 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
13016 Usually this means the macro was only invoked conditionally." "$LINENO" 5
13017 fi
13018 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
13019 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
13020 Usually this means the macro was only invoked conditionally." "$LINENO" 5
13021 fi
13022 if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then
13023 as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined.
13024 Usually this means the macro was only invoked conditionally." "$LINENO" 5
13025 fi
13026
13027 : "${CONFIG_STATUS=./config.status}"
13028 ac_write_fail=0
13029 ac_clean_files_save=$ac_clean_files
13030 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13031 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13032 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13033 as_write_fail=0
13034 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
13035 #! $SHELL
13036 # Generated by $as_me.
13037 # Run this file to recreate the current configuration.
13038 # Compiler output produced by configure, useful for debugging
13039 # configure, is in config.log if it exists.
13040
13041 debug=false
13042 ac_cs_recheck=false
13043 ac_cs_silent=false
13044
13045 SHELL=\${CONFIG_SHELL-$SHELL}
13046 export SHELL
13047 _ASEOF
13048 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13049 ## -------------------- ##
13050 ## M4sh Initialization. ##
13051 ## -------------------- ##
13052
13053 # Be more Bourne compatible
13054 DUALCASE=1; export DUALCASE # for MKS sh
13055 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
13056 emulate sh
13057 NULLCMD=:
13058 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
13059 # is contrary to our usage. Disable this feature.
13060 alias -g '${1+"$@"}'='"$@"'
13061 setopt NO_GLOB_SUBST
13062 else
13063 case `(set -o) 2>/dev/null` in #(
13064 *posix*) :
13065 set -o posix ;; #(
13066 *) :
13067 ;;
13068 esac
13069 fi
13070
13071
13072 as_nl='
13073 '
13074 export as_nl
13075 # Printing a long string crashes Solaris 7 /usr/bin/printf.
13076 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13077 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13078 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13079 # Prefer a ksh shell builtin over an external printf program on Solaris,
13080 # but without wasting forks for bash or zsh.
13081 if test -z "$BASH_VERSION$ZSH_VERSION" \
13082 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13083 as_echo='print -r --'
13084 as_echo_n='print -rn --'
13085 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13086 as_echo='printf %s\n'
13087 as_echo_n='printf %s'
13088 else
13089 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13090 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13091 as_echo_n='/usr/ucb/echo -n'
13092 else
13093 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13094 as_echo_n_body='eval
13095 arg=$1;
13096 case $arg in #(
13097 *"$as_nl"*)
13098 expr "X$arg" : "X\\(.*\\)$as_nl";
13099 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13100 esac;
13101 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13102 '
13103 export as_echo_n_body
13104 as_echo_n='sh -c $as_echo_n_body as_echo'
13105 fi
13106 export as_echo_body
13107 as_echo='sh -c $as_echo_body as_echo'
13108 fi
13109
13110 # The user is always right.
13111 if test "${PATH_SEPARATOR+set}" != set; then
13112 PATH_SEPARATOR=:
13113 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13114 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13115 PATH_SEPARATOR=';'
13116 }
13117 fi
13118
13119
13120 # IFS
13121 # We need space, tab and new line, in precisely that order. Quoting is
13122 # there to prevent editors from complaining about space-tab.
13123 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
13124 # splitting by setting IFS to empty value.)
13125 IFS=" "" $as_nl"
13126
13127 # Find who we are. Look in the path if we contain no directory separator.
13128 as_myself=
13129 case $0 in #((
13130 *[\\/]* ) as_myself=$0 ;;
13131 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132 for as_dir in $PATH
13133 do
13134 IFS=$as_save_IFS
13135 test -z "$as_dir" && as_dir=.
13136 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13137 done
13138 IFS=$as_save_IFS
13139
13140 ;;
13141 esac
13142 # We did not find ourselves, most probably we were run as `sh COMMAND'
13143 # in which case we are not to be found in the path.
13144 if test "x$as_myself" = x; then
13145 as_myself=$0
13146 fi
13147 if test ! -f "$as_myself"; then
13148 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13149 exit 1
13150 fi
13151
13152 # Unset variables that we do not need and which cause bugs (e.g. in
13153 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13154 # suppresses any "Segmentation fault" message there. '((' could
13155 # trigger a bug in pdksh 5.2.14.
13156 for as_var in BASH_ENV ENV MAIL MAILPATH
13157 do eval test x\${$as_var+set} = xset \
13158 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
13159 done
13160 PS1='$ '
13161 PS2='> '
13162 PS4='+ '
13163
13164 # NLS nuisances.
13165 LC_ALL=C
13166 export LC_ALL
13167 LANGUAGE=C
13168 export LANGUAGE
13169
13170 # CDPATH.
13171 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13172
13173
13174 # as_fn_error STATUS ERROR [LINENO LOG_FD]
13175 # ----------------------------------------
13176 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13177 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13178 # script with STATUS, using 1 if that was 0.
13179 as_fn_error ()
13180 {
13181 as_status=$1; test $as_status -eq 0 && as_status=1
13182 if test "$4"; then
13183 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13184 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
13185 fi
13186 $as_echo "$as_me: error: $2" >&2
13187 as_fn_exit $as_status
13188 } # as_fn_error
13189
13190
13191 # as_fn_set_status STATUS
13192 # -----------------------
13193 # Set $? to STATUS, without forking.
13194 as_fn_set_status ()
13195 {
13196 return $1
13197 } # as_fn_set_status
13198
13199 # as_fn_exit STATUS
13200 # -----------------
13201 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13202 as_fn_exit ()
13203 {
13204 set +e
13205 as_fn_set_status $1
13206 exit $1
13207 } # as_fn_exit
13208
13209 # as_fn_unset VAR
13210 # ---------------
13211 # Portably unset VAR.
13212 as_fn_unset ()
13213 {
13214 { eval $1=; unset $1;}
13215 }
13216 as_unset=as_fn_unset
13217 # as_fn_append VAR VALUE
13218 # ----------------------
13219 # Append the text in VALUE to the end of the definition contained in VAR. Take
13220 # advantage of any shell optimizations that allow amortized linear growth over
13221 # repeated appends, instead of the typical quadratic growth present in naive
13222 # implementations.
13223 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13224 eval 'as_fn_append ()
13225 {
13226 eval $1+=\$2
13227 }'
13228 else
13229 as_fn_append ()
13230 {
13231 eval $1=\$$1\$2
13232 }
13233 fi # as_fn_append
13234
13235 # as_fn_arith ARG...
13236 # ------------------
13237 # Perform arithmetic evaluation on the ARGs, and store the result in the
13238 # global $as_val. Take advantage of shells that can avoid forks. The arguments
13239 # must be portable across $(()) and expr.
13240 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13241 eval 'as_fn_arith ()
13242 {
13243 as_val=$(( $* ))
13244 }'
13245 else
13246 as_fn_arith ()
13247 {
13248 as_val=`expr "$@" || test $? -eq 1`
13249 }
13250 fi # as_fn_arith
13251
13252
13253 if expr a : '\(a\)' >/dev/null 2>&1 &&
13254 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13255 as_expr=expr
13256 else
13257 as_expr=false
13258 fi
13259
13260 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13261 as_basename=basename
13262 else
13263 as_basename=false
13264 fi
13265
13266 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13267 as_dirname=dirname
13268 else
13269 as_dirname=false
13270 fi
13271
13272 as_me=`$as_basename -- "$0" ||
13273 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13274 X"$0" : 'X\(//\)$' \| \
13275 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13276 $as_echo X/"$0" |
13277 sed '/^.*\/\([^/][^/]*\)\/*$/{
13278 s//\1/
13279 q
13280 }
13281 /^X\/\(\/\/\)$/{
13282 s//\1/
13283 q
13284 }
13285 /^X\/\(\/\).*/{
13286 s//\1/
13287 q
13288 }
13289 s/.*/./; q'`
13290
13291 # Avoid depending upon Character Ranges.
13292 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13293 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13294 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13295 as_cr_digits='0123456789'
13296 as_cr_alnum=$as_cr_Letters$as_cr_digits
13297
13298 ECHO_C= ECHO_N= ECHO_T=
13299 case `echo -n x` in #(((((
13300 -n*)
13301 case `echo 'xy\c'` in
13302 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13303 xy) ECHO_C='\c';;
13304 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13305 ECHO_T=' ';;
13306 esac;;
13307 *)
13308 ECHO_N='-n';;
13309 esac
13310
13311 rm -f conf$$ conf$$.exe conf$$.file
13312 if test -d conf$$.dir; then
13313 rm -f conf$$.dir/conf$$.file
13314 else
13315 rm -f conf$$.dir
13316 mkdir conf$$.dir 2>/dev/null
13317 fi
13318 if (echo >conf$$.file) 2>/dev/null; then
13319 if ln -s conf$$.file conf$$ 2>/dev/null; then
13320 as_ln_s='ln -s'
13321 # ... but there are two gotchas:
13322 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13323 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13324 # In both cases, we have to default to `cp -pR'.
13325 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13326 as_ln_s='cp -pR'
13327 elif ln conf$$.file conf$$ 2>/dev/null; then
13328 as_ln_s=ln
13329 else
13330 as_ln_s='cp -pR'
13331 fi
13332 else
13333 as_ln_s='cp -pR'
13334 fi
13335 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13336 rmdir conf$$.dir 2>/dev/null
13337
13338
13339 # as_fn_mkdir_p
13340 # -------------
13341 # Create "$as_dir" as a directory, including parents if necessary.
13342 as_fn_mkdir_p ()
13343 {
13344
13345 case $as_dir in #(
13346 -*) as_dir=./$as_dir;;
13347 esac
13348 test -d "$as_dir" || eval $as_mkdir_p || {
13349 as_dirs=
13350 while :; do
13351 case $as_dir in #(
13352 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13353 *) as_qdir=$as_dir;;
13354 esac
13355 as_dirs="'$as_qdir' $as_dirs"
13356 as_dir=`$as_dirname -- "$as_dir" ||
13357 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13358 X"$as_dir" : 'X\(//\)[^/]' \| \
13359 X"$as_dir" : 'X\(//\)$' \| \
13360 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13361 $as_echo X"$as_dir" |
13362 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13363 s//\1/
13364 q
13365 }
13366 /^X\(\/\/\)[^/].*/{
13367 s//\1/
13368 q
13369 }
13370 /^X\(\/\/\)$/{
13371 s//\1/
13372 q
13373 }
13374 /^X\(\/\).*/{
13375 s//\1/
13376 q
13377 }
13378 s/.*/./; q'`
13379 test -d "$as_dir" && break
13380 done
13381 test -z "$as_dirs" || eval "mkdir $as_dirs"
13382 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
13383
13384
13385 } # as_fn_mkdir_p
13386 if mkdir -p . 2>/dev/null; then
13387 as_mkdir_p='mkdir -p "$as_dir"'
13388 else
13389 test -d ./-p && rmdir ./-p
13390 as_mkdir_p=false
13391 fi
13392
13393
13394 # as_fn_executable_p FILE
13395 # -----------------------
13396 # Test if FILE is an executable regular file.
13397 as_fn_executable_p ()
13398 {
13399 test -f "$1" && test -x "$1"
13400 } # as_fn_executable_p
13401 as_test_x='test -x'
13402 as_executable_p=as_fn_executable_p
13403
13404 # Sed expression to map a string onto a valid CPP name.
13405 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13406
13407 # Sed expression to map a string onto a valid variable name.
13408 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13409
13410
13411 exec 6>&1
13412 ## ----------------------------------- ##
13413 ## Main body of $CONFIG_STATUS script. ##
13414 ## ----------------------------------- ##
13415 _ASEOF
13416 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
13417
13418 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13419 # Save the log message, to keep $0 and so on meaningful, and to
13420 # report actual input values of CONFIG_FILES etc. instead of their
13421 # values after options handling.
13422 ac_log="
13423 This file was extended by cinnamon-menus $as_me 2.1, which was
13424 generated by GNU Autoconf 2.69. Invocation command line was
13425
13426 CONFIG_FILES = $CONFIG_FILES
13427 CONFIG_HEADERS = $CONFIG_HEADERS
13428 CONFIG_LINKS = $CONFIG_LINKS
13429 CONFIG_COMMANDS = $CONFIG_COMMANDS
13430 $ $0 $@
13431
13432 on `(hostname || uname -n) 2>/dev/null | sed 1q`
13433 "
13434
13435 _ACEOF
13436
13437 case $ac_config_files in *"
13438 "*) set x $ac_config_files; shift; ac_config_files=$*;;
13439 esac
13440
13441 case $ac_config_headers in *"
13442 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13443 esac
13444
13445
13446 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13447 # Files that config.status was made for.
13448 config_files="$ac_config_files"
13449 config_headers="$ac_config_headers"
13450 config_commands="$ac_config_commands"
13451
13452 _ACEOF
13453
13454 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13455 ac_cs_usage="\
13456 \`$as_me' instantiates files and other configuration actions
13457 from templates according to the current configuration. Unless the files
13458 and actions are specified as TAGs, all are instantiated by default.
13459
13460 Usage: $0 [OPTION]... [TAG]...
13461
13462 -h, --help print this help, then exit
13463 -V, --version print version number and configuration settings, then exit
13464 --config print configuration, then exit
13465 -q, --quiet, --silent
13466 do not print progress messages
13467 -d, --debug don't remove temporary files
13468 --recheck update $as_me by reconfiguring in the same conditions
13469 --file=FILE[:TEMPLATE]
13470 instantiate the configuration file FILE
13471 --header=FILE[:TEMPLATE]
13472 instantiate the configuration header FILE
13473
13474 Configuration files:
13475 $config_files
13476
13477 Configuration headers:
13478 $config_headers
13479
13480 Configuration commands:
13481 $config_commands
13482
13483 Report bugs to the package provider."
13484
13485 _ACEOF
13486 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13487 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
13488 ac_cs_version="\\
13489 cinnamon-menus config.status 2.1
13490 configured by $0, generated by GNU Autoconf 2.69,
13491 with options \\"\$ac_cs_config\\"
13492
13493 Copyright (C) 2012 Free Software Foundation, Inc.
13494 This config.status script is free software; the Free Software Foundation
13495 gives unlimited permission to copy, distribute and modify it."
13496
13497 ac_pwd='$ac_pwd'
13498 srcdir='$srcdir'
13499 INSTALL='$INSTALL'
13500 MKDIR_P='$MKDIR_P'
13501 AWK='$AWK'
13502 test -n "\$AWK" || AWK=awk
13503 _ACEOF
13504
13505 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13506 # The default lists apply if the user does not specify any file.
13507 ac_need_defaults=:
13508 while test $# != 0
13509 do
13510 case $1 in
13511 --*=?*)
13512 ac_option=`expr "X$1" : 'X\([^=]*\)='`
13513 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
13514 ac_shift=:
13515 ;;
13516 --*=)
13517 ac_option=`expr "X$1" : 'X\([^=]*\)='`
13518 ac_optarg=
13519 ac_shift=:
13520 ;;
13521 *)
13522 ac_option=$1
13523 ac_optarg=$2
13524 ac_shift=shift
13525 ;;
13526 esac
13527
13528 case $ac_option in
13529 # Handling of the options.
13530 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13531 ac_cs_recheck=: ;;
13532 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13533 $as_echo "$ac_cs_version"; exit ;;
13534 --config | --confi | --conf | --con | --co | --c )
13535 $as_echo "$ac_cs_config"; exit ;;
13536 --debug | --debu | --deb | --de | --d | -d )
13537 debug=: ;;
13538 --file | --fil | --fi | --f )
13539 $ac_shift
13540 case $ac_optarg in
13541 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13542 '') as_fn_error $? "missing file argument" ;;
13543 esac
13544 as_fn_append CONFIG_FILES " '$ac_optarg'"
13545 ac_need_defaults=false;;
13546 --header | --heade | --head | --hea )
13547 $ac_shift
13548 case $ac_optarg in
13549 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13550 esac
13551 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
13552 ac_need_defaults=false;;
13553 --he | --h)
13554 # Conflict between --help and --header
13555 as_fn_error $? "ambiguous option: \`$1'
13556 Try \`$0 --help' for more information.";;
13557 --help | --hel | -h )
13558 $as_echo "$ac_cs_usage"; exit ;;
13559 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13560 | -silent | --silent | --silen | --sile | --sil | --si | --s)
13561 ac_cs_silent=: ;;
13562
13563 # This is an error.
13564 -*) as_fn_error $? "unrecognized option: \`$1'
13565 Try \`$0 --help' for more information." ;;
13566
13567 *) as_fn_append ac_config_targets " $1"
13568 ac_need_defaults=false ;;
13569
13570 esac
13571 shift
13572 done
13573
13574 ac_configure_extra_args=
13575
13576 if $ac_cs_silent; then
13577 exec 6>/dev/null
13578 ac_configure_extra_args="$ac_configure_extra_args --silent"
13579 fi
13580
13581 _ACEOF
13582 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13583 if \$ac_cs_recheck; then
13584 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13585 shift
13586 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
13587 CONFIG_SHELL='$SHELL'
13588 export CONFIG_SHELL
13589 exec "\$@"
13590 fi
13591
13592 _ACEOF
13593 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13594 exec 5>>config.log
13595 {
13596 echo
13597 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13598 ## Running $as_me. ##
13599 _ASBOX
13600 $as_echo "$ac_log"
13601 } >&5
13602
13603 _ACEOF
13604 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13605 #
13606 # INIT-COMMANDS
13607 #
13608 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
13609
13610
13611 # The HP-UX ksh and POSIX shell print the target directory to stdout
13612 # if CDPATH is set.
13613 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13614
13615 sed_quote_subst='$sed_quote_subst'
13616 double_quote_subst='$double_quote_subst'
13617 delay_variable_subst='$delay_variable_subst'
13618 AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
13619 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
13620 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
13621 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
13622 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
13623 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
13624 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
13625 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
13626 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
13627 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
13628 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
13629 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
13630 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
13631 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
13632 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
13633 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
13634 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
13635 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
13636 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
13637 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
13638 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
13639 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
13640 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
13641 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
13642 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
13643 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
13644 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
13645 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
13646 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
13647 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
13648 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
13649 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
13650 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
13651 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
13652 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
13653 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
13654 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
13655 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
13656 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
13657 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
13658 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
13659 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
13660 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
13661 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
13662 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
13663 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
13664 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13665 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13666 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
13667 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
13668 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
13669 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
13670 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
13671 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
13672 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
13673 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
13674 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
13675 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
13676 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
13677 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
13678 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
13679 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
13680 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
13681 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
13682 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
13683 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
13684 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
13685 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
13686 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
13687 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
13688 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
13689 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
13690 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
13691 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
13692 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
13693 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
13694 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13695 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
13696 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
13697 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
13698 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
13699 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
13700 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
13701 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
13702 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
13703 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13704 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
13705 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
13706 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
13707 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
13708 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
13709 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
13710 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
13711 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
13712 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
13713 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
13714 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
13715 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
13716 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
13717 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
13718 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
13719 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
13720 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
13721 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
13722 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
13723 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
13724 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
13725 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
13726 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
13727 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
13728 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
13729 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
13730 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
13731 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
13732 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
13733 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
13734 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
13735 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
13736 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
13737 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
13738 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
13739 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
13740 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
13741 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
13742 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
13743 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
13744 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
13745 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
13746 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
13747 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
13748 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
13749
13750 LTCC='$LTCC'
13751 LTCFLAGS='$LTCFLAGS'
13752 compiler='$compiler_DEFAULT'
13753
13754 # A function that is used when there is no print builtin or printf.
13755 func_fallback_echo ()
13756 {
13757 eval 'cat <<_LTECHO_EOF
13758 \$1
13759 _LTECHO_EOF'
13760 }
13761
13762 # Quote evaled strings.
13763 for var in AS \
13764 DLLTOOL \
13765 OBJDUMP \
13766 SHELL \
13767 ECHO \
13768 PATH_SEPARATOR \
13769 SED \
13770 GREP \
13771 EGREP \
13772 FGREP \
13773 LD \
13774 NM \
13775 LN_S \
13776 lt_SP2NL \
13777 lt_NL2SP \
13778 reload_flag \
13779 deplibs_check_method \
13780 file_magic_cmd \
13781 file_magic_glob \
13782 want_nocaseglob \
13783 sharedlib_from_linklib_cmd \
13784 AR \
13785 AR_FLAGS \
13786 archiver_list_spec \
13787 STRIP \
13788 RANLIB \
13789 CC \
13790 CFLAGS \
13791 compiler \
13792 lt_cv_sys_global_symbol_pipe \
13793 lt_cv_sys_global_symbol_to_cdecl \
13794 lt_cv_sys_global_symbol_to_c_name_address \
13795 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
13796 nm_file_list_spec \
13797 lt_prog_compiler_no_builtin_flag \
13798 lt_prog_compiler_pic \
13799 lt_prog_compiler_wl \
13800 lt_prog_compiler_static \
13801 lt_cv_prog_compiler_c_o \
13802 need_locks \
13803 MANIFEST_TOOL \
13804 DSYMUTIL \
13805 NMEDIT \
13806 LIPO \
13807 OTOOL \
13808 OTOOL64 \
13809 shrext_cmds \
13810 export_dynamic_flag_spec \
13811 whole_archive_flag_spec \
13812 compiler_needs_object \
13813 with_gnu_ld \
13814 allow_undefined_flag \
13815 no_undefined_flag \
13816 hardcode_libdir_flag_spec \
13817 hardcode_libdir_separator \
13818 exclude_expsyms \
13819 include_expsyms \
13820 file_list_spec \
13821 variables_saved_for_relink \
13822 libname_spec \
13823 library_names_spec \
13824 soname_spec \
13825 install_override_mode \
13826 finish_eval \
13827 old_striplib \
13828 striplib; do
13829 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
13830 *[\\\\\\\`\\"\\\$]*)
13831 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
13832 ;;
13833 *)
13834 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
13835 ;;
13836 esac
13837 done
13838
13839 # Double-quote double-evaled strings.
13840 for var in reload_cmds \
13841 old_postinstall_cmds \
13842 old_postuninstall_cmds \
13843 old_archive_cmds \
13844 extract_expsyms_cmds \
13845 old_archive_from_new_cmds \
13846 old_archive_from_expsyms_cmds \
13847 archive_cmds \
13848 archive_expsym_cmds \
13849 module_cmds \
13850 module_expsym_cmds \
13851 export_symbols_cmds \
13852 prelink_cmds \
13853 postlink_cmds \
13854 postinstall_cmds \
13855 postuninstall_cmds \
13856 finish_cmds \
13857 sys_lib_search_path_spec \
13858 sys_lib_dlsearch_path_spec; do
13859 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
13860 *[\\\\\\\`\\"\\\$]*)
13861 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
13862 ;;
13863 *)
13864 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
13865 ;;
13866 esac
13867 done
13868
13869 ac_aux_dir='$ac_aux_dir'
13870 xsi_shell='$xsi_shell'
13871 lt_shell_append='$lt_shell_append'
13872
13873 # See if we are running on zsh, and set the options which allow our
13874 # commands through without removal of \ escapes INIT.
13875 if test -n "\${ZSH_VERSION+set}" ; then
13876 setopt NO_GLOB_SUBST
13877 fi
13878
13879
13880 PACKAGE='$PACKAGE'
13881 VERSION='$VERSION'
13882 TIMESTAMP='$TIMESTAMP'
13883 RM='$RM'
13884 ofile='$ofile'
13885
13886
13887
13888
13889 _ACEOF
13890
13891 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13892
13893 # Handling of arguments.
13894 for ac_config_target in $ac_config_targets
13895 do
13896 case $ac_config_target in
13897 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
13898 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
13899 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
13900 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
13901 "libmenu/Makefile") CONFIG_FILES="$CONFIG_FILES libmenu/Makefile" ;;
13902 "libmenu/libcinnamon-menu-3.0.pc") CONFIG_FILES="$CONFIG_FILES libmenu/libcinnamon-menu-3.0.pc" ;;
13903 "libmenu/libcinnamon-menu-3.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES libmenu/libcinnamon-menu-3.0-uninstalled.pc" ;;
13904
13905 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
13906 esac
13907 done
13908
13909
13910 # If the user did not use the arguments to specify the items to instantiate,
13911 # then the envvar interface is used. Set only those that are not.
13912 # We use the long form for the default assignment because of an extremely
13913 # bizarre bug on SunOS 4.1.3.
13914 if $ac_need_defaults; then
13915 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13916 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13917 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
13918 fi
13919
13920 # Have a temporary directory for convenience. Make it in the build tree
13921 # simply because there is no reason against having it here, and in addition,
13922 # creating and moving files from /tmp can sometimes cause problems.
13923 # Hook for its removal unless debugging.
13924 # Note that there is a small window in which the directory will not be cleaned:
13925 # after its creation but before its name has been assigned to `$tmp'.
13926 $debug ||
13927 {
13928 tmp= ac_tmp=
13929 trap 'exit_status=$?
13930 : "${ac_tmp:=$tmp}"
13931 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
13932 ' 0
13933 trap 'as_fn_exit 1' 1 2 13 15
13934 }
13935 # Create a (secure) tmp directory for tmp files.
13936
13937 {
13938 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13939 test -d "$tmp"
13940 } ||
13941 {
13942 tmp=./conf$$-$RANDOM
13943 (umask 077 && mkdir "$tmp")
13944 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13945 ac_tmp=$tmp
13946
13947 # Set up the scripts for CONFIG_FILES section.
13948 # No need to generate them if there are no CONFIG_FILES.
13949 # This happens for instance with `./config.status config.h'.
13950 if test -n "$CONFIG_FILES"; then
13951
13952
13953 ac_cr=`echo X | tr X '\015'`
13954 # On cygwin, bash can eat \r inside `` if the user requested igncr.
13955 # But we know of no other shell where ac_cr would be empty at this
13956 # point, so we can use a bashism as a fallback.
13957 if test "x$ac_cr" = x; then
13958 eval ac_cr=\$\'\\r\'
13959 fi
13960 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13961 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13962 ac_cs_awk_cr='\\r'
13963 else
13964 ac_cs_awk_cr=$ac_cr
13965 fi
13966
13967 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
13968 _ACEOF
13969
13970
13971 {
13972 echo "cat >conf$$subs.awk <<_ACEOF" &&
13973 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13974 echo "_ACEOF"
13975 } >conf$$subs.sh ||
13976 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13977 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
13978 ac_delim='%!_!# '
13979 for ac_last_try in false false false false false :; do
13980 . ./conf$$subs.sh ||
13981 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13982
13983 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13984 if test $ac_delim_n = $ac_delim_num; then
13985 break
13986 elif $ac_last_try; then
13987 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13988 else
13989 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13990 fi
13991 done
13992 rm -f conf$$subs.sh
13993
13994 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13995 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
13996 _ACEOF
13997 sed -n '
13998 h
13999 s/^/S["/; s/!.*/"]=/
14000 p
14001 g
14002 s/^[^!]*!//
14003 :repl
14004 t repl
14005 s/'"$ac_delim"'$//
14006 t delim
14007 :nl
14008 h
14009 s/\(.\{148\}\)..*/\1/
14010 t more1
14011 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14012 p
14013 n
14014 b repl
14015 :more1
14016 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14017 p
14018 g
14019 s/.\{148\}//
14020 t nl
14021 :delim
14022 h
14023 s/\(.\{148\}\)..*/\1/
14024 t more2
14025 s/["\\]/\\&/g; s/^/"/; s/$/"/
14026 p
14027 b
14028 :more2
14029 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14030 p
14031 g
14032 s/.\{148\}//
14033 t delim
14034 ' <conf$$subs.awk | sed '
14035 /^[^""]/{
14036 N
14037 s/\n//
14038 }
14039 ' >>$CONFIG_STATUS || ac_write_fail=1
14040 rm -f conf$$subs.awk
14041 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14042 _ACAWK
14043 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
14044 for (key in S) S_is_set[key] = 1
14045 FS = ""
14046
14047 }
14048 {
14049 line = $ 0
14050 nfields = split(line, field, "@")
14051 substed = 0
14052 len = length(field[1])
14053 for (i = 2; i < nfields; i++) {
14054 key = field[i]
14055 keylen = length(key)
14056 if (S_is_set[key]) {
14057 value = S[key]
14058 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14059 len += length(value) + length(field[++i])
14060 substed = 1
14061 } else
14062 len += 1 + keylen
14063 }
14064
14065 print line
14066 }
14067
14068 _ACAWK
14069 _ACEOF
14070 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14071 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14072 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14073 else
14074 cat
14075 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14076 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14077 _ACEOF
14078
14079 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14080 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14081 # trailing colons and then remove the whole line if VPATH becomes empty
14082 # (actually we leave an empty line to preserve line numbers).
14083 if test "x$srcdir" = x.; then
14084 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14085 h
14086 s///
14087 s/^/:/
14088 s/[ ]*$/:/
14089 s/:\$(srcdir):/:/g
14090 s/:\${srcdir}:/:/g
14091 s/:@srcdir@:/:/g
14092 s/^:*//
14093 s/:*$//
14094 x
14095 s/\(=[ ]*\).*/\1/
14096 G
14097 s/\n//
14098 s/^[^=]*=[ ]*$//
14099 }'
14100 fi
14101
14102 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14103 fi # test -n "$CONFIG_FILES"
14104
14105 # Set up the scripts for CONFIG_HEADERS section.
14106 # No need to generate them if there are no CONFIG_HEADERS.
14107 # This happens for instance with `./config.status Makefile'.
14108 if test -n "$CONFIG_HEADERS"; then
14109 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
14110 BEGIN {
14111 _ACEOF
14112
14113 # Transform confdefs.h into an awk script `defines.awk', embedded as
14114 # here-document in config.status, that substitutes the proper values into
14115 # config.h.in to produce config.h.
14116
14117 # Create a delimiter string that does not exist in confdefs.h, to ease
14118 # handling of long lines.
14119 ac_delim='%!_!# '
14120 for ac_last_try in false false :; do
14121 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14122 if test -z "$ac_tt"; then
14123 break
14124 elif $ac_last_try; then
14125 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14126 else
14127 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14128 fi
14129 done
14130
14131 # For the awk script, D is an array of macro values keyed by name,
14132 # likewise P contains macro parameters if any. Preserve backslash
14133 # newline sequences.
14134
14135 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14136 sed -n '
14137 s/.\{148\}/&'"$ac_delim"'/g
14138 t rset
14139 :rset
14140 s/^[ ]*#[ ]*define[ ][ ]*/ /
14141 t def
14142 d
14143 :def
14144 s/\\$//
14145 t bsnl
14146 s/["\\]/\\&/g
14147 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14148 D["\1"]=" \3"/p
14149 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14150 d
14151 :bsnl
14152 s/["\\]/\\&/g
14153 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14154 D["\1"]=" \3\\\\\\n"\\/p
14155 t cont
14156 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14157 t cont
14158 d
14159 :cont
14160 n
14161 s/.\{148\}/&'"$ac_delim"'/g
14162 t clear
14163 :clear
14164 s/\\$//
14165 t bsnlc
14166 s/["\\]/\\&/g; s/^/"/; s/$/"/p
14167 d
14168 :bsnlc
14169 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14170 b cont
14171 ' <confdefs.h | sed '
14172 s/'"$ac_delim"'/"\\\
14173 "/g' >>$CONFIG_STATUS || ac_write_fail=1
14174
14175 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14176 for (key in D) D_is_set[key] = 1
14177 FS = ""
14178 }
14179 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14180 line = \$ 0
14181 split(line, arg, " ")
14182 if (arg[1] == "#") {
14183 defundef = arg[2]
14184 mac1 = arg[3]
14185 } else {
14186 defundef = substr(arg[1], 2)
14187 mac1 = arg[2]
14188 }
14189 split(mac1, mac2, "(") #)
14190 macro = mac2[1]
14191 prefix = substr(line, 1, index(line, defundef) - 1)
14192 if (D_is_set[macro]) {
14193 # Preserve the white space surrounding the "#".
14194 print prefix "define", macro P[macro] D[macro]
14195 next
14196 } else {
14197 # Replace #undef with comments. This is necessary, for example,
14198 # in the case of _POSIX_SOURCE, which is predefined and required
14199 # on some systems where configure will not decide to define it.
14200 if (defundef == "undef") {
14201 print "/*", prefix defundef, macro, "*/"
14202 next
14203 }
14204 }
14205 }
14206 { print }
14207 _ACAWK
14208 _ACEOF
14209 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14210 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14211 fi # test -n "$CONFIG_HEADERS"
14212
14213
14214 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
14215 shift
14216 for ac_tag
14217 do
14218 case $ac_tag in
14219 :[FHLC]) ac_mode=$ac_tag; continue;;
14220 esac
14221 case $ac_mode$ac_tag in
14222 :[FHL]*:*);;
14223 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
14224 :[FH]-) ac_tag=-:-;;
14225 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14226 esac
14227 ac_save_IFS=$IFS
14228 IFS=:
14229 set x $ac_tag
14230 IFS=$ac_save_IFS
14231 shift
14232 ac_file=$1
14233 shift
14234
14235 case $ac_mode in
14236 :L) ac_source=$1;;
14237 :[FH])
14238 ac_file_inputs=
14239 for ac_f
14240 do
14241 case $ac_f in
14242 -) ac_f="$ac_tmp/stdin";;
14243 *) # Look for the file first in the build tree, then in the source tree
14244 # (if the path is not absolute). The absolute path cannot be DOS-style,
14245 # because $ac_f cannot contain `:'.
14246 test -f "$ac_f" ||
14247 case $ac_f in
14248 [\\/$]*) false;;
14249 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14250 esac ||
14251 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14252 esac
14253 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14254 as_fn_append ac_file_inputs " '$ac_f'"
14255 done
14256
14257 # Let's still pretend it is `configure' which instantiates (i.e., don't
14258 # use $as_me), people would be surprised to read:
14259 # /* config.h. Generated by config.status. */
14260 configure_input='Generated from '`
14261 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14262 `' by configure.'
14263 if test x"$ac_file" != x-; then
14264 configure_input="$ac_file. $configure_input"
14265 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14266 $as_echo "$as_me: creating $ac_file" >&6;}
14267 fi
14268 # Neutralize special characters interpreted by sed in replacement strings.
14269 case $configure_input in #(
14270 *\&* | *\|* | *\\* )
14271 ac_sed_conf_input=`$as_echo "$configure_input" |
14272 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14273 *) ac_sed_conf_input=$configure_input;;
14274 esac
14275
14276 case $ac_tag in
14277 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14278 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
14279 esac
14280 ;;
14281 esac
14282
14283 ac_dir=`$as_dirname -- "$ac_file" ||
14284 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14285 X"$ac_file" : 'X\(//\)[^/]' \| \
14286 X"$ac_file" : 'X\(//\)$' \| \
14287 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
14288 $as_echo X"$ac_file" |
14289 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14290 s//\1/
14291 q
14292 }
14293 /^X\(\/\/\)[^/].*/{
14294 s//\1/
14295 q
14296 }
14297 /^X\(\/\/\)$/{
14298 s//\1/
14299 q
14300 }
14301 /^X\(\/\).*/{
14302 s//\1/
14303 q
14304 }
14305 s/.*/./; q'`
14306 as_dir="$ac_dir"; as_fn_mkdir_p
14307 ac_builddir=.
14308
14309 case "$ac_dir" in
14310 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14311 *)
14312 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
14313 # A ".." for each directory in $ac_dir_suffix.
14314 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
14315 case $ac_top_builddir_sub in
14316 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14317 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14318 esac ;;
14319 esac
14320 ac_abs_top_builddir=$ac_pwd
14321 ac_abs_builddir=$ac_pwd$ac_dir_suffix
14322 # for backward compatibility:
14323 ac_top_builddir=$ac_top_build_prefix
14324
14325 case $srcdir in
14326 .) # We are building in place.
14327 ac_srcdir=.
14328 ac_top_srcdir=$ac_top_builddir_sub
14329 ac_abs_top_srcdir=$ac_pwd ;;
14330 [\\/]* | ?:[\\/]* ) # Absolute name.
14331 ac_srcdir=$srcdir$ac_dir_suffix;
14332 ac_top_srcdir=$srcdir
14333 ac_abs_top_srcdir=$srcdir ;;
14334 *) # Relative name.
14335 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14336 ac_top_srcdir=$ac_top_build_prefix$srcdir
14337 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14338 esac
14339 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14340
14341
14342 case $ac_mode in
14343 :F)
14344 #
14345 # CONFIG_FILE
14346 #
14347
14348 case $INSTALL in
14349 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14350 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
14351 esac
14352 ac_MKDIR_P=$MKDIR_P
14353 case $MKDIR_P in
14354 [\\/$]* | ?:[\\/]* ) ;;
14355 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
14356 esac
14357 _ACEOF
14358
14359 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14360 # If the template does not know about datarootdir, expand it.
14361 # FIXME: This hack should be removed a few years after 2.60.
14362 ac_datarootdir_hack=; ac_datarootdir_seen=
14363 ac_sed_dataroot='
14364 /datarootdir/ {
14365 p
14366 q
14367 }
14368 /@datadir@/p
14369 /@docdir@/p
14370 /@infodir@/p
14371 /@localedir@/p
14372 /@mandir@/p'
14373 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
14374 *datarootdir*) ac_datarootdir_seen=yes;;
14375 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14377 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
14378 _ACEOF
14379 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14380 ac_datarootdir_hack='
14381 s&@datadir@&$datadir&g
14382 s&@docdir@&$docdir&g
14383 s&@infodir@&$infodir&g
14384 s&@localedir@&$localedir&g
14385 s&@mandir@&$mandir&g
14386 s&\\\${datarootdir}&$datarootdir&g' ;;
14387 esac
14388 _ACEOF
14389
14390 # Neutralize VPATH when `$srcdir' = `.'.
14391 # Shell code in configure.ac might set extrasub.
14392 # FIXME: do we really want to maintain this feature?
14393 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14394 ac_sed_extra="$ac_vpsub
14395 $extrasub
14396 _ACEOF
14397 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14398 :t
14399 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14400 s|@configure_input@|$ac_sed_conf_input|;t t
14401 s&@top_builddir@&$ac_top_builddir_sub&;t t
14402 s&@top_build_prefix@&$ac_top_build_prefix&;t t
14403 s&@srcdir@&$ac_srcdir&;t t
14404 s&@abs_srcdir@&$ac_abs_srcdir&;t t
14405 s&@top_srcdir@&$ac_top_srcdir&;t t
14406 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14407 s&@builddir@&$ac_builddir&;t t
14408 s&@abs_builddir@&$ac_abs_builddir&;t t
14409 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14410 s&@INSTALL@&$ac_INSTALL&;t t
14411 s&@MKDIR_P@&$ac_MKDIR_P&;t t
14412 $ac_datarootdir_hack
14413 "
14414 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
14415 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14416
14417 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14418 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
14419 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
14420 "$ac_tmp/out"`; test -z "$ac_out"; } &&
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14422 which seems to be undefined. Please make sure it is defined" >&5
14423 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14424 which seems to be undefined. Please make sure it is defined" >&2;}
14425
14426 rm -f "$ac_tmp/stdin"
14427 case $ac_file in
14428 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
14429 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
14430 esac \
14431 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14432 ;;
14433 :H)
14434 #
14435 # CONFIG_HEADER
14436 #
14437 if test x"$ac_file" != x-; then
14438 {
14439 $as_echo "/* $configure_input */" \
14440 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
14441 } >"$ac_tmp/config.h" \
14442 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14443 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14445 $as_echo "$as_me: $ac_file is unchanged" >&6;}
14446 else
14447 rm -f "$ac_file"
14448 mv "$ac_tmp/config.h" "$ac_file" \
14449 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
14450 fi
14451 else
14452 $as_echo "/* $configure_input */" \
14453 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
14454 || as_fn_error $? "could not create -" "$LINENO" 5
14455 fi
14456 # Compute "$ac_file"'s index in $config_headers.
14457 _am_arg="$ac_file"
14458 _am_stamp_count=1
14459 for _am_header in $config_headers :; do
14460 case $_am_header in
14461 $_am_arg | $_am_arg:* )
14462 break ;;
14463 * )
14464 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
14465 esac
14466 done
14467 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
14468 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14469 X"$_am_arg" : 'X\(//\)[^/]' \| \
14470 X"$_am_arg" : 'X\(//\)$' \| \
14471 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
14472 $as_echo X"$_am_arg" |
14473 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14474 s//\1/
14475 q
14476 }
14477 /^X\(\/\/\)[^/].*/{
14478 s//\1/
14479 q
14480 }
14481 /^X\(\/\/\)$/{
14482 s//\1/
14483 q
14484 }
14485 /^X\(\/\).*/{
14486 s//\1/
14487 q
14488 }
14489 s/.*/./; q'`/stamp-h$_am_stamp_count
14490 ;;
14491
14492 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
14493 $as_echo "$as_me: executing $ac_file commands" >&6;}
14494 ;;
14495 esac
14496
14497
14498 case $ac_file$ac_mode in
14499 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
14500 # Older Autoconf quotes --file arguments for eval, but not when files
14501 # are listed without --file. Let's play safe and only enable the eval
14502 # if we detect the quoting.
14503 case $CONFIG_FILES in
14504 *\'*) eval set x "$CONFIG_FILES" ;;
14505 *) set x $CONFIG_FILES ;;
14506 esac
14507 shift
14508 for mf
14509 do
14510 # Strip MF so we end up with the name of the file.
14511 mf=`echo "$mf" | sed -e 's/:.*$//'`
14512 # Check whether this is an Automake generated Makefile or not.
14513 # We used to match only the files named 'Makefile.in', but
14514 # some people rename them; so instead we look at the file content.
14515 # Grep'ing the first line is not enough: some people post-process
14516 # each Makefile.in and add a new line on top of each file to say so.
14517 # Grep'ing the whole file is not good either: AIX grep has a line
14518 # limit of 2048, but all sed's we know have understand at least 4000.
14519 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
14520 dirpart=`$as_dirname -- "$mf" ||
14521 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14522 X"$mf" : 'X\(//\)[^/]' \| \
14523 X"$mf" : 'X\(//\)$' \| \
14524 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
14525 $as_echo X"$mf" |
14526 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14527 s//\1/
14528 q
14529 }
14530 /^X\(\/\/\)[^/].*/{
14531 s//\1/
14532 q
14533 }
14534 /^X\(\/\/\)$/{
14535 s//\1/
14536 q
14537 }
14538 /^X\(\/\).*/{
14539 s//\1/
14540 q
14541 }
14542 s/.*/./; q'`
14543 else
14544 continue
14545 fi
14546 # Extract the definition of DEPDIR, am__include, and am__quote
14547 # from the Makefile without running 'make'.
14548 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
14549 test -z "$DEPDIR" && continue
14550 am__include=`sed -n 's/^am__include = //p' < "$mf"`
14551 test -z "$am__include" && continue
14552 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
14553 # Find all dependency output files, they are included files with
14554 # $(DEPDIR) in their names. We invoke sed twice because it is the
14555 # simplest approach to changing $(DEPDIR) to its actual value in the
14556 # expansion.
14557 for file in `sed -n "
14558 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
14559 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
14560 # Make sure the directory exists.
14561 test -f "$dirpart/$file" && continue
14562 fdir=`$as_dirname -- "$file" ||
14563 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14564 X"$file" : 'X\(//\)[^/]' \| \
14565 X"$file" : 'X\(//\)$' \| \
14566 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
14567 $as_echo X"$file" |
14568 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14569 s//\1/
14570 q
14571 }
14572 /^X\(\/\/\)[^/].*/{
14573 s//\1/
14574 q
14575 }
14576 /^X\(\/\/\)$/{
14577 s//\1/
14578 q
14579 }
14580 /^X\(\/\).*/{
14581 s//\1/
14582 q
14583 }
14584 s/.*/./; q'`
14585 as_dir=$dirpart/$fdir; as_fn_mkdir_p
14586 # echo "creating $dirpart/$file"
14587 echo '# dummy' > "$dirpart/$file"
14588 done
14589 done
14590 }
14591 ;;
14592 "libtool":C)
14593
14594 # See if we are running on zsh, and set the options which allow our
14595 # commands through without removal of \ escapes.
14596 if test -n "${ZSH_VERSION+set}" ; then
14597 setopt NO_GLOB_SUBST
14598 fi
14599
14600 cfgfile="${ofile}T"
14601 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
14602 $RM "$cfgfile"
14603
14604 cat <<_LT_EOF >> "$cfgfile"
14605 #! $SHELL
14606
14607 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
14608 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
14609 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14610 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
14611 #
14612 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14613 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14614 # Foundation, Inc.
14615 # Written by Gordon Matzigkeit, 1996
14616 #
14617 # This file is part of GNU Libtool.
14618 #
14619 # GNU Libtool is free software; you can redistribute it and/or
14620 # modify it under the terms of the GNU General Public License as
14621 # published by the Free Software Foundation; either version 2 of
14622 # the License, or (at your option) any later version.
14623 #
14624 # As a special exception to the GNU General Public License,
14625 # if you distribute this file as part of a program or library that
14626 # is built using GNU Libtool, you may include this file under the
14627 # same distribution terms that you use for the rest of that program.
14628 #
14629 # GNU Libtool is distributed in the hope that it will be useful,
14630 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14631 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14632 # GNU General Public License for more details.
14633 #
14634 # You should have received a copy of the GNU General Public License
14635 # along with GNU Libtool; see the file COPYING. If not, a copy
14636 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
14637 # obtained by writing to the Free Software Foundation, Inc.,
14638 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14639
14640
14641 # The names of the tagged configurations supported by this script.
14642 available_tags=""
14643
14644 # ### BEGIN LIBTOOL CONFIG
14645
14646 # Assembler program.
14647 AS=$lt_AS
14648
14649 # DLL creation program.
14650 DLLTOOL=$lt_DLLTOOL
14651
14652 # Object dumper program.
14653 OBJDUMP=$lt_OBJDUMP
14654
14655 # Which release of libtool.m4 was used?
14656 macro_version=$macro_version
14657 macro_revision=$macro_revision
14658
14659 # Whether or not to build shared libraries.
14660 build_libtool_libs=$enable_shared
14661
14662 # Whether or not to build static libraries.
14663 build_old_libs=$enable_static
14664
14665 # What type of objects to build.
14666 pic_mode=$pic_mode
14667
14668 # Whether or not to optimize for fast installation.
14669 fast_install=$enable_fast_install
14670
14671 # Shell to use when invoking shell scripts.
14672 SHELL=$lt_SHELL
14673
14674 # An echo program that protects backslashes.
14675 ECHO=$lt_ECHO
14676
14677 # The PATH separator for the build system.
14678 PATH_SEPARATOR=$lt_PATH_SEPARATOR
14679
14680 # The host system.
14681 host_alias=$host_alias
14682 host=$host
14683 host_os=$host_os
14684
14685 # The build system.
14686 build_alias=$build_alias
14687 build=$build
14688 build_os=$build_os
14689
14690 # A sed program that does not truncate output.
14691 SED=$lt_SED
14692
14693 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
14694 Xsed="\$SED -e 1s/^X//"
14695
14696 # A grep program that handles long lines.
14697 GREP=$lt_GREP
14698
14699 # An ERE matcher.
14700 EGREP=$lt_EGREP
14701
14702 # A literal string matcher.
14703 FGREP=$lt_FGREP
14704
14705 # A BSD- or MS-compatible name lister.
14706 NM=$lt_NM
14707
14708 # Whether we need soft or hard links.
14709 LN_S=$lt_LN_S
14710
14711 # What is the maximum length of a command?
14712 max_cmd_len=$max_cmd_len
14713
14714 # Object file suffix (normally "o").
14715 objext=$ac_objext
14716
14717 # Executable file suffix (normally "").
14718 exeext=$exeext
14719
14720 # whether the shell understands "unset".
14721 lt_unset=$lt_unset
14722
14723 # turn spaces into newlines.
14724 SP2NL=$lt_lt_SP2NL
14725
14726 # turn newlines into spaces.
14727 NL2SP=$lt_lt_NL2SP
14728
14729 # convert \$build file names to \$host format.
14730 to_host_file_cmd=$lt_cv_to_host_file_cmd
14731
14732 # convert \$build files to toolchain format.
14733 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
14734
14735 # Method to check whether dependent libraries are shared objects.
14736 deplibs_check_method=$lt_deplibs_check_method
14737
14738 # Command to use when deplibs_check_method = "file_magic".
14739 file_magic_cmd=$lt_file_magic_cmd
14740
14741 # How to find potential files when deplibs_check_method = "file_magic".
14742 file_magic_glob=$lt_file_magic_glob
14743
14744 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
14745 want_nocaseglob=$lt_want_nocaseglob
14746
14747 # Command to associate shared and link libraries.
14748 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
14749
14750 # The archiver.
14751 AR=$lt_AR
14752
14753 # Flags to create an archive.
14754 AR_FLAGS=$lt_AR_FLAGS
14755
14756 # How to feed a file listing to the archiver.
14757 archiver_list_spec=$lt_archiver_list_spec
14758
14759 # A symbol stripping program.
14760 STRIP=$lt_STRIP
14761
14762 # Commands used to install an old-style archive.
14763 RANLIB=$lt_RANLIB
14764 old_postinstall_cmds=$lt_old_postinstall_cmds
14765 old_postuninstall_cmds=$lt_old_postuninstall_cmds
14766
14767 # Whether to use a lock for old archive extraction.
14768 lock_old_archive_extraction=$lock_old_archive_extraction
14769
14770 # A C compiler.
14771 LTCC=$lt_CC
14772
14773 # LTCC compiler flags.
14774 LTCFLAGS=$lt_CFLAGS
14775
14776 # Take the output of nm and produce a listing of raw symbols and C names.
14777 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
14778
14779 # Transform the output of nm in a proper C declaration.
14780 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
14781
14782 # Transform the output of nm in a C name address pair.
14783 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
14784
14785 # Transform the output of nm in a C name address pair when lib prefix is needed.
14786 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
14787
14788 # Specify filename containing input files for \$NM.
14789 nm_file_list_spec=$lt_nm_file_list_spec
14790
14791 # The root where to search for dependent libraries,and in which our libraries should be installed.
14792 lt_sysroot=$lt_sysroot
14793
14794 # The name of the directory that contains temporary libtool files.
14795 objdir=$objdir
14796
14797 # Used to examine libraries when file_magic_cmd begins with "file".
14798 MAGIC_CMD=$MAGIC_CMD
14799
14800 # Must we lock files when doing compilation?
14801 need_locks=$lt_need_locks
14802
14803 # Manifest tool.
14804 MANIFEST_TOOL=$lt_MANIFEST_TOOL
14805
14806 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
14807 DSYMUTIL=$lt_DSYMUTIL
14808
14809 # Tool to change global to local symbols on Mac OS X.
14810 NMEDIT=$lt_NMEDIT
14811
14812 # Tool to manipulate fat objects and archives on Mac OS X.
14813 LIPO=$lt_LIPO
14814
14815 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
14816 OTOOL=$lt_OTOOL
14817
14818 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
14819 OTOOL64=$lt_OTOOL64
14820
14821 # Old archive suffix (normally "a").
14822 libext=$libext
14823
14824 # Shared library suffix (normally ".so").
14825 shrext_cmds=$lt_shrext_cmds
14826
14827 # The commands to extract the exported symbol list from a shared archive.
14828 extract_expsyms_cmds=$lt_extract_expsyms_cmds
14829
14830 # Variables whose values should be saved in libtool wrapper scripts and
14831 # restored at link time.
14832 variables_saved_for_relink=$lt_variables_saved_for_relink
14833
14834 # Do we need the "lib" prefix for modules?
14835 need_lib_prefix=$need_lib_prefix
14836
14837 # Do we need a version for libraries?
14838 need_version=$need_version
14839
14840 # Library versioning type.
14841 version_type=$version_type
14842
14843 # Shared library runtime path variable.
14844 runpath_var=$runpath_var
14845
14846 # Shared library path variable.
14847 shlibpath_var=$shlibpath_var
14848
14849 # Is shlibpath searched before the hard-coded library search path?
14850 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
14851
14852 # Format of library name prefix.
14853 libname_spec=$lt_libname_spec
14854
14855 # List of archive names. First name is the real one, the rest are links.
14856 # The last name is the one that the linker finds with -lNAME
14857 library_names_spec=$lt_library_names_spec
14858
14859 # The coded name of the library, if different from the real name.
14860 soname_spec=$lt_soname_spec
14861
14862 # Permission mode override for installation of shared libraries.
14863 install_override_mode=$lt_install_override_mode
14864
14865 # Command to use after installation of a shared archive.
14866 postinstall_cmds=$lt_postinstall_cmds
14867
14868 # Command to use after uninstallation of a shared archive.
14869 postuninstall_cmds=$lt_postuninstall_cmds
14870
14871 # Commands used to finish a libtool library installation in a directory.
14872 finish_cmds=$lt_finish_cmds
14873
14874 # As "finish_cmds", except a single script fragment to be evaled but
14875 # not shown.
14876 finish_eval=$lt_finish_eval
14877
14878 # Whether we should hardcode library paths into libraries.
14879 hardcode_into_libs=$hardcode_into_libs
14880
14881 # Compile-time system search path for libraries.
14882 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
14883
14884 # Run-time system search path for libraries.
14885 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
14886
14887 # Whether dlopen is supported.
14888 dlopen_support=$enable_dlopen
14889
14890 # Whether dlopen of programs is supported.
14891 dlopen_self=$enable_dlopen_self
14892
14893 # Whether dlopen of statically linked programs is supported.
14894 dlopen_self_static=$enable_dlopen_self_static
14895
14896 # Commands to strip libraries.
14897 old_striplib=$lt_old_striplib
14898 striplib=$lt_striplib
14899
14900
14901 # The linker used to build libraries.
14902 LD=$lt_LD
14903
14904 # How to create reloadable object files.
14905 reload_flag=$lt_reload_flag
14906 reload_cmds=$lt_reload_cmds
14907
14908 # Commands used to build an old-style archive.
14909 old_archive_cmds=$lt_old_archive_cmds
14910
14911 # A language specific compiler.
14912 CC=$lt_compiler
14913
14914 # Is the compiler the GNU compiler?
14915 with_gcc=$GCC
14916
14917 # Compiler flag to turn off builtin functions.
14918 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
14919
14920 # Additional compiler flags for building library objects.
14921 pic_flag=$lt_lt_prog_compiler_pic
14922
14923 # How to pass a linker flag through the compiler.
14924 wl=$lt_lt_prog_compiler_wl
14925
14926 # Compiler flag to prevent dynamic linking.
14927 link_static_flag=$lt_lt_prog_compiler_static
14928
14929 # Does compiler simultaneously support -c and -o options?
14930 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
14931
14932 # Whether or not to add -lc for building shared libraries.
14933 build_libtool_need_lc=$archive_cmds_need_lc
14934
14935 # Whether or not to disallow shared libs when runtime libs are static.
14936 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
14937
14938 # Compiler flag to allow reflexive dlopens.
14939 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
14940
14941 # Compiler flag to generate shared objects directly from archives.
14942 whole_archive_flag_spec=$lt_whole_archive_flag_spec
14943
14944 # Whether the compiler copes with passing no objects directly.
14945 compiler_needs_object=$lt_compiler_needs_object
14946
14947 # Create an old-style archive from a shared archive.
14948 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
14949
14950 # Create a temporary old-style archive to link instead of a shared archive.
14951 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
14952
14953 # Commands used to build a shared archive.
14954 archive_cmds=$lt_archive_cmds
14955 archive_expsym_cmds=$lt_archive_expsym_cmds
14956
14957 # Commands used to build a loadable module if different from building
14958 # a shared archive.
14959 module_cmds=$lt_module_cmds
14960 module_expsym_cmds=$lt_module_expsym_cmds
14961
14962 # Whether we are building with GNU ld or not.
14963 with_gnu_ld=$lt_with_gnu_ld
14964
14965 # Flag that allows shared libraries with undefined symbols to be built.
14966 allow_undefined_flag=$lt_allow_undefined_flag
14967
14968 # Flag that enforces no undefined symbols.
14969 no_undefined_flag=$lt_no_undefined_flag
14970
14971 # Flag to hardcode \$libdir into a binary during linking.
14972 # This must work even if \$libdir does not exist
14973 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
14974
14975 # Whether we need a single "-rpath" flag with a separated argument.
14976 hardcode_libdir_separator=$lt_hardcode_libdir_separator
14977
14978 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
14979 # DIR into the resulting binary.
14980 hardcode_direct=$hardcode_direct
14981
14982 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
14983 # DIR into the resulting binary and the resulting library dependency is
14984 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
14985 # library is relocated.
14986 hardcode_direct_absolute=$hardcode_direct_absolute
14987
14988 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
14989 # into the resulting binary.
14990 hardcode_minus_L=$hardcode_minus_L
14991
14992 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
14993 # into the resulting binary.
14994 hardcode_shlibpath_var=$hardcode_shlibpath_var
14995
14996 # Set to "yes" if building a shared library automatically hardcodes DIR
14997 # into the library and all subsequent libraries and executables linked
14998 # against it.
14999 hardcode_automatic=$hardcode_automatic
15000
15001 # Set to yes if linker adds runtime paths of dependent libraries
15002 # to runtime path list.
15003 inherit_rpath=$inherit_rpath
15004
15005 # Whether libtool must link a program against all its dependency libraries.
15006 link_all_deplibs=$link_all_deplibs
15007
15008 # Set to "yes" if exported symbols are required.
15009 always_export_symbols=$always_export_symbols
15010
15011 # The commands to list exported symbols.
15012 export_symbols_cmds=$lt_export_symbols_cmds
15013
15014 # Symbols that should not be listed in the preloaded symbols.
15015 exclude_expsyms=$lt_exclude_expsyms
15016
15017 # Symbols that must always be exported.
15018 include_expsyms=$lt_include_expsyms
15019
15020 # Commands necessary for linking programs (against libraries) with templates.
15021 prelink_cmds=$lt_prelink_cmds
15022
15023 # Commands necessary for finishing linking programs.
15024 postlink_cmds=$lt_postlink_cmds
15025
15026 # Specify filename containing input files.
15027 file_list_spec=$lt_file_list_spec
15028
15029 # How to hardcode a shared library path into an executable.
15030 hardcode_action=$hardcode_action
15031
15032 # ### END LIBTOOL CONFIG
15033
15034 _LT_EOF
15035
15036 case $host_os in
15037 aix3*)
15038 cat <<\_LT_EOF >> "$cfgfile"
15039 # AIX sometimes has problems with the GCC collect2 program. For some
15040 # reason, if we set the COLLECT_NAMES environment variable, the problems
15041 # vanish in a puff of smoke.
15042 if test "X${COLLECT_NAMES+set}" != Xset; then
15043 COLLECT_NAMES=
15044 export COLLECT_NAMES
15045 fi
15046 _LT_EOF
15047 ;;
15048 esac
15049
15050
15051 ltmain="$ac_aux_dir/ltmain.sh"
15052
15053
15054 # We use sed instead of cat because bash on DJGPP gets confused if
15055 # if finds mixed CR/LF and LF-only lines. Since sed operates in
15056 # text mode, it properly converts lines to CR/LF. This bash problem
15057 # is reportedly fixed, but why not run on old versions too?
15058 sed '$q' "$ltmain" >> "$cfgfile" \
15059 || (rm -f "$cfgfile"; exit 1)
15060
15061 if test x"$xsi_shell" = xyes; then
15062 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
15063 func_dirname ()\
15064 {\
15065 \ case ${1} in\
15066 \ */*) func_dirname_result="${1%/*}${2}" ;;\
15067 \ * ) func_dirname_result="${3}" ;;\
15068 \ esac\
15069 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
15070 && mv -f "$cfgfile.tmp" "$cfgfile" \
15071 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15072 test 0 -eq $? || _lt_function_replace_fail=:
15073
15074
15075 sed -e '/^func_basename ()$/,/^} # func_basename /c\
15076 func_basename ()\
15077 {\
15078 \ func_basename_result="${1##*/}"\
15079 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
15080 && mv -f "$cfgfile.tmp" "$cfgfile" \
15081 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15082 test 0 -eq $? || _lt_function_replace_fail=:
15083
15084
15085 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
15086 func_dirname_and_basename ()\
15087 {\
15088 \ case ${1} in\
15089 \ */*) func_dirname_result="${1%/*}${2}" ;;\
15090 \ * ) func_dirname_result="${3}" ;;\
15091 \ esac\
15092 \ func_basename_result="${1##*/}"\
15093 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
15094 && mv -f "$cfgfile.tmp" "$cfgfile" \
15095 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15096 test 0 -eq $? || _lt_function_replace_fail=:
15097
15098
15099 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
15100 func_stripname ()\
15101 {\
15102 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
15103 \ # positional parameters, so assign one to ordinary parameter first.\
15104 \ func_stripname_result=${3}\
15105 \ func_stripname_result=${func_stripname_result#"${1}"}\
15106 \ func_stripname_result=${func_stripname_result%"${2}"}\
15107 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
15108 && mv -f "$cfgfile.tmp" "$cfgfile" \
15109 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15110 test 0 -eq $? || _lt_function_replace_fail=:
15111
15112
15113 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
15114 func_split_long_opt ()\
15115 {\
15116 \ func_split_long_opt_name=${1%%=*}\
15117 \ func_split_long_opt_arg=${1#*=}\
15118 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
15119 && mv -f "$cfgfile.tmp" "$cfgfile" \
15120 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15121 test 0 -eq $? || _lt_function_replace_fail=:
15122
15123
15124 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
15125 func_split_short_opt ()\
15126 {\
15127 \ func_split_short_opt_arg=${1#??}\
15128 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
15129 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
15130 && mv -f "$cfgfile.tmp" "$cfgfile" \
15131 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15132 test 0 -eq $? || _lt_function_replace_fail=:
15133
15134
15135 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
15136 func_lo2o ()\
15137 {\
15138 \ case ${1} in\
15139 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
15140 \ *) func_lo2o_result=${1} ;;\
15141 \ esac\
15142 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
15143 && mv -f "$cfgfile.tmp" "$cfgfile" \
15144 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15145 test 0 -eq $? || _lt_function_replace_fail=:
15146
15147
15148 sed -e '/^func_xform ()$/,/^} # func_xform /c\
15149 func_xform ()\
15150 {\
15151 func_xform_result=${1%.*}.lo\
15152 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
15153 && mv -f "$cfgfile.tmp" "$cfgfile" \
15154 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15155 test 0 -eq $? || _lt_function_replace_fail=:
15156
15157
15158 sed -e '/^func_arith ()$/,/^} # func_arith /c\
15159 func_arith ()\
15160 {\
15161 func_arith_result=$(( $* ))\
15162 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
15163 && mv -f "$cfgfile.tmp" "$cfgfile" \
15164 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15165 test 0 -eq $? || _lt_function_replace_fail=:
15166
15167
15168 sed -e '/^func_len ()$/,/^} # func_len /c\
15169 func_len ()\
15170 {\
15171 func_len_result=${#1}\
15172 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
15173 && mv -f "$cfgfile.tmp" "$cfgfile" \
15174 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15175 test 0 -eq $? || _lt_function_replace_fail=:
15176
15177 fi
15178
15179 if test x"$lt_shell_append" = xyes; then
15180 sed -e '/^func_append ()$/,/^} # func_append /c\
15181 func_append ()\
15182 {\
15183 eval "${1}+=\\${2}"\
15184 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
15185 && mv -f "$cfgfile.tmp" "$cfgfile" \
15186 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15187 test 0 -eq $? || _lt_function_replace_fail=:
15188
15189
15190 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
15191 func_append_quoted ()\
15192 {\
15193 \ func_quote_for_eval "${2}"\
15194 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
15195 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
15196 && mv -f "$cfgfile.tmp" "$cfgfile" \
15197 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15198 test 0 -eq $? || _lt_function_replace_fail=:
15199
15200
15201 # Save a `func_append' function call where possible by direct use of '+='
15202 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
15203 && mv -f "$cfgfile.tmp" "$cfgfile" \
15204 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15205 test 0 -eq $? || _lt_function_replace_fail=:
15206 else
15207 # Save a `func_append' function call even when '+=' is not available
15208 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
15209 && mv -f "$cfgfile.tmp" "$cfgfile" \
15210 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
15211 test 0 -eq $? || _lt_function_replace_fail=:
15212 fi
15213
15214 if test x"$_lt_function_replace_fail" = x":"; then
15215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
15216 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
15217 fi
15218
15219
15220 mv -f "$cfgfile" "$ofile" ||
15221 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
15222 chmod +x "$ofile"
15223
15224 ;;
15225
15226 esac
15227 done # for ac_tag
15228
15229
15230 as_fn_exit 0
15231 _ACEOF
15232 ac_clean_files=$ac_clean_files_save
15233
15234 test $ac_write_fail = 0 ||
15235 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15236
15237
15238 # configure is writing to config.log, and then calls config.status.
15239 # config.status does its own redirection, appending to config.log.
15240 # Unfortunately, on DOS this fails, as config.log is still kept open
15241 # by configure, so config.status won't be able to write to it; its
15242 # output is simply discarded. So we exec the FD to /dev/null,
15243 # effectively closing config.log, so it can be properly (re)opened and
15244 # appended to by config.status. When coming back to configure, we
15245 # need to make the FD available again.
15246 if test "$no_create" != yes; then
15247 ac_cs_success=:
15248 ac_config_status_args=
15249 test "$silent" = yes &&
15250 ac_config_status_args="$ac_config_status_args --quiet"
15251 exec 5>/dev/null
15252 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15253 exec 5>>config.log
15254 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15255 # would make configure fail if this is the last instruction.
15256 $ac_cs_success || as_fn_exit 1
15257 fi
15258 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15260 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15261 fi
15262
15263
15264
15265 echo "
15266 gnome-menus $VERSION
15267 `echo gnome-menus $VERSION | sed "s/./=/g"`
15268
15269 prefix: ${prefix}
15270 exec_prefix: ${exec_prefix}
15271 libdir: ${libdir}
15272 bindir: ${bindir}
15273 sbindir: ${sbindir}
15274 sysconfdir: ${sysconfdir}
15275 localstatedir: ${localstatedir}
15276 datadir: ${datadir}
15277 source code location: ${srcdir}
15278 compiler: ${CC}
15279 cflags: ${CFLAGS}
15280 Maintainer mode: ${USE_MAINTAINER_MODE}
15281 Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
15282
15283 Turn on debugging: ${enable_debug}
15284 Build introspection support: ${found_introspection}
15285
15286 "
0 AC_PREREQ(2.62)
1
2 AC_INIT([cinnamon-menus], [2.2.0])
3 AC_CONFIG_SRCDIR(libmenu/gmenu-tree.h)
4
5 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
6 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_HEADERS(config.h)
9
10 AM_MAINTAINER_MODE
11 GNOME_MAINTAINER_MODE_DEFINES
12
13 # Before making a release, the LT_VERSION string should be modified.
14 # The string is of the form C:R:A.
15 # - If interfaces have been changed or added, but binary compatibility has
16 # been preserved, change to C+1:0:A+1
17 # - If binary compatibility has been broken (eg removed or changed interfaces)
18 # change to C+1:0:0
19 # - If the interface is the same as the previous version, change to C:R+1:A
20
21 LIB_MENU_LT_VERSION=0:1:0
22 AC_SUBST(LIB_MENU_LT_VERSION)
23
24 AC_ISC_POSIX
25 AC_PROG_CC
26 AC_STDC_HEADERS
27 AC_ARG_PROGRAM
28 AC_LIBTOOL_WIN32_DLL
29 AM_PROG_LIBTOOL
30
31 PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= 2.29.15)
32 AC_SUBST(GIO_UNIX_CFLAGS)
33 AC_SUBST(GIO_UNIX_LIBS)
34
35 GNOME_COMPILE_WARNINGS(yes)
36
37 AC_ARG_ENABLE(deprecation_flags,
38 [AC_HELP_STRING([--enable-deprecation-flags],
39 [use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
40 [enable_deprecation_flags=no])
41
42 if test "x$enable_deprecation_flags" = "xyes"; then
43 DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
44 AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
45 fi
46
47 AC_ARG_ENABLE(debug,
48 [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
49 [turn on debugging @<:@default=debug_default@:>@])],,
50 [enable_debug=debug_default])
51 if test "x$enable_debug" = "xyes"; then
52 DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
53 else
54 if test "x$enable_debug" = "xno"; then
55 DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
56 else
57 DEBUG_CFLAGS="-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"
58 fi
59 fi
60 AC_SUBST(DEBUG_CFLAGS)
61
62 GOBJECT_INTROSPECTION_CHECK([0.9.5])
63
64 AC_OUTPUT([
65 Makefile
66 libmenu/Makefile
67 libmenu/libcinnamon-menu-3.0.pc
68 libmenu/libcinnamon-menu-3.0-uninstalled.pc
69 ])
70
71 dnl ---------------------------------------------------------------------------
72 dnl - Show summary
73 dnl ---------------------------------------------------------------------------
74
75 echo "
76 cinnamon-menus $VERSION
77 `echo cinnamon-menus $VERSION | sed "s/./=/g"`
78
79 prefix: ${prefix}
80 exec_prefix: ${exec_prefix}
81 libdir: ${libdir}
82 bindir: ${bindir}
83 sbindir: ${sbindir}
84 sysconfdir: ${sysconfdir}
85 localstatedir: ${localstatedir}
86 datadir: ${datadir}
87 source code location: ${srcdir}
88 compiler: ${CC}
89 cflags: ${CFLAGS}
90 Maintainer mode: ${USE_MAINTAINER_MODE}
91 Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
92
93 Turn on debugging: ${enable_debug}
94 Build introspection support: ${found_introspection}
95
96 "
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2012-10-18.11; # UTC
4
5 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
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, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU 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, see <http://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
26
27 case $1 in
28 '')
29 echo "$0: No command. Try '$0 --help' for more information." 1>&2
30 exit 1;
31 ;;
32 -h | --h*)
33 cat <<\EOF
34 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
35
36 Run PROGRAMS ARGS to compile a file, generating dependencies
37 as side-effects.
38
39 Environment variables:
40 depmode Dependency tracking mode.
41 source Source file read by 'PROGRAMS ARGS'.
42 object Object file output by 'PROGRAMS ARGS'.
43 DEPDIR directory where to store dependencies.
44 depfile Dependency file to output.
45 tmpdepfile Temporary file to use when outputting dependencies.
46 libtool Whether libtool is used (yes/no).
47
48 Report bugs to <bug-automake@gnu.org>.
49 EOF
50 exit $?
51 ;;
52 -v | --v*)
53 echo "depcomp $scriptversion"
54 exit $?
55 ;;
56 esac
57
58 # Get the directory component of the given path, and save it in the
59 # global variables '$dir'. Note that this directory component will
60 # be either empty or ending with a '/' character. This is deliberate.
61 set_dir_from ()
62 {
63 case $1 in
64 */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
65 *) dir=;;
66 esac
67 }
68
69 # Get the suffix-stripped basename of the given path, and save it the
70 # global variable '$base'.
71 set_base_from ()
72 {
73 base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
74 }
75
76 # If no dependency file was actually created by the compiler invocation,
77 # we still have to create a dummy depfile, to avoid errors with the
78 # Makefile "include basename.Plo" scheme.
79 make_dummy_depfile ()
80 {
81 echo "#dummy" > "$depfile"
82 }
83
84 # Factor out some common post-processing of the generated depfile.
85 # Requires the auxiliary global variable '$tmpdepfile' to be set.
86 aix_post_process_depfile ()
87 {
88 # If the compiler actually managed to produce a dependency file,
89 # post-process it.
90 if test -f "$tmpdepfile"; then
91 # Each line is of the form 'foo.o: dependency.h'.
92 # Do two passes, one to just change these to
93 # $object: dependency.h
94 # and one to simply output
95 # dependency.h:
96 # which is needed to avoid the deleted-header problem.
97 { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
98 sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
99 } > "$depfile"
100 rm -f "$tmpdepfile"
101 else
102 make_dummy_depfile
103 fi
104 }
105
106 # A tabulation character.
107 tab=' '
108 # A newline character.
109 nl='
110 '
111 # Character ranges might be problematic outside the C locale.
112 # These definitions help.
113 upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
114 lower=abcdefghijklmnopqrstuvwxyz
115 digits=0123456789
116 alpha=${upper}${lower}
117
118 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
119 echo "depcomp: Variables source, object and depmode must be set" 1>&2
120 exit 1
121 fi
122
123 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
124 depfile=${depfile-`echo "$object" |
125 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
126 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
127
128 rm -f "$tmpdepfile"
129
130 # Avoid interferences from the environment.
131 gccflag= dashmflag=
132
133 # Some modes work just like other modes, but use different flags. We
134 # parameterize here, but still list the modes in the big case below,
135 # to make depend.m4 easier to write. Note that we *cannot* use a case
136 # here, because this file can only contain one case statement.
137 if test "$depmode" = hp; then
138 # HP compiler uses -M and no extra arg.
139 gccflag=-M
140 depmode=gcc
141 fi
142
143 if test "$depmode" = dashXmstdout; then
144 # This is just like dashmstdout with a different argument.
145 dashmflag=-xM
146 depmode=dashmstdout
147 fi
148
149 cygpath_u="cygpath -u -f -"
150 if test "$depmode" = msvcmsys; then
151 # This is just like msvisualcpp but w/o cygpath translation.
152 # Just convert the backslash-escaped backslashes to single forward
153 # slashes to satisfy depend.m4
154 cygpath_u='sed s,\\\\,/,g'
155 depmode=msvisualcpp
156 fi
157
158 if test "$depmode" = msvc7msys; then
159 # This is just like msvc7 but w/o cygpath translation.
160 # Just convert the backslash-escaped backslashes to single forward
161 # slashes to satisfy depend.m4
162 cygpath_u='sed s,\\\\,/,g'
163 depmode=msvc7
164 fi
165
166 if test "$depmode" = xlc; then
167 # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
168 gccflag=-qmakedep=gcc,-MF
169 depmode=gcc
170 fi
171
172 case "$depmode" in
173 gcc3)
174 ## gcc 3 implements dependency tracking that does exactly what
175 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
176 ## it if -MD -MP comes after the -MF stuff. Hmm.
177 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
178 ## the command line argument order; so add the flags where they
179 ## appear in depend2.am. Note that the slowdown incurred here
180 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
181 for arg
182 do
183 case $arg in
184 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
185 *) set fnord "$@" "$arg" ;;
186 esac
187 shift # fnord
188 shift # $arg
189 done
190 "$@"
191 stat=$?
192 if test $stat -ne 0; then
193 rm -f "$tmpdepfile"
194 exit $stat
195 fi
196 mv "$tmpdepfile" "$depfile"
197 ;;
198
199 gcc)
200 ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
201 ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
202 ## (see the conditional assignment to $gccflag above).
203 ## There are various ways to get dependency output from gcc. Here's
204 ## why we pick this rather obscure method:
205 ## - Don't want to use -MD because we'd like the dependencies to end
206 ## up in a subdir. Having to rename by hand is ugly.
207 ## (We might end up doing this anyway to support other compilers.)
208 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
209 ## -MM, not -M (despite what the docs say). Also, it might not be
210 ## supported by the other compilers which use the 'gcc' depmode.
211 ## - Using -M directly means running the compiler twice (even worse
212 ## than renaming).
213 if test -z "$gccflag"; then
214 gccflag=-MD,
215 fi
216 "$@" -Wp,"$gccflag$tmpdepfile"
217 stat=$?
218 if test $stat -ne 0; then
219 rm -f "$tmpdepfile"
220 exit $stat
221 fi
222 rm -f "$depfile"
223 echo "$object : \\" > "$depfile"
224 # The second -e expression handles DOS-style file names with drive
225 # letters.
226 sed -e 's/^[^:]*: / /' \
227 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
228 ## This next piece of magic avoids the "deleted header file" problem.
229 ## The problem is that when a header file which appears in a .P file
230 ## is deleted, the dependency causes make to die (because there is
231 ## typically no way to rebuild the header). We avoid this by adding
232 ## dummy dependencies for each header file. Too bad gcc doesn't do
233 ## this for us directly.
234 ## Some versions of gcc put a space before the ':'. On the theory
235 ## that the space means something, we add a space to the output as
236 ## well. hp depmode also adds that space, but also prefixes the VPATH
237 ## to the object. Take care to not repeat it in the output.
238 ## Some versions of the HPUX 10.20 sed can't process this invocation
239 ## correctly. Breaking it into two sed invocations is a workaround.
240 tr ' ' "$nl" < "$tmpdepfile" \
241 | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
242 | sed -e 's/$/ :/' >> "$depfile"
243 rm -f "$tmpdepfile"
244 ;;
245
246 hp)
247 # This case exists only to let depend.m4 do its work. It works by
248 # looking at the text of this script. This case will never be run,
249 # since it is checked for above.
250 exit 1
251 ;;
252
253 sgi)
254 if test "$libtool" = yes; then
255 "$@" "-Wp,-MDupdate,$tmpdepfile"
256 else
257 "$@" -MDupdate "$tmpdepfile"
258 fi
259 stat=$?
260 if test $stat -ne 0; then
261 rm -f "$tmpdepfile"
262 exit $stat
263 fi
264 rm -f "$depfile"
265
266 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
267 echo "$object : \\" > "$depfile"
268 # Clip off the initial element (the dependent). Don't try to be
269 # clever and replace this with sed code, as IRIX sed won't handle
270 # lines with more than a fixed number of characters (4096 in
271 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
272 # the IRIX cc adds comments like '#:fec' to the end of the
273 # dependency line.
274 tr ' ' "$nl" < "$tmpdepfile" \
275 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
276 | tr "$nl" ' ' >> "$depfile"
277 echo >> "$depfile"
278 # The second pass generates a dummy entry for each header file.
279 tr ' ' "$nl" < "$tmpdepfile" \
280 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
281 >> "$depfile"
282 else
283 make_dummy_depfile
284 fi
285 rm -f "$tmpdepfile"
286 ;;
287
288 xlc)
289 # This case exists only to let depend.m4 do its work. It works by
290 # looking at the text of this script. This case will never be run,
291 # since it is checked for above.
292 exit 1
293 ;;
294
295 aix)
296 # The C for AIX Compiler uses -M and outputs the dependencies
297 # in a .u file. In older versions, this file always lives in the
298 # current directory. Also, the AIX compiler puts '$object:' at the
299 # start of each line; $object doesn't have directory information.
300 # Version 6 uses the directory in both cases.
301 set_dir_from "$object"
302 set_base_from "$object"
303 if test "$libtool" = yes; then
304 tmpdepfile1=$dir$base.u
305 tmpdepfile2=$base.u
306 tmpdepfile3=$dir.libs/$base.u
307 "$@" -Wc,-M
308 else
309 tmpdepfile1=$dir$base.u
310 tmpdepfile2=$dir$base.u
311 tmpdepfile3=$dir$base.u
312 "$@" -M
313 fi
314 stat=$?
315 if test $stat -ne 0; then
316 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
317 exit $stat
318 fi
319
320 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
321 do
322 test -f "$tmpdepfile" && break
323 done
324 aix_post_process_depfile
325 ;;
326
327 tcc)
328 # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
329 # FIXME: That version still under development at the moment of writing.
330 # Make that this statement remains true also for stable, released
331 # versions.
332 # It will wrap lines (doesn't matter whether long or short) with a
333 # trailing '\', as in:
334 #
335 # foo.o : \
336 # foo.c \
337 # foo.h \
338 #
339 # It will put a trailing '\' even on the last line, and will use leading
340 # spaces rather than leading tabs (at least since its commit 0394caf7
341 # "Emit spaces for -MD").
342 "$@" -MD -MF "$tmpdepfile"
343 stat=$?
344 if test $stat -ne 0; then
345 rm -f "$tmpdepfile"
346 exit $stat
347 fi
348 rm -f "$depfile"
349 # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
350 # We have to change lines of the first kind to '$object: \'.
351 sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
352 # And for each line of the second kind, we have to emit a 'dep.h:'
353 # dummy dependency, to avoid the deleted-header problem.
354 sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
355 rm -f "$tmpdepfile"
356 ;;
357
358 ## The order of this option in the case statement is important, since the
359 ## shell code in configure will try each of these formats in the order
360 ## listed in this file. A plain '-MD' option would be understood by many
361 ## compilers, so we must ensure this comes after the gcc and icc options.
362 pgcc)
363 # Portland's C compiler understands '-MD'.
364 # Will always output deps to 'file.d' where file is the root name of the
365 # source file under compilation, even if file resides in a subdirectory.
366 # The object file name does not affect the name of the '.d' file.
367 # pgcc 10.2 will output
368 # foo.o: sub/foo.c sub/foo.h
369 # and will wrap long lines using '\' :
370 # foo.o: sub/foo.c ... \
371 # sub/foo.h ... \
372 # ...
373 set_dir_from "$object"
374 # Use the source, not the object, to determine the base name, since
375 # that's sadly what pgcc will do too.
376 set_base_from "$source"
377 tmpdepfile=$base.d
378
379 # For projects that build the same source file twice into different object
380 # files, the pgcc approach of using the *source* file root name can cause
381 # problems in parallel builds. Use a locking strategy to avoid stomping on
382 # the same $tmpdepfile.
383 lockdir=$base.d-lock
384 trap "
385 echo '$0: caught signal, cleaning up...' >&2
386 rmdir '$lockdir'
387 exit 1
388 " 1 2 13 15
389 numtries=100
390 i=$numtries
391 while test $i -gt 0; do
392 # mkdir is a portable test-and-set.
393 if mkdir "$lockdir" 2>/dev/null; then
394 # This process acquired the lock.
395 "$@" -MD
396 stat=$?
397 # Release the lock.
398 rmdir "$lockdir"
399 break
400 else
401 # If the lock is being held by a different process, wait
402 # until the winning process is done or we timeout.
403 while test -d "$lockdir" && test $i -gt 0; do
404 sleep 1
405 i=`expr $i - 1`
406 done
407 fi
408 i=`expr $i - 1`
409 done
410 trap - 1 2 13 15
411 if test $i -le 0; then
412 echo "$0: failed to acquire lock after $numtries attempts" >&2
413 echo "$0: check lockdir '$lockdir'" >&2
414 exit 1
415 fi
416
417 if test $stat -ne 0; then
418 rm -f "$tmpdepfile"
419 exit $stat
420 fi
421 rm -f "$depfile"
422 # Each line is of the form `foo.o: dependent.h',
423 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
424 # Do two passes, one to just change these to
425 # `$object: dependent.h' and one to simply `dependent.h:'.
426 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
427 # Some versions of the HPUX 10.20 sed can't process this invocation
428 # correctly. Breaking it into two sed invocations is a workaround.
429 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
430 | sed -e 's/$/ :/' >> "$depfile"
431 rm -f "$tmpdepfile"
432 ;;
433
434 hp2)
435 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
436 # compilers, which have integrated preprocessors. The correct option
437 # to use with these is +Maked; it writes dependencies to a file named
438 # 'foo.d', which lands next to the object file, wherever that
439 # happens to be.
440 # Much of this is similar to the tru64 case; see comments there.
441 set_dir_from "$object"
442 set_base_from "$object"
443 if test "$libtool" = yes; then
444 tmpdepfile1=$dir$base.d
445 tmpdepfile2=$dir.libs/$base.d
446 "$@" -Wc,+Maked
447 else
448 tmpdepfile1=$dir$base.d
449 tmpdepfile2=$dir$base.d
450 "$@" +Maked
451 fi
452 stat=$?
453 if test $stat -ne 0; then
454 rm -f "$tmpdepfile1" "$tmpdepfile2"
455 exit $stat
456 fi
457
458 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
459 do
460 test -f "$tmpdepfile" && break
461 done
462 if test -f "$tmpdepfile"; then
463 sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
464 # Add 'dependent.h:' lines.
465 sed -ne '2,${
466 s/^ *//
467 s/ \\*$//
468 s/$/:/
469 p
470 }' "$tmpdepfile" >> "$depfile"
471 else
472 make_dummy_depfile
473 fi
474 rm -f "$tmpdepfile" "$tmpdepfile2"
475 ;;
476
477 tru64)
478 # The Tru64 compiler uses -MD to generate dependencies as a side
479 # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
480 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
481 # dependencies in 'foo.d' instead, so we check for that too.
482 # Subdirectories are respected.
483 set_dir_from "$object"
484 set_base_from "$object"
485
486 if test "$libtool" = yes; then
487 # Libtool generates 2 separate objects for the 2 libraries. These
488 # two compilations output dependencies in $dir.libs/$base.o.d and
489 # in $dir$base.o.d. We have to check for both files, because
490 # one of the two compilations can be disabled. We should prefer
491 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
492 # automatically cleaned when .libs/ is deleted, while ignoring
493 # the former would cause a distcleancheck panic.
494 tmpdepfile1=$dir$base.o.d # libtool 1.5
495 tmpdepfile2=$dir.libs/$base.o.d # Likewise.
496 tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
497 "$@" -Wc,-MD
498 else
499 tmpdepfile1=$dir$base.d
500 tmpdepfile2=$dir$base.d
501 tmpdepfile3=$dir$base.d
502 "$@" -MD
503 fi
504
505 stat=$?
506 if test $stat -ne 0; then
507 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
508 exit $stat
509 fi
510
511 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
512 do
513 test -f "$tmpdepfile" && break
514 done
515 # Same post-processing that is required for AIX mode.
516 aix_post_process_depfile
517 ;;
518
519 msvc7)
520 if test "$libtool" = yes; then
521 showIncludes=-Wc,-showIncludes
522 else
523 showIncludes=-showIncludes
524 fi
525 "$@" $showIncludes > "$tmpdepfile"
526 stat=$?
527 grep -v '^Note: including file: ' "$tmpdepfile"
528 if test $stat -ne 0; then
529 rm -f "$tmpdepfile"
530 exit $stat
531 fi
532 rm -f "$depfile"
533 echo "$object : \\" > "$depfile"
534 # The first sed program below extracts the file names and escapes
535 # backslashes for cygpath. The second sed program outputs the file
536 # name when reading, but also accumulates all include files in the
537 # hold buffer in order to output them again at the end. This only
538 # works with sed implementations that can handle large buffers.
539 sed < "$tmpdepfile" -n '
540 /^Note: including file: *\(.*\)/ {
541 s//\1/
542 s/\\/\\\\/g
543 p
544 }' | $cygpath_u | sort -u | sed -n '
545 s/ /\\ /g
546 s/\(.*\)/'"$tab"'\1 \\/p
547 s/.\(.*\) \\/\1:/
548 H
549 $ {
550 s/.*/'"$tab"'/
551 G
552 p
553 }' >> "$depfile"
554 rm -f "$tmpdepfile"
555 ;;
556
557 msvc7msys)
558 # This case exists only to let depend.m4 do its work. It works by
559 # looking at the text of this script. This case will never be run,
560 # since it is checked for above.
561 exit 1
562 ;;
563
564 #nosideeffect)
565 # This comment above is used by automake to tell side-effect
566 # dependency tracking mechanisms from slower ones.
567
568 dashmstdout)
569 # Important note: in order to support this mode, a compiler *must*
570 # always write the preprocessed file to stdout, regardless of -o.
571 "$@" || exit $?
572
573 # Remove the call to Libtool.
574 if test "$libtool" = yes; then
575 while test "X$1" != 'X--mode=compile'; do
576 shift
577 done
578 shift
579 fi
580
581 # Remove '-o $object'.
582 IFS=" "
583 for arg
584 do
585 case $arg in
586 -o)
587 shift
588 ;;
589 $object)
590 shift
591 ;;
592 *)
593 set fnord "$@" "$arg"
594 shift # fnord
595 shift # $arg
596 ;;
597 esac
598 done
599
600 test -z "$dashmflag" && dashmflag=-M
601 # Require at least two characters before searching for ':'
602 # in the target name. This is to cope with DOS-style filenames:
603 # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
604 "$@" $dashmflag |
605 sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
606 rm -f "$depfile"
607 cat < "$tmpdepfile" > "$depfile"
608 # Some versions of the HPUX 10.20 sed can't process this sed invocation
609 # correctly. Breaking it into two sed invocations is a workaround.
610 tr ' ' "$nl" < "$tmpdepfile" \
611 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
612 | sed -e 's/$/ :/' >> "$depfile"
613 rm -f "$tmpdepfile"
614 ;;
615
616 dashXmstdout)
617 # This case only exists to satisfy depend.m4. It is never actually
618 # run, as this mode is specially recognized in the preamble.
619 exit 1
620 ;;
621
622 makedepend)
623 "$@" || exit $?
624 # Remove any Libtool call
625 if test "$libtool" = yes; then
626 while test "X$1" != 'X--mode=compile'; do
627 shift
628 done
629 shift
630 fi
631 # X makedepend
632 shift
633 cleared=no eat=no
634 for arg
635 do
636 case $cleared in
637 no)
638 set ""; shift
639 cleared=yes ;;
640 esac
641 if test $eat = yes; then
642 eat=no
643 continue
644 fi
645 case "$arg" in
646 -D*|-I*)
647 set fnord "$@" "$arg"; shift ;;
648 # Strip any option that makedepend may not understand. Remove
649 # the object too, otherwise makedepend will parse it as a source file.
650 -arch)
651 eat=yes ;;
652 -*|$object)
653 ;;
654 *)
655 set fnord "$@" "$arg"; shift ;;
656 esac
657 done
658 obj_suffix=`echo "$object" | sed 's/^.*\././'`
659 touch "$tmpdepfile"
660 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
661 rm -f "$depfile"
662 # makedepend may prepend the VPATH from the source file name to the object.
663 # No need to regex-escape $object, excess matching of '.' is harmless.
664 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
665 # Some versions of the HPUX 10.20 sed can't process the last invocation
666 # correctly. Breaking it into two sed invocations is a workaround.
667 sed '1,2d' "$tmpdepfile" \
668 | tr ' ' "$nl" \
669 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
670 | sed -e 's/$/ :/' >> "$depfile"
671 rm -f "$tmpdepfile" "$tmpdepfile".bak
672 ;;
673
674 cpp)
675 # Important note: in order to support this mode, a compiler *must*
676 # always write the preprocessed file to stdout.
677 "$@" || exit $?
678
679 # Remove the call to Libtool.
680 if test "$libtool" = yes; then
681 while test "X$1" != 'X--mode=compile'; do
682 shift
683 done
684 shift
685 fi
686
687 # Remove '-o $object'.
688 IFS=" "
689 for arg
690 do
691 case $arg in
692 -o)
693 shift
694 ;;
695 $object)
696 shift
697 ;;
698 *)
699 set fnord "$@" "$arg"
700 shift # fnord
701 shift # $arg
702 ;;
703 esac
704 done
705
706 "$@" -E \
707 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
708 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
709 | sed '$ s: \\$::' > "$tmpdepfile"
710 rm -f "$depfile"
711 echo "$object : \\" > "$depfile"
712 cat < "$tmpdepfile" >> "$depfile"
713 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
714 rm -f "$tmpdepfile"
715 ;;
716
717 msvisualcpp)
718 # Important note: in order to support this mode, a compiler *must*
719 # always write the preprocessed file to stdout.
720 "$@" || exit $?
721
722 # Remove the call to Libtool.
723 if test "$libtool" = yes; then
724 while test "X$1" != 'X--mode=compile'; do
725 shift
726 done
727 shift
728 fi
729
730 IFS=" "
731 for arg
732 do
733 case "$arg" in
734 -o)
735 shift
736 ;;
737 $object)
738 shift
739 ;;
740 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
741 set fnord "$@"
742 shift
743 shift
744 ;;
745 *)
746 set fnord "$@" "$arg"
747 shift
748 shift
749 ;;
750 esac
751 done
752 "$@" -E 2>/dev/null |
753 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
754 rm -f "$depfile"
755 echo "$object : \\" > "$depfile"
756 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
757 echo "$tab" >> "$depfile"
758 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
759 rm -f "$tmpdepfile"
760 ;;
761
762 msvcmsys)
763 # This case exists only to let depend.m4 do its work. It works by
764 # looking at the text of this script. This case will never be run,
765 # since it is checked for above.
766 exit 1
767 ;;
768
769 none)
770 exec "$@"
771 ;;
772
773 *)
774 echo "Unknown depmode $depmode" 1>&2
775 exit 1
776 ;;
777 esac
778
779 exit 0
780
781 # Local Variables:
782 # mode: shell-script
783 # sh-indentation: 2
784 # eval: (add-hook 'write-file-hooks 'time-stamp)
785 # time-stamp-start: "scriptversion="
786 # time-stamp-format: "%:y-%02m-%02d.%02H"
787 # time-stamp-time-zone: "UTC"
788 # time-stamp-end: "; # UTC"
789 # End:
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2011-11-20.07; # UTC
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # 'make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 # Protect names problematic for 'test' and other utilities.
159 case $dst_arg in
160 -* | [=\(\)!]) dst_arg=./$dst_arg;;
161 esac
162 shift;;
163
164 -T) no_target_directory=true;;
165
166 --version) echo "$0 $scriptversion"; exit $?;;
167
168 --) shift
169 break;;
170
171 -*) echo "$0: invalid option: $1" >&2
172 exit 1;;
173
174 *) break;;
175 esac
176 shift
177 done
178
179 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
180 # When -d is used, all remaining arguments are directories to create.
181 # When -t is used, the destination is already specified.
182 # Otherwise, the last argument is the destination. Remove it from $@.
183 for arg
184 do
185 if test -n "$dst_arg"; then
186 # $@ is not empty: it contains at least $arg.
187 set fnord "$@" "$dst_arg"
188 shift # fnord
189 fi
190 shift # arg
191 dst_arg=$arg
192 # Protect names problematic for 'test' and other utilities.
193 case $dst_arg in
194 -* | [=\(\)!]) dst_arg=./$dst_arg;;
195 esac
196 done
197 fi
198
199 if test $# -eq 0; then
200 if test -z "$dir_arg"; then
201 echo "$0: no input file specified." >&2
202 exit 1
203 fi
204 # It's OK to call 'install-sh -d' without argument.
205 # This can happen when creating conditional directories.
206 exit 0
207 fi
208
209 if test -z "$dir_arg"; then
210 do_exit='(exit $ret); exit $ret'
211 trap "ret=129; $do_exit" 1
212 trap "ret=130; $do_exit" 2
213 trap "ret=141; $do_exit" 13
214 trap "ret=143; $do_exit" 15
215
216 # Set umask so as not to create temps with too-generous modes.
217 # However, 'strip' requires both read and write access to temps.
218 case $mode in
219 # Optimize common cases.
220 *644) cp_umask=133;;
221 *755) cp_umask=22;;
222
223 *[0-7])
224 if test -z "$stripcmd"; then
225 u_plus_rw=
226 else
227 u_plus_rw='% 200'
228 fi
229 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
230 *)
231 if test -z "$stripcmd"; then
232 u_plus_rw=
233 else
234 u_plus_rw=,u+rw
235 fi
236 cp_umask=$mode$u_plus_rw;;
237 esac
238 fi
239
240 for src
241 do
242 # Protect names problematic for 'test' and other utilities.
243 case $src in
244 -* | [=\(\)!]) src=./$src;;
245 esac
246
247 if test -n "$dir_arg"; then
248 dst=$src
249 dstdir=$dst
250 test -d "$dstdir"
251 dstdir_status=$?
252 else
253
254 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
255 # might cause directories to be created, which would be especially bad
256 # if $src (and thus $dsttmp) contains '*'.
257 if test ! -f "$src" && test ! -d "$src"; then
258 echo "$0: $src does not exist." >&2
259 exit 1
260 fi
261
262 if test -z "$dst_arg"; then
263 echo "$0: no destination specified." >&2
264 exit 1
265 fi
266 dst=$dst_arg
267
268 # If destination is a directory, append the input filename; won't work
269 # if double slashes aren't ignored.
270 if test -d "$dst"; then
271 if test -n "$no_target_directory"; then
272 echo "$0: $dst_arg: Is a directory" >&2
273 exit 1
274 fi
275 dstdir=$dst
276 dst=$dstdir/`basename "$src"`
277 dstdir_status=0
278 else
279 # Prefer dirname, but fall back on a substitute if dirname fails.
280 dstdir=`
281 (dirname "$dst") 2>/dev/null ||
282 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
283 X"$dst" : 'X\(//\)[^/]' \| \
284 X"$dst" : 'X\(//\)$' \| \
285 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
286 echo X"$dst" |
287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
288 s//\1/
289 q
290 }
291 /^X\(\/\/\)[^/].*/{
292 s//\1/
293 q
294 }
295 /^X\(\/\/\)$/{
296 s//\1/
297 q
298 }
299 /^X\(\/\).*/{
300 s//\1/
301 q
302 }
303 s/.*/./; q'
304 `
305
306 test -d "$dstdir"
307 dstdir_status=$?
308 fi
309 fi
310
311 obsolete_mkdir_used=false
312
313 if test $dstdir_status != 0; then
314 case $posix_mkdir in
315 '')
316 # Create intermediate dirs using mode 755 as modified by the umask.
317 # This is like FreeBSD 'install' as of 1997-10-28.
318 umask=`umask`
319 case $stripcmd.$umask in
320 # Optimize common cases.
321 *[2367][2367]) mkdir_umask=$umask;;
322 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
323
324 *[0-7])
325 mkdir_umask=`expr $umask + 22 \
326 - $umask % 100 % 40 + $umask % 20 \
327 - $umask % 10 % 4 + $umask % 2
328 `;;
329 *) mkdir_umask=$umask,go-w;;
330 esac
331
332 # With -d, create the new directory with the user-specified mode.
333 # Otherwise, rely on $mkdir_umask.
334 if test -n "$dir_arg"; then
335 mkdir_mode=-m$mode
336 else
337 mkdir_mode=
338 fi
339
340 posix_mkdir=false
341 case $umask in
342 *[123567][0-7][0-7])
343 # POSIX mkdir -p sets u+wx bits regardless of umask, which
344 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
345 ;;
346 *)
347 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
348 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
349
350 if (umask $mkdir_umask &&
351 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
352 then
353 if test -z "$dir_arg" || {
354 # Check for POSIX incompatibilities with -m.
355 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
356 # other-writable bit of parent directory when it shouldn't.
357 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
358 ls_ld_tmpdir=`ls -ld "$tmpdir"`
359 case $ls_ld_tmpdir in
360 d????-?r-*) different_mode=700;;
361 d????-?--*) different_mode=755;;
362 *) false;;
363 esac &&
364 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
365 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
366 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
367 }
368 }
369 then posix_mkdir=:
370 fi
371 rmdir "$tmpdir/d" "$tmpdir"
372 else
373 # Remove any dirs left behind by ancient mkdir implementations.
374 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
375 fi
376 trap '' 0;;
377 esac;;
378 esac
379
380 if
381 $posix_mkdir && (
382 umask $mkdir_umask &&
383 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
384 )
385 then :
386 else
387
388 # The umask is ridiculous, or mkdir does not conform to POSIX,
389 # or it failed possibly due to a race condition. Create the
390 # directory the slow way, step by step, checking for races as we go.
391
392 case $dstdir in
393 /*) prefix='/';;
394 [-=\(\)!]*) prefix='./';;
395 *) prefix='';;
396 esac
397
398 eval "$initialize_posix_glob"
399
400 oIFS=$IFS
401 IFS=/
402 $posix_glob set -f
403 set fnord $dstdir
404 shift
405 $posix_glob set +f
406 IFS=$oIFS
407
408 prefixes=
409
410 for d
411 do
412 test X"$d" = X && continue
413
414 prefix=$prefix$d
415 if test -d "$prefix"; then
416 prefixes=
417 else
418 if $posix_mkdir; then
419 (umask=$mkdir_umask &&
420 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
421 # Don't fail if two instances are running concurrently.
422 test -d "$prefix" || exit 1
423 else
424 case $prefix in
425 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
426 *) qprefix=$prefix;;
427 esac
428 prefixes="$prefixes '$qprefix'"
429 fi
430 fi
431 prefix=$prefix/
432 done
433
434 if test -n "$prefixes"; then
435 # Don't fail if two instances are running concurrently.
436 (umask $mkdir_umask &&
437 eval "\$doit_exec \$mkdirprog $prefixes") ||
438 test -d "$dstdir" || exit 1
439 obsolete_mkdir_used=true
440 fi
441 fi
442 fi
443
444 if test -n "$dir_arg"; then
445 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
446 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
447 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
448 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
449 else
450
451 # Make a couple of temp file names in the proper directory.
452 dsttmp=$dstdir/_inst.$$_
453 rmtmp=$dstdir/_rm.$$_
454
455 # Trap to clean up those temp files at exit.
456 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
457
458 # Copy the file name to the temp name.
459 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
460
461 # and set any options; do chmod last to preserve setuid bits.
462 #
463 # If any of these fail, we abort the whole thing. If we want to
464 # ignore errors from any of these, just make sure not to ignore
465 # errors from the above "$doit $cpprog $src $dsttmp" command.
466 #
467 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
468 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
469 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
470 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
471
472 # If -C, don't bother to copy if it wouldn't change the file.
473 if $copy_on_change &&
474 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
475 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
476
477 eval "$initialize_posix_glob" &&
478 $posix_glob set -f &&
479 set X $old && old=:$2:$4:$5:$6 &&
480 set X $new && new=:$2:$4:$5:$6 &&
481 $posix_glob set +f &&
482
483 test "$old" = "$new" &&
484 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
485 then
486 rm -f "$dsttmp"
487 else
488 # Rename the file to the real destination.
489 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
490
491 # The rename failed, perhaps because mv can't rename something else
492 # to itself, or perhaps because mv is so ancient that it does not
493 # support -f.
494 {
495 # Now remove or move aside any old file at destination location.
496 # We try this two ways since rm can't unlink itself on some
497 # systems and the destination file might be busy for other
498 # reasons. In this case, the final cleanup might fail but the new
499 # file should still install successfully.
500 {
501 test ! -f "$dst" ||
502 $doit $rmcmd -f "$dst" 2>/dev/null ||
503 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
504 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
505 } ||
506 { echo "$0: cannot unlink or rename $dst" >&2
507 (exit 1); exit 1
508 }
509 } &&
510
511 # Now rename the file to the real destination.
512 $doit $mvcmd "$dsttmp" "$dst"
513 }
514 fi || exit 1
515
516 trap '' 0
517 fi
518 done
519
520 # Local variables:
521 # eval: (add-hook 'write-file-hooks 'time-stamp)
522 # time-stamp-start: "scriptversion="
523 # time-stamp-format: "%:y-%02m-%02d.%02H"
524 # time-stamp-time-zone: "UTC"
525 # time-stamp-end: "; # UTC"
526 # End:
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
1 # libmenu/Makefile. Generated from Makefile.in by configure.
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14
15
16
17
18
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
64 pkgdatadir = $(datadir)/cinnamon-menus
65 pkgincludedir = $(includedir)/cinnamon-menus
66 pkglibdir = $(libdir)/cinnamon-menus
67 pkglibexecdir = $(libexecdir)/cinnamon-menus
68 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
69 install_sh_DATA = $(install_sh) -c -m 644
70 install_sh_PROGRAM = $(install_sh) -c
71 install_sh_SCRIPT = $(install_sh) -c
72 INSTALL_HEADER = $(INSTALL_DATA)
73 transform = $(program_transform_name)
74 NORMAL_INSTALL = :
75 PRE_INSTALL = :
76 POST_INSTALL = :
77 NORMAL_UNINSTALL = :
78 PRE_UNINSTALL = :
79 POST_UNINSTALL = :
80 build_triplet = x86_64-unknown-linux-gnu
81 host_triplet = x86_64-unknown-linux-gnu
82 am__append_1 = CMenu-3.0.gir
83 am__append_2 = $(gir_DATA) $(typelib_DATA)
84 subdir = libmenu
85 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
86 $(srcdir)/libcinnamon-menu-3.0.pc.in \
87 $(srcdir)/libcinnamon-menu-3.0-uninstalled.pc.in \
88 $(top_srcdir)/depcomp $(libcinnamon_menu_3_include_HEADERS)
89 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
90 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
91 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
92 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
93 $(top_srcdir)/configure.ac
94 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
95 $(ACLOCAL_M4)
96 mkinstalldirs = $(install_sh) -d
97 CONFIG_HEADER = $(top_builddir)/config.h
98 CONFIG_CLEAN_FILES = libcinnamon-menu-3.0.pc \
99 libcinnamon-menu-3.0-uninstalled.pc
100 CONFIG_CLEAN_VPATH_FILES =
101 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
102 am__vpath_adj = case $$p in \
103 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
104 *) f=$$p;; \
105 esac;
106 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
107 am__install_max = 40
108 am__nobase_strip_setup = \
109 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
110 am__nobase_strip = \
111 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
112 am__nobase_list = $(am__nobase_strip_setup); \
113 for p in $$list; do echo "$$p $$p"; done | \
114 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
115 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
116 if (++n[$$2] == $(am__install_max)) \
117 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
118 END { for (dir in files) print dir, files[dir] }'
119 am__base_list = \
120 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
121 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
122 am__uninstall_files_from_dir = { \
123 test -z "$$files" \
124 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
125 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
126 $(am__cd) "$$dir" && rm -f $$files; }; \
127 }
128 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
129 "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" \
130 "$(DESTDIR)$(libcinnamon_menu_3_includedir)"
131 LTLIBRARIES = $(lib_LTLIBRARIES)
132 am__DEPENDENCIES_1 =
133 libcinnamon_menu_3_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
134 am__objects_1 = canonicalize.lo desktop-entries.lo \
135 entry-directories.lo gmenu-tree.lo menu-layout.lo \
136 menu-monitor.lo menu-util.lo
137 am_libcinnamon_menu_3_la_OBJECTS = $(am__objects_1)
138 libcinnamon_menu_3_la_OBJECTS = $(am_libcinnamon_menu_3_la_OBJECTS)
139 AM_V_lt = $(am__v_lt_$(V))
140 am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
141 am__v_lt_0 = --silent
142 am__v_lt_1 =
143 libcinnamon_menu_3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
144 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
145 $(AM_CFLAGS) $(CFLAGS) $(libcinnamon_menu_3_la_LDFLAGS) \
146 $(LDFLAGS) -o $@
147 AM_V_P = $(am__v_P_$(V))
148 am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
149 am__v_P_0 = false
150 am__v_P_1 = :
151 AM_V_GEN = $(am__v_GEN_$(V))
152 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
153 am__v_GEN_0 = @echo " GEN " $@;
154 am__v_GEN_1 =
155 AM_V_at = $(am__v_at_$(V))
156 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
157 am__v_at_0 = @
158 am__v_at_1 =
159 DEFAULT_INCLUDES = -I. -I$(top_builddir)
160 depcomp = $(SHELL) $(top_srcdir)/depcomp
161 am__depfiles_maybe = depfiles
162 am__mv = mv -f
163 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
164 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
165 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
166 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
167 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
168 $(AM_CFLAGS) $(CFLAGS)
169 AM_V_CC = $(am__v_CC_$(V))
170 am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
171 am__v_CC_0 = @echo " CC " $@;
172 am__v_CC_1 =
173 CCLD = $(CC)
174 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
175 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
176 $(AM_LDFLAGS) $(LDFLAGS) -o $@
177 AM_V_CCLD = $(am__v_CCLD_$(V))
178 am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
179 am__v_CCLD_0 = @echo " CCLD " $@;
180 am__v_CCLD_1 =
181 SOURCES = $(libcinnamon_menu_3_la_SOURCES)
182 DIST_SOURCES = $(libcinnamon_menu_3_la_SOURCES)
183 am__can_run_installinfo = \
184 case $$AM_UPDATE_INFO_DIR in \
185 n|no|NO) false;; \
186 *) (install-info --version) >/dev/null 2>&1;; \
187 esac
188 DATA = $(gir_DATA) $(pkgconfig_DATA) $(typelib_DATA)
189 HEADERS = $(libcinnamon_menu_3_include_HEADERS)
190 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
191 # Read a list of newline-separated strings from the standard input,
192 # and print each of them once, without duplicates. Input order is
193 # *not* preserved.
194 am__uniquify_input = $(AWK) '\
195 BEGIN { nonempty = 0; } \
196 { items[$$0] = 1; nonempty = 1; } \
197 END { if (nonempty) { for (i in items) print i; }; } \
198 '
199 # Make sure the list of sources is unique. This is necessary because,
200 # e.g., the same source file might be shared among _SOURCES variables
201 # for different programs/libraries.
202 am__define_uniq_tagged_files = \
203 list='$(am__tagged_files)'; \
204 unique=`for i in $$list; do \
205 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
206 done | $(am__uniquify_input)`
207 ETAGS = etags
208 CTAGS = ctags
209 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
210 ACLOCAL = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing aclocal-1.13
211 AMTAR = $${TAR-tar}
212 AM_DEFAULT_VERBOSITY = 0
213 AR = ar
214 AS = as
215 AUTOCONF = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing autoconf
216 AUTOHEADER = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing autoheader
217 AUTOMAKE = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing automake-1.13
218 AWK = gawk
219 CC = gcc
220 CCDEPMODE = depmode=gcc3
221 CFLAGS = -g -O2
222 CPP = gcc -E
223 CPPFLAGS =
224 CYGPATH_W = echo
225 DEBUG_CFLAGS = -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS
226 DEFS = -DHAVE_CONFIG_H
227 DEPDIR = .deps
228 DISABLE_DEPRECATED = -DGCONF_DISABLE_DEPRECATED -DGCONF_DISABLE_SINGLE_INCLUDES -DBONOBO_DISABLE_DEPRECATED -DBONOBO_DISABLE_SINGLE_INCLUDES -DBONOBO_UI_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_SINGLE_INCLUDES -DGNOME_DISABLE_DEPRECATED -DGNOME_DISABLE_SINGLE_INCLUDES -DLIBGLADE_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_SINGLE_INCLUDES -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_SINGLE_INCLUDES -DWNCK_DISABLE_DEPRECATED -DWNCK_DISABLE_SINGLE_INCLUDES -DLIBSOUP_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_SINGLE_INCLUDES
229 DISABLE_DEPRECATED_CFLAGS =
230 DLLTOOL = dlltool
231 DSYMUTIL =
232 DUMPBIN =
233 ECHO_C =
234 ECHO_N = -n
235 ECHO_T =
236 EGREP = /bin/grep -E
237 EXEEXT =
238 FGREP = /bin/grep -F
239 GIO_UNIX_CFLAGS = -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
240 GIO_UNIX_LIBS = -lgio-2.0 -lgobject-2.0 -lglib-2.0
241 GREP = /bin/grep
242 INSTALL = /usr/bin/install -c
243 INSTALL_DATA = ${INSTALL} -m 644
244 INSTALL_PROGRAM = ${INSTALL}
245 INSTALL_SCRIPT = ${INSTALL}
246 INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
247 INTROSPECTION_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gobject-introspection-1.0
248 INTROSPECTION_COMPILER = /usr/bin/g-ir-compiler
249 INTROSPECTION_GENERATE = /usr/bin/g-ir-generate
250 INTROSPECTION_GIRDIR = /usr/share/gir-1.0
251 INTROSPECTION_LIBS = -lgirepository-1.0 -lgobject-2.0 -lglib-2.0
252 INTROSPECTION_MAKEFILE = /usr/share/gobject-introspection-1.0/Makefile.introspection
253 INTROSPECTION_SCANNER = /usr/bin/g-ir-scanner
254 INTROSPECTION_TYPELIBDIR = /usr/lib/girepository-1.0
255 LD = /usr/bin/ld -m elf_x86_64
256 LDFLAGS =
257 LIBOBJS =
258 LIBS =
259 LIBTOOL = $(SHELL) $(top_builddir)/libtool
260 LIB_MENU_LT_VERSION = 0:1:0
261 LIPO =
262 LN_S = ln -s
263 LTLIBOBJS =
264 MAINT =
265 MAKEINFO = ${SHELL} /home/mtwebster/bin/cinnamon-menus/missing makeinfo
266 MANIFEST_TOOL = :
267 MKDIR_P = /bin/mkdir -p
268 NM = /usr/bin/nm -B
269 NMEDIT =
270 OBJDUMP = objdump
271 OBJEXT = o
272 OTOOL =
273 OTOOL64 =
274 PACKAGE = cinnamon-menus
275 PACKAGE_BUGREPORT =
276 PACKAGE_NAME = cinnamon-menus
277 PACKAGE_STRING = cinnamon-menus 2.1
278 PACKAGE_TARNAME = cinnamon-menus
279 PACKAGE_URL =
280 PACKAGE_VERSION = 2.1
281 PATH_SEPARATOR = :
282 PKG_CONFIG = /usr/bin/pkg-config
283 PKG_CONFIG_LIBDIR =
284 PKG_CONFIG_PATH =
285 RANLIB = ranlib
286 SED = /bin/sed
287 SET_MAKE =
288 SHELL = /bin/bash
289 STRIP = strip
290 VERSION = 2.1
291 WARN_CFLAGS = -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs
292 abs_builddir = /home/mtwebster/bin/cinnamon-menus/libmenu
293 abs_srcdir = /home/mtwebster/bin/cinnamon-menus/libmenu
294 abs_top_builddir = /home/mtwebster/bin/cinnamon-menus
295 abs_top_srcdir = /home/mtwebster/bin/cinnamon-menus
296 ac_ct_AR = ar
297 ac_ct_CC = gcc
298 ac_ct_DUMPBIN =
299 am__include = include
300 am__leading_dot = .
301 am__quote =
302 am__tar = $${TAR-tar} chof - "$$tardir"
303 am__untar = $${TAR-tar} xf -
304 bindir = ${exec_prefix}/bin
305 build = x86_64-unknown-linux-gnu
306 build_alias =
307 build_cpu = x86_64
308 build_os = linux-gnu
309 build_vendor = unknown
310 builddir = .
311 datadir = ${datarootdir}
312 datarootdir = ${prefix}/share
313 docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
314 dvidir = ${docdir}
315 exec_prefix = ${prefix}
316 host = x86_64-unknown-linux-gnu
317 host_alias =
318 host_cpu = x86_64
319 host_os = linux-gnu
320 host_vendor = unknown
321 htmldir = ${docdir}
322 includedir = ${prefix}/include
323 infodir = ${datarootdir}/info
324 install_sh = ${SHELL} /home/mtwebster/bin/cinnamon-menus/install-sh
325 libdir = ${exec_prefix}/lib
326 libexecdir = ${exec_prefix}/libexec
327 localedir = ${datarootdir}/locale
328 localstatedir = ${prefix}/var
329 mandir = ${datarootdir}/man
330 mkdir_p = $(MKDIR_P)
331 oldincludedir = /usr/include
332 pdfdir = ${docdir}
333 prefix = /usr/local
334 program_transform_name = s,x,x,
335 psdir = ${docdir}
336 sbindir = ${exec_prefix}/sbin
337 sharedstatedir = ${prefix}/com
338 srcdir = .
339 sysconfdir = ${prefix}/etc
340 target_alias =
341 top_build_prefix = ../
342 top_builddir = ..
343 top_srcdir = ..
344 lib_LTLIBRARIES = libcinnamon-menu-3.la
345 AM_CPPFLAGS = \
346 $(GIO_UNIX_CFLAGS) \
347 -DGMENU_I_KNOW_THIS_IS_UNSTABLE \
348 $(DISABLE_DEPRECATED_CFLAGS) \
349 $(DEBUG_CFLAGS)
350
351 AM_CFLAGS = $(WARN_CFLAGS)
352 libcinnamon_menu_3_includedir = $(includedir)/cinnamon-menus-3.0
353 libcinnamon_menu_3_include_HEADERS = \
354 gmenu-tree.h
355
356 libcinnamon_menu_3_sources = \
357 canonicalize.c \
358 desktop-entries.c \
359 entry-directories.c \
360 gmenu-tree.c \
361 menu-layout.c \
362 menu-monitor.c \
363 menu-util.c
364
365 libcinnamon_menu_3_la_SOURCES = \
366 $(libcinnamon_menu_3_sources) \
367 canonicalize.h \
368 desktop-entries.h \
369 entry-directories.h \
370 gmenu-tree.h \
371 menu-layout.h \
372 menu-monitor.h \
373 menu-util.h
374
375 libcinnamon_menu_3_la_LIBADD = \
376 $(GIO_UNIX_LIBS)
377
378 libcinnamon_menu_3_la_LDFLAGS = \
379 -version-info $(LIB_MENU_LT_VERSION) \
380 -no-undefined \
381 -export-symbols-regex gmenu_tree
382
383 pkgconfigdir = $(libdir)/pkgconfig
384 pkgconfig_DATA = libcinnamon-menu-3.0.pc
385 EXTRA_DIST = \
386 libcinnamon-menu-3.0.pc.in \
387 libcinnamon-menu-3.0-uninstalled.pc.in
388
389 CLEANFILES = $(am__append_2)
390 INTROSPECTION_GIRS = $(am__append_1)
391 INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir)
392 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
393 introspection_sources = $(libcinnamon_menu_3_include_HEADERS) gmenu-tree.c
394 CMenu_3_0_gir_INCLUDES = Gio-2.0
395 CMenu_3_0_gir_CFLAGS = $(AM_CPPFLAGS)
396 CMenu_3_0_gir_LIBS = libcinnamon-menu-3.la
397 CMenu_3_0_gir_SCANNERFLAGS = --identifier-prefix=GMenu --symbol-prefix=gmenu --pkg-export=libcinnamon-menu-3.0 --c-include=gmenu-tree.h
398 CMenu_3_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
399 girdir = $(INTROSPECTION_GIRDIR)
400 gir_DATA = $(INTROSPECTION_GIRS)
401 typelibdir = $(INTROSPECTION_TYPELIBDIR)
402 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
403 all: all-am
404
405 .SUFFIXES:
406 .SUFFIXES: .c .lo .o .obj
407 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
408 @for dep in $?; do \
409 case '$(am__configure_deps)' in \
410 *$$dep*) \
411 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
412 && { if test -f $@; then exit 0; else break; fi; }; \
413 exit 1;; \
414 esac; \
415 done; \
416 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libmenu/Makefile'; \
417 $(am__cd) $(top_srcdir) && \
418 $(AUTOMAKE) --foreign libmenu/Makefile
419 .PRECIOUS: Makefile
420 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
421 @case '$?' in \
422 *config.status*) \
423 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
424 *) \
425 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
426 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
427 esac;
428
429 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
430 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
431
432 $(top_srcdir)/configure: $(am__configure_deps)
433 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
434 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
435 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
436 $(am__aclocal_m4_deps):
437 libcinnamon-menu-3.0.pc: $(top_builddir)/config.status $(srcdir)/libcinnamon-menu-3.0.pc.in
438 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
439 libcinnamon-menu-3.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/libcinnamon-menu-3.0-uninstalled.pc.in
440 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
441
442 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
443 @$(NORMAL_INSTALL)
444 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
445 list2=; for p in $$list; do \
446 if test -f $$p; then \
447 list2="$$list2 $$p"; \
448 else :; fi; \
449 done; \
450 test -z "$$list2" || { \
451 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
452 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
453 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
454 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
455 }
456
457 uninstall-libLTLIBRARIES:
458 @$(NORMAL_UNINSTALL)
459 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
460 for p in $$list; do \
461 $(am__strip_dir) \
462 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
463 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
464 done
465
466 clean-libLTLIBRARIES:
467 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
468 @list='$(lib_LTLIBRARIES)'; \
469 locs=`for p in $$list; do echo $$p; done | \
470 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
471 sort -u`; \
472 test -z "$$locs" || { \
473 echo rm -f $${locs}; \
474 rm -f $${locs}; \
475 }
476
477 libcinnamon-menu-3.la: $(libcinnamon_menu_3_la_OBJECTS) $(libcinnamon_menu_3_la_DEPENDENCIES) $(EXTRA_libcinnamon_menu_3_la_DEPENDENCIES)
478 $(AM_V_CCLD)$(libcinnamon_menu_3_la_LINK) -rpath $(libdir) $(libcinnamon_menu_3_la_OBJECTS) $(libcinnamon_menu_3_la_LIBADD) $(LIBS)
479
480 mostlyclean-compile:
481 -rm -f *.$(OBJEXT)
482
483 distclean-compile:
484 -rm -f *.tab.c
485
486 include ./$(DEPDIR)/canonicalize.Plo
487 include ./$(DEPDIR)/desktop-entries.Plo
488 include ./$(DEPDIR)/entry-directories.Plo
489 include ./$(DEPDIR)/gmenu-tree.Plo
490 include ./$(DEPDIR)/menu-layout.Plo
491 include ./$(DEPDIR)/menu-monitor.Plo
492 include ./$(DEPDIR)/menu-util.Plo
493
494 .c.o:
495 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
496 $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
497 # $(AM_V_CC)source='$<' object='$@' libtool=no \
498 # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
499 # $(AM_V_CC_no)$(COMPILE) -c $<
500
501 .c.obj:
502 $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
503 $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
504 # $(AM_V_CC)source='$<' object='$@' libtool=no \
505 # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
506 # $(AM_V_CC_no)$(COMPILE) -c `$(CYGPATH_W) '$<'`
507
508 .c.lo:
509 $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
510 $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
511 # $(AM_V_CC)source='$<' object='$@' libtool=yes \
512 # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
513 # $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $<
514
515 mostlyclean-libtool:
516 -rm -f *.lo
517
518 clean-libtool:
519 -rm -rf .libs _libs
520 install-girDATA: $(gir_DATA)
521 @$(NORMAL_INSTALL)
522 @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
523 if test -n "$$list"; then \
524 echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \
525 $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \
526 fi; \
527 for p in $$list; do \
528 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
529 echo "$$d$$p"; \
530 done | $(am__base_list) | \
531 while read files; do \
532 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(girdir)'"; \
533 $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \
534 done
535
536 uninstall-girDATA:
537 @$(NORMAL_UNINSTALL)
538 @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
539 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
540 dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir)
541 install-pkgconfigDATA: $(pkgconfig_DATA)
542 @$(NORMAL_INSTALL)
543 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
544 if test -n "$$list"; then \
545 echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
546 $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
547 fi; \
548 for p in $$list; do \
549 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
550 echo "$$d$$p"; \
551 done | $(am__base_list) | \
552 while read files; do \
553 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
554 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
555 done
556
557 uninstall-pkgconfigDATA:
558 @$(NORMAL_UNINSTALL)
559 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
560 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
561 dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
562 install-typelibDATA: $(typelib_DATA)
563 @$(NORMAL_INSTALL)
564 @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \
565 if test -n "$$list"; then \
566 echo " $(MKDIR_P) '$(DESTDIR)$(typelibdir)'"; \
567 $(MKDIR_P) "$(DESTDIR)$(typelibdir)" || exit 1; \
568 fi; \
569 for p in $$list; do \
570 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
571 echo "$$d$$p"; \
572 done | $(am__base_list) | \
573 while read files; do \
574 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typelibdir)'"; \
575 $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibdir)" || exit $$?; \
576 done
577
578 uninstall-typelibDATA:
579 @$(NORMAL_UNINSTALL)
580 @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \
581 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
582 dir='$(DESTDIR)$(typelibdir)'; $(am__uninstall_files_from_dir)
583 install-libcinnamon_menu_3_includeHEADERS: $(libcinnamon_menu_3_include_HEADERS)
584 @$(NORMAL_INSTALL)
585 @list='$(libcinnamon_menu_3_include_HEADERS)'; test -n "$(libcinnamon_menu_3_includedir)" || list=; \
586 if test -n "$$list"; then \
587 echo " $(MKDIR_P) '$(DESTDIR)$(libcinnamon_menu_3_includedir)'"; \
588 $(MKDIR_P) "$(DESTDIR)$(libcinnamon_menu_3_includedir)" || exit 1; \
589 fi; \
590 for p in $$list; do \
591 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
592 echo "$$d$$p"; \
593 done | $(am__base_list) | \
594 while read files; do \
595 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcinnamon_menu_3_includedir)'"; \
596 $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcinnamon_menu_3_includedir)" || exit $$?; \
597 done
598
599 uninstall-libcinnamon_menu_3_includeHEADERS:
600 @$(NORMAL_UNINSTALL)
601 @list='$(libcinnamon_menu_3_include_HEADERS)'; test -n "$(libcinnamon_menu_3_includedir)" || list=; \
602 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
603 dir='$(DESTDIR)$(libcinnamon_menu_3_includedir)'; $(am__uninstall_files_from_dir)
604
605 ID: $(am__tagged_files)
606 $(am__define_uniq_tagged_files); mkid -fID $$unique
607 tags: tags-am
608 TAGS: tags
609
610 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
611 set x; \
612 here=`pwd`; \
613 $(am__define_uniq_tagged_files); \
614 shift; \
615 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
616 test -n "$$unique" || unique=$$empty_fix; \
617 if test $$# -gt 0; then \
618 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
619 "$$@" $$unique; \
620 else \
621 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
622 $$unique; \
623 fi; \
624 fi
625 ctags: ctags-am
626
627 CTAGS: ctags
628 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
629 $(am__define_uniq_tagged_files); \
630 test -z "$(CTAGS_ARGS)$$unique" \
631 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
632 $$unique
633
634 GTAGS:
635 here=`$(am__cd) $(top_builddir) && pwd` \
636 && $(am__cd) $(top_srcdir) \
637 && gtags -i $(GTAGS_ARGS) "$$here"
638 cscopelist: cscopelist-am
639
640 cscopelist-am: $(am__tagged_files)
641 list='$(am__tagged_files)'; \
642 case "$(srcdir)" in \
643 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
644 *) sdir=$(subdir)/$(srcdir) ;; \
645 esac; \
646 for i in $$list; do \
647 if test -f "$$i"; then \
648 echo "$(subdir)/$$i"; \
649 else \
650 echo "$$sdir/$$i"; \
651 fi; \
652 done >> $(top_builddir)/cscope.files
653
654 distclean-tags:
655 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
656
657 distdir: $(DISTFILES)
658 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
659 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
660 list='$(DISTFILES)'; \
661 dist_files=`for file in $$list; do echo $$file; done | \
662 sed -e "s|^$$srcdirstrip/||;t" \
663 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
664 case $$dist_files in \
665 */*) $(MKDIR_P) `echo "$$dist_files" | \
666 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
667 sort -u` ;; \
668 esac; \
669 for file in $$dist_files; do \
670 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
671 if test -d $$d/$$file; then \
672 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
673 if test -d "$(distdir)/$$file"; then \
674 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
675 fi; \
676 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
677 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
678 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
679 fi; \
680 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
681 else \
682 test -f "$(distdir)/$$file" \
683 || cp -p $$d/$$file "$(distdir)/$$file" \
684 || exit 1; \
685 fi; \
686 done
687 check-am: all-am
688 check: check-am
689 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
690 installdirs:
691 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libcinnamon_menu_3_includedir)"; do \
692 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
693 done
694 install: install-am
695 install-exec: install-exec-am
696 install-data: install-data-am
697 uninstall: uninstall-am
698
699 install-am: all-am
700 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
701
702 installcheck: installcheck-am
703 install-strip:
704 if test -z '$(STRIP)'; then \
705 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
706 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
707 install; \
708 else \
709 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
710 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
711 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
712 fi
713 mostlyclean-generic:
714
715 clean-generic:
716 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
717
718 distclean-generic:
719 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
720 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
721
722 maintainer-clean-generic:
723 @echo "This command is intended for maintainers to use"
724 @echo "it deletes files that may require special tools to rebuild."
725 clean: clean-am
726
727 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
728 mostlyclean-am
729
730 distclean: distclean-am
731 -rm -rf ./$(DEPDIR)
732 -rm -f Makefile
733 distclean-am: clean-am distclean-compile distclean-generic \
734 distclean-tags
735
736 dvi: dvi-am
737
738 dvi-am:
739
740 html: html-am
741
742 html-am:
743
744 info: info-am
745
746 info-am:
747
748 install-data-am: install-girDATA \
749 install-libcinnamon_menu_3_includeHEADERS \
750 install-pkgconfigDATA install-typelibDATA
751
752 install-dvi: install-dvi-am
753
754 install-dvi-am:
755
756 install-exec-am: install-libLTLIBRARIES
757
758 install-html: install-html-am
759
760 install-html-am:
761
762 install-info: install-info-am
763
764 install-info-am:
765
766 install-man:
767
768 install-pdf: install-pdf-am
769
770 install-pdf-am:
771
772 install-ps: install-ps-am
773
774 install-ps-am:
775
776 installcheck-am:
777
778 maintainer-clean: maintainer-clean-am
779 -rm -rf ./$(DEPDIR)
780 -rm -f Makefile
781 maintainer-clean-am: distclean-am maintainer-clean-generic
782
783 mostlyclean: mostlyclean-am
784
785 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
786 mostlyclean-libtool
787
788 pdf: pdf-am
789
790 pdf-am:
791
792 ps: ps-am
793
794 ps-am:
795
796 uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
797 uninstall-libcinnamon_menu_3_includeHEADERS \
798 uninstall-pkgconfigDATA uninstall-typelibDATA
799
800 .MAKE: install-am install-strip
801
802 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
803 clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
804 ctags-am distclean distclean-compile distclean-generic \
805 distclean-libtool distclean-tags distdir dvi dvi-am html \
806 html-am info info-am install install-am install-data \
807 install-data-am install-dvi install-dvi-am install-exec \
808 install-exec-am install-girDATA install-html install-html-am \
809 install-info install-info-am install-libLTLIBRARIES \
810 install-libcinnamon_menu_3_includeHEADERS install-man \
811 install-pdf install-pdf-am install-pkgconfigDATA install-ps \
812 install-ps-am install-strip install-typelibDATA installcheck \
813 installcheck-am installdirs maintainer-clean \
814 maintainer-clean-generic mostlyclean mostlyclean-compile \
815 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
816 tags tags-am uninstall uninstall-am uninstall-girDATA \
817 uninstall-libLTLIBRARIES \
818 uninstall-libcinnamon_menu_3_includeHEADERS \
819 uninstall-pkgconfigDATA uninstall-typelibDATA
820
821
822 # Introspection
823 -include $(INTROSPECTION_MAKEFILE)
824
825 CMenu-3.0.gir: libcinnamon-menu-3.la
826
827 -include $(top_srcdir)/git.mk
828
829 # Tell versions [3.59,3.63) of GNU make to not export all variables.
830 # Otherwise a system limit (for SysV at least) may be exceeded.
831 .NOEXPORT:
0 lib_LTLIBRARIES = libcinnamon-menu-3.la
1
2 AM_CPPFLAGS = \
3 $(GIO_UNIX_CFLAGS) \
4 -DGMENU_I_KNOW_THIS_IS_UNSTABLE \
5 $(DISABLE_DEPRECATED_CFLAGS) \
6 $(DEBUG_CFLAGS)
7
8 AM_CFLAGS = $(WARN_CFLAGS)
9
10 libcinnamon_menu_3_includedir = $(includedir)/cinnamon-menus-3.0
11 libcinnamon_menu_3_include_HEADERS = \
12 gmenu-tree.h
13
14 libcinnamon_menu_3_sources = \
15 canonicalize.c \
16 desktop-entries.c \
17 entry-directories.c \
18 gmenu-tree.c \
19 menu-layout.c \
20 menu-monitor.c \
21 menu-util.c
22
23 libcinnamon_menu_3_la_SOURCES = \
24 $(libcinnamon_menu_3_sources) \
25 canonicalize.h \
26 desktop-entries.h \
27 entry-directories.h \
28 gmenu-tree.h \
29 menu-layout.h \
30 menu-monitor.h \
31 menu-util.h
32
33 libcinnamon_menu_3_la_LIBADD = \
34 $(GIO_UNIX_LIBS)
35
36 libcinnamon_menu_3_la_LDFLAGS = \
37 -version-info $(LIB_MENU_LT_VERSION) \
38 -no-undefined \
39 -export-symbols-regex gmenu_tree
40
41 pkgconfigdir = $(libdir)/pkgconfig
42 pkgconfig_DATA = libcinnamon-menu-3.0.pc
43
44 EXTRA_DIST = \
45 libcinnamon-menu-3.0.pc.in \
46 libcinnamon-menu-3.0-uninstalled.pc.in
47
48 CLEANFILES =
49
50 # Introspection
51 -include $(INTROSPECTION_MAKEFILE)
52 INTROSPECTION_GIRS =
53 INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir)
54 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
55
56 if HAVE_INTROSPECTION
57 introspection_sources = $(libcinnamon_menu_3_include_HEADERS) gmenu-tree.c
58
59 CMenu-3.0.gir: libcinnamon-menu-3.la
60 CMenu_3_0_gir_INCLUDES = Gio-2.0
61 CMenu_3_0_gir_CFLAGS = $(AM_CPPFLAGS)
62 CMenu_3_0_gir_LIBS = libcinnamon-menu-3.la
63 CMenu_3_0_gir_SCANNERFLAGS = --identifier-prefix=GMenu --symbol-prefix=gmenu --pkg-export=libcinnamon-menu-3.0 --c-include=gmenu-tree.h
64 CMenu_3_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
65 INTROSPECTION_GIRS += CMenu-3.0.gir
66
67 girdir = $(INTROSPECTION_GIRDIR)
68 gir_DATA = $(INTROSPECTION_GIRS)
69
70 typelibdir = $(INTROSPECTION_TYPELIBDIR)
71 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
72
73 CLEANFILES += $(gir_DATA) $(typelib_DATA)
74 endif
75
76 -include $(top_srcdir)/git.mk
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16
17
18 VPATH = @srcdir@
19 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
20 am__make_running_with_option = \
21 case $${target_option-} in \
22 ?) ;; \
23 *) echo "am__make_running_with_option: internal error: invalid" \
24 "target option '$${target_option-}' specified" >&2; \
25 exit 1;; \
26 esac; \
27 has_opt=no; \
28 sane_makeflags=$$MAKEFLAGS; \
29 if $(am__is_gnu_make); then \
30 sane_makeflags=$$MFLAGS; \
31 else \
32 case $$MAKEFLAGS in \
33 *\\[\ \ ]*) \
34 bs=\\; \
35 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
36 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
37 esac; \
38 fi; \
39 skip_next=no; \
40 strip_trailopt () \
41 { \
42 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
43 }; \
44 for flg in $$sane_makeflags; do \
45 test $$skip_next = yes && { skip_next=no; continue; }; \
46 case $$flg in \
47 *=*|--*) continue;; \
48 -*I) strip_trailopt 'I'; skip_next=yes;; \
49 -*I?*) strip_trailopt 'I';; \
50 -*O) strip_trailopt 'O'; skip_next=yes;; \
51 -*O?*) strip_trailopt 'O';; \
52 -*l) strip_trailopt 'l'; skip_next=yes;; \
53 -*l?*) strip_trailopt 'l';; \
54 -[dEDm]) skip_next=yes;; \
55 -[JT]) skip_next=yes;; \
56 esac; \
57 case $$flg in \
58 *$$target_option*) has_opt=yes; break;; \
59 esac; \
60 done; \
61 test $$has_opt = yes
62 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
63 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
64 pkgdatadir = $(datadir)/@PACKAGE@
65 pkgincludedir = $(includedir)/@PACKAGE@
66 pkglibdir = $(libdir)/@PACKAGE@
67 pkglibexecdir = $(libexecdir)/@PACKAGE@
68 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
69 install_sh_DATA = $(install_sh) -c -m 644
70 install_sh_PROGRAM = $(install_sh) -c
71 install_sh_SCRIPT = $(install_sh) -c
72 INSTALL_HEADER = $(INSTALL_DATA)
73 transform = $(program_transform_name)
74 NORMAL_INSTALL = :
75 PRE_INSTALL = :
76 POST_INSTALL = :
77 NORMAL_UNINSTALL = :
78 PRE_UNINSTALL = :
79 POST_UNINSTALL = :
80 build_triplet = @build@
81 host_triplet = @host@
82 @HAVE_INTROSPECTION_TRUE@am__append_1 = CMenu-3.0.gir
83 @HAVE_INTROSPECTION_TRUE@am__append_2 = $(gir_DATA) $(typelib_DATA)
84 subdir = libmenu
85 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
86 $(srcdir)/libcinnamon-menu-3.0.pc.in \
87 $(srcdir)/libcinnamon-menu-3.0-uninstalled.pc.in \
88 $(top_srcdir)/depcomp $(libcinnamon_menu_3_include_HEADERS)
89 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
90 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
91 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
92 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
93 $(top_srcdir)/configure.ac
94 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
95 $(ACLOCAL_M4)
96 mkinstalldirs = $(install_sh) -d
97 CONFIG_HEADER = $(top_builddir)/config.h
98 CONFIG_CLEAN_FILES = libcinnamon-menu-3.0.pc \
99 libcinnamon-menu-3.0-uninstalled.pc
100 CONFIG_CLEAN_VPATH_FILES =
101 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
102 am__vpath_adj = case $$p in \
103 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
104 *) f=$$p;; \
105 esac;
106 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
107 am__install_max = 40
108 am__nobase_strip_setup = \
109 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
110 am__nobase_strip = \
111 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
112 am__nobase_list = $(am__nobase_strip_setup); \
113 for p in $$list; do echo "$$p $$p"; done | \
114 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
115 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
116 if (++n[$$2] == $(am__install_max)) \
117 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
118 END { for (dir in files) print dir, files[dir] }'
119 am__base_list = \
120 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
121 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
122 am__uninstall_files_from_dir = { \
123 test -z "$$files" \
124 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
125 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
126 $(am__cd) "$$dir" && rm -f $$files; }; \
127 }
128 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
129 "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" \
130 "$(DESTDIR)$(libcinnamon_menu_3_includedir)"
131 LTLIBRARIES = $(lib_LTLIBRARIES)
132 am__DEPENDENCIES_1 =
133 libcinnamon_menu_3_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
134 am__objects_1 = canonicalize.lo desktop-entries.lo \
135 entry-directories.lo gmenu-tree.lo menu-layout.lo \
136 menu-monitor.lo menu-util.lo
137 am_libcinnamon_menu_3_la_OBJECTS = $(am__objects_1)
138 libcinnamon_menu_3_la_OBJECTS = $(am_libcinnamon_menu_3_la_OBJECTS)
139 AM_V_lt = $(am__v_lt_@AM_V@)
140 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
141 am__v_lt_0 = --silent
142 am__v_lt_1 =
143 libcinnamon_menu_3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
144 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
145 $(AM_CFLAGS) $(CFLAGS) $(libcinnamon_menu_3_la_LDFLAGS) \
146 $(LDFLAGS) -o $@
147 AM_V_P = $(am__v_P_@AM_V@)
148 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
149 am__v_P_0 = false
150 am__v_P_1 = :
151 AM_V_GEN = $(am__v_GEN_@AM_V@)
152 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
153 am__v_GEN_0 = @echo " GEN " $@;
154 am__v_GEN_1 =
155 AM_V_at = $(am__v_at_@AM_V@)
156 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
157 am__v_at_0 = @
158 am__v_at_1 =
159 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
160 depcomp = $(SHELL) $(top_srcdir)/depcomp
161 am__depfiles_maybe = depfiles
162 am__mv = mv -f
163 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
164 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
165 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
166 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
167 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
168 $(AM_CFLAGS) $(CFLAGS)
169 AM_V_CC = $(am__v_CC_@AM_V@)
170 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
171 am__v_CC_0 = @echo " CC " $@;
172 am__v_CC_1 =
173 CCLD = $(CC)
174 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
175 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
176 $(AM_LDFLAGS) $(LDFLAGS) -o $@
177 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
178 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
179 am__v_CCLD_0 = @echo " CCLD " $@;
180 am__v_CCLD_1 =
181 SOURCES = $(libcinnamon_menu_3_la_SOURCES)
182 DIST_SOURCES = $(libcinnamon_menu_3_la_SOURCES)
183 am__can_run_installinfo = \
184 case $$AM_UPDATE_INFO_DIR in \
185 n|no|NO) false;; \
186 *) (install-info --version) >/dev/null 2>&1;; \
187 esac
188 DATA = $(gir_DATA) $(pkgconfig_DATA) $(typelib_DATA)
189 HEADERS = $(libcinnamon_menu_3_include_HEADERS)
190 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
191 # Read a list of newline-separated strings from the standard input,
192 # and print each of them once, without duplicates. Input order is
193 # *not* preserved.
194 am__uniquify_input = $(AWK) '\
195 BEGIN { nonempty = 0; } \
196 { items[$$0] = 1; nonempty = 1; } \
197 END { if (nonempty) { for (i in items) print i; }; } \
198 '
199 # Make sure the list of sources is unique. This is necessary because,
200 # e.g., the same source file might be shared among _SOURCES variables
201 # for different programs/libraries.
202 am__define_uniq_tagged_files = \
203 list='$(am__tagged_files)'; \
204 unique=`for i in $$list; do \
205 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
206 done | $(am__uniquify_input)`
207 ETAGS = etags
208 CTAGS = ctags
209 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
210 ACLOCAL = @ACLOCAL@
211 AMTAR = @AMTAR@
212 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
213 AR = @AR@
214 AS = @AS@
215 AUTOCONF = @AUTOCONF@
216 AUTOHEADER = @AUTOHEADER@
217 AUTOMAKE = @AUTOMAKE@
218 AWK = @AWK@
219 CC = @CC@
220 CCDEPMODE = @CCDEPMODE@
221 CFLAGS = @CFLAGS@
222 CPP = @CPP@
223 CPPFLAGS = @CPPFLAGS@
224 CYGPATH_W = @CYGPATH_W@
225 DEBUG_CFLAGS = @DEBUG_CFLAGS@
226 DEFS = @DEFS@
227 DEPDIR = @DEPDIR@
228 DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
229 DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
230 DLLTOOL = @DLLTOOL@
231 DSYMUTIL = @DSYMUTIL@
232 DUMPBIN = @DUMPBIN@
233 ECHO_C = @ECHO_C@
234 ECHO_N = @ECHO_N@
235 ECHO_T = @ECHO_T@
236 EGREP = @EGREP@
237 EXEEXT = @EXEEXT@
238 FGREP = @FGREP@
239 GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@
240 GIO_UNIX_LIBS = @GIO_UNIX_LIBS@
241 GREP = @GREP@
242 INSTALL = @INSTALL@
243 INSTALL_DATA = @INSTALL_DATA@
244 INSTALL_PROGRAM = @INSTALL_PROGRAM@
245 INSTALL_SCRIPT = @INSTALL_SCRIPT@
246 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
247 INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
248 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
249 INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
250 INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
251 INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
252 INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
253 INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
254 INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
255 LD = @LD@
256 LDFLAGS = @LDFLAGS@
257 LIBOBJS = @LIBOBJS@
258 LIBS = @LIBS@
259 LIBTOOL = @LIBTOOL@
260 LIB_MENU_LT_VERSION = @LIB_MENU_LT_VERSION@
261 LIPO = @LIPO@
262 LN_S = @LN_S@
263 LTLIBOBJS = @LTLIBOBJS@
264 MAINT = @MAINT@
265 MAKEINFO = @MAKEINFO@
266 MANIFEST_TOOL = @MANIFEST_TOOL@
267 MKDIR_P = @MKDIR_P@
268 NM = @NM@
269 NMEDIT = @NMEDIT@
270 OBJDUMP = @OBJDUMP@
271 OBJEXT = @OBJEXT@
272 OTOOL = @OTOOL@
273 OTOOL64 = @OTOOL64@
274 PACKAGE = @PACKAGE@
275 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
276 PACKAGE_NAME = @PACKAGE_NAME@
277 PACKAGE_STRING = @PACKAGE_STRING@
278 PACKAGE_TARNAME = @PACKAGE_TARNAME@
279 PACKAGE_URL = @PACKAGE_URL@
280 PACKAGE_VERSION = @PACKAGE_VERSION@
281 PATH_SEPARATOR = @PATH_SEPARATOR@
282 PKG_CONFIG = @PKG_CONFIG@
283 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
284 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
285 RANLIB = @RANLIB@
286 SED = @SED@
287 SET_MAKE = @SET_MAKE@
288 SHELL = @SHELL@
289 STRIP = @STRIP@
290 VERSION = @VERSION@
291 WARN_CFLAGS = @WARN_CFLAGS@
292 abs_builddir = @abs_builddir@
293 abs_srcdir = @abs_srcdir@
294 abs_top_builddir = @abs_top_builddir@
295 abs_top_srcdir = @abs_top_srcdir@
296 ac_ct_AR = @ac_ct_AR@
297 ac_ct_CC = @ac_ct_CC@
298 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
299 am__include = @am__include@
300 am__leading_dot = @am__leading_dot@
301 am__quote = @am__quote@
302 am__tar = @am__tar@
303 am__untar = @am__untar@
304 bindir = @bindir@
305 build = @build@
306 build_alias = @build_alias@
307 build_cpu = @build_cpu@
308 build_os = @build_os@
309 build_vendor = @build_vendor@
310 builddir = @builddir@
311 datadir = @datadir@
312 datarootdir = @datarootdir@
313 docdir = @docdir@
314 dvidir = @dvidir@
315 exec_prefix = @exec_prefix@
316 host = @host@
317 host_alias = @host_alias@
318 host_cpu = @host_cpu@
319 host_os = @host_os@
320 host_vendor = @host_vendor@
321 htmldir = @htmldir@
322 includedir = @includedir@
323 infodir = @infodir@
324 install_sh = @install_sh@
325 libdir = @libdir@
326 libexecdir = @libexecdir@
327 localedir = @localedir@
328 localstatedir = @localstatedir@
329 mandir = @mandir@
330 mkdir_p = @mkdir_p@
331 oldincludedir = @oldincludedir@
332 pdfdir = @pdfdir@
333 prefix = @prefix@
334 program_transform_name = @program_transform_name@
335 psdir = @psdir@
336 sbindir = @sbindir@
337 sharedstatedir = @sharedstatedir@
338 srcdir = @srcdir@
339 sysconfdir = @sysconfdir@
340 target_alias = @target_alias@
341 top_build_prefix = @top_build_prefix@
342 top_builddir = @top_builddir@
343 top_srcdir = @top_srcdir@
344 lib_LTLIBRARIES = libcinnamon-menu-3.la
345 AM_CPPFLAGS = \
346 $(GIO_UNIX_CFLAGS) \
347 -DGMENU_I_KNOW_THIS_IS_UNSTABLE \
348 $(DISABLE_DEPRECATED_CFLAGS) \
349 $(DEBUG_CFLAGS)
350
351 AM_CFLAGS = $(WARN_CFLAGS)
352 libcinnamon_menu_3_includedir = $(includedir)/cinnamon-menus-3.0
353 libcinnamon_menu_3_include_HEADERS = \
354 gmenu-tree.h
355
356 libcinnamon_menu_3_sources = \
357 canonicalize.c \
358 desktop-entries.c \
359 entry-directories.c \
360 gmenu-tree.c \
361 menu-layout.c \
362 menu-monitor.c \
363 menu-util.c
364
365 libcinnamon_menu_3_la_SOURCES = \
366 $(libcinnamon_menu_3_sources) \
367 canonicalize.h \
368 desktop-entries.h \
369 entry-directories.h \
370 gmenu-tree.h \
371 menu-layout.h \
372 menu-monitor.h \
373 menu-util.h
374
375 libcinnamon_menu_3_la_LIBADD = \
376 $(GIO_UNIX_LIBS)
377
378 libcinnamon_menu_3_la_LDFLAGS = \
379 -version-info $(LIB_MENU_LT_VERSION) \
380 -no-undefined \
381 -export-symbols-regex gmenu_tree
382
383 pkgconfigdir = $(libdir)/pkgconfig
384 pkgconfig_DATA = libcinnamon-menu-3.0.pc
385 EXTRA_DIST = \
386 libcinnamon-menu-3.0.pc.in \
387 libcinnamon-menu-3.0-uninstalled.pc.in
388
389 CLEANFILES = $(am__append_2)
390 INTROSPECTION_GIRS = $(am__append_1)
391 INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir)
392 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
393 @HAVE_INTROSPECTION_TRUE@introspection_sources = $(libcinnamon_menu_3_include_HEADERS) gmenu-tree.c
394 @HAVE_INTROSPECTION_TRUE@CMenu_3_0_gir_INCLUDES = Gio-2.0
395 @HAVE_INTROSPECTION_TRUE@CMenu_3_0_gir_CFLAGS = $(AM_CPPFLAGS)
396 @HAVE_INTROSPECTION_TRUE@CMenu_3_0_gir_LIBS = libcinnamon-menu-3.la
397 @HAVE_INTROSPECTION_TRUE@CMenu_3_0_gir_SCANNERFLAGS = --identifier-prefix=GMenu --symbol-prefix=gmenu --pkg-export=libcinnamon-menu-3.0 --c-include=gmenu-tree.h
398 @HAVE_INTROSPECTION_TRUE@CMenu_3_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
399 @HAVE_INTROSPECTION_TRUE@girdir = $(INTROSPECTION_GIRDIR)
400 @HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS)
401 @HAVE_INTROSPECTION_TRUE@typelibdir = $(INTROSPECTION_TYPELIBDIR)
402 @HAVE_INTROSPECTION_TRUE@typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
403 all: all-am
404
405 .SUFFIXES:
406 .SUFFIXES: .c .lo .o .obj
407 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
408 @for dep in $?; do \
409 case '$(am__configure_deps)' in \
410 *$$dep*) \
411 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
412 && { if test -f $@; then exit 0; else break; fi; }; \
413 exit 1;; \
414 esac; \
415 done; \
416 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libmenu/Makefile'; \
417 $(am__cd) $(top_srcdir) && \
418 $(AUTOMAKE) --foreign libmenu/Makefile
419 .PRECIOUS: Makefile
420 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
421 @case '$?' in \
422 *config.status*) \
423 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
424 *) \
425 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
426 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
427 esac;
428
429 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
430 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
431
432 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
433 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
434 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
435 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
436 $(am__aclocal_m4_deps):
437 libcinnamon-menu-3.0.pc: $(top_builddir)/config.status $(srcdir)/libcinnamon-menu-3.0.pc.in
438 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
439 libcinnamon-menu-3.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/libcinnamon-menu-3.0-uninstalled.pc.in
440 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
441
442 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
443 @$(NORMAL_INSTALL)
444 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
445 list2=; for p in $$list; do \
446 if test -f $$p; then \
447 list2="$$list2 $$p"; \
448 else :; fi; \
449 done; \
450 test -z "$$list2" || { \
451 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
452 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
453 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
454 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
455 }
456
457 uninstall-libLTLIBRARIES:
458 @$(NORMAL_UNINSTALL)
459 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
460 for p in $$list; do \
461 $(am__strip_dir) \
462 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
463 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
464 done
465
466 clean-libLTLIBRARIES:
467 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
468 @list='$(lib_LTLIBRARIES)'; \
469 locs=`for p in $$list; do echo $$p; done | \
470 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
471 sort -u`; \
472 test -z "$$locs" || { \
473 echo rm -f $${locs}; \
474 rm -f $${locs}; \
475 }
476
477 libcinnamon-menu-3.la: $(libcinnamon_menu_3_la_OBJECTS) $(libcinnamon_menu_3_la_DEPENDENCIES) $(EXTRA_libcinnamon_menu_3_la_DEPENDENCIES)
478 $(AM_V_CCLD)$(libcinnamon_menu_3_la_LINK) -rpath $(libdir) $(libcinnamon_menu_3_la_OBJECTS) $(libcinnamon_menu_3_la_LIBADD) $(LIBS)
479
480 mostlyclean-compile:
481 -rm -f *.$(OBJEXT)
482
483 distclean-compile:
484 -rm -f *.tab.c
485
486 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Plo@am__quote@
487 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/desktop-entries.Plo@am__quote@
488 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entry-directories.Plo@am__quote@
489 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmenu-tree.Plo@am__quote@
490 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu-layout.Plo@am__quote@
491 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu-monitor.Plo@am__quote@
492 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu-util.Plo@am__quote@
493
494 .c.o:
495 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
496 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
497 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
498 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
499 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
500
501 .c.obj:
502 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
503 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
504 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
505 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
506 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
507
508 .c.lo:
509 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
510 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
511 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
512 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
513 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
514
515 mostlyclean-libtool:
516 -rm -f *.lo
517
518 clean-libtool:
519 -rm -rf .libs _libs
520 install-girDATA: $(gir_DATA)
521 @$(NORMAL_INSTALL)
522 @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
523 if test -n "$$list"; then \
524 echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \
525 $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \
526 fi; \
527 for p in $$list; do \
528 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
529 echo "$$d$$p"; \
530 done | $(am__base_list) | \
531 while read files; do \
532 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(girdir)'"; \
533 $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \
534 done
535
536 uninstall-girDATA:
537 @$(NORMAL_UNINSTALL)
538 @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
539 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
540 dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir)
541 install-pkgconfigDATA: $(pkgconfig_DATA)
542 @$(NORMAL_INSTALL)
543 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
544 if test -n "$$list"; then \
545 echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
546 $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
547 fi; \
548 for p in $$list; do \
549 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
550 echo "$$d$$p"; \
551 done | $(am__base_list) | \
552 while read files; do \
553 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
554 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
555 done
556
557 uninstall-pkgconfigDATA:
558 @$(NORMAL_UNINSTALL)
559 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
560 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
561 dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
562 install-typelibDATA: $(typelib_DATA)
563 @$(NORMAL_INSTALL)
564 @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \
565 if test -n "$$list"; then \
566 echo " $(MKDIR_P) '$(DESTDIR)$(typelibdir)'"; \
567 $(MKDIR_P) "$(DESTDIR)$(typelibdir)" || exit 1; \
568 fi; \
569 for p in $$list; do \
570 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
571 echo "$$d$$p"; \
572 done | $(am__base_list) | \
573 while read files; do \
574 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typelibdir)'"; \
575 $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibdir)" || exit $$?; \
576 done
577
578 uninstall-typelibDATA:
579 @$(NORMAL_UNINSTALL)
580 @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \
581 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
582 dir='$(DESTDIR)$(typelibdir)'; $(am__uninstall_files_from_dir)
583 install-libcinnamon_menu_3_includeHEADERS: $(libcinnamon_menu_3_include_HEADERS)
584 @$(NORMAL_INSTALL)
585 @list='$(libcinnamon_menu_3_include_HEADERS)'; test -n "$(libcinnamon_menu_3_includedir)" || list=; \
586 if test -n "$$list"; then \
587 echo " $(MKDIR_P) '$(DESTDIR)$(libcinnamon_menu_3_includedir)'"; \
588 $(MKDIR_P) "$(DESTDIR)$(libcinnamon_menu_3_includedir)" || exit 1; \
589 fi; \
590 for p in $$list; do \
591 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
592 echo "$$d$$p"; \
593 done | $(am__base_list) | \
594 while read files; do \
595 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcinnamon_menu_3_includedir)'"; \
596 $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcinnamon_menu_3_includedir)" || exit $$?; \
597 done
598
599 uninstall-libcinnamon_menu_3_includeHEADERS:
600 @$(NORMAL_UNINSTALL)
601 @list='$(libcinnamon_menu_3_include_HEADERS)'; test -n "$(libcinnamon_menu_3_includedir)" || list=; \
602 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
603 dir='$(DESTDIR)$(libcinnamon_menu_3_includedir)'; $(am__uninstall_files_from_dir)
604
605 ID: $(am__tagged_files)
606 $(am__define_uniq_tagged_files); mkid -fID $$unique
607 tags: tags-am
608 TAGS: tags
609
610 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
611 set x; \
612 here=`pwd`; \
613 $(am__define_uniq_tagged_files); \
614 shift; \
615 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
616 test -n "$$unique" || unique=$$empty_fix; \
617 if test $$# -gt 0; then \
618 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
619 "$$@" $$unique; \
620 else \
621 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
622 $$unique; \
623 fi; \
624 fi
625 ctags: ctags-am
626
627 CTAGS: ctags
628 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
629 $(am__define_uniq_tagged_files); \
630 test -z "$(CTAGS_ARGS)$$unique" \
631 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
632 $$unique
633
634 GTAGS:
635 here=`$(am__cd) $(top_builddir) && pwd` \
636 && $(am__cd) $(top_srcdir) \
637 && gtags -i $(GTAGS_ARGS) "$$here"
638 cscopelist: cscopelist-am
639
640 cscopelist-am: $(am__tagged_files)
641 list='$(am__tagged_files)'; \
642 case "$(srcdir)" in \
643 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
644 *) sdir=$(subdir)/$(srcdir) ;; \
645 esac; \
646 for i in $$list; do \
647 if test -f "$$i"; then \
648 echo "$(subdir)/$$i"; \
649 else \
650 echo "$$sdir/$$i"; \
651 fi; \
652 done >> $(top_builddir)/cscope.files
653
654 distclean-tags:
655 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
656
657 distdir: $(DISTFILES)
658 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
659 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
660 list='$(DISTFILES)'; \
661 dist_files=`for file in $$list; do echo $$file; done | \
662 sed -e "s|^$$srcdirstrip/||;t" \
663 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
664 case $$dist_files in \
665 */*) $(MKDIR_P) `echo "$$dist_files" | \
666 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
667 sort -u` ;; \
668 esac; \
669 for file in $$dist_files; do \
670 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
671 if test -d $$d/$$file; then \
672 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
673 if test -d "$(distdir)/$$file"; then \
674 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
675 fi; \
676 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
677 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
678 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
679 fi; \
680 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
681 else \
682 test -f "$(distdir)/$$file" \
683 || cp -p $$d/$$file "$(distdir)/$$file" \
684 || exit 1; \
685 fi; \
686 done
687 check-am: all-am
688 check: check-am
689 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
690 installdirs:
691 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libcinnamon_menu_3_includedir)"; do \
692 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
693 done
694 install: install-am
695 install-exec: install-exec-am
696 install-data: install-data-am
697 uninstall: uninstall-am
698
699 install-am: all-am
700 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
701
702 installcheck: installcheck-am
703 install-strip:
704 if test -z '$(STRIP)'; then \
705 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
706 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
707 install; \
708 else \
709 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
710 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
711 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
712 fi
713 mostlyclean-generic:
714
715 clean-generic:
716 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
717
718 distclean-generic:
719 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
720 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
721
722 maintainer-clean-generic:
723 @echo "This command is intended for maintainers to use"
724 @echo "it deletes files that may require special tools to rebuild."
725 clean: clean-am
726
727 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
728 mostlyclean-am
729
730 distclean: distclean-am
731 -rm -rf ./$(DEPDIR)
732 -rm -f Makefile
733 distclean-am: clean-am distclean-compile distclean-generic \
734 distclean-tags
735
736 dvi: dvi-am
737
738 dvi-am:
739
740 html: html-am
741
742 html-am:
743
744 info: info-am
745
746 info-am:
747
748 install-data-am: install-girDATA \
749 install-libcinnamon_menu_3_includeHEADERS \
750 install-pkgconfigDATA install-typelibDATA
751
752 install-dvi: install-dvi-am
753
754 install-dvi-am:
755
756 install-exec-am: install-libLTLIBRARIES
757
758 install-html: install-html-am
759
760 install-html-am:
761
762 install-info: install-info-am
763
764 install-info-am:
765
766 install-man:
767
768 install-pdf: install-pdf-am
769
770 install-pdf-am:
771
772 install-ps: install-ps-am
773
774 install-ps-am:
775
776 installcheck-am:
777
778 maintainer-clean: maintainer-clean-am
779 -rm -rf ./$(DEPDIR)
780 -rm -f Makefile
781 maintainer-clean-am: distclean-am maintainer-clean-generic
782
783 mostlyclean: mostlyclean-am
784
785 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
786 mostlyclean-libtool
787
788 pdf: pdf-am
789
790 pdf-am:
791
792 ps: ps-am
793
794 ps-am:
795
796 uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \
797 uninstall-libcinnamon_menu_3_includeHEADERS \
798 uninstall-pkgconfigDATA uninstall-typelibDATA
799
800 .MAKE: install-am install-strip
801
802 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
803 clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
804 ctags-am distclean distclean-compile distclean-generic \
805 distclean-libtool distclean-tags distdir dvi dvi-am html \
806 html-am info info-am install install-am install-data \
807 install-data-am install-dvi install-dvi-am install-exec \
808 install-exec-am install-girDATA install-html install-html-am \
809 install-info install-info-am install-libLTLIBRARIES \
810 install-libcinnamon_menu_3_includeHEADERS install-man \
811 install-pdf install-pdf-am install-pkgconfigDATA install-ps \
812 install-ps-am install-strip install-typelibDATA installcheck \
813 installcheck-am installdirs maintainer-clean \
814 maintainer-clean-generic mostlyclean mostlyclean-compile \
815 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
816 tags tags-am uninstall uninstall-am uninstall-girDATA \
817 uninstall-libLTLIBRARIES \
818 uninstall-libcinnamon_menu_3_includeHEADERS \
819 uninstall-pkgconfigDATA uninstall-typelibDATA
820
821
822 # Introspection
823 -include $(INTROSPECTION_MAKEFILE)
824
825 @HAVE_INTROSPECTION_TRUE@CMenu-3.0.gir: libcinnamon-menu-3.la
826
827 -include $(top_srcdir)/git.mk
828
829 # Tell versions [3.59,3.63) of GNU make to not export all variables.
830 # Otherwise a system limit (for SysV at least) may be exceeded.
831 .NOEXPORT:
0 /* Return the canonical absolute name of a given file.
1 Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 Copyright (C) 2002 Red Hat, Inc. (trivial port to GLib)
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library 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 GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
20
21 #include <config.h>
22
23 #include "canonicalize.h"
24
25 #include <stdlib.h>
26 #include <string.h>
27 #include <unistd.h>
28 #include <limits.h>
29 #include <sys/param.h>
30 #include <sys/stat.h>
31 #include <errno.h>
32 #include <stddef.h>
33
34 /* Return the canonical absolute name of file NAME. A canonical name
35 does not contain any `.', `..' components nor any repeated path
36 separators ('/') or symlinks. All path components must exist. If
37 RESOLVED is null, the result is malloc'd; otherwise, if the
38 canonical name is PATH_MAX chars or more, returns null with `errno'
39 set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
40 returns the name in RESOLVED. If the name cannot be resolved and
41 RESOLVED is non-NULL, it contains the path of the first component
42 that cannot be resolved. If the path can be resolved, RESOLVED
43 holds the same value as the value returned. */
44
45 static char*
46 menu_realpath (const char *name, char *resolved)
47 {
48 char *rpath, *dest, *extra_buf = NULL;
49 const char *start, *end, *rpath_limit;
50 long int path_max;
51 int num_links = 0;
52
53 if (name == NULL)
54 {
55 /* As per Single Unix Specification V2 we must return an error if
56 either parameter is a null pointer. We extend this to allow
57 the RESOLVED parameter to be NULL in case the we are expected to
58 allocate the room for the return value. */
59 errno = EINVAL;
60 return NULL;
61 }
62
63 if (name[0] == '\0')
64 {
65 /* As per Single Unix Specification V2 we must return an error if
66 the name argument points to an empty string. */
67 errno = ENOENT;
68 return NULL;
69 }
70
71 #ifdef PATH_MAX
72 path_max = PATH_MAX;
73 #else
74 path_max = pathconf (name, _PC_PATH_MAX);
75 if (path_max <= 0)
76 path_max = 1024;
77 #endif
78
79 rpath = resolved ? g_alloca (path_max) : g_malloc (path_max);
80 rpath_limit = rpath + path_max;
81
82 if (name[0] != G_DIR_SEPARATOR)
83 {
84 if (!getcwd (rpath, path_max))
85 {
86 rpath[0] = '\0';
87 goto error;
88 }
89 dest = strchr (rpath, '\0');
90 }
91 else
92 {
93 rpath[0] = G_DIR_SEPARATOR;
94 dest = rpath + 1;
95 }
96
97 for (start = end = name; *start; start = end)
98 {
99 struct stat st;
100 int n;
101
102 /* Skip sequence of multiple path-separators. */
103 while (*start == G_DIR_SEPARATOR)
104 ++start;
105
106 /* Find end of path component. */
107 for (end = start; *end && *end != G_DIR_SEPARATOR; ++end)
108 /* Nothing. */;
109
110 if (end - start == 0)
111 break;
112 else if (end - start == 1 && start[0] == '.')
113 /* nothing */;
114 else if (end - start == 2 && start[0] == '.' && start[1] == '.')
115 {
116 /* Back up to previous component, ignore if at root already. */
117 if (dest > rpath + 1)
118 while ((--dest)[-1] != G_DIR_SEPARATOR);
119 }
120 else
121 {
122 size_t new_size;
123
124 if (dest[-1] != G_DIR_SEPARATOR)
125 *dest++ = G_DIR_SEPARATOR;
126
127 if (dest + (end - start) >= rpath_limit)
128 {
129 ptrdiff_t dest_offset = dest - rpath;
130 char *new_rpath;
131
132 if (resolved)
133 {
134 #ifdef ENAMETOOLONG
135 errno = ENAMETOOLONG;
136 #else
137 /* Uh... just pick something */
138 errno = EINVAL;
139 #endif
140 if (dest > rpath + 1)
141 dest--;
142 *dest = '\0';
143 goto error;
144 }
145 new_size = rpath_limit - rpath;
146 if (end - start + 1 > path_max)
147 new_size += end - start + 1;
148 else
149 new_size += path_max;
150 new_rpath = (char *) realloc (rpath, new_size);
151 if (new_rpath == NULL)
152 goto error;
153 rpath = new_rpath;
154 rpath_limit = rpath + new_size;
155
156 dest = rpath + dest_offset;
157 }
158
159 memcpy (dest, start, end - start);
160 dest = dest + (end - start);
161 *dest = '\0';
162
163 if (stat (rpath, &st) < 0)
164 goto error;
165
166 if (S_ISLNK (st.st_mode))
167 {
168 char *buf = alloca (path_max);
169 size_t len;
170
171 if (++num_links > MAXSYMLINKS)
172 {
173 errno = ELOOP;
174 goto error;
175 }
176
177 n = readlink (rpath, buf, path_max);
178 if (n < 0)
179 goto error;
180 buf[n] = '\0';
181
182 if (!extra_buf)
183 extra_buf = g_alloca (path_max);
184
185 len = strlen (end);
186 if ((long int) (n + len) >= path_max)
187 {
188 #ifdef ENAMETOOLONG
189 errno = ENAMETOOLONG;
190 #else
191 /* Uh... just pick something */
192 errno = EINVAL;
193 #endif
194 goto error;
195 }
196
197 /* Careful here, end may be a pointer into extra_buf... */
198 g_memmove (&extra_buf[n], end, len + 1);
199 name = end = memcpy (extra_buf, buf, n);
200
201 if (buf[0] == G_DIR_SEPARATOR)
202 dest = rpath + 1; /* It's an absolute symlink */
203 else
204 /* Back up to previous component, ignore if at root already: */
205 if (dest > rpath + 1)
206 while ((--dest)[-1] != G_DIR_SEPARATOR);
207 }
208 }
209 }
210 if (dest > rpath + 1 && dest[-1] == G_DIR_SEPARATOR)
211 --dest;
212 *dest = '\0';
213
214 return resolved ? memcpy (resolved, rpath, dest - rpath + 1) : rpath;
215
216 error:
217 if (resolved)
218 strcpy (resolved, rpath);
219 else
220 g_free (rpath);
221 return NULL;
222 }
223
224 char *
225 menu_canonicalize_file_name (const char *name,
226 gboolean allow_missing_basename)
227 {
228 char *retval;
229
230 retval = menu_realpath (name, NULL);
231
232 /* We could avoid some system calls by using the second
233 * argument to realpath() instead of doing realpath
234 * all over again, but who cares really. we'll see if
235 * it's ever in a profile.
236 */
237 if (allow_missing_basename && retval == NULL)
238 {
239 char *dirname;
240 char *canonical_dirname;
241 dirname = g_path_get_dirname (name);
242 canonical_dirname = menu_realpath (dirname, NULL);
243 g_free (dirname);
244 if (canonical_dirname)
245 {
246 char *basename;
247 basename = g_path_get_basename (name);
248 retval = g_build_filename (canonical_dirname, basename, NULL);
249 g_free (basename);
250 g_free (canonical_dirname);
251 }
252 }
253
254 return retval;
255 }
0 /* Return the canonical absolute name of a given file.
1 Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 Copyright (C) 2002 Red Hat, Inc. (trivial port to GLib)
5
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 The GNU C Library 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 GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA. */
20
21 #ifndef G_CANONICALIZE_H
22 #define G_CANONICALIZE_H
23
24 #include <glib.h>
25
26 G_BEGIN_DECLS
27
28 char* menu_canonicalize_file_name (const char *name,
29 gboolean allow_missing_basename);
30
31 G_END_DECLS
32
33 #endif /* G_CANONICALIZE_H */
0 /*
1 * Copyright (C) 2002 - 2004 Red Hat, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library 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 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
17 */
18
19 #include <config.h>
20
21 #include "desktop-entries.h"
22 #include <gio/gdesktopappinfo.h>
23
24 #include <string.h>
25
26 #include "menu-util.h"
27
28 #define DESKTOP_ENTRY_GROUP "Desktop Entry"
29
30 struct DesktopEntry
31 {
32 guint refcount;
33
34 char *path;
35 const char *basename;
36
37 guint type : 2;
38 guint reserved : 30;
39 };
40
41 typedef struct
42 {
43 DesktopEntry base;
44
45 GDesktopAppInfo *appinfo;
46 GQuark *categories;
47 guint showin : 1;
48 } DesktopEntryDesktop;
49
50 typedef struct
51 {
52 DesktopEntry base;
53
54 char *name;
55 char *generic_name;
56 char *comment;
57 GIcon *icon;
58
59 guint nodisplay : 1;
60 guint hidden : 1;
61 guint showin : 1;
62 } DesktopEntryDirectory;
63
64 struct DesktopEntrySet
65 {
66 int refcount;
67 GHashTable *hash;
68 };
69
70 /*
71 * Desktop entries
72 */
73
74 /**
75 * unix_basename_from_path:
76 * @path: Path string
77 *
78 * Returns: A constant pointer into the basename of @path
79 */
80 static const char *
81 unix_basename_from_path (const char *path)
82 {
83 const char *basename = g_strrstr (path, "/");
84 if (basename)
85 return basename + 1;
86 else
87 return path;
88 }
89
90 static const char *
91 get_current_desktop (void)
92 {
93 static char *current_desktop = NULL;
94
95 /* Support XDG_CURRENT_DESKTOP environment variable; this can be used
96 * to abuse gnome-menus in non-GNOME desktops. */
97 if (!current_desktop)
98 {
99 const char *desktop;
100
101 desktop = g_getenv ("XDG_CURRENT_DESKTOP");
102
103 /* Note: if XDG_CURRENT_DESKTOP is set but empty, do as if it
104 * was not set */
105 if (!desktop || desktop[0] == '\0')
106 current_desktop = g_strdup ("GNOME");
107 else
108 current_desktop = g_strdup (desktop);
109 }
110
111 /* Using "*" means skipping desktop-related checks */
112 if (g_strcmp0 (current_desktop, "*") == 0)
113 return NULL;
114
115 return current_desktop;
116 }
117
118 static GIcon *
119 key_file_get_icon (GKeyFile *key_file)
120 {
121 GIcon *icon = NULL;
122 gchar *icon_name;
123
124 icon_name = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP,
125 "Icon", NULL, NULL);
126 if (!icon_name)
127 return NULL;
128
129 if (g_path_is_absolute (icon_name)) {
130 GFile *file;
131
132 file = g_file_new_for_path (icon_name);
133 icon = g_file_icon_new (file);
134 g_object_unref (file);
135 } else {
136 char *p;
137
138 /* Work around a common mistake in desktop files */
139 if ((p = strrchr (icon_name, '.')) != NULL &&
140 (strcmp (p, ".png") == 0 ||
141 strcmp (p, ".xpm") == 0 ||
142 strcmp (p, ".svg") == 0))
143 *p = 0;
144
145 icon = g_themed_icon_new (icon_name);
146 }
147
148 g_free (icon_name);
149
150 return icon;
151 }
152
153 static gboolean
154 key_file_get_show_in (GKeyFile *key_file)
155 {
156 const gchar *current_desktop;
157 gchar **strv;
158 gboolean show_in = TRUE;
159 int i;
160 gchar *exec;
161
162 current_desktop = get_current_desktop ();
163 if (!current_desktop)
164 return TRUE;
165
166 exec = g_key_file_get_string (key_file,
167 DESKTOP_ENTRY_GROUP,
168 "Exec",
169 NULL);
170
171 if (exec) {
172 if (g_str_has_prefix (exec, "gnome-control-center")) {
173 g_free (exec);
174 return FALSE;
175 }
176 g_free (exec);
177 }
178
179 strv = g_key_file_get_string_list (key_file,
180 DESKTOP_ENTRY_GROUP,
181 "OnlyShowIn",
182 NULL,
183 NULL);
184
185 if (strv)
186 {
187 show_in = FALSE;
188 for (i = 0; strv[i]; i++)
189 {
190 if (!strcmp (strv[i], "GNOME") || !strcmp (strv[i], "X-Cinnamon"))
191 {
192 show_in = TRUE;
193 break;
194 }
195 }
196 }
197 else
198 {
199 strv = g_key_file_get_string_list (key_file,
200 DESKTOP_ENTRY_GROUP,
201 "NotShowIn",
202 NULL,
203 NULL);
204 if (strv)
205 {
206 show_in = TRUE;
207 for (i = 0; strv[i]; i++)
208 {
209 if (!strcmp (strv[i], current_desktop))
210 {
211 show_in = FALSE;
212 }
213 }
214 }
215 }
216 g_strfreev (strv);
217
218 return show_in;
219 }
220
221 static gboolean
222 desktop_entry_load_directory (DesktopEntry *entry,
223 GKeyFile *key_file,
224 GError **error)
225 {
226 DesktopEntryDirectory *entry_directory = (DesktopEntryDirectory*)entry;
227 char *type_str;
228
229 type_str = g_key_file_get_string (key_file, DESKTOP_ENTRY_GROUP, "Type", error);
230 if (!type_str)
231 return FALSE;
232
233 if (strcmp (type_str, "Directory") != 0)
234 {
235 g_set_error (error,
236 G_KEY_FILE_ERROR,
237 G_KEY_FILE_ERROR_INVALID_VALUE,
238 "\"%s\" does not contain the correct \"Type\" value\n", entry->path);
239 g_free (type_str);
240 return FALSE;
241 }
242
243 g_free (type_str);
244
245 entry_directory->name = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP, "Name", NULL, error);
246 if (entry_directory->name == NULL)
247 return FALSE;
248
249 entry_directory->generic_name = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP, "GenericName", NULL, NULL);
250 entry_directory->comment = g_key_file_get_locale_string (key_file, DESKTOP_ENTRY_GROUP, "Comment", NULL, NULL);
251 entry_directory->icon = key_file_get_icon (key_file);
252 entry_directory->nodisplay = g_key_file_get_boolean (key_file,
253 DESKTOP_ENTRY_GROUP,
254 "NoDisplay",
255 NULL);
256 entry_directory->hidden = g_key_file_get_boolean (key_file,
257 DESKTOP_ENTRY_GROUP,
258 "Hidden",
259 NULL);
260 entry_directory->showin = key_file_get_show_in (key_file);
261
262 return TRUE;
263 }
264
265 static gboolean
266 desktop_entry_load (DesktopEntry *entry)
267 {
268 if (strstr (entry->path, "/menu-xdg/"))
269 return FALSE;
270 if (entry->type == DESKTOP_ENTRY_DESKTOP)
271 {
272 GKeyFile *key_file = NULL;
273 DesktopEntryDesktop *entry_desktop = (DesktopEntryDesktop*)entry;
274 const char *categories_str;
275
276 entry_desktop->appinfo = g_desktop_app_info_new_from_filename (entry->path);
277 if (!entry_desktop->appinfo ||
278 !g_app_info_get_name (G_APP_INFO (entry_desktop->appinfo)) ||
279 !g_app_info_get_executable (G_APP_INFO (entry_desktop->appinfo)))
280 {
281 menu_verbose ("Failed to load \"%s\"\n", entry->path);
282 return FALSE;
283 }
284
285 categories_str = g_desktop_app_info_get_categories (entry_desktop->appinfo);
286 if (categories_str)
287 {
288 char **categories;
289 int i;
290
291 categories = g_strsplit (categories_str, ";", -1);
292 entry_desktop->categories = g_new0 (GQuark, g_strv_length (categories) + 1);
293
294 for (i = 0; categories[i]; i++)
295 entry_desktop->categories[i] = g_quark_from_string (categories[i]);
296
297 g_strfreev (categories);
298 }
299
300 key_file = g_key_file_new ();
301
302 if (!g_key_file_load_from_file (key_file, entry->path, 0, NULL))
303 entry_desktop->showin = TRUE;
304 else
305 entry_desktop->showin = key_file_get_show_in (key_file);
306
307 g_key_file_free (key_file);
308
309 return TRUE;
310 }
311 else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
312 {
313 GKeyFile *key_file = NULL;
314 GError *error = NULL;
315 gboolean retval = FALSE;
316
317 key_file = g_key_file_new ();
318
319 if (!g_key_file_load_from_file (key_file, entry->path, 0, &error))
320 goto out;
321
322 if (!desktop_entry_load_directory (entry, key_file, &error))
323 goto out;
324
325 retval = TRUE;
326
327 out:
328 g_key_file_free (key_file);
329
330 if (!retval)
331 {
332 if (error)
333 {
334 menu_verbose ("Failed to load \"%s\": %s\n", entry->path, error->message);
335 g_error_free (error);
336 }
337 else
338 menu_verbose ("Failed to load \"%s\"\n", entry->path);
339 }
340
341 return retval;
342 }
343 else
344 g_assert_not_reached ();
345
346 return FALSE;
347 }
348
349 DesktopEntry *
350 desktop_entry_new (const char *path)
351 {
352 DesktopEntryType type;
353 DesktopEntry *retval;
354
355 menu_verbose ("Loading desktop entry \"%s\"\n", path);
356
357 if (g_str_has_suffix (path, ".desktop"))
358 {
359 type = DESKTOP_ENTRY_DESKTOP;
360 retval = (DesktopEntry*)g_new0 (DesktopEntryDesktop, 1);
361 }
362 else if (g_str_has_suffix (path, ".directory"))
363 {
364 type = DESKTOP_ENTRY_DIRECTORY;
365 retval = (DesktopEntry*)g_new0 (DesktopEntryDirectory, 1);
366 }
367 else
368 {
369 menu_verbose ("Unknown desktop entry suffix in \"%s\"\n",
370 path);
371 return NULL;
372 }
373
374 retval->refcount = 1;
375 retval->type = type;
376 retval->path = g_strdup (path);
377 retval->basename = unix_basename_from_path (retval->path);
378
379 if (!desktop_entry_load (retval))
380 {
381 desktop_entry_unref (retval);
382 return NULL;
383 }
384
385 return retval;
386 }
387
388 DesktopEntry *
389 desktop_entry_reload (DesktopEntry *entry)
390 {
391 g_return_val_if_fail (entry != NULL, NULL);
392
393 menu_verbose ("Re-loading desktop entry \"%s\"\n", entry->path);
394
395 if (entry->type == DESKTOP_ENTRY_DESKTOP)
396 {
397 DesktopEntryDesktop *entry_desktop = (DesktopEntryDesktop *) entry;
398
399 g_object_unref (entry_desktop->appinfo);
400 entry_desktop->appinfo = NULL;
401
402 g_free (entry_desktop->categories);
403 entry_desktop->categories = NULL;
404 }
405 else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
406 {
407 DesktopEntryDirectory *entry_directory = (DesktopEntryDirectory*) entry;
408
409 g_free (entry_directory->name);
410 entry_directory->name = NULL;
411
412 g_free (entry_directory->comment);
413 entry_directory->comment = NULL;
414
415 g_object_unref (entry_directory->icon);
416 entry_directory->icon = NULL;
417 }
418 else
419 g_assert_not_reached ();
420
421 if (!desktop_entry_load (entry))
422 {
423 desktop_entry_unref (entry);
424 return NULL;
425 }
426
427 return entry;
428 }
429
430 DesktopEntry *
431 desktop_entry_ref (DesktopEntry *entry)
432 {
433 g_return_val_if_fail (entry != NULL, NULL);
434 g_return_val_if_fail (entry->refcount > 0, NULL);
435
436 g_atomic_int_inc (&entry->refcount);
437
438 return entry;
439 }
440
441 DesktopEntry *
442 desktop_entry_copy (DesktopEntry *entry)
443 {
444 DesktopEntry *retval;
445
446 menu_verbose ("Copying desktop entry \"%s\"\n",
447 entry->basename);
448
449 if (entry->type == DESKTOP_ENTRY_DESKTOP)
450 retval = (DesktopEntry*)g_new0 (DesktopEntryDesktop, 1);
451 else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
452 retval = (DesktopEntry*)g_new0 (DesktopEntryDirectory, 1);
453 else
454 g_assert_not_reached ();
455
456 retval->refcount = 1;
457 retval->type = entry->type;
458 retval->path = g_strdup (entry->path);
459 retval->basename = unix_basename_from_path (retval->path);
460
461 if (retval->type == DESKTOP_ENTRY_DESKTOP)
462 {
463 DesktopEntryDesktop *desktop_entry = (DesktopEntryDesktop*) entry;
464 DesktopEntryDesktop *retval_desktop_entry = (DesktopEntryDesktop*) retval;
465 int i;
466
467 retval_desktop_entry->appinfo = g_object_ref (desktop_entry->appinfo);
468
469 if (desktop_entry->categories != NULL)
470 {
471 i = 0;
472 for (; desktop_entry->categories[i]; i++);
473
474 retval_desktop_entry->categories = g_new0 (GQuark, i + 1);
475
476 i = 0;
477 for (; desktop_entry->categories[i]; i++)
478 retval_desktop_entry->categories[i] = desktop_entry->categories[i];
479 }
480 else
481 retval_desktop_entry->categories = NULL;
482 }
483 else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
484 {
485 DesktopEntryDirectory *entry_directory = (DesktopEntryDirectory*)entry;
486 DesktopEntryDirectory *retval_directory = (DesktopEntryDirectory*)retval;
487
488 retval_directory->name = g_strdup (entry_directory->name);
489 retval_directory->comment = g_strdup (entry_directory->comment);
490 retval_directory->icon = g_object_ref (entry_directory->icon);
491 retval_directory->nodisplay = entry_directory->nodisplay;
492 retval_directory->hidden = entry_directory->hidden;
493 retval_directory->showin = entry_directory->showin;
494 }
495
496 return retval;
497 }
498
499 void
500 desktop_entry_unref (DesktopEntry *entry)
501 {
502 g_return_if_fail (entry != NULL);
503 g_return_if_fail (entry->refcount > 0);
504
505 entry->refcount -= 1;
506 if (entry->refcount != 0)
507 return;
508
509 g_free (entry->path);
510 entry->path = NULL;
511
512 if (entry->type == DESKTOP_ENTRY_DESKTOP)
513 {
514 DesktopEntryDesktop *desktop_entry = (DesktopEntryDesktop*) entry;
515 g_free (desktop_entry->categories);
516 if (desktop_entry->appinfo)
517 g_object_unref (desktop_entry->appinfo);
518 }
519 else if (entry->type == DESKTOP_ENTRY_DIRECTORY)
520 {
521 DesktopEntryDirectory *entry_directory = (DesktopEntryDirectory*) entry;
522
523 g_free (entry_directory->name);
524 entry_directory->name = NULL;
525
526 g_free (entry_directory->comment);
527 entry_directory->comment = NULL;
528
529 if (entry_directory->icon != NULL)
530 {
531 g_object_unref (entry_directory->icon);
532 entry_directory->icon = NULL;
533 }
534 }
535 else
536 g_assert_not_reached ();
537
538 g_free (entry);
539 }
540
541 DesktopEntryType
542 desktop_entry_get_type (DesktopEntry *entry)
543 {
544 return entry->type;
545 }
546
547 const char *
548 desktop_entry_get_path (DesktopEntry *entry)
549 {
550 return entry->path;
551 }
552
553 const char *
554 desktop_entry_get_basename (DesktopEntry *entry)
555 {
556 return entry->basename;
557 }
558
559 const char *
560 desktop_entry_get_name (DesktopEntry *entry)
561 {
562 if (entry->type == DESKTOP_ENTRY_DESKTOP)
563 return g_app_info_get_name (G_APP_INFO (((DesktopEntryDesktop*)entry)->appinfo));
564 return ((DesktopEntryDirectory*)entry)->name;
565 }
566
567 const char *
568 desktop_entry_get_generic_name (DesktopEntry *entry)
569 {
570 if (entry->type == DESKTOP_ENTRY_DESKTOP)
571 return g_desktop_app_info_get_generic_name (((DesktopEntryDesktop*)entry)->appinfo);
572 return ((DesktopEntryDirectory*)entry)->generic_name;
573 }
574
575 const char *
576 desktop_entry_get_comment (DesktopEntry *entry)
577 {
578 if (entry->type == DESKTOP_ENTRY_DESKTOP)
579 return g_app_info_get_description (G_APP_INFO (((DesktopEntryDesktop*)entry)->appinfo));
580 return ((DesktopEntryDirectory*)entry)->comment;
581 }
582
583 GIcon *
584 desktop_entry_get_icon (DesktopEntry *entry)
585 {
586 if (entry->type == DESKTOP_ENTRY_DESKTOP)
587 return g_app_info_get_icon (G_APP_INFO (((DesktopEntryDesktop*)entry)->appinfo));
588 return ((DesktopEntryDirectory*)entry)->icon;
589 }
590
591 gboolean
592 desktop_entry_get_no_display (DesktopEntry *entry)
593 {
594 if (entry->type == DESKTOP_ENTRY_DESKTOP)
595 return g_desktop_app_info_get_nodisplay (((DesktopEntryDesktop*)entry)->appinfo);
596 return ((DesktopEntryDirectory*)entry)->nodisplay;
597 }
598
599 gboolean
600 desktop_entry_get_hidden (DesktopEntry *entry)
601 {
602 if (entry->type == DESKTOP_ENTRY_DESKTOP)
603 return g_desktop_app_info_get_is_hidden (((DesktopEntryDesktop*)entry)->appinfo);
604 return ((DesktopEntryDirectory*)entry)->hidden;
605 }
606
607 gboolean
608 desktop_entry_get_show_in (DesktopEntry *entry)
609 {
610 if (entry->type == DESKTOP_ENTRY_DESKTOP)
611 {
612 const char *current_desktop = get_current_desktop ();
613
614 if (current_desktop == NULL)
615 return TRUE;
616 else {
617 return ((DesktopEntryDesktop *)entry)->showin;
618 }
619 }
620 return ((DesktopEntryDirectory*)entry)->showin;
621 }
622
623
624 GDesktopAppInfo *
625 desktop_entry_get_app_info (DesktopEntry *entry)
626 {
627 g_return_val_if_fail (entry->type == DESKTOP_ENTRY_DESKTOP, NULL);
628 return ((DesktopEntryDesktop*)entry)->appinfo;
629 }
630
631 gboolean
632 desktop_entry_has_categories (DesktopEntry *entry)
633 {
634 DesktopEntryDesktop *desktop_entry;
635 if (entry->type != DESKTOP_ENTRY_DESKTOP)
636 return FALSE;
637
638 desktop_entry = (DesktopEntryDesktop*) entry;
639 return (desktop_entry->categories != NULL && desktop_entry->categories[0] != 0);
640 }
641
642 gboolean
643 desktop_entry_has_category (DesktopEntry *entry,
644 const char *category)
645 {
646 GQuark quark;
647 int i;
648 DesktopEntryDesktop *desktop_entry;
649
650 if (entry->type != DESKTOP_ENTRY_DESKTOP)
651 return FALSE;
652
653 desktop_entry = (DesktopEntryDesktop*) entry;
654
655 if (desktop_entry->categories == NULL)
656 return FALSE;
657
658 if (!(quark = g_quark_try_string (category)))
659 return FALSE;
660
661 for (i = 0; desktop_entry->categories[i]; i++)
662 {
663 if (quark == desktop_entry->categories[i])
664 return TRUE;
665 }
666
667 return FALSE;
668 }
669
670 void
671 desktop_entry_add_legacy_category (DesktopEntry *entry)
672 {
673 GQuark *categories;
674 int i;
675 DesktopEntryDesktop *desktop_entry;
676
677 g_return_if_fail (entry->type == DESKTOP_ENTRY_DESKTOP);
678
679 desktop_entry = (DesktopEntryDesktop*) entry;
680
681 menu_verbose ("Adding Legacy category to \"%s\"\n",
682 entry->basename);
683
684 if (desktop_entry->categories != NULL)
685 {
686 i = 0;
687 for (; desktop_entry->categories[i]; i++);
688
689 categories = g_new0 (GQuark, i + 2);
690
691 i = 0;
692 for (; desktop_entry->categories[i]; i++)
693 categories[i] = desktop_entry->categories[i];
694 }
695 else
696 {
697 categories = g_new0 (GQuark, 2);
698 i = 0;
699 }
700
701 categories[i] = g_quark_from_string ("Legacy");
702
703 g_free (desktop_entry->categories);
704 desktop_entry->categories = categories;
705 }
706
707 /*
708 * Entry sets
709 */
710
711 DesktopEntrySet *
712 desktop_entry_set_new (void)
713 {
714 DesktopEntrySet *set;
715
716 set = g_new0 (DesktopEntrySet, 1);
717 set->refcount = 1;
718
719 menu_verbose (" New entry set %p\n", set);
720
721 return set;
722 }
723
724 DesktopEntrySet *
725 desktop_entry_set_ref (DesktopEntrySet *set)
726 {
727 g_return_val_if_fail (set != NULL, NULL);
728 g_return_val_if_fail (set->refcount > 0, NULL);
729
730 g_atomic_int_inc (&set->refcount);
731
732 return set;
733 }
734
735 void
736 desktop_entry_set_unref (DesktopEntrySet *set)
737 {
738 gboolean is_zero;
739
740 g_return_if_fail (set != NULL);
741 g_return_if_fail (set->refcount > 0);
742
743 is_zero = g_atomic_int_dec_and_test (&set->refcount);
744 if (is_zero)
745 {
746 menu_verbose (" Deleting entry set %p\n", set);
747
748 if (set->hash)
749 g_hash_table_destroy (set->hash);
750 set->hash = NULL;
751
752 g_free (set);
753 }
754 }
755
756 void
757 desktop_entry_set_add_entry (DesktopEntrySet *set,
758 DesktopEntry *entry,
759 const char *file_id)
760 {
761 menu_verbose (" Adding to set %p entry %s\n", set, file_id);
762
763 if (set->hash == NULL)
764 {
765 set->hash = g_hash_table_new_full (g_str_hash,
766 g_str_equal,
767 g_free,
768 (GDestroyNotify) desktop_entry_unref);
769 }
770
771 g_hash_table_replace (set->hash,
772 g_strdup (file_id),
773 desktop_entry_ref (entry));
774 }
775
776 DesktopEntry *
777 desktop_entry_set_lookup (DesktopEntrySet *set,
778 const char *file_id)
779 {
780 if (set->hash == NULL)
781 return NULL;
782
783 return g_hash_table_lookup (set->hash, file_id);
784 }
785
786 typedef struct
787 {
788 DesktopEntrySetForeachFunc func;
789 gpointer user_data;
790 } EntryHashForeachData;
791
792 static void
793 entry_hash_foreach (const char *file_id,
794 DesktopEntry *entry,
795 EntryHashForeachData *fd)
796 {
797 fd->func (file_id, entry, fd->user_data);
798 }
799
800 void
801 desktop_entry_set_foreach (DesktopEntrySet *set,
802 DesktopEntrySetForeachFunc func,
803 gpointer user_data)
804 {
805 g_return_if_fail (set != NULL);
806 g_return_if_fail (func != NULL);
807
808 if (set->hash != NULL)
809 {
810 EntryHashForeachData fd;
811
812 fd.func = func;
813 fd.user_data = user_data;
814
815 g_hash_table_foreach (set->hash,
816 (GHFunc) entry_hash_foreach,
817 &fd);
818 }
819 }
820
821 static void
822 desktop_entry_set_clear (DesktopEntrySet *set)
823 {
824 menu_verbose (" Clearing set %p\n", set);
825
826 if (set->hash != NULL)
827 {
828 g_hash_table_destroy (set->hash);
829 set->hash = NULL;
830 }
831 }
832
833 int
834 desktop_entry_set_get_count (DesktopEntrySet *set)
835 {
836 if (set->hash == NULL)
837 return 0;
838
839 return g_hash_table_size (set->hash);
840 }
841
842 static void
843 union_foreach (const char *file_id,
844 DesktopEntry *entry,
845 DesktopEntrySet *set)
846 {
847 /* we are iterating over "with" adding anything not
848 * already in "set". We unconditionally overwrite
849 * the stuff in "set" because we can assume
850 * two entries with the same name are equivalent.
851 */
852 desktop_entry_set_add_entry (set, entry, file_id);
853 }
854
855 void
856 desktop_entry_set_union (DesktopEntrySet *set,
857 DesktopEntrySet *with)
858 {
859 menu_verbose (" Union of %p and %p\n", set, with);
860
861 if (desktop_entry_set_get_count (with) == 0)
862 return; /* A fast simple case */
863
864 g_hash_table_foreach (with->hash,
865 (GHFunc) union_foreach,
866 set);
867 }
868
869 typedef struct
870 {
871 DesktopEntrySet *set;
872 DesktopEntrySet *with;
873 } IntersectData;
874
875 static gboolean
876 intersect_foreach_remove (const char *file_id,
877 DesktopEntry *entry,
878 IntersectData *id)
879 {
880 /* Remove everything in "set" which is not in "with" */
881
882 if (g_hash_table_lookup (id->with->hash, file_id) != NULL)
883 return FALSE;
884
885 menu_verbose (" Removing from %p entry %s\n", id->set, file_id);
886
887 return TRUE; /* return TRUE to remove */
888 }
889
890 void
891 desktop_entry_set_intersection (DesktopEntrySet *set,
892 DesktopEntrySet *with)
893 {
894 IntersectData id;
895
896 menu_verbose (" Intersection of %p and %p\n", set, with);
897
898 if (desktop_entry_set_get_count (set) == 0 ||
899 desktop_entry_set_get_count (with) == 0)
900 {
901 /* A fast simple case */
902 desktop_entry_set_clear (set);
903 return;
904 }
905
906 id.set = set;
907 id.with = with;
908
909 g_hash_table_foreach_remove (set->hash,
910 (GHRFunc) intersect_foreach_remove,
911 &id);
912 }
913
914 typedef struct
915 {
916 DesktopEntrySet *set;
917 DesktopEntrySet *other;
918 } SubtractData;
919
920 static gboolean
921 subtract_foreach_remove (const char *file_id,
922 DesktopEntry *entry,
923 SubtractData *sd)
924 {
925 /* Remove everything in "set" which is not in "other" */
926
927 if (g_hash_table_lookup (sd->other->hash, file_id) == NULL)
928 return FALSE;
929
930 menu_verbose (" Removing from %p entry %s\n", sd->set, file_id);
931
932 return TRUE; /* return TRUE to remove */
933 }
934
935 void
936 desktop_entry_set_subtract (DesktopEntrySet *set,
937 DesktopEntrySet *other)
938 {
939 SubtractData sd;
940
941 menu_verbose (" Subtract from %p set %p\n", set, other);
942
943 if (desktop_entry_set_get_count (set) == 0 ||
944 desktop_entry_set_get_count (other) == 0)
945 return; /* A fast simple case */
946
947 sd.set = set;
948 sd.other = other;
949
950 g_hash_table_foreach_remove (set->hash,
951 (GHRFunc) subtract_foreach_remove,
952 &sd);
953 }
954
955 void
956 desktop_entry_set_swap_contents (DesktopEntrySet *a,
957 DesktopEntrySet *b)
958 {
959 GHashTable *tmp;
960
961 menu_verbose (" Swap contents of %p and %p\n", a, b);
962
963 tmp = a->hash;
964 a->hash = b->hash;
965 b->hash = tmp;
966 }
0 /*
1 * Copyright (C) 2002 - 2004 Red Hat, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library 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 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef __DESKTOP_ENTRIES_H__
20 #define __DESKTOP_ENTRIES_H__
21
22 #include <gio/gdesktopappinfo.h>
23
24 G_BEGIN_DECLS
25
26 typedef enum
27 {
28 DESKTOP_ENTRY_INVALID = 0,
29 DESKTOP_ENTRY_DESKTOP,
30 DESKTOP_ENTRY_DIRECTORY
31 } DesktopEntryType;
32
33 typedef struct DesktopEntry DesktopEntry;
34
35 DesktopEntry *desktop_entry_new (const char *path);
36
37 DesktopEntry *desktop_entry_ref (DesktopEntry *entry);
38 DesktopEntry *desktop_entry_copy (DesktopEntry *entry);
39 DesktopEntry *desktop_entry_reload (DesktopEntry *entry);
40 void desktop_entry_unref (DesktopEntry *entry);
41
42 DesktopEntryType desktop_entry_get_type (DesktopEntry *entry);
43 const char *desktop_entry_get_path (DesktopEntry *entry);
44 const char *desktop_entry_get_basename (DesktopEntry *entry);
45 const char *desktop_entry_get_name (DesktopEntry *entry);
46 const char *desktop_entry_get_generic_name (DesktopEntry *entry);
47 const char *desktop_entry_get_comment (DesktopEntry *entry);
48 GIcon *desktop_entry_get_icon (DesktopEntry *entry);
49 gboolean desktop_entry_get_hidden (DesktopEntry *entry);
50 gboolean desktop_entry_get_no_display (DesktopEntry *entry);
51 gboolean desktop_entry_get_show_in (DesktopEntry *entry);
52
53 /* Only valid for DESKTOP_ENTRY_DESKTOP */
54 GDesktopAppInfo *desktop_entry_get_app_info (DesktopEntry *entry);
55 gboolean desktop_entry_has_categories (DesktopEntry *entry);
56 gboolean desktop_entry_has_category (DesktopEntry *entry,
57 const char *category);
58
59 void desktop_entry_add_legacy_category (DesktopEntry *src);
60
61
62 typedef struct DesktopEntrySet DesktopEntrySet;
63
64 DesktopEntrySet *desktop_entry_set_new (void);
65 DesktopEntrySet *desktop_entry_set_ref (DesktopEntrySet *set);
66 void desktop_entry_set_unref (DesktopEntrySet *set);
67
68 void desktop_entry_set_add_entry (DesktopEntrySet *set,
69 DesktopEntry *entry,
70 const char *file_id);
71 DesktopEntry* desktop_entry_set_lookup (DesktopEntrySet *set,
72 const char *file_id);
73 int desktop_entry_set_get_count (DesktopEntrySet *set);
74
75 void desktop_entry_set_union (DesktopEntrySet *set,
76 DesktopEntrySet *with);
77 void desktop_entry_set_intersection (DesktopEntrySet *set,
78 DesktopEntrySet *with);
79 void desktop_entry_set_subtract (DesktopEntrySet *set,
80 DesktopEntrySet *other);
81 void desktop_entry_set_swap_contents (DesktopEntrySet *a,
82 DesktopEntrySet *b);
83
84 typedef void (*DesktopEntrySetForeachFunc) (const char *file_id,
85 DesktopEntry *entry,
86 gpointer user_data);
87
88 void desktop_entry_set_foreach (DesktopEntrySet *set,
89 DesktopEntrySetForeachFunc func,
90 gpointer user_data);
91
92 G_END_DECLS
93
94 #endif /* __DESKTOP_ENTRIES_H__ */
0 /*
1 * Copyright (C) 2002 - 2004 Red Hat, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library 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 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
17 */
18
19 #include <config.h>
20
21 #include "entry-directories.h"
22
23 #include <string.h>
24 #include <errno.h>
25 #include <sys/types.h>
26 #include <dirent.h>
27
28 #include "menu-util.h"
29 #include "menu-monitor.h"
30 #include "canonicalize.h"
31
32 typedef struct CachedDir CachedDir;
33 typedef struct CachedDirMonitor CachedDirMonitor;
34
35 struct EntryDirectory
36 {
37 CachedDir *dir;
38 char *legacy_prefix;
39
40 guint entry_type : 2;
41 guint is_legacy : 1;
42 volatile gint refcount;
43 };
44
45 struct EntryDirectoryList
46 {
47 volatile int refcount;
48 int length;
49 GList *dirs;
50 };
51
52 struct CachedDir
53 {
54 CachedDir *parent;
55 char *name;
56
57 GSList *entries;
58 GSList *subdirs;
59
60 MenuMonitor *dir_monitor;
61 GSList *monitors;
62
63 guint have_read_entries : 1;
64 guint deleted : 1;
65
66 GFunc notify;
67 gpointer notify_data;
68
69 volatile gint references;
70 };
71
72 struct CachedDirMonitor
73 {
74 EntryDirectory *ed;
75 EntryDirectoryChangedFunc callback;
76 gpointer user_data;
77 };
78
79 static void cached_dir_add_reference (CachedDir *dir);
80 static void cached_dir_remove_reference (CachedDir *dir);
81 static void cached_dir_free (CachedDir *dir);
82 static gboolean cached_dir_load_entries_recursive (CachedDir *dir,
83 const char *dirname);
84 static void cached_dir_unref (CachedDir *dir);
85 static CachedDir * cached_dir_add_subdir (CachedDir *dir,
86 const char *basename,
87 const char *path);
88 static gboolean cached_dir_remove_subdir (CachedDir *dir,
89 const char *basename);
90
91 static void handle_cached_dir_changed (MenuMonitor *monitor,
92 MenuMonitorEvent event,
93 const char *path,
94 CachedDir *dir);
95
96 /*
97 * Entry directory cache
98 */
99
100 static CachedDir *dir_cache = NULL;
101
102 static void
103 clear_cache (CachedDir *dir,
104 gpointer *cache)
105 {
106 *cache = NULL;
107 }
108
109 static CachedDir *
110 cached_dir_new (const char *name)
111 {
112 CachedDir *dir;
113
114 dir = g_new0 (CachedDir, 1);
115 dir->name = g_strdup (name);
116
117 return dir;
118 }
119
120 static CachedDir *
121 cached_dir_new_full (const char *name,
122 GFunc notify,
123 gpointer notify_data)
124 {
125 CachedDir *dir;
126
127 dir = cached_dir_new (name);
128
129 dir->notify = notify;
130 dir->notify_data = notify_data;
131
132 return dir;
133 }
134
135 static void
136 cached_dir_free (CachedDir *dir)
137 {
138 if (dir->dir_monitor)
139 {
140 menu_monitor_remove_notify (dir->dir_monitor,
141 (MenuMonitorNotifyFunc) handle_cached_dir_changed,
142 dir);
143 menu_monitor_unref (dir->dir_monitor);
144 dir->dir_monitor = NULL;
145 }
146
147 g_slist_foreach (dir->monitors, (GFunc) g_free, NULL);
148 g_slist_free (dir->monitors);
149 dir->monitors = NULL;
150
151 g_slist_foreach (dir->entries,
152 (GFunc) desktop_entry_unref,
153 NULL);
154 g_slist_free (dir->entries);
155 dir->entries = NULL;
156
157 g_slist_foreach (dir->subdirs,
158 (GFunc) cached_dir_unref,
159 NULL);
160 g_slist_free (dir->subdirs);
161 dir->subdirs = NULL;
162
163 g_free (dir->name);
164 g_free (dir);
165 }
166
167 static CachedDir *
168 cached_dir_ref (CachedDir *dir)
169 {
170 g_atomic_int_inc (&dir->references);
171
172 return dir;
173 }
174
175 static void
176 cached_dir_unref (CachedDir *dir)
177 {
178 gboolean is_zero;
179
180 is_zero = g_atomic_int_dec_and_test (&dir->references);
181 if (is_zero)
182 {
183 CachedDir *parent;
184
185 parent = dir->parent;
186
187 if (parent != NULL)
188 cached_dir_remove_subdir (parent, dir->name);
189
190 if (dir->notify)
191 dir->notify (dir, dir->notify_data);
192
193 cached_dir_free (dir);
194 }
195 }
196
197 static inline CachedDir *
198 find_subdir (CachedDir *dir,
199 const char *subdir)
200 {
201 GSList *tmp;
202
203 tmp = dir->subdirs;
204 while (tmp != NULL)
205 {
206 CachedDir *sub = tmp->data;
207
208 if (strcmp (sub->name, subdir) == 0)
209 return sub;
210
211 tmp = tmp->next;
212 }
213
214 return NULL;
215 }
216
217 static DesktopEntry *
218 find_entry (CachedDir *dir,
219 const char *basename)
220 {
221 GSList *tmp;
222
223 tmp = dir->entries;
224 while (tmp != NULL)
225 {
226 const char *entry_basename;
227
228 entry_basename = desktop_entry_get_basename (tmp->data);
229 if (strcmp (entry_basename, basename) == 0)
230 {
231 return tmp->data;
232 }
233
234 tmp = tmp->next;
235 }
236
237 return NULL;
238 }
239
240 static DesktopEntry *
241 cached_dir_find_relative_path (CachedDir *dir,
242 const char *relative_path)
243 {
244 DesktopEntry *retval = NULL;
245 char **split;
246 int i;
247
248 split = g_strsplit (relative_path, "/", -1);
249
250 i = 0;
251 while (split[i] != NULL)
252 {
253 if (split[i + 1] != NULL)
254 {
255 if ((dir = find_subdir (dir, split[i])) == NULL)
256 break;
257 }
258 else
259 {
260 retval = find_entry (dir, split[i]);
261 break;
262 }
263
264 ++i;
265 }
266
267 g_strfreev (split);
268
269 return retval;
270 }
271
272 static CachedDir *
273 cached_dir_lookup (const char *canonical)
274 {
275 CachedDir *dir;
276 char **split;
277 int i;
278
279 if (dir_cache == NULL)
280 dir_cache = cached_dir_new_full ("/",
281 (GFunc) clear_cache,
282 &dir_cache);
283 dir = dir_cache;
284
285 g_assert (canonical != NULL && canonical[0] == G_DIR_SEPARATOR);
286
287 menu_verbose ("Looking up cached dir \"%s\"\n", canonical);
288
289 split = g_strsplit (canonical + 1, "/", -1);
290
291 i = 0;
292 while (split[i] != NULL)
293 {
294 CachedDir *subdir;
295
296 subdir = cached_dir_add_subdir (dir, split[i], NULL);
297
298 dir = subdir;
299
300 ++i;
301 }
302
303 g_strfreev (split);
304
305 g_assert (dir != NULL);
306
307 return dir;
308 }
309
310 static gboolean
311 cached_dir_add_entry (CachedDir *dir,
312 const char *basename,
313 const char *path)
314 {
315 DesktopEntry *entry;
316
317 entry = desktop_entry_new (path);
318 if (entry == NULL)
319 return FALSE;
320
321 dir->entries = g_slist_prepend (dir->entries, entry);
322
323 return TRUE;
324 }
325
326 static gboolean
327 cached_dir_update_entry (CachedDir *dir,
328 const char *basename,
329 const char *path)
330 {
331 GSList *tmp;
332
333 tmp = dir->entries;
334 while (tmp != NULL)
335 {
336 const char *entry_basename;
337 entry_basename = desktop_entry_get_basename (tmp->data);
338 if (strcmp (entry_basename, basename) == 0)
339 {
340 if (!desktop_entry_reload (tmp->data))
341 {
342 dir->entries = g_slist_delete_link (dir->entries, tmp);
343 }
344
345 return TRUE;
346 }
347
348 tmp = tmp->next;
349 }
350
351 return cached_dir_add_entry (dir, basename, path);
352 }
353
354 static gboolean
355 cached_dir_remove_entry (CachedDir *dir,
356 const char *basename)
357 {
358 GSList *tmp;
359
360 tmp = dir->entries;
361 while (tmp != NULL)
362 {
363 const char *entry_basename;
364 entry_basename = desktop_entry_get_basename (tmp->data);
365
366 if (strcmp (entry_basename, basename) == 0)
367 {
368 desktop_entry_unref (tmp->data);
369 dir->entries = g_slist_delete_link (dir->entries, tmp);
370 return TRUE;
371 }
372
373 tmp = tmp->next;
374 }
375
376 return FALSE;
377 }
378
379 static CachedDir *
380 cached_dir_add_subdir (CachedDir *dir,
381 const char *basename,
382 const char *path)
383 {
384 CachedDir *subdir;
385
386 subdir = find_subdir (dir, basename);
387
388 if (subdir != NULL)
389 {
390 subdir->deleted = FALSE;
391 return subdir;
392 }
393
394 subdir = cached_dir_new (basename);
395
396 if (path != NULL && !cached_dir_load_entries_recursive (subdir, path))
397 {
398 cached_dir_free (subdir);
399 return NULL;
400 }
401
402 menu_verbose ("Caching dir \"%s\"\n", basename);
403
404 subdir->parent = dir;
405 dir->subdirs = g_slist_prepend (dir->subdirs, cached_dir_ref (subdir));
406
407 return subdir;
408 }
409
410 static gboolean
411 cached_dir_remove_subdir (CachedDir *dir,
412 const char *basename)
413 {
414 CachedDir *subdir;
415
416 subdir = find_subdir (dir, basename);
417
418 if (subdir != NULL)
419 {
420 subdir->deleted = TRUE;
421
422 if (subdir->references == 0)
423 {
424 cached_dir_unref (subdir);
425 dir->subdirs = g_slist_remove (dir->subdirs, subdir);
426 }
427
428 return TRUE;
429 }
430
431 return FALSE;
432 }
433
434 static guint monitors_idle_handler = 0;
435 static GSList *pending_monitors_dirs = NULL;
436
437 static void
438 cached_dir_invoke_monitors (CachedDir *dir)
439 {
440 GSList *tmp;
441
442 tmp = dir->monitors;
443 while (tmp != NULL)
444 {
445 CachedDirMonitor *monitor = tmp->data;
446 GSList *next = tmp->next;
447
448 monitor->callback (monitor->ed, monitor->user_data);
449
450 tmp = next;
451 }
452
453 /* we explicitly don't invoke monitors of the parent since an
454 * event has been queued for it too */
455 }
456
457 static gboolean
458 emit_monitors_in_idle (void)
459 {
460 GSList *monitors_to_emit;
461 GSList *tmp;
462
463 monitors_to_emit = pending_monitors_dirs;
464
465 pending_monitors_dirs = NULL;
466 monitors_idle_handler = 0;
467
468 tmp = monitors_to_emit;
469 while (tmp != NULL)
470 {
471 CachedDir *dir = tmp->data;
472
473 cached_dir_invoke_monitors (dir);
474 cached_dir_remove_reference (dir);
475
476 tmp = tmp->next;
477 }
478
479 g_slist_free (monitors_to_emit);
480
481 return FALSE;
482 }
483
484 static void
485 cached_dir_queue_monitor_event (CachedDir *dir)
486 {
487 GSList *tmp;
488
489 tmp = pending_monitors_dirs;
490 while (tmp != NULL)
491 {
492 CachedDir *d = tmp->data;
493 GSList *next = tmp->next;
494
495 if (dir->parent == d->parent &&
496 g_strcmp0 (dir->name, d->name) == 0)
497 break;
498
499 tmp = next;
500 }
501
502 /* not found, so let's queue it */
503 if (tmp == NULL)
504 {
505 cached_dir_add_reference (dir);
506 pending_monitors_dirs = g_slist_append (pending_monitors_dirs, dir);
507 }
508
509 if (dir->parent)
510 {
511 cached_dir_queue_monitor_event (dir->parent);
512 }
513
514 if (monitors_idle_handler == 0)
515 {
516 monitors_idle_handler = g_idle_add ((GSourceFunc) emit_monitors_in_idle, NULL);
517 }
518 }
519
520 static void
521 handle_cached_dir_changed (MenuMonitor *monitor,
522 MenuMonitorEvent event,
523 const char *path,
524 CachedDir *dir)
525 {
526 gboolean handled = FALSE;
527 char *basename;
528 char *dirname;
529
530 menu_verbose ("'%s' notified of '%s' %s - invalidating cache\n",
531 dir->name,
532 path,
533 event == MENU_MONITOR_EVENT_CREATED ? ("created") :
534 event == MENU_MONITOR_EVENT_DELETED ? ("deleted") : ("changed"));
535
536 dirname = g_path_get_dirname (path);
537 basename = g_path_get_basename (path);
538
539 dir = cached_dir_lookup (dirname);
540
541 if (g_str_has_suffix (basename, ".desktop") ||
542 g_str_has_suffix (basename, ".directory"))
543 {
544 switch (event)
545 {
546 case MENU_MONITOR_EVENT_CREATED:
547 case MENU_MONITOR_EVENT_CHANGED:
548 handled = cached_dir_update_entry (dir, basename, path);
549 break;
550
551 case MENU_MONITOR_EVENT_DELETED:
552 handled = cached_dir_remove_entry (dir, basename);
553 break;
554
555 default:
556 g_assert_not_reached ();
557 break;
558 }
559 }
560 else /* Try recursing */
561 {
562 switch (event)
563 {
564 case MENU_MONITOR_EVENT_CREATED:
565 handled = cached_dir_add_subdir (dir, basename, path) != NULL;
566 break;
567
568 case MENU_MONITOR_EVENT_CHANGED:
569 break;
570
571 case MENU_MONITOR_EVENT_DELETED:
572 handled = cached_dir_remove_subdir (dir, basename);
573 break;
574
575 default:
576 g_assert_not_reached ();
577 break;
578 }
579 }
580
581 g_free (basename);
582 g_free (dirname);
583
584 if (handled)
585 {
586 /* CHANGED events don't change the set of desktop entries */
587 if (event == MENU_MONITOR_EVENT_CREATED || event == MENU_MONITOR_EVENT_DELETED)
588 {
589 _entry_directory_list_empty_desktop_cache ();
590 }
591
592 cached_dir_queue_monitor_event (dir);
593 }
594 }
595
596 static void
597 cached_dir_ensure_monitor (CachedDir *dir,
598 const char *dirname)
599 {
600 if (dir->dir_monitor == NULL)
601 {
602 dir->dir_monitor = menu_get_directory_monitor (dirname);
603 menu_monitor_add_notify (dir->dir_monitor,
604 (MenuMonitorNotifyFunc) handle_cached_dir_changed,
605 dir);
606 }
607 }
608
609 static gboolean
610 cached_dir_load_entries_recursive (CachedDir *dir,
611 const char *dirname)
612 {
613 DIR *dp;
614 struct dirent *dent;
615 GString *fullpath;
616 gsize fullpath_len;
617
618 g_assert (dir != NULL);
619
620 if (dir->have_read_entries)
621 return TRUE;
622
623 menu_verbose ("Attempting to read entries from %s (full path %s)\n",
624 dir->name, dirname);
625
626 dp = opendir (dirname);
627 if (dp == NULL)
628 {
629 menu_verbose ("Unable to list directory \"%s\"\n",
630 dirname);
631 return FALSE;
632 }
633
634 cached_dir_ensure_monitor (dir, dirname);
635
636 fullpath = g_string_new (dirname);
637 if (fullpath->str[fullpath->len - 1] != G_DIR_SEPARATOR)
638 g_string_append_c (fullpath, G_DIR_SEPARATOR);
639
640 fullpath_len = fullpath->len;
641
642 while ((dent = readdir (dp)) != NULL)
643 {
644 /* ignore . and .. */
645 if (dent->d_name[0] == '.' &&
646 (dent->d_name[1] == '\0' ||
647 (dent->d_name[1] == '.' &&
648 dent->d_name[2] == '\0')))
649 continue;
650
651 g_string_append (fullpath, dent->d_name);
652
653 if (g_str_has_suffix (dent->d_name, ".desktop") ||
654 g_str_has_suffix (dent->d_name, ".directory"))
655 {
656 cached_dir_add_entry (dir, dent->d_name, fullpath->str);
657 }
658 else /* Try recursing */
659 {
660 cached_dir_add_subdir (dir, dent->d_name, fullpath->str);
661 }
662
663 g_string_truncate (fullpath, fullpath_len);
664 }
665
666 closedir (dp);
667
668 g_string_free (fullpath, TRUE);
669
670 dir->have_read_entries = TRUE;
671
672 return TRUE;
673 }
674
675 static void
676 cached_dir_add_monitor (CachedDir *dir,
677 EntryDirectory *ed,
678 EntryDirectoryChangedFunc callback,
679 gpointer user_data)
680 {
681 CachedDirMonitor *monitor;
682 GSList *tmp;
683
684 tmp = dir->monitors;
685 while (tmp != NULL)
686 {
687 monitor = tmp->data;
688
689 if (monitor->ed == ed &&
690 monitor->callback == callback &&
691 monitor->user_data == user_data)
692 break;
693
694 tmp = tmp->next;
695 }
696
697 if (tmp == NULL)
698 {
699 monitor = g_new0 (CachedDirMonitor, 1);
700 monitor->ed = ed;
701 monitor->callback = callback;
702 monitor->user_data = user_data;
703
704 dir->monitors = g_slist_append (dir->monitors, monitor);
705 }
706 }
707
708 static void
709 cached_dir_remove_monitor (CachedDir *dir,
710 EntryDirectory *ed,
711 EntryDirectoryChangedFunc callback,
712 gpointer user_data)
713 {
714 GSList *tmp;
715
716 tmp = dir->monitors;
717 while (tmp != NULL)
718 {
719 CachedDirMonitor *monitor = tmp->data;
720 GSList *next = tmp->next;
721
722 if (monitor->ed == ed &&
723 monitor->callback == callback &&
724 monitor->user_data == user_data)
725 {
726 dir->monitors = g_slist_delete_link (dir->monitors, tmp);
727 g_free (monitor);
728 }
729
730 tmp = next;
731 }
732 }
733
734 static void
735 cached_dir_add_reference (CachedDir *dir)
736 {
737 cached_dir_ref (dir);
738
739 if (dir->parent != NULL)
740 {
741 cached_dir_add_reference (dir->parent);
742 }
743 }
744
745 static void
746 cached_dir_remove_reference (CachedDir *dir)
747 {
748 CachedDir *parent;
749
750 parent = dir->parent;
751
752 cached_dir_unref (dir);
753
754 if (parent != NULL)
755 {
756 cached_dir_remove_reference (parent);
757 }
758 }
759
760 /*
761 * Entry directories
762 */
763
764 static EntryDirectory *
765 entry_directory_new_full (DesktopEntryType entry_type,
766 const char *path,
767 gboolean is_legacy,
768 const char *legacy_prefix)
769 {
770 EntryDirectory *ed;
771 char *canonical;
772
773 menu_verbose ("Loading entry directory \"%s\" (legacy %s)\n",
774 path,
775 is_legacy ? "<yes>" : "<no>");
776
777 canonical = menu_canonicalize_file_name (path, FALSE);
778 if (canonical == NULL)
779 {
780 menu_verbose ("Failed to canonicalize \"%s\": %s\n",
781 path, g_strerror (errno));
782 return NULL;
783 }
784
785 ed = g_new0 (EntryDirectory, 1);
786
787 ed->dir = cached_dir_lookup (canonical);
788 g_assert (ed->dir != NULL);
789
790 cached_dir_add_reference (ed->dir);
791 cached_dir_load_entries_recursive (ed->dir, canonical);
792
793 ed->legacy_prefix = g_strdup (legacy_prefix);
794 ed->entry_type = entry_type;
795 ed->is_legacy = is_legacy != FALSE;
796 ed->refcount = 1;
797
798 g_free (canonical);
799
800 return ed;
801 }
802
803 EntryDirectory *
804 entry_directory_new (DesktopEntryType entry_type,
805 const char *path)
806 {
807 return entry_directory_new_full (entry_type, path, FALSE, NULL);
808 }
809
810 EntryDirectory *
811 entry_directory_new_legacy (DesktopEntryType entry_type,
812 const char *path,
813 const char *legacy_prefix)
814 {
815 return entry_directory_new_full (entry_type, path, TRUE, legacy_prefix);
816 }
817
818 EntryDirectory *
819 entry_directory_ref (EntryDirectory *ed)
820 {
821 g_return_val_if_fail (ed != NULL, NULL);
822 g_return_val_if_fail (ed->refcount > 0, NULL);
823
824 g_atomic_int_inc (&ed->refcount);
825
826 return ed;
827 }
828
829 void
830 entry_directory_unref (EntryDirectory *ed)
831 {
832 gboolean is_zero;
833
834 g_return_if_fail (ed != NULL);
835 g_return_if_fail (ed->refcount > 0);
836
837 is_zero = g_atomic_int_dec_and_test (&ed->refcount);
838 if (is_zero)
839 {
840 cached_dir_remove_reference (ed->dir);
841
842 ed->dir = NULL;
843 ed->entry_type = DESKTOP_ENTRY_INVALID;
844 ed->is_legacy = FALSE;
845
846 g_free (ed->legacy_prefix);
847 ed->legacy_prefix = NULL;
848
849 g_free (ed);
850 }
851 }
852
853 static void
854 entry_directory_add_monitor (EntryDirectory *ed,
855 EntryDirectoryChangedFunc callback,
856 gpointer user_data)
857 {
858 cached_dir_add_monitor (ed->dir, ed, callback, user_data);
859 }
860
861 static void
862 entry_directory_remove_monitor (EntryDirectory *ed,
863 EntryDirectoryChangedFunc callback,
864 gpointer user_data)
865 {
866 cached_dir_remove_monitor (ed->dir, ed, callback, user_data);
867 }
868
869 static DesktopEntry *
870 entry_directory_get_directory (EntryDirectory *ed,
871 const char *relative_path)
872 {
873 DesktopEntry *entry;
874
875 if (ed->entry_type != DESKTOP_ENTRY_DIRECTORY)
876 return NULL;
877
878 entry = cached_dir_find_relative_path (ed->dir, relative_path);
879 if (entry == NULL || desktop_entry_get_type (entry) != DESKTOP_ENTRY_DIRECTORY)
880 return NULL;
881
882 return desktop_entry_ref (entry);
883 }
884
885 static char *
886 get_desktop_file_id_from_path (EntryDirectory *ed,
887 DesktopEntryType entry_type,
888 const char *relative_path)
889 {
890 char *retval;
891
892 retval = NULL;
893
894 if (entry_type == DESKTOP_ENTRY_DESKTOP)
895 {
896 if (!ed->is_legacy)
897 {
898 retval = g_strdelimit (g_strdup (relative_path), "/", '-');
899 }
900 else
901 {
902 char *basename;
903
904 basename = g_path_get_basename (relative_path);
905
906 if (ed->legacy_prefix)
907 {
908 retval = g_strjoin ("-", ed->legacy_prefix, basename, NULL);
909 g_free (basename);
910 }
911 else
912 {
913 retval = basename;
914 }
915 }
916 }
917 else
918 {
919 retval = g_strdup (relative_path);
920 }
921
922 return retval;
923 }
924
925 typedef gboolean (* EntryDirectoryForeachFunc) (EntryDirectory *ed,
926 DesktopEntry *entry,
927 const char *file_id,
928 DesktopEntrySet *set,
929 gpointer user_data);
930
931 static gboolean
932 entry_directory_foreach_recursive (EntryDirectory *ed,
933 CachedDir *cd,
934 GString *relative_path,
935 EntryDirectoryForeachFunc func,
936 DesktopEntrySet *set,
937 gpointer user_data)
938 {
939 GSList *tmp;
940 int relative_path_len;
941
942 if (cd->deleted)
943 return TRUE;
944
945 relative_path_len = relative_path->len;
946
947 tmp = cd->entries;
948 while (tmp != NULL)
949 {
950 DesktopEntry *entry = tmp->data;
951
952 if (desktop_entry_get_type (entry) == ed->entry_type)
953 {
954 gboolean ret;
955 char *file_id;
956 const char *basename;
957
958 basename = desktop_entry_get_basename (entry);
959 g_string_append (relative_path, basename);
960
961 file_id = get_desktop_file_id_from_path (ed,
962 ed->entry_type,
963 relative_path->str);
964
965 ret = func (ed, entry, file_id, set, user_data);
966
967 g_free (file_id);
968
969 g_string_truncate (relative_path, relative_path_len);
970
971 if (!ret)
972 return FALSE;
973 }
974
975 tmp = tmp->next;
976 }
977
978 tmp = cd->subdirs;
979 while (tmp != NULL)
980 {
981 CachedDir *subdir = tmp->data;
982
983 g_string_append (relative_path, subdir->name);
984 g_string_append_c (relative_path, G_DIR_SEPARATOR);
985
986 if (!entry_directory_foreach_recursive (ed,
987 subdir,
988 relative_path,
989 func,
990 set,
991 user_data))
992 return FALSE;
993
994 g_string_truncate (relative_path, relative_path_len);
995
996 tmp = tmp->next;
997 }
998
999 return TRUE;
1000 }
1001
1002 static void
1003 entry_directory_foreach (EntryDirectory *ed,
1004 EntryDirectoryForeachFunc func,
1005 DesktopEntrySet *set,
1006 gpointer user_data)
1007 {
1008 GString *path;
1009
1010 path = g_string_new (NULL);
1011
1012 entry_directory_foreach_recursive (ed,
1013 ed->dir,
1014 path,
1015 func,
1016 set,
1017 user_data);
1018
1019 g_string_free (path, TRUE);
1020 }
1021
1022 void
1023 entry_directory_get_flat_contents (EntryDirectory *ed,
1024 DesktopEntrySet *desktop_entries,
1025 DesktopEntrySet *directory_entries,
1026 GSList **subdirs)
1027 {
1028 GSList *tmp;
1029
1030 if (subdirs)
1031 *subdirs = NULL;
1032
1033 tmp = ed->dir->entries;
1034 while (tmp != NULL)
1035 {
1036 DesktopEntry *entry = tmp->data;
1037 const char *basename;
1038
1039 basename = desktop_entry_get_path (entry);
1040
1041 if (desktop_entries &&
1042 desktop_entry_get_type (entry) == DESKTOP_ENTRY_DESKTOP)
1043 {
1044 char *file_id;
1045
1046 file_id = get_desktop_file_id_from_path (ed,
1047 DESKTOP_ENTRY_DESKTOP,
1048 basename);
1049
1050 desktop_entry_set_add_entry (desktop_entries,
1051 entry,
1052 file_id);
1053
1054 g_free (file_id);
1055 }
1056
1057 if (directory_entries &&
1058 desktop_entry_get_type (entry) == DESKTOP_ENTRY_DIRECTORY)
1059 {
1060 desktop_entry_set_add_entry (directory_entries,
1061 entry,
1062 basename);
1063 }
1064
1065 tmp = tmp->next;
1066 }
1067
1068 if (subdirs)
1069 {
1070 tmp = ed->dir->subdirs;
1071 while (tmp != NULL)
1072 {
1073 CachedDir *cd = tmp->data;
1074
1075 if (!cd->deleted)
1076 {
1077 *subdirs = g_slist_prepend (*subdirs, g_strdup (cd->name));
1078 }
1079
1080 tmp = tmp->next;
1081 }
1082 }
1083
1084 if (subdirs)
1085 *subdirs = g_slist_reverse (*subdirs);
1086 }
1087
1088 /*
1089 * Entry directory lists
1090 */
1091
1092 EntryDirectoryList *
1093 entry_directory_list_new (void)
1094 {
1095 EntryDirectoryList *list;
1096
1097 list = g_new0 (EntryDirectoryList, 1);
1098
1099 list->refcount = 1;
1100 list->dirs = NULL;
1101 list->length = 0;
1102
1103 return list;
1104 }
1105
1106 EntryDirectoryList *
1107 entry_directory_list_ref (EntryDirectoryList *list)
1108 {
1109 g_return_val_if_fail (list != NULL, NULL);
1110 g_return_val_if_fail (list->refcount > 0, NULL);
1111
1112 g_atomic_int_inc (&list->refcount);
1113
1114 return list;
1115 }
1116
1117 void
1118 entry_directory_list_unref (EntryDirectoryList *list)
1119 {
1120 gboolean is_zero;
1121
1122 g_return_if_fail (list != NULL);
1123 g_return_if_fail (list->refcount > 0);
1124
1125 is_zero = g_atomic_int_dec_and_test (&list->refcount);
1126 if (is_zero)
1127 {
1128 g_list_foreach (list->dirs, (GFunc) entry_directory_unref, NULL);
1129 g_list_free (list->dirs);
1130 list->dirs = NULL;
1131 list->length = 0;
1132 g_free (list);
1133 }
1134 }
1135
1136 void
1137 entry_directory_list_prepend (EntryDirectoryList *list,
1138 EntryDirectory *ed)
1139 {
1140 list->length += 1;
1141 list->dirs = g_list_prepend (list->dirs,
1142 entry_directory_ref (ed));
1143 }
1144
1145 int
1146 entry_directory_list_get_length (EntryDirectoryList *list)
1147 {
1148 return list->length;
1149 }
1150
1151 void
1152 entry_directory_list_append_list (EntryDirectoryList *list,
1153 EntryDirectoryList *to_append)
1154 {
1155 GList *tmp;
1156 GList *new_dirs = NULL;
1157
1158 if (to_append->length == 0)
1159 return;
1160
1161 tmp = to_append->dirs;
1162 while (tmp != NULL)
1163 {
1164 list->length += 1;
1165 new_dirs = g_list_prepend (new_dirs,
1166 entry_directory_ref (tmp->data));
1167
1168 tmp = tmp->next;
1169 }
1170
1171 new_dirs = g_list_reverse (new_dirs);
1172 list->dirs = g_list_concat (list->dirs, new_dirs);
1173 }
1174
1175 DesktopEntry *
1176 entry_directory_list_get_directory (EntryDirectoryList *list,
1177 const char *relative_path)
1178 {
1179 DesktopEntry *retval = NULL;
1180 GList *tmp;
1181
1182 tmp = list->dirs;
1183 while (tmp != NULL)
1184 {
1185 if ((retval = entry_directory_get_directory (tmp->data, relative_path)) != NULL)
1186 break;
1187
1188 tmp = tmp->next;
1189 }
1190
1191 return retval;
1192 }
1193
1194 gboolean
1195 _entry_directory_list_compare (const EntryDirectoryList *a,
1196 const EntryDirectoryList *b)
1197 {
1198 GList *al, *bl;
1199
1200 if (a == NULL && b == NULL)
1201 return TRUE;
1202
1203 if ((a == NULL || b == NULL))
1204 return FALSE;
1205
1206 if (a->length != b->length)
1207 return FALSE;
1208
1209 al = a->dirs; bl = b->dirs;
1210 while (al && bl && al->data == bl->data)
1211 {
1212 al = al->next;
1213 bl = bl->next;
1214 }
1215
1216 return (al == NULL && bl == NULL);
1217 }
1218
1219 static gboolean
1220 get_all_func (EntryDirectory *ed,
1221 DesktopEntry *entry,
1222 const char *file_id,
1223 DesktopEntrySet *set,
1224 gpointer user_data)
1225 {
1226 if (ed->is_legacy && !desktop_entry_has_categories (entry))
1227 {
1228 entry = desktop_entry_copy (entry);
1229 desktop_entry_add_legacy_category (entry);
1230 }
1231 else
1232 {
1233 entry = desktop_entry_ref (entry);
1234 }
1235
1236 desktop_entry_set_add_entry (set, entry, file_id);
1237 desktop_entry_unref (entry);
1238
1239 return TRUE;
1240 }
1241
1242 static DesktopEntrySet *entry_directory_last_set = NULL;
1243 static EntryDirectoryList *entry_directory_last_list = NULL;
1244
1245 void
1246 _entry_directory_list_empty_desktop_cache (void)
1247 {
1248 if (entry_directory_last_set != NULL)
1249 desktop_entry_set_unref (entry_directory_last_set);
1250 entry_directory_last_set = NULL;
1251
1252 if (entry_directory_last_list != NULL)
1253 entry_directory_list_unref (entry_directory_last_list);
1254 entry_directory_last_list = NULL;
1255 }
1256
1257 DesktopEntrySet *
1258 _entry_directory_list_get_all_desktops (EntryDirectoryList *list)
1259 {
1260 GList *tmp;
1261 DesktopEntrySet *set;
1262
1263 /* The only tricky thing here is that desktop files later
1264 * in the search list with the same relative path
1265 * are "hidden" by desktop files earlier in the path,
1266 * so we have to do the earlier files first causing
1267 * the later files to replace the earlier files
1268 * in the DesktopEntrySet
1269 *
1270 * We go from the end of the list so we can just
1271 * g_hash_table_replace and not have to do two
1272 * hash lookups (check for existing entry, then insert new
1273 * entry)
1274 */
1275
1276 /* This method is -extremely- slow, so we have a simple
1277 one-entry cache here */
1278 if (_entry_directory_list_compare (list, entry_directory_last_list))
1279 {
1280 menu_verbose (" Hit desktop list (%p) cache\n", list);
1281 return desktop_entry_set_ref (entry_directory_last_set);
1282 }
1283
1284 if (entry_directory_last_set != NULL)
1285 desktop_entry_set_unref (entry_directory_last_set);
1286 if (entry_directory_last_list != NULL)
1287 entry_directory_list_unref (entry_directory_last_list);
1288
1289 set = desktop_entry_set_new ();
1290 menu_verbose (" Storing all of list %p in set %p\n",
1291 list, set);
1292
1293 tmp = g_list_last (list->dirs);
1294 while (tmp != NULL)
1295 {
1296 entry_directory_foreach (tmp->data, get_all_func, set, NULL);
1297
1298 tmp = tmp->prev;
1299 }
1300
1301 entry_directory_last_list = entry_directory_list_ref (list);
1302 entry_directory_last_set = desktop_entry_set_ref (set);
1303
1304 return set;
1305 }
1306
1307 void
1308 entry_directory_list_add_monitors (EntryDirectoryList *list,
1309 EntryDirectoryChangedFunc callback,
1310 gpointer user_data)
1311 {
1312 GList *tmp;
1313
1314 tmp = list->dirs;
1315 while (tmp != NULL)
1316 {
1317 entry_directory_add_monitor (tmp->data, callback, user_data);
1318 tmp = tmp->next;
1319 }
1320 }
1321
1322 void
1323 entry_directory_list_remove_monitors (EntryDirectoryList *list,
1324 EntryDirectoryChangedFunc callback,
1325 gpointer user_data)
1326 {
1327 GList *tmp;
1328
1329 tmp = list->dirs;
1330 while (tmp != NULL)
1331 {
1332 entry_directory_remove_monitor (tmp->data, callback, user_data);
1333 tmp = tmp->next;
1334 }
1335 }
0 /*
1 * Copyright (C) 2002 - 2004 Red Hat, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library 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 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef __ENTRY_DIRECTORIES_H__
20 #define __ENTRY_DIRECTORIES_H__
21
22 #include <glib.h>
23 #include "desktop-entries.h"
24
25 G_BEGIN_DECLS
26
27 typedef struct EntryDirectory EntryDirectory;
28
29 typedef void (*EntryDirectoryChangedFunc) (EntryDirectory *ed,
30 gpointer user_data);
31
32 EntryDirectory *entry_directory_new (DesktopEntryType entry_type,
33 const char *path);
34 EntryDirectory *entry_directory_new_legacy (DesktopEntryType entry_type,
35 const char *path,
36 const char *legacy_prefix);
37
38 EntryDirectory *entry_directory_ref (EntryDirectory *ed);
39 void entry_directory_unref (EntryDirectory *ed);
40
41 void entry_directory_get_flat_contents (EntryDirectory *ed,
42 DesktopEntrySet *desktop_entries,
43 DesktopEntrySet *directory_entries,
44 GSList **subdirs);
45
46
47 typedef struct EntryDirectoryList EntryDirectoryList;
48
49 EntryDirectoryList *entry_directory_list_new (void);
50 EntryDirectoryList *entry_directory_list_ref (EntryDirectoryList *list);
51 void entry_directory_list_unref (EntryDirectoryList *list);
52
53 int entry_directory_list_get_length (EntryDirectoryList *list);
54 gboolean _entry_directory_list_compare (const EntryDirectoryList *a,
55 const EntryDirectoryList *b);
56
57 void entry_directory_list_prepend (EntryDirectoryList *list,
58 EntryDirectory *ed);
59 void entry_directory_list_append_list (EntryDirectoryList *list,
60 EntryDirectoryList *to_append);
61
62 void entry_directory_list_add_monitors (EntryDirectoryList *list,
63 EntryDirectoryChangedFunc callback,
64 gpointer user_data);
65 void entry_directory_list_remove_monitors (EntryDirectoryList *list,
66 EntryDirectoryChangedFunc callback,
67 gpointer user_data);
68
69 DesktopEntry* entry_directory_list_get_directory (EntryDirectoryList *list,
70 const char *relative_path);
71
72 DesktopEntrySet *_entry_directory_list_get_all_desktops (EntryDirectoryList *list);
73 void _entry_directory_list_empty_desktop_cache (void);
74
75 G_END_DECLS
76
77 #endif /* __ENTRY_DIRECTORIES_H__ */
0 /* -*- mode:c; c-file-style: "gnu"; indent-tabs-mode: nil -*-
1 * Copyright (C) 2003, 2004, 2011 Red Hat, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library 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 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
17 */
18
19 #include <config.h>
20
21 #include "gmenu-tree.h"
22
23 #include <string.h>
24 #include <errno.h>
25
26 #include "menu-layout.h"
27 #include "menu-monitor.h"
28 #include "menu-util.h"
29 #include "canonicalize.h"
30
31 /* private */
32 typedef struct GMenuTreeItem GMenuTreeItem;
33 #define GMENU_TREE_ITEM(i) ((GMenuTreeItem *)(i))
34 #define GMENU_TREE_DIRECTORY(i) ((GMenuTreeDirectory *)(i))
35 #define GMENU_TREE_ENTRY(i) ((GMenuTreeEntry *)(i))
36 #define GMENU_TREE_SEPARATOR(i) ((GMenuTreeSeparator *)(i))
37 #define GMENU_TREE_HEADER(i) ((GMenuTreeHeader *)(i))
38 #define GMENU_TREE_ALIAS(i) ((GMenuTreeAlias *)(i))
39
40 enum {
41 PROP_0,
42
43 PROP_MENU_BASENAME,
44 PROP_MENU_PATH,
45 PROP_FLAGS
46 };
47
48 /* Signals */
49 enum
50 {
51 CHANGED,
52 LAST_SIGNAL
53 };
54
55 static guint gmenu_tree_signals [LAST_SIGNAL] = { 0 };
56
57 struct _GMenuTree
58 {
59 GObject parent_instance;
60
61 char *basename;
62 char *non_prefixed_basename;
63 char *path;
64 char *canonical_path;
65
66 GMenuTreeFlags flags;
67
68 GSList *menu_file_monitors;
69
70 MenuLayoutNode *layout;
71 GMenuTreeDirectory *root;
72 GHashTable *entries_by_id;
73
74 guint canonical : 1;
75 guint loaded : 1;
76 };
77
78 G_DEFINE_TYPE (GMenuTree, gmenu_tree, G_TYPE_OBJECT)
79
80 struct GMenuTreeItem
81 {
82 volatile gint refcount;
83
84 GMenuTreeItemType type;
85
86 GMenuTreeDirectory *parent;
87 GMenuTree *tree;
88 };
89
90 struct GMenuTreeIter
91 {
92 volatile gint refcount;
93
94 GMenuTreeItem *item;
95 GSList *contents;
96 GSList *contents_iter;
97 };
98
99 struct GMenuTreeDirectory
100 {
101 GMenuTreeItem item;
102
103 DesktopEntry *directory_entry;
104 char *name;
105
106 GSList *entries;
107 GSList *subdirs;
108
109 MenuLayoutValues default_layout_values;
110 GSList *default_layout_info;
111 GSList *layout_info;
112 GSList *contents;
113
114 guint only_unallocated : 1;
115 guint is_nodisplay : 1;
116 guint layout_pending_separator : 1;
117 guint preprocessed : 1;
118
119 /* 16 bits should be more than enough; G_MAXUINT16 means no inline header */
120 guint will_inline_header : 16;
121 };
122
123 struct GMenuTreeEntry
124 {
125 GMenuTreeItem item;
126
127 DesktopEntry *desktop_entry;
128 char *desktop_file_id;
129
130 guint is_excluded : 1;
131 guint is_unallocated : 1;
132 };
133
134 struct GMenuTreeSeparator
135 {
136 GMenuTreeItem item;
137 };
138
139 struct GMenuTreeHeader
140 {
141 GMenuTreeItem item;
142
143 GMenuTreeDirectory *directory;
144 };
145
146 struct GMenuTreeAlias
147 {
148 GMenuTreeItem item;
149
150 GMenuTreeDirectory *directory;
151 GMenuTreeItem *aliased_item;
152 };
153
154 static gboolean gmenu_tree_load_layout (GMenuTree *tree,
155 GError **error);
156 static void gmenu_tree_force_reload (GMenuTree *tree);
157 static gboolean gmenu_tree_build_from_layout (GMenuTree *tree,
158 GError **error);
159 static void gmenu_tree_force_rebuild (GMenuTree *tree);
160 static void gmenu_tree_resolve_files (GMenuTree *tree,
161 GHashTable *loaded_menu_files,
162 MenuLayoutNode *layout);
163 static void gmenu_tree_force_recanonicalize (GMenuTree *tree);
164 static void gmenu_tree_invoke_monitors (GMenuTree *tree);
165
166 static void gmenu_tree_item_unref_and_unset_parent (gpointer itemp);
167
168 typedef enum
169 {
170 MENU_FILE_MONITOR_INVALID = 0,
171 MENU_FILE_MONITOR_FILE,
172 MENU_FILE_MONITOR_NONEXISTENT_FILE,
173 MENU_FILE_MONITOR_DIRECTORY
174 } MenuFileMonitorType;
175
176 typedef struct
177 {
178 MenuFileMonitorType type;
179 MenuMonitor *monitor;
180 } MenuFileMonitor;
181
182 static void
183 handle_nonexistent_menu_file_changed (MenuMonitor *monitor,
184 MenuMonitorEvent event,
185 const char *path,
186 GMenuTree *tree)
187 {
188 if (event == MENU_MONITOR_EVENT_CHANGED ||
189 event == MENU_MONITOR_EVENT_CREATED)
190 {
191 menu_verbose ("\"%s\" %s, marking tree for recanonicalization\n",
192 path,
193 event == MENU_MONITOR_EVENT_CREATED ? "created" : "changed");
194
195 gmenu_tree_force_recanonicalize (tree);
196 gmenu_tree_invoke_monitors (tree);
197 }
198 }
199
200 static void
201 handle_menu_file_changed (MenuMonitor *monitor,
202 MenuMonitorEvent event,
203 const char *path,
204 GMenuTree *tree)
205 {
206 menu_verbose ("\"%s\" %s, marking tree for recanicalization\n",
207 path,
208 event == MENU_MONITOR_EVENT_CREATED ? "created" :
209 event == MENU_MONITOR_EVENT_CHANGED ? "changed" : "deleted");
210
211 gmenu_tree_force_recanonicalize (tree);
212 gmenu_tree_invoke_monitors (tree);
213 }
214
215 static void
216 handle_menu_file_directory_changed (MenuMonitor *monitor,
217 MenuMonitorEvent event,
218 const char *path,
219 GMenuTree *tree)
220 {
221 if (!g_str_has_suffix (path, ".menu"))
222 return;
223
224 menu_verbose ("\"%s\" %s, marking tree for recanicalization\n",
225 path,
226 event == MENU_MONITOR_EVENT_CREATED ? "created" :
227 event == MENU_MONITOR_EVENT_CHANGED ? "changed" : "deleted");
228
229 gmenu_tree_force_recanonicalize (tree);
230 gmenu_tree_invoke_monitors (tree);
231 }
232
233 static void
234 gmenu_tree_add_menu_file_monitor (GMenuTree *tree,
235 const char *path,
236 MenuFileMonitorType type)
237 {
238 MenuFileMonitor *monitor;
239
240 monitor = g_slice_new0 (MenuFileMonitor);
241
242 monitor->type = type;
243
244 switch (type)
245 {
246 case MENU_FILE_MONITOR_FILE:
247 menu_verbose ("Adding a menu file monitor for \"%s\"\n", path);
248
249 monitor->monitor = menu_get_file_monitor (path);
250 menu_monitor_add_notify (monitor->monitor,
251 (MenuMonitorNotifyFunc) handle_menu_file_changed,
252 tree);
253 break;
254
255 case MENU_FILE_MONITOR_NONEXISTENT_FILE:
256 menu_verbose ("Adding a menu file monitor for non-existent \"%s\"\n", path);
257
258 monitor->monitor = menu_get_file_monitor (path);
259 menu_monitor_add_notify (monitor->monitor,
260 (MenuMonitorNotifyFunc) handle_nonexistent_menu_file_changed,
261 tree);
262 break;
263
264 case MENU_FILE_MONITOR_DIRECTORY:
265 menu_verbose ("Adding a menu directory monitor for \"%s\"\n", path);
266
267 monitor->monitor = menu_get_directory_monitor (path);
268 menu_monitor_add_notify (monitor->monitor,
269 (MenuMonitorNotifyFunc) handle_menu_file_directory_changed,
270 tree);
271 break;
272
273 default:
274 g_assert_not_reached ();
275 break;
276 }
277
278 tree->menu_file_monitors = g_slist_prepend (tree->menu_file_monitors, monitor);
279 }
280
281 static void
282 remove_menu_file_monitor (MenuFileMonitor *monitor,
283 GMenuTree *tree)
284 {
285 switch (monitor->type)
286 {
287 case MENU_FILE_MONITOR_FILE:
288 menu_monitor_remove_notify (monitor->monitor,
289 (MenuMonitorNotifyFunc) handle_menu_file_changed,
290 tree);
291 break;
292
293 case MENU_FILE_MONITOR_NONEXISTENT_FILE:
294 menu_monitor_remove_notify (monitor->monitor,
295 (MenuMonitorNotifyFunc) handle_nonexistent_menu_file_changed,
296 tree);
297 break;
298
299 case MENU_FILE_MONITOR_DIRECTORY:
300 menu_monitor_remove_notify (monitor->monitor,
301 (MenuMonitorNotifyFunc) handle_menu_file_directory_changed,
302 tree);
303 break;
304
305 default:
306 g_assert_not_reached ();
307 break;
308 }
309
310 menu_monitor_unref (monitor->monitor);
311 monitor->monitor = NULL;
312
313 monitor->type = MENU_FILE_MONITOR_INVALID;
314
315 g_slice_free (MenuFileMonitor, monitor);
316 }
317
318 static void
319 gmenu_tree_remove_menu_file_monitors (GMenuTree *tree)
320 {
321 menu_verbose ("Removing all menu file monitors\n");
322
323 g_slist_foreach (tree->menu_file_monitors,
324 (GFunc) remove_menu_file_monitor,
325 tree);
326 g_slist_free (tree->menu_file_monitors);
327 tree->menu_file_monitors = NULL;
328 }
329
330 static gboolean
331 canonicalize_path (GMenuTree *tree,
332 const char *path)
333 {
334 tree->canonical_path = menu_canonicalize_file_name (path, FALSE);
335 if (tree->canonical_path)
336 {
337 tree->canonical = TRUE;
338 gmenu_tree_add_menu_file_monitor (tree,
339 tree->canonical_path,
340 MENU_FILE_MONITOR_FILE);
341 }
342 else
343 {
344 gmenu_tree_add_menu_file_monitor (tree,
345 path,
346 MENU_FILE_MONITOR_NONEXISTENT_FILE);
347 }
348
349 return tree->canonical;
350 }
351
352 static gboolean
353 canonicalize_basename_with_config_dir (GMenuTree *tree,
354 const char *basename,
355 const char *config_dir)
356 {
357 gboolean ret;
358 char *path;
359
360 path = g_build_filename (config_dir, "menus", basename, NULL);
361 ret = canonicalize_path (tree, path);
362 g_free (path);
363
364 return ret;
365 }
366
367 static void
368 canonicalize_basename (GMenuTree *tree,
369 const char *basename)
370 {
371 if (!canonicalize_basename_with_config_dir (tree,
372 basename,
373 g_get_user_config_dir ()))
374 {
375 const char * const *system_config_dirs;
376 int i;
377
378 system_config_dirs = g_get_system_config_dirs ();
379
380 i = 0;
381 while (system_config_dirs[i] != NULL)
382 {
383 if (canonicalize_basename_with_config_dir (tree,
384 basename,
385 system_config_dirs[i]))
386 break;
387
388 ++i;
389 }
390 }
391 }
392
393 static char *
394 prefix_menu_name (const char *orig_name)
395 {
396 char *prefix;
397 prefix = (char *) g_getenv ("XDG_MENU_PREFIX");
398 if (prefix == NULL)
399 prefix = "gnome-";
400 return g_strconcat (prefix, orig_name, NULL);
401 }
402
403 static gboolean
404 gmenu_tree_canonicalize_path (GMenuTree *tree,
405 GError **error)
406 {
407 const char *menu_file = NULL;
408
409 if (tree->canonical)
410 return TRUE;
411
412 g_assert (tree->canonical_path == NULL);
413
414 gmenu_tree_remove_menu_file_monitors (tree);
415
416 if (tree->path)
417 {
418 menu_file = tree->path;
419 canonicalize_path (tree, tree->path);
420 }
421 else
422 {
423 const gchar *xdg_menu_prefix;
424
425 menu_file = tree->basename;
426 xdg_menu_prefix = g_getenv ("XDG_MENU_PREFIX");
427
428 if (xdg_menu_prefix == NULL)
429 xdg_menu_prefix = "gnome-";
430
431 if (xdg_menu_prefix != NULL)
432 {
433 gchar *prefixed_basename;
434
435 prefixed_basename = g_strdup_printf ("%sapplications.menu",
436 xdg_menu_prefix);
437
438 /* Some gnome-menus using applications just use "applications.menu"
439 * as the basename and expect gnome-menus to prefix it. Others (e.g.
440 * Alacarte) explicitly use "${XDG_MENU_PREFIX}applications.menu" as
441 * the basename, because they want to save changes to the right files
442 * in ~. In both cases, we want to use "applications-merged" as the
443 * merge directory (as required by the fd.o menu spec), so we save
444 * the non-prefixed basename and use it later when calling
445 * menu_layout_load().
446 */
447 if (!g_strcmp0 (tree->basename, "applications.menu") ||
448 !g_strcmp0 (tree->basename, prefixed_basename))
449 {
450 canonicalize_basename (tree, prefixed_basename);
451 g_free (tree->non_prefixed_basename);
452 tree->non_prefixed_basename = g_strdup ("applications.menu");
453 }
454 g_free (prefixed_basename);
455 }
456
457 if (!tree->canonical)
458 canonicalize_basename (tree, tree->basename);
459 }
460
461 if (tree->canonical)
462 {
463 menu_verbose ("Successfully looked up menu_file for \"%s\": %s\n",
464 menu_file, tree->canonical_path);
465 return TRUE;
466 }
467 else
468 {
469 g_set_error (error,
470 G_IO_ERROR,
471 G_IO_ERROR_FAILED,
472 "Failed to look up menu_file for \"%s\"\n",
473 menu_file);
474 return FALSE;
475 }
476 }
477
478 static void
479 gmenu_tree_force_recanonicalize (GMenuTree *tree)
480 {
481 gmenu_tree_remove_menu_file_monitors (tree);
482
483 if (tree->canonical)
484 {
485 gmenu_tree_force_reload (tree);
486
487 g_free (tree->canonical_path);
488 tree->canonical_path = NULL;
489
490 tree->canonical = FALSE;
491 }
492 }
493
494 /**
495 * gmenu_tree_new:
496 * @menu_basename: Basename of menu file
497 * @flags: Flags controlling menu content
498 *
499 * Returns: (transfer full): A new #GMenuTree instance
500 */
501 GMenuTree *
502 gmenu_tree_new (const char *menu_basename,
503 GMenuTreeFlags flags)
504 {
505 g_return_val_if_fail (menu_basename != NULL, NULL);
506
507 return g_object_new (GMENU_TYPE_TREE,
508 "menu-basename", menu_basename,
509 "flags", flags,
510 NULL);
511 }
512
513 /**
514 * gmenu_tree_new_fo_path:
515 * @menu_path: Path of menu file
516 * @flags: Flags controlling menu content
517 *
518 * Returns: (transfer full): A new #GMenuTree instance
519 */
520 GMenuTree *
521 gmenu_tree_new_for_path (const char *menu_path,
522 GMenuTreeFlags flags)
523 {
524 g_return_val_if_fail (menu_path != NULL, NULL);
525
526 return g_object_new (GMENU_TYPE_TREE,
527 "menu-path", menu_path,
528 "flags", flags,
529 NULL);
530 }
531
532 static GObject *
533 gmenu_tree_constructor (GType type,
534 guint n_construct_properties,
535 GObjectConstructParam *construct_properties)
536 {
537 GObject *obj;
538 GMenuTree *self;
539
540 obj = G_OBJECT_CLASS (gmenu_tree_parent_class)->constructor (type,
541 n_construct_properties,
542 construct_properties);
543
544 /* If GMenuTree:menu-path is set, then we should make sure that
545 * GMenuTree:menu-basename is unset (especially as it has a default
546 * value). This has to be done here, in the constructor, since the
547 * properties are construct-only. */
548
549 self = GMENU_TREE (obj);
550
551 if (self->path != NULL)
552 g_object_set (self, "menu-basename", NULL, NULL);
553
554 return obj;
555 }
556
557 static void
558 gmenu_tree_set_property (GObject *object,
559 guint prop_id,
560 const GValue *value,
561 GParamSpec *pspec)
562 {
563 GMenuTree *self = GMENU_TREE (object);
564
565 switch (prop_id)
566 {
567 case PROP_MENU_BASENAME:
568 self->basename = g_value_dup_string (value);
569 break;
570
571 case PROP_MENU_PATH:
572 self->path = g_value_dup_string (value);
573 break;
574
575 case PROP_FLAGS:
576 self->flags = g_value_get_flags (value);
577 break;
578
579 default:
580 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
581 break;
582 }
583 }
584
585 static void
586 gmenu_tree_get_property (GObject *object,
587 guint prop_id,
588 GValue *value,
589 GParamSpec *pspec)
590 {
591 GMenuTree *self = GMENU_TREE (object);
592
593 switch (prop_id)
594 {
595 case PROP_MENU_BASENAME:
596 g_value_set_string (value, self->basename);
597 break;
598 case PROP_MENU_PATH:
599 g_value_set_string (value, self->path);
600 break;
601 case PROP_FLAGS:
602 g_value_set_flags (value, self->flags);
603 break;
604 default:
605 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
606 break;
607 }
608 }
609
610 static void
611 gmenu_tree_finalize (GObject *object)
612 {
613 GMenuTree *tree = GMENU_TREE (object);
614
615 gmenu_tree_force_recanonicalize (tree);
616
617 if (tree->basename != NULL)
618 g_free (tree->basename);
619 tree->basename = NULL;
620
621 g_free (tree->non_prefixed_basename);
622 tree->non_prefixed_basename = NULL;
623
624 if (tree->path != NULL)
625 g_free (tree->path);
626 tree->path = NULL;
627
628 if (tree->canonical_path != NULL)
629 g_free (tree->canonical_path);
630 tree->canonical_path = NULL;
631
632 g_hash_table_destroy (tree->entries_by_id);
633 tree->entries_by_id = NULL;
634
635 G_OBJECT_CLASS (gmenu_tree_parent_class)->finalize (object);
636 }
637
638 static void
639 gmenu_tree_init (GMenuTree *self)
640 {
641 self->entries_by_id = g_hash_table_new (g_str_hash, g_str_equal);
642 }
643
644 static void
645 gmenu_tree_class_init (GMenuTreeClass *klass)
646 {
647 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
648
649 gobject_class->constructor = gmenu_tree_constructor;
650 gobject_class->get_property = gmenu_tree_get_property;
651 gobject_class->set_property = gmenu_tree_set_property;
652 gobject_class->finalize = gmenu_tree_finalize;
653
654 /**
655 * GMenuTree:menu-basename:
656 *
657 * The name of the menu file; must be a basename or a relative path. The file
658 * will be looked up in $XDG_CONFIG_DIRS/menus/. See the Desktop Menu
659 * specification.
660 */
661 g_object_class_install_property (gobject_class,
662 PROP_MENU_BASENAME,
663 g_param_spec_string ("menu-basename", "", "",
664 "applications.menu",
665 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
666 /**
667 * GMenuTree:menu-path:
668 *
669 * The full path of the menu file. If set, GMenuTree:menu-basename will get
670 * ignored.
671 */
672 g_object_class_install_property (gobject_class,
673 PROP_MENU_PATH,
674 g_param_spec_string ("menu-path", "", "",
675 NULL,
676 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
677 /**
678 * GMenuTree:flags:
679 *
680 * Flags controlling the content of the menu.
681 */
682 g_object_class_install_property (gobject_class,
683 PROP_FLAGS,
684 g_param_spec_flags ("flags", "", "",
685 GMENU_TYPE_TREE_FLAGS,
686 GMENU_TREE_FLAGS_NONE,
687 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
688
689 /**
690 * GMenuTree:changed:
691 *
692 * This signal is emitted when applications are added, removed, or
693 * upgraded. But note the new data will only be visible after
694 * gmenu_tree_load_sync() or a variant thereof is invoked.
695 */
696 gmenu_tree_signals[CHANGED] =
697 g_signal_new ("changed",
698 G_TYPE_FROM_CLASS (klass),
699 G_SIGNAL_RUN_LAST,
700 0,
701 NULL, NULL,
702 g_cclosure_marshal_VOID__VOID,
703 G_TYPE_NONE, 0);
704 }
705
706 /**
707 * gmenu_tree_get_canonical_menu_path:
708 * @tree: a #GMenuTree
709 *
710 * This function is only available if the tree has been loaded via
711 * gmenu_tree_load_sync() or a variant thereof.
712 *
713 * Returns: The absolute and canonicalized path to the loaded menu file
714 */
715 const char *
716 gmenu_tree_get_canonical_menu_path (GMenuTree *tree)
717 {
718 g_return_val_if_fail (GMENU_IS_TREE (tree), NULL);
719 g_return_val_if_fail (tree->loaded, NULL);
720
721 return tree->canonical_path;
722 }
723
724 /**
725 * gmenu_tree_load_sync:
726 * @tree: a #GMenuTree
727 * @error: a #GError
728 *
729 * Synchronously load the menu contents. This function
730 * performs a significant amount of blocking I/O if the
731 * tree has not been loaded yet.
732 *
733 * Returns: %TRUE on success, %FALSE on error
734 */
735 gboolean
736 gmenu_tree_load_sync (GMenuTree *tree,
737 GError **error)
738 {
739 GError *local_error = NULL;
740
741 if (tree->loaded)
742 return TRUE;
743
744 if (!gmenu_tree_build_from_layout (tree, &local_error))
745 {
746 if (local_error)
747 g_propagate_error (error, local_error);
748 return FALSE;
749 }
750
751 tree->loaded = TRUE;
752
753 return TRUE;
754 }
755
756 /**
757 * gmenu_tree_get_root_directory:
758 * @tree: a #GMenuTree
759 *
760 * Get the root directory; you must have loaded the tree first (at
761 * least once) via gmenu_tree_load_sync() or a variant thereof.
762 *
763 * Returns: (transfer full): Root of the tree
764 */
765 GMenuTreeDirectory *
766 gmenu_tree_get_root_directory (GMenuTree *tree)
767 {
768 g_return_val_if_fail (tree != NULL, NULL);
769 g_return_val_if_fail (tree->loaded, NULL);
770
771 return gmenu_tree_item_ref (tree->root);
772 }
773
774 static GMenuTreeDirectory *
775 find_path (GMenuTreeDirectory *directory,
776 const char *path)
777 {
778 const char *name;
779 char *slash;
780 char *freeme;
781 GSList *tmp;
782
783 while (path[0] == G_DIR_SEPARATOR) path++;
784
785 if (path[0] == '\0')
786 return directory;
787
788 freeme = NULL;
789 slash = strchr (path, G_DIR_SEPARATOR);
790 if (slash)
791 {
792 name = freeme = g_strndup (path, slash - path);
793 path = slash + 1;
794 }
795 else
796 {
797 name = path;
798 path = NULL;
799 }
800
801 tmp = directory->contents;
802 while (tmp != NULL)
803 {
804 GMenuTreeItem *item = tmp->data;
805
806 if (item->type != GMENU_TREE_ITEM_DIRECTORY)
807 {
808 tmp = tmp->next;
809 continue;
810 }
811
812 if (!strcmp (name, GMENU_TREE_DIRECTORY (item)->name))
813 {
814 g_free (freeme);
815
816 if (path)
817 return find_path (GMENU_TREE_DIRECTORY (item), path);
818 else
819 return GMENU_TREE_DIRECTORY (item);
820 }
821
822 tmp = tmp->next;
823 }
824
825 g_free (freeme);
826
827 return NULL;
828 }
829
830 GMenuTreeDirectory *
831 gmenu_tree_get_directory_from_path (GMenuTree *tree,
832 const char *path)
833 {
834 GMenuTreeDirectory *root;
835 GMenuTreeDirectory *directory;
836
837 g_return_val_if_fail (tree != NULL, NULL);
838 g_return_val_if_fail (path != NULL, NULL);
839
840 if (path[0] != G_DIR_SEPARATOR)
841 return NULL;
842
843 if (!(root = gmenu_tree_get_root_directory (tree)))
844 return NULL;
845
846 directory = find_path (root, path);
847
848 gmenu_tree_item_unref (root);
849
850 return directory ? gmenu_tree_item_ref (directory) : NULL;
851 }
852
853 /**
854 * gmenu_tree_get_entry_by_id:
855 * @tree: a #GMenuTree
856 * @id: a desktop file ID
857 *
858 * Look up the entry corresponding to the given "desktop file id".
859 *
860 * Returns: (transfer full): A newly referenced #GMenuTreeEntry, or %NULL if none
861 */
862 GMenuTreeEntry *
863 gmenu_tree_get_entry_by_id (GMenuTree *tree,
864 const char *id)
865 {
866 GMenuTreeEntry *entry;
867
868 g_return_val_if_fail (tree->loaded, NULL);
869
870 entry = g_hash_table_lookup (tree->entries_by_id, id);
871 if (entry != NULL)
872 gmenu_tree_item_ref (entry);
873
874 return entry;
875 }
876
877 static void
878 gmenu_tree_invoke_monitors (GMenuTree *tree)
879 {
880 g_signal_emit (tree, gmenu_tree_signals[CHANGED], 0);
881 }
882
883 static GMenuTreeDirectory *
884 get_parent (GMenuTreeItem *item)
885 {
886 g_return_val_if_fail (item != NULL, NULL);
887 return item->parent ? gmenu_tree_item_ref (item->parent) : NULL;
888 }
889
890 /**
891 * gmenu_tree_directory_get_parent:
892 * @directory: a #GMenuTreeDirectory
893 *
894 * Returns: (transfer full): The parent directory, or %NULL if none
895 */
896 GMenuTreeDirectory *
897 gmenu_tree_directory_get_parent (GMenuTreeDirectory *directory)
898 {
899 return get_parent ((GMenuTreeItem *)directory);
900 }
901
902 /**
903 * gmenu_tree_entry_get_parent:
904 * @entry: a #GMenuTreeEntry
905 *
906 * Returns: (transfer full): The parent directory, or %NULL if none
907 */
908 GMenuTreeDirectory *
909 gmenu_tree_entry_get_parent (GMenuTreeEntry *entry)
910 {
911 return get_parent ((GMenuTreeItem *)entry);
912 }
913
914 /**
915 * gmenu_tree_alias_get_parent:
916 * @alias: a #GMenuTreeAlias
917 *
918 * Returns: (transfer full): The parent directory, or %NULL if none
919 */
920 GMenuTreeDirectory *
921 gmenu_tree_alias_get_parent (GMenuTreeAlias *alias)
922 {
923 return get_parent ((GMenuTreeItem *)alias);
924 }
925
926 /**
927 * gmenu_tree_header_get_parent:
928 * @header: a #GMenuTreeHeader
929 *
930 * Returns: (transfer full): The parent directory, or %NULL if none
931 */
932 GMenuTreeDirectory *
933 gmenu_tree_header_get_parent (GMenuTreeHeader *header)
934 {
935 return get_parent ((GMenuTreeItem *)header);
936 }
937
938 /**
939 * gmenu_tree_separator_get_parent:
940 * @separator: a #GMenuTreeSeparator
941 *
942 * Returns: (transfer full): The parent directory, or %NULL if none
943 */
944 GMenuTreeDirectory *
945 gmenu_tree_separator_get_parent (GMenuTreeSeparator *separator)
946 {
947 return get_parent ((GMenuTreeItem *)separator);
948 }
949
950 static void
951 gmenu_tree_item_set_parent (GMenuTreeItem *item,
952 GMenuTreeDirectory *parent)
953 {
954 g_return_if_fail (item != NULL);
955
956 item->parent = parent;
957 }
958
959 /**
960 * gmenu_tree_iter_ref: (skip)
961 * @iter: iter
962 *
963 * Increment the reference count of @iter
964 */
965 GMenuTreeIter *
966 gmenu_tree_iter_ref (GMenuTreeIter *iter)
967 {
968 g_atomic_int_inc (&iter->refcount);
969 return iter;
970 }
971
972 /**
973 * gmenu_tree_iter_unref: (skip)
974 * @iter: iter
975 *
976 * Decrement the reference count of @iter
977 */
978 void
979 gmenu_tree_iter_unref (GMenuTreeIter *iter)
980 {
981 if (!g_atomic_int_dec_and_test (&iter->refcount))
982 return;
983
984 g_slist_foreach (iter->contents, (GFunc)gmenu_tree_item_unref, NULL);
985 g_slist_free (iter->contents);
986
987 g_slice_free (GMenuTreeIter, iter);
988 }
989
990 /**
991 * gmenu_tree_directory_iter:
992 * @directory: directory
993 *
994 * Returns: (transfer full): A new iterator over the directory contents
995 */
996 GMenuTreeIter *
997 gmenu_tree_directory_iter (GMenuTreeDirectory *directory)
998 {
999 GMenuTreeIter *iter;
1000
1001 g_return_val_if_fail (directory != NULL, NULL);
1002
1003 iter = g_slice_new0 (GMenuTreeIter);
1004 iter->refcount = 1;
1005
1006 iter->contents = g_slist_copy (directory->contents);
1007 iter->contents_iter = iter->contents;
1008 g_slist_foreach (iter->contents, (GFunc) gmenu_tree_item_ref, NULL);
1009
1010 return iter;
1011 }
1012
1013 /**
1014 * gmenu_tree_iter_next:
1015 * @iter: iter
1016 *
1017 * Change the iterator to the next item, and return its type. If
1018 * there are no more items, %GMENU_TREE_ITEM_INVALID is returned.
1019 *
1020 * Returns: The type of the next item that can be retrived from the iterator
1021 */
1022 GMenuTreeItemType
1023 gmenu_tree_iter_next (GMenuTreeIter *iter)
1024 {
1025 g_return_val_if_fail (iter != NULL, GMENU_TREE_ITEM_INVALID);
1026
1027 if (iter->contents_iter)
1028 {
1029 iter->item = iter->contents_iter->data;
1030 iter->contents_iter = iter->contents_iter->next;
1031 return iter->item->type;
1032 }
1033 else
1034 return GMENU_TREE_ITEM_INVALID;
1035 }
1036
1037 /**
1038 * gmenu_tree_iter_get_directory:
1039 * @iter: iter
1040 *
1041 * This method may only be called if gmenu_tree_iter_next()
1042 * returned GMENU_TREE_ITEM_DIRECTORY.
1043 *
1044 * Returns: (transfer full): A directory
1045 */
1046 GMenuTreeDirectory *
1047 gmenu_tree_iter_get_directory (GMenuTreeIter *iter)
1048 {
1049 g_return_val_if_fail (iter != NULL, NULL);
1050 g_return_val_if_fail (iter->item != NULL, NULL);
1051 g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_DIRECTORY, NULL);
1052
1053 return (GMenuTreeDirectory*)gmenu_tree_item_ref (iter->item);
1054 }
1055
1056 /**
1057 * gmenu_tree_iter_get_entry:
1058 * @iter: iter
1059 *
1060 * This method may only be called if gmenu_tree_iter_next()
1061 * returned GMENU_TREE_ITEM_ENTRY.
1062 *
1063 * Returns: (transfer full): An entry
1064 */
1065 GMenuTreeEntry *
1066 gmenu_tree_iter_get_entry (GMenuTreeIter *iter)
1067 {
1068 g_return_val_if_fail (iter != NULL, NULL);
1069 g_return_val_if_fail (iter->item != NULL, NULL);
1070 g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_ENTRY, NULL);
1071
1072 return (GMenuTreeEntry*)gmenu_tree_item_ref (iter->item);
1073 }
1074
1075 /**
1076 * gmenu_tree_iter_get_header:
1077 * @iter: iter
1078 *
1079 * This method may only be called if gmenu_tree_iter_next()
1080 * returned GMENU_TREE_ITEM_HEADER.
1081 *
1082 * Returns: (transfer full): A header
1083 */
1084 GMenuTreeHeader *
1085 gmenu_tree_iter_get_header (GMenuTreeIter *iter)
1086 {
1087 g_return_val_if_fail (iter != NULL, NULL);
1088 g_return_val_if_fail (iter->item != NULL, NULL);
1089 g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_HEADER, NULL);
1090
1091 return (GMenuTreeHeader*)gmenu_tree_item_ref (iter->item);
1092 }
1093
1094 /**
1095 * gmenu_tree_iter_get_alias:
1096 * @iter: iter
1097 *
1098 * This method may only be called if gmenu_tree_iter_next()
1099 * returned GMENU_TREE_ITEM_ALIAS.
1100 *
1101 * Returns: (transfer full): An alias
1102 */
1103 GMenuTreeAlias *
1104 gmenu_tree_iter_get_alias (GMenuTreeIter *iter)
1105 {
1106 g_return_val_if_fail (iter != NULL, NULL);
1107 g_return_val_if_fail (iter->item != NULL, NULL);
1108 g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_ALIAS, NULL);
1109
1110 return (GMenuTreeAlias*)gmenu_tree_item_ref (iter->item);
1111 }
1112
1113 /**
1114 * gmenu_tree_iter_get_separator:
1115 * @iter: iter
1116 *
1117 * This method may only be called if gmenu_tree_iter_next()
1118 * returned #GMENU_TREE_ITEM_SEPARATOR.
1119 *
1120 * Returns: (transfer full): A separator
1121 */
1122 GMenuTreeSeparator *
1123 gmenu_tree_iter_get_separator (GMenuTreeIter *iter)
1124 {
1125 g_return_val_if_fail (iter != NULL, NULL);
1126 g_return_val_if_fail (iter->item != NULL, NULL);
1127 g_return_val_if_fail (iter->item->type == GMENU_TREE_ITEM_SEPARATOR, NULL);
1128
1129 return (GMenuTreeSeparator*)gmenu_tree_item_ref (iter->item);
1130 }
1131
1132 const char *
1133 gmenu_tree_directory_get_name (GMenuTreeDirectory *directory)
1134 {
1135 g_return_val_if_fail (directory != NULL, NULL);
1136
1137 if (!directory->directory_entry)
1138 return directory->name;
1139
1140 return desktop_entry_get_name (directory->directory_entry);
1141 }
1142
1143 const char *
1144 gmenu_tree_directory_get_generic_name (GMenuTreeDirectory *directory)
1145 {
1146 g_return_val_if_fail (directory != NULL, NULL);
1147
1148 if (!directory->directory_entry)
1149 return NULL;
1150
1151 return desktop_entry_get_generic_name (directory->directory_entry);
1152 }
1153
1154 const char *
1155 gmenu_tree_directory_get_comment (GMenuTreeDirectory *directory)
1156 {
1157 g_return_val_if_fail (directory != NULL, NULL);
1158
1159 if (!directory->directory_entry)
1160 return NULL;
1161
1162 return desktop_entry_get_comment (directory->directory_entry);
1163 }
1164
1165 /**
1166 * gmenu_tree_directory_get_icon:
1167 * @directory: a #GMenuTreeDirectory
1168 *
1169 * Gets the icon for the directory.
1170 *
1171 * Returns: (transfer none): The #GIcon for this directory
1172 */
1173 GIcon *
1174 gmenu_tree_directory_get_icon (GMenuTreeDirectory *directory)
1175 {
1176 g_return_val_if_fail (directory != NULL, NULL);
1177
1178 if (!directory->directory_entry)
1179 return NULL;
1180
1181 return desktop_entry_get_icon (directory->directory_entry);
1182 }
1183
1184 const char *
1185 gmenu_tree_directory_get_desktop_file_path (GMenuTreeDirectory *directory)
1186 {
1187 g_return_val_if_fail (directory != NULL, NULL);
1188
1189 if (!directory->directory_entry)
1190 return NULL;
1191
1192 return desktop_entry_get_path (directory->directory_entry);
1193 }
1194
1195 const char *
1196 gmenu_tree_directory_get_menu_id (GMenuTreeDirectory *directory)
1197 {
1198 g_return_val_if_fail (directory != NULL, NULL);
1199
1200 return directory->name;
1201 }
1202
1203 gboolean
1204 gmenu_tree_directory_get_is_nodisplay (GMenuTreeDirectory *directory)
1205 {
1206 g_return_val_if_fail (directory != NULL, FALSE);
1207
1208 return directory->is_nodisplay;
1209 }
1210
1211 /**
1212 * gmenu_tree_directory_get_tree:
1213 * @directory: A #GMenuTreeDirectory
1214 *
1215 * Grab the tree associated with a #GMenuTreeItem.
1216 *
1217 * Returns: (transfer full): The #GMenuTree
1218 */
1219 GMenuTree *
1220 gmenu_tree_directory_get_tree (GMenuTreeDirectory *directory)
1221 {
1222 g_return_val_if_fail (directory != NULL, NULL);
1223
1224 return g_object_ref (directory->item.tree);
1225 }
1226
1227 static void
1228 append_directory_path (GMenuTreeDirectory *directory,
1229 GString *path)
1230 {
1231
1232 if (!directory->item.parent)
1233 {
1234 g_string_append_c (path, G_DIR_SEPARATOR);
1235 return;
1236 }
1237
1238 append_directory_path (directory->item.parent, path);
1239
1240 g_string_append (path, directory->name);
1241 g_string_append_c (path, G_DIR_SEPARATOR);
1242 }
1243
1244 char *
1245 gmenu_tree_directory_make_path (GMenuTreeDirectory *directory,
1246 GMenuTreeEntry *entry)
1247 {
1248 GString *path;
1249
1250 g_return_val_if_fail (directory != NULL, NULL);
1251
1252 path = g_string_new (NULL);
1253
1254 append_directory_path (directory, path);
1255
1256 if (entry != NULL)
1257 {
1258 const char *basename;
1259
1260 basename = desktop_entry_get_basename (entry->desktop_entry);
1261 g_string_append (path, basename);
1262 }
1263
1264 return g_string_free (path, FALSE);
1265 }
1266
1267 /**
1268 * gmenu_tree_entry_get_app_info:
1269 * @entry: a #GMenuTreeEntry
1270 *
1271 * Returns: (transfer none): The #GDesktopAppInfo for this entry
1272 */
1273 GDesktopAppInfo *
1274 gmenu_tree_entry_get_app_info (GMenuTreeEntry *entry)
1275 {
1276 g_return_val_if_fail (entry != NULL, NULL);
1277
1278 return desktop_entry_get_app_info (entry->desktop_entry);
1279 }
1280
1281 const char *
1282 gmenu_tree_entry_get_desktop_file_path (GMenuTreeEntry *entry)
1283 {
1284 g_return_val_if_fail (entry != NULL, NULL);
1285
1286 return desktop_entry_get_path (entry->desktop_entry);
1287 }
1288
1289 const char *
1290 gmenu_tree_entry_get_desktop_file_id (GMenuTreeEntry *entry)
1291 {
1292 g_return_val_if_fail (entry != NULL, FALSE);
1293
1294 return entry->desktop_file_id;
1295 }
1296
1297 gboolean
1298 gmenu_tree_entry_get_is_nodisplay_recurse (GMenuTreeEntry *entry)
1299 {
1300 GMenuTreeDirectory *directory;
1301 GDesktopAppInfo *app_info;
1302
1303 g_return_val_if_fail (entry != NULL, FALSE);
1304
1305 app_info = gmenu_tree_entry_get_app_info (entry);
1306
1307 if (g_desktop_app_info_get_nodisplay (app_info))
1308 return TRUE;
1309
1310 directory = entry->item.parent;
1311 while (directory != NULL)
1312 {
1313 if (directory->is_nodisplay)
1314 return TRUE;
1315
1316 directory = directory->item.parent;
1317 }
1318
1319 return FALSE;
1320 }
1321
1322 gboolean
1323 gmenu_tree_entry_get_is_excluded (GMenuTreeEntry *entry)
1324 {
1325 g_return_val_if_fail (entry != NULL, FALSE);
1326
1327 return entry->is_excluded;
1328 }
1329
1330 gboolean
1331 gmenu_tree_entry_get_is_unallocated (GMenuTreeEntry *entry)
1332 {
1333 g_return_val_if_fail (entry != NULL, FALSE);
1334
1335 return entry->is_unallocated;
1336 }
1337
1338 /**
1339 * gmenu_tree_entry_get_tree:
1340 * @entry: A #GMenuTreeEntry
1341 *
1342 * Grab the tree associated with a #GMenuTreeEntry.
1343 *
1344 * Returns: (transfer full): The #GMenuTree
1345 */
1346 GMenuTree *
1347 gmenu_tree_entry_get_tree (GMenuTreeEntry *entry)
1348 {
1349 g_return_val_if_fail (entry != NULL, NULL);
1350
1351 return g_object_ref (entry->item.tree);
1352 }
1353
1354 GMenuTreeDirectory *
1355 gmenu_tree_header_get_directory (GMenuTreeHeader *header)
1356 {
1357 g_return_val_if_fail (header != NULL, NULL);
1358
1359 return gmenu_tree_item_ref (header->directory);
1360 }
1361
1362 /**
1363 * gmenu_tree_header_get_tree:
1364 * @header: A #GMenuTreeHeader
1365 *
1366 * Grab the tree associated with a #GMenuTreeHeader.
1367 *
1368 * Returns: (transfer full): The #GMenuTree
1369 */
1370 GMenuTree *
1371 gmenu_tree_header_get_tree (GMenuTreeHeader *header)
1372 {
1373 g_return_val_if_fail (header != NULL, NULL);
1374
1375 return g_object_ref (header->item.tree);
1376 }
1377
1378 GMenuTreeItemType
1379 gmenu_tree_alias_get_aliased_item_type (GMenuTreeAlias *alias)
1380 {
1381 g_return_val_if_fail (alias != NULL, GMENU_TREE_ITEM_INVALID);
1382
1383 g_assert (alias->aliased_item != NULL);
1384 return alias->aliased_item->type;
1385 }
1386
1387 GMenuTreeDirectory *
1388 gmenu_tree_alias_get_directory (GMenuTreeAlias *alias)
1389 {
1390 g_return_val_if_fail (alias != NULL, NULL);
1391
1392 return gmenu_tree_item_ref (alias->directory);
1393 }
1394
1395 /**
1396 * gmenu_tree_alias_get_tree:
1397 * @alias: A #GMenuTreeAlias
1398 *
1399 * Grab the tree associated with a #GMenuTreeAlias.
1400 *
1401 * Returns: (transfer full): The #GMenuTree
1402 */
1403 GMenuTree *
1404 gmenu_tree_alias_get_tree (GMenuTreeAlias *alias)
1405 {
1406 g_return_val_if_fail (alias != NULL, NULL);
1407
1408 return g_object_ref (alias->item.tree);
1409 }
1410
1411 /**
1412 * gmenu_tree_separator_get_tree:
1413 * @separator: A #GMenuTreeSeparator
1414 *
1415 * Grab the tree associated with a #GMenuTreeSeparator.
1416 *
1417 * Returns: (transfer full): The #GMenuTree
1418 */
1419 GMenuTree *
1420 gmenu_tree_separator_get_tree (GMenuTreeSeparator *separator)
1421 {
1422 g_return_val_if_fail (separator != NULL, NULL);
1423
1424 return g_object_ref (separator->item.tree);
1425 }
1426
1427 /**
1428 * gmenu_tree_alias_get_aliased_directory:
1429 * @alias: alias
1430 *
1431 * Returns: (transfer full): The aliased directory entry
1432 */
1433 GMenuTreeDirectory *
1434 gmenu_tree_alias_get_aliased_directory (GMenuTreeAlias *alias)
1435 {
1436 g_return_val_if_fail (alias != NULL, NULL);
1437 g_return_val_if_fail (alias->aliased_item->type == GMENU_TREE_ITEM_DIRECTORY, NULL);
1438
1439 return (GMenuTreeDirectory *) gmenu_tree_item_ref (alias->aliased_item);
1440 }
1441
1442 /**
1443 * gmenu_tree_alias_get_aliased_entry:
1444 * @alias: alias
1445 *
1446 * Returns: (transfer full): The aliased entry
1447 */
1448 GMenuTreeEntry *
1449 gmenu_tree_alias_get_aliased_entry (GMenuTreeAlias *alias)
1450 {
1451 g_return_val_if_fail (alias != NULL, NULL);
1452 g_return_val_if_fail (alias->aliased_item->type == GMENU_TREE_ITEM_ENTRY, NULL);
1453
1454 return (GMenuTreeEntry *) gmenu_tree_item_ref (alias->aliased_item);
1455 }
1456
1457 static GMenuTreeDirectory *
1458 gmenu_tree_directory_new (GMenuTree *tree,
1459 GMenuTreeDirectory *parent,
1460 const char *name)
1461 {
1462 GMenuTreeDirectory *retval;
1463
1464 retval = g_slice_new0 (GMenuTreeDirectory);
1465
1466 retval->item.type = GMENU_TREE_ITEM_DIRECTORY;
1467 retval->item.parent = parent;
1468 retval->item.refcount = 1;
1469 retval->item.tree = tree;
1470
1471 retval->name = g_strdup (name);
1472 retval->directory_entry = NULL;
1473 retval->entries = NULL;
1474 retval->subdirs = NULL;
1475 retval->default_layout_info = NULL;
1476 retval->layout_info = NULL;
1477 retval->contents = NULL;
1478 retval->only_unallocated = FALSE;
1479 retval->is_nodisplay = FALSE;
1480 retval->layout_pending_separator = FALSE;
1481 retval->preprocessed = FALSE;
1482 retval->will_inline_header = G_MAXUINT16;
1483
1484 retval->default_layout_values.mask = MENU_LAYOUT_VALUES_NONE;
1485 retval->default_layout_values.show_empty = FALSE;
1486 retval->default_layout_values.inline_menus = FALSE;
1487 retval->default_layout_values.inline_limit = 4;
1488 retval->default_layout_values.inline_header = FALSE;
1489 retval->default_layout_values.inline_alias = FALSE;
1490
1491 return retval;
1492 }
1493
1494 static void
1495 gmenu_tree_directory_finalize (GMenuTreeDirectory *directory)
1496 {
1497 g_assert (directory->item.refcount == 0);
1498
1499 g_slist_foreach (directory->contents,
1500 (GFunc) gmenu_tree_item_unref_and_unset_parent,
1501 NULL);
1502 g_slist_free (directory->contents);
1503 directory->contents = NULL;
1504
1505 g_slist_foreach (directory->default_layout_info,
1506 (GFunc) menu_layout_node_unref,
1507 NULL);
1508 g_slist_free (directory->default_layout_info);
1509 directory->default_layout_info = NULL;
1510
1511 g_slist_foreach (directory->layout_info,
1512 (GFunc) menu_layout_node_unref,
1513 NULL);
1514 g_slist_free (directory->layout_info);
1515 directory->layout_info = NULL;
1516
1517 g_slist_foreach (directory->subdirs,
1518 (GFunc) gmenu_tree_item_unref_and_unset_parent,
1519 NULL);
1520 g_slist_free (directory->subdirs);
1521 directory->subdirs = NULL;
1522
1523 g_slist_foreach (directory->entries,
1524 (GFunc) gmenu_tree_item_unref_and_unset_parent,
1525 NULL);
1526 g_slist_free (directory->entries);
1527 directory->entries = NULL;
1528
1529 if (directory->directory_entry)
1530 desktop_entry_unref (directory->directory_entry);
1531 directory->directory_entry = NULL;
1532
1533 g_free (directory->name);
1534 directory->name = NULL;
1535
1536 g_slice_free (GMenuTreeDirectory, directory);
1537 }
1538
1539 static GMenuTreeSeparator *
1540 gmenu_tree_separator_new (GMenuTreeDirectory *parent)
1541 {
1542 GMenuTreeSeparator *retval;
1543
1544 retval = g_slice_new0 (GMenuTreeSeparator);
1545
1546 retval->item.type = GMENU_TREE_ITEM_SEPARATOR;
1547 retval->item.parent = parent;
1548 retval->item.refcount = 1;
1549 retval->item.tree = parent->item.tree;
1550
1551 return retval;
1552 }
1553
1554 static void
1555 gmenu_tree_separator_finalize (GMenuTreeSeparator *separator)
1556 {
1557 g_assert (separator->item.refcount == 0);
1558
1559 g_slice_free (GMenuTreeSeparator, separator);
1560 }
1561
1562 static GMenuTreeHeader *
1563 gmenu_tree_header_new (GMenuTreeDirectory *parent,
1564 GMenuTreeDirectory *directory)
1565 {
1566 GMenuTreeHeader *retval;
1567
1568 retval = g_slice_new0 (GMenuTreeHeader);
1569
1570 retval->item.type = GMENU_TREE_ITEM_HEADER;
1571 retval->item.parent = parent;
1572 retval->item.refcount = 1;
1573 retval->item.tree = parent->item.tree;
1574
1575 retval->directory = gmenu_tree_item_ref (directory);
1576
1577 gmenu_tree_item_set_parent (GMENU_TREE_ITEM (retval->directory), NULL);
1578
1579 return retval;
1580 }
1581
1582 static void
1583 gmenu_tree_header_finalize (GMenuTreeHeader *header)
1584 {
1585 g_assert (header->item.refcount == 0);
1586
1587 if (header->directory != NULL)
1588 gmenu_tree_item_unref (header->directory);
1589 header->directory = NULL;
1590
1591 g_slice_free (GMenuTreeHeader, header);
1592 }
1593
1594 static GMenuTreeAlias *
1595 gmenu_tree_alias_new (GMenuTreeDirectory *parent,
1596 GMenuTreeDirectory *directory,
1597 GMenuTreeItem *item)
1598 {
1599 GMenuTreeAlias *retval;
1600
1601 retval = g_slice_new0 (GMenuTreeAlias);
1602
1603 retval->item.type = GMENU_TREE_ITEM_ALIAS;
1604 retval->item.parent = parent;
1605 retval->item.refcount = 1;
1606 retval->item.tree = parent->item.tree;
1607
1608 retval->directory = gmenu_tree_item_ref (directory);
1609 if (item->type != GMENU_TREE_ITEM_ALIAS)
1610 retval->aliased_item = gmenu_tree_item_ref (item);
1611 else
1612 {
1613 GMenuTreeAlias *alias = GMENU_TREE_ALIAS (item);
1614 retval->aliased_item = gmenu_tree_item_ref (alias->aliased_item);
1615 }
1616
1617 gmenu_tree_item_set_parent (GMENU_TREE_ITEM (retval->directory), NULL);
1618 gmenu_tree_item_set_parent (retval->aliased_item, NULL);
1619
1620 return retval;
1621 }
1622
1623 static void
1624 gmenu_tree_alias_finalize (GMenuTreeAlias *alias)
1625 {
1626 g_assert (alias->item.refcount == 0);
1627
1628 if (alias->directory != NULL)
1629 gmenu_tree_item_unref (alias->directory);
1630 alias->directory = NULL;
1631
1632 if (alias->aliased_item != NULL)
1633 gmenu_tree_item_unref (alias->aliased_item);
1634 alias->aliased_item = NULL;
1635
1636 g_slice_free (GMenuTreeAlias, alias);
1637 }
1638
1639 static GMenuTreeEntry *
1640 gmenu_tree_entry_new (GMenuTreeDirectory *parent,
1641 DesktopEntry *desktop_entry,
1642 const char *desktop_file_id,
1643 gboolean is_excluded,
1644 gboolean is_unallocated)
1645 {
1646 GMenuTreeEntry *retval;
1647
1648 retval = g_slice_new0 (GMenuTreeEntry);
1649
1650 retval->item.type = GMENU_TREE_ITEM_ENTRY;
1651 retval->item.parent = parent;
1652 retval->item.refcount = 1;
1653 retval->item.tree = parent->item.tree;
1654
1655 retval->desktop_entry = desktop_entry_ref (desktop_entry);
1656 retval->desktop_file_id = g_strdup (desktop_file_id);
1657 retval->is_excluded = is_excluded != FALSE;
1658 retval->is_unallocated = is_unallocated != FALSE;
1659
1660 return retval;
1661 }
1662
1663 static void
1664 gmenu_tree_entry_finalize (GMenuTreeEntry *entry)
1665 {
1666 g_assert (entry->item.refcount == 0);
1667
1668 g_free (entry->desktop_file_id);
1669 entry->desktop_file_id = NULL;
1670
1671 if (entry->desktop_entry)
1672 desktop_entry_unref (entry->desktop_entry);
1673 entry->desktop_entry = NULL;
1674
1675 g_slice_free (GMenuTreeEntry, entry);
1676 }
1677
1678 static int
1679 gmenu_tree_entry_compare_by_id (GMenuTreeItem *a,
1680 GMenuTreeItem *b)
1681 {
1682 if (a->type == GMENU_TREE_ITEM_ALIAS)
1683 a = GMENU_TREE_ALIAS (a)->aliased_item;
1684
1685 if (b->type == GMENU_TREE_ITEM_ALIAS)
1686 b = GMENU_TREE_ALIAS (b)->aliased_item;
1687
1688 return strcmp (GMENU_TREE_ENTRY (a)->desktop_file_id,
1689 GMENU_TREE_ENTRY (b)->desktop_file_id);
1690 }
1691
1692 /**
1693 * gmenu_tree_item_ref:
1694 * @item: a #GMenuTreeItem
1695 *
1696 * Returns: (transfer full): The same @item, or %NULL if @item is not a valid #GMenuTreeItem
1697 */
1698 gpointer
1699 gmenu_tree_item_ref (gpointer itemp)
1700 {
1701 GMenuTreeItem *item;
1702
1703 item = (GMenuTreeItem *) itemp;
1704
1705 g_return_val_if_fail (item != NULL, NULL);
1706 g_return_val_if_fail (item->refcount > 0, NULL);
1707
1708 g_atomic_int_inc (&item->refcount);
1709
1710 return item;
1711 }
1712
1713 void
1714 gmenu_tree_item_unref (gpointer itemp)
1715 {
1716 GMenuTreeItem *item;
1717
1718 item = (GMenuTreeItem *) itemp;
1719
1720 g_return_if_fail (item != NULL);
1721 g_return_if_fail (item->refcount > 0);
1722
1723 if (g_atomic_int_dec_and_test (&(item->refcount)))
1724 {
1725 switch (item->type)
1726 {
1727 case GMENU_TREE_ITEM_DIRECTORY:
1728 gmenu_tree_directory_finalize (GMENU_TREE_DIRECTORY (item));
1729 break;
1730
1731 case GMENU_TREE_ITEM_ENTRY:
1732 gmenu_tree_entry_finalize (GMENU_TREE_ENTRY (item));
1733 break;
1734
1735 case GMENU_TREE_ITEM_SEPARATOR:
1736 gmenu_tree_separator_finalize (GMENU_TREE_SEPARATOR (item));
1737 break;
1738
1739 case GMENU_TREE_ITEM_HEADER:
1740 gmenu_tree_header_finalize (GMENU_TREE_HEADER (item));
1741 break;
1742
1743 case GMENU_TREE_ITEM_ALIAS:
1744 gmenu_tree_alias_finalize (GMENU_TREE_ALIAS (item));
1745 break;
1746
1747 default:
1748 g_assert_not_reached ();
1749 break;
1750 }
1751 }
1752 }
1753
1754 static void
1755 gmenu_tree_item_unref_and_unset_parent (gpointer itemp)
1756 {
1757 GMenuTreeItem *item;
1758
1759 item = (GMenuTreeItem *) itemp;
1760
1761 g_return_if_fail (item != NULL);
1762
1763 gmenu_tree_item_set_parent (item, NULL);
1764 gmenu_tree_item_unref (item);
1765 }
1766
1767 static inline const char *
1768 gmenu_tree_item_compare_get_name_helper (GMenuTreeItem *item,
1769 GMenuTreeFlags flags)
1770 {
1771 const char *name;
1772
1773 name = NULL;
1774
1775 switch (item->type)
1776 {
1777 case GMENU_TREE_ITEM_DIRECTORY:
1778 if (GMENU_TREE_DIRECTORY (item)->directory_entry)
1779 name = desktop_entry_get_name (GMENU_TREE_DIRECTORY (item)->directory_entry);
1780 else
1781 name = GMENU_TREE_DIRECTORY (item)->name;
1782 break;
1783
1784 case GMENU_TREE_ITEM_ENTRY:
1785 if (flags & GMENU_TREE_FLAGS_SORT_DISPLAY_NAME)
1786 name = g_app_info_get_display_name (G_APP_INFO (gmenu_tree_entry_get_app_info (GMENU_TREE_ENTRY (item))));
1787 else
1788 name = desktop_entry_get_name (GMENU_TREE_ENTRY (item)->desktop_entry);
1789 break;
1790
1791 case GMENU_TREE_ITEM_ALIAS:
1792 {
1793 GMenuTreeItem *dir;
1794 dir = GMENU_TREE_ITEM (GMENU_TREE_ALIAS (item)->directory);
1795 name = gmenu_tree_item_compare_get_name_helper (dir, flags);
1796 }
1797 break;
1798
1799 case GMENU_TREE_ITEM_SEPARATOR:
1800 case GMENU_TREE_ITEM_HEADER:
1801 default:
1802 g_assert_not_reached ();
1803 break;
1804 }
1805
1806 return name;
1807 }
1808
1809 static int
1810 gmenu_tree_item_compare (GMenuTreeItem *a,
1811 GMenuTreeItem *b,
1812 gpointer flags_p)
1813 {
1814 const char *name_a;
1815 const char *name_b;
1816 GMenuTreeFlags flags;
1817
1818 flags = GPOINTER_TO_INT (flags_p);
1819
1820 name_a = gmenu_tree_item_compare_get_name_helper (a, flags);
1821 name_b = gmenu_tree_item_compare_get_name_helper (b, flags);
1822
1823 return g_utf8_collate (name_a, name_b);
1824 }
1825
1826 static MenuLayoutNode *
1827 find_menu_child (MenuLayoutNode *layout)
1828 {
1829 MenuLayoutNode *child;
1830
1831 child = menu_layout_node_get_children (layout);
1832 while (child && menu_layout_node_get_type (child) != MENU_LAYOUT_NODE_MENU)
1833 child = menu_layout_node_get_next (child);
1834
1835 return child;
1836 }
1837
1838 static void
1839 merge_resolved_children (GMenuTree *tree,
1840 GHashTable *loaded_menu_files,
1841 MenuLayoutNode *where,
1842 MenuLayoutNode *from)
1843 {
1844 MenuLayoutNode *insert_after;
1845 MenuLayoutNode *menu_child;
1846 MenuLayoutNode *from_child;
1847
1848 gmenu_tree_resolve_files (tree, loaded_menu_files, from);
1849
1850 insert_after = where;
1851 g_assert (menu_layout_node_get_type (insert_after) != MENU_LAYOUT_NODE_ROOT);
1852 g_assert (menu_layout_node_get_parent (insert_after) != NULL);
1853
1854 /* skip root node */
1855 menu_child = find_menu_child (from);
1856 g_assert (menu_child != NULL);
1857 g_assert (menu_layout_node_get_type (menu_child) == MENU_LAYOUT_NODE_MENU);
1858
1859 /* merge children of toplevel <Menu> */
1860 from_child = menu_layout_node_get_children (menu_child);
1861 while (from_child != NULL)
1862 {
1863 MenuLayoutNode *next;
1864
1865 next = menu_layout_node_get_next (from_child);
1866
1867 menu_verbose ("Merging ");
1868 menu_debug_print_layout (from_child, FALSE);
1869 menu_verbose (" after ");
1870 menu_debug_print_layout (insert_after, FALSE);
1871
1872 switch (menu_layout_node_get_type (from_child))
1873 {
1874 case MENU_LAYOUT_NODE_NAME:
1875 menu_layout_node_unlink (from_child); /* delete this */
1876 break;
1877
1878 default:
1879 menu_layout_node_steal (from_child);
1880 menu_layout_node_insert_after (insert_after, from_child);
1881 menu_layout_node_unref (from_child);
1882
1883 insert_after = from_child;
1884 break;
1885 }
1886
1887 from_child = next;
1888 }
1889 }
1890
1891 static gboolean
1892 load_merge_file (GMenuTree *tree,
1893 GHashTable *loaded_menu_files,
1894 const char *filename,
1895 gboolean is_canonical,
1896 gboolean add_monitor,
1897 MenuLayoutNode *where)
1898 {
1899 MenuLayoutNode *to_merge;
1900 const char *canonical;
1901 char *freeme;
1902 gboolean retval;
1903
1904 freeme = NULL;
1905 retval = FALSE;
1906
1907 if (!is_canonical)
1908 {
1909 canonical = freeme = menu_canonicalize_file_name (filename, FALSE);
1910 if (canonical == NULL)
1911 {
1912 if (add_monitor)
1913 gmenu_tree_add_menu_file_monitor (tree,
1914 filename,
1915 MENU_FILE_MONITOR_NONEXISTENT_FILE);
1916
1917 menu_verbose ("Failed to canonicalize merge file path \"%s\": %s\n",
1918 filename, g_strerror (errno));
1919 goto out;
1920 }
1921 }
1922 else
1923 {
1924 canonical = filename;
1925 }
1926
1927 if (g_hash_table_lookup (loaded_menu_files, canonical) != NULL)
1928 {
1929 g_warning ("Not loading \"%s\": recursive loop detected in .menu files",
1930 canonical);
1931 retval = TRUE;
1932 goto out;
1933 }
1934
1935 menu_verbose ("Merging file \"%s\"\n", canonical);
1936
1937 to_merge = menu_layout_load (canonical, tree->non_prefixed_basename, NULL);
1938 if (to_merge == NULL)
1939 {
1940 menu_verbose ("No menu for file \"%s\" found when merging\n",
1941 canonical);
1942 goto out;
1943 }
1944
1945 retval = TRUE;
1946
1947 g_hash_table_insert (loaded_menu_files, (char *) canonical, GUINT_TO_POINTER (TRUE));
1948
1949 if (add_monitor)
1950 gmenu_tree_add_menu_file_monitor (tree,
1951 canonical,
1952 MENU_FILE_MONITOR_FILE);
1953
1954 merge_resolved_children (tree, loaded_menu_files, where, to_merge);
1955
1956 g_hash_table_remove (loaded_menu_files, canonical);
1957
1958 menu_layout_node_unref (to_merge);
1959
1960 out:
1961 if (freeme)
1962 g_free (freeme);
1963
1964 return retval;
1965 }
1966
1967 static gboolean
1968 load_merge_file_with_config_dir (GMenuTree *tree,
1969 GHashTable *loaded_menu_files,
1970 const char *menu_file,
1971 const char *config_dir,
1972 MenuLayoutNode *where)
1973 {
1974 char *merge_file;
1975 gboolean loaded;
1976
1977 loaded = FALSE;
1978
1979 merge_file = g_build_filename (config_dir, "menus", menu_file, NULL);
1980
1981 if (load_merge_file (tree, loaded_menu_files, merge_file, FALSE, TRUE, where))
1982 loaded = TRUE;
1983
1984 g_free (merge_file);
1985
1986 return loaded;
1987 }
1988
1989 static gboolean
1990 compare_basedir_to_config_dir (const char *canonical_basedir,
1991 const char *config_dir)
1992 {
1993 char *dirname;
1994 char *canonical_menus_dir;
1995 gboolean retval;
1996
1997 menu_verbose ("Checking to see if basedir '%s' is in '%s'\n",
1998 canonical_basedir, config_dir);
1999
2000 dirname = g_build_filename (config_dir, "menus", NULL);
2001
2002 retval = FALSE;
2003
2004 canonical_menus_dir = menu_canonicalize_file_name (dirname, FALSE);
2005 if (canonical_menus_dir != NULL &&
2006 strcmp (canonical_basedir, canonical_menus_dir) == 0)
2007 {
2008 retval = TRUE;
2009 }
2010
2011 g_free (canonical_menus_dir);
2012 g_free (dirname);
2013
2014 return retval;
2015 }
2016
2017 static gboolean
2018 load_parent_merge_file_from_basename (GMenuTree *tree,
2019 GHashTable *loaded_menu_files,
2020 MenuLayoutNode *layout,
2021 const char *menu_file,
2022 const char *canonical_basedir)
2023 {
2024 gboolean found_basedir;
2025 const char * const *system_config_dirs;
2026 int i;
2027
2028 /* We're not interested in menu files that are in directories which are not a
2029 * parent of the base directory of this menu file */
2030 found_basedir = compare_basedir_to_config_dir (canonical_basedir,
2031 g_get_user_config_dir ());
2032
2033 system_config_dirs = g_get_system_config_dirs ();
2034
2035 i = 0;
2036 while (system_config_dirs[i] != NULL)
2037 {
2038 if (!found_basedir)
2039 {
2040 found_basedir = compare_basedir_to_config_dir (canonical_basedir,
2041 system_config_dirs[i]);
2042 }
2043 else
2044 {
2045 menu_verbose ("Looking for parent menu file '%s' in '%s'\n",
2046 menu_file, system_config_dirs[i]);
2047
2048 if (load_merge_file_with_config_dir (tree,
2049 loaded_menu_files,
2050 menu_file,
2051 system_config_dirs[i],
2052 layout))
2053 {
2054 break;
2055 }
2056 }
2057
2058 ++i;
2059 }
2060
2061 return system_config_dirs[i] != NULL;
2062 }
2063
2064 static gboolean
2065 load_parent_merge_file (GMenuTree *tree,
2066 GHashTable *loaded_menu_files,
2067 MenuLayoutNode *layout)
2068 {
2069 MenuLayoutNode *root;
2070 const char *basedir;
2071 const char *menu_name;
2072 char *canonical_basedir;
2073 char *menu_file;
2074 gboolean found;
2075
2076 root = menu_layout_node_get_root (layout);
2077
2078 basedir = menu_layout_node_root_get_basedir (root);
2079 menu_name = menu_layout_node_root_get_name (root);
2080
2081 canonical_basedir = menu_canonicalize_file_name (basedir, FALSE);
2082 if (canonical_basedir == NULL)
2083 {
2084 menu_verbose ("Menu basedir '%s' no longer exists, not merging parent\n",
2085 basedir);
2086 return FALSE;
2087 }
2088
2089 found = FALSE;
2090 menu_file = g_strconcat (menu_name, ".menu", NULL);
2091
2092 if (strcmp (menu_file, "applications.menu") == 0)
2093 {
2094 char *prefixed_basename;
2095 prefixed_basename = prefix_menu_name (menu_file);
2096 found = load_parent_merge_file_from_basename (tree, loaded_menu_files,
2097 layout, prefixed_basename,
2098 canonical_basedir);
2099 g_free (prefixed_basename);
2100 }
2101
2102 if (!found)
2103 {
2104 found = load_parent_merge_file_from_basename (tree, loaded_menu_files,
2105 layout, menu_file,
2106 canonical_basedir);
2107 }
2108
2109 g_free (menu_file);
2110 g_free (canonical_basedir);
2111
2112 return found;
2113 }
2114
2115 static void
2116 load_merge_dir (GMenuTree *tree,
2117 GHashTable *loaded_menu_files,
2118 const char *dirname,
2119 MenuLayoutNode *where)
2120 {
2121 GDir *dir;
2122 const char *menu_file;
2123
2124 menu_verbose ("Loading merge dir \"%s\"\n", dirname);
2125
2126 gmenu_tree_add_menu_file_monitor (tree,
2127 dirname,
2128 MENU_FILE_MONITOR_DIRECTORY);
2129
2130 if ((dir = g_dir_open (dirname, 0, NULL)) == NULL)
2131 return;
2132
2133 while ((menu_file = g_dir_read_name (dir)))
2134 {
2135 if (g_str_has_suffix (menu_file, ".menu"))
2136 {
2137 char *full_path;
2138
2139 full_path = g_build_filename (dirname, menu_file, NULL);
2140
2141 load_merge_file (tree, loaded_menu_files, full_path, TRUE, FALSE, where);
2142
2143 g_free (full_path);
2144 }
2145 }
2146
2147 g_dir_close (dir);
2148 }
2149
2150 static void
2151 load_merge_dir_with_config_dir (GMenuTree *tree,
2152 GHashTable *loaded_menu_files,
2153 const char *config_dir,
2154 const char *dirname,
2155 MenuLayoutNode *where)
2156 {
2157 char *path;
2158
2159 path = g_build_filename (config_dir, "menus", dirname, NULL);
2160
2161 load_merge_dir (tree, loaded_menu_files, path, where);
2162
2163 g_free (path);
2164 }
2165
2166 static void
2167 resolve_merge_file (GMenuTree *tree,
2168 GHashTable *loaded_menu_files,
2169 MenuLayoutNode *layout)
2170 {
2171 char *filename;
2172
2173 if (menu_layout_node_merge_file_get_type (layout) == MENU_MERGE_FILE_TYPE_PARENT)
2174 {
2175 if (load_parent_merge_file (tree, loaded_menu_files, layout))
2176 return;
2177 }
2178
2179 filename = menu_layout_node_get_content_as_path (layout);
2180 if (filename == NULL)
2181 {
2182 menu_verbose ("didn't get node content as a path, not merging file\n");
2183 }
2184 else
2185 {
2186 load_merge_file (tree, loaded_menu_files, filename, FALSE, TRUE, layout);
2187
2188 g_free (filename);
2189 }
2190
2191 /* remove the now-replaced node */
2192 menu_layout_node_unlink (layout);
2193 }
2194
2195 static void
2196 resolve_merge_dir (GMenuTree *tree,
2197 GHashTable *loaded_menu_files,
2198 MenuLayoutNode *layout)
2199 {
2200 char *path;
2201
2202 path = menu_layout_node_get_content_as_path (layout);
2203 if (path == NULL)
2204 {
2205 menu_verbose ("didn't get layout node content as a path, not merging dir\n");
2206 }
2207 else
2208 {
2209 load_merge_dir (tree, loaded_menu_files, path, layout);
2210
2211 g_free (path);
2212 }
2213
2214 /* remove the now-replaced node */
2215 menu_layout_node_unlink (layout);
2216 }
2217
2218 static MenuLayoutNode *
2219 add_app_dir (GMenuTree *tree,
2220 MenuLayoutNode *before,
2221 const char *data_dir)
2222 {
2223 MenuLayoutNode *tmp;
2224 char *dirname;
2225
2226 tmp = menu_layout_node_new (MENU_LAYOUT_NODE_APP_DIR);
2227 dirname = g_build_filename (data_dir, "applications", NULL);
2228 menu_layout_node_set_content (tmp, dirname);
2229 menu_layout_node_insert_before (before, tmp);
2230 menu_layout_node_unref (before);
2231
2232 menu_verbose ("Adding <AppDir>%s</AppDir> in <DefaultAppDirs/>\n",
2233 dirname);
2234
2235 g_free (dirname);
2236
2237 return tmp;
2238 }
2239
2240 static void
2241 resolve_default_app_dirs (GMenuTree *tree,
2242 MenuLayoutNode *layout)
2243 {
2244 MenuLayoutNode *before;
2245 const char * const *system_data_dirs;
2246 int i;
2247
2248 system_data_dirs = g_get_system_data_dirs ();
2249
2250 before = add_app_dir (tree,
2251 menu_layout_node_ref (layout),
2252 g_get_user_data_dir ());
2253
2254 i = 0;
2255 while (system_data_dirs[i] != NULL)
2256 {
2257 before = add_app_dir (tree, before, system_data_dirs[i]);
2258
2259 ++i;
2260 }
2261
2262 menu_layout_node_unref (before);
2263
2264 /* remove the now-replaced node */
2265 menu_layout_node_unlink (layout);
2266 }
2267
2268 static MenuLayoutNode *
2269 add_directory_dir (GMenuTree *tree,
2270 MenuLayoutNode *before,
2271 const char *data_dir)
2272 {
2273 MenuLayoutNode *tmp;
2274 char *dirname;
2275
2276 tmp = menu_layout_node_new (MENU_LAYOUT_NODE_DIRECTORY_DIR);
2277 dirname = g_build_filename (data_dir, "desktop-directories", NULL);
2278 menu_layout_node_set_content (tmp, dirname);
2279 menu_layout_node_insert_before (before, tmp);
2280 menu_layout_node_unref (before);
2281
2282 menu_verbose ("Adding <DirectoryDir>%s</DirectoryDir> in <DefaultDirectoryDirs/>\n",
2283 dirname);
2284
2285 g_free (dirname);
2286
2287 return tmp;
2288 }
2289
2290 static void
2291 resolve_default_directory_dirs (GMenuTree *tree,
2292 MenuLayoutNode *layout)
2293 {
2294 MenuLayoutNode *before;
2295 const char * const *system_data_dirs;
2296 int i;
2297
2298 system_data_dirs = g_get_system_data_dirs ();
2299
2300 before = add_directory_dir (tree,
2301 menu_layout_node_ref (layout),
2302 g_get_user_data_dir ());
2303
2304 i = 0;
2305 while (system_data_dirs[i] != NULL)
2306 {
2307 before = add_directory_dir (tree, before, system_data_dirs[i]);
2308
2309 ++i;
2310 }
2311
2312 menu_layout_node_unref (before);
2313
2314 /* remove the now-replaced node */
2315 menu_layout_node_unlink (layout);
2316 }
2317
2318 static void
2319 resolve_default_merge_dirs (GMenuTree *tree,
2320 GHashTable *loaded_menu_files,
2321 MenuLayoutNode *layout)
2322 {
2323 MenuLayoutNode *root;
2324 const char *menu_name;
2325 char *merge_name;
2326 const char * const *system_config_dirs;
2327 int i;
2328
2329 root = menu_layout_node_get_root (layout);
2330 menu_name = menu_layout_node_root_get_name (root);
2331
2332 merge_name = g_strconcat (menu_name, "-merged", NULL);
2333
2334 system_config_dirs = g_get_system_config_dirs ();
2335
2336 /* Merge in reverse order */
2337 i = 0;
2338 while (system_config_dirs[i] != NULL) i++;
2339 while (i > 0)
2340 {
2341 i--;
2342 load_merge_dir_with_config_dir (tree,
2343 loaded_menu_files,
2344 system_config_dirs[i],
2345 merge_name,
2346 layout);
2347 }
2348
2349 load_merge_dir_with_config_dir (tree,
2350 loaded_menu_files,
2351 g_get_user_config_dir (),
2352 merge_name,
2353 layout);
2354
2355 g_free (merge_name);
2356
2357 /* remove the now-replaced node */
2358 menu_layout_node_unlink (layout);
2359 }
2360
2361 static void
2362 add_filename_include (const char *desktop_file_id,
2363 DesktopEntry *entry,
2364 MenuLayoutNode *include)
2365 {
2366 if (!desktop_entry_has_categories (entry))
2367 {
2368 MenuLayoutNode *node;
2369
2370 node = menu_layout_node_new (MENU_LAYOUT_NODE_FILENAME);
2371 menu_layout_node_set_content (node, desktop_file_id);
2372
2373 menu_layout_node_append_child (include, node);
2374 menu_layout_node_unref (node);
2375 }
2376 }
2377
2378 static void
2379 is_dot_directory (const char *basename,
2380 DesktopEntry *entry,
2381 gboolean *has_dot_directory)
2382 {
2383 if (!strcmp (basename, ".directory"))
2384 *has_dot_directory = TRUE;
2385 }
2386
2387 static gboolean
2388 add_menu_for_legacy_dir (MenuLayoutNode *parent,
2389 const char *legacy_dir,
2390 const char *relative_path,
2391 const char *legacy_prefix,
2392 const char *menu_name)
2393 {
2394 EntryDirectory *ed;
2395 DesktopEntrySet *desktop_entries;
2396 DesktopEntrySet *directory_entries;
2397 GSList *subdirs;
2398 gboolean menu_added;
2399 gboolean has_dot_directory;
2400
2401 ed = entry_directory_new_legacy (DESKTOP_ENTRY_INVALID, legacy_dir, legacy_prefix);
2402 if (!ed)
2403 return FALSE;
2404
2405 subdirs = NULL;
2406 desktop_entries = desktop_entry_set_new ();
2407 directory_entries = desktop_entry_set_new ();
2408
2409 entry_directory_get_flat_contents (ed,
2410 desktop_entries,
2411 directory_entries,
2412 &subdirs);
2413 entry_directory_unref (ed);
2414
2415 has_dot_directory = FALSE;
2416 desktop_entry_set_foreach (directory_entries,
2417 (DesktopEntrySetForeachFunc) is_dot_directory,
2418 &has_dot_directory);
2419 desktop_entry_set_unref (directory_entries);
2420
2421 menu_added = FALSE;
2422 if (desktop_entry_set_get_count (desktop_entries) > 0 || subdirs)
2423 {
2424 MenuLayoutNode *menu;
2425 MenuLayoutNode *node;
2426 GString *subdir_path;
2427 GString *subdir_relative;
2428 GSList *tmp;
2429 int legacy_dir_len;
2430 int relative_path_len;
2431
2432 menu = menu_layout_node_new (MENU_LAYOUT_NODE_MENU);
2433 menu_layout_node_append_child (parent, menu);
2434
2435 menu_added = TRUE;
2436
2437 g_assert (menu_name != NULL);
2438
2439 node = menu_layout_node_new (MENU_LAYOUT_NODE_NAME);
2440 menu_layout_node_set_content (node, menu_name);
2441 menu_layout_node_append_child (menu, node);
2442 menu_layout_node_unref (node);
2443
2444 if (has_dot_directory)
2445 {
2446 node = menu_layout_node_new (MENU_LAYOUT_NODE_DIRECTORY);
2447 if (relative_path != NULL)
2448 {
2449 char *directory_entry_path;
2450
2451 directory_entry_path = g_strdup_printf ("%s/.directory", relative_path);
2452 menu_layout_node_set_content (node, directory_entry_path);
2453 g_free (directory_entry_path);
2454 }
2455 else
2456 {
2457 menu_layout_node_set_content (node, ".directory");
2458 }
2459 menu_layout_node_append_child (menu, node);
2460 menu_layout_node_unref (node);
2461 }
2462
2463 if (desktop_entry_set_get_count (desktop_entries) > 0)
2464 {
2465 MenuLayoutNode *include;
2466
2467 include = menu_layout_node_new (MENU_LAYOUT_NODE_INCLUDE);
2468 menu_layout_node_append_child (menu, include);
2469
2470 desktop_entry_set_foreach (desktop_entries,
2471 (DesktopEntrySetForeachFunc) add_filename_include,
2472 include);
2473
2474 menu_layout_node_unref (include);
2475 }
2476
2477 subdir_path = g_string_new (legacy_dir);
2478 legacy_dir_len = strlen (legacy_dir);
2479
2480 subdir_relative = g_string_new (relative_path);
2481 relative_path_len = relative_path ? strlen (relative_path) : 0;
2482
2483 tmp = subdirs;
2484 while (tmp != NULL)
2485 {
2486 const char *subdir = tmp->data;
2487
2488 g_string_append_c (subdir_path, G_DIR_SEPARATOR);
2489 g_string_append (subdir_path, subdir);
2490
2491 if (relative_path_len)
2492 {
2493 g_string_append_c (subdir_relative, G_DIR_SEPARATOR);
2494 }
2495 g_string_append (subdir_relative, subdir);
2496
2497 add_menu_for_legacy_dir (menu,
2498 subdir_path->str,
2499 subdir_relative->str,
2500 legacy_prefix,
2501 subdir);
2502
2503 g_string_truncate (subdir_relative, relative_path_len);
2504 g_string_truncate (subdir_path, legacy_dir_len);
2505
2506 tmp = tmp->next;
2507 }
2508
2509 g_string_free (subdir_path, TRUE);
2510 g_string_free (subdir_relative, TRUE);
2511
2512 menu_layout_node_unref (menu);
2513 }
2514
2515 desktop_entry_set_unref (desktop_entries);
2516
2517 g_slist_foreach (subdirs, (GFunc) g_free, NULL);
2518 g_slist_free (subdirs);
2519
2520 return menu_added;
2521 }
2522
2523 static void
2524 resolve_legacy_dir (GMenuTree *tree,
2525 GHashTable *loaded_menu_files,
2526 MenuLayoutNode *legacy)
2527 {
2528 MenuLayoutNode *to_merge;
2529 MenuLayoutNode *menu;
2530
2531 to_merge = menu_layout_node_new (MENU_LAYOUT_NODE_ROOT);
2532
2533 menu = menu_layout_node_get_parent (legacy);
2534 g_assert (menu_layout_node_get_type (menu) == MENU_LAYOUT_NODE_MENU);
2535
2536 if (add_menu_for_legacy_dir (to_merge,
2537 menu_layout_node_get_content (legacy),
2538 NULL,
2539 menu_layout_node_legacy_dir_get_prefix (legacy),
2540 menu_layout_node_menu_get_name (menu)))
2541 {
2542 merge_resolved_children (tree, loaded_menu_files, legacy, to_merge);
2543 }
2544
2545 menu_layout_node_unref (to_merge);
2546 }
2547
2548 static MenuLayoutNode *
2549 add_legacy_dir (GMenuTree *tree,
2550 GHashTable *loaded_menu_files,
2551 MenuLayoutNode *before,
2552 const char *data_dir)
2553 {
2554 MenuLayoutNode *legacy;
2555 char *dirname;
2556
2557 dirname = g_build_filename (data_dir, "applnk", NULL);
2558
2559 legacy = menu_layout_node_new (MENU_LAYOUT_NODE_LEGACY_DIR);
2560 menu_layout_node_set_content (legacy, dirname);
2561 menu_layout_node_legacy_dir_set_prefix (legacy, "kde");
2562 menu_layout_node_insert_before (before, legacy);
2563 menu_layout_node_unref (before);
2564
2565 menu_verbose ("Adding <LegacyDir>%s</LegacyDir> in <KDELegacyDirs/>\n",
2566 dirname);
2567
2568 resolve_legacy_dir (tree, loaded_menu_files, legacy);
2569
2570 g_free (dirname);
2571
2572 return legacy;
2573 }
2574
2575 static void
2576 resolve_kde_legacy_dirs (GMenuTree *tree,
2577 GHashTable *loaded_menu_files,
2578 MenuLayoutNode *layout)
2579 {
2580 MenuLayoutNode *before;
2581 const char * const *system_data_dirs;
2582 int i;
2583
2584 system_data_dirs = g_get_system_data_dirs ();
2585
2586 before = add_legacy_dir (tree,
2587 loaded_menu_files,
2588 menu_layout_node_ref (layout),
2589 g_get_user_data_dir ());
2590
2591 i = 0;
2592 while (system_data_dirs[i] != NULL)
2593 {
2594 before = add_legacy_dir (tree, loaded_menu_files, before, system_data_dirs[i]);
2595
2596 ++i;
2597 }
2598
2599 menu_layout_node_unref (before);
2600
2601 /* remove the now-replaced node */
2602 menu_layout_node_unlink (layout);
2603 }
2604
2605 static void
2606 gmenu_tree_resolve_files (GMenuTree *tree,
2607 GHashTable *loaded_menu_files,
2608 MenuLayoutNode *layout)
2609 {
2610 MenuLayoutNode *child;
2611
2612 menu_verbose ("Resolving files in: ");
2613 menu_debug_print_layout (layout, TRUE);
2614
2615 switch (menu_layout_node_get_type (layout))
2616 {
2617 case MENU_LAYOUT_NODE_MERGE_FILE:
2618 resolve_merge_file (tree, loaded_menu_files, layout);
2619 break;
2620
2621 case MENU_LAYOUT_NODE_MERGE_DIR:
2622 resolve_merge_dir (tree, loaded_menu_files, layout);
2623 break;
2624
2625 case MENU_LAYOUT_NODE_DEFAULT_APP_DIRS:
2626 resolve_default_app_dirs (tree, layout);
2627 break;
2628
2629 case MENU_LAYOUT_NODE_DEFAULT_DIRECTORY_DIRS:
2630 resolve_default_directory_dirs (tree, layout);
2631 break;
2632
2633 case MENU_LAYOUT_NODE_DEFAULT_MERGE_DIRS:
2634 resolve_default_merge_dirs (tree, loaded_menu_files, layout);
2635 break;
2636
2637 case MENU_LAYOUT_NODE_LEGACY_DIR:
2638 resolve_legacy_dir (tree, loaded_menu_files, layout);
2639 break;
2640
2641 case MENU_LAYOUT_NODE_KDE_LEGACY_DIRS:
2642 resolve_kde_legacy_dirs (tree, loaded_menu_files, layout);
2643 break;
2644
2645 case MENU_LAYOUT_NODE_PASSTHROUGH:
2646 /* Just get rid of these, we don't need the memory usage */
2647 menu_layout_node_unlink (layout);
2648 break;
2649
2650 default:
2651 /* Recurse */
2652 child = menu_layout_node_get_children (layout);
2653 while (child != NULL)
2654 {
2655 MenuLayoutNode *next = menu_layout_node_get_next (child);
2656
2657 gmenu_tree_resolve_files (tree, loaded_menu_files, child);
2658
2659 child = next;
2660 }
2661 break;
2662 }
2663 }
2664
2665 static void
2666 move_children (MenuLayoutNode *from,
2667 MenuLayoutNode *to)
2668 {
2669 MenuLayoutNode *from_child;
2670 MenuLayoutNode *insert_before;
2671
2672 insert_before = menu_layout_node_get_children (to);
2673 from_child = menu_layout_node_get_children (from);
2674
2675 while (from_child != NULL)
2676 {
2677 MenuLayoutNode *next;
2678
2679 next = menu_layout_node_get_next (from_child);
2680
2681 menu_layout_node_steal (from_child);
2682
2683 if (menu_layout_node_get_type (from_child) == MENU_LAYOUT_NODE_NAME)
2684 {
2685 ; /* just drop the Name in the old <Menu> */
2686 }
2687 else if (insert_before)
2688 {
2689 menu_layout_node_insert_before (insert_before, from_child);
2690 g_assert (menu_layout_node_get_next (from_child) == insert_before);
2691 }
2692 else
2693 {
2694 menu_layout_node_append_child (to, from_child);
2695 }
2696
2697 menu_layout_node_unref (from_child);
2698
2699 from_child = next;
2700 }
2701 }
2702
2703 static int
2704 null_safe_strcmp (const char *a,
2705 const char *b)
2706 {
2707 if (a == NULL && b == NULL)
2708 return 0;
2709 else if (a == NULL)
2710 return -1;
2711 else if (b == NULL)
2712 return 1;
2713 else
2714 return strcmp (a, b);
2715 }
2716
2717 static int
2718 node_compare_func (const void *a,
2719 const void *b)
2720 {
2721 MenuLayoutNode *node_a = (MenuLayoutNode*) a;
2722 MenuLayoutNode *node_b = (MenuLayoutNode*) b;
2723 MenuLayoutNodeType t_a = menu_layout_node_get_type (node_a);
2724 MenuLayoutNodeType t_b = menu_layout_node_get_type (node_b);
2725
2726 if (t_a < t_b)
2727 return -1;
2728 else if (t_a > t_b)
2729 return 1;
2730 else
2731 {
2732 const char *c_a = menu_layout_node_get_content (node_a);
2733 const char *c_b = menu_layout_node_get_content (node_b);
2734
2735 return null_safe_strcmp (c_a, c_b);
2736 }
2737 }
2738
2739 static int
2740 node_menu_compare_func (const void *a,
2741 const void *b)
2742 {
2743 MenuLayoutNode *node_a = (MenuLayoutNode*) a;
2744 MenuLayoutNode *node_b = (MenuLayoutNode*) b;
2745 MenuLayoutNode *parent_a = menu_layout_node_get_parent (node_a);
2746 MenuLayoutNode *parent_b = menu_layout_node_get_parent (node_b);
2747
2748 if (parent_a < parent_b)
2749 return -1;
2750 else if (parent_a > parent_b)
2751 return 1;
2752 else
2753 return null_safe_strcmp (menu_layout_node_menu_get_name (node_a),
2754 menu_layout_node_menu_get_name (node_b));
2755 }
2756
2757 static void
2758 gmenu_tree_strip_duplicate_children (GMenuTree *tree,
2759 MenuLayoutNode *layout)
2760 {
2761 MenuLayoutNode *child;
2762 GSList *simple_nodes;
2763 GSList *menu_layout_nodes;
2764 GSList *prev;
2765 GSList *tmp;
2766
2767 /* to strip dups, we find all the child nodes where
2768 * we want to kill dups, sort them,
2769 * then nuke the adjacent nodes that are equal
2770 */
2771
2772 simple_nodes = NULL;
2773 menu_layout_nodes = NULL;
2774
2775 child = menu_layout_node_get_children (layout);
2776 while (child != NULL)
2777 {
2778 switch (menu_layout_node_get_type (child))
2779 {
2780 /* These are dups if their content is the same */
2781 case MENU_LAYOUT_NODE_APP_DIR:
2782 case MENU_LAYOUT_NODE_DIRECTORY_DIR:
2783 case MENU_LAYOUT_NODE_DIRECTORY:
2784 simple_nodes = g_slist_prepend (simple_nodes, child);
2785 break;
2786
2787 /* These have to be merged in a more complicated way,
2788 * and then recursed
2789 */
2790 case MENU_LAYOUT_NODE_MENU:
2791 menu_layout_nodes = g_slist_prepend (menu_layout_nodes, child);
2792 break;
2793
2794 default:
2795 break;
2796 }
2797
2798 child = menu_layout_node_get_next (child);
2799 }
2800
2801 /* Note that the lists are all backward. So we want to keep
2802 * the items that are earlier in the list, because they were
2803 * later in the file
2804 */
2805
2806 /* stable sort the simple nodes */
2807 simple_nodes = g_slist_sort (simple_nodes,
2808 node_compare_func);
2809
2810 prev = NULL;
2811 tmp = simple_nodes;
2812 while (tmp != NULL)
2813 {
2814 GSList *next = tmp->next;
2815
2816 if (prev)
2817 {
2818 MenuLayoutNode *p = prev->data;
2819 MenuLayoutNode *n = tmp->data;
2820
2821 if (node_compare_func (p, n) == 0)
2822 {
2823 /* nuke it! */
2824 menu_layout_node_unlink (n);
2825 simple_nodes = g_slist_delete_link (simple_nodes, tmp);
2826 tmp = prev;
2827 }
2828 }
2829
2830 prev = tmp;
2831 tmp = next;
2832 }
2833
2834 g_slist_free (simple_nodes);
2835 simple_nodes = NULL;
2836
2837 /* stable sort the menu nodes (the sort includes the
2838 * parents of the nodes in the comparison). Remember
2839 * the list is backward.
2840 */
2841 menu_layout_nodes = g_slist_sort (menu_layout_nodes,
2842 node_menu_compare_func);
2843
2844 prev = NULL;
2845 tmp = menu_layout_nodes;
2846 while (tmp != NULL)
2847 {
2848 GSList *next = tmp->next;
2849
2850 if (prev)
2851 {
2852 MenuLayoutNode *p = prev->data;
2853 MenuLayoutNode *n = tmp->data;
2854
2855 if (node_menu_compare_func (p, n) == 0)
2856 {
2857 /* Move children of first menu to the start of second
2858 * menu and nuke the first menu
2859 */
2860 move_children (n, p);
2861 menu_layout_node_unlink (n);
2862 menu_layout_nodes = g_slist_delete_link (menu_layout_nodes, tmp);
2863 tmp = prev;
2864 }
2865 }
2866
2867 prev = tmp;
2868 tmp = next;
2869 }
2870
2871 g_slist_free (menu_layout_nodes);
2872 menu_layout_nodes = NULL;
2873
2874 /* Recursively clean up all children */
2875 child = menu_layout_node_get_children (layout);
2876 while (child != NULL)
2877 {
2878 if (menu_layout_node_get_type (child) == MENU_LAYOUT_NODE_MENU)
2879 gmenu_tree_strip_duplicate_children (tree, child);
2880
2881 child = menu_layout_node_get_next (child);
2882 }
2883 }
2884
2885 static MenuLayoutNode *
2886 find_submenu (MenuLayoutNode *layout,
2887 const char *path,
2888 gboolean create_if_not_found)
2889 {
2890 MenuLayoutNode *child;
2891 const char *slash;
2892 const char *next_path;
2893 char *name;
2894
2895 menu_verbose (" (splitting \"%s\")\n", path);
2896
2897 if (path[0] == '\0' || path[0] == G_DIR_SEPARATOR)
2898 return NULL;
2899
2900 slash = strchr (path, G_DIR_SEPARATOR);
2901 if (slash != NULL)
2902 {
2903 name = g_strndup (path, slash - path);
2904 next_path = slash + 1;
2905 if (*next_path == '\0')
2906 next_path = NULL;
2907 }
2908 else
2909 {
2910 name = g_strdup (path);
2911 next_path = NULL;
2912 }
2913
2914 child = menu_layout_node_get_children (layout);
2915 while (child != NULL)
2916 {
2917 switch (menu_layout_node_get_type (child))
2918 {
2919 case MENU_LAYOUT_NODE_MENU:
2920 {
2921 if (strcmp (name, menu_layout_node_menu_get_name (child)) == 0)
2922 {
2923 menu_verbose ("MenuNode %p found for path component \"%s\"\n",
2924 child, name);
2925
2926 g_free (name);
2927
2928 if (!next_path)
2929 {
2930 menu_verbose (" Found menu node %p parent is %p\n",
2931 child, layout);
2932 return child;
2933 }
2934
2935 return find_submenu (child, next_path, create_if_not_found);
2936 }
2937 }
2938 break;
2939
2940 default:
2941 break;
2942 }
2943
2944 child = menu_layout_node_get_next (child);
2945 }
2946
2947 if (create_if_not_found)
2948 {
2949 MenuLayoutNode *name_node;
2950
2951 child = menu_layout_node_new (MENU_LAYOUT_NODE_MENU);
2952 menu_layout_node_append_child (layout, child);
2953
2954 name_node = menu_layout_node_new (MENU_LAYOUT_NODE_NAME);
2955 menu_layout_node_set_content (name_node, name);
2956 menu_layout_node_append_child (child, name_node);
2957 menu_layout_node_unref (name_node);
2958
2959 menu_verbose (" Created menu node %p parent is %p\n",
2960 child, layout);
2961
2962 menu_layout_node_unref (child);
2963 g_free (name);
2964
2965 if (!next_path)
2966 return child;
2967
2968 return find_submenu (child, next_path, create_if_not_found);
2969 }
2970 else
2971 {
2972 g_free (name);
2973 return NULL;
2974 }
2975 }
2976
2977 /* To call this you first have to strip duplicate children once,
2978 * otherwise when you move a menu Foo to Bar then you may only
2979 * move one of Foo, not all the merged Foo.
2980 */
2981 static void
2982 gmenu_tree_execute_moves (GMenuTree *tree,
2983 MenuLayoutNode *layout,
2984 gboolean *need_remove_dups_p)
2985 {
2986 MenuLayoutNode *child;
2987 gboolean need_remove_dups;
2988 GSList *move_nodes;
2989 GSList *tmp;
2990
2991 need_remove_dups = FALSE;
2992
2993 move_nodes = NULL;
2994
2995 child = menu_layout_node_get_children (layout);
2996 while (child != NULL)
2997 {
2998 switch (menu_layout_node_get_type (child))
2999 {
3000 case MENU_LAYOUT_NODE_MENU:
3001 /* Recurse - we recurse first and process the current node
3002 * second, as the spec dictates.
3003 */
3004 gmenu_tree_execute_moves (tree, child, &need_remove_dups);
3005 break;
3006
3007 case MENU_LAYOUT_NODE_MOVE:
3008 move_nodes = g_slist_prepend (move_nodes, child);
3009 break;
3010
3011 default:
3012 break;
3013 }
3014
3015 child = menu_layout_node_get_next (child);
3016 }
3017
3018 /* We need to execute the move operations in the order that they appear */
3019 move_nodes = g_slist_reverse (move_nodes);
3020
3021 tmp = move_nodes;
3022 while (tmp != NULL)
3023 {
3024 MenuLayoutNode *move_node = tmp->data;
3025 MenuLayoutNode *old_node;
3026 GSList *next = tmp->next;
3027 const char *old;
3028 const char *new;
3029
3030 old = menu_layout_node_move_get_old (move_node);
3031 new = menu_layout_node_move_get_new (move_node);
3032 g_assert (old != NULL && new != NULL);
3033
3034 menu_verbose ("executing <Move> old = \"%s\" new = \"%s\"\n",
3035 old, new);
3036
3037 old_node = find_submenu (layout, old, FALSE);
3038 if (old_node != NULL)
3039 {
3040 MenuLayoutNode *new_node;
3041
3042 /* here we can create duplicates anywhere below the
3043 * node
3044 */
3045 need_remove_dups = TRUE;
3046
3047 /* look up new node creating it and its parents if
3048 * required
3049 */
3050 new_node = find_submenu (layout, new, TRUE);
3051 g_assert (new_node != NULL);
3052
3053 move_children (old_node, new_node);
3054
3055 menu_layout_node_unlink (old_node);
3056 }
3057
3058 menu_layout_node_unlink (move_node);
3059
3060 tmp = next;
3061 }
3062
3063 g_slist_free (move_nodes);
3064
3065 /* This oddness is to ensure we only remove dups once,
3066 * at the root, instead of recursing the tree over
3067 * and over.
3068 */
3069 if (need_remove_dups_p)
3070 *need_remove_dups_p = need_remove_dups;
3071 else if (need_remove_dups)
3072 gmenu_tree_strip_duplicate_children (tree, layout);
3073 }
3074
3075 static gboolean
3076 gmenu_tree_load_layout (GMenuTree *tree,
3077 GError **error)
3078 {
3079 GHashTable *loaded_menu_files;
3080
3081 if (tree->layout)
3082 return TRUE;
3083
3084 if (!gmenu_tree_canonicalize_path (tree, error))
3085 return FALSE;
3086
3087 menu_verbose ("Loading menu layout from \"%s\"\n",
3088 tree->canonical_path);
3089
3090 tree->layout = menu_layout_load (tree->canonical_path,
3091 tree->non_prefixed_basename,
3092 error);
3093 if (!tree->layout)
3094 return FALSE;
3095
3096 loaded_menu_files = g_hash_table_new (g_str_hash, g_str_equal);
3097 g_hash_table_insert (loaded_menu_files, tree->canonical_path, GUINT_TO_POINTER (TRUE));
3098 gmenu_tree_resolve_files (tree, loaded_menu_files, tree->layout);
3099 g_hash_table_destroy (loaded_menu_files);
3100
3101 gmenu_tree_strip_duplicate_children (tree, tree->layout);
3102 gmenu_tree_execute_moves (tree, tree->layout, NULL);
3103
3104 return TRUE;
3105 }
3106
3107 static void
3108 gmenu_tree_force_reload (GMenuTree *tree)
3109 {
3110 gmenu_tree_force_rebuild (tree);
3111
3112 if (tree->layout)
3113 menu_layout_node_unref (tree->layout);
3114 tree->layout = NULL;
3115 }
3116
3117 typedef struct
3118 {
3119 DesktopEntrySet *set;
3120 const char *category;
3121 } GetByCategoryForeachData;
3122
3123 static void
3124 get_by_category_foreach (const char *file_id,
3125 DesktopEntry *entry,
3126 GetByCategoryForeachData *data)
3127 {
3128 if (desktop_entry_has_category (entry, data->category))
3129 desktop_entry_set_add_entry (data->set, entry, file_id);
3130 }
3131
3132 static void
3133 get_by_category (DesktopEntrySet *entry_pool,
3134 DesktopEntrySet *set,
3135 const char *category)
3136 {
3137 GetByCategoryForeachData data;
3138
3139 data.set = set;
3140 data.category = category;
3141
3142 desktop_entry_set_foreach (entry_pool,
3143 (DesktopEntrySetForeachFunc) get_by_category_foreach,
3144 &data);
3145 }
3146
3147 static DesktopEntrySet *
3148 process_include_rules (MenuLayoutNode *layout,
3149 DesktopEntrySet *entry_pool)
3150 {
3151 DesktopEntrySet *set = NULL;
3152
3153 switch (menu_layout_node_get_type (layout))
3154 {
3155 case MENU_LAYOUT_NODE_AND:
3156 {
3157 MenuLayoutNode *child;
3158
3159 menu_verbose ("Processing <And>\n");
3160
3161 child = menu_layout_node_get_children (layout);
3162 while (child != NULL)
3163 {
3164 DesktopEntrySet *child_set;
3165
3166 child_set = process_include_rules (child, entry_pool);
3167
3168 if (set == NULL)
3169 {
3170 set = child_set;
3171 }
3172 else
3173 {
3174 desktop_entry_set_intersection (set, child_set);
3175 desktop_entry_set_unref (child_set);
3176 }
3177
3178 /* as soon as we get empty results, we can bail,
3179 * because it's an AND
3180 */
3181 if (desktop_entry_set_get_count (set) == 0)
3182 break;
3183
3184 child = menu_layout_node_get_next (child);
3185 }
3186 menu_verbose ("Processed <And>\n");
3187 }
3188 break;
3189
3190 case MENU_LAYOUT_NODE_OR:
3191 {
3192 MenuLayoutNode *child;
3193
3194 menu_verbose ("Processing <Or>\n");
3195
3196 child = menu_layout_node_get_children (layout);
3197 while (child != NULL)
3198 {
3199 DesktopEntrySet *child_set;
3200
3201 child_set = process_include_rules (child, entry_pool);
3202
3203 if (set == NULL)
3204 {
3205 set = child_set;
3206 }
3207 else
3208 {
3209 desktop_entry_set_union (set, child_set);
3210 desktop_entry_set_unref (child_set);
3211 }
3212
3213 child = menu_layout_node_get_next (child);
3214 }
3215 menu_verbose ("Processed <Or>\n");
3216 }
3217 break;
3218
3219 case MENU_LAYOUT_NODE_NOT:
3220 {
3221 /* First get the OR of all the rules */
3222 MenuLayoutNode *child;
3223
3224 menu_verbose ("Processing <Not>\n");
3225
3226 child = menu_layout_node_get_children (layout);
3227 while (child != NULL)
3228 {
3229 DesktopEntrySet *child_set;
3230
3231 child_set = process_include_rules (child, entry_pool);
3232
3233 if (set == NULL)
3234 {
3235 set = child_set;
3236 }
3237 else
3238 {
3239 desktop_entry_set_union (set, child_set);
3240 desktop_entry_set_unref (child_set);
3241 }
3242
3243 child = menu_layout_node_get_next (child);
3244 }
3245
3246 if (set != NULL)
3247 {
3248 DesktopEntrySet *inverted;
3249
3250 /* Now invert the result */
3251 inverted = desktop_entry_set_new ();
3252 desktop_entry_set_union (inverted, entry_pool);
3253 desktop_entry_set_subtract (inverted, set);
3254 desktop_entry_set_unref (set);
3255 set = inverted;
3256 }
3257 menu_verbose ("Processed <Not>\n");
3258 }
3259 break;
3260
3261 case MENU_LAYOUT_NODE_ALL:
3262 menu_verbose ("Processing <All>\n");
3263 set = desktop_entry_set_new ();
3264 desktop_entry_set_union (set, entry_pool);
3265 menu_verbose ("Processed <All>\n");
3266 break;
3267
3268 case MENU_LAYOUT_NODE_FILENAME:
3269 {
3270 DesktopEntry *entry;
3271
3272 menu_verbose ("Processing <Filename>%s</Filename>\n",
3273 menu_layout_node_get_content (layout));
3274
3275 entry = desktop_entry_set_lookup (entry_pool,
3276 menu_layout_node_get_content (layout));
3277 if (entry != NULL)
3278 {
3279 set = desktop_entry_set_new ();
3280 desktop_entry_set_add_entry (set,
3281 entry,
3282 menu_layout_node_get_content (layout));
3283 }
3284 menu_verbose ("Processed <Filename>%s</Filename>\n",
3285 menu_layout_node_get_content (layout));
3286 }
3287 break;
3288
3289 case MENU_LAYOUT_NODE_CATEGORY:
3290 menu_verbose ("Processing <Category>%s</Category>\n",
3291 menu_layout_node_get_content (layout));
3292 set = desktop_entry_set_new ();
3293 get_by_category (entry_pool, set, menu_layout_node_get_content (layout));
3294 menu_verbose ("Processed <Category>%s</Category>\n",
3295 menu_layout_node_get_content (layout));
3296 break;
3297
3298 default:
3299 break;
3300 }
3301
3302 if (set == NULL)
3303 set = desktop_entry_set_new (); /* create an empty set */
3304
3305 menu_verbose ("Matched %d entries\n", desktop_entry_set_get_count (set));
3306
3307 return set;
3308 }
3309
3310 static void
3311 collect_layout_info (MenuLayoutNode *layout,
3312 GSList **layout_info)
3313 {
3314 MenuLayoutNode *iter;
3315
3316 g_slist_foreach (*layout_info,
3317 (GFunc) menu_layout_node_unref,
3318 NULL);
3319 g_slist_free (*layout_info);
3320 *layout_info = NULL;
3321
3322 iter = menu_layout_node_get_children (layout);
3323 while (iter != NULL)
3324 {
3325 switch (menu_layout_node_get_type (iter))
3326 {
3327 case MENU_LAYOUT_NODE_MENUNAME:
3328 case MENU_LAYOUT_NODE_FILENAME:
3329 case MENU_LAYOUT_NODE_SEPARATOR:
3330 case MENU_LAYOUT_NODE_MERGE:
3331 *layout_info = g_slist_prepend (*layout_info,
3332 menu_layout_node_ref (iter));
3333 break;
3334
3335 default:
3336 break;
3337 }
3338
3339 iter = menu_layout_node_get_next (iter);
3340 }
3341
3342 *layout_info = g_slist_reverse (*layout_info);
3343 }
3344
3345 static void
3346 entries_listify_foreach (const char *desktop_file_id,
3347 DesktopEntry *desktop_entry,
3348 GMenuTreeDirectory *directory)
3349 {
3350 directory->entries =
3351 g_slist_prepend (directory->entries,
3352 gmenu_tree_entry_new (directory,
3353 desktop_entry,
3354 desktop_file_id,
3355 FALSE,
3356 FALSE));
3357 }
3358
3359 static void
3360 excluded_entries_listify_foreach (const char *desktop_file_id,
3361 DesktopEntry *desktop_entry,
3362 GMenuTreeDirectory *directory)
3363 {
3364 directory->entries =
3365 g_slist_prepend (directory->entries,
3366 gmenu_tree_entry_new (directory,
3367 desktop_entry,
3368 desktop_file_id,
3369 TRUE,
3370 FALSE));
3371 }
3372
3373 static void
3374 unallocated_entries_listify_foreach (const char *desktop_file_id,
3375 DesktopEntry *desktop_entry,
3376 GMenuTreeDirectory *directory)
3377 {
3378 directory->entries =
3379 g_slist_prepend (directory->entries,
3380 gmenu_tree_entry_new (directory,
3381 desktop_entry,
3382 desktop_file_id,
3383 FALSE,
3384 TRUE));
3385 }
3386
3387 static void
3388 set_default_layout_values (GMenuTreeDirectory *parent,
3389 GMenuTreeDirectory *child)
3390 {
3391 GSList *tmp;
3392
3393 /* if the child has a defined default layout, we don't want to override its
3394 * values. The parent might have a non-defined layout info (ie, no child of
3395 * the DefaultLayout node) but it doesn't meant the default layout values
3396 * (ie, DefaultLayout attributes) aren't different from the global defaults.
3397 */
3398 if (child->default_layout_info != NULL ||
3399 child->default_layout_values.mask != MENU_LAYOUT_VALUES_NONE)
3400 return;
3401
3402 child->default_layout_values = parent->default_layout_values;
3403
3404 tmp = child->subdirs;
3405 while (tmp != NULL)
3406 {
3407 GMenuTreeDirectory *subdir = tmp->data;
3408
3409 set_default_layout_values (child, subdir);
3410
3411 tmp = tmp->next;
3412 }
3413 }
3414
3415 static GMenuTreeDirectory *
3416 process_layout (GMenuTree *tree,
3417 GMenuTreeDirectory *parent,
3418 MenuLayoutNode *layout,
3419 DesktopEntrySet *allocated)
3420 {
3421 MenuLayoutNode *layout_iter;
3422 GMenuTreeDirectory *directory;
3423 DesktopEntrySet *entry_pool;
3424 DesktopEntrySet *entries;
3425 DesktopEntrySet *allocated_set;
3426 DesktopEntrySet *excluded_set;
3427 gboolean deleted;
3428 gboolean only_unallocated;
3429 GSList *tmp;
3430
3431 g_assert (menu_layout_node_get_type (layout) == MENU_LAYOUT_NODE_MENU);
3432 g_assert (menu_layout_node_menu_get_name (layout) != NULL);
3433
3434 directory = gmenu_tree_directory_new (tree, parent,
3435 menu_layout_node_menu_get_name (layout));
3436
3437 menu_verbose ("=== Menu name = %s ===\n", directory->name);
3438
3439
3440 deleted = FALSE;
3441 only_unallocated = FALSE;
3442
3443 entries = desktop_entry_set_new ();
3444 allocated_set = desktop_entry_set_new ();
3445
3446 if (tree->flags & GMENU_TREE_FLAGS_INCLUDE_EXCLUDED)
3447 excluded_set = desktop_entry_set_new ();
3448 else
3449 excluded_set = NULL;
3450
3451 entry_pool = _entry_directory_list_get_all_desktops (menu_layout_node_menu_get_app_dirs (layout));
3452
3453 layout_iter = menu_layout_node_get_children (layout);
3454 while (layout_iter != NULL)
3455 {
3456 switch (menu_layout_node_get_type (layout_iter))
3457 {
3458 case MENU_LAYOUT_NODE_MENU:
3459 /* recurse */
3460 {
3461 GMenuTreeDirectory *child_dir;
3462
3463 menu_verbose ("Processing <Menu>\n");
3464
3465 child_dir = process_layout (tree,
3466 directory,
3467 layout_iter,
3468 allocated);
3469 if (child_dir)
3470 directory->subdirs = g_slist_prepend (directory->subdirs,
3471 child_dir);
3472
3473 menu_verbose ("Processed <Menu>\n");
3474 }
3475 break;
3476
3477 case MENU_LAYOUT_NODE_INCLUDE:
3478 {
3479 /* The match rule children of the <Include> are
3480 * independent (logical OR) so we can process each one by
3481 * itself
3482 */
3483 MenuLayoutNode *rule;
3484
3485 menu_verbose ("Processing <Include> (%d entries)\n",
3486 desktop_entry_set_get_count (entries));
3487
3488 rule = menu_layout_node_get_children (layout_iter);
3489 while (rule != NULL)
3490 {
3491 DesktopEntrySet *rule_set;
3492
3493 rule_set = process_include_rules (rule, entry_pool);
3494 if (rule_set != NULL)
3495 {
3496 desktop_entry_set_union (entries, rule_set);
3497 desktop_entry_set_union (allocated_set, rule_set);
3498 if (excluded_set != NULL)
3499 desktop_entry_set_subtract (excluded_set, rule_set);
3500 desktop_entry_set_unref (rule_set);
3501 }
3502
3503 rule = menu_layout_node_get_next (rule);
3504 }
3505
3506 menu_verbose ("Processed <Include> (%d entries)\n",
3507 desktop_entry_set_get_count (entries));
3508 }
3509 break;
3510
3511 case MENU_LAYOUT_NODE_EXCLUDE:
3512 {
3513 /* The match rule children of the <Exclude> are
3514 * independent (logical OR) so we can process each one by
3515 * itself
3516 */
3517 MenuLayoutNode *rule;
3518
3519 menu_verbose ("Processing <Exclude> (%d entries)\n",
3520 desktop_entry_set_get_count (entries));
3521
3522 rule = menu_layout_node_get_children (layout_iter);
3523 while (rule != NULL)
3524 {
3525 DesktopEntrySet *rule_set;
3526
3527 rule_set = process_include_rules (rule, entry_pool);
3528 if (rule_set != NULL)
3529 {
3530 if (excluded_set != NULL)
3531 desktop_entry_set_union (excluded_set, rule_set);
3532 desktop_entry_set_subtract (entries, rule_set);
3533 desktop_entry_set_unref (rule_set);
3534 }
3535
3536 rule = menu_layout_node_get_next (rule);
3537 }
3538
3539 menu_verbose ("Processed <Exclude> (%d entries)\n",
3540 desktop_entry_set_get_count (entries));
3541 }
3542 break;
3543
3544 case MENU_LAYOUT_NODE_DIRECTORY:
3545 {
3546 DesktopEntry *entry;
3547
3548 menu_verbose ("Processing <Directory>%s</Directory>\n",
3549 menu_layout_node_get_content (layout_iter));
3550
3551 /*
3552 * The last <Directory> to exist wins, so we always try overwriting
3553 */
3554 entry = entry_directory_list_get_directory (menu_layout_node_menu_get_directory_dirs (layout),
3555 menu_layout_node_get_content (layout_iter));
3556
3557 if (entry != NULL)
3558 {
3559 if (!desktop_entry_get_hidden (entry))
3560 {
3561 if (directory->directory_entry)
3562 desktop_entry_unref (directory->directory_entry);
3563 directory->directory_entry = entry; /* pass ref ownership */
3564 }
3565 else
3566 {
3567 desktop_entry_unref (entry);
3568 }
3569 }
3570
3571 menu_verbose ("Processed <Directory> new directory entry = %p (%s)\n",
3572 directory->directory_entry,
3573 directory->directory_entry? desktop_entry_get_path (directory->directory_entry) : "null");
3574 }
3575 break;
3576
3577 case MENU_LAYOUT_NODE_DELETED:
3578 menu_verbose ("Processed <Deleted/>\n");
3579 deleted = TRUE;
3580 break;
3581
3582 case MENU_LAYOUT_NODE_NOT_DELETED:
3583 menu_verbose ("Processed <NotDeleted/>\n");
3584 deleted = FALSE;
3585 break;
3586
3587 case MENU_LAYOUT_NODE_ONLY_UNALLOCATED:
3588 menu_verbose ("Processed <OnlyUnallocated/>\n");
3589 only_unallocated = TRUE;
3590 break;
3591
3592 case MENU_LAYOUT_NODE_NOT_ONLY_UNALLOCATED:
3593 menu_verbose ("Processed <NotOnlyUnallocated/>\n");
3594 only_unallocated = FALSE;
3595 break;
3596
3597 case MENU_LAYOUT_NODE_DEFAULT_LAYOUT:
3598 menu_layout_node_default_layout_get_values (layout_iter,
3599 &directory->default_layout_values);
3600 collect_layout_info (layout_iter, &directory->default_layout_info);
3601 menu_verbose ("Processed <DefaultLayout/>\n");
3602 break;
3603
3604 case MENU_LAYOUT_NODE_LAYOUT:
3605 collect_layout_info (layout_iter, &directory->layout_info);
3606 menu_verbose ("Processed <Layout/>\n");
3607 break;
3608
3609 default:
3610 break;
3611 }
3612
3613 layout_iter = menu_layout_node_get_next (layout_iter);
3614 }
3615
3616 desktop_entry_set_unref (entry_pool);
3617
3618 directory->only_unallocated = only_unallocated;
3619
3620 if (!directory->only_unallocated)
3621 desktop_entry_set_union (allocated, allocated_set);
3622
3623 desktop_entry_set_unref (allocated_set);
3624
3625 if (directory->directory_entry)
3626 {
3627 if (desktop_entry_get_no_display (directory->directory_entry))
3628 {
3629 directory->is_nodisplay = TRUE;
3630
3631 if (!(tree->flags & GMENU_TREE_FLAGS_INCLUDE_NODISPLAY))
3632 {
3633 menu_verbose ("Not showing menu %s because NoDisplay=true\n",
3634 desktop_entry_get_name (directory->directory_entry));
3635 deleted = TRUE;
3636 }
3637 }
3638
3639 if (!desktop_entry_get_show_in (directory->directory_entry))
3640 {
3641 menu_verbose ("Not showing menu %s because OnlyShowIn!=$DESKTOP or NotShowIn=$DESKTOP (with $DESKTOP=${XDG_CURRENT_DESKTOP:-GNOME})\n",
3642 desktop_entry_get_name (directory->directory_entry));
3643 deleted = TRUE;
3644 }
3645 }
3646
3647 if (deleted)
3648 {
3649 if (excluded_set != NULL)
3650 desktop_entry_set_unref (excluded_set);
3651 desktop_entry_set_unref (entries);
3652 gmenu_tree_item_unref (directory);
3653 return NULL;
3654 }
3655
3656 desktop_entry_set_foreach (entries,
3657 (DesktopEntrySetForeachFunc) entries_listify_foreach,
3658 directory);
3659 desktop_entry_set_unref (entries);
3660
3661 if (excluded_set != NULL)
3662 {
3663 desktop_entry_set_foreach (excluded_set,
3664 (DesktopEntrySetForeachFunc) excluded_entries_listify_foreach,
3665 directory);
3666 desktop_entry_set_unref (excluded_set);
3667 }
3668
3669 tmp = directory->subdirs;
3670 while (tmp != NULL)
3671 {
3672 GMenuTreeDirectory *subdir = tmp->data;
3673
3674 set_default_layout_values (directory, subdir);
3675
3676 tmp = tmp->next;
3677 }
3678
3679 tmp = directory->entries;
3680 while (tmp != NULL)
3681 {
3682 GMenuTreeEntry *entry = tmp->data;
3683 GSList *next = tmp->next;
3684 gboolean delete = FALSE;
3685
3686 /* If adding a new condition to delete here, it has to be added to
3687 * get_still_unallocated_foreach() too */
3688
3689 if (desktop_entry_get_hidden (entry->desktop_entry))
3690 {
3691 menu_verbose ("Deleting %s because Hidden=true\n",
3692 desktop_entry_get_name (entry->desktop_entry));
3693 delete = TRUE;
3694 }
3695
3696 if (!(tree->flags & GMENU_TREE_FLAGS_INCLUDE_NODISPLAY) &&
3697 desktop_entry_get_no_display (entry->desktop_entry))
3698 {
3699 menu_verbose ("Deleting %s because NoDisplay=true\n",
3700 desktop_entry_get_name (entry->desktop_entry));
3701 delete = TRUE;
3702 }
3703
3704 if (!desktop_entry_get_show_in (entry->desktop_entry))
3705 {
3706 menu_verbose ("Deleting %s because OnlyShowIn!=$DESKTOP or NotShowIn=$DESKTOP (with $DESKTOP=${XDG_CURRENT_DESKTOP:-GNOME})\n",
3707 desktop_entry_get_name (entry->desktop_entry));
3708 delete = TRUE;
3709 }
3710
3711 /* No need to filter out based on TryExec since GDesktopAppInfo cannot
3712 * deal with .desktop files with a failed TryExec. */
3713
3714 if (delete)
3715 {
3716 directory->entries = g_slist_delete_link (directory->entries,
3717 tmp);
3718 gmenu_tree_item_unref_and_unset_parent (entry);
3719 }
3720
3721 tmp = next;
3722 }
3723
3724 g_assert (directory->name != NULL);
3725
3726 return directory;
3727 }
3728
3729 static void
3730 process_only_unallocated (GMenuTree *tree,
3731 GMenuTreeDirectory *directory,
3732 DesktopEntrySet *allocated,
3733 DesktopEntrySet *unallocated_used)
3734 {
3735 GSList *tmp;
3736
3737 /* For any directory marked only_unallocated, we have to remove any
3738 * entries that were in fact allocated.
3739 */
3740
3741 if (directory->only_unallocated)
3742 {
3743 tmp = directory->entries;
3744 while (tmp != NULL)
3745 {
3746 GMenuTreeEntry *entry = tmp->data;
3747 GSList *next = tmp->next;
3748
3749 if (desktop_entry_set_lookup (allocated, entry->desktop_file_id))
3750 {
3751 directory->entries = g_slist_delete_link (directory->entries,
3752 tmp);
3753 gmenu_tree_item_unref_and_unset_parent (entry);
3754 }
3755 else
3756 {
3757 desktop_entry_set_add_entry (unallocated_used, entry->desktop_entry, entry->desktop_file_id);
3758 }
3759
3760 tmp = next;
3761 }
3762 }
3763
3764 tmp = directory->subdirs;
3765 while (tmp != NULL)
3766 {
3767 GMenuTreeDirectory *subdir = tmp->data;
3768
3769 process_only_unallocated (tree, subdir, allocated, unallocated_used);
3770
3771 tmp = tmp->next;
3772 }
3773 }
3774
3775 typedef struct
3776 {
3777 GMenuTree *tree;
3778 DesktopEntrySet *allocated;
3779 DesktopEntrySet *unallocated_used;
3780 DesktopEntrySet *still_unallocated;
3781 } GetStillUnallocatedForeachData;
3782
3783 static void
3784 get_still_unallocated_foreach (const char *file_id,
3785 DesktopEntry *entry,
3786 GetStillUnallocatedForeachData *data)
3787 {
3788 if (desktop_entry_set_lookup (data->allocated, file_id))
3789 return;
3790
3791 if (desktop_entry_set_lookup (data->unallocated_used, file_id))
3792 return;
3793
3794 /* Same rules than at the end of process_layout() */
3795 if (desktop_entry_get_hidden (entry))
3796 return;
3797
3798 if (!(data->tree->flags & GMENU_TREE_FLAGS_INCLUDE_NODISPLAY) &&
3799 desktop_entry_get_no_display (entry))
3800 return;
3801
3802 if (!desktop_entry_get_show_in (entry))
3803 return;
3804
3805 desktop_entry_set_add_entry (data->still_unallocated, entry, file_id);
3806 }
3807
3808 static void preprocess_layout_info (GMenuTree *tree,
3809 GMenuTreeDirectory *directory);
3810
3811 static GSList *
3812 get_layout_info (GMenuTreeDirectory *directory,
3813 gboolean *is_default_layout)
3814 {
3815 GMenuTreeDirectory *iter;
3816
3817 if (directory->layout_info != NULL)
3818 {
3819 if (is_default_layout)
3820 {
3821 *is_default_layout = FALSE;
3822 }
3823 return directory->layout_info;
3824 }
3825
3826 /* Even if there's no layout information at all, the result will be an
3827 * implicit default layout */
3828 if (is_default_layout)
3829 {
3830 *is_default_layout = TRUE;
3831 }
3832
3833 iter = directory;
3834 while (iter != NULL)
3835 {
3836 /* FIXME: this is broken: we might skip real parent in the
3837 * XML structure, that are hidden because of inlining. */
3838 if (iter->default_layout_info != NULL)
3839 {
3840 return iter->default_layout_info;
3841 }
3842
3843 iter = GMENU_TREE_ITEM (iter)->parent;
3844 }
3845
3846 return NULL;
3847 }
3848
3849 static void
3850 get_values_with_defaults (MenuLayoutNode *node,
3851 MenuLayoutValues *layout_values,
3852 MenuLayoutValues *default_layout_values)
3853 {
3854 menu_layout_node_menuname_get_values (node, layout_values);
3855
3856 if (!(layout_values->mask & MENU_LAYOUT_VALUES_SHOW_EMPTY))
3857 layout_values->show_empty = default_layout_values->show_empty;
3858
3859 if (!(layout_values->mask & MENU_LAYOUT_VALUES_INLINE_MENUS))
3860 layout_values->inline_menus = default_layout_values->inline_menus;
3861
3862 if (!(layout_values->mask & MENU_LAYOUT_VALUES_INLINE_LIMIT))
3863 layout_values->inline_limit = default_layout_values->inline_limit;
3864
3865 if (!(layout_values->mask & MENU_LAYOUT_VALUES_INLINE_HEADER))
3866 layout_values->inline_header = default_layout_values->inline_header;
3867
3868 if (!(layout_values->mask & MENU_LAYOUT_VALUES_INLINE_ALIAS))
3869 layout_values->inline_alias = default_layout_values->inline_alias;
3870 }
3871
3872 static guint
3873 get_real_subdirs_len (GMenuTreeDirectory *directory)
3874 {
3875 guint len;
3876 GSList *tmp;
3877
3878 len = 0;
3879
3880 tmp = directory->subdirs;
3881 while (tmp != NULL)
3882 {
3883 GMenuTreeDirectory *subdir = tmp->data;
3884
3885 tmp = tmp->next;
3886
3887 if (subdir->will_inline_header != G_MAXUINT16)
3888 {
3889 len += get_real_subdirs_len (subdir) + g_slist_length (subdir->entries) + 1;
3890 }
3891 else
3892 len += 1;
3893 }
3894
3895 return len;
3896 }
3897
3898 static void
3899 preprocess_layout_info_subdir_helper (GMenuTree *tree,
3900 GMenuTreeDirectory *directory,
3901 GMenuTreeDirectory *subdir,
3902 MenuLayoutValues *layout_values,
3903 gboolean *contents_added,
3904 gboolean *should_remove)
3905 {
3906 preprocess_layout_info (tree, subdir);
3907
3908 *should_remove = FALSE;
3909 *contents_added = FALSE;
3910
3911 if (subdir->subdirs == NULL && subdir->entries == NULL)
3912 {
3913 if (!(tree->flags & GMENU_TREE_FLAGS_SHOW_EMPTY) &&
3914 !layout_values->show_empty)
3915 {
3916 menu_verbose ("Not showing empty menu '%s'\n", subdir->name);
3917 *should_remove = TRUE;
3918 }
3919 }
3920
3921 else if (layout_values->inline_menus)
3922 {
3923 guint real_subdirs_len;
3924
3925 real_subdirs_len = get_real_subdirs_len (subdir);
3926
3927 if (layout_values->inline_alias &&
3928 real_subdirs_len + g_slist_length (subdir->entries) == 1)
3929 {
3930 GMenuTreeAlias *alias;
3931 GMenuTreeItem *item;
3932 GSList *list;
3933
3934 if (subdir->subdirs != NULL)
3935 list = subdir->subdirs;
3936 else
3937 list = subdir->entries;
3938
3939 item = GMENU_TREE_ITEM (list->data);
3940
3941 menu_verbose ("Inline aliasing '%s' to '%s'\n",
3942 item->type == GMENU_TREE_ITEM_ENTRY ?
3943 g_app_info_get_name (G_APP_INFO (gmenu_tree_entry_get_app_info (GMENU_TREE_ENTRY (item)))) :
3944 (item->type == GMENU_TREE_ITEM_DIRECTORY ?
3945 gmenu_tree_directory_get_name (GMENU_TREE_DIRECTORY (item)) :
3946 gmenu_tree_directory_get_name (GMENU_TREE_ALIAS (item)->directory)),
3947 subdir->name);
3948
3949 alias = gmenu_tree_alias_new (directory, subdir, item);
3950
3951 g_slist_foreach (list,
3952 (GFunc) gmenu_tree_item_unref_and_unset_parent,
3953 NULL);
3954 g_slist_free (list);
3955 subdir->subdirs = NULL;
3956 subdir->entries = NULL;
3957
3958 if (item->type == GMENU_TREE_ITEM_DIRECTORY)
3959 directory->subdirs = g_slist_append (directory->subdirs, alias);
3960 else
3961 directory->entries = g_slist_append (directory->entries, alias);
3962
3963 *contents_added = TRUE;
3964 *should_remove = TRUE;
3965 }
3966
3967 else if (layout_values->inline_limit == 0 ||
3968 layout_values->inline_limit >= real_subdirs_len + g_slist_length (subdir->entries))
3969 {
3970 if (layout_values->inline_header)
3971 {
3972 menu_verbose ("Creating inline header with name '%s'\n", subdir->name);
3973 /* we're limited to 16-bits to spare some memory; if the limit is
3974 * higher than that (would be crazy), we just consider it's
3975 * unlimited */
3976 if (layout_values->inline_limit < G_MAXUINT16)
3977 subdir->will_inline_header = layout_values->inline_limit;
3978 else
3979 subdir->will_inline_header = 0;
3980 }
3981 else
3982 {
3983 g_slist_foreach (subdir->subdirs,
3984 (GFunc) gmenu_tree_item_set_parent,
3985 directory);
3986 directory->subdirs = g_slist_concat (directory->subdirs,
3987 subdir->subdirs);
3988 subdir->subdirs = NULL;
3989
3990 g_slist_foreach (subdir->entries,
3991 (GFunc) gmenu_tree_item_set_parent,
3992 directory);
3993 directory->entries = g_slist_concat (directory->entries,
3994 subdir->entries);
3995 subdir->entries = NULL;
3996
3997 *contents_added = TRUE;
3998 *should_remove = TRUE;
3999 }
4000
4001 menu_verbose ("Inlining directory contents of '%s' to '%s'\n",
4002 subdir->name, directory->name);
4003 }
4004 }
4005 }
4006
4007 static void
4008 preprocess_layout_info (GMenuTree *tree,
4009 GMenuTreeDirectory *directory)
4010 {
4011 GSList *tmp;
4012 GSList *layout_info;
4013 gboolean using_default_layout;
4014 GSList *last_subdir;
4015 gboolean strip_duplicates;
4016 gboolean contents_added;
4017 gboolean should_remove;
4018 GSList *subdirs_sentinel;
4019
4020 /* Note: we need to preprocess all menus, even if the layout mask for a menu
4021 * is MENU_LAYOUT_VALUES_NONE: in this case, we need to remove empty menus;
4022 * and the layout mask can be different for a submenu anyway */
4023
4024 menu_verbose ("Processing menu layout inline hints for %s\n", directory->name);
4025 g_assert (!directory->preprocessed);
4026
4027 strip_duplicates = FALSE;
4028 /* we use last_subdir to track the last non-inlined subdirectory */
4029 last_subdir = g_slist_last (directory->subdirs);
4030
4031 /*
4032 * First process subdirectories with explicit layout
4033 */
4034 layout_info = get_layout_info (directory, &using_default_layout);
4035 tmp = layout_info;
4036 /* see comment below about Menuname to understand why we leave the loop if
4037 * last_subdir is NULL */
4038 while (tmp != NULL && last_subdir != NULL)
4039 {
4040 MenuLayoutNode *node = tmp->data;
4041 MenuLayoutValues layout_values;
4042 const char *name;
4043 GMenuTreeDirectory *subdir;
4044 GSList *subdir_l;
4045
4046 tmp = tmp->next;
4047
4048 /* only Menuname nodes are relevant here */
4049 if (menu_layout_node_get_type (node) != MENU_LAYOUT_NODE_MENUNAME)
4050 continue;
4051
4052 get_values_with_defaults (node,
4053 &layout_values,
4054 &directory->default_layout_values);
4055
4056 /* find the subdirectory that is affected by those attributes */
4057 name = menu_layout_node_get_content (node);
4058 subdir = NULL;
4059 subdir_l = directory->subdirs;
4060 while (subdir_l != NULL)
4061 {
4062 subdir = subdir_l->data;
4063
4064 if (!strcmp (subdir->name, name))
4065 break;
4066
4067 subdir = NULL;
4068 subdir_l = subdir_l->next;
4069
4070 /* We do not want to use Menuname on a menu that appeared via
4071 * inlining: without inlining, the Menuname wouldn't have matched
4072 * anything, and we want to keep the same behavior.
4073 * Unless the layout is a default layout, in which case the Menuname
4074 * does match the subdirectory. */
4075 if (!using_default_layout && subdir_l == last_subdir)
4076 {
4077 subdir_l = NULL;
4078 break;
4079 }
4080 }
4081
4082 if (subdir == NULL)
4083 continue;
4084
4085 preprocess_layout_info_subdir_helper (tree, directory,
4086 subdir, &layout_values,
4087 &contents_added, &should_remove);
4088 strip_duplicates = strip_duplicates || contents_added;
4089 if (should_remove)
4090 {
4091 if (last_subdir == subdir_l)
4092 {
4093 /* we need to recompute last_subdir since we'll remove it from
4094 * the list */
4095 GSList *buf;
4096
4097 if (subdir_l == directory->subdirs)
4098 last_subdir = NULL;
4099 else
4100 {
4101 buf = directory->subdirs;
4102 while (buf != NULL && buf->next != subdir_l)
4103 buf = buf->next;
4104 last_subdir = buf;
4105 }
4106 }
4107
4108 directory->subdirs = g_slist_remove (directory->subdirs, subdir);
4109 gmenu_tree_item_unref_and_unset_parent (GMENU_TREE_ITEM (subdir));
4110 }
4111 }
4112
4113 /*
4114 * Now process the subdirectories with no explicit layout
4115 */
4116 /* this is bogus data, but we just need the pointer anyway */
4117 subdirs_sentinel = g_slist_prepend (directory->subdirs, PACKAGE);
4118 directory->subdirs = subdirs_sentinel;
4119
4120 tmp = directory->subdirs;
4121 while (tmp->next != NULL)
4122 {
4123 GMenuTreeDirectory *subdir = tmp->next->data;
4124
4125 if (subdir->preprocessed)
4126 {
4127 tmp = tmp->next;
4128 continue;
4129 }
4130
4131 preprocess_layout_info_subdir_helper (tree, directory,
4132 subdir, &directory->default_layout_values,
4133 &contents_added, &should_remove);
4134 strip_duplicates = strip_duplicates || contents_added;
4135 if (should_remove)
4136 {
4137 tmp = g_slist_delete_link (tmp, tmp->next);
4138 gmenu_tree_item_unref_and_unset_parent (GMENU_TREE_ITEM (subdir));
4139 }
4140 else
4141 tmp = tmp->next;
4142 }
4143
4144 /* remove the sentinel */
4145 directory->subdirs = g_slist_delete_link (directory->subdirs,
4146 directory->subdirs);
4147
4148 /*
4149 * Finally, remove duplicates if needed
4150 */
4151 if (strip_duplicates)
4152 {
4153 /* strip duplicate entries; there should be no duplicate directories */
4154 directory->entries = g_slist_sort (directory->entries,
4155 (GCompareFunc) gmenu_tree_entry_compare_by_id);
4156 tmp = directory->entries;
4157 while (tmp != NULL && tmp->next != NULL)
4158 {
4159 GMenuTreeItem *a = tmp->data;
4160 GMenuTreeItem *b = tmp->next->data;
4161
4162 if (a->type == GMENU_TREE_ITEM_ALIAS)
4163 a = GMENU_TREE_ALIAS (a)->aliased_item;
4164
4165 if (b->type == GMENU_TREE_ITEM_ALIAS)
4166 b = GMENU_TREE_ALIAS (b)->aliased_item;
4167
4168 if (strcmp (GMENU_TREE_ENTRY (a)->desktop_file_id,
4169 GMENU_TREE_ENTRY (b)->desktop_file_id) == 0)
4170 {
4171 tmp = g_slist_delete_link (tmp, tmp->next);
4172 gmenu_tree_item_unref (b);
4173 }
4174 else
4175 tmp = tmp->next;
4176 }
4177 }
4178
4179 directory->preprocessed = TRUE;
4180 }
4181
4182 static void process_layout_info (GMenuTree *tree,
4183 GMenuTreeDirectory *directory);
4184
4185 static void
4186 check_pending_separator (GMenuTreeDirectory *directory)
4187 {
4188 if (directory->layout_pending_separator)
4189 {
4190 menu_verbose ("Adding pending separator in '%s'\n", directory->name);
4191
4192 directory->contents = g_slist_append (directory->contents,
4193 gmenu_tree_separator_new (directory));
4194 directory->layout_pending_separator = FALSE;
4195 }
4196 }
4197
4198 static void
4199 merge_alias (GMenuTree *tree,
4200 GMenuTreeDirectory *directory,
4201 GMenuTreeAlias *alias)
4202 {
4203 menu_verbose ("Merging alias '%s' in directory '%s'\n",
4204 alias->directory->name, directory->name);
4205
4206 if (alias->aliased_item->type == GMENU_TREE_ITEM_DIRECTORY)
4207 {
4208 process_layout_info (tree, GMENU_TREE_DIRECTORY (alias->aliased_item));
4209 }
4210
4211 check_pending_separator (directory);
4212
4213 directory->contents = g_slist_append (directory->contents,
4214 gmenu_tree_item_ref (alias));
4215 }
4216
4217 static void
4218 merge_subdir (GMenuTree *tree,
4219 GMenuTreeDirectory *directory,
4220 GMenuTreeDirectory *subdir)
4221 {
4222 menu_verbose ("Merging subdir '%s' in directory '%s'\n",
4223 subdir->name, directory->name);
4224
4225 process_layout_info (tree, subdir);
4226
4227 check_pending_separator (directory);
4228
4229 if (subdir->will_inline_header == 0 ||
4230 (subdir->will_inline_header != G_MAXUINT16 &&
4231 g_slist_length (subdir->contents) <= subdir->will_inline_header))
4232 {
4233 GMenuTreeHeader *header;
4234
4235 header = gmenu_tree_header_new (directory, subdir);
4236 directory->contents = g_slist_append (directory->contents, header);
4237
4238 g_slist_foreach (subdir->contents,
4239 (GFunc) gmenu_tree_item_set_parent,
4240 directory);
4241 directory->contents = g_slist_concat (directory->contents,
4242 subdir->contents);
4243 subdir->contents = NULL;
4244 subdir->will_inline_header = G_MAXUINT16;
4245
4246 gmenu_tree_item_set_parent (GMENU_TREE_ITEM (subdir), NULL);
4247 }
4248 else
4249 {
4250 directory->contents = g_slist_append (directory->contents,
4251 gmenu_tree_item_ref (subdir));
4252 }
4253 }
4254
4255 static void
4256 merge_subdir_by_name (GMenuTree *tree,
4257 GMenuTreeDirectory *directory,
4258 const char *subdir_name)
4259 {
4260 GSList *tmp;
4261
4262 menu_verbose ("Attempting to merge subdir '%s' in directory '%s'\n",
4263 subdir_name, directory->name);
4264
4265 tmp = directory->subdirs;
4266 while (tmp != NULL)
4267 {
4268 GMenuTreeDirectory *subdir = tmp->data;
4269 GSList *next = tmp->next;
4270
4271 /* if it's an alias, then it cannot be affected by
4272 * the Merge nodes in the layout */
4273 if (GMENU_TREE_ITEM (subdir)->type == GMENU_TREE_ITEM_ALIAS)
4274 continue;
4275
4276 if (!strcmp (subdir->name, subdir_name))
4277 {
4278 directory->subdirs = g_slist_delete_link (directory->subdirs, tmp);
4279 merge_subdir (tree, directory, subdir);
4280 gmenu_tree_item_unref (subdir);
4281 }
4282
4283 tmp = next;
4284 }
4285 }
4286
4287 static void
4288 merge_entry (GMenuTree *tree,
4289 GMenuTreeDirectory *directory,
4290 GMenuTreeEntry *entry)
4291 {
4292 menu_verbose ("Merging entry '%s' in directory '%s'\n",
4293 entry->desktop_file_id, directory->name);
4294
4295 check_pending_separator (directory);
4296 directory->contents = g_slist_append (directory->contents,
4297 gmenu_tree_item_ref (entry));
4298 }
4299
4300 static void
4301 merge_entry_by_id (GMenuTree *tree,
4302 GMenuTreeDirectory *directory,
4303 const char *file_id)
4304 {
4305 GSList *tmp;
4306
4307 menu_verbose ("Attempting to merge entry '%s' in directory '%s'\n",
4308 file_id, directory->name);
4309
4310 tmp = directory->entries;
4311 while (tmp != NULL)
4312 {
4313 GMenuTreeEntry *entry = tmp->data;
4314 GSList *next = tmp->next;
4315
4316 /* if it's an alias, then it cannot be affected by
4317 * the Merge nodes in the layout */
4318 if (GMENU_TREE_ITEM (entry)->type == GMENU_TREE_ITEM_ALIAS)
4319 continue;
4320
4321 if (!strcmp (entry->desktop_file_id, file_id))
4322 {
4323 directory->entries = g_slist_delete_link (directory->entries, tmp);
4324 merge_entry (tree, directory, entry);
4325 gmenu_tree_item_unref (entry);
4326 }
4327
4328 tmp = next;
4329 }
4330 }
4331
4332 static inline gboolean
4333 find_name_in_list (const char *name,
4334 GSList *list)
4335 {
4336 while (list != NULL)
4337 {
4338 if (!strcmp (name, list->data))
4339 return TRUE;
4340
4341 list = list->next;
4342 }
4343
4344 return FALSE;
4345 }
4346
4347 static void
4348 merge_subdirs (GMenuTree *tree,
4349 GMenuTreeDirectory *directory,
4350 GSList *except)
4351 {
4352 GSList *subdirs;
4353 GSList *tmp;
4354
4355 menu_verbose ("Merging subdirs in directory '%s'\n", directory->name);
4356
4357 subdirs = directory->subdirs;
4358 directory->subdirs = NULL;
4359
4360 subdirs = g_slist_sort_with_data (subdirs,
4361 (GCompareDataFunc) gmenu_tree_item_compare,
4362 GINT_TO_POINTER (GMENU_TREE_FLAGS_NONE));
4363
4364 tmp = subdirs;
4365 while (tmp != NULL)
4366 {
4367 GMenuTreeDirectory *subdir = tmp->data;
4368
4369 if (GMENU_TREE_ITEM (subdir)->type == GMENU_TREE_ITEM_ALIAS)
4370 {
4371 merge_alias (tree, directory, GMENU_TREE_ALIAS (subdir));
4372 gmenu_tree_item_unref (subdir);
4373 }
4374 else if (!find_name_in_list (subdir->name, except))
4375 {
4376 merge_subdir (tree, directory, subdir);
4377 gmenu_tree_item_unref (subdir);
4378 }
4379 else
4380 {
4381 menu_verbose ("Not merging directory '%s' yet\n", subdir->name);
4382 directory->subdirs = g_slist_append (directory->subdirs, subdir);
4383 }
4384
4385 tmp = tmp->next;
4386 }
4387
4388 g_slist_free (subdirs);
4389 g_slist_free (except);
4390 }
4391
4392 static void
4393 merge_entries (GMenuTree *tree,
4394 GMenuTreeDirectory *directory,
4395 GSList *except)
4396 {
4397 GSList *entries;
4398 GSList *tmp;
4399
4400 menu_verbose ("Merging entries in directory '%s'\n", directory->name);
4401
4402 entries = directory->entries;
4403 directory->entries = NULL;
4404
4405 entries = g_slist_sort_with_data (entries,
4406 (GCompareDataFunc) gmenu_tree_item_compare,
4407 GINT_TO_POINTER (tree->flags));
4408
4409 tmp = entries;
4410 while (tmp != NULL)
4411 {
4412 GMenuTreeEntry *entry = tmp->data;
4413
4414 if (GMENU_TREE_ITEM (entry)->type == GMENU_TREE_ITEM_ALIAS)
4415 {
4416 merge_alias (tree, directory, GMENU_TREE_ALIAS (entry));
4417 gmenu_tree_item_unref (entry);
4418 }
4419 else if (!find_name_in_list (entry->desktop_file_id, except))
4420 {
4421 merge_entry (tree, directory, entry);
4422 gmenu_tree_item_unref (entry);
4423 }
4424 else
4425 {
4426 menu_verbose ("Not merging entry '%s' yet\n", entry->desktop_file_id);
4427 directory->entries = g_slist_append (directory->entries, entry);
4428 }
4429
4430 tmp = tmp->next;
4431 }
4432
4433 g_slist_free (entries);
4434 g_slist_free (except);
4435 }
4436
4437 static void
4438 merge_subdirs_and_entries (GMenuTree *tree,
4439 GMenuTreeDirectory *directory,
4440 GSList *except_subdirs,
4441 GSList *except_entries)
4442 {
4443 GSList *items;
4444 GSList *tmp;
4445
4446 menu_verbose ("Merging subdirs and entries together in directory %s\n",
4447 directory->name);
4448
4449 items = g_slist_concat (directory->subdirs, directory->entries);
4450
4451 directory->subdirs = NULL;
4452 directory->entries = NULL;
4453
4454 items = g_slist_sort_with_data (items,
4455 (GCompareDataFunc) gmenu_tree_item_compare,
4456 GINT_TO_POINTER (tree->flags));
4457
4458 tmp = items;
4459 while (tmp != NULL)
4460 {
4461 GMenuTreeItem *item = tmp->data;
4462 GMenuTreeItemType type;
4463
4464 type = item->type;
4465
4466 if (type == GMENU_TREE_ITEM_ALIAS)
4467 {
4468 merge_alias (tree, directory, GMENU_TREE_ALIAS (item));
4469 gmenu_tree_item_unref (item);
4470 }
4471 else if (type == GMENU_TREE_ITEM_DIRECTORY)
4472 {
4473 if (!find_name_in_list (GMENU_TREE_DIRECTORY (item)->name, except_subdirs))
4474 {
4475 merge_subdir (tree,
4476 directory,
4477 GMENU_TREE_DIRECTORY (item));
4478 gmenu_tree_item_unref (item);
4479 }
4480 else
4481 {
4482 menu_verbose ("Not merging directory '%s' yet\n",
4483 GMENU_TREE_DIRECTORY (item)->name);
4484 directory->subdirs = g_slist_append (directory->subdirs, item);
4485 }
4486 }
4487 else if (type == GMENU_TREE_ITEM_ENTRY)
4488 {
4489 if (!find_name_in_list (GMENU_TREE_ENTRY (item)->desktop_file_id, except_entries))
4490 {
4491 merge_entry (tree, directory, GMENU_TREE_ENTRY (item));
4492 gmenu_tree_item_unref (item);
4493 }
4494 else
4495 {
4496 menu_verbose ("Not merging entry '%s' yet\n",
4497 GMENU_TREE_ENTRY (item)->desktop_file_id);
4498 directory->entries = g_slist_append (directory->entries, item);
4499 }
4500 }
4501 else
4502 {
4503 g_assert_not_reached ();
4504 }
4505
4506 tmp = tmp->next;
4507 }
4508
4509 g_slist_free (items);
4510 g_slist_free (except_subdirs);
4511 g_slist_free (except_entries);
4512 }
4513
4514 static GSList *
4515 get_subdirs_from_layout_info (GSList *layout_info)
4516 {
4517 GSList *subdirs;
4518 GSList *tmp;
4519
4520 subdirs = NULL;
4521
4522 tmp = layout_info;
4523 while (tmp != NULL)
4524 {
4525 MenuLayoutNode *node = tmp->data;
4526
4527 if (menu_layout_node_get_type (node) == MENU_LAYOUT_NODE_MENUNAME)
4528 {
4529 subdirs = g_slist_append (subdirs,
4530 (char *) menu_layout_node_get_content (node));
4531 }
4532
4533 tmp = tmp->next;
4534 }
4535
4536 return subdirs;
4537 }
4538
4539 static GSList *
4540 get_entries_from_layout_info (GSList *layout_info)
4541 {
4542 GSList *entries;
4543 GSList *tmp;
4544
4545 entries = NULL;
4546
4547 tmp = layout_info;
4548 while (tmp != NULL)
4549 {
4550 MenuLayoutNode *node = tmp->data;
4551
4552 if (menu_layout_node_get_type (node) == MENU_LAYOUT_NODE_FILENAME)
4553 {
4554 entries = g_slist_append (entries,
4555 (char *) menu_layout_node_get_content (node));
4556 }
4557
4558 tmp = tmp->next;
4559 }
4560
4561 return entries;
4562 }
4563
4564 static void
4565 process_layout_info (GMenuTree *tree,
4566 GMenuTreeDirectory *directory)
4567 {
4568 GSList *layout_info;
4569
4570 menu_verbose ("Processing menu layout hints for %s\n", directory->name);
4571
4572 g_slist_foreach (directory->contents,
4573 (GFunc) gmenu_tree_item_unref_and_unset_parent,
4574 NULL);
4575 g_slist_free (directory->contents);
4576 directory->contents = NULL;
4577 directory->layout_pending_separator = FALSE;
4578
4579 layout_info = get_layout_info (directory, NULL);
4580
4581 if (layout_info == NULL)
4582 {
4583 merge_subdirs (tree, directory, NULL);
4584 merge_entries (tree, directory, NULL);
4585 }
4586 else
4587 {
4588 GSList *tmp;
4589
4590 tmp = layout_info;
4591 while (tmp != NULL)
4592 {
4593 MenuLayoutNode *node = tmp->data;
4594
4595 switch (menu_layout_node_get_type (node))
4596 {
4597 case MENU_LAYOUT_NODE_MENUNAME:
4598 merge_subdir_by_name (tree,
4599 directory,
4600 menu_layout_node_get_content (node));
4601 break;
4602
4603 case MENU_LAYOUT_NODE_FILENAME:
4604 merge_entry_by_id (tree,
4605 directory,
4606 menu_layout_node_get_content (node));
4607 break;
4608
4609 case MENU_LAYOUT_NODE_SEPARATOR:
4610 /* Unless explicitly told to show all separators, do not show a
4611 * separator at the beginning of a menu. Note that we don't add
4612 * the separators now, and instead make it pending. This way, we
4613 * won't show two consecutive separators nor will we show a
4614 * separator at the end of a menu. */
4615 if (tree->flags & GMENU_TREE_FLAGS_SHOW_ALL_SEPARATORS)
4616 {
4617 directory->layout_pending_separator = TRUE;
4618 check_pending_separator (directory);
4619 }
4620 else if (directory->contents)
4621 {
4622 menu_verbose ("Adding a potential separator in '%s'\n",
4623 directory->name);
4624
4625 directory->layout_pending_separator = TRUE;
4626 }
4627 else
4628 {
4629 menu_verbose ("Skipping separator at the beginning of '%s'\n",
4630 directory->name);
4631 }
4632 break;
4633
4634 case MENU_LAYOUT_NODE_MERGE:
4635 switch (menu_layout_node_merge_get_type (node))
4636 {
4637 case MENU_LAYOUT_MERGE_NONE:
4638 break;
4639
4640 case MENU_LAYOUT_MERGE_MENUS:
4641 merge_subdirs (tree,
4642 directory,
4643 get_subdirs_from_layout_info (tmp->next));
4644 break;
4645
4646 case MENU_LAYOUT_MERGE_FILES:
4647 merge_entries (tree,
4648 directory,
4649 get_entries_from_layout_info (tmp->next));
4650 break;
4651
4652 case MENU_LAYOUT_MERGE_ALL:
4653 merge_subdirs_and_entries (tree,
4654 directory,
4655 get_subdirs_from_layout_info (tmp->next),
4656 get_entries_from_layout_info (tmp->next));
4657 break;
4658
4659 default:
4660 g_assert_not_reached ();
4661 break;
4662 }
4663 break;
4664
4665 default:
4666 g_assert_not_reached ();
4667 break;
4668 }
4669
4670 tmp = tmp->next;
4671 }
4672 }
4673
4674 g_slist_foreach (directory->subdirs,
4675 (GFunc) gmenu_tree_item_unref,
4676 NULL);
4677 g_slist_free (directory->subdirs);
4678 directory->subdirs = NULL;
4679
4680 g_slist_foreach (directory->entries,
4681 (GFunc) gmenu_tree_item_unref,
4682 NULL);
4683 g_slist_free (directory->entries);
4684 directory->entries = NULL;
4685
4686 g_slist_foreach (directory->default_layout_info,
4687 (GFunc) menu_layout_node_unref,
4688 NULL);
4689 g_slist_free (directory->default_layout_info);
4690 directory->default_layout_info = NULL;
4691
4692 g_slist_foreach (directory->layout_info,
4693 (GFunc) menu_layout_node_unref,
4694 NULL);
4695 g_slist_free (directory->layout_info);
4696 directory->layout_info = NULL;
4697 }
4698
4699 static void
4700 handle_entries_changed (MenuLayoutNode *layout,
4701 GMenuTree *tree)
4702 {
4703 if (tree->layout == layout)
4704 {
4705 gmenu_tree_force_rebuild (tree);
4706 gmenu_tree_invoke_monitors (tree);
4707 }
4708 }
4709
4710 static void
4711 update_entry_index (GMenuTree *tree,
4712 GMenuTreeDirectory *dir)
4713 {
4714 GMenuTreeIter *iter = gmenu_tree_directory_iter (dir);
4715 GMenuTreeItemType next_type;
4716
4717 while ((next_type = gmenu_tree_iter_next (iter)) != GMENU_TREE_ITEM_INVALID)
4718 {
4719 gpointer item = NULL;
4720
4721 switch (next_type)
4722 {
4723 case GMENU_TREE_ITEM_ENTRY:
4724 {
4725 const char *id;
4726
4727 item = gmenu_tree_iter_get_entry (iter);
4728 id = gmenu_tree_entry_get_desktop_file_id (item);
4729 if (id != NULL)
4730 g_hash_table_insert (tree->entries_by_id, (char*)id, item);
4731 }
4732 break;
4733 case GMENU_TREE_ITEM_DIRECTORY:
4734 {
4735 item = gmenu_tree_iter_get_directory (iter);
4736 update_entry_index (tree, (GMenuTreeDirectory*)item);
4737 }
4738 break;
4739 default:
4740 break;
4741 }
4742 if (item != NULL)
4743 gmenu_tree_item_unref (item);
4744 }
4745
4746 gmenu_tree_iter_unref (iter);
4747 }
4748
4749 static gboolean
4750 gmenu_tree_build_from_layout (GMenuTree *tree,
4751 GError **error)
4752 {
4753 DesktopEntrySet *allocated;
4754
4755 if (tree->root)
4756 return TRUE;
4757
4758 if (!gmenu_tree_load_layout (tree, error))
4759 return FALSE;
4760
4761 menu_verbose ("Building menu tree from layout\n");
4762
4763 allocated = desktop_entry_set_new ();
4764
4765 /* create the menu structure */
4766 tree->root = process_layout (tree,
4767 NULL,
4768 find_menu_child (tree->layout),
4769 allocated);
4770 if (tree->root)
4771 {
4772 DesktopEntrySet *unallocated_used;
4773
4774 unallocated_used = desktop_entry_set_new ();
4775
4776 process_only_unallocated (tree, tree->root, allocated, unallocated_used);
4777 if (tree->flags & GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED)
4778 {
4779 DesktopEntrySet *entry_pool;
4780 DesktopEntrySet *still_unallocated;
4781 GetStillUnallocatedForeachData data;
4782
4783 entry_pool = _entry_directory_list_get_all_desktops (menu_layout_node_menu_get_app_dirs (find_menu_child (tree->layout)));
4784 still_unallocated = desktop_entry_set_new ();
4785
4786 data.tree = tree;
4787 data.allocated = allocated;
4788 data.unallocated_used = unallocated_used;
4789 data.still_unallocated = still_unallocated;
4790
4791 desktop_entry_set_foreach (entry_pool,
4792 (DesktopEntrySetForeachFunc) get_still_unallocated_foreach,
4793 &data);
4794
4795 desktop_entry_set_unref (entry_pool);
4796
4797 desktop_entry_set_foreach (still_unallocated,
4798 (DesktopEntrySetForeachFunc) unallocated_entries_listify_foreach,
4799 tree->root);
4800
4801 desktop_entry_set_unref (still_unallocated);
4802 }
4803
4804 desktop_entry_set_unref (unallocated_used);
4805
4806 /* process the layout info part that can move/remove items:
4807 * inline, show_empty, etc. */
4808 preprocess_layout_info (tree, tree->root);
4809 /* populate the menu structure that we got with the items, and order it
4810 * according to the layout info */
4811 process_layout_info (tree, tree->root);
4812
4813 update_entry_index (tree, tree->root);
4814
4815 menu_layout_node_root_add_entries_monitor (tree->layout,
4816 (MenuLayoutNodeEntriesChangedFunc) handle_entries_changed,
4817 tree);
4818 }
4819
4820 desktop_entry_set_unref (allocated);
4821
4822 return TRUE;
4823 }
4824
4825 static void
4826 gmenu_tree_force_rebuild (GMenuTree *tree)
4827 {
4828 if (tree->root)
4829 {
4830 g_hash_table_remove_all (tree->entries_by_id);
4831 gmenu_tree_item_unref (tree->root);
4832 tree->root = NULL;
4833 tree->loaded = FALSE;
4834
4835 g_assert (tree->layout != NULL);
4836
4837 menu_layout_node_root_remove_entries_monitor (tree->layout,
4838 (MenuLayoutNodeEntriesChangedFunc) handle_entries_changed,
4839 tree);
4840 }
4841 }
4842
4843 GType
4844 gmenu_tree_iter_get_type (void)
4845 {
4846 static GType gtype = G_TYPE_INVALID;
4847 if (gtype == G_TYPE_INVALID)
4848 {
4849 gtype = g_boxed_type_register_static ("GMenuTreeIter",
4850 (GBoxedCopyFunc)gmenu_tree_iter_ref,
4851 (GBoxedFreeFunc)gmenu_tree_iter_unref);
4852 }
4853 return gtype;
4854 }
4855
4856 GType
4857 gmenu_tree_directory_get_type (void)
4858 {
4859 static GType gtype = G_TYPE_INVALID;
4860 if (gtype == G_TYPE_INVALID)
4861 {
4862 gtype = g_boxed_type_register_static ("GMenuTreeDirectory",
4863 (GBoxedCopyFunc)gmenu_tree_item_ref,
4864 (GBoxedFreeFunc)gmenu_tree_item_unref);
4865 }
4866 return gtype;
4867 }
4868
4869 GType
4870 gmenu_tree_entry_get_type (void)
4871 {
4872 static GType gtype = G_TYPE_INVALID;
4873 if (gtype == G_TYPE_INVALID)
4874 {
4875 gtype = g_boxed_type_register_static ("GMenuTreeEntry",
4876 (GBoxedCopyFunc)gmenu_tree_item_ref,
4877 (GBoxedFreeFunc)gmenu_tree_item_unref);
4878 }
4879 return gtype;
4880 }
4881
4882 GType
4883 gmenu_tree_separator_get_type (void)
4884 {
4885 static GType gtype = G_TYPE_INVALID;
4886 if (gtype == G_TYPE_INVALID)
4887 {
4888 gtype = g_boxed_type_register_static ("GMenuTreeSeparator",
4889 (GBoxedCopyFunc)gmenu_tree_item_ref,
4890 (GBoxedFreeFunc)gmenu_tree_item_unref);
4891 }
4892 return gtype;
4893 }
4894
4895 GType
4896 gmenu_tree_header_get_type (void)
4897 {
4898 static GType gtype = G_TYPE_INVALID;
4899 if (gtype == G_TYPE_INVALID)
4900 {
4901 gtype = g_boxed_type_register_static ("GMenuTreeHeader",
4902 (GBoxedCopyFunc)gmenu_tree_item_ref,
4903 (GBoxedFreeFunc)gmenu_tree_item_unref);
4904 }
4905 return gtype;
4906 }
4907
4908 GType
4909 gmenu_tree_alias_get_type (void)
4910 {
4911 static GType gtype = G_TYPE_INVALID;
4912 if (gtype == G_TYPE_INVALID)
4913 {
4914 gtype = g_boxed_type_register_static ("GMenuTreeAlias",
4915 (GBoxedCopyFunc)gmenu_tree_item_ref,
4916 (GBoxedFreeFunc)gmenu_tree_item_unref);
4917 }
4918 return gtype;
4919 }
4920
4921 GType
4922 gmenu_tree_flags_get_type (void)
4923 {
4924 static GType enum_type_id = 0;
4925 if (G_UNLIKELY (!enum_type_id))
4926 {
4927 static const GFlagsValue values[] = {
4928 { GMENU_TREE_FLAGS_NONE, "GMENU_TREE_FLAGS_NONE", "none" },
4929 { GMENU_TREE_FLAGS_INCLUDE_EXCLUDED, "GMENU_TREE_FLAGS_INCLUDE_EXCLUDED", "include-excluded" },
4930 { GMENU_TREE_FLAGS_SHOW_EMPTY, "GMENU_TREE_FLAGS_SHOW_EMPTY", "show-empty" },
4931 { GMENU_TREE_FLAGS_INCLUDE_NODISPLAY, "GMENU_TREE_FLAGS_INCLUDE_NODISPLAY", "include-nodisplay" },
4932 { GMENU_TREE_FLAGS_SHOW_ALL_SEPARATORS, "GMENU_TREE_FLAGS_SHOW_ALL_SEPARATORS", "show-all-separators" },
4933 { GMENU_TREE_FLAGS_SORT_DISPLAY_NAME, "GMENU_TREE_FLAGS_SORT_DISPLAY_NAME", "sort-display-name" },
4934 { GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED, "GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED,", "include-unallocated" },
4935 { 0, NULL, NULL }
4936 };
4937 enum_type_id = g_flags_register_static ("GMenuTreeFlags", values);
4938 }
4939 return enum_type_id;
4940 }
0 /*
1 * Copyright (C) 2004, 2011 Red Hat, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library 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 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef __GMENU_TREE_H__
20 #define __GMENU_TREE_H__
21
22 #ifndef GMENU_I_KNOW_THIS_IS_UNSTABLE
23 #error "libgnome-menu should only be used if you understand that it's subject to frequent change, and is not supported as a fixed API/ABI or as part of the platform"
24 #endif
25
26 #include <gio/gdesktopappinfo.h>
27
28 G_BEGIN_DECLS
29
30 #define GMENU_TYPE_TREE (gmenu_tree_get_type ())
31 #define GMENU_TREE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GMENU_TYPE_TREE, GMenuTree))
32 #define GMENU_TREE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GMENU_TYPE_TREE, GMenuTreeClass))
33 #define GMENU_IS_TREE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GMENU_TYPE_TREE))
34 #define GMENU_IS_TREE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GMENU_TYPE_TREE))
35 #define GMENU_TREE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DESKTOP_APP_INFO, GMenuTreeClass))
36
37 typedef struct _GMenuTree GMenuTree;
38 typedef struct _GMenuTreeClass GMenuTreeClass;
39
40 struct _GMenuTreeClass
41 {
42 GObjectClass parent_class;
43 };
44
45 GType gmenu_tree_get_type (void) G_GNUC_CONST;
46
47 typedef struct GMenuTreeIter GMenuTreeIter;
48 typedef struct GMenuTreeDirectory GMenuTreeDirectory;
49 typedef struct GMenuTreeEntry GMenuTreeEntry;
50 typedef struct GMenuTreeSeparator GMenuTreeSeparator;
51 typedef struct GMenuTreeHeader GMenuTreeHeader;
52 typedef struct GMenuTreeAlias GMenuTreeAlias;
53
54 typedef enum
55 {
56 GMENU_TREE_ITEM_INVALID = 0,
57 GMENU_TREE_ITEM_DIRECTORY,
58 GMENU_TREE_ITEM_ENTRY,
59 GMENU_TREE_ITEM_SEPARATOR,
60 GMENU_TREE_ITEM_HEADER,
61 GMENU_TREE_ITEM_ALIAS
62 } GMenuTreeItemType;
63
64 GType gmenu_tree_iter_get_type (void);
65
66 /* Explicitly skip item, it's a "hidden" base class */
67 GType gmenu_tree_directory_get_type (void);
68 GType gmenu_tree_entry_get_type (void);
69 GType gmenu_tree_separator_get_type (void);
70 GType gmenu_tree_header_get_type (void);
71 GType gmenu_tree_alias_get_type (void);
72
73 typedef enum
74 {
75 GMENU_TREE_FLAGS_NONE = 0,
76 GMENU_TREE_FLAGS_INCLUDE_EXCLUDED = 1 << 0,
77 GMENU_TREE_FLAGS_INCLUDE_NODISPLAY = 1 << 1,
78 GMENU_TREE_FLAGS_INCLUDE_UNALLOCATED = 1 << 2,
79 /* leave some space for more include flags */
80 GMENU_TREE_FLAGS_SHOW_EMPTY = 1 << 8,
81 GMENU_TREE_FLAGS_SHOW_ALL_SEPARATORS = 1 << 9,
82 /* leave some space for more show flags */
83 GMENU_TREE_FLAGS_SORT_DISPLAY_NAME = 1 << 16
84 } GMenuTreeFlags;
85 GType gmenu_tree_flags_get_type (void);
86 #define GMENU_TYPE_TREE_FLAGS (gmenu_tree_flags_get_type ())
87
88 GMenuTree *gmenu_tree_new (const char *menu_basename,
89 GMenuTreeFlags flags);
90
91 GMenuTree *gmenu_tree_new_for_path (const char *menu_path,
92 GMenuTreeFlags flags);
93
94 gboolean gmenu_tree_load_sync (GMenuTree *tree,
95 GError **error);
96
97 const char *gmenu_tree_get_canonical_menu_path (GMenuTree *tree);
98 GMenuTreeDirectory *gmenu_tree_get_root_directory (GMenuTree *tree);
99 GMenuTreeDirectory *gmenu_tree_get_directory_from_path (GMenuTree *tree,
100 const char *path);
101 GMenuTreeEntry *gmenu_tree_get_entry_by_id (GMenuTree *tree,
102 const char *id);
103
104 gpointer gmenu_tree_item_ref (gpointer item);
105 void gmenu_tree_item_unref (gpointer item);
106
107 GMenuTreeDirectory *gmenu_tree_directory_get_parent (GMenuTreeDirectory *directory);
108 const char *gmenu_tree_directory_get_name (GMenuTreeDirectory *directory);
109 const char *gmenu_tree_directory_get_generic_name (GMenuTreeDirectory *directory);
110 const char *gmenu_tree_directory_get_comment (GMenuTreeDirectory *directory);
111 GIcon *gmenu_tree_directory_get_icon (GMenuTreeDirectory *directory);
112 const char *gmenu_tree_directory_get_desktop_file_path (GMenuTreeDirectory *directory);
113 const char *gmenu_tree_directory_get_menu_id (GMenuTreeDirectory *directory);
114 GMenuTree *gmenu_tree_directory_get_tree (GMenuTreeDirectory *directory);
115
116 gboolean gmenu_tree_directory_get_is_nodisplay (GMenuTreeDirectory *directory);
117
118 GMenuTreeIter *gmenu_tree_directory_iter (GMenuTreeDirectory *directory);
119
120 GMenuTreeIter *gmenu_tree_iter_ref (GMenuTreeIter *iter);
121 void gmenu_tree_iter_unref (GMenuTreeIter *iter);
122
123 GMenuTreeItemType gmenu_tree_iter_next (GMenuTreeIter *iter);
124 GMenuTreeDirectory *gmenu_tree_iter_get_directory (GMenuTreeIter *iter);
125 GMenuTreeEntry *gmenu_tree_iter_get_entry (GMenuTreeIter *iter);
126 GMenuTreeHeader *gmenu_tree_iter_get_header (GMenuTreeIter *iter);
127 GMenuTreeAlias *gmenu_tree_iter_get_alias (GMenuTreeIter *iter);
128 GMenuTreeSeparator *gmenu_tree_iter_get_separator (GMenuTreeIter *iter);
129
130 char *gmenu_tree_directory_make_path (GMenuTreeDirectory *directory,
131 GMenuTreeEntry *entry);
132
133
134 GDesktopAppInfo *gmenu_tree_entry_get_app_info (GMenuTreeEntry *entry);
135 GMenuTreeDirectory *gmenu_tree_entry_get_parent (GMenuTreeEntry *entry);
136 GMenuTree *gmenu_tree_entry_get_tree (GMenuTreeEntry *entry);
137
138 const char *gmenu_tree_entry_get_desktop_file_path (GMenuTreeEntry *entry);
139 const char *gmenu_tree_entry_get_desktop_file_id (GMenuTreeEntry *entry);
140
141 gboolean gmenu_tree_entry_get_is_nodisplay_recurse (GMenuTreeEntry *entry);
142 gboolean gmenu_tree_entry_get_is_excluded (GMenuTreeEntry *entry);
143 gboolean gmenu_tree_entry_get_is_unallocated (GMenuTreeEntry *entry);
144
145 GMenuTreeDirectory *gmenu_tree_header_get_directory (GMenuTreeHeader *header);
146 GMenuTree *gmenu_tree_header_get_tree (GMenuTreeHeader *header);
147 GMenuTreeDirectory *gmenu_tree_header_get_parent (GMenuTreeHeader *header);
148
149 GMenuTreeDirectory *gmenu_tree_alias_get_directory (GMenuTreeAlias *alias);
150 GMenuTreeItemType gmenu_tree_alias_get_aliased_item_type (GMenuTreeAlias *alias);
151 GMenuTreeDirectory *gmenu_tree_alias_get_aliased_directory (GMenuTreeAlias *alias);
152 GMenuTreeEntry *gmenu_tree_alias_get_aliased_entry (GMenuTreeAlias *alias);
153 GMenuTree *gmenu_tree_alias_get_tree (GMenuTreeAlias *alias);
154 GMenuTreeDirectory *gmenu_tree_alias_get_parent (GMenuTreeAlias *alias);
155
156 GMenuTree *gmenu_tree_separator_get_tree (GMenuTreeSeparator *separator);
157 GMenuTreeDirectory *gmenu_tree_separator_get_parent (GMenuTreeSeparator *separator);
158
159 G_END_DECLS
160
161 #endif /* __GMENU_TREE_H__ */
0 prefix=@prefix@
1 exec_prefix=@exec_prefix@
2 libdir=@libdir@
3 includedir=@includedir@
4
5 Name: libcinnamon-menu
6 Description: Desktop Menu Specification Implementation
7 Requires: gio-unix-2.0
8 Version: @VERSION@
9 Libs: ${pc_top_builddir}/${pcfiledir}/libcinnamon-menu-3.la
10 Cflags: -I${pc_top_builddir}/${pcfiledir}
0 prefix=@prefix@
1 exec_prefix=@exec_prefix@
2 libdir=@libdir@
3 includedir=@includedir@
4
5 Name: libcinnamon-menu
6 Description: Desktop Menu Specification Implementation
7 Requires: gio-unix-2.0
8 Version: @VERSION@
9 Libs: -L${libdir} -lcinnamon-menu-3
10 Cflags: -I${includedir}/cinnamon-menus-3.0
0 /* Menu layout in-memory data structure (a custom "DOM tree") */
1
2 /*
3 * Copyright (C) 2002 - 2004 Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library 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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21 #include <config.h>
22
23 #include "menu-layout.h"
24
25 #include <string.h>
26 #include <stdio.h>
27 #include <stdlib.h>
28 #include <unistd.h>
29 #include <errno.h>
30
31 #include "canonicalize.h"
32 #include "entry-directories.h"
33 #include "menu-util.h"
34
35 typedef struct MenuLayoutNodeMenu MenuLayoutNodeMenu;
36 typedef struct MenuLayoutNodeRoot MenuLayoutNodeRoot;
37 typedef struct MenuLayoutNodeLegacyDir MenuLayoutNodeLegacyDir;
38 typedef struct MenuLayoutNodeMergeFile MenuLayoutNodeMergeFile;
39 typedef struct MenuLayoutNodeDefaultLayout MenuLayoutNodeDefaultLayout;
40 typedef struct MenuLayoutNodeMenuname MenuLayoutNodeMenuname;
41 typedef struct MenuLayoutNodeMerge MenuLayoutNodeMerge;
42
43 struct MenuLayoutNode
44 {
45 /* Node lists are circular, for length-one lists
46 * prev/next point back to the node itself.
47 */
48 MenuLayoutNode *prev;
49 MenuLayoutNode *next;
50 MenuLayoutNode *parent;
51 MenuLayoutNode *children;
52
53 char *content;
54
55 guint refcount : 20;
56 guint type : 7;
57 };
58
59 struct MenuLayoutNodeRoot
60 {
61 MenuLayoutNode node;
62
63 char *basedir;
64 char *name;
65
66 GMainContext *main_context;
67
68 GSList *monitors;
69 GSource *monitors_idle_handler;
70 };
71
72 struct MenuLayoutNodeMenu
73 {
74 MenuLayoutNode node;
75
76 MenuLayoutNode *name_node; /* cache of the <Name> node */
77
78 EntryDirectoryList *app_dirs;
79 EntryDirectoryList *dir_dirs;
80 };
81
82 struct MenuLayoutNodeLegacyDir
83 {
84 MenuLayoutNode node;
85
86 char *prefix;
87 };
88
89 struct MenuLayoutNodeMergeFile
90 {
91 MenuLayoutNode node;
92
93 MenuMergeFileType type;
94 };
95
96 struct MenuLayoutNodeDefaultLayout
97 {
98 MenuLayoutNode node;
99
100 MenuLayoutValues layout_values;
101 };
102
103 struct MenuLayoutNodeMenuname
104 {
105 MenuLayoutNode node;
106
107 MenuLayoutValues layout_values;
108 };
109
110 struct MenuLayoutNodeMerge
111 {
112 MenuLayoutNode node;
113
114 MenuLayoutMergeType merge_type;
115 };
116
117 typedef struct
118 {
119 MenuLayoutNodeEntriesChangedFunc callback;
120 gpointer user_data;
121 } MenuLayoutNodeEntriesMonitor;
122
123
124 static inline MenuLayoutNode *
125 node_next (MenuLayoutNode *node)
126 {
127 /* root nodes (no parent) never have siblings */
128 if (node->parent == NULL)
129 return NULL;
130
131 /* circular list */
132 if (node->next == node->parent->children)
133 return NULL;
134
135 return node->next;
136 }
137
138 static gboolean
139 menu_layout_invoke_monitors (MenuLayoutNodeRoot *nr)
140 {
141 GSList *tmp;
142
143 g_assert (nr->node.type == MENU_LAYOUT_NODE_ROOT);
144
145 nr->monitors_idle_handler = NULL;
146
147 tmp = nr->monitors;
148 while (tmp != NULL)
149 {
150 MenuLayoutNodeEntriesMonitor *monitor = tmp->data;
151 GSList *next = tmp->next;
152
153 monitor->callback ((MenuLayoutNode *) nr, monitor->user_data);
154
155 tmp = next;
156 }
157
158 return FALSE;
159 }
160
161 static void
162 handle_entry_directory_changed (EntryDirectory *dir,
163 MenuLayoutNode *node)
164 {
165 MenuLayoutNodeRoot *nr;
166
167 g_assert (node->type == MENU_LAYOUT_NODE_MENU);
168
169 nr = (MenuLayoutNodeRoot *) menu_layout_node_get_root (node);
170
171 if (nr->monitors_idle_handler == NULL)
172 {
173 nr->monitors_idle_handler = g_idle_source_new ();
174 g_source_set_callback (nr->monitors_idle_handler,
175 (GSourceFunc) menu_layout_invoke_monitors, nr, NULL);
176 g_source_attach (nr->monitors_idle_handler, nr->main_context);
177 g_source_unref (nr->monitors_idle_handler);
178 }
179 }
180
181 static void
182 remove_entry_directory_list (MenuLayoutNodeMenu *nm,
183 EntryDirectoryList **dirs)
184 {
185 if (*dirs)
186 {
187 entry_directory_list_remove_monitors (*dirs,
188 (EntryDirectoryChangedFunc) handle_entry_directory_changed,
189 nm);
190 entry_directory_list_unref (*dirs);
191 *dirs = NULL;
192 }
193 }
194
195 MenuLayoutNode *
196 menu_layout_node_ref (MenuLayoutNode *node)
197 {
198 g_return_val_if_fail (node != NULL, NULL);
199
200 node->refcount += 1;
201
202 return node;
203 }
204
205 void
206 menu_layout_node_unref (MenuLayoutNode *node)
207 {
208 g_return_if_fail (node != NULL);
209 g_return_if_fail (node->refcount > 0);
210
211 node->refcount -= 1;
212 if (node->refcount == 0)
213 {
214 MenuLayoutNode *iter;
215
216 iter = node->children;
217 while (iter != NULL)
218 {
219 MenuLayoutNode *next = node_next (iter);
220
221 menu_layout_node_unref (iter);
222
223 iter = next;
224 }
225
226 if (node->type == MENU_LAYOUT_NODE_MENU)
227 {
228 MenuLayoutNodeMenu *nm = (MenuLayoutNodeMenu *) node;
229
230 if (nm->name_node)
231 menu_layout_node_unref (nm->name_node);
232
233 remove_entry_directory_list (nm, &nm->app_dirs);
234 remove_entry_directory_list (nm, &nm->dir_dirs);
235 }
236 else if (node->type == MENU_LAYOUT_NODE_LEGACY_DIR)
237 {
238 MenuLayoutNodeLegacyDir *legacy = (MenuLayoutNodeLegacyDir *) node;
239
240 g_free (legacy->prefix);
241 }
242 else if (node->type == MENU_LAYOUT_NODE_ROOT)
243 {
244 MenuLayoutNodeRoot *nr = (MenuLayoutNodeRoot*) node;
245
246 g_slist_foreach (nr->monitors, (GFunc) g_free, NULL);
247 g_slist_free (nr->monitors);
248
249 if (nr->monitors_idle_handler != NULL)
250 g_source_destroy (nr->monitors_idle_handler);
251 nr->monitors_idle_handler = NULL;
252
253 if (nr->main_context != NULL)
254 g_main_context_unref (nr->main_context);
255 nr->main_context = NULL;
256
257 g_free (nr->basedir);
258 g_free (nr->name);
259 }
260
261 g_free (node->content);
262 g_free (node);
263 }
264 }
265
266 MenuLayoutNode *
267 menu_layout_node_new (MenuLayoutNodeType type)
268 {
269 MenuLayoutNode *node;
270
271 switch (type)
272 {
273 case MENU_LAYOUT_NODE_MENU:
274 node = (MenuLayoutNode *) g_new0 (MenuLayoutNodeMenu, 1);
275 break;
276
277 case MENU_LAYOUT_NODE_LEGACY_DIR:
278 node = (MenuLayoutNode *) g_new0 (MenuLayoutNodeLegacyDir, 1);
279 break;
280
281 case MENU_LAYOUT_NODE_ROOT:
282 node = (MenuLayoutNode*) g_new0 (MenuLayoutNodeRoot, 1);
283 break;
284
285 case MENU_LAYOUT_NODE_MERGE_FILE:
286 node = (MenuLayoutNode *) g_new0 (MenuLayoutNodeMergeFile, 1);
287 break;
288
289 case MENU_LAYOUT_NODE_DEFAULT_LAYOUT:
290 node = (MenuLayoutNode *) g_new0 (MenuLayoutNodeDefaultLayout, 1);
291 break;
292
293 case MENU_LAYOUT_NODE_MENUNAME:
294 node = (MenuLayoutNode *) g_new0 (MenuLayoutNodeMenuname, 1);
295 break;
296
297 case MENU_LAYOUT_NODE_MERGE:
298 node = (MenuLayoutNode *) g_new0 (MenuLayoutNodeMerge, 1);
299 break;
300
301 default:
302 node = g_new0 (MenuLayoutNode, 1);
303 break;
304 }
305
306 node->type = type;
307
308 node->refcount = 1;
309
310 /* we're in a list of one node */
311 node->next = node;
312 node->prev = node;
313
314 return node;
315 }
316
317 MenuLayoutNode *
318 menu_layout_node_get_next (MenuLayoutNode *node)
319 {
320 return node_next (node);
321 }
322
323 MenuLayoutNode *
324 menu_layout_node_get_parent (MenuLayoutNode *node)
325 {
326 return node->parent;
327 }
328
329 MenuLayoutNode *
330 menu_layout_node_get_children (MenuLayoutNode *node)
331 {
332 return node->children;
333 }
334
335 MenuLayoutNode *
336 menu_layout_node_get_root (MenuLayoutNode *node)
337 {
338 MenuLayoutNode *parent;
339
340 parent = node;
341 while (parent->parent != NULL)
342 parent = parent->parent;
343
344 g_assert (parent->type == MENU_LAYOUT_NODE_ROOT);
345
346 return parent;
347 }
348
349 char *
350 menu_layout_node_get_content_as_path (MenuLayoutNode *node)
351 {
352 if (node->content == NULL)
353 {
354 menu_verbose (" (node has no content to get as a path)\n");
355 return NULL;
356 }
357
358 if (g_path_is_absolute (node->content))
359 {
360 return g_strdup (node->content);
361 }
362 else
363 {
364 MenuLayoutNodeRoot *root;
365
366 root = (MenuLayoutNodeRoot *) menu_layout_node_get_root (node);
367
368 if (root->basedir == NULL)
369 {
370 menu_verbose ("No basedir available, using \"%s\" as-is\n",
371 node->content);
372 return g_strdup (node->content);
373 }
374 else
375 {
376 menu_verbose ("Using basedir \"%s\" filename \"%s\"\n",
377 root->basedir, node->content);
378 return g_build_filename (root->basedir, node->content, NULL);
379 }
380 }
381 }
382
383 #define RETURN_IF_NO_PARENT(node) G_STMT_START { \
384 if ((node)->parent == NULL) \
385 { \
386 g_warning ("To add siblings to a menu node, " \
387 "it must not be the root node, " \
388 "and must be linked in below some root node\n" \
389 "node parent = %p and type = %d", \
390 (node)->parent, (node)->type); \
391 return; \
392 } \
393 } G_STMT_END
394
395 #define RETURN_IF_HAS_ENTRY_DIRS(node) G_STMT_START { \
396 if ((node)->type == MENU_LAYOUT_NODE_MENU && \
397 (((MenuLayoutNodeMenu*)(node))->app_dirs != NULL || \
398 ((MenuLayoutNodeMenu*)(node))->dir_dirs != NULL)) \
399 { \
400 g_warning ("node acquired ->app_dirs or ->dir_dirs " \
401 "while not rooted in a tree\n"); \
402 return; \
403 } \
404 } G_STMT_END \
405
406 void
407 menu_layout_node_insert_before (MenuLayoutNode *node,
408 MenuLayoutNode *new_sibling)
409 {
410 g_return_if_fail (new_sibling != NULL);
411 g_return_if_fail (new_sibling->parent == NULL);
412
413 RETURN_IF_NO_PARENT (node);
414 RETURN_IF_HAS_ENTRY_DIRS (new_sibling);
415
416 new_sibling->next = node;
417 new_sibling->prev = node->prev;
418
419 node->prev = new_sibling;
420 new_sibling->prev->next = new_sibling;
421
422 new_sibling->parent = node->parent;
423
424 if (node == node->parent->children)
425 node->parent->children = new_sibling;
426
427 menu_layout_node_ref (new_sibling);
428 }
429
430 void
431 menu_layout_node_insert_after (MenuLayoutNode *node,
432 MenuLayoutNode *new_sibling)
433 {
434 g_return_if_fail (new_sibling != NULL);
435 g_return_if_fail (new_sibling->parent == NULL);
436
437 RETURN_IF_NO_PARENT (node);
438 RETURN_IF_HAS_ENTRY_DIRS (new_sibling);
439
440 new_sibling->prev = node;
441 new_sibling->next = node->next;
442
443 node->next = new_sibling;
444 new_sibling->next->prev = new_sibling;
445
446 new_sibling->parent = node->parent;
447
448 menu_layout_node_ref (new_sibling);
449 }
450
451 void
452 menu_layout_node_prepend_child (MenuLayoutNode *parent,
453 MenuLayoutNode *new_child)
454 {
455 RETURN_IF_HAS_ENTRY_DIRS (new_child);
456
457 if (parent->children)
458 {
459 menu_layout_node_insert_before (parent->children, new_child);
460 }
461 else
462 {
463 parent->children = menu_layout_node_ref (new_child);
464 new_child->parent = parent;
465 }
466 }
467
468 void
469 menu_layout_node_append_child (MenuLayoutNode *parent,
470 MenuLayoutNode *new_child)
471 {
472 RETURN_IF_HAS_ENTRY_DIRS (new_child);
473
474 if (parent->children)
475 {
476 menu_layout_node_insert_after (parent->children->prev, new_child);
477 }
478 else
479 {
480 parent->children = menu_layout_node_ref (new_child);
481 new_child->parent = parent;
482 }
483 }
484
485 void
486 menu_layout_node_unlink (MenuLayoutNode *node)
487 {
488 g_return_if_fail (node != NULL);
489 g_return_if_fail (node->parent != NULL);
490
491 menu_layout_node_steal (node);
492 menu_layout_node_unref (node);
493 }
494
495 static void
496 recursive_clean_entry_directory_lists (MenuLayoutNode *node,
497 gboolean apps)
498 {
499 EntryDirectoryList **dirs;
500 MenuLayoutNodeMenu *nm;
501 MenuLayoutNode *iter;
502
503 if (node->type != MENU_LAYOUT_NODE_MENU)
504 return;
505
506 nm = (MenuLayoutNodeMenu *) node;
507
508 dirs = apps ? &nm->app_dirs : &nm->dir_dirs;
509
510 if (*dirs == NULL || entry_directory_list_get_length (*dirs) == 0)
511 return; /* child menus continue to have valid lists */
512
513 remove_entry_directory_list (nm, dirs);
514
515 iter = node->children;
516 while (iter != NULL)
517 {
518 if (iter->type == MENU_LAYOUT_NODE_MENU)
519 recursive_clean_entry_directory_lists (iter, apps);
520
521 iter = node_next (iter);
522 }
523 }
524
525 void
526 menu_layout_node_steal (MenuLayoutNode *node)
527 {
528 g_return_if_fail (node != NULL);
529 g_return_if_fail (node->parent != NULL);
530
531 switch (node->type)
532 {
533 case MENU_LAYOUT_NODE_NAME:
534 {
535 MenuLayoutNodeMenu *nm = (MenuLayoutNodeMenu *) node->parent;
536
537 if (nm->name_node == node)
538 {
539 menu_layout_node_unref (nm->name_node);
540 nm->name_node = NULL;
541 }
542 }
543 break;
544
545 case MENU_LAYOUT_NODE_APP_DIR:
546 recursive_clean_entry_directory_lists (node->parent, TRUE);
547 break;
548
549 case MENU_LAYOUT_NODE_DIRECTORY_DIR:
550 recursive_clean_entry_directory_lists (node->parent, FALSE);
551 break;
552
553 default:
554 break;
555 }
556
557 if (node->parent && node->parent->children == node)
558 {
559 if (node->next != node)
560 node->parent->children = node->next;
561 else
562 node->parent->children = NULL;
563 }
564
565 /* these are no-ops for length-one node lists */
566 node->prev->next = node->next;
567 node->next->prev = node->prev;
568
569 node->parent = NULL;
570
571 /* point to ourselves, now we're length one */
572 node->next = node;
573 node->prev = node;
574 }
575
576 MenuLayoutNodeType
577 menu_layout_node_get_type (MenuLayoutNode *node)
578 {
579 return node->type;
580 }
581
582 const char *
583 menu_layout_node_get_content (MenuLayoutNode *node)
584 {
585 return node->content;
586 }
587
588 void
589 menu_layout_node_set_content (MenuLayoutNode *node,
590 const char *content)
591 {
592 if (node->content == content)
593 return;
594
595 g_free (node->content);
596 node->content = g_strdup (content);
597 }
598
599 const char *
600 menu_layout_node_root_get_name (MenuLayoutNode *node)
601 {
602 MenuLayoutNodeRoot *nr;
603
604 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_ROOT, NULL);
605
606 nr = (MenuLayoutNodeRoot*) node;
607
608 return nr->name;
609 }
610
611 const char *
612 menu_layout_node_root_get_basedir (MenuLayoutNode *node)
613 {
614 MenuLayoutNodeRoot *nr;
615
616 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_ROOT, NULL);
617
618 nr = (MenuLayoutNodeRoot*) node;
619
620 return nr->basedir;
621 }
622
623 const char *
624 menu_layout_node_menu_get_name (MenuLayoutNode *node)
625 {
626 MenuLayoutNodeMenu *nm;
627
628 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_MENU, NULL);
629
630 nm = (MenuLayoutNodeMenu*) node;
631
632 if (nm->name_node == NULL)
633 {
634 MenuLayoutNode *iter;
635
636 iter = node->children;
637 while (iter != NULL)
638 {
639 if (iter->type == MENU_LAYOUT_NODE_NAME)
640 {
641 nm->name_node = menu_layout_node_ref (iter);
642 break;
643 }
644
645 iter = node_next (iter);
646 }
647 }
648
649 if (nm->name_node == NULL)
650 return NULL;
651
652 return menu_layout_node_get_content (nm->name_node);
653 }
654
655 static void
656 ensure_dir_lists (MenuLayoutNodeMenu *nm)
657 {
658 MenuLayoutNode *node;
659 MenuLayoutNode *iter;
660 EntryDirectoryList *app_dirs;
661 EntryDirectoryList *dir_dirs;
662
663 node = (MenuLayoutNode *) nm;
664
665 if (nm->app_dirs && nm->dir_dirs)
666 return;
667
668 app_dirs = NULL;
669 dir_dirs = NULL;
670
671 if (nm->app_dirs == NULL)
672 {
673 app_dirs = entry_directory_list_new ();
674
675 if (node->parent && node->parent->type == MENU_LAYOUT_NODE_MENU)
676 {
677 EntryDirectoryList *dirs;
678
679 if ((dirs = menu_layout_node_menu_get_app_dirs (node->parent)))
680 entry_directory_list_append_list (app_dirs, dirs);
681 }
682 }
683
684 if (nm->dir_dirs == NULL)
685 {
686 dir_dirs = entry_directory_list_new ();
687
688 if (node->parent && node->parent->type == MENU_LAYOUT_NODE_MENU)
689 {
690 EntryDirectoryList *dirs;
691
692 if ((dirs = menu_layout_node_menu_get_directory_dirs (node->parent)))
693 entry_directory_list_append_list (dir_dirs, dirs);
694 }
695 }
696
697 iter = node->children;
698 while (iter != NULL)
699 {
700 EntryDirectory *ed;
701
702 if (app_dirs != NULL && iter->type == MENU_LAYOUT_NODE_APP_DIR)
703 {
704 char *path;
705
706 path = menu_layout_node_get_content_as_path (iter);
707
708 ed = entry_directory_new (DESKTOP_ENTRY_DESKTOP, path);
709 if (ed != NULL)
710 {
711 entry_directory_list_prepend (app_dirs, ed);
712 entry_directory_unref (ed);
713 }
714
715 g_free (path);
716 }
717
718 if (dir_dirs != NULL && iter->type == MENU_LAYOUT_NODE_DIRECTORY_DIR)
719 {
720 char *path;
721
722 path = menu_layout_node_get_content_as_path (iter);
723
724 ed = entry_directory_new (DESKTOP_ENTRY_DIRECTORY, path);
725 if (ed != NULL)
726 {
727 entry_directory_list_prepend (dir_dirs, ed);
728 entry_directory_unref (ed);
729 }
730
731 g_free (path);
732 }
733
734 if (iter->type == MENU_LAYOUT_NODE_LEGACY_DIR)
735 {
736 MenuLayoutNodeLegacyDir *legacy = (MenuLayoutNodeLegacyDir *) iter;
737 char *path;
738
739 path = menu_layout_node_get_content_as_path (iter);
740
741 if (app_dirs != NULL) /* we're loading app dirs */
742 {
743 ed = entry_directory_new_legacy (DESKTOP_ENTRY_DESKTOP,
744 path,
745 legacy->prefix);
746 if (ed != NULL)
747 {
748 entry_directory_list_prepend (app_dirs, ed);
749 entry_directory_unref (ed);
750 }
751 }
752
753 if (dir_dirs != NULL) /* we're loading dir dirs */
754 {
755 ed = entry_directory_new_legacy (DESKTOP_ENTRY_DIRECTORY,
756 path,
757 legacy->prefix);
758 if (ed != NULL)
759 {
760 entry_directory_list_prepend (dir_dirs, ed);
761 entry_directory_unref (ed);
762 }
763 }
764
765 g_free (path);
766 }
767
768 iter = node_next (iter);
769 }
770
771 if (app_dirs)
772 {
773 g_assert (nm->app_dirs == NULL);
774
775 nm->app_dirs = app_dirs;
776 entry_directory_list_add_monitors (nm->app_dirs,
777 (EntryDirectoryChangedFunc) handle_entry_directory_changed,
778 nm);
779 }
780
781 if (dir_dirs)
782 {
783 g_assert (nm->dir_dirs == NULL);
784
785 nm->dir_dirs = dir_dirs;
786 entry_directory_list_add_monitors (nm->dir_dirs,
787 (EntryDirectoryChangedFunc) handle_entry_directory_changed,
788 nm);
789 }
790 }
791
792 EntryDirectoryList *
793 menu_layout_node_menu_get_app_dirs (MenuLayoutNode *node)
794 {
795 MenuLayoutNodeMenu *nm;
796
797 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_MENU, NULL);
798
799 nm = (MenuLayoutNodeMenu *) node;
800
801 ensure_dir_lists (nm);
802
803 return nm->app_dirs;
804 }
805
806 EntryDirectoryList *
807 menu_layout_node_menu_get_directory_dirs (MenuLayoutNode *node)
808 {
809 MenuLayoutNodeMenu *nm;
810
811 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_MENU, NULL);
812
813 nm = (MenuLayoutNodeMenu *) node;
814
815 ensure_dir_lists (nm);
816
817 return nm->dir_dirs;
818 }
819
820 const char *
821 menu_layout_node_move_get_old (MenuLayoutNode *node)
822 {
823 MenuLayoutNode *iter;
824
825 iter = node->children;
826 while (iter != NULL)
827 {
828 if (iter->type == MENU_LAYOUT_NODE_OLD)
829 return iter->content;
830
831 iter = node_next (iter);
832 }
833
834 return NULL;
835 }
836
837 const char *
838 menu_layout_node_move_get_new (MenuLayoutNode *node)
839 {
840 MenuLayoutNode *iter;
841
842 iter = node->children;
843 while (iter != NULL)
844 {
845 if (iter->type == MENU_LAYOUT_NODE_NEW)
846 return iter->content;
847
848 iter = node_next (iter);
849 }
850
851 return NULL;
852 }
853
854 const char *
855 menu_layout_node_legacy_dir_get_prefix (MenuLayoutNode *node)
856 {
857 MenuLayoutNodeLegacyDir *legacy;
858
859 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_LEGACY_DIR, NULL);
860
861 legacy = (MenuLayoutNodeLegacyDir *) node;
862
863 return legacy->prefix;
864 }
865
866 void
867 menu_layout_node_legacy_dir_set_prefix (MenuLayoutNode *node,
868 const char *prefix)
869 {
870 MenuLayoutNodeLegacyDir *legacy;
871
872 g_return_if_fail (node->type == MENU_LAYOUT_NODE_LEGACY_DIR);
873
874 legacy = (MenuLayoutNodeLegacyDir *) node;
875
876 g_free (legacy->prefix);
877 legacy->prefix = g_strdup (prefix);
878 }
879
880 MenuMergeFileType
881 menu_layout_node_merge_file_get_type (MenuLayoutNode *node)
882 {
883 MenuLayoutNodeMergeFile *merge_file;
884
885 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_MERGE_FILE, FALSE);
886
887 merge_file = (MenuLayoutNodeMergeFile *) node;
888
889 return merge_file->type;
890 }
891
892 void
893 menu_layout_node_merge_file_set_type (MenuLayoutNode *node,
894 MenuMergeFileType type)
895 {
896 MenuLayoutNodeMergeFile *merge_file;
897
898 g_return_if_fail (node->type == MENU_LAYOUT_NODE_MERGE_FILE);
899
900 merge_file = (MenuLayoutNodeMergeFile *) node;
901
902 merge_file->type = type;
903 }
904
905 MenuLayoutMergeType
906 menu_layout_node_merge_get_type (MenuLayoutNode *node)
907 {
908 MenuLayoutNodeMerge *merge;
909
910 g_return_val_if_fail (node->type == MENU_LAYOUT_NODE_MERGE, 0);
911
912 merge = (MenuLayoutNodeMerge *) node;
913
914 return merge->merge_type;
915 }
916
917 static void
918 menu_layout_node_merge_set_type (MenuLayoutNode *node,
919 const char *merge_type)
920 {
921 MenuLayoutNodeMerge *merge;
922
923 g_return_if_fail (node->type == MENU_LAYOUT_NODE_MERGE);
924
925 merge = (MenuLayoutNodeMerge *) node;
926
927 merge->merge_type = MENU_LAYOUT_MERGE_NONE;
928
929 if (strcmp (merge_type, "menus") == 0)
930 {
931 merge->merge_type = MENU_LAYOUT_MERGE_MENUS;
932 }
933 else if (strcmp (merge_type, "files") == 0)
934 {
935 merge->merge_type = MENU_LAYOUT_MERGE_FILES;
936 }
937 else if (strcmp (merge_type, "all") == 0)
938 {
939 merge->merge_type = MENU_LAYOUT_MERGE_ALL;
940 }
941 }
942
943 void
944 menu_layout_node_default_layout_get_values (MenuLayoutNode *node,
945 MenuLayoutValues *values)
946 {
947 MenuLayoutNodeDefaultLayout *default_layout;
948
949 g_return_if_fail (node->type == MENU_LAYOUT_NODE_DEFAULT_LAYOUT);
950 g_return_if_fail (values != NULL);
951
952 default_layout = (MenuLayoutNodeDefaultLayout *) node;
953
954 *values = default_layout->layout_values;
955 }
956
957 void
958 menu_layout_node_menuname_get_values (MenuLayoutNode *node,
959 MenuLayoutValues *values)
960 {
961 MenuLayoutNodeMenuname *menuname;
962
963 g_return_if_fail (node->type == MENU_LAYOUT_NODE_MENUNAME);
964 g_return_if_fail (values != NULL);
965
966 menuname = (MenuLayoutNodeMenuname *) node;
967
968 *values = menuname->layout_values;
969 }
970
971 static void
972 menu_layout_values_set (MenuLayoutValues *values,
973 const char *show_empty,
974 const char *inline_menus,
975 const char *inline_limit,
976 const char *inline_header,
977 const char *inline_alias)
978 {
979 values->mask = MENU_LAYOUT_VALUES_NONE;
980 values->show_empty = FALSE;
981 values->inline_menus = FALSE;
982 values->inline_limit = 4;
983 values->inline_header = FALSE;
984 values->inline_alias = FALSE;
985
986 if (show_empty != NULL)
987 {
988 values->show_empty = strcmp (show_empty, "true") == 0;
989 values->mask |= MENU_LAYOUT_VALUES_SHOW_EMPTY;
990 }
991
992 if (inline_menus != NULL)
993 {
994 values->inline_menus = strcmp (inline_menus, "true") == 0;
995 values->mask |= MENU_LAYOUT_VALUES_INLINE_MENUS;
996 }
997
998 if (inline_limit != NULL)
999 {
1000 char *end;
1001 int limit;
1002
1003 limit = strtol (inline_limit, &end, 10);
1004 if (*end == '\0')
1005 {
1006 values->inline_limit = limit;
1007 values->mask |= MENU_LAYOUT_VALUES_INLINE_LIMIT;
1008 }
1009 }
1010
1011 if (inline_header != NULL)
1012 {
1013 values->inline_header = strcmp (inline_header, "true") == 0;
1014 values->mask |= MENU_LAYOUT_VALUES_INLINE_HEADER;
1015 }
1016
1017 if (inline_alias != NULL)
1018 {
1019 values->inline_alias = strcmp (inline_alias, "true") == 0;
1020 values->mask |= MENU_LAYOUT_VALUES_INLINE_ALIAS;
1021 }
1022 }
1023
1024 static void
1025 menu_layout_node_default_layout_set_values (MenuLayoutNode *node,
1026 const char *show_empty,
1027 const char *inline_menus,
1028 const char *inline_limit,
1029 const char *inline_header,
1030 const char *inline_alias)
1031 {
1032 MenuLayoutNodeDefaultLayout *default_layout;
1033
1034 g_return_if_fail (node->type == MENU_LAYOUT_NODE_DEFAULT_LAYOUT);
1035
1036 default_layout = (MenuLayoutNodeDefaultLayout *) node;
1037
1038 menu_layout_values_set (&default_layout->layout_values,
1039 show_empty,
1040 inline_menus,
1041 inline_limit,
1042 inline_header,
1043 inline_alias);
1044 }
1045
1046 static void
1047 menu_layout_node_menuname_set_values (MenuLayoutNode *node,
1048 const char *show_empty,
1049 const char *inline_menus,
1050 const char *inline_limit,
1051 const char *inline_header,
1052 const char *inline_alias)
1053 {
1054 MenuLayoutNodeMenuname *menuname;
1055
1056 g_return_if_fail (node->type == MENU_LAYOUT_NODE_MENUNAME);
1057
1058 menuname = (MenuLayoutNodeMenuname *) node;
1059
1060 menu_layout_values_set (&menuname->layout_values,
1061 show_empty,
1062 inline_menus,
1063 inline_limit,
1064 inline_header,
1065 inline_alias);
1066 }
1067
1068 void
1069 menu_layout_node_root_add_entries_monitor (MenuLayoutNode *node,
1070 MenuLayoutNodeEntriesChangedFunc callback,
1071 gpointer user_data)
1072 {
1073 MenuLayoutNodeEntriesMonitor *monitor;
1074 MenuLayoutNodeRoot *nr;
1075 GSList *tmp;
1076
1077 g_return_if_fail (node->type == MENU_LAYOUT_NODE_ROOT);
1078
1079 nr = (MenuLayoutNodeRoot *) node;
1080
1081 tmp = nr->monitors;
1082 while (tmp != NULL)
1083 {
1084 monitor = tmp->data;
1085
1086 if (monitor->callback == callback &&
1087 monitor->user_data == user_data)
1088 break;
1089
1090 tmp = tmp->next;
1091 }
1092
1093 if (tmp == NULL)
1094 {
1095 monitor = g_new0 (MenuLayoutNodeEntriesMonitor, 1);
1096 monitor->callback = callback;
1097 monitor->user_data = user_data;
1098
1099 nr->monitors = g_slist_append (nr->monitors, monitor);
1100 }
1101 }
1102
1103 void
1104 menu_layout_node_root_remove_entries_monitor (MenuLayoutNode *node,
1105 MenuLayoutNodeEntriesChangedFunc callback,
1106 gpointer user_data)
1107 {
1108 MenuLayoutNodeRoot *nr;
1109 GSList *tmp;
1110
1111 g_return_if_fail (node->type == MENU_LAYOUT_NODE_ROOT);
1112
1113 nr = (MenuLayoutNodeRoot *) node;
1114
1115 tmp = nr->monitors;
1116 while (tmp != NULL)
1117 {
1118 MenuLayoutNodeEntriesMonitor *monitor = tmp->data;
1119 GSList *next = tmp->next;
1120
1121 if (monitor->callback == callback &&
1122 monitor->user_data == user_data)
1123 {
1124 nr->monitors = g_slist_delete_link (nr->monitors, tmp);
1125 g_free (monitor);
1126 }
1127
1128 tmp = next;
1129 }
1130 }
1131
1132
1133 /*
1134 * Menu file parsing
1135 */
1136
1137 typedef struct
1138 {
1139 MenuLayoutNode *root;
1140 MenuLayoutNode *stack_top;
1141 } MenuParser;
1142
1143 static void set_error (GError **err,
1144 GMarkupParseContext *context,
1145 int error_domain,
1146 int error_code,
1147 const char *format,
1148 ...) G_GNUC_PRINTF (5, 6);
1149
1150 static void add_context_to_error (GError **err,
1151 GMarkupParseContext *context);
1152
1153 static void start_element_handler (GMarkupParseContext *context,
1154 const char *element_name,
1155 const char **attribute_names,
1156 const char **attribute_values,
1157 gpointer user_data,
1158 GError **error);
1159 static void end_element_handler (GMarkupParseContext *context,
1160 const char *element_name,
1161 gpointer user_data,
1162 GError **error);
1163 static void text_handler (GMarkupParseContext *context,
1164 const char *text,
1165 gsize text_len,
1166 gpointer user_data,
1167 GError **error);
1168 static void passthrough_handler (GMarkupParseContext *context,
1169 const char *passthrough_text,
1170 gsize text_len,
1171 gpointer user_data,
1172 GError **error);
1173
1174
1175 static GMarkupParser menu_funcs = {
1176 start_element_handler,
1177 end_element_handler,
1178 text_handler,
1179 passthrough_handler,
1180 NULL
1181 };
1182
1183 static void
1184 set_error (GError **err,
1185 GMarkupParseContext *context,
1186 int error_domain,
1187 int error_code,
1188 const char *format,
1189 ...)
1190 {
1191 int line, ch;
1192 va_list args;
1193 char *str;
1194
1195 g_markup_parse_context_get_position (context, &line, &ch);
1196
1197 va_start (args, format);
1198 str = g_strdup_vprintf (format, args);
1199 va_end (args);
1200
1201 g_set_error (err, error_domain, error_code,
1202 "Line %d character %d: %s",
1203 line, ch, str);
1204
1205 g_free (str);
1206 }
1207
1208 static void
1209 add_context_to_error (GError **err,
1210 GMarkupParseContext *context)
1211 {
1212 int line, ch;
1213 char *str;
1214
1215 if (err == NULL || *err == NULL)
1216 return;
1217
1218 g_markup_parse_context_get_position (context, &line, &ch);
1219
1220 str = g_strdup_printf ("Line %d character %d: %s",
1221 line, ch, (*err)->message);
1222 g_free ((*err)->message);
1223 (*err)->message = str;
1224 }
1225
1226 #define ELEMENT_IS(name) (strcmp (element_name, (name)) == 0)
1227
1228 typedef struct
1229 {
1230 const char *name;
1231 const char **retloc;
1232 } LocateAttr;
1233
1234 static gboolean
1235 locate_attributes (GMarkupParseContext *context,
1236 const char *element_name,
1237 const char **attribute_names,
1238 const char **attribute_values,
1239 GError **error,
1240 const char *first_attribute_name,
1241 const char **first_attribute_retloc,
1242 ...)
1243 {
1244 #define MAX_ATTRS 24
1245 LocateAttr attrs[MAX_ATTRS];
1246 int n_attrs;
1247 va_list args;
1248 const char *name;
1249 const char **retloc;
1250 gboolean retval;
1251 int i;
1252
1253 g_return_val_if_fail (first_attribute_name != NULL, FALSE);
1254 g_return_val_if_fail (first_attribute_retloc != NULL, FALSE);
1255
1256 retval = TRUE;
1257
1258 n_attrs = 1;
1259 attrs[0].name = first_attribute_name;
1260 attrs[0].retloc = first_attribute_retloc;
1261 *first_attribute_retloc = NULL;
1262
1263 va_start (args, first_attribute_retloc);
1264
1265 name = va_arg (args, const char *);
1266 retloc = va_arg (args, const char **);
1267
1268 while (name != NULL)
1269 {
1270 g_return_val_if_fail (retloc != NULL, FALSE);
1271
1272 g_assert (n_attrs < MAX_ATTRS);
1273
1274 attrs[n_attrs].name = name;
1275 attrs[n_attrs].retloc = retloc;
1276 n_attrs += 1;
1277 *retloc = NULL;
1278
1279 name = va_arg (args, const char *);
1280 retloc = va_arg (args, const char **);
1281 }
1282
1283 va_end (args);
1284
1285 i = 0;
1286 while (attribute_names[i])
1287 {
1288 int j;
1289
1290 j = 0;
1291 while (j < n_attrs)
1292 {
1293 if (strcmp (attrs[j].name, attribute_names[i]) == 0)
1294 {
1295 retloc = attrs[j].retloc;
1296
1297 if (*retloc != NULL)
1298 {
1299 set_error (error, context,
1300 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1301 "Attribute \"%s\" repeated twice on the same <%s> element",
1302 attrs[j].name, element_name);
1303 retval = FALSE;
1304 goto out;
1305 }
1306
1307 *retloc = attribute_values[i];
1308 break;
1309 }
1310
1311 ++j;
1312 }
1313
1314 if (j == n_attrs)
1315 {
1316 set_error (error, context,
1317 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1318 "Attribute \"%s\" is invalid on <%s> element in this context",
1319 attribute_names[i], element_name);
1320 retval = FALSE;
1321 goto out;
1322 }
1323
1324 ++i;
1325 }
1326
1327 out:
1328 return retval;
1329
1330 #undef MAX_ATTRS
1331 }
1332
1333 static gboolean
1334 check_no_attributes (GMarkupParseContext *context,
1335 const char *element_name,
1336 const char **attribute_names,
1337 const char **attribute_values,
1338 GError **error)
1339 {
1340 if (attribute_names[0] != NULL)
1341 {
1342 set_error (error, context,
1343 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1344 "Attribute \"%s\" is invalid on <%s> element in this context",
1345 attribute_names[0], element_name);
1346 return FALSE;
1347 }
1348
1349 return TRUE;
1350 }
1351
1352 static int
1353 has_child_of_type (MenuLayoutNode *node,
1354 MenuLayoutNodeType type)
1355 {
1356 MenuLayoutNode *iter;
1357
1358 iter = node->children;
1359 while (iter)
1360 {
1361 if (iter->type == type)
1362 return TRUE;
1363
1364 iter = node_next (iter);
1365 }
1366
1367 return FALSE;
1368 }
1369
1370 static void
1371 push_node (MenuParser *parser,
1372 MenuLayoutNodeType type)
1373 {
1374 MenuLayoutNode *node;
1375
1376 node = menu_layout_node_new (type);
1377 menu_layout_node_append_child (parser->stack_top, node);
1378 menu_layout_node_unref (node);
1379
1380 parser->stack_top = node;
1381 }
1382
1383 static void
1384 start_menu_element (MenuParser *parser,
1385 GMarkupParseContext *context,
1386 const char *element_name,
1387 const char **attribute_names,
1388 const char **attribute_values,
1389 GError **error)
1390 {
1391 if (!check_no_attributes (context, element_name,
1392 attribute_names, attribute_values,
1393 error))
1394 return;
1395
1396 if (!(parser->stack_top->type == MENU_LAYOUT_NODE_ROOT ||
1397 parser->stack_top->type == MENU_LAYOUT_NODE_MENU))
1398 {
1399 set_error (error, context,
1400 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1401 "<Menu> element can only appear below other <Menu> elements or at toplevel\n");
1402 }
1403 else
1404 {
1405 push_node (parser, MENU_LAYOUT_NODE_MENU);
1406 }
1407 }
1408
1409 static void
1410 start_menu_child_element (MenuParser *parser,
1411 GMarkupParseContext *context,
1412 const char *element_name,
1413 const char **attribute_names,
1414 const char **attribute_values,
1415 GError **error)
1416 {
1417 if (ELEMENT_IS ("LegacyDir"))
1418 {
1419 const char *prefix;
1420
1421 push_node (parser, MENU_LAYOUT_NODE_LEGACY_DIR);
1422
1423 if (!locate_attributes (context, element_name,
1424 attribute_names, attribute_values,
1425 error,
1426 "prefix", &prefix,
1427 NULL))
1428 return;
1429
1430 menu_layout_node_legacy_dir_set_prefix (parser->stack_top, prefix);
1431 }
1432 else if (ELEMENT_IS ("MergeFile"))
1433 {
1434 const char *type;
1435
1436 push_node (parser, MENU_LAYOUT_NODE_MERGE_FILE);
1437
1438 if (!locate_attributes (context, element_name,
1439 attribute_names, attribute_values,
1440 error,
1441 "type", &type,
1442 NULL))
1443 return;
1444
1445 if (type != NULL && strcmp (type, "parent") == 0)
1446 {
1447 menu_layout_node_merge_file_set_type (parser->stack_top,
1448 MENU_MERGE_FILE_TYPE_PARENT);
1449 }
1450 }
1451 else if (ELEMENT_IS ("DefaultLayout"))
1452 {
1453 const char *show_empty;
1454 const char *inline_menus;
1455 const char *inline_limit;
1456 const char *inline_header;
1457 const char *inline_alias;
1458
1459 push_node (parser, MENU_LAYOUT_NODE_DEFAULT_LAYOUT);
1460
1461 locate_attributes (context, element_name,
1462 attribute_names, attribute_values,
1463 error,
1464 "show_empty", &show_empty,
1465 "inline", &inline_menus,
1466 "inline_limit", &inline_limit,
1467 "inline_header", &inline_header,
1468 "inline_alias", &inline_alias,
1469 NULL);
1470
1471 menu_layout_node_default_layout_set_values (parser->stack_top,
1472 show_empty,
1473 inline_menus,
1474 inline_limit,
1475 inline_header,
1476 inline_alias);
1477 }
1478 else
1479 {
1480 if (!check_no_attributes (context, element_name,
1481 attribute_names, attribute_values,
1482 error))
1483 return;
1484
1485 if (ELEMENT_IS ("AppDir"))
1486 {
1487 push_node (parser, MENU_LAYOUT_NODE_APP_DIR);
1488 }
1489 else if (ELEMENT_IS ("DefaultAppDirs"))
1490 {
1491 push_node (parser, MENU_LAYOUT_NODE_DEFAULT_APP_DIRS);
1492 }
1493 else if (ELEMENT_IS ("DirectoryDir"))
1494 {
1495 push_node (parser, MENU_LAYOUT_NODE_DIRECTORY_DIR);
1496 }
1497 else if (ELEMENT_IS ("DefaultDirectoryDirs"))
1498 {
1499 push_node (parser, MENU_LAYOUT_NODE_DEFAULT_DIRECTORY_DIRS);
1500 }
1501 else if (ELEMENT_IS ("DefaultMergeDirs"))
1502 {
1503 push_node (parser, MENU_LAYOUT_NODE_DEFAULT_MERGE_DIRS);
1504 }
1505 else if (ELEMENT_IS ("Name"))
1506 {
1507 if (has_child_of_type (parser->stack_top, MENU_LAYOUT_NODE_NAME))
1508 {
1509 set_error (error, context,
1510 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1511 "Multiple <Name> elements in a <Menu> element is not allowed\n");
1512 return;
1513 }
1514
1515 push_node (parser, MENU_LAYOUT_NODE_NAME);
1516 }
1517 else if (ELEMENT_IS ("Directory"))
1518 {
1519 push_node (parser, MENU_LAYOUT_NODE_DIRECTORY);
1520 }
1521 else if (ELEMENT_IS ("OnlyUnallocated"))
1522 {
1523 push_node (parser, MENU_LAYOUT_NODE_ONLY_UNALLOCATED);
1524 }
1525 else if (ELEMENT_IS ("NotOnlyUnallocated"))
1526 {
1527 push_node (parser, MENU_LAYOUT_NODE_NOT_ONLY_UNALLOCATED);
1528 }
1529 else if (ELEMENT_IS ("Include"))
1530 {
1531 push_node (parser, MENU_LAYOUT_NODE_INCLUDE);
1532 }
1533 else if (ELEMENT_IS ("Exclude"))
1534 {
1535 push_node (parser, MENU_LAYOUT_NODE_EXCLUDE);
1536 }
1537 else if (ELEMENT_IS ("MergeDir"))
1538 {
1539 push_node (parser, MENU_LAYOUT_NODE_MERGE_DIR);
1540 }
1541 else if (ELEMENT_IS ("KDELegacyDirs"))
1542 {
1543 push_node (parser, MENU_LAYOUT_NODE_KDE_LEGACY_DIRS);
1544 }
1545 else if (ELEMENT_IS ("Move"))
1546 {
1547 push_node (parser, MENU_LAYOUT_NODE_MOVE);
1548 }
1549 else if (ELEMENT_IS ("Deleted"))
1550 {
1551 push_node (parser, MENU_LAYOUT_NODE_DELETED);
1552
1553 }
1554 else if (ELEMENT_IS ("NotDeleted"))
1555 {
1556 push_node (parser, MENU_LAYOUT_NODE_NOT_DELETED);
1557 }
1558 else if (ELEMENT_IS ("Layout"))
1559 {
1560 push_node (parser, MENU_LAYOUT_NODE_LAYOUT);
1561 }
1562 else
1563 {
1564 set_error (error, context,
1565 G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
1566 "Element <%s> may not appear below <%s>\n",
1567 element_name, "Menu");
1568 }
1569 }
1570 }
1571
1572 static void
1573 start_matching_rule_element (MenuParser *parser,
1574 GMarkupParseContext *context,
1575 const char *element_name,
1576 const char **attribute_names,
1577 const char **attribute_values,
1578 GError **error)
1579 {
1580 if (!check_no_attributes (context, element_name,
1581 attribute_names, attribute_values,
1582 error))
1583 return;
1584
1585
1586 if (ELEMENT_IS ("Filename"))
1587 {
1588 push_node (parser, MENU_LAYOUT_NODE_FILENAME);
1589 }
1590 else if (ELEMENT_IS ("Category"))
1591 {
1592 push_node (parser, MENU_LAYOUT_NODE_CATEGORY);
1593 }
1594 else if (ELEMENT_IS ("All"))
1595 {
1596 push_node (parser, MENU_LAYOUT_NODE_ALL);
1597 }
1598 else if (ELEMENT_IS ("And"))
1599 {
1600 push_node (parser, MENU_LAYOUT_NODE_AND);
1601 }
1602 else if (ELEMENT_IS ("Or"))
1603 {
1604 push_node (parser, MENU_LAYOUT_NODE_OR);
1605 }
1606 else if (ELEMENT_IS ("Not"))
1607 {
1608 push_node (parser, MENU_LAYOUT_NODE_NOT);
1609 }
1610 else
1611 {
1612 set_error (error, context,
1613 G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
1614 "Element <%s> may not appear in this context\n",
1615 element_name);
1616 }
1617 }
1618
1619 static void
1620 start_move_child_element (MenuParser *parser,
1621 GMarkupParseContext *context,
1622 const char *element_name,
1623 const char **attribute_names,
1624 const char **attribute_values,
1625 GError **error)
1626 {
1627 if (!check_no_attributes (context, element_name,
1628 attribute_names, attribute_values,
1629 error))
1630 return;
1631
1632 if (ELEMENT_IS ("Old"))
1633 {
1634 push_node (parser, MENU_LAYOUT_NODE_OLD);
1635 }
1636 else if (ELEMENT_IS ("New"))
1637 {
1638 push_node (parser, MENU_LAYOUT_NODE_NEW);
1639 }
1640 else
1641 {
1642 set_error (error, context,
1643 G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
1644 "Element <%s> may not appear below <%s>\n",
1645 element_name, "Move");
1646 }
1647 }
1648
1649 static void
1650 start_layout_child_element (MenuParser *parser,
1651 GMarkupParseContext *context,
1652 const char *element_name,
1653 const char **attribute_names,
1654 const char **attribute_values,
1655 GError **error)
1656 {
1657 if (ELEMENT_IS ("Menuname"))
1658 {
1659 const char *show_empty;
1660 const char *inline_menus;
1661 const char *inline_limit;
1662 const char *inline_header;
1663 const char *inline_alias;
1664
1665 push_node (parser, MENU_LAYOUT_NODE_MENUNAME);
1666
1667 locate_attributes (context, element_name,
1668 attribute_names, attribute_values,
1669 error,
1670 "show_empty", &show_empty,
1671 "inline", &inline_menus,
1672 "inline_limit", &inline_limit,
1673 "inline_header", &inline_header,
1674 "inline_alias", &inline_alias,
1675 NULL);
1676
1677 menu_layout_node_menuname_set_values (parser->stack_top,
1678 show_empty,
1679 inline_menus,
1680 inline_limit,
1681 inline_header,
1682 inline_alias);
1683 }
1684 else if (ELEMENT_IS ("Merge"))
1685 {
1686 const char *type;
1687
1688 push_node (parser, MENU_LAYOUT_NODE_MERGE);
1689
1690 locate_attributes (context, element_name,
1691 attribute_names, attribute_values,
1692 error,
1693 "type", &type,
1694 NULL);
1695
1696 menu_layout_node_merge_set_type (parser->stack_top, type);
1697 }
1698 else
1699 {
1700 if (!check_no_attributes (context, element_name,
1701 attribute_names, attribute_values,
1702 error))
1703 return;
1704
1705 if (ELEMENT_IS ("Filename"))
1706 {
1707 push_node (parser, MENU_LAYOUT_NODE_FILENAME);
1708 }
1709 else if (ELEMENT_IS ("Separator"))
1710 {
1711 push_node (parser, MENU_LAYOUT_NODE_SEPARATOR);
1712 }
1713 else
1714 {
1715 set_error (error, context,
1716 G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
1717 "Element <%s> may not appear below <%s>\n",
1718 element_name, "Move");
1719 }
1720 }
1721 }
1722
1723 static void
1724 start_element_handler (GMarkupParseContext *context,
1725 const char *element_name,
1726 const char **attribute_names,
1727 const char **attribute_values,
1728 gpointer user_data,
1729 GError **error)
1730 {
1731 MenuParser *parser = user_data;
1732
1733 if (ELEMENT_IS ("Menu"))
1734 {
1735 if (parser->stack_top == parser->root &&
1736 has_child_of_type (parser->root, MENU_LAYOUT_NODE_MENU))
1737 {
1738 set_error (error, context,
1739 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1740 "Multiple root elements in menu file, only one toplevel <Menu> is allowed\n");
1741 return;
1742 }
1743
1744 start_menu_element (parser, context, element_name,
1745 attribute_names, attribute_values,
1746 error);
1747 }
1748 else if (parser->stack_top == parser->root)
1749 {
1750 set_error (error, context,
1751 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1752 "Root element in a menu file must be <Menu>, not <%s>\n",
1753 element_name);
1754 }
1755 else if (parser->stack_top->type == MENU_LAYOUT_NODE_MENU)
1756 {
1757 start_menu_child_element (parser, context, element_name,
1758 attribute_names, attribute_values,
1759 error);
1760 }
1761 else if (parser->stack_top->type == MENU_LAYOUT_NODE_INCLUDE ||
1762 parser->stack_top->type == MENU_LAYOUT_NODE_EXCLUDE ||
1763 parser->stack_top->type == MENU_LAYOUT_NODE_AND ||
1764 parser->stack_top->type == MENU_LAYOUT_NODE_OR ||
1765 parser->stack_top->type == MENU_LAYOUT_NODE_NOT)
1766 {
1767 start_matching_rule_element (parser, context, element_name,
1768 attribute_names, attribute_values,
1769 error);
1770 }
1771 else if (parser->stack_top->type == MENU_LAYOUT_NODE_MOVE)
1772 {
1773 start_move_child_element (parser, context, element_name,
1774 attribute_names, attribute_values,
1775 error);
1776 }
1777 else if (parser->stack_top->type == MENU_LAYOUT_NODE_LAYOUT ||
1778 parser->stack_top->type == MENU_LAYOUT_NODE_DEFAULT_LAYOUT)
1779 {
1780 start_layout_child_element (parser, context, element_name,
1781 attribute_names, attribute_values,
1782 error);
1783 }
1784 else
1785 {
1786 set_error (error, context,
1787 G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
1788 "Element <%s> may not appear in this context\n",
1789 element_name);
1790 }
1791
1792 add_context_to_error (error, context);
1793 }
1794
1795 /* we want to make sure that the <Layout> or <DefaultLayout> is either empty,
1796 * or contain one <Merge> of type "all", or contain one <Merge> of type "menus"
1797 * and one <Merge> of type "files". If this is not the case, we try to clean up
1798 * things:
1799 * + if there is at least one <Merge> of type "all", then we only keep the
1800 * last <Merge> of type "all" and remove all others <Merge>
1801 * + if there is no <Merge> with type "all", we keep only the last <Merge> of
1802 * type "menus" and the last <Merge> of type "files". If there's no <Merge>
1803 * of type "menus" we append one, and then if there's no <Merge> of type
1804 * "files", we append one. (So menus are before files)
1805 */
1806 static gboolean
1807 fixup_layout_node (GMarkupParseContext *context,
1808 MenuParser *parser,
1809 MenuLayoutNode *node,
1810 GError **error)
1811 {
1812 MenuLayoutNode *child;
1813 MenuLayoutNode *last_all;
1814 MenuLayoutNode *last_menus;
1815 MenuLayoutNode *last_files;
1816 int n_all;
1817 int n_menus;
1818 int n_files;
1819
1820 if (!node->children)
1821 {
1822 return TRUE;
1823 }
1824
1825 last_all = NULL;
1826 last_menus = NULL;
1827 last_files = NULL;
1828 n_all = 0;
1829 n_menus = 0;
1830 n_files = 0;
1831
1832 child = node->children;
1833 while (child != NULL)
1834 {
1835 switch (child->type)
1836 {
1837 case MENU_LAYOUT_NODE_MERGE:
1838 switch (menu_layout_node_merge_get_type (child))
1839 {
1840 case MENU_LAYOUT_MERGE_NONE:
1841 break;
1842
1843 case MENU_LAYOUT_MERGE_MENUS:
1844 last_menus = child;
1845 n_menus++;
1846 break;
1847
1848 case MENU_LAYOUT_MERGE_FILES:
1849 last_files = child;
1850 n_files++;
1851 break;
1852
1853 case MENU_LAYOUT_MERGE_ALL:
1854 last_all = child;
1855 n_all++;
1856 break;
1857
1858 default:
1859 g_assert_not_reached ();
1860 break;
1861 }
1862 break;
1863
1864 default:
1865 break;
1866 }
1867
1868 child = node_next (child);
1869 }
1870
1871 if ((n_all == 1 && n_menus == 0 && n_files == 0) ||
1872 (n_all == 0 && n_menus == 1 && n_files == 1))
1873 {
1874 return TRUE;
1875 }
1876 else if (n_all > 1 || n_menus > 1 || n_files > 1 ||
1877 (n_all == 1 && (n_menus != 0 || n_files != 0)))
1878 {
1879 child = node->children;
1880 while (child != NULL)
1881 {
1882 MenuLayoutNode *next;
1883
1884 next = node_next (child);
1885
1886 switch (child->type)
1887 {
1888 case MENU_LAYOUT_NODE_MERGE:
1889 switch (menu_layout_node_merge_get_type (child))
1890 {
1891 case MENU_LAYOUT_MERGE_NONE:
1892 break;
1893
1894 case MENU_LAYOUT_MERGE_MENUS:
1895 if (n_all || last_menus != child)
1896 {
1897 menu_verbose ("removing duplicated merge menus element\n");
1898 menu_layout_node_unlink (child);
1899 }
1900 break;
1901
1902 case MENU_LAYOUT_MERGE_FILES:
1903 if (n_all || last_files != child)
1904 {
1905 menu_verbose ("removing duplicated merge files element\n");
1906 menu_layout_node_unlink (child);
1907 }
1908 break;
1909
1910 case MENU_LAYOUT_MERGE_ALL:
1911 if (last_all != child)
1912 {
1913 menu_verbose ("removing duplicated merge all element\n");
1914 menu_layout_node_unlink (child);
1915 }
1916 break;
1917
1918 default:
1919 g_assert_not_reached ();
1920 break;
1921 }
1922 break;
1923
1924 default:
1925 break;
1926 }
1927
1928 child = next;
1929 }
1930 }
1931
1932 if (n_all == 0 && n_menus == 0)
1933 {
1934 last_menus = menu_layout_node_new (MENU_LAYOUT_NODE_MERGE);
1935 menu_layout_node_merge_set_type (last_menus, "menus");
1936 menu_verbose ("appending missing merge menus element\n");
1937 menu_layout_node_append_child (node, last_menus);
1938 }
1939
1940 if (n_all == 0 && n_files == 0)
1941 {
1942 last_files = menu_layout_node_new (MENU_LAYOUT_NODE_MERGE);
1943 menu_layout_node_merge_set_type (last_files, "files");
1944 menu_verbose ("appending missing merge files element\n");
1945 menu_layout_node_append_child (node, last_files);
1946 }
1947
1948 return TRUE;
1949 }
1950
1951 /* we want to a) check that we have old-new pairs and b) canonicalize
1952 * such that each <Move> has exactly one old-new pair
1953 */
1954 static gboolean
1955 fixup_move_node (GMarkupParseContext *context,
1956 MenuParser *parser,
1957 MenuLayoutNode *node,
1958 GError **error)
1959 {
1960 MenuLayoutNode *child;
1961 int n_old;
1962 int n_new;
1963
1964 n_old = 0;
1965 n_new = 0;
1966
1967 child = node->children;
1968 while (child != NULL)
1969 {
1970 switch (child->type)
1971 {
1972 case MENU_LAYOUT_NODE_OLD:
1973 if (n_new != n_old)
1974 {
1975 set_error (error, context,
1976 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1977 "<Old>/<New> elements not paired properly\n");
1978 return FALSE;
1979 }
1980
1981 n_old += 1;
1982
1983 break;
1984
1985 case MENU_LAYOUT_NODE_NEW:
1986 n_new += 1;
1987
1988 if (n_new != n_old)
1989 {
1990 set_error (error, context,
1991 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
1992 "<Old>/<New> elements not paired properly\n");
1993 return FALSE;
1994 }
1995
1996 break;
1997
1998 default:
1999 g_assert_not_reached ();
2000 break;
2001 }
2002
2003 child = node_next (child);
2004 }
2005
2006 if (n_new == 0 || n_old == 0)
2007 {
2008 set_error (error, context,
2009 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2010 "<Old>/<New> elements missing under <Move>\n");
2011 return FALSE;
2012 }
2013
2014 g_assert (n_new == n_old);
2015 g_assert ((n_new + n_old) % 2 == 0);
2016
2017 if (n_new > 1)
2018 {
2019 MenuLayoutNode *prev;
2020 MenuLayoutNode *append_after;
2021
2022 /* Need to split the <Move> into multiple <Move> */
2023
2024 n_old = 0;
2025 n_new = 0;
2026 prev = NULL;
2027 append_after = node;
2028
2029 child = node->children;
2030 while (child != NULL)
2031 {
2032 MenuLayoutNode *next;
2033
2034 next = node_next (child);
2035
2036 switch (child->type)
2037 {
2038 case MENU_LAYOUT_NODE_OLD:
2039 n_old += 1;
2040 break;
2041
2042 case MENU_LAYOUT_NODE_NEW:
2043 n_new += 1;
2044 break;
2045
2046 default:
2047 g_assert_not_reached ();
2048 break;
2049 }
2050
2051 if (n_old == n_new &&
2052 n_old > 1)
2053 {
2054 /* Move the just-completed pair */
2055 MenuLayoutNode *new_move;
2056
2057 g_assert (prev != NULL);
2058
2059 new_move = menu_layout_node_new (MENU_LAYOUT_NODE_MOVE);
2060 menu_verbose ("inserting new_move after append_after\n");
2061 menu_layout_node_insert_after (append_after, new_move);
2062 append_after = new_move;
2063
2064 menu_layout_node_steal (prev);
2065 menu_layout_node_steal (child);
2066
2067 menu_verbose ("appending prev to new_move\n");
2068 menu_layout_node_append_child (new_move, prev);
2069 menu_verbose ("appending child to new_move\n");
2070 menu_layout_node_append_child (new_move, child);
2071
2072 menu_verbose ("Created new move element old = %s new = %s\n",
2073 menu_layout_node_move_get_old (new_move),
2074 menu_layout_node_move_get_new (new_move));
2075
2076 menu_layout_node_unref (new_move);
2077 menu_layout_node_unref (prev);
2078 menu_layout_node_unref (child);
2079
2080 prev = NULL;
2081 }
2082 else
2083 {
2084 prev = child;
2085 }
2086
2087 prev = child;
2088 child = next;
2089 }
2090 }
2091
2092 return TRUE;
2093 }
2094
2095 static void
2096 end_element_handler (GMarkupParseContext *context,
2097 const char *element_name,
2098 gpointer user_data,
2099 GError **error)
2100 {
2101 MenuParser *parser = user_data;
2102
2103 g_assert (parser->stack_top != NULL);
2104
2105 switch (parser->stack_top->type)
2106 {
2107 case MENU_LAYOUT_NODE_APP_DIR:
2108 case MENU_LAYOUT_NODE_DIRECTORY_DIR:
2109 case MENU_LAYOUT_NODE_NAME:
2110 case MENU_LAYOUT_NODE_DIRECTORY:
2111 case MENU_LAYOUT_NODE_FILENAME:
2112 case MENU_LAYOUT_NODE_CATEGORY:
2113 case MENU_LAYOUT_NODE_MERGE_DIR:
2114 case MENU_LAYOUT_NODE_LEGACY_DIR:
2115 case MENU_LAYOUT_NODE_OLD:
2116 case MENU_LAYOUT_NODE_NEW:
2117 case MENU_LAYOUT_NODE_MENUNAME:
2118 if (menu_layout_node_get_content (parser->stack_top) == NULL)
2119 {
2120 set_error (error, context,
2121 G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
2122 "Element <%s> is required to contain text and was empty\n",
2123 element_name);
2124 goto out;
2125 }
2126 break;
2127
2128 case MENU_LAYOUT_NODE_MENU:
2129 if (!has_child_of_type (parser->stack_top, MENU_LAYOUT_NODE_NAME))
2130 {
2131 set_error (error, context,
2132 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2133 "<Menu> elements are required to contain a <Name> element\n");
2134 goto out;
2135 }
2136 break;
2137
2138 case MENU_LAYOUT_NODE_ROOT:
2139 case MENU_LAYOUT_NODE_PASSTHROUGH:
2140 case MENU_LAYOUT_NODE_DEFAULT_APP_DIRS:
2141 case MENU_LAYOUT_NODE_DEFAULT_DIRECTORY_DIRS:
2142 case MENU_LAYOUT_NODE_DEFAULT_MERGE_DIRS:
2143 case MENU_LAYOUT_NODE_ONLY_UNALLOCATED:
2144 case MENU_LAYOUT_NODE_NOT_ONLY_UNALLOCATED:
2145 case MENU_LAYOUT_NODE_INCLUDE:
2146 case MENU_LAYOUT_NODE_EXCLUDE:
2147 case MENU_LAYOUT_NODE_ALL:
2148 case MENU_LAYOUT_NODE_AND:
2149 case MENU_LAYOUT_NODE_OR:
2150 case MENU_LAYOUT_NODE_NOT:
2151 case MENU_LAYOUT_NODE_KDE_LEGACY_DIRS:
2152 case MENU_LAYOUT_NODE_DELETED:
2153 case MENU_LAYOUT_NODE_NOT_DELETED:
2154 case MENU_LAYOUT_NODE_SEPARATOR:
2155 case MENU_LAYOUT_NODE_MERGE:
2156 case MENU_LAYOUT_NODE_MERGE_FILE:
2157 break;
2158
2159 case MENU_LAYOUT_NODE_LAYOUT:
2160 case MENU_LAYOUT_NODE_DEFAULT_LAYOUT:
2161 if (!fixup_layout_node (context, parser, parser->stack_top, error))
2162 goto out;
2163 break;
2164
2165 case MENU_LAYOUT_NODE_MOVE:
2166 if (!fixup_move_node (context, parser, parser->stack_top, error))
2167 goto out;
2168 break;
2169 }
2170
2171 out:
2172 parser->stack_top = parser->stack_top->parent;
2173 }
2174
2175 static gboolean
2176 all_whitespace (const char *text,
2177 int text_len)
2178 {
2179 const char *p;
2180 const char *end;
2181
2182 p = text;
2183 end = text + text_len;
2184
2185 while (p != end)
2186 {
2187 if (!g_ascii_isspace (*p))
2188 return FALSE;
2189
2190 p = g_utf8_next_char (p);
2191 }
2192
2193 return TRUE;
2194 }
2195
2196 static void
2197 text_handler (GMarkupParseContext *context,
2198 const char *text,
2199 gsize text_len,
2200 gpointer user_data,
2201 GError **error)
2202 {
2203 MenuParser *parser = user_data;
2204
2205 switch (parser->stack_top->type)
2206 {
2207 case MENU_LAYOUT_NODE_APP_DIR:
2208 case MENU_LAYOUT_NODE_DIRECTORY_DIR:
2209 case MENU_LAYOUT_NODE_NAME:
2210 case MENU_LAYOUT_NODE_DIRECTORY:
2211 case MENU_LAYOUT_NODE_FILENAME:
2212 case MENU_LAYOUT_NODE_CATEGORY:
2213 case MENU_LAYOUT_NODE_MERGE_FILE:
2214 case MENU_LAYOUT_NODE_MERGE_DIR:
2215 case MENU_LAYOUT_NODE_LEGACY_DIR:
2216 case MENU_LAYOUT_NODE_OLD:
2217 case MENU_LAYOUT_NODE_NEW:
2218 case MENU_LAYOUT_NODE_MENUNAME:
2219 g_assert (menu_layout_node_get_content (parser->stack_top) == NULL);
2220
2221 menu_layout_node_set_content (parser->stack_top, text);
2222 break;
2223
2224 case MENU_LAYOUT_NODE_ROOT:
2225 case MENU_LAYOUT_NODE_PASSTHROUGH:
2226 case MENU_LAYOUT_NODE_MENU:
2227 case MENU_LAYOUT_NODE_DEFAULT_APP_DIRS:
2228 case MENU_LAYOUT_NODE_DEFAULT_DIRECTORY_DIRS:
2229 case MENU_LAYOUT_NODE_DEFAULT_MERGE_DIRS:
2230 case MENU_LAYOUT_NODE_ONLY_UNALLOCATED:
2231 case MENU_LAYOUT_NODE_NOT_ONLY_UNALLOCATED:
2232 case MENU_LAYOUT_NODE_INCLUDE:
2233 case MENU_LAYOUT_NODE_EXCLUDE:
2234 case MENU_LAYOUT_NODE_ALL:
2235 case MENU_LAYOUT_NODE_AND:
2236 case MENU_LAYOUT_NODE_OR:
2237 case MENU_LAYOUT_NODE_NOT:
2238 case MENU_LAYOUT_NODE_KDE_LEGACY_DIRS:
2239 case MENU_LAYOUT_NODE_MOVE:
2240 case MENU_LAYOUT_NODE_DELETED:
2241 case MENU_LAYOUT_NODE_NOT_DELETED:
2242 case MENU_LAYOUT_NODE_LAYOUT:
2243 case MENU_LAYOUT_NODE_DEFAULT_LAYOUT:
2244 case MENU_LAYOUT_NODE_SEPARATOR:
2245 case MENU_LAYOUT_NODE_MERGE:
2246 if (!all_whitespace (text, text_len))
2247 {
2248 set_error (error, context,
2249 G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2250 "No text is allowed inside element <%s>",
2251 g_markup_parse_context_get_element (context));
2252 }
2253 break;
2254 }
2255
2256 add_context_to_error (error, context);
2257 }
2258
2259 static void
2260 passthrough_handler (GMarkupParseContext *context,
2261 const char *passthrough_text,
2262 gsize text_len,
2263 gpointer user_data,
2264 GError **error)
2265 {
2266 MenuParser *parser = user_data;
2267 MenuLayoutNode *node;
2268
2269 /* don't push passthrough on the stack, it's not an element */
2270
2271 node = menu_layout_node_new (MENU_LAYOUT_NODE_PASSTHROUGH);
2272 menu_layout_node_set_content (node, passthrough_text);
2273
2274 menu_layout_node_append_child (parser->stack_top, node);
2275 menu_layout_node_unref (node);
2276
2277 add_context_to_error (error, context);
2278 }
2279
2280 static void
2281 menu_parser_init (MenuParser *parser)
2282 {
2283 parser->root = menu_layout_node_new (MENU_LAYOUT_NODE_ROOT);
2284 parser->stack_top = parser->root;
2285 }
2286
2287 static void
2288 menu_parser_free (MenuParser *parser)
2289 {
2290 if (parser->root)
2291 menu_layout_node_unref (parser->root);
2292 }
2293
2294 MenuLayoutNode *
2295 menu_layout_load (const char *filename,
2296 const char *non_prefixed_basename,
2297 GError **err)
2298 {
2299 GMainContext *main_context;
2300 GMarkupParseContext *context;
2301 MenuLayoutNodeRoot *root;
2302 MenuLayoutNode *retval;
2303 MenuParser parser;
2304 GError *error;
2305 GString *str;
2306 char *text;
2307 char *s;
2308 gsize length;
2309
2310 text = NULL;
2311 length = 0;
2312 retval = NULL;
2313 context = NULL;
2314
2315 main_context = g_main_context_get_thread_default ();
2316
2317 menu_verbose ("Loading \"%s\" from disk\n", filename);
2318
2319 if (!g_file_get_contents (filename,
2320 &text,
2321 &length,
2322 err))
2323 {
2324 menu_verbose ("Failed to load \"%s\"\n",
2325 filename);
2326 return NULL;
2327 }
2328
2329 g_assert (text != NULL);
2330
2331 menu_parser_init (&parser);
2332
2333 root = (MenuLayoutNodeRoot *) parser.root;
2334
2335 root->basedir = g_path_get_dirname (filename);
2336 menu_verbose ("Set basedir \"%s\"\n", root->basedir);
2337
2338 if (non_prefixed_basename)
2339 s = g_strdup (non_prefixed_basename);
2340 else
2341 s = g_path_get_basename (filename);
2342 str = g_string_new (s);
2343 if (g_str_has_suffix (str->str, ".menu"))
2344 g_string_truncate (str, str->len - strlen (".menu"));
2345
2346 root->name = str->str;
2347 menu_verbose ("Set menu name \"%s\"\n", root->name);
2348
2349 g_string_free (str, FALSE);
2350 g_free (s);
2351
2352 context = g_markup_parse_context_new (&menu_funcs, 0, &parser, NULL);
2353
2354 error = NULL;
2355 if (!g_markup_parse_context_parse (context,
2356 text,
2357 length,
2358 &error))
2359 goto out;
2360
2361 error = NULL;
2362 g_markup_parse_context_end_parse (context, &error);
2363
2364 root->main_context = main_context ? g_main_context_ref (main_context) : NULL;
2365
2366 out:
2367 if (context)
2368 g_markup_parse_context_free (context);
2369 g_free (text);
2370
2371 if (error)
2372 {
2373 menu_verbose ("Error \"%s\" loading \"%s\"\n",
2374 error->message, filename);
2375 g_propagate_error (err, error);
2376 }
2377 else if (has_child_of_type (parser.root, MENU_LAYOUT_NODE_MENU))
2378 {
2379 menu_verbose ("File loaded OK\n");
2380 retval = parser.root;
2381 parser.root = NULL;
2382 }
2383 else
2384 {
2385 menu_verbose ("Did not have a root element in file\n");
2386 g_set_error (err, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
2387 "Menu file %s did not contain a root <Menu> element",
2388 filename);
2389 }
2390
2391 menu_parser_free (&parser);
2392
2393 return retval;
2394 }
0 /* Menu layout in-memory data structure (a custom "DOM tree") */
1
2 /*
3 * Copyright (C) 2002 - 2004 Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library 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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21 #ifndef __MENU_LAYOUT_H__
22 #define __MENU_LAYOUT_H__
23
24 #include <glib.h>
25
26 #include "entry-directories.h"
27
28 G_BEGIN_DECLS
29
30 typedef struct MenuLayoutNode MenuLayoutNode;
31
32 typedef enum
33 {
34 MENU_LAYOUT_NODE_ROOT,
35 MENU_LAYOUT_NODE_PASSTHROUGH,
36 MENU_LAYOUT_NODE_MENU,
37 MENU_LAYOUT_NODE_APP_DIR,
38 MENU_LAYOUT_NODE_DEFAULT_APP_DIRS,
39 MENU_LAYOUT_NODE_DIRECTORY_DIR,
40 MENU_LAYOUT_NODE_DEFAULT_DIRECTORY_DIRS,
41 MENU_LAYOUT_NODE_DEFAULT_MERGE_DIRS,
42 MENU_LAYOUT_NODE_NAME,
43 MENU_LAYOUT_NODE_DIRECTORY,
44 MENU_LAYOUT_NODE_ONLY_UNALLOCATED,
45 MENU_LAYOUT_NODE_NOT_ONLY_UNALLOCATED,
46 MENU_LAYOUT_NODE_INCLUDE,
47 MENU_LAYOUT_NODE_EXCLUDE,
48 MENU_LAYOUT_NODE_FILENAME,
49 MENU_LAYOUT_NODE_CATEGORY,
50 MENU_LAYOUT_NODE_ALL,
51 MENU_LAYOUT_NODE_AND,
52 MENU_LAYOUT_NODE_OR,
53 MENU_LAYOUT_NODE_NOT,
54 MENU_LAYOUT_NODE_MERGE_FILE,
55 MENU_LAYOUT_NODE_MERGE_DIR,
56 MENU_LAYOUT_NODE_LEGACY_DIR,
57 MENU_LAYOUT_NODE_KDE_LEGACY_DIRS,
58 MENU_LAYOUT_NODE_MOVE,
59 MENU_LAYOUT_NODE_OLD,
60 MENU_LAYOUT_NODE_NEW,
61 MENU_LAYOUT_NODE_DELETED,
62 MENU_LAYOUT_NODE_NOT_DELETED,
63 MENU_LAYOUT_NODE_LAYOUT,
64 MENU_LAYOUT_NODE_DEFAULT_LAYOUT,
65 MENU_LAYOUT_NODE_MENUNAME,
66 MENU_LAYOUT_NODE_SEPARATOR,
67 MENU_LAYOUT_NODE_MERGE
68 } MenuLayoutNodeType;
69
70 typedef enum
71 {
72 MENU_MERGE_FILE_TYPE_PATH = 0,
73 MENU_MERGE_FILE_TYPE_PARENT
74 } MenuMergeFileType;
75
76 typedef enum
77 {
78 MENU_LAYOUT_MERGE_NONE,
79 MENU_LAYOUT_MERGE_MENUS,
80 MENU_LAYOUT_MERGE_FILES,
81 MENU_LAYOUT_MERGE_ALL
82 } MenuLayoutMergeType;
83
84 typedef enum
85 {
86 MENU_LAYOUT_VALUES_NONE = 0,
87 MENU_LAYOUT_VALUES_SHOW_EMPTY = 1 << 0,
88 MENU_LAYOUT_VALUES_INLINE_MENUS = 1 << 1,
89 MENU_LAYOUT_VALUES_INLINE_LIMIT = 1 << 2,
90 MENU_LAYOUT_VALUES_INLINE_HEADER = 1 << 3,
91 MENU_LAYOUT_VALUES_INLINE_ALIAS = 1 << 4
92 } MenuLayoutValuesMask;
93
94 typedef struct
95 {
96 MenuLayoutValuesMask mask;
97
98 guint show_empty : 1;
99 guint inline_menus : 1;
100 guint inline_header : 1;
101 guint inline_alias : 1;
102
103 guint inline_limit;
104 } MenuLayoutValues;
105
106
107 MenuLayoutNode *menu_layout_load (const char *filename,
108 const char *non_prefixed_basename,
109 GError **error);
110
111 MenuLayoutNode *menu_layout_node_new (MenuLayoutNodeType type);
112 MenuLayoutNode *menu_layout_node_ref (MenuLayoutNode *node);
113 void menu_layout_node_unref (MenuLayoutNode *node);
114
115 MenuLayoutNodeType menu_layout_node_get_type (MenuLayoutNode *node);
116
117 MenuLayoutNode *menu_layout_node_get_root (MenuLayoutNode *node);
118 MenuLayoutNode *menu_layout_node_get_parent (MenuLayoutNode *node);
119 MenuLayoutNode *menu_layout_node_get_children (MenuLayoutNode *node);
120 MenuLayoutNode *menu_layout_node_get_next (MenuLayoutNode *node);
121
122 void menu_layout_node_insert_before (MenuLayoutNode *node,
123 MenuLayoutNode *new_sibling);
124 void menu_layout_node_insert_after (MenuLayoutNode *node,
125 MenuLayoutNode *new_sibling);
126 void menu_layout_node_prepend_child (MenuLayoutNode *parent,
127 MenuLayoutNode *new_child);
128 void menu_layout_node_append_child (MenuLayoutNode *parent,
129 MenuLayoutNode *new_child);
130
131 void menu_layout_node_unlink (MenuLayoutNode *node);
132 void menu_layout_node_steal (MenuLayoutNode *node);
133
134 const char *menu_layout_node_get_content (MenuLayoutNode *node);
135 void menu_layout_node_set_content (MenuLayoutNode *node,
136 const char *content);
137
138 char *menu_layout_node_get_content_as_path (MenuLayoutNode *node);
139
140 const char *menu_layout_node_root_get_name (MenuLayoutNode *node);
141 const char *menu_layout_node_root_get_basedir (MenuLayoutNode *node);
142
143 const char *menu_layout_node_menu_get_name (MenuLayoutNode *node);
144 EntryDirectoryList *menu_layout_node_menu_get_app_dirs (MenuLayoutNode *node);
145 EntryDirectoryList *menu_layout_node_menu_get_directory_dirs (MenuLayoutNode *node);
146
147 const char *menu_layout_node_move_get_old (MenuLayoutNode *node);
148 const char *menu_layout_node_move_get_new (MenuLayoutNode *node);
149
150 const char *menu_layout_node_legacy_dir_get_prefix (MenuLayoutNode *node);
151 void menu_layout_node_legacy_dir_set_prefix (MenuLayoutNode *node,
152 const char *prefix);
153
154 MenuMergeFileType menu_layout_node_merge_file_get_type (MenuLayoutNode *node);
155 void menu_layout_node_merge_file_set_type (MenuLayoutNode *node,
156 MenuMergeFileType type);
157
158 MenuLayoutMergeType menu_layout_node_merge_get_type (MenuLayoutNode *node);
159
160 void menu_layout_node_default_layout_get_values (MenuLayoutNode *node,
161 MenuLayoutValues *values);
162 void menu_layout_node_menuname_get_values (MenuLayoutNode *node,
163 MenuLayoutValues *values);
164
165 typedef void (* MenuLayoutNodeEntriesChangedFunc) (MenuLayoutNode *node,
166 gpointer user_data);
167
168 void menu_layout_node_root_add_entries_monitor (MenuLayoutNode *node,
169 MenuLayoutNodeEntriesChangedFunc callback,
170 gpointer user_data);
171 void menu_layout_node_root_remove_entries_monitor (MenuLayoutNode *node,
172 MenuLayoutNodeEntriesChangedFunc callback,
173 gpointer user_data);
174
175 G_END_DECLS
176
177 #endif /* __MENU_LAYOUT_H__ */
0 /*
1 * Copyright (C) 2005 Red Hat, Inc.
2 * Copyright (C) 2006 Mark McLoughlin
3 * Copyright (C) 2007 Sebastian Dröge
4 * Copyright (C) 2008 Vincent Untz
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library 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 GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22 #include <config.h>
23
24 #include "menu-monitor.h"
25
26 #include <gio/gio.h>
27
28 #include "menu-util.h"
29
30 struct MenuMonitor
31 {
32 char *path;
33 guint refcount;
34
35 GSList *notifies;
36
37 GFileMonitor *monitor;
38
39 guint is_directory : 1;
40 };
41
42 typedef struct
43 {
44 MenuMonitor *monitor;
45 MenuMonitorEvent event;
46 char *path;
47 } MenuMonitorEventInfo;
48
49 typedef struct
50 {
51 MenuMonitorNotifyFunc notify_func;
52 gpointer user_data;
53 guint refcount;
54 } MenuMonitorNotify;
55
56 static MenuMonitorNotify *menu_monitor_notify_ref (MenuMonitorNotify *notify);
57 static void menu_monitor_notify_unref (MenuMonitorNotify *notify);
58
59 static GHashTable *monitors_registry = NULL;
60 static guint events_idle_handler = 0;
61 static GSList *pending_events = NULL;
62
63 static void
64 invoke_notifies (MenuMonitor *monitor,
65 MenuMonitorEvent event,
66 const char *path)
67 {
68 GSList *copy;
69 GSList *tmp;
70
71 copy = g_slist_copy (monitor->notifies);
72 g_slist_foreach (copy,
73 (GFunc) menu_monitor_notify_ref,
74 NULL);
75
76 tmp = copy;
77 while (tmp != NULL)
78 {
79 MenuMonitorNotify *notify = tmp->data;
80 GSList *next = tmp->next;
81
82 if (notify->notify_func)
83 {
84 notify->notify_func (monitor, event, path, notify->user_data);
85 }
86
87 menu_monitor_notify_unref (notify);
88
89 tmp = next;
90 }
91
92 g_slist_free (copy);
93 }
94
95 static gboolean
96 emit_events_in_idle (void)
97 {
98 GSList *events_to_emit;
99 GSList *tmp;
100
101 events_to_emit = pending_events;
102
103 pending_events = NULL;
104 events_idle_handler = 0;
105
106 tmp = events_to_emit;
107 while (tmp != NULL)
108 {
109 MenuMonitorEventInfo *event_info = tmp->data;
110
111 menu_monitor_ref (event_info->monitor);
112
113 tmp = tmp->next;
114 }
115
116 tmp = events_to_emit;
117 while (tmp != NULL)
118 {
119 MenuMonitorEventInfo *event_info = tmp->data;
120
121 invoke_notifies (event_info->monitor,
122 event_info->event,
123 event_info->path);
124
125 menu_monitor_unref (event_info->monitor);
126 event_info->monitor = NULL;
127
128 g_free (event_info->path);
129 event_info->path = NULL;
130
131 event_info->event = MENU_MONITOR_EVENT_INVALID;
132
133 g_free (event_info);
134
135 tmp = tmp->next;
136 }
137
138 g_slist_free (events_to_emit);
139
140 return FALSE;
141 }
142
143 static void
144 menu_monitor_queue_event (MenuMonitorEventInfo *event_info)
145 {
146 pending_events = g_slist_append (pending_events, event_info);
147
148 if (events_idle_handler == 0)
149 {
150 events_idle_handler = g_idle_add ((GSourceFunc) emit_events_in_idle, NULL);
151 }
152 }
153
154 static inline char *
155 get_registry_key (const char *path,
156 gboolean is_directory)
157 {
158 return g_strdup_printf ("%s:%s",
159 path,
160 is_directory ? "<dir>" : "<file>");
161 }
162
163 static gboolean
164 monitor_callback (GFileMonitor *monitor,
165 GFile *child,
166 GFile *other_file,
167 GFileMonitorEvent eflags,
168 gpointer user_data)
169 {
170 MenuMonitorEventInfo *event_info;
171 MenuMonitorEvent event;
172 MenuMonitor *menu_monitor = (MenuMonitor *) user_data;
173
174 event = MENU_MONITOR_EVENT_INVALID;
175 switch (eflags)
176 {
177 case G_FILE_MONITOR_EVENT_CHANGED:
178 event = MENU_MONITOR_EVENT_CHANGED;
179 break;
180 case G_FILE_MONITOR_EVENT_CREATED:
181 event = MENU_MONITOR_EVENT_CREATED;
182 break;
183 case G_FILE_MONITOR_EVENT_DELETED:
184 event = MENU_MONITOR_EVENT_DELETED;
185 break;
186 default:
187 return TRUE;
188 }
189
190 event_info = g_new0 (MenuMonitorEventInfo, 1);
191
192 event_info->path = g_file_get_path (child);
193 event_info->event = event;
194 event_info->monitor = menu_monitor;
195
196 menu_monitor_queue_event (event_info);
197
198 return TRUE;
199 }
200
201 static MenuMonitor *
202 register_monitor (const char *path,
203 gboolean is_directory)
204 {
205 MenuMonitor *retval;
206 GFile *file;
207
208 retval = g_new0 (MenuMonitor, 1);
209
210 retval->path = g_strdup (path);
211 retval->refcount = 1;
212 retval->is_directory = is_directory != FALSE;
213
214 file = g_file_new_for_path (retval->path);
215
216 if (file == NULL)
217 {
218 menu_verbose ("Not adding monitor on '%s', failed to create GFile\n",
219 retval->path);
220 return retval;
221 }
222
223 if (retval->is_directory)
224 retval->monitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE,
225 NULL, NULL);
226 else
227 retval->monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE,
228 NULL, NULL);
229
230 g_object_unref (G_OBJECT (file));
231
232 if (retval->monitor == NULL)
233 {
234 menu_verbose ("Not adding monitor on '%s', failed to create monitor\n",
235 retval->path);
236 return retval;
237 }
238
239 g_signal_connect (retval->monitor, "changed",
240 G_CALLBACK (monitor_callback), retval);
241
242 return retval;
243 }
244
245 static MenuMonitor *
246 lookup_monitor (const char *path,
247 gboolean is_directory)
248 {
249 MenuMonitor *retval;
250 char *registry_key;
251
252 retval = NULL;
253
254 registry_key = get_registry_key (path, is_directory);
255
256 if (monitors_registry == NULL)
257 {
258 monitors_registry = g_hash_table_new_full (g_str_hash,
259 g_str_equal,
260 g_free,
261 NULL);
262 }
263 else
264 {
265 retval = g_hash_table_lookup (monitors_registry, registry_key);
266 }
267
268 if (retval == NULL)
269 {
270 retval = register_monitor (path, is_directory);
271 g_hash_table_insert (monitors_registry, registry_key, retval);
272
273 return retval;
274 }
275 else
276 {
277 g_free (registry_key);
278
279 return menu_monitor_ref (retval);
280 }
281 }
282
283 MenuMonitor *
284 menu_get_file_monitor (const char *path)
285 {
286 g_return_val_if_fail (path != NULL, NULL);
287
288 return lookup_monitor (path, FALSE);
289 }
290
291 MenuMonitor *
292 menu_get_directory_monitor (const char *path)
293 {
294 g_return_val_if_fail (path != NULL, NULL);
295
296 return lookup_monitor (path, TRUE);
297 }
298
299 MenuMonitor *
300 menu_monitor_ref (MenuMonitor *monitor)
301 {
302 g_return_val_if_fail (monitor != NULL, NULL);
303 g_return_val_if_fail (monitor->refcount > 0, NULL);
304
305 monitor->refcount++;
306
307 return monitor;
308 }
309
310 static void
311 menu_monitor_clear_pending_events (MenuMonitor *monitor)
312 {
313 GSList *tmp;
314
315 tmp = pending_events;
316 while (tmp != NULL)
317 {
318 MenuMonitorEventInfo *event_info = tmp->data;
319 GSList *next = tmp->next;
320
321 if (event_info->monitor == monitor)
322 {
323 pending_events = g_slist_delete_link (pending_events, tmp);
324
325 g_free (event_info->path);
326 event_info->path = NULL;
327
328 event_info->monitor = NULL;
329 event_info->event = MENU_MONITOR_EVENT_INVALID;
330
331 g_free (event_info);
332 }
333
334 tmp = next;
335 }
336 }
337
338 void
339 menu_monitor_unref (MenuMonitor *monitor)
340 {
341 char *registry_key;
342
343 g_return_if_fail (monitor != NULL);
344 g_return_if_fail (monitor->refcount > 0);
345
346 if (--monitor->refcount > 0)
347 return;
348
349 registry_key = get_registry_key (monitor->path, monitor->is_directory);
350 g_hash_table_remove (monitors_registry, registry_key);
351 g_free (registry_key);
352
353 if (g_hash_table_size (monitors_registry) == 0)
354 {
355 g_hash_table_destroy (monitors_registry);
356 monitors_registry = NULL;
357 }
358
359 if (monitor->monitor)
360 {
361 g_file_monitor_cancel (monitor->monitor);
362 g_object_unref (monitor->monitor);
363 monitor->monitor = NULL;
364 }
365
366 g_slist_foreach (monitor->notifies, (GFunc) menu_monitor_notify_unref, NULL);
367 g_slist_free (monitor->notifies);
368 monitor->notifies = NULL;
369
370 menu_monitor_clear_pending_events (monitor);
371
372 g_free (monitor->path);
373 monitor->path = NULL;
374
375 g_free (monitor);
376 }
377
378 static MenuMonitorNotify *
379 menu_monitor_notify_ref (MenuMonitorNotify *notify)
380 {
381 g_return_val_if_fail (notify != NULL, NULL);
382 g_return_val_if_fail (notify->refcount > 0, NULL);
383
384 notify->refcount++;
385
386 return notify;
387 }
388
389 static void
390 menu_monitor_notify_unref (MenuMonitorNotify *notify)
391 {
392 g_return_if_fail (notify != NULL);
393 g_return_if_fail (notify->refcount > 0);
394
395 if (--notify->refcount > 0)
396 return;
397
398 g_free (notify);
399 }
400
401 void
402 menu_monitor_add_notify (MenuMonitor *monitor,
403 MenuMonitorNotifyFunc notify_func,
404 gpointer user_data)
405 {
406 MenuMonitorNotify *notify;
407 GSList *tmp;
408
409 g_return_if_fail (monitor != NULL);
410 g_return_if_fail (notify_func != NULL);
411
412 tmp = monitor->notifies;
413 while (tmp != NULL)
414 {
415 notify = tmp->data;
416
417 if (notify->notify_func == notify_func &&
418 notify->user_data == user_data)
419 break;
420
421 tmp = tmp->next;
422 }
423
424 if (tmp == NULL)
425 {
426 notify = g_new0 (MenuMonitorNotify, 1);
427 notify->notify_func = notify_func;
428 notify->user_data = user_data;
429 notify->refcount = 1;
430
431 monitor->notifies = g_slist_append (monitor->notifies, notify);
432 }
433 }
434
435 void
436 menu_monitor_remove_notify (MenuMonitor *monitor,
437 MenuMonitorNotifyFunc notify_func,
438 gpointer user_data)
439 {
440 GSList *tmp;
441
442 tmp = monitor->notifies;
443 while (tmp != NULL)
444 {
445 MenuMonitorNotify *notify = tmp->data;
446 GSList *next = tmp->next;
447
448 if (notify->notify_func == notify_func &&
449 notify->user_data == user_data)
450 {
451 notify->notify_func = NULL;
452 notify->user_data = NULL;
453 menu_monitor_notify_unref (notify);
454
455 monitor->notifies = g_slist_delete_link (monitor->notifies, tmp);
456 }
457
458 tmp = next;
459 }
460 }
0 /*
1 * Copyright (C) 2005 Red Hat, Inc.
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
7 *
8 * This library 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 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef __MENU_MONITOR_H__
20 #define __MENU_MONITOR_H__
21
22 #include <glib.h>
23
24 G_BEGIN_DECLS
25
26 typedef struct MenuMonitor MenuMonitor;
27
28 typedef enum
29 {
30 MENU_MONITOR_EVENT_INVALID = 0,
31 MENU_MONITOR_EVENT_CREATED = 1,
32 MENU_MONITOR_EVENT_DELETED = 2,
33 MENU_MONITOR_EVENT_CHANGED = 3
34 } MenuMonitorEvent;
35
36 typedef void (*MenuMonitorNotifyFunc) (MenuMonitor *monitor,
37 MenuMonitorEvent event,
38 const char *path,
39 gpointer user_data);
40
41
42 MenuMonitor *menu_get_file_monitor (const char *path);
43 MenuMonitor *menu_get_directory_monitor (const char *path);
44
45 MenuMonitor *menu_monitor_ref (MenuMonitor *monitor);
46 void menu_monitor_unref (MenuMonitor *monitor);
47
48 void menu_monitor_add_notify (MenuMonitor *monitor,
49 MenuMonitorNotifyFunc notify_func,
50 gpointer user_data);
51 void menu_monitor_remove_notify (MenuMonitor *monitor,
52 MenuMonitorNotifyFunc notify_func,
53 gpointer user_data);
54
55 G_END_DECLS
56
57 #endif /* __MENU_MONITOR_H__ */
0 /* Random utility functions for menu code */
1
2 /*
3 * Copyright (C) 2003 Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library 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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21 #include <config.h>
22
23 #include "menu-util.h"
24
25 #include <stdio.h>
26 #include <stdarg.h>
27
28
29 #ifdef G_ENABLE_DEBUG
30
31 static gboolean verbose = FALSE;
32 static gboolean initted = FALSE;
33
34 static inline gboolean
35 menu_verbose_enabled (void)
36 {
37 if (!initted)
38 {
39 verbose = g_getenv ("MENU_VERBOSE") != NULL;
40 initted = TRUE;
41 }
42
43 return verbose;
44 }
45
46 static int
47 utf8_fputs (const char *str,
48 FILE *f)
49 {
50 char *l;
51 int ret;
52
53 l = g_locale_from_utf8 (str, -1, NULL, NULL, NULL);
54
55 if (l == NULL)
56 ret = fputs (str, f); /* just print it anyway, better than nothing */
57 else
58 ret = fputs (l, f);
59
60 g_free (l);
61
62 return ret;
63 }
64
65 void
66 menu_verbose (const char *format,
67 ...)
68 {
69 va_list args;
70 char *str;
71
72 if (!menu_verbose_enabled ())
73 return;
74
75 va_start (args, format);
76 str = g_strdup_vprintf (format, args);
77 va_end (args);
78
79 utf8_fputs (str, stderr);
80 fflush (stderr);
81
82 g_free (str);
83 }
84
85 static void append_to_string (MenuLayoutNode *node,
86 gboolean onelevel,
87 int depth,
88 GString *str);
89
90 static void
91 append_spaces (GString *str,
92 int depth)
93 {
94 while (depth > 0)
95 {
96 g_string_append_c (str, ' ');
97 --depth;
98 }
99 }
100
101 static void
102 append_children (MenuLayoutNode *node,
103 int depth,
104 GString *str)
105 {
106 MenuLayoutNode *iter;
107
108 iter = menu_layout_node_get_children (node);
109 while (iter != NULL)
110 {
111 append_to_string (iter, FALSE, depth, str);
112
113 iter = menu_layout_node_get_next (iter);
114 }
115 }
116
117 static void
118 append_simple_with_attr (MenuLayoutNode *node,
119 int depth,
120 const char *node_name,
121 const char *attr_name,
122 const char *attr_value,
123 GString *str)
124 {
125 const char *content;
126
127 append_spaces (str, depth);
128
129 if ((content = menu_layout_node_get_content (node)))
130 {
131 char *escaped;
132
133 escaped = g_markup_escape_text (content, -1);
134
135 if (attr_name && attr_value)
136 {
137 char *attr_escaped;
138
139 attr_escaped = g_markup_escape_text (attr_value, -1);
140
141 g_string_append_printf (str, "<%s %s=\"%s\">%s</%s>\n",
142 node_name, attr_name,
143 attr_escaped, escaped, node_name);
144
145 g_free (attr_escaped);
146 }
147 else
148 {
149 g_string_append_printf (str, "<%s>%s</%s>\n",
150 node_name, escaped, node_name);
151 }
152
153 g_free (escaped);
154 }
155 else
156 {
157 if (attr_name && attr_value)
158 {
159 char *attr_escaped;
160
161 attr_escaped = g_markup_escape_text (attr_value, -1);
162
163 g_string_append_printf (str, "<%s %s=\"%s\"/>\n",
164 node_name, attr_name,
165 attr_escaped);
166
167 g_free (attr_escaped);
168 }
169 else
170 {
171 g_string_append_printf (str, "<%s/>\n", node_name);
172 }
173 }
174 }
175
176 static void
177 append_layout (MenuLayoutNode *node,
178 int depth,
179 const char *node_name,
180 MenuLayoutValues *layout_values,
181 GString *str)
182 {
183 const char *content;
184
185 append_spaces (str, depth);
186
187 if ((content = menu_layout_node_get_content (node)))
188 {
189 char *escaped;
190
191 escaped = g_markup_escape_text (content, -1);
192
193 g_string_append_printf (str,
194 "<%s show_empty=\"%s\" inline=\"%s\" inline_header=\"%s\""
195 " inline_alias=\"%s\" inline_limit=\"%d\">%s</%s>\n",
196 node_name,
197 layout_values->show_empty ? "true" : "false",
198 layout_values->inline_menus ? "true" : "false",
199 layout_values->inline_header ? "true" : "false",
200 layout_values->inline_alias ? "true" : "false",
201 layout_values->inline_limit,
202 escaped,
203 node_name);
204
205 g_free (escaped);
206 }
207 else
208 {
209 g_string_append_printf (str,
210 "<%s show_empty=\"%s\" inline=\"%s\" inline_header=\"%s\""
211 " inline_alias=\"%s\" inline_limit=\"%d\"/>\n",
212 node_name,
213 layout_values->show_empty ? "true" : "false",
214 layout_values->inline_menus ? "true" : "false",
215 layout_values->inline_header ? "true" : "false",
216 layout_values->inline_alias ? "true" : "false",
217 layout_values->inline_limit);
218 }
219 }
220
221 static void
222 append_merge (MenuLayoutNode *node,
223 int depth,
224 const char *node_name,
225 MenuLayoutMergeType merge_type,
226 GString *str)
227 {
228 const char *merge_type_str;
229
230 merge_type_str = NULL;
231
232 switch (merge_type)
233 {
234 case MENU_LAYOUT_MERGE_NONE:
235 merge_type_str = "none";
236 break;
237
238 case MENU_LAYOUT_MERGE_MENUS:
239 merge_type_str = "menus";
240 break;
241
242 case MENU_LAYOUT_MERGE_FILES:
243 merge_type_str = "files";
244 break;
245
246 case MENU_LAYOUT_MERGE_ALL:
247 merge_type_str = "all";
248 break;
249
250 default:
251 g_assert_not_reached ();
252 break;
253 }
254
255 append_simple_with_attr (node, depth, node_name, "type", merge_type_str, str);
256 }
257
258 static void
259 append_simple (MenuLayoutNode *node,
260 int depth,
261 const char *node_name,
262 GString *str)
263 {
264 append_simple_with_attr (node, depth, node_name, NULL, NULL, str);
265 }
266
267 static void
268 append_start (MenuLayoutNode *node,
269 int depth,
270 const char *node_name,
271 GString *str)
272 {
273 append_spaces (str, depth);
274
275 g_string_append_printf (str, "<%s>\n", node_name);
276 }
277
278 static void
279 append_end (MenuLayoutNode *node,
280 int depth,
281 const char *node_name,
282 GString *str)
283 {
284 append_spaces (str, depth);
285
286 g_string_append_printf (str, "</%s>\n", node_name);
287 }
288
289 static void
290 append_container (MenuLayoutNode *node,
291 gboolean onelevel,
292 int depth,
293 const char *node_name,
294 GString *str)
295 {
296 append_start (node, depth, node_name, str);
297 if (!onelevel)
298 {
299 append_children (node, depth + 2, str);
300 append_end (node, depth, node_name, str);
301 }
302 }
303
304 static void
305 append_to_string (MenuLayoutNode *node,
306 gboolean onelevel,
307 int depth,
308 GString *str)
309 {
310 MenuLayoutValues layout_values;
311
312 switch (menu_layout_node_get_type (node))
313 {
314 case MENU_LAYOUT_NODE_ROOT:
315 if (!onelevel)
316 append_children (node, depth - 1, str); /* -1 to ignore depth of root */
317 else
318 append_start (node, depth - 1, "Root", str);
319 break;
320
321 case MENU_LAYOUT_NODE_PASSTHROUGH:
322 g_string_append (str,
323 menu_layout_node_get_content (node));
324 g_string_append_c (str, '\n');
325 break;
326
327 case MENU_LAYOUT_NODE_MENU:
328 append_container (node, onelevel, depth, "Menu", str);
329 break;
330
331 case MENU_LAYOUT_NODE_APP_DIR:
332 append_simple (node, depth, "AppDir", str);
333 break;
334
335 case MENU_LAYOUT_NODE_DEFAULT_APP_DIRS:
336 append_simple (node, depth, "DefaultAppDirs", str);
337 break;
338
339 case MENU_LAYOUT_NODE_DIRECTORY_DIR:
340 append_simple (node, depth, "DirectoryDir", str);
341 break;
342
343 case MENU_LAYOUT_NODE_DEFAULT_DIRECTORY_DIRS:
344 append_simple (node, depth, "DefaultDirectoryDirs", str);
345 break;
346
347 case MENU_LAYOUT_NODE_DEFAULT_MERGE_DIRS:
348 append_simple (node, depth, "DefaultMergeDirs", str);
349 break;
350
351 case MENU_LAYOUT_NODE_NAME:
352 append_simple (node, depth, "Name", str);
353 break;
354
355 case MENU_LAYOUT_NODE_DIRECTORY:
356 append_simple (node, depth, "Directory", str);
357 break;
358
359 case MENU_LAYOUT_NODE_ONLY_UNALLOCATED:
360 append_simple (node, depth, "OnlyUnallocated", str);
361 break;
362
363 case MENU_LAYOUT_NODE_NOT_ONLY_UNALLOCATED:
364 append_simple (node, depth, "NotOnlyUnallocated", str);
365 break;
366
367 case MENU_LAYOUT_NODE_INCLUDE:
368 append_container (node, onelevel, depth, "Include", str);
369 break;
370
371 case MENU_LAYOUT_NODE_EXCLUDE:
372 append_container (node, onelevel, depth, "Exclude", str);
373 break;
374
375 case MENU_LAYOUT_NODE_FILENAME:
376 append_simple (node, depth, "Filename", str);
377 break;
378
379 case MENU_LAYOUT_NODE_CATEGORY:
380 append_simple (node, depth, "Category", str);
381 break;
382
383 case MENU_LAYOUT_NODE_ALL:
384 append_simple (node, depth, "All", str);
385 break;
386
387 case MENU_LAYOUT_NODE_AND:
388 append_container (node, onelevel, depth, "And", str);
389 break;
390
391 case MENU_LAYOUT_NODE_OR:
392 append_container (node, onelevel, depth, "Or", str);
393 break;
394
395 case MENU_LAYOUT_NODE_NOT:
396 append_container (node, onelevel, depth, "Not", str);
397 break;
398
399 case MENU_LAYOUT_NODE_MERGE_FILE:
400 {
401 MenuMergeFileType type;
402
403 type = menu_layout_node_merge_file_get_type (node);
404
405 append_simple_with_attr (node, depth, "MergeFile",
406 "type", type == MENU_MERGE_FILE_TYPE_PARENT ? "parent" : "path",
407 str);
408 break;
409 }
410
411 case MENU_LAYOUT_NODE_MERGE_DIR:
412 append_simple (node, depth, "MergeDir", str);
413 break;
414
415 case MENU_LAYOUT_NODE_LEGACY_DIR:
416 append_simple_with_attr (node, depth, "LegacyDir",
417 "prefix", menu_layout_node_legacy_dir_get_prefix (node),
418 str);
419 break;
420
421 case MENU_LAYOUT_NODE_KDE_LEGACY_DIRS:
422 append_simple (node, depth, "KDELegacyDirs", str);
423 break;
424
425 case MENU_LAYOUT_NODE_MOVE:
426 append_container (node, onelevel, depth, "Move", str);
427 break;
428
429 case MENU_LAYOUT_NODE_OLD:
430 append_simple (node, depth, "Old", str);
431 break;
432
433 case MENU_LAYOUT_NODE_NEW:
434 append_simple (node, depth, "New", str);
435 break;
436
437 case MENU_LAYOUT_NODE_DELETED:
438 append_simple (node, depth, "Deleted", str);
439 break;
440
441 case MENU_LAYOUT_NODE_NOT_DELETED:
442 append_simple (node, depth, "NotDeleted", str);
443 break;
444
445 case MENU_LAYOUT_NODE_LAYOUT:
446 append_container (node, onelevel, depth, "Layout", str);
447 break;
448
449 case MENU_LAYOUT_NODE_DEFAULT_LAYOUT:
450 menu_layout_node_default_layout_get_values (node, &layout_values);
451 append_layout (node, depth, "DefaultLayout", &layout_values, str);
452 break;
453
454 case MENU_LAYOUT_NODE_MENUNAME:
455 menu_layout_node_menuname_get_values (node, &layout_values);
456 append_layout (node, depth, "MenuName", &layout_values, str);
457 break;
458
459 case MENU_LAYOUT_NODE_SEPARATOR:
460 append_simple (node, depth, "Name", str);
461 break;
462
463 case MENU_LAYOUT_NODE_MERGE:
464 append_merge (node,
465 depth,
466 "Merge",
467 menu_layout_node_merge_get_type (node),
468 str);
469 break;
470
471 default:
472 g_assert_not_reached ();
473 break;
474 }
475 }
476
477 void
478 menu_debug_print_layout (MenuLayoutNode *node,
479 gboolean onelevel)
480 {
481 if (menu_verbose_enabled ())
482 {
483 GString *str;
484
485 str = g_string_new (NULL);
486 append_to_string (node, onelevel, 0, str);
487
488 utf8_fputs (str->str, stderr);
489 fflush (stderr);
490
491 g_string_free (str, TRUE);
492 }
493 }
494
495 #endif /* G_ENABLE_DEBUG */
0 /* Random utility functions for menu code */
1
2 /*
3 * Copyright (C) 2003 Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library 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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21 #ifndef __MENU_UTIL_H__
22 #define __MENU_UTIL_H__
23
24 #include <glib.h>
25
26 #include "menu-layout.h"
27
28 G_BEGIN_DECLS
29
30 #ifdef G_ENABLE_DEBUG
31
32 void menu_verbose (const char *format, ...) G_GNUC_PRINTF (1, 2);
33
34 void menu_debug_print_layout (MenuLayoutNode *node,
35 gboolean onelevel);
36
37 #else /* !defined(G_ENABLE_DEBUG) */
38
39 #ifdef G_HAVE_ISO_VARARGS
40 #define menu_verbose(...)
41 #elif defined(G_HAVE_GNUC_VARARGS)
42 #define menu_verbose(format...)
43 #else
44 #error "Cannot disable verbose mode due to lack of varargs macros"
45 #endif
46
47 #define menu_debug_print_layout(n,o)
48
49 #endif /* G_ENABLE_DEBUG */
50
51 G_END_DECLS
52
53 #endif /* __MENU_UTIL_H__ */
0
1 # libtool (GNU libtool) 2.4.2
2 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
6 # This is free software; see the source for copying conditions. There is NO
7 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8
9 # GNU Libtool is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # As a special exception to the GNU General Public License,
15 # if you distribute this file as part of a program or library that
16 # is built using GNU Libtool, you may include this file under the
17 # same distribution terms that you use for the rest of that program.
18 #
19 # GNU Libtool is distributed in the hope that it will be useful, but
20 # WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 # General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with GNU Libtool; see the file COPYING. If not, a copy
26 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
27 # or obtained by writing to the Free Software Foundation, Inc.,
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
30 # Usage: $progname [OPTION]... [MODE-ARG]...
31 #
32 # Provide generalized library-building support services.
33 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --no-warn don't display warning messages
44 # --tag=TAG use configuration variables from tag TAG
45 # -v, --verbose print more informational messages than default
46 # --no-verbose don't print the extra informational messages
47 # --version print version information
48 # -h, --help, --help-all print short, long, or detailed help message
49 #
50 # MODE must be one of the following:
51 #
52 # clean remove files from the build directory
53 # compile compile a source file into a libtool object
54 # execute automatically set library path, then run a program
55 # finish complete the installation of libtool libraries
56 # install install libraries or executables
57 # link create a library or an executable
58 # uninstall remove libraries from an installed directory
59 #
60 # MODE-ARGS vary depending on the MODE. When passed as first option,
61 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
62 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
63 #
64 # When reporting a bug, please describe a test case to reproduce it and
65 # include the following information:
66 #
67 # host-triplet: $host
68 # shell: $SHELL
69 # compiler: $LTCC
70 # compiler flags: $LTCFLAGS
71 # linker: $LD (gnu? $with_gnu_ld)
72 # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3ubuntu1
73 # automake: $automake_version
74 # autoconf: $autoconf_version
75 #
76 # Report bugs to <bug-libtool@gnu.org>.
77 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
78 # General help using GNU software: <http://www.gnu.org/gethelp/>.
79
80 PROGRAM=libtool
81 PACKAGE=libtool
82 VERSION="2.4.2 Debian-2.4.2-1.3ubuntu1"
83 TIMESTAMP=""
84 package_revision=1.3337
85
86 # Be Bourne compatible
87 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
88 emulate sh
89 NULLCMD=:
90 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
91 # is contrary to our usage. Disable this feature.
92 alias -g '${1+"$@"}'='"$@"'
93 setopt NO_GLOB_SUBST
94 else
95 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
96 fi
97 BIN_SH=xpg4; export BIN_SH # for Tru64
98 DUALCASE=1; export DUALCASE # for MKS sh
99
100 # A function that is used when there is no print builtin or printf.
101 func_fallback_echo ()
102 {
103 eval 'cat <<_LTECHO_EOF
104 $1
105 _LTECHO_EOF'
106 }
107
108 # NLS nuisances: We save the old values to restore during execute mode.
109 lt_user_locale=
110 lt_safe_locale=
111 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
112 do
113 eval "if test \"\${$lt_var+set}\" = set; then
114 save_$lt_var=\$$lt_var
115 $lt_var=C
116 export $lt_var
117 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
118 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
119 fi"
120 done
121 LC_ALL=C
122 LANGUAGE=C
123 export LANGUAGE LC_ALL
124
125 $lt_unset CDPATH
126
127
128 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
129 # is ksh but when the shell is invoked as "sh" and the current value of
130 # the _XPG environment variable is not equal to 1 (one), the special
131 # positional parameter $0, within a function call, is the name of the
132 # function.
133 progpath="$0"
134
135
136
137 : ${CP="cp -f"}
138 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
139 : ${MAKE="make"}
140 : ${MKDIR="mkdir"}
141 : ${MV="mv -f"}
142 : ${RM="rm -f"}
143 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
144 : ${Xsed="$SED -e 1s/^X//"}
145
146 # Global variables:
147 EXIT_SUCCESS=0
148 EXIT_FAILURE=1
149 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
150 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
151
152 exit_status=$EXIT_SUCCESS
153
154 # Make sure IFS has a sensible default
155 lt_nl='
156 '
157 IFS=" $lt_nl"
158
159 dirname="s,/[^/]*$,,"
160 basename="s,^.*/,,"
161
162 # func_dirname file append nondir_replacement
163 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
164 # otherwise set result to NONDIR_REPLACEMENT.
165 func_dirname ()
166 {
167 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
168 if test "X$func_dirname_result" = "X${1}"; then
169 func_dirname_result="${3}"
170 else
171 func_dirname_result="$func_dirname_result${2}"
172 fi
173 } # func_dirname may be replaced by extended shell implementation
174
175
176 # func_basename file
177 func_basename ()
178 {
179 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
180 } # func_basename may be replaced by extended shell implementation
181
182
183 # func_dirname_and_basename file append nondir_replacement
184 # perform func_basename and func_dirname in a single function
185 # call:
186 # dirname: Compute the dirname of FILE. If nonempty,
187 # add APPEND to the result, otherwise set result
188 # to NONDIR_REPLACEMENT.
189 # value returned in "$func_dirname_result"
190 # basename: Compute filename of FILE.
191 # value retuned in "$func_basename_result"
192 # Implementation must be kept synchronized with func_dirname
193 # and func_basename. For efficiency, we do not delegate to
194 # those functions but instead duplicate the functionality here.
195 func_dirname_and_basename ()
196 {
197 # Extract subdirectory from the argument.
198 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
199 if test "X$func_dirname_result" = "X${1}"; then
200 func_dirname_result="${3}"
201 else
202 func_dirname_result="$func_dirname_result${2}"
203 fi
204 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
205 } # func_dirname_and_basename may be replaced by extended shell implementation
206
207
208 # func_stripname prefix suffix name
209 # strip PREFIX and SUFFIX off of NAME.
210 # PREFIX and SUFFIX must not contain globbing or regex special
211 # characters, hashes, percent signs, but SUFFIX may contain a leading
212 # dot (in which case that matches only a dot).
213 # func_strip_suffix prefix name
214 func_stripname ()
215 {
216 case ${2} in
217 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
218 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
219 esac
220 } # func_stripname may be replaced by extended shell implementation
221
222
223 # These SED scripts presuppose an absolute path with a trailing slash.
224 pathcar='s,^/\([^/]*\).*$,\1,'
225 pathcdr='s,^/[^/]*,,'
226 removedotparts=':dotsl
227 s@/\./@/@g
228 t dotsl
229 s,/\.$,/,'
230 collapseslashes='s@/\{1,\}@/@g'
231 finalslash='s,/*$,/,'
232
233 # func_normal_abspath PATH
234 # Remove doubled-up and trailing slashes, "." path components,
235 # and cancel out any ".." path components in PATH after making
236 # it an absolute path.
237 # value returned in "$func_normal_abspath_result"
238 func_normal_abspath ()
239 {
240 # Start from root dir and reassemble the path.
241 func_normal_abspath_result=
242 func_normal_abspath_tpath=$1
243 func_normal_abspath_altnamespace=
244 case $func_normal_abspath_tpath in
245 "")
246 # Empty path, that just means $cwd.
247 func_stripname '' '/' "`pwd`"
248 func_normal_abspath_result=$func_stripname_result
249 return
250 ;;
251 # The next three entries are used to spot a run of precisely
252 # two leading slashes without using negated character classes;
253 # we take advantage of case's first-match behaviour.
254 ///*)
255 # Unusual form of absolute path, do nothing.
256 ;;
257 //*)
258 # Not necessarily an ordinary path; POSIX reserves leading '//'
259 # and for example Cygwin uses it to access remote file shares
260 # over CIFS/SMB, so we conserve a leading double slash if found.
261 func_normal_abspath_altnamespace=/
262 ;;
263 /*)
264 # Absolute path, do nothing.
265 ;;
266 *)
267 # Relative path, prepend $cwd.
268 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
269 ;;
270 esac
271 # Cancel out all the simple stuff to save iterations. We also want
272 # the path to end with a slash for ease of parsing, so make sure
273 # there is one (and only one) here.
274 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
275 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
276 while :; do
277 # Processed it all yet?
278 if test "$func_normal_abspath_tpath" = / ; then
279 # If we ascended to the root using ".." the result may be empty now.
280 if test -z "$func_normal_abspath_result" ; then
281 func_normal_abspath_result=/
282 fi
283 break
284 fi
285 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
286 -e "$pathcar"`
287 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
288 -e "$pathcdr"`
289 # Figure out what to do with it
290 case $func_normal_abspath_tcomponent in
291 "")
292 # Trailing empty path component, ignore it.
293 ;;
294 ..)
295 # Parent dir; strip last assembled component from result.
296 func_dirname "$func_normal_abspath_result"
297 func_normal_abspath_result=$func_dirname_result
298 ;;
299 *)
300 # Actual path component, append it.
301 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
302 ;;
303 esac
304 done
305 # Restore leading double-slash if one was found on entry.
306 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
307 }
308
309 # func_relative_path SRCDIR DSTDIR
310 # generates a relative path from SRCDIR to DSTDIR, with a trailing
311 # slash if non-empty, suitable for immediately appending a filename
312 # without needing to append a separator.
313 # value returned in "$func_relative_path_result"
314 func_relative_path ()
315 {
316 func_relative_path_result=
317 func_normal_abspath "$1"
318 func_relative_path_tlibdir=$func_normal_abspath_result
319 func_normal_abspath "$2"
320 func_relative_path_tbindir=$func_normal_abspath_result
321
322 # Ascend the tree starting from libdir
323 while :; do
324 # check if we have found a prefix of bindir
325 case $func_relative_path_tbindir in
326 $func_relative_path_tlibdir)
327 # found an exact match
328 func_relative_path_tcancelled=
329 break
330 ;;
331 $func_relative_path_tlibdir*)
332 # found a matching prefix
333 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
334 func_relative_path_tcancelled=$func_stripname_result
335 if test -z "$func_relative_path_result"; then
336 func_relative_path_result=.
337 fi
338 break
339 ;;
340 *)
341 func_dirname $func_relative_path_tlibdir
342 func_relative_path_tlibdir=${func_dirname_result}
343 if test "x$func_relative_path_tlibdir" = x ; then
344 # Have to descend all the way to the root!
345 func_relative_path_result=../$func_relative_path_result
346 func_relative_path_tcancelled=$func_relative_path_tbindir
347 break
348 fi
349 func_relative_path_result=../$func_relative_path_result
350 ;;
351 esac
352 done
353
354 # Now calculate path; take care to avoid doubling-up slashes.
355 func_stripname '' '/' "$func_relative_path_result"
356 func_relative_path_result=$func_stripname_result
357 func_stripname '/' '/' "$func_relative_path_tcancelled"
358 if test "x$func_stripname_result" != x ; then
359 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
360 fi
361
362 # Normalisation. If bindir is libdir, return empty string,
363 # else relative path ending with a slash; either way, target
364 # file name can be directly appended.
365 if test ! -z "$func_relative_path_result"; then
366 func_stripname './' '' "$func_relative_path_result/"
367 func_relative_path_result=$func_stripname_result
368 fi
369 }
370
371 # The name of this program:
372 func_dirname_and_basename "$progpath"
373 progname=$func_basename_result
374
375 # Make sure we have an absolute path for reexecution:
376 case $progpath in
377 [\\/]*|[A-Za-z]:\\*) ;;
378 *[\\/]*)
379 progdir=$func_dirname_result
380 progdir=`cd "$progdir" && pwd`
381 progpath="$progdir/$progname"
382 ;;
383 *)
384 save_IFS="$IFS"
385 IFS=${PATH_SEPARATOR-:}
386 for progdir in $PATH; do
387 IFS="$save_IFS"
388 test -x "$progdir/$progname" && break
389 done
390 IFS="$save_IFS"
391 test -n "$progdir" || progdir=`pwd`
392 progpath="$progdir/$progname"
393 ;;
394 esac
395
396 # Sed substitution that helps us do robust quoting. It backslashifies
397 # metacharacters that are still active within double-quoted strings.
398 Xsed="${SED}"' -e 1s/^X//'
399 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
400
401 # Same as above, but do not quote variable references.
402 double_quote_subst='s/\(["`\\]\)/\\\1/g'
403
404 # Sed substitution that turns a string into a regex matching for the
405 # string literally.
406 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
407
408 # Sed substitution that converts a w32 file name or path
409 # which contains forward slashes, into one that contains
410 # (escaped) backslashes. A very naive implementation.
411 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
412
413 # Re-`\' parameter expansions in output of double_quote_subst that were
414 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
415 # in input to double_quote_subst, that '$' was protected from expansion.
416 # Since each input `\' is now two `\'s, look for any number of runs of
417 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
418 bs='\\'
419 bs2='\\\\'
420 bs4='\\\\\\\\'
421 dollar='\$'
422 sed_double_backslash="\
423 s/$bs4/&\\
424 /g
425 s/^$bs2$dollar/$bs&/
426 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
427 s/\n//g"
428
429 # Standard options:
430 opt_dry_run=false
431 opt_help=false
432 opt_quiet=false
433 opt_verbose=false
434 opt_warning=:
435
436 # func_echo arg...
437 # Echo program name prefixed message, along with the current mode
438 # name if it has been set yet.
439 func_echo ()
440 {
441 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
442 }
443
444 # func_verbose arg...
445 # Echo program name prefixed message in verbose mode only.
446 func_verbose ()
447 {
448 $opt_verbose && func_echo ${1+"$@"}
449
450 # A bug in bash halts the script if the last line of a function
451 # fails when set -e is in force, so we need another command to
452 # work around that:
453 :
454 }
455
456 # func_echo_all arg...
457 # Invoke $ECHO with all args, space-separated.
458 func_echo_all ()
459 {
460 $ECHO "$*"
461 }
462
463 # func_error arg...
464 # Echo program name prefixed message to standard error.
465 func_error ()
466 {
467 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
468 }
469
470 # func_warning arg...
471 # Echo program name prefixed warning message to standard error.
472 func_warning ()
473 {
474 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
475
476 # bash bug again:
477 :
478 }
479
480 # func_fatal_error arg...
481 # Echo program name prefixed message to standard error, and exit.
482 func_fatal_error ()
483 {
484 func_error ${1+"$@"}
485 exit $EXIT_FAILURE
486 }
487
488 # func_fatal_help arg...
489 # Echo program name prefixed message to standard error, followed by
490 # a help hint, and exit.
491 func_fatal_help ()
492 {
493 func_error ${1+"$@"}
494 func_fatal_error "$help"
495 }
496 help="Try \`$progname --help' for more information." ## default
497
498
499 # func_grep expression filename
500 # Check whether EXPRESSION matches any line of FILENAME, without output.
501 func_grep ()
502 {
503 $GREP "$1" "$2" >/dev/null 2>&1
504 }
505
506
507 # func_mkdir_p directory-path
508 # Make sure the entire path to DIRECTORY-PATH is available.
509 func_mkdir_p ()
510 {
511 my_directory_path="$1"
512 my_dir_list=
513
514 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
515
516 # Protect directory names starting with `-'
517 case $my_directory_path in
518 -*) my_directory_path="./$my_directory_path" ;;
519 esac
520
521 # While some portion of DIR does not yet exist...
522 while test ! -d "$my_directory_path"; do
523 # ...make a list in topmost first order. Use a colon delimited
524 # list incase some portion of path contains whitespace.
525 my_dir_list="$my_directory_path:$my_dir_list"
526
527 # If the last portion added has no slash in it, the list is done
528 case $my_directory_path in */*) ;; *) break ;; esac
529
530 # ...otherwise throw away the child directory and loop
531 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
532 done
533 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
534
535 save_mkdir_p_IFS="$IFS"; IFS=':'
536 for my_dir in $my_dir_list; do
537 IFS="$save_mkdir_p_IFS"
538 # mkdir can fail with a `File exist' error if two processes
539 # try to create one of the directories concurrently. Don't
540 # stop in that case!
541 $MKDIR "$my_dir" 2>/dev/null || :
542 done
543 IFS="$save_mkdir_p_IFS"
544
545 # Bail out if we (or some other process) failed to create a directory.
546 test -d "$my_directory_path" || \
547 func_fatal_error "Failed to create \`$1'"
548 fi
549 }
550
551
552 # func_mktempdir [string]
553 # Make a temporary directory that won't clash with other running
554 # libtool processes, and avoids race conditions if possible. If
555 # given, STRING is the basename for that directory.
556 func_mktempdir ()
557 {
558 my_template="${TMPDIR-/tmp}/${1-$progname}"
559
560 if test "$opt_dry_run" = ":"; then
561 # Return a directory name, but don't create it in dry-run mode
562 my_tmpdir="${my_template}-$$"
563 else
564
565 # If mktemp works, use that first and foremost
566 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
567
568 if test ! -d "$my_tmpdir"; then
569 # Failing that, at least try and use $RANDOM to avoid a race
570 my_tmpdir="${my_template}-${RANDOM-0}$$"
571
572 save_mktempdir_umask=`umask`
573 umask 0077
574 $MKDIR "$my_tmpdir"
575 umask $save_mktempdir_umask
576 fi
577
578 # If we're not in dry-run mode, bomb out on failure
579 test -d "$my_tmpdir" || \
580 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
581 fi
582
583 $ECHO "$my_tmpdir"
584 }
585
586
587 # func_quote_for_eval arg
588 # Aesthetically quote ARG to be evaled later.
589 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
590 # is double-quoted, suitable for a subsequent eval, whereas
591 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
592 # which are still active within double quotes backslashified.
593 func_quote_for_eval ()
594 {
595 case $1 in
596 *[\\\`\"\$]*)
597 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
598 *)
599 func_quote_for_eval_unquoted_result="$1" ;;
600 esac
601
602 case $func_quote_for_eval_unquoted_result in
603 # Double-quote args containing shell metacharacters to delay
604 # word splitting, command substitution and and variable
605 # expansion for a subsequent eval.
606 # Many Bourne shells cannot handle close brackets correctly
607 # in scan sets, so we specify it separately.
608 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
609 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
610 ;;
611 *)
612 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
613 esac
614 }
615
616
617 # func_quote_for_expand arg
618 # Aesthetically quote ARG to be evaled later; same as above,
619 # but do not quote variable references.
620 func_quote_for_expand ()
621 {
622 case $1 in
623 *[\\\`\"]*)
624 my_arg=`$ECHO "$1" | $SED \
625 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
626 *)
627 my_arg="$1" ;;
628 esac
629
630 case $my_arg in
631 # Double-quote args containing shell metacharacters to delay
632 # word splitting and command substitution for a subsequent eval.
633 # Many Bourne shells cannot handle close brackets correctly
634 # in scan sets, so we specify it separately.
635 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
636 my_arg="\"$my_arg\""
637 ;;
638 esac
639
640 func_quote_for_expand_result="$my_arg"
641 }
642
643
644 # func_show_eval cmd [fail_exp]
645 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
646 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
647 # is given, then evaluate it.
648 func_show_eval ()
649 {
650 my_cmd="$1"
651 my_fail_exp="${2-:}"
652
653 ${opt_silent-false} || {
654 func_quote_for_expand "$my_cmd"
655 eval "func_echo $func_quote_for_expand_result"
656 }
657
658 if ${opt_dry_run-false}; then :; else
659 eval "$my_cmd"
660 my_status=$?
661 if test "$my_status" -eq 0; then :; else
662 eval "(exit $my_status); $my_fail_exp"
663 fi
664 fi
665 }
666
667
668 # func_show_eval_locale cmd [fail_exp]
669 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
670 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
671 # is given, then evaluate it. Use the saved locale for evaluation.
672 func_show_eval_locale ()
673 {
674 my_cmd="$1"
675 my_fail_exp="${2-:}"
676
677 ${opt_silent-false} || {
678 func_quote_for_expand "$my_cmd"
679 eval "func_echo $func_quote_for_expand_result"
680 }
681
682 if ${opt_dry_run-false}; then :; else
683 eval "$lt_user_locale
684 $my_cmd"
685 my_status=$?
686 eval "$lt_safe_locale"
687 if test "$my_status" -eq 0; then :; else
688 eval "(exit $my_status); $my_fail_exp"
689 fi
690 fi
691 }
692
693 # func_tr_sh
694 # Turn $1 into a string suitable for a shell variable name.
695 # Result is stored in $func_tr_sh_result. All characters
696 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
697 # if $1 begins with a digit, a '_' is prepended as well.
698 func_tr_sh ()
699 {
700 case $1 in
701 [0-9]* | *[!a-zA-Z0-9_]*)
702 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
703 ;;
704 * )
705 func_tr_sh_result=$1
706 ;;
707 esac
708 }
709
710
711 # func_version
712 # Echo version message to standard output and exit.
713 func_version ()
714 {
715 $opt_debug
716
717 $SED -n '/(C)/!b go
718 :more
719 /\./!{
720 N
721 s/\n# / /
722 b more
723 }
724 :go
725 /^# '$PROGRAM' (GNU /,/# warranty; / {
726 s/^# //
727 s/^# *$//
728 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
729 p
730 }' < "$progpath"
731 exit $?
732 }
733
734 # func_usage
735 # Echo short help message to standard output and exit.
736 func_usage ()
737 {
738 $opt_debug
739
740 $SED -n '/^# Usage:/,/^# *.*--help/ {
741 s/^# //
742 s/^# *$//
743 s/\$progname/'$progname'/
744 p
745 }' < "$progpath"
746 echo
747 $ECHO "run \`$progname --help | more' for full usage"
748 exit $?
749 }
750
751 # func_help [NOEXIT]
752 # Echo long help message to standard output and exit,
753 # unless 'noexit' is passed as argument.
754 func_help ()
755 {
756 $opt_debug
757
758 $SED -n '/^# Usage:/,/# Report bugs to/ {
759 :print
760 s/^# //
761 s/^# *$//
762 s*\$progname*'$progname'*
763 s*\$host*'"$host"'*
764 s*\$SHELL*'"$SHELL"'*
765 s*\$LTCC*'"$LTCC"'*
766 s*\$LTCFLAGS*'"$LTCFLAGS"'*
767 s*\$LD*'"$LD"'*
768 s/\$with_gnu_ld/'"$with_gnu_ld"'/
769 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
770 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
771 p
772 d
773 }
774 /^# .* home page:/b print
775 /^# General help using/b print
776 ' < "$progpath"
777 ret=$?
778 if test -z "$1"; then
779 exit $ret
780 fi
781 }
782
783 # func_missing_arg argname
784 # Echo program name prefixed message to standard error and set global
785 # exit_cmd.
786 func_missing_arg ()
787 {
788 $opt_debug
789
790 func_error "missing argument for $1."
791 exit_cmd=exit
792 }
793
794
795 # func_split_short_opt shortopt
796 # Set func_split_short_opt_name and func_split_short_opt_arg shell
797 # variables after splitting SHORTOPT after the 2nd character.
798 func_split_short_opt ()
799 {
800 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
801 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
802
803 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
804 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
805 } # func_split_short_opt may be replaced by extended shell implementation
806
807
808 # func_split_long_opt longopt
809 # Set func_split_long_opt_name and func_split_long_opt_arg shell
810 # variables after splitting LONGOPT at the `=' sign.
811 func_split_long_opt ()
812 {
813 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
814 my_sed_long_arg='1s/^--[^=]*=//'
815
816 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
817 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
818 } # func_split_long_opt may be replaced by extended shell implementation
819
820 exit_cmd=:
821
822
823
824
825
826 magic="%%%MAGIC variable%%%"
827 magic_exe="%%%MAGIC EXE variable%%%"
828
829 # Global variables.
830 nonopt=
831 preserve_args=
832 lo2o="s/\\.lo\$/.${objext}/"
833 o2lo="s/\\.${objext}\$/.lo/"
834 extracted_archives=
835 extracted_serial=0
836
837 # If this variable is set in any of the actions, the command in it
838 # will be execed at the end. This prevents here-documents from being
839 # left over by shells.
840 exec_cmd=
841
842 # func_append var value
843 # Append VALUE to the end of shell variable VAR.
844 func_append ()
845 {
846 eval "${1}=\$${1}\${2}"
847 } # func_append may be replaced by extended shell implementation
848
849 # func_append_quoted var value
850 # Quote VALUE and append to the end of shell variable VAR, separated
851 # by a space.
852 func_append_quoted ()
853 {
854 func_quote_for_eval "${2}"
855 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
856 } # func_append_quoted may be replaced by extended shell implementation
857
858
859 # func_arith arithmetic-term...
860 func_arith ()
861 {
862 func_arith_result=`expr "${@}"`
863 } # func_arith may be replaced by extended shell implementation
864
865
866 # func_len string
867 # STRING may not start with a hyphen.
868 func_len ()
869 {
870 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
871 } # func_len may be replaced by extended shell implementation
872
873
874 # func_lo2o object
875 func_lo2o ()
876 {
877 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
878 } # func_lo2o may be replaced by extended shell implementation
879
880
881 # func_xform libobj-or-source
882 func_xform ()
883 {
884 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
885 } # func_xform may be replaced by extended shell implementation
886
887
888 # func_fatal_configuration arg...
889 # Echo program name prefixed message to standard error, followed by
890 # a configuration failure hint, and exit.
891 func_fatal_configuration ()
892 {
893 func_error ${1+"$@"}
894 func_error "See the $PACKAGE documentation for more information."
895 func_fatal_error "Fatal configuration error."
896 }
897
898
899 # func_config
900 # Display the configuration for all the tags in this script.
901 func_config ()
902 {
903 re_begincf='^# ### BEGIN LIBTOOL'
904 re_endcf='^# ### END LIBTOOL'
905
906 # Default configuration.
907 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
908
909 # Now print the configurations for the tags.
910 for tagname in $taglist; do
911 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
912 done
913
914 exit $?
915 }
916
917 # func_features
918 # Display the features supported by this script.
919 func_features ()
920 {
921 echo "host: $host"
922 if test "$build_libtool_libs" = yes; then
923 echo "enable shared libraries"
924 else
925 echo "disable shared libraries"
926 fi
927 if test "$build_old_libs" = yes; then
928 echo "enable static libraries"
929 else
930 echo "disable static libraries"
931 fi
932
933 exit $?
934 }
935
936 # func_enable_tag tagname
937 # Verify that TAGNAME is valid, and either flag an error and exit, or
938 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
939 # variable here.
940 func_enable_tag ()
941 {
942 # Global variable:
943 tagname="$1"
944
945 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
946 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
947 sed_extractcf="/$re_begincf/,/$re_endcf/p"
948
949 # Validate tagname.
950 case $tagname in
951 *[!-_A-Za-z0-9,/]*)
952 func_fatal_error "invalid tag name: $tagname"
953 ;;
954 esac
955
956 # Don't test for the "default" C tag, as we know it's
957 # there but not specially marked.
958 case $tagname in
959 CC) ;;
960 *)
961 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
962 taglist="$taglist $tagname"
963
964 # Evaluate the configuration. Be careful to quote the path
965 # and the sed script, to avoid splitting on whitespace, but
966 # also don't use non-portable quotes within backquotes within
967 # quotes we have to do it in 2 steps:
968 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
969 eval "$extractedcf"
970 else
971 func_error "ignoring unknown tag $tagname"
972 fi
973 ;;
974 esac
975 }
976
977 # func_check_version_match
978 # Ensure that we are using m4 macros, and libtool script from the same
979 # release of libtool.
980 func_check_version_match ()
981 {
982 if test "$package_revision" != "$macro_revision"; then
983 if test "$VERSION" != "$macro_version"; then
984 if test -z "$macro_version"; then
985 cat >&2 <<_LT_EOF
986 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
987 $progname: definition of this LT_INIT comes from an older release.
988 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
989 $progname: and run autoconf again.
990 _LT_EOF
991 else
992 cat >&2 <<_LT_EOF
993 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
994 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
995 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
996 $progname: and run autoconf again.
997 _LT_EOF
998 fi
999 else
1000 cat >&2 <<_LT_EOF
1001 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
1002 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
1003 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
1004 $progname: of $PACKAGE $VERSION and run autoconf again.
1005 _LT_EOF
1006 fi
1007
1008 exit $EXIT_MISMATCH
1009 fi
1010 }
1011
1012
1013 # Shorthand for --mode=foo, only valid as the first argument
1014 case $1 in
1015 clean|clea|cle|cl)
1016 shift; set dummy --mode clean ${1+"$@"}; shift
1017 ;;
1018 compile|compil|compi|comp|com|co|c)
1019 shift; set dummy --mode compile ${1+"$@"}; shift
1020 ;;
1021 execute|execut|execu|exec|exe|ex|e)
1022 shift; set dummy --mode execute ${1+"$@"}; shift
1023 ;;
1024 finish|finis|fini|fin|fi|f)
1025 shift; set dummy --mode finish ${1+"$@"}; shift
1026 ;;
1027 install|instal|insta|inst|ins|in|i)
1028 shift; set dummy --mode install ${1+"$@"}; shift
1029 ;;
1030 link|lin|li|l)
1031 shift; set dummy --mode link ${1+"$@"}; shift
1032 ;;
1033 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1034 shift; set dummy --mode uninstall ${1+"$@"}; shift
1035 ;;
1036 esac
1037
1038
1039
1040 # Option defaults:
1041 opt_debug=:
1042 opt_dry_run=false
1043 opt_config=false
1044 opt_preserve_dup_deps=false
1045 opt_features=false
1046 opt_finish=false
1047 opt_help=false
1048 opt_help_all=false
1049 opt_silent=:
1050 opt_warning=:
1051 opt_verbose=:
1052 opt_silent=false
1053 opt_verbose=false
1054
1055
1056 # Parse options once, thoroughly. This comes as soon as possible in the
1057 # script to make things like `--version' happen as quickly as we can.
1058 {
1059 # this just eases exit handling
1060 while test $# -gt 0; do
1061 opt="$1"
1062 shift
1063 case $opt in
1064 --debug|-x) opt_debug='set -x'
1065 func_echo "enabling shell trace mode"
1066 $opt_debug
1067 ;;
1068 --dry-run|--dryrun|-n)
1069 opt_dry_run=:
1070 ;;
1071 --config)
1072 opt_config=:
1073 func_config
1074 ;;
1075 --dlopen|-dlopen)
1076 optarg="$1"
1077 opt_dlopen="${opt_dlopen+$opt_dlopen
1078 }$optarg"
1079 shift
1080 ;;
1081 --preserve-dup-deps)
1082 opt_preserve_dup_deps=:
1083 ;;
1084 --features)
1085 opt_features=:
1086 func_features
1087 ;;
1088 --finish)
1089 opt_finish=:
1090 set dummy --mode finish ${1+"$@"}; shift
1091 ;;
1092 --help)
1093 opt_help=:
1094 ;;
1095 --help-all)
1096 opt_help_all=:
1097 opt_help=': help-all'
1098 ;;
1099 --mode)
1100 test $# = 0 && func_missing_arg $opt && break
1101 optarg="$1"
1102 opt_mode="$optarg"
1103 case $optarg in
1104 # Valid mode arguments:
1105 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1106
1107 # Catch anything else as an error
1108 *) func_error "invalid argument for $opt"
1109 exit_cmd=exit
1110 break
1111 ;;
1112 esac
1113 shift
1114 ;;
1115 --no-silent|--no-quiet)
1116 opt_silent=false
1117 func_append preserve_args " $opt"
1118 ;;
1119 --no-warning|--no-warn)
1120 opt_warning=false
1121 func_append preserve_args " $opt"
1122 ;;
1123 --no-verbose)
1124 opt_verbose=false
1125 func_append preserve_args " $opt"
1126 ;;
1127 --silent|--quiet)
1128 opt_silent=:
1129 func_append preserve_args " $opt"
1130 opt_verbose=false
1131 ;;
1132 --verbose|-v)
1133 opt_verbose=:
1134 func_append preserve_args " $opt"
1135 opt_silent=false
1136 ;;
1137 --tag)
1138 test $# = 0 && func_missing_arg $opt && break
1139 optarg="$1"
1140 opt_tag="$optarg"
1141 func_append preserve_args " $opt $optarg"
1142 func_enable_tag "$optarg"
1143 shift
1144 ;;
1145
1146 -\?|-h) func_usage ;;
1147 --help) func_help ;;
1148 --version) func_version ;;
1149
1150 # Separate optargs to long options:
1151 --*=*)
1152 func_split_long_opt "$opt"
1153 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1154 shift
1155 ;;
1156
1157 # Separate non-argument short options:
1158 -\?*|-h*|-n*|-v*)
1159 func_split_short_opt "$opt"
1160 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1161 shift
1162 ;;
1163
1164 --) break ;;
1165 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1166 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
1167 esac
1168 done
1169
1170 # Validate options:
1171
1172 # save first non-option argument
1173 if test "$#" -gt 0; then
1174 nonopt="$opt"
1175 shift
1176 fi
1177
1178 # preserve --debug
1179 test "$opt_debug" = : || func_append preserve_args " --debug"
1180
1181 case $host in
1182 *cygwin* | *mingw* | *pw32* | *cegcc*)
1183 # don't eliminate duplications in $postdeps and $predeps
1184 opt_duplicate_compiler_generated_deps=:
1185 ;;
1186 *)
1187 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1188 ;;
1189 esac
1190
1191 $opt_help || {
1192 # Sanity checks first:
1193 func_check_version_match
1194
1195 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1196 func_fatal_configuration "not configured to build any kind of library"
1197 fi
1198
1199 # Darwin sucks
1200 eval std_shrext=\"$shrext_cmds\"
1201
1202 # Only execute mode is allowed to have -dlopen flags.
1203 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1204 func_error "unrecognized option \`-dlopen'"
1205 $ECHO "$help" 1>&2
1206 exit $EXIT_FAILURE
1207 fi
1208
1209 # Change the help message to a mode-specific one.
1210 generic_help="$help"
1211 help="Try \`$progname --help --mode=$opt_mode' for more information."
1212 }
1213
1214
1215 # Bail if the options were screwed
1216 $exit_cmd $EXIT_FAILURE
1217 }
1218
1219
1220
1221
1222 ## ----------- ##
1223 ## Main. ##
1224 ## ----------- ##
1225
1226 # func_lalib_p file
1227 # True iff FILE is a libtool `.la' library or `.lo' object file.
1228 # This function is only a basic sanity check; it will hardly flush out
1229 # determined imposters.
1230 func_lalib_p ()
1231 {
1232 test -f "$1" &&
1233 $SED -e 4q "$1" 2>/dev/null \
1234 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
1235 }
1236
1237 # func_lalib_unsafe_p file
1238 # True iff FILE is a libtool `.la' library or `.lo' object file.
1239 # This function implements the same check as func_lalib_p without
1240 # resorting to external programs. To this end, it redirects stdin and
1241 # closes it afterwards, without saving the original file descriptor.
1242 # As a safety measure, use it only where a negative result would be
1243 # fatal anyway. Works if `file' does not exist.
1244 func_lalib_unsafe_p ()
1245 {
1246 lalib_p=no
1247 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
1248 for lalib_p_l in 1 2 3 4
1249 do
1250 read lalib_p_line
1251 case "$lalib_p_line" in
1252 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
1253 esac
1254 done
1255 exec 0<&5 5<&-
1256 fi
1257 test "$lalib_p" = yes
1258 }
1259
1260 # func_ltwrapper_script_p file
1261 # True iff FILE is a libtool wrapper script
1262 # This function is only a basic sanity check; it will hardly flush out
1263 # determined imposters.
1264 func_ltwrapper_script_p ()
1265 {
1266 func_lalib_p "$1"
1267 }
1268
1269 # func_ltwrapper_executable_p file
1270 # True iff FILE is a libtool wrapper executable
1271 # This function is only a basic sanity check; it will hardly flush out
1272 # determined imposters.
1273 func_ltwrapper_executable_p ()
1274 {
1275 func_ltwrapper_exec_suffix=
1276 case $1 in
1277 *.exe) ;;
1278 *) func_ltwrapper_exec_suffix=.exe ;;
1279 esac
1280 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
1281 }
1282
1283 # func_ltwrapper_scriptname file
1284 # Assumes file is an ltwrapper_executable
1285 # uses $file to determine the appropriate filename for a
1286 # temporary ltwrapper_script.
1287 func_ltwrapper_scriptname ()
1288 {
1289 func_dirname_and_basename "$1" "" "."
1290 func_stripname '' '.exe' "$func_basename_result"
1291 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
1292 }
1293
1294 # func_ltwrapper_p file
1295 # True iff FILE is a libtool wrapper script or wrapper executable
1296 # This function is only a basic sanity check; it will hardly flush out
1297 # determined imposters.
1298 func_ltwrapper_p ()
1299 {
1300 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
1301 }
1302
1303
1304 # func_execute_cmds commands fail_cmd
1305 # Execute tilde-delimited COMMANDS.
1306 # If FAIL_CMD is given, eval that upon failure.
1307 # FAIL_CMD may read-access the current command in variable CMD!
1308 func_execute_cmds ()
1309 {
1310 $opt_debug
1311 save_ifs=$IFS; IFS='~'
1312 for cmd in $1; do
1313 IFS=$save_ifs
1314 eval cmd=\"$cmd\"
1315 func_show_eval "$cmd" "${2-:}"
1316 done
1317 IFS=$save_ifs
1318 }
1319
1320
1321 # func_source file
1322 # Source FILE, adding directory component if necessary.
1323 # Note that it is not necessary on cygwin/mingw to append a dot to
1324 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
1325 # behavior happens only for exec(3), not for open(2)! Also, sourcing
1326 # `FILE.' does not work on cygwin managed mounts.
1327 func_source ()
1328 {
1329 $opt_debug
1330 case $1 in
1331 */* | *\\*) . "$1" ;;
1332 *) . "./$1" ;;
1333 esac
1334 }
1335
1336
1337 # func_resolve_sysroot PATH
1338 # Replace a leading = in PATH with a sysroot. Store the result into
1339 # func_resolve_sysroot_result
1340 func_resolve_sysroot ()
1341 {
1342 func_resolve_sysroot_result=$1
1343 case $func_resolve_sysroot_result in
1344 =*)
1345 func_stripname '=' '' "$func_resolve_sysroot_result"
1346 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
1347 ;;
1348 esac
1349 }
1350
1351 # func_replace_sysroot PATH
1352 # If PATH begins with the sysroot, replace it with = and
1353 # store the result into func_replace_sysroot_result.
1354 func_replace_sysroot ()
1355 {
1356 case "$lt_sysroot:$1" in
1357 ?*:"$lt_sysroot"*)
1358 func_stripname "$lt_sysroot" '' "$1"
1359 func_replace_sysroot_result="=$func_stripname_result"
1360 ;;
1361 *)
1362 # Including no sysroot.
1363 func_replace_sysroot_result=$1
1364 ;;
1365 esac
1366 }
1367
1368 # func_infer_tag arg
1369 # Infer tagged configuration to use if any are available and
1370 # if one wasn't chosen via the "--tag" command line option.
1371 # Only attempt this if the compiler in the base compile
1372 # command doesn't match the default compiler.
1373 # arg is usually of the form 'gcc ...'
1374 func_infer_tag ()
1375 {
1376 $opt_debug
1377 if test -n "$available_tags" && test -z "$tagname"; then
1378 CC_quoted=
1379 for arg in $CC; do
1380 func_append_quoted CC_quoted "$arg"
1381 done
1382 CC_expanded=`func_echo_all $CC`
1383 CC_quoted_expanded=`func_echo_all $CC_quoted`
1384 case $@ in
1385 # Blanks in the command may have been stripped by the calling shell,
1386 # but not from the CC environment variable when configure was run.
1387 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1388 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
1389 # Blanks at the start of $base_compile will cause this to fail
1390 # if we don't check for them as well.
1391 *)
1392 for z in $available_tags; do
1393 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
1394 # Evaluate the configuration.
1395 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
1396 CC_quoted=
1397 for arg in $CC; do
1398 # Double-quote args containing other shell metacharacters.
1399 func_append_quoted CC_quoted "$arg"
1400 done
1401 CC_expanded=`func_echo_all $CC`
1402 CC_quoted_expanded=`func_echo_all $CC_quoted`
1403 case "$@ " in
1404 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1405 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
1406 # The compiler in the base compile command matches
1407 # the one in the tagged configuration.
1408 # Assume this is the tagged configuration we want.
1409 tagname=$z
1410 break
1411 ;;
1412 esac
1413 fi
1414 done
1415 # If $tagname still isn't set, then no tagged configuration
1416 # was found and let the user know that the "--tag" command
1417 # line option must be used.
1418 if test -z "$tagname"; then
1419 func_echo "unable to infer tagged configuration"
1420 func_fatal_error "specify a tag with \`--tag'"
1421 # else
1422 # func_verbose "using $tagname tagged configuration"
1423 fi
1424 ;;
1425 esac
1426 fi
1427 }
1428
1429
1430
1431 # func_write_libtool_object output_name pic_name nonpic_name
1432 # Create a libtool object file (analogous to a ".la" file),
1433 # but don't create it if we're doing a dry run.
1434 func_write_libtool_object ()
1435 {
1436 write_libobj=${1}
1437 if test "$build_libtool_libs" = yes; then
1438 write_lobj=\'${2}\'
1439 else
1440 write_lobj=none
1441 fi
1442
1443 if test "$build_old_libs" = yes; then
1444 write_oldobj=\'${3}\'
1445 else
1446 write_oldobj=none
1447 fi
1448
1449 $opt_dry_run || {
1450 cat >${write_libobj}T <<EOF
1451 # $write_libobj - a libtool object file
1452 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1453 #
1454 # Please DO NOT delete this file!
1455 # It is necessary for linking the library.
1456
1457 # Name of the PIC object.
1458 pic_object=$write_lobj
1459
1460 # Name of the non-PIC object
1461 non_pic_object=$write_oldobj
1462
1463 EOF
1464 $MV "${write_libobj}T" "${write_libobj}"
1465 }
1466 }
1467
1468
1469 ##################################################
1470 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1471 ##################################################
1472
1473 # func_convert_core_file_wine_to_w32 ARG
1474 # Helper function used by file name conversion functions when $build is *nix,
1475 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
1476 # correctly configured wine environment available, with the winepath program
1477 # in $build's $PATH.
1478 #
1479 # ARG is the $build file name to be converted to w32 format.
1480 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
1481 # be empty on error (or when ARG is empty)
1482 func_convert_core_file_wine_to_w32 ()
1483 {
1484 $opt_debug
1485 func_convert_core_file_wine_to_w32_result="$1"
1486 if test -n "$1"; then
1487 # Unfortunately, winepath does not exit with a non-zero error code, so we
1488 # are forced to check the contents of stdout. On the other hand, if the
1489 # command is not found, the shell will set an exit code of 127 and print
1490 # *an error message* to stdout. So we must check for both error code of
1491 # zero AND non-empty stdout, which explains the odd construction:
1492 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1493 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1494 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1495 $SED -e "$lt_sed_naive_backslashify"`
1496 else
1497 func_convert_core_file_wine_to_w32_result=
1498 fi
1499 fi
1500 }
1501 # end: func_convert_core_file_wine_to_w32
1502
1503
1504 # func_convert_core_path_wine_to_w32 ARG
1505 # Helper function used by path conversion functions when $build is *nix, and
1506 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1507 # configured wine environment available, with the winepath program in $build's
1508 # $PATH. Assumes ARG has no leading or trailing path separator characters.
1509 #
1510 # ARG is path to be converted from $build format to win32.
1511 # Result is available in $func_convert_core_path_wine_to_w32_result.
1512 # Unconvertible file (directory) names in ARG are skipped; if no directory names
1513 # are convertible, then the result may be empty.
1514 func_convert_core_path_wine_to_w32 ()
1515 {
1516 $opt_debug
1517 # unfortunately, winepath doesn't convert paths, only file names
1518 func_convert_core_path_wine_to_w32_result=""
1519 if test -n "$1"; then
1520 oldIFS=$IFS
1521 IFS=:
1522 for func_convert_core_path_wine_to_w32_f in $1; do
1523 IFS=$oldIFS
1524 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1525 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1526 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1527 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1528 else
1529 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1530 fi
1531 fi
1532 done
1533 IFS=$oldIFS
1534 fi
1535 }
1536 # end: func_convert_core_path_wine_to_w32
1537
1538
1539 # func_cygpath ARGS...
1540 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1541 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1542 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1543 # (2), returns the Cygwin file name or path in func_cygpath_result (input
1544 # file name or path is assumed to be in w32 format, as previously converted
1545 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
1546 # or path in func_cygpath_result (input file name or path is assumed to be in
1547 # Cygwin format). Returns an empty string on error.
1548 #
1549 # ARGS are passed to cygpath, with the last one being the file name or path to
1550 # be converted.
1551 #
1552 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1553 # environment variable; do not put it in $PATH.
1554 func_cygpath ()
1555 {
1556 $opt_debug
1557 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1558 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1559 if test "$?" -ne 0; then
1560 # on failure, ensure result is empty
1561 func_cygpath_result=
1562 fi
1563 else
1564 func_cygpath_result=
1565 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1566 fi
1567 }
1568 #end: func_cygpath
1569
1570
1571 # func_convert_core_msys_to_w32 ARG
1572 # Convert file name or path ARG from MSYS format to w32 format. Return
1573 # result in func_convert_core_msys_to_w32_result.
1574 func_convert_core_msys_to_w32 ()
1575 {
1576 $opt_debug
1577 # awkward: cmd appends spaces to result
1578 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1579 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1580 }
1581 #end: func_convert_core_msys_to_w32
1582
1583
1584 # func_convert_file_check ARG1 ARG2
1585 # Verify that ARG1 (a file name in $build format) was converted to $host
1586 # format in ARG2. Otherwise, emit an error message, but continue (resetting
1587 # func_to_host_file_result to ARG1).
1588 func_convert_file_check ()
1589 {
1590 $opt_debug
1591 if test -z "$2" && test -n "$1" ; then
1592 func_error "Could not determine host file name corresponding to"
1593 func_error " \`$1'"
1594 func_error "Continuing, but uninstalled executables may not work."
1595 # Fallback:
1596 func_to_host_file_result="$1"
1597 fi
1598 }
1599 # end func_convert_file_check
1600
1601
1602 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1603 # Verify that FROM_PATH (a path in $build format) was converted to $host
1604 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1605 # func_to_host_file_result to a simplistic fallback value (see below).
1606 func_convert_path_check ()
1607 {
1608 $opt_debug
1609 if test -z "$4" && test -n "$3"; then
1610 func_error "Could not determine the host path corresponding to"
1611 func_error " \`$3'"
1612 func_error "Continuing, but uninstalled executables may not work."
1613 # Fallback. This is a deliberately simplistic "conversion" and
1614 # should not be "improved". See libtool.info.
1615 if test "x$1" != "x$2"; then
1616 lt_replace_pathsep_chars="s|$1|$2|g"
1617 func_to_host_path_result=`echo "$3" |
1618 $SED -e "$lt_replace_pathsep_chars"`
1619 else
1620 func_to_host_path_result="$3"
1621 fi
1622 fi
1623 }
1624 # end func_convert_path_check
1625
1626
1627 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1628 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1629 # and appending REPL if ORIG matches BACKPAT.
1630 func_convert_path_front_back_pathsep ()
1631 {
1632 $opt_debug
1633 case $4 in
1634 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
1635 ;;
1636 esac
1637 case $4 in
1638 $2 ) func_append func_to_host_path_result "$3"
1639 ;;
1640 esac
1641 }
1642 # end func_convert_path_front_back_pathsep
1643
1644
1645 ##################################################
1646 # $build to $host FILE NAME CONVERSION FUNCTIONS #
1647 ##################################################
1648 # invoked via `$to_host_file_cmd ARG'
1649 #
1650 # In each case, ARG is the path to be converted from $build to $host format.
1651 # Result will be available in $func_to_host_file_result.
1652
1653
1654 # func_to_host_file ARG
1655 # Converts the file name ARG from $build format to $host format. Return result
1656 # in func_to_host_file_result.
1657 func_to_host_file ()
1658 {
1659 $opt_debug
1660 $to_host_file_cmd "$1"
1661 }
1662 # end func_to_host_file
1663
1664
1665 # func_to_tool_file ARG LAZY
1666 # converts the file name ARG from $build format to toolchain format. Return
1667 # result in func_to_tool_file_result. If the conversion in use is listed
1668 # in (the comma separated) LAZY, no conversion takes place.
1669 func_to_tool_file ()
1670 {
1671 $opt_debug
1672 case ,$2, in
1673 *,"$to_tool_file_cmd",*)
1674 func_to_tool_file_result=$1
1675 ;;
1676 *)
1677 $to_tool_file_cmd "$1"
1678 func_to_tool_file_result=$func_to_host_file_result
1679 ;;
1680 esac
1681 }
1682 # end func_to_tool_file
1683
1684
1685 # func_convert_file_noop ARG
1686 # Copy ARG to func_to_host_file_result.
1687 func_convert_file_noop ()
1688 {
1689 func_to_host_file_result="$1"
1690 }
1691 # end func_convert_file_noop
1692
1693
1694 # func_convert_file_msys_to_w32 ARG
1695 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1696 # conversion to w32 is not available inside the cwrapper. Returns result in
1697 # func_to_host_file_result.
1698 func_convert_file_msys_to_w32 ()
1699 {
1700 $opt_debug
1701 func_to_host_file_result="$1"
1702 if test -n "$1"; then
1703 func_convert_core_msys_to_w32 "$1"
1704 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1705 fi
1706 func_convert_file_check "$1" "$func_to_host_file_result"
1707 }
1708 # end func_convert_file_msys_to_w32
1709
1710
1711 # func_convert_file_cygwin_to_w32 ARG
1712 # Convert file name ARG from Cygwin to w32 format. Returns result in
1713 # func_to_host_file_result.
1714 func_convert_file_cygwin_to_w32 ()
1715 {
1716 $opt_debug
1717 func_to_host_file_result="$1"
1718 if test -n "$1"; then
1719 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1720 # LT_CYGPATH in this case.
1721 func_to_host_file_result=`cygpath -m "$1"`
1722 fi
1723 func_convert_file_check "$1" "$func_to_host_file_result"
1724 }
1725 # end func_convert_file_cygwin_to_w32
1726
1727
1728 # func_convert_file_nix_to_w32 ARG
1729 # Convert file name ARG from *nix to w32 format. Requires a wine environment
1730 # and a working winepath. Returns result in func_to_host_file_result.
1731 func_convert_file_nix_to_w32 ()
1732 {
1733 $opt_debug
1734 func_to_host_file_result="$1"
1735 if test -n "$1"; then
1736 func_convert_core_file_wine_to_w32 "$1"
1737 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1738 fi
1739 func_convert_file_check "$1" "$func_to_host_file_result"
1740 }
1741 # end func_convert_file_nix_to_w32
1742
1743
1744 # func_convert_file_msys_to_cygwin ARG
1745 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1746 # Returns result in func_to_host_file_result.
1747 func_convert_file_msys_to_cygwin ()
1748 {
1749 $opt_debug
1750 func_to_host_file_result="$1"
1751 if test -n "$1"; then
1752 func_convert_core_msys_to_w32 "$1"
1753 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1754 func_to_host_file_result="$func_cygpath_result"
1755 fi
1756 func_convert_file_check "$1" "$func_to_host_file_result"
1757 }
1758 # end func_convert_file_msys_to_cygwin
1759
1760
1761 # func_convert_file_nix_to_cygwin ARG
1762 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1763 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1764 # in func_to_host_file_result.
1765 func_convert_file_nix_to_cygwin ()
1766 {
1767 $opt_debug
1768 func_to_host_file_result="$1"
1769 if test -n "$1"; then
1770 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1771 func_convert_core_file_wine_to_w32 "$1"
1772 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1773 func_to_host_file_result="$func_cygpath_result"
1774 fi
1775 func_convert_file_check "$1" "$func_to_host_file_result"
1776 }
1777 # end func_convert_file_nix_to_cygwin
1778
1779
1780 #############################################
1781 # $build to $host PATH CONVERSION FUNCTIONS #
1782 #############################################
1783 # invoked via `$to_host_path_cmd ARG'
1784 #
1785 # In each case, ARG is the path to be converted from $build to $host format.
1786 # The result will be available in $func_to_host_path_result.
1787 #
1788 # Path separators are also converted from $build format to $host format. If
1789 # ARG begins or ends with a path separator character, it is preserved (but
1790 # converted to $host format) on output.
1791 #
1792 # All path conversion functions are named using the following convention:
1793 # file name conversion function : func_convert_file_X_to_Y ()
1794 # path conversion function : func_convert_path_X_to_Y ()
1795 # where, for any given $build/$host combination the 'X_to_Y' value is the
1796 # same. If conversion functions are added for new $build/$host combinations,
1797 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
1798 # will break.
1799
1800
1801 # func_init_to_host_path_cmd
1802 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
1803 # appropriate value, based on the value of $to_host_file_cmd.
1804 to_host_path_cmd=
1805 func_init_to_host_path_cmd ()
1806 {
1807 $opt_debug
1808 if test -z "$to_host_path_cmd"; then
1809 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1810 to_host_path_cmd="func_convert_path_${func_stripname_result}"
1811 fi
1812 }
1813
1814
1815 # func_to_host_path ARG
1816 # Converts the path ARG from $build format to $host format. Return result
1817 # in func_to_host_path_result.
1818 func_to_host_path ()
1819 {
1820 $opt_debug
1821 func_init_to_host_path_cmd
1822 $to_host_path_cmd "$1"
1823 }
1824 # end func_to_host_path
1825
1826
1827 # func_convert_path_noop ARG
1828 # Copy ARG to func_to_host_path_result.
1829 func_convert_path_noop ()
1830 {
1831 func_to_host_path_result="$1"
1832 }
1833 # end func_convert_path_noop
1834
1835
1836 # func_convert_path_msys_to_w32 ARG
1837 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1838 # conversion to w32 is not available inside the cwrapper. Returns result in
1839 # func_to_host_path_result.
1840 func_convert_path_msys_to_w32 ()
1841 {
1842 $opt_debug
1843 func_to_host_path_result="$1"
1844 if test -n "$1"; then
1845 # Remove leading and trailing path separator characters from ARG. MSYS
1846 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1847 # and winepath ignores them completely.
1848 func_stripname : : "$1"
1849 func_to_host_path_tmp1=$func_stripname_result
1850 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1851 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1852 func_convert_path_check : ";" \
1853 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1854 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1855 fi
1856 }
1857 # end func_convert_path_msys_to_w32
1858
1859
1860 # func_convert_path_cygwin_to_w32 ARG
1861 # Convert path ARG from Cygwin to w32 format. Returns result in
1862 # func_to_host_file_result.
1863 func_convert_path_cygwin_to_w32 ()
1864 {
1865 $opt_debug
1866 func_to_host_path_result="$1"
1867 if test -n "$1"; then
1868 # See func_convert_path_msys_to_w32:
1869 func_stripname : : "$1"
1870 func_to_host_path_tmp1=$func_stripname_result
1871 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1872 func_convert_path_check : ";" \
1873 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1874 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1875 fi
1876 }
1877 # end func_convert_path_cygwin_to_w32
1878
1879
1880 # func_convert_path_nix_to_w32 ARG
1881 # Convert path ARG from *nix to w32 format. Requires a wine environment and
1882 # a working winepath. Returns result in func_to_host_file_result.
1883 func_convert_path_nix_to_w32 ()
1884 {
1885 $opt_debug
1886 func_to_host_path_result="$1"
1887 if test -n "$1"; then
1888 # See func_convert_path_msys_to_w32:
1889 func_stripname : : "$1"
1890 func_to_host_path_tmp1=$func_stripname_result
1891 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1892 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1893 func_convert_path_check : ";" \
1894 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1895 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1896 fi
1897 }
1898 # end func_convert_path_nix_to_w32
1899
1900
1901 # func_convert_path_msys_to_cygwin ARG
1902 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1903 # Returns result in func_to_host_file_result.
1904 func_convert_path_msys_to_cygwin ()
1905 {
1906 $opt_debug
1907 func_to_host_path_result="$1"
1908 if test -n "$1"; then
1909 # See func_convert_path_msys_to_w32:
1910 func_stripname : : "$1"
1911 func_to_host_path_tmp1=$func_stripname_result
1912 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1913 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1914 func_to_host_path_result="$func_cygpath_result"
1915 func_convert_path_check : : \
1916 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1917 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1918 fi
1919 }
1920 # end func_convert_path_msys_to_cygwin
1921
1922
1923 # func_convert_path_nix_to_cygwin ARG
1924 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1925 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1926 # func_to_host_file_result.
1927 func_convert_path_nix_to_cygwin ()
1928 {
1929 $opt_debug
1930 func_to_host_path_result="$1"
1931 if test -n "$1"; then
1932 # Remove leading and trailing path separator characters from
1933 # ARG. msys behavior is inconsistent here, cygpath turns them
1934 # into '.;' and ';.', and winepath ignores them completely.
1935 func_stripname : : "$1"
1936 func_to_host_path_tmp1=$func_stripname_result
1937 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1938 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1939 func_to_host_path_result="$func_cygpath_result"
1940 func_convert_path_check : : \
1941 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1942 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1943 fi
1944 }
1945 # end func_convert_path_nix_to_cygwin
1946
1947
1948 # func_mode_compile arg...
1949 func_mode_compile ()
1950 {
1951 $opt_debug
1952 # Get the compilation command and the source file.
1953 base_compile=
1954 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1955 suppress_opt=yes
1956 suppress_output=
1957 arg_mode=normal
1958 libobj=
1959 later=
1960 pie_flag=
1961
1962 for arg
1963 do
1964 case $arg_mode in
1965 arg )
1966 # do not "continue". Instead, add this to base_compile
1967 lastarg="$arg"
1968 arg_mode=normal
1969 ;;
1970
1971 target )
1972 libobj="$arg"
1973 arg_mode=normal
1974 continue
1975 ;;
1976
1977 normal )
1978 # Accept any command-line options.
1979 case $arg in
1980 -o)
1981 test -n "$libobj" && \
1982 func_fatal_error "you cannot specify \`-o' more than once"
1983 arg_mode=target
1984 continue
1985 ;;
1986
1987 -pie | -fpie | -fPIE)
1988 func_append pie_flag " $arg"
1989 continue
1990 ;;
1991
1992 -shared | -static | -prefer-pic | -prefer-non-pic)
1993 func_append later " $arg"
1994 continue
1995 ;;
1996
1997 -no-suppress)
1998 suppress_opt=no
1999 continue
2000 ;;
2001
2002 -Xcompiler)
2003 arg_mode=arg # the next one goes into the "base_compile" arg list
2004 continue # The current "srcfile" will either be retained or
2005 ;; # replaced later. I would guess that would be a bug.
2006
2007 -Wc,*)
2008 func_stripname '-Wc,' '' "$arg"
2009 args=$func_stripname_result
2010 lastarg=
2011 save_ifs="$IFS"; IFS=','
2012 for arg in $args; do
2013 IFS="$save_ifs"
2014 func_append_quoted lastarg "$arg"
2015 done
2016 IFS="$save_ifs"
2017 func_stripname ' ' '' "$lastarg"
2018 lastarg=$func_stripname_result
2019
2020 # Add the arguments to base_compile.
2021 func_append base_compile " $lastarg"
2022 continue
2023 ;;
2024
2025 *)
2026 # Accept the current argument as the source file.
2027 # The previous "srcfile" becomes the current argument.
2028 #
2029 lastarg="$srcfile"
2030 srcfile="$arg"
2031 ;;
2032 esac # case $arg
2033 ;;
2034 esac # case $arg_mode
2035
2036 # Aesthetically quote the previous argument.
2037 func_append_quoted base_compile "$lastarg"
2038 done # for arg
2039
2040 case $arg_mode in
2041 arg)
2042 func_fatal_error "you must specify an argument for -Xcompile"
2043 ;;
2044 target)
2045 func_fatal_error "you must specify a target with \`-o'"
2046 ;;
2047 *)
2048 # Get the name of the library object.
2049 test -z "$libobj" && {
2050 func_basename "$srcfile"
2051 libobj="$func_basename_result"
2052 }
2053 ;;
2054 esac
2055
2056 # Recognize several different file suffixes.
2057 # If the user specifies -o file.o, it is replaced with file.lo
2058 case $libobj in
2059 *.[cCFSifmso] | \
2060 *.ada | *.adb | *.ads | *.asm | \
2061 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
2062 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
2063 func_xform "$libobj"
2064 libobj=$func_xform_result
2065 ;;
2066 esac
2067
2068 case $libobj in
2069 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
2070 *)
2071 func_fatal_error "cannot determine name of library object from \`$libobj'"
2072 ;;
2073 esac
2074
2075 func_infer_tag $base_compile
2076
2077 for arg in $later; do
2078 case $arg in
2079 -shared)
2080 test "$build_libtool_libs" != yes && \
2081 func_fatal_configuration "can not build a shared library"
2082 build_old_libs=no
2083 continue
2084 ;;
2085
2086 -static)
2087 build_libtool_libs=no
2088 build_old_libs=yes
2089 continue
2090 ;;
2091
2092 -prefer-pic)
2093 pic_mode=yes
2094 continue
2095 ;;
2096
2097 -prefer-non-pic)
2098 pic_mode=no
2099 continue
2100 ;;
2101 esac
2102 done
2103
2104 func_quote_for_eval "$libobj"
2105 test "X$libobj" != "X$func_quote_for_eval_result" \
2106 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
2107 && func_warning "libobj name \`$libobj' may not contain shell special characters."
2108 func_dirname_and_basename "$obj" "/" ""
2109 objname="$func_basename_result"
2110 xdir="$func_dirname_result"
2111 lobj=${xdir}$objdir/$objname
2112
2113 test -z "$base_compile" && \
2114 func_fatal_help "you must specify a compilation command"
2115
2116 # Delete any leftover library objects.
2117 if test "$build_old_libs" = yes; then
2118 removelist="$obj $lobj $libobj ${libobj}T"
2119 else
2120 removelist="$lobj $libobj ${libobj}T"
2121 fi
2122
2123 # On Cygwin there's no "real" PIC flag so we must build both object types
2124 case $host_os in
2125 cygwin* | mingw* | pw32* | os2* | cegcc*)
2126 pic_mode=default
2127 ;;
2128 esac
2129 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
2130 # non-PIC code in shared libraries is not supported
2131 pic_mode=default
2132 fi
2133
2134 # Calculate the filename of the output object if compiler does
2135 # not support -o with -c
2136 if test "$compiler_c_o" = no; then
2137 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
2138 lockfile="$output_obj.lock"
2139 else
2140 output_obj=
2141 need_locks=no
2142 lockfile=
2143 fi
2144
2145 # Lock this critical section if it is needed
2146 # We use this script file to make the link, it avoids creating a new file
2147 if test "$need_locks" = yes; then
2148 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
2149 func_echo "Waiting for $lockfile to be removed"
2150 sleep 2
2151 done
2152 elif test "$need_locks" = warn; then
2153 if test -f "$lockfile"; then
2154 $ECHO "\
2155 *** ERROR, $lockfile exists and contains:
2156 `cat $lockfile 2>/dev/null`
2157
2158 This indicates that another process is trying to use the same
2159 temporary object file, and libtool could not work around it because
2160 your compiler does not support \`-c' and \`-o' together. If you
2161 repeat this compilation, it may succeed, by chance, but you had better
2162 avoid parallel builds (make -j) in this platform, or get a better
2163 compiler."
2164
2165 $opt_dry_run || $RM $removelist
2166 exit $EXIT_FAILURE
2167 fi
2168 func_append removelist " $output_obj"
2169 $ECHO "$srcfile" > "$lockfile"
2170 fi
2171
2172 $opt_dry_run || $RM $removelist
2173 func_append removelist " $lockfile"
2174 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
2175
2176 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
2177 srcfile=$func_to_tool_file_result
2178 func_quote_for_eval "$srcfile"
2179 qsrcfile=$func_quote_for_eval_result
2180
2181 # Only build a PIC object if we are building libtool libraries.
2182 if test "$build_libtool_libs" = yes; then
2183 # Without this assignment, base_compile gets emptied.
2184 fbsd_hideous_sh_bug=$base_compile
2185
2186 if test "$pic_mode" != no; then
2187 command="$base_compile $qsrcfile $pic_flag"
2188 else
2189 # Don't build PIC code
2190 command="$base_compile $qsrcfile"
2191 fi
2192
2193 func_mkdir_p "$xdir$objdir"
2194
2195 if test -z "$output_obj"; then
2196 # Place PIC objects in $objdir
2197 func_append command " -o $lobj"
2198 fi
2199
2200 func_show_eval_locale "$command" \
2201 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
2202
2203 if test "$need_locks" = warn &&
2204 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
2205 $ECHO "\
2206 *** ERROR, $lockfile contains:
2207 `cat $lockfile 2>/dev/null`
2208
2209 but it should contain:
2210 $srcfile
2211
2212 This indicates that another process is trying to use the same
2213 temporary object file, and libtool could not work around it because
2214 your compiler does not support \`-c' and \`-o' together. If you
2215 repeat this compilation, it may succeed, by chance, but you had better
2216 avoid parallel builds (make -j) in this platform, or get a better
2217 compiler."
2218
2219 $opt_dry_run || $RM $removelist
2220 exit $EXIT_FAILURE
2221 fi
2222
2223 # Just move the object if needed, then go on to compile the next one
2224 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
2225 func_show_eval '$MV "$output_obj" "$lobj"' \
2226 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
2227 fi
2228
2229 # Allow error messages only from the first compilation.
2230 if test "$suppress_opt" = yes; then
2231 suppress_output=' >/dev/null 2>&1'
2232 fi
2233 fi
2234
2235 # Only build a position-dependent object if we build old libraries.
2236 if test "$build_old_libs" = yes; then
2237 if test "$pic_mode" != yes; then
2238 # Don't build PIC code
2239 command="$base_compile $qsrcfile$pie_flag"
2240 else
2241 command="$base_compile $qsrcfile $pic_flag"
2242 fi
2243 if test "$compiler_c_o" = yes; then
2244 func_append command " -o $obj"
2245 fi
2246
2247 # Suppress compiler output if we already did a PIC compilation.
2248 func_append command "$suppress_output"
2249 func_show_eval_locale "$command" \
2250 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
2251
2252 if test "$need_locks" = warn &&
2253 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
2254 $ECHO "\
2255 *** ERROR, $lockfile contains:
2256 `cat $lockfile 2>/dev/null`
2257
2258 but it should contain:
2259 $srcfile
2260
2261 This indicates that another process is trying to use the same
2262 temporary object file, and libtool could not work around it because
2263 your compiler does not support \`-c' and \`-o' together. If you
2264 repeat this compilation, it may succeed, by chance, but you had better
2265 avoid parallel builds (make -j) in this platform, or get a better
2266 compiler."
2267
2268 $opt_dry_run || $RM $removelist
2269 exit $EXIT_FAILURE
2270 fi
2271
2272 # Just move the object if needed
2273 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
2274 func_show_eval '$MV "$output_obj" "$obj"' \
2275 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
2276 fi
2277 fi
2278
2279 $opt_dry_run || {
2280 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
2281
2282 # Unlock the critical section if it was locked
2283 if test "$need_locks" != no; then
2284 removelist=$lockfile
2285 $RM "$lockfile"
2286 fi
2287 }
2288
2289 exit $EXIT_SUCCESS
2290 }
2291
2292 $opt_help || {
2293 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
2294 }
2295
2296 func_mode_help ()
2297 {
2298 # We need to display help for each of the modes.
2299 case $opt_mode in
2300 "")
2301 # Generic help is extracted from the usage comments
2302 # at the start of this file.
2303 func_help
2304 ;;
2305
2306 clean)
2307 $ECHO \
2308 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
2309
2310 Remove files from the build directory.
2311
2312 RM is the name of the program to use to delete files associated with each FILE
2313 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
2314 to RM.
2315
2316 If FILE is a libtool library, object or program, all the files associated
2317 with it are deleted. Otherwise, only FILE itself is deleted using RM."
2318 ;;
2319
2320 compile)
2321 $ECHO \
2322 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
2323
2324 Compile a source file into a libtool library object.
2325
2326 This mode accepts the following additional options:
2327
2328 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
2329 -no-suppress do not suppress compiler output for multiple passes
2330 -prefer-pic try to build PIC objects only
2331 -prefer-non-pic try to build non-PIC objects only
2332 -shared do not build a \`.o' file suitable for static linking
2333 -static only build a \`.o' file suitable for static linking
2334 -Wc,FLAG pass FLAG directly to the compiler
2335
2336 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
2337 from the given SOURCEFILE.
2338
2339 The output file name is determined by removing the directory component from
2340 SOURCEFILE, then substituting the C source code suffix \`.c' with the
2341 library object suffix, \`.lo'."
2342 ;;
2343
2344 execute)
2345 $ECHO \
2346 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
2347
2348 Automatically set library path, then run a program.
2349
2350 This mode accepts the following additional options:
2351
2352 -dlopen FILE add the directory containing FILE to the library path
2353
2354 This mode sets the library path environment variable according to \`-dlopen'
2355 flags.
2356
2357 If any of the ARGS are libtool executable wrappers, then they are translated
2358 into their corresponding uninstalled binary, and any of their required library
2359 directories are added to the library path.
2360
2361 Then, COMMAND is executed, with ARGS as arguments."
2362 ;;
2363
2364 finish)
2365 $ECHO \
2366 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
2367
2368 Complete the installation of libtool libraries.
2369
2370 Each LIBDIR is a directory that contains libtool libraries.
2371
2372 The commands that this mode executes may require superuser privileges. Use
2373 the \`--dry-run' option if you just want to see what would be executed."
2374 ;;
2375
2376 install)
2377 $ECHO \
2378 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
2379
2380 Install executables or libraries.
2381
2382 INSTALL-COMMAND is the installation command. The first component should be
2383 either the \`install' or \`cp' program.
2384
2385 The following components of INSTALL-COMMAND are treated specially:
2386
2387 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
2388
2389 The rest of the components are interpreted as arguments to that command (only
2390 BSD-compatible install options are recognized)."
2391 ;;
2392
2393 link)
2394 $ECHO \
2395 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
2396
2397 Link object files or libraries together to form another library, or to
2398 create an executable program.
2399
2400 LINK-COMMAND is a command using the C compiler that you would use to create
2401 a program from several object files.
2402
2403 The following components of LINK-COMMAND are treated specially:
2404
2405 -all-static do not do any dynamic linking at all
2406 -avoid-version do not add a version suffix if possible
2407 -bindir BINDIR specify path to binaries directory (for systems where
2408 libraries must be found in the PATH setting at runtime)
2409 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
2410 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
2411 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
2412 -export-symbols SYMFILE
2413 try to export only the symbols listed in SYMFILE
2414 -export-symbols-regex REGEX
2415 try to export only the symbols matching REGEX
2416 -LLIBDIR search LIBDIR for required installed libraries
2417 -lNAME OUTPUT-FILE requires the installed library libNAME
2418 -module build a library that can dlopened
2419 -no-fast-install disable the fast-install mode
2420 -no-install link a not-installable executable
2421 -no-undefined declare that a library does not refer to external symbols
2422 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
2423 -objectlist FILE Use a list of object files found in FILE to specify objects
2424 -precious-files-regex REGEX
2425 don't remove output files matching REGEX
2426 -release RELEASE specify package release information
2427 -rpath LIBDIR the created library will eventually be installed in LIBDIR
2428 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
2429 -shared only do dynamic linking of libtool libraries
2430 -shrext SUFFIX override the standard shared library file extension
2431 -static do not do any dynamic linking of uninstalled libtool libraries
2432 -static-libtool-libs
2433 do not do any dynamic linking of libtool libraries
2434 -version-info CURRENT[:REVISION[:AGE]]
2435 specify library version info [each variable defaults to 0]
2436 -weak LIBNAME declare that the target provides the LIBNAME interface
2437 -Wc,FLAG
2438 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
2439 -Wl,FLAG
2440 -Xlinker FLAG pass linker-specific FLAG directly to the linker
2441 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
2442
2443 All other options (arguments beginning with \`-') are ignored.
2444
2445 Every other argument is treated as a filename. Files ending in \`.la' are
2446 treated as uninstalled libtool libraries, other files are standard or library
2447 object files.
2448
2449 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
2450 only library objects (\`.lo' files) may be specified, and \`-rpath' is
2451 required, except when creating a convenience library.
2452
2453 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
2454 using \`ar' and \`ranlib', or on Windows using \`lib'.
2455
2456 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
2457 is created, otherwise an executable program is created."
2458 ;;
2459
2460 uninstall)
2461 $ECHO \
2462 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
2463
2464 Remove libraries from an installation directory.
2465
2466 RM is the name of the program to use to delete files associated with each FILE
2467 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
2468 to RM.
2469
2470 If FILE is a libtool library, all the files associated with it are deleted.
2471 Otherwise, only FILE itself is deleted using RM."
2472 ;;
2473
2474 *)
2475 func_fatal_help "invalid operation mode \`$opt_mode'"
2476 ;;
2477 esac
2478
2479 echo
2480 $ECHO "Try \`$progname --help' for more information about other modes."
2481 }
2482
2483 # Now that we've collected a possible --mode arg, show help if necessary
2484 if $opt_help; then
2485 if test "$opt_help" = :; then
2486 func_mode_help
2487 else
2488 {
2489 func_help noexit
2490 for opt_mode in compile link execute install finish uninstall clean; do
2491 func_mode_help
2492 done
2493 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
2494 {
2495 func_help noexit
2496 for opt_mode in compile link execute install finish uninstall clean; do
2497 echo
2498 func_mode_help
2499 done
2500 } |
2501 sed '1d
2502 /^When reporting/,/^Report/{
2503 H
2504 d
2505 }
2506 $x
2507 /information about other modes/d
2508 /more detailed .*MODE/d
2509 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
2510 fi
2511 exit $?
2512 fi
2513
2514
2515 # func_mode_execute arg...
2516 func_mode_execute ()
2517 {
2518 $opt_debug
2519 # The first argument is the command name.
2520 cmd="$nonopt"
2521 test -z "$cmd" && \
2522 func_fatal_help "you must specify a COMMAND"
2523
2524 # Handle -dlopen flags immediately.
2525 for file in $opt_dlopen; do
2526 test -f "$file" \
2527 || func_fatal_help "\`$file' is not a file"
2528
2529 dir=
2530 case $file in
2531 *.la)
2532 func_resolve_sysroot "$file"
2533 file=$func_resolve_sysroot_result
2534
2535 # Check to see that this really is a libtool archive.
2536 func_lalib_unsafe_p "$file" \
2537 || func_fatal_help "\`$lib' is not a valid libtool archive"
2538
2539 # Read the libtool library.
2540 dlname=
2541 library_names=
2542 func_source "$file"
2543
2544 # Skip this library if it cannot be dlopened.
2545 if test -z "$dlname"; then
2546 # Warn if it was a shared library.
2547 test -n "$library_names" && \
2548 func_warning "\`$file' was not linked with \`-export-dynamic'"
2549 continue
2550 fi
2551
2552 func_dirname "$file" "" "."
2553 dir="$func_dirname_result"
2554
2555 if test -f "$dir/$objdir/$dlname"; then
2556 func_append dir "/$objdir"
2557 else
2558 if test ! -f "$dir/$dlname"; then
2559 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
2560 fi
2561 fi
2562 ;;
2563
2564 *.lo)
2565 # Just add the directory containing the .lo file.
2566 func_dirname "$file" "" "."
2567 dir="$func_dirname_result"
2568 ;;
2569
2570 *)
2571 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
2572 continue
2573 ;;
2574 esac
2575
2576 # Get the absolute pathname.
2577 absdir=`cd "$dir" && pwd`
2578 test -n "$absdir" && dir="$absdir"
2579
2580 # Now add the directory to shlibpath_var.
2581 if eval "test -z \"\$$shlibpath_var\""; then
2582 eval "$shlibpath_var=\"\$dir\""
2583 else
2584 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
2585 fi
2586 done
2587
2588 # This variable tells wrapper scripts just to set shlibpath_var
2589 # rather than running their programs.
2590 libtool_execute_magic="$magic"
2591
2592 # Check if any of the arguments is a wrapper script.
2593 args=
2594 for file
2595 do
2596 case $file in
2597 -* | *.la | *.lo ) ;;
2598 *)
2599 # Do a test to see if this is really a libtool program.
2600 if func_ltwrapper_script_p "$file"; then
2601 func_source "$file"
2602 # Transform arg to wrapped name.
2603 file="$progdir/$program"
2604 elif func_ltwrapper_executable_p "$file"; then
2605 func_ltwrapper_scriptname "$file"
2606 func_source "$func_ltwrapper_scriptname_result"
2607 # Transform arg to wrapped name.
2608 file="$progdir/$program"
2609 fi
2610 ;;
2611 esac
2612 # Quote arguments (to preserve shell metacharacters).
2613 func_append_quoted args "$file"
2614 done
2615
2616 if test "X$opt_dry_run" = Xfalse; then
2617 if test -n "$shlibpath_var"; then
2618 # Export the shlibpath_var.
2619 eval "export $shlibpath_var"
2620 fi
2621
2622 # Restore saved environment variables
2623 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
2624 do
2625 eval "if test \"\${save_$lt_var+set}\" = set; then
2626 $lt_var=\$save_$lt_var; export $lt_var
2627 else
2628 $lt_unset $lt_var
2629 fi"
2630 done
2631
2632 # Now prepare to actually exec the command.
2633 exec_cmd="\$cmd$args"
2634 else
2635 # Display what would be done.
2636 if test -n "$shlibpath_var"; then
2637 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
2638 echo "export $shlibpath_var"
2639 fi
2640 $ECHO "$cmd$args"
2641 exit $EXIT_SUCCESS
2642 fi
2643 }
2644
2645 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
2646
2647
2648 # func_mode_finish arg...
2649 func_mode_finish ()
2650 {
2651 $opt_debug
2652 libs=
2653 libdirs=
2654 admincmds=
2655
2656 for opt in "$nonopt" ${1+"$@"}
2657 do
2658 if test -d "$opt"; then
2659 func_append libdirs " $opt"
2660
2661 elif test -f "$opt"; then
2662 if func_lalib_unsafe_p "$opt"; then
2663 func_append libs " $opt"
2664 else
2665 func_warning "\`$opt' is not a valid libtool archive"
2666 fi
2667
2668 else
2669 func_fatal_error "invalid argument \`$opt'"
2670 fi
2671 done
2672
2673 if test -n "$libs"; then
2674 if test -n "$lt_sysroot"; then
2675 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
2676 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
2677 else
2678 sysroot_cmd=
2679 fi
2680
2681 # Remove sysroot references
2682 if $opt_dry_run; then
2683 for lib in $libs; do
2684 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
2685 done
2686 else
2687 tmpdir=`func_mktempdir`
2688 for lib in $libs; do
2689 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
2690 > $tmpdir/tmp-la
2691 mv -f $tmpdir/tmp-la $lib
2692 done
2693 ${RM}r "$tmpdir"
2694 fi
2695 fi
2696
2697 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2698 for libdir in $libdirs; do
2699 if test -n "$finish_cmds"; then
2700 # Do each command in the finish commands.
2701 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
2702 '"$cmd"'"'
2703 fi
2704 if test -n "$finish_eval"; then
2705 # Do the single finish_eval.
2706 eval cmds=\"$finish_eval\"
2707 $opt_dry_run || eval "$cmds" || func_append admincmds "
2708 $cmds"
2709 fi
2710 done
2711 fi
2712
2713 # Exit here if they wanted silent mode.
2714 $opt_silent && exit $EXIT_SUCCESS
2715
2716 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2717 echo "----------------------------------------------------------------------"
2718 echo "Libraries have been installed in:"
2719 for libdir in $libdirs; do
2720 $ECHO " $libdir"
2721 done
2722 echo
2723 echo "If you ever happen to want to link against installed libraries"
2724 echo "in a given directory, LIBDIR, you must either use libtool, and"
2725 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2726 echo "flag during linking and do at least one of the following:"
2727 if test -n "$shlibpath_var"; then
2728 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2729 echo " during execution"
2730 fi
2731 if test -n "$runpath_var"; then
2732 echo " - add LIBDIR to the \`$runpath_var' environment variable"
2733 echo " during linking"
2734 fi
2735 if test -n "$hardcode_libdir_flag_spec"; then
2736 libdir=LIBDIR
2737 eval flag=\"$hardcode_libdir_flag_spec\"
2738
2739 $ECHO " - use the \`$flag' linker flag"
2740 fi
2741 if test -n "$admincmds"; then
2742 $ECHO " - have your system administrator run these commands:$admincmds"
2743 fi
2744 if test -f /etc/ld.so.conf; then
2745 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2746 fi
2747 echo
2748
2749 echo "See any operating system documentation about shared libraries for"
2750 case $host in
2751 solaris2.[6789]|solaris2.1[0-9])
2752 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2753 echo "pages."
2754 ;;
2755 *)
2756 echo "more information, such as the ld(1) and ld.so(8) manual pages."
2757 ;;
2758 esac
2759 echo "----------------------------------------------------------------------"
2760 fi
2761 exit $EXIT_SUCCESS
2762 }
2763
2764 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
2765
2766
2767 # func_mode_install arg...
2768 func_mode_install ()
2769 {
2770 $opt_debug
2771 # There may be an optional sh(1) argument at the beginning of
2772 # install_prog (especially on Windows NT).
2773 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
2774 # Allow the use of GNU shtool's install command.
2775 case $nonopt in *shtool*) :;; *) false;; esac; then
2776 # Aesthetically quote it.
2777 func_quote_for_eval "$nonopt"
2778 install_prog="$func_quote_for_eval_result "
2779 arg=$1
2780 shift
2781 else
2782 install_prog=
2783 arg=$nonopt
2784 fi
2785
2786 # The real first argument should be the name of the installation program.
2787 # Aesthetically quote it.
2788 func_quote_for_eval "$arg"
2789 func_append install_prog "$func_quote_for_eval_result"
2790 install_shared_prog=$install_prog
2791 case " $install_prog " in
2792 *[\\\ /]cp\ *) install_cp=: ;;
2793 *) install_cp=false ;;
2794 esac
2795
2796 # We need to accept at least all the BSD install flags.
2797 dest=
2798 files=
2799 opts=
2800 prev=
2801 install_type=
2802 isdir=no
2803 stripme=
2804 no_mode=:
2805 for arg
2806 do
2807 arg2=
2808 if test -n "$dest"; then
2809 func_append files " $dest"
2810 dest=$arg
2811 continue
2812 fi
2813
2814 case $arg in
2815 -d) isdir=yes ;;
2816 -f)
2817 if $install_cp; then :; else
2818 prev=$arg
2819 fi
2820 ;;
2821 -g | -m | -o)
2822 prev=$arg
2823 ;;
2824 -s)
2825 stripme=" -s"
2826 continue
2827 ;;
2828 -*)
2829 ;;
2830 *)
2831 # If the previous option needed an argument, then skip it.
2832 if test -n "$prev"; then
2833 if test "x$prev" = x-m && test -n "$install_override_mode"; then
2834 arg2=$install_override_mode
2835 no_mode=false
2836 fi
2837 prev=
2838 else
2839 dest=$arg
2840 continue
2841 fi
2842 ;;
2843 esac
2844
2845 # Aesthetically quote the argument.
2846 func_quote_for_eval "$arg"
2847 func_append install_prog " $func_quote_for_eval_result"
2848 if test -n "$arg2"; then
2849 func_quote_for_eval "$arg2"
2850 fi
2851 func_append install_shared_prog " $func_quote_for_eval_result"
2852 done
2853
2854 test -z "$install_prog" && \
2855 func_fatal_help "you must specify an install program"
2856
2857 test -n "$prev" && \
2858 func_fatal_help "the \`$prev' option requires an argument"
2859
2860 if test -n "$install_override_mode" && $no_mode; then
2861 if $install_cp; then :; else
2862 func_quote_for_eval "$install_override_mode"
2863 func_append install_shared_prog " -m $func_quote_for_eval_result"
2864 fi
2865 fi
2866
2867 if test -z "$files"; then
2868 if test -z "$dest"; then
2869 func_fatal_help "no file or destination specified"
2870 else
2871 func_fatal_help "you must specify a destination"
2872 fi
2873 fi
2874
2875 # Strip any trailing slash from the destination.
2876 func_stripname '' '/' "$dest"
2877 dest=$func_stripname_result
2878
2879 # Check to see that the destination is a directory.
2880 test -d "$dest" && isdir=yes
2881 if test "$isdir" = yes; then
2882 destdir="$dest"
2883 destname=
2884 else
2885 func_dirname_and_basename "$dest" "" "."
2886 destdir="$func_dirname_result"
2887 destname="$func_basename_result"
2888
2889 # Not a directory, so check to see that there is only one file specified.
2890 set dummy $files; shift
2891 test "$#" -gt 1 && \
2892 func_fatal_help "\`$dest' is not a directory"
2893 fi
2894 case $destdir in
2895 [\\/]* | [A-Za-z]:[\\/]*) ;;
2896 *)
2897 for file in $files; do
2898 case $file in
2899 *.lo) ;;
2900 *)
2901 func_fatal_help "\`$destdir' must be an absolute directory name"
2902 ;;
2903 esac
2904 done
2905 ;;
2906 esac
2907
2908 # This variable tells wrapper scripts just to set variables rather
2909 # than running their programs.
2910 libtool_install_magic="$magic"
2911
2912 staticlibs=
2913 future_libdirs=
2914 current_libdirs=
2915 for file in $files; do
2916
2917 # Do each installation.
2918 case $file in
2919 *.$libext)
2920 # Do the static libraries later.
2921 func_append staticlibs " $file"
2922 ;;
2923
2924 *.la)
2925 func_resolve_sysroot "$file"
2926 file=$func_resolve_sysroot_result
2927
2928 # Check to see that this really is a libtool archive.
2929 func_lalib_unsafe_p "$file" \
2930 || func_fatal_help "\`$file' is not a valid libtool archive"
2931
2932 library_names=
2933 old_library=
2934 relink_command=
2935 func_source "$file"
2936
2937 # Add the libdir to current_libdirs if it is the destination.
2938 if test "X$destdir" = "X$libdir"; then
2939 case "$current_libdirs " in
2940 *" $libdir "*) ;;
2941 *) func_append current_libdirs " $libdir" ;;
2942 esac
2943 else
2944 # Note the libdir as a future libdir.
2945 case "$future_libdirs " in
2946 *" $libdir "*) ;;
2947 *) func_append future_libdirs " $libdir" ;;
2948 esac
2949 fi
2950
2951 func_dirname "$file" "/" ""
2952 dir="$func_dirname_result"
2953 func_append dir "$objdir"
2954
2955 if test -n "$relink_command"; then
2956 # Determine the prefix the user has applied to our future dir.
2957 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
2958
2959 # Don't allow the user to place us outside of our expected
2960 # location b/c this prevents finding dependent libraries that
2961 # are installed to the same prefix.
2962 # At present, this check doesn't affect windows .dll's that
2963 # are installed into $libdir/../bin (currently, that works fine)
2964 # but it's something to keep an eye on.
2965 test "$inst_prefix_dir" = "$destdir" && \
2966 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
2967
2968 if test -n "$inst_prefix_dir"; then
2969 # Stick the inst_prefix_dir data into the link command.
2970 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2971 else
2972 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
2973 fi
2974
2975 func_warning "relinking \`$file'"
2976 func_show_eval "$relink_command" \
2977 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
2978 fi
2979
2980 # See the names of the shared library.
2981 set dummy $library_names; shift
2982 if test -n "$1"; then
2983 realname="$1"
2984 shift
2985
2986 srcname="$realname"
2987 test -n "$relink_command" && srcname="$realname"T
2988
2989 # Install the shared library and build the symlinks.
2990 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
2991 'exit $?'
2992 tstripme="$stripme"
2993 case $host_os in
2994 cygwin* | mingw* | pw32* | cegcc*)
2995 case $realname in
2996 *.dll.a)
2997 tstripme=""
2998 ;;
2999 esac
3000 ;;
3001 esac
3002 if test -n "$tstripme" && test -n "$striplib"; then
3003 func_show_eval "$striplib $destdir/$realname" 'exit $?'
3004 fi
3005
3006 if test "$#" -gt 0; then
3007 # Delete the old symlinks, and create new ones.
3008 # Try `ln -sf' first, because the `ln' binary might depend on
3009 # the symlink we replace! Solaris /bin/ln does not understand -f,
3010 # so we also need to try rm && ln -s.
3011 for linkname
3012 do
3013 test "$linkname" != "$realname" \
3014 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
3015 done
3016 fi
3017
3018 # Do each command in the postinstall commands.
3019 lib="$destdir/$realname"
3020 func_execute_cmds "$postinstall_cmds" 'exit $?'
3021 fi
3022
3023 # Install the pseudo-library for information purposes.
3024 func_basename "$file"
3025 name="$func_basename_result"
3026 instname="$dir/$name"i
3027 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
3028
3029 # Maybe install the static library, too.
3030 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
3031 ;;
3032
3033 *.lo)
3034 # Install (i.e. copy) a libtool object.
3035
3036 # Figure out destination file name, if it wasn't already specified.
3037 if test -n "$destname"; then
3038 destfile="$destdir/$destname"
3039 else
3040 func_basename "$file"
3041 destfile="$func_basename_result"
3042 destfile="$destdir/$destfile"
3043 fi
3044
3045 # Deduce the name of the destination old-style object file.
3046 case $destfile in
3047 *.lo)
3048 func_lo2o "$destfile"
3049 staticdest=$func_lo2o_result
3050 ;;
3051 *.$objext)
3052 staticdest="$destfile"
3053 destfile=
3054 ;;
3055 *)
3056 func_fatal_help "cannot copy a libtool object to \`$destfile'"
3057 ;;
3058 esac
3059
3060 # Install the libtool object if requested.
3061 test -n "$destfile" && \
3062 func_show_eval "$install_prog $file $destfile" 'exit $?'
3063
3064 # Install the old object if enabled.
3065 if test "$build_old_libs" = yes; then
3066 # Deduce the name of the old-style object file.
3067 func_lo2o "$file"
3068 staticobj=$func_lo2o_result
3069 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
3070 fi
3071 exit $EXIT_SUCCESS
3072 ;;
3073
3074 *)
3075 # Figure out destination file name, if it wasn't already specified.
3076 if test -n "$destname"; then
3077 destfile="$destdir/$destname"
3078 else
3079 func_basename "$file"
3080 destfile="$func_basename_result"
3081 destfile="$destdir/$destfile"
3082 fi
3083
3084 # If the file is missing, and there is a .exe on the end, strip it
3085 # because it is most likely a libtool script we actually want to
3086 # install
3087 stripped_ext=""
3088 case $file in
3089 *.exe)
3090 if test ! -f "$file"; then
3091 func_stripname '' '.exe' "$file"
3092 file=$func_stripname_result
3093 stripped_ext=".exe"
3094 fi
3095 ;;
3096 esac
3097
3098 # Do a test to see if this is really a libtool program.
3099 case $host in
3100 *cygwin* | *mingw*)
3101 if func_ltwrapper_executable_p "$file"; then
3102 func_ltwrapper_scriptname "$file"
3103 wrapper=$func_ltwrapper_scriptname_result
3104 else
3105 func_stripname '' '.exe' "$file"
3106 wrapper=$func_stripname_result
3107 fi
3108 ;;
3109 *)
3110 wrapper=$file
3111 ;;
3112 esac
3113 if func_ltwrapper_script_p "$wrapper"; then
3114 notinst_deplibs=
3115 relink_command=
3116
3117 func_source "$wrapper"
3118
3119 # Check the variables that should have been set.
3120 test -z "$generated_by_libtool_version" && \
3121 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
3122
3123 finalize=yes
3124 for lib in $notinst_deplibs; do
3125 # Check to see that each library is installed.
3126 libdir=
3127 if test -f "$lib"; then
3128 func_source "$lib"
3129 fi
3130 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
3131 if test -n "$libdir" && test ! -f "$libfile"; then
3132 func_warning "\`$lib' has not been installed in \`$libdir'"
3133 finalize=no
3134 fi
3135 done
3136
3137 relink_command=
3138 func_source "$wrapper"
3139
3140 outputname=
3141 if test "$fast_install" = no && test -n "$relink_command"; then
3142 $opt_dry_run || {
3143 if test "$finalize" = yes; then
3144 tmpdir=`func_mktempdir`
3145 func_basename "$file$stripped_ext"
3146 file="$func_basename_result"
3147 outputname="$tmpdir/$file"
3148 # Replace the output file specification.
3149 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
3150
3151 $opt_silent || {
3152 func_quote_for_expand "$relink_command"
3153 eval "func_echo $func_quote_for_expand_result"
3154 }
3155 if eval "$relink_command"; then :
3156 else
3157 func_error "error: relink \`$file' with the above command before installing it"
3158 $opt_dry_run || ${RM}r "$tmpdir"
3159 continue
3160 fi
3161 file="$outputname"
3162 else
3163 func_warning "cannot relink \`$file'"
3164 fi
3165 }
3166 else
3167 # Install the binary that we compiled earlier.
3168 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
3169 fi
3170 fi
3171
3172 # remove .exe since cygwin /usr/bin/install will append another
3173 # one anyway
3174 case $install_prog,$host in
3175 */usr/bin/install*,*cygwin*)
3176 case $file:$destfile in
3177 *.exe:*.exe)
3178 # this is ok
3179 ;;
3180 *.exe:*)
3181 destfile=$destfile.exe
3182 ;;
3183 *:*.exe)
3184 func_stripname '' '.exe' "$destfile"
3185 destfile=$func_stripname_result
3186 ;;
3187 esac
3188 ;;
3189 esac
3190 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
3191 $opt_dry_run || if test -n "$outputname"; then
3192 ${RM}r "$tmpdir"
3193 fi
3194 ;;
3195 esac
3196 done
3197
3198 for file in $staticlibs; do
3199 func_basename "$file"
3200 name="$func_basename_result"
3201
3202 # Set up the ranlib parameters.
3203 oldlib="$destdir/$name"
3204 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3205 tool_oldlib=$func_to_tool_file_result
3206
3207 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
3208
3209 if test -n "$stripme" && test -n "$old_striplib"; then
3210 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
3211 fi
3212
3213 # Do each command in the postinstall commands.
3214 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
3215 done
3216
3217 test -n "$future_libdirs" && \
3218 func_warning "remember to run \`$progname --finish$future_libdirs'"
3219
3220 if test -n "$current_libdirs"; then
3221 # Maybe just do a dry run.
3222 $opt_dry_run && current_libdirs=" -n$current_libdirs"
3223 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
3224 else
3225 exit $EXIT_SUCCESS
3226 fi
3227 }
3228
3229 test "$opt_mode" = install && func_mode_install ${1+"$@"}
3230
3231
3232 # func_generate_dlsyms outputname originator pic_p
3233 # Extract symbols from dlprefiles and create ${outputname}S.o with
3234 # a dlpreopen symbol table.
3235 func_generate_dlsyms ()
3236 {
3237 $opt_debug
3238 my_outputname="$1"
3239 my_originator="$2"
3240 my_pic_p="${3-no}"
3241 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
3242 my_dlsyms=
3243
3244 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3245 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3246 my_dlsyms="${my_outputname}S.c"
3247 else
3248 func_error "not configured to extract global symbols from dlpreopened files"
3249 fi
3250 fi
3251
3252 if test -n "$my_dlsyms"; then
3253 case $my_dlsyms in
3254 "") ;;
3255 *.c)
3256 # Discover the nlist of each of the dlfiles.
3257 nlist="$output_objdir/${my_outputname}.nm"
3258
3259 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
3260
3261 # Parse the name list into a source file.
3262 func_verbose "creating $output_objdir/$my_dlsyms"
3263
3264 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
3265 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
3266 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
3267
3268 #ifdef __cplusplus
3269 extern \"C\" {
3270 #endif
3271
3272 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
3273 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3274 #endif
3275
3276 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3277 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3278 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3279 relocations are performed -- see ld's documentation on pseudo-relocs. */
3280 # define LT_DLSYM_CONST
3281 #elif defined(__osf__)
3282 /* This system does not cope well with relocations in const data. */
3283 # define LT_DLSYM_CONST
3284 #else
3285 # define LT_DLSYM_CONST const
3286 #endif
3287
3288 /* External symbol declarations for the compiler. */\
3289 "
3290
3291 if test "$dlself" = yes; then
3292 func_verbose "generating symbol list for \`$output'"
3293
3294 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
3295
3296 # Add our own program objects to the symbol list.
3297 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
3298 for progfile in $progfiles; do
3299 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3300 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3301 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
3302 done
3303
3304 if test -n "$exclude_expsyms"; then
3305 $opt_dry_run || {
3306 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3307 eval '$MV "$nlist"T "$nlist"'
3308 }
3309 fi
3310
3311 if test -n "$export_symbols_regex"; then
3312 $opt_dry_run || {
3313 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3314 eval '$MV "$nlist"T "$nlist"'
3315 }
3316 fi
3317
3318 # Prepare the list of exported symbols
3319 if test -z "$export_symbols"; then
3320 export_symbols="$output_objdir/$outputname.exp"
3321 $opt_dry_run || {
3322 $RM $export_symbols
3323 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3324 case $host in
3325 *cygwin* | *mingw* | *cegcc* )
3326 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3327 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
3328 ;;
3329 esac
3330 }
3331 else
3332 $opt_dry_run || {
3333 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
3334 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
3335 eval '$MV "$nlist"T "$nlist"'
3336 case $host in
3337 *cygwin* | *mingw* | *cegcc* )
3338 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
3339 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
3340 ;;
3341 esac
3342 }
3343 fi
3344 fi
3345
3346 for dlprefile in $dlprefiles; do
3347 func_verbose "extracting global C symbols from \`$dlprefile'"
3348 func_basename "$dlprefile"
3349 name="$func_basename_result"
3350 case $host in
3351 *cygwin* | *mingw* | *cegcc* )
3352 # if an import library, we need to obtain dlname
3353 if func_win32_import_lib_p "$dlprefile"; then
3354 func_tr_sh "$dlprefile"
3355 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3356 dlprefile_dlbasename=""
3357 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3358 # Use subshell, to avoid clobbering current variable values
3359 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3360 if test -n "$dlprefile_dlname" ; then
3361 func_basename "$dlprefile_dlname"
3362 dlprefile_dlbasename="$func_basename_result"
3363 else
3364 # no lafile. user explicitly requested -dlpreopen <import library>.
3365 $sharedlib_from_linklib_cmd "$dlprefile"
3366 dlprefile_dlbasename=$sharedlib_from_linklib_result
3367 fi
3368 fi
3369 $opt_dry_run || {
3370 if test -n "$dlprefile_dlbasename" ; then
3371 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3372 else
3373 func_warning "Could not compute DLL name from $name"
3374 eval '$ECHO ": $name " >> "$nlist"'
3375 fi
3376 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3377 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3378 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3379 }
3380 else # not an import lib
3381 $opt_dry_run || {
3382 eval '$ECHO ": $name " >> "$nlist"'
3383 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3384 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3385 }
3386 fi
3387 ;;
3388 *)
3389 $opt_dry_run || {
3390 eval '$ECHO ": $name " >> "$nlist"'
3391 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3392 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3393 }
3394 ;;
3395 esac
3396 done
3397
3398 $opt_dry_run || {
3399 # Make sure we have at least an empty file.
3400 test -f "$nlist" || : > "$nlist"
3401
3402 if test -n "$exclude_expsyms"; then
3403 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3404 $MV "$nlist"T "$nlist"
3405 fi
3406
3407 # Try sorting and uniquifying the output.
3408 if $GREP -v "^: " < "$nlist" |
3409 if sort -k 3 </dev/null >/dev/null 2>&1; then
3410 sort -k 3
3411 else
3412 sort +2
3413 fi |
3414 uniq > "$nlist"S; then
3415 :
3416 else
3417 $GREP -v "^: " < "$nlist" > "$nlist"S
3418 fi
3419
3420 if test -f "$nlist"S; then
3421 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
3422 else
3423 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
3424 fi
3425
3426 echo >> "$output_objdir/$my_dlsyms" "\
3427
3428 /* The mapping between symbol names and symbols. */
3429 typedef struct {
3430 const char *name;
3431 void *address;
3432 } lt_dlsymlist;
3433 extern LT_DLSYM_CONST lt_dlsymlist
3434 lt_${my_prefix}_LTX_preloaded_symbols[];
3435 LT_DLSYM_CONST lt_dlsymlist
3436 lt_${my_prefix}_LTX_preloaded_symbols[] =
3437 {\
3438 { \"$my_originator\", (void *) 0 },"
3439
3440 case $need_lib_prefix in
3441 no)
3442 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
3443 ;;
3444 *)
3445 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
3446 ;;
3447 esac
3448 echo >> "$output_objdir/$my_dlsyms" "\
3449 {0, (void *) 0}
3450 };
3451
3452 /* This works around a problem in FreeBSD linker */
3453 #ifdef FREEBSD_WORKAROUND
3454 static const void *lt_preloaded_setup() {
3455 return lt_${my_prefix}_LTX_preloaded_symbols;
3456 }
3457 #endif
3458
3459 #ifdef __cplusplus
3460 }
3461 #endif\
3462 "
3463 } # !$opt_dry_run
3464
3465 pic_flag_for_symtable=
3466 case "$compile_command " in
3467 *" -static "*) ;;
3468 *)
3469 case $host in
3470 # compiling the symbol table file with pic_flag works around
3471 # a FreeBSD bug that causes programs to crash when -lm is
3472 # linked before any other PIC object. But we must not use
3473 # pic_flag when linking with -static. The problem exists in
3474 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3475 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3476 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
3477 *-*-hpux*)
3478 pic_flag_for_symtable=" $pic_flag" ;;
3479 *)
3480 if test "X$my_pic_p" != Xno; then
3481 pic_flag_for_symtable=" $pic_flag"
3482 fi
3483 ;;
3484 esac
3485 ;;
3486 esac
3487 symtab_cflags=
3488 for arg in $LTCFLAGS; do
3489 case $arg in
3490 -pie | -fpie | -fPIE) ;;
3491 *) func_append symtab_cflags " $arg" ;;
3492 esac
3493 done
3494
3495 # Now compile the dynamic symbol file.
3496 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
3497
3498 # Clean up the generated files.
3499 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
3500
3501 # Transform the symbol file into the correct name.
3502 symfileobj="$output_objdir/${my_outputname}S.$objext"
3503 case $host in
3504 *cygwin* | *mingw* | *cegcc* )
3505 if test -f "$output_objdir/$my_outputname.def"; then
3506 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3507 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3508 else
3509 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3510 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3511 fi
3512 ;;
3513 *)
3514 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3515 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3516 ;;
3517 esac
3518 ;;
3519 *)
3520 func_fatal_error "unknown suffix for \`$my_dlsyms'"
3521 ;;
3522 esac
3523 else
3524 # We keep going just in case the user didn't refer to
3525 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3526 # really was required.
3527
3528 # Nullify the symbol file.
3529 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
3530 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
3531 fi
3532 }
3533
3534 # func_win32_libid arg
3535 # return the library type of file 'arg'
3536 #
3537 # Need a lot of goo to handle *both* DLLs and import libs
3538 # Has to be a shell function in order to 'eat' the argument
3539 # that is supplied when $file_magic_command is called.
3540 # Despite the name, also deal with 64 bit binaries.
3541 func_win32_libid ()
3542 {
3543 $opt_debug
3544 win32_libid_type="unknown"
3545 win32_fileres=`file -L $1 2>/dev/null`
3546 case $win32_fileres in
3547 *ar\ archive\ import\ library*) # definitely import
3548 win32_libid_type="x86 archive import"
3549 ;;
3550 *ar\ archive*) # could be an import, or static
3551 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
3552 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
3553 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3554 func_to_tool_file "$1" func_convert_file_msys_to_w32
3555 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
3556 $SED -n -e '
3557 1,100{
3558 / I /{
3559 s,.*,import,
3560 p
3561 q
3562 }
3563 }'`
3564 case $win32_nmres in
3565 import*) win32_libid_type="x86 archive import";;
3566 *) win32_libid_type="x86 archive static";;
3567 esac
3568 fi
3569 ;;
3570 *DLL*)
3571 win32_libid_type="x86 DLL"
3572 ;;
3573 *executable*) # but shell scripts are "executable" too...
3574 case $win32_fileres in
3575 *MS\ Windows\ PE\ Intel*)
3576 win32_libid_type="x86 DLL"
3577 ;;
3578 esac
3579 ;;
3580 esac
3581 $ECHO "$win32_libid_type"
3582 }
3583
3584 # func_cygming_dll_for_implib ARG
3585 #
3586 # Platform-specific function to extract the
3587 # name of the DLL associated with the specified
3588 # import library ARG.
3589 # Invoked by eval'ing the libtool variable
3590 # $sharedlib_from_linklib_cmd
3591 # Result is available in the variable
3592 # $sharedlib_from_linklib_result
3593 func_cygming_dll_for_implib ()
3594 {
3595 $opt_debug
3596 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3597 }
3598
3599 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3600 #
3601 # The is the core of a fallback implementation of a
3602 # platform-specific function to extract the name of the
3603 # DLL associated with the specified import library LIBNAME.
3604 #
3605 # SECTION_NAME is either .idata$6 or .idata$7, depending
3606 # on the platform and compiler that created the implib.
3607 #
3608 # Echos the name of the DLL associated with the
3609 # specified import library.
3610 func_cygming_dll_for_implib_fallback_core ()
3611 {
3612 $opt_debug
3613 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3614 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3615 $SED '/^Contents of section '"$match_literal"':/{
3616 # Place marker at beginning of archive member dllname section
3617 s/.*/====MARK====/
3618 p
3619 d
3620 }
3621 # These lines can sometimes be longer than 43 characters, but
3622 # are always uninteresting
3623 /:[ ]*file format pe[i]\{,1\}-/d
3624 /^In archive [^:]*:/d
3625 # Ensure marker is printed
3626 /^====MARK====/p
3627 # Remove all lines with less than 43 characters
3628 /^.\{43\}/!d
3629 # From remaining lines, remove first 43 characters
3630 s/^.\{43\}//' |
3631 $SED -n '
3632 # Join marker and all lines until next marker into a single line
3633 /^====MARK====/ b para
3634 H
3635 $ b para
3636 b
3637 :para
3638 x
3639 s/\n//g
3640 # Remove the marker
3641 s/^====MARK====//
3642 # Remove trailing dots and whitespace
3643 s/[\. \t]*$//
3644 # Print
3645 /./p' |
3646 # we now have a list, one entry per line, of the stringified
3647 # contents of the appropriate section of all members of the
3648 # archive which possess that section. Heuristic: eliminate
3649 # all those which have a first or second character that is
3650 # a '.' (that is, objdump's representation of an unprintable
3651 # character.) This should work for all archives with less than
3652 # 0x302f exports -- but will fail for DLLs whose name actually
3653 # begins with a literal '.' or a single character followed by
3654 # a '.'.
3655 #
3656 # Of those that remain, print the first one.
3657 $SED -e '/^\./d;/^.\./d;q'
3658 }
3659
3660 # func_cygming_gnu_implib_p ARG
3661 # This predicate returns with zero status (TRUE) if
3662 # ARG is a GNU/binutils-style import library. Returns
3663 # with nonzero status (FALSE) otherwise.
3664 func_cygming_gnu_implib_p ()
3665 {
3666 $opt_debug
3667 func_to_tool_file "$1" func_convert_file_msys_to_w32
3668 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3669 test -n "$func_cygming_gnu_implib_tmp"
3670 }
3671
3672 # func_cygming_ms_implib_p ARG
3673 # This predicate returns with zero status (TRUE) if
3674 # ARG is an MS-style import library. Returns
3675 # with nonzero status (FALSE) otherwise.
3676 func_cygming_ms_implib_p ()
3677 {
3678 $opt_debug
3679 func_to_tool_file "$1" func_convert_file_msys_to_w32
3680 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3681 test -n "$func_cygming_ms_implib_tmp"
3682 }
3683
3684 # func_cygming_dll_for_implib_fallback ARG
3685 # Platform-specific function to extract the
3686 # name of the DLL associated with the specified
3687 # import library ARG.
3688 #
3689 # This fallback implementation is for use when $DLLTOOL
3690 # does not support the --identify-strict option.
3691 # Invoked by eval'ing the libtool variable
3692 # $sharedlib_from_linklib_cmd
3693 # Result is available in the variable
3694 # $sharedlib_from_linklib_result
3695 func_cygming_dll_for_implib_fallback ()
3696 {
3697 $opt_debug
3698 if func_cygming_gnu_implib_p "$1" ; then
3699 # binutils import library
3700 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3701 elif func_cygming_ms_implib_p "$1" ; then
3702 # ms-generated import library
3703 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3704 else
3705 # unknown
3706 sharedlib_from_linklib_result=""
3707 fi
3708 }
3709
3710
3711 # func_extract_an_archive dir oldlib
3712 func_extract_an_archive ()
3713 {
3714 $opt_debug
3715 f_ex_an_ar_dir="$1"; shift
3716 f_ex_an_ar_oldlib="$1"
3717 if test "$lock_old_archive_extraction" = yes; then
3718 lockfile=$f_ex_an_ar_oldlib.lock
3719 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3720 func_echo "Waiting for $lockfile to be removed"
3721 sleep 2
3722 done
3723 fi
3724 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
3725 'stat=$?; rm -f "$lockfile"; exit $stat'
3726 if test "$lock_old_archive_extraction" = yes; then
3727 $opt_dry_run || rm -f "$lockfile"
3728 fi
3729 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
3730 :
3731 else
3732 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
3733 fi
3734 }
3735
3736
3737 # func_extract_archives gentop oldlib ...
3738 func_extract_archives ()
3739 {
3740 $opt_debug
3741 my_gentop="$1"; shift
3742 my_oldlibs=${1+"$@"}
3743 my_oldobjs=""
3744 my_xlib=""
3745 my_xabs=""
3746 my_xdir=""
3747
3748 for my_xlib in $my_oldlibs; do
3749 # Extract the objects.
3750 case $my_xlib in
3751 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
3752 *) my_xabs=`pwd`"/$my_xlib" ;;
3753 esac
3754 func_basename "$my_xlib"
3755 my_xlib="$func_basename_result"
3756 my_xlib_u=$my_xlib
3757 while :; do
3758 case " $extracted_archives " in
3759 *" $my_xlib_u "*)
3760 func_arith $extracted_serial + 1
3761 extracted_serial=$func_arith_result
3762 my_xlib_u=lt$extracted_serial-$my_xlib ;;
3763 *) break ;;
3764 esac
3765 done
3766 extracted_archives="$extracted_archives $my_xlib_u"
3767 my_xdir="$my_gentop/$my_xlib_u"
3768
3769 func_mkdir_p "$my_xdir"
3770
3771 case $host in
3772 *-darwin*)
3773 func_verbose "Extracting $my_xabs"
3774 # Do not bother doing anything if just a dry run
3775 $opt_dry_run || {
3776 darwin_orig_dir=`pwd`
3777 cd $my_xdir || exit $?
3778 darwin_archive=$my_xabs
3779 darwin_curdir=`pwd`
3780 darwin_base_archive=`basename "$darwin_archive"`
3781 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
3782 if test -n "$darwin_arches"; then
3783 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
3784 darwin_arch=
3785 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
3786 for darwin_arch in $darwin_arches ; do
3787 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3788 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
3789 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3790 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
3791 cd "$darwin_curdir"
3792 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
3793 done # $darwin_arches
3794 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
3795 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
3796 darwin_file=
3797 darwin_files=
3798 for darwin_file in $darwin_filelist; do
3799 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
3800 $LIPO -create -output "$darwin_file" $darwin_files
3801 done # $darwin_filelist
3802 $RM -rf unfat-$$
3803 cd "$darwin_orig_dir"
3804 else
3805 cd $darwin_orig_dir
3806 func_extract_an_archive "$my_xdir" "$my_xabs"
3807 fi # $darwin_arches
3808 } # !$opt_dry_run
3809 ;;
3810 *)
3811 func_extract_an_archive "$my_xdir" "$my_xabs"
3812 ;;
3813 esac
3814 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
3815 done
3816
3817 func_extract_archives_result="$my_oldobjs"
3818 }
3819
3820
3821 # func_emit_wrapper [arg=no]
3822 #
3823 # Emit a libtool wrapper script on stdout.
3824 # Don't directly open a file because we may want to
3825 # incorporate the script contents within a cygwin/mingw
3826 # wrapper executable. Must ONLY be called from within
3827 # func_mode_link because it depends on a number of variables
3828 # set therein.
3829 #
3830 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
3831 # variable will take. If 'yes', then the emitted script
3832 # will assume that the directory in which it is stored is
3833 # the $objdir directory. This is a cygwin/mingw-specific
3834 # behavior.
3835 func_emit_wrapper ()
3836 {
3837 func_emit_wrapper_arg1=${1-no}
3838
3839 $ECHO "\
3840 #! $SHELL
3841
3842 # $output - temporary wrapper script for $objdir/$outputname
3843 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
3844 #
3845 # The $output program cannot be directly executed until all the libtool
3846 # libraries that it depends on are installed.
3847 #
3848 # This wrapper script should never be moved out of the build directory.
3849 # If it is, it will not operate correctly.
3850
3851 # Sed substitution that helps us do robust quoting. It backslashifies
3852 # metacharacters that are still active within double-quoted strings.
3853 sed_quote_subst='$sed_quote_subst'
3854
3855 # Be Bourne compatible
3856 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
3857 emulate sh
3858 NULLCMD=:
3859 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
3860 # is contrary to our usage. Disable this feature.
3861 alias -g '\${1+\"\$@\"}'='\"\$@\"'
3862 setopt NO_GLOB_SUBST
3863 else
3864 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
3865 fi
3866 BIN_SH=xpg4; export BIN_SH # for Tru64
3867 DUALCASE=1; export DUALCASE # for MKS sh
3868
3869 # The HP-UX ksh and POSIX shell print the target directory to stdout
3870 # if CDPATH is set.
3871 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3872
3873 relink_command=\"$relink_command\"
3874
3875 # This environment variable determines our operation mode.
3876 if test \"\$libtool_install_magic\" = \"$magic\"; then
3877 # install mode needs the following variables:
3878 generated_by_libtool_version='$macro_version'
3879 notinst_deplibs='$notinst_deplibs'
3880 else
3881 # When we are sourced in execute mode, \$file and \$ECHO are already set.
3882 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3883 file=\"\$0\""
3884
3885 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3886 $ECHO "\
3887
3888 # A function that is used when there is no print builtin or printf.
3889 func_fallback_echo ()
3890 {
3891 eval 'cat <<_LTECHO_EOF
3892 \$1
3893 _LTECHO_EOF'
3894 }
3895 ECHO=\"$qECHO\"
3896 fi
3897
3898 # Very basic option parsing. These options are (a) specific to
3899 # the libtool wrapper, (b) are identical between the wrapper
3900 # /script/ and the wrapper /executable/ which is used only on
3901 # windows platforms, and (c) all begin with the string "--lt-"
3902 # (application programs are unlikely to have options which match
3903 # this pattern).
3904 #
3905 # There are only two supported options: --lt-debug and
3906 # --lt-dump-script. There is, deliberately, no --lt-help.
3907 #
3908 # The first argument to this parsing function should be the
3909 # script's $0 value, followed by "$@".
3910 lt_option_debug=
3911 func_parse_lt_options ()
3912 {
3913 lt_script_arg0=\$0
3914 shift
3915 for lt_opt
3916 do
3917 case \"\$lt_opt\" in
3918 --lt-debug) lt_option_debug=1 ;;
3919 --lt-dump-script)
3920 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
3921 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
3922 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
3923 cat \"\$lt_dump_D/\$lt_dump_F\"
3924 exit 0
3925 ;;
3926 --lt-*)
3927 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
3928 exit 1
3929 ;;
3930 esac
3931 done
3932
3933 # Print the debug banner immediately:
3934 if test -n \"\$lt_option_debug\"; then
3935 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
3936 fi
3937 }
3938
3939 # Used when --lt-debug. Prints its arguments to stdout
3940 # (redirection is the responsibility of the caller)
3941 func_lt_dump_args ()
3942 {
3943 lt_dump_args_N=1;
3944 for lt_arg
3945 do
3946 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
3947 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
3948 done
3949 }
3950
3951 # Core function for launching the target application
3952 func_exec_program_core ()
3953 {
3954 "
3955 case $host in
3956 # Backslashes separate directories on plain windows
3957 *-*-mingw | *-*-os2* | *-cegcc*)
3958 $ECHO "\
3959 if test -n \"\$lt_option_debug\"; then
3960 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
3961 func_lt_dump_args \${1+\"\$@\"} 1>&2
3962 fi
3963 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3964 "
3965 ;;
3966
3967 *)
3968 $ECHO "\
3969 if test -n \"\$lt_option_debug\"; then
3970 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
3971 func_lt_dump_args \${1+\"\$@\"} 1>&2
3972 fi
3973 exec \"\$progdir/\$program\" \${1+\"\$@\"}
3974 "
3975 ;;
3976 esac
3977 $ECHO "\
3978 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
3979 exit 1
3980 }
3981
3982 # A function to encapsulate launching the target application
3983 # Strips options in the --lt-* namespace from \$@ and
3984 # launches target application with the remaining arguments.
3985 func_exec_program ()
3986 {
3987 case \" \$* \" in
3988 *\\ --lt-*)
3989 for lt_wr_arg
3990 do
3991 case \$lt_wr_arg in
3992 --lt-*) ;;
3993 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3994 esac
3995 shift
3996 done ;;
3997 esac
3998 func_exec_program_core \${1+\"\$@\"}
3999 }
4000
4001 # Parse options
4002 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
4003
4004 # Find the directory that this script lives in.
4005 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4006 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4007
4008 # Follow symbolic links until we get to the real thisdir.
4009 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
4010 while test -n \"\$file\"; do
4011 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
4012
4013 # If there was a directory component, then change thisdir.
4014 if test \"x\$destdir\" != \"x\$file\"; then
4015 case \"\$destdir\" in
4016 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4017 *) thisdir=\"\$thisdir/\$destdir\" ;;
4018 esac
4019 fi
4020
4021 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
4022 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
4023 done
4024
4025 # Usually 'no', except on cygwin/mingw when embedded into
4026 # the cwrapper.
4027 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
4028 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
4029 # special case for '.'
4030 if test \"\$thisdir\" = \".\"; then
4031 thisdir=\`pwd\`
4032 fi
4033 # remove .libs from thisdir
4034 case \"\$thisdir\" in
4035 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
4036 $objdir ) thisdir=. ;;
4037 esac
4038 fi
4039
4040 # Try to get the absolute directory name.
4041 absdir=\`cd \"\$thisdir\" && pwd\`
4042 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4043 "
4044
4045 if test "$fast_install" = yes; then
4046 $ECHO "\
4047 program=lt-'$outputname'$exeext
4048 progdir=\"\$thisdir/$objdir\"
4049
4050 if test ! -f \"\$progdir/\$program\" ||
4051 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
4052 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4053
4054 file=\"\$\$-\$program\"
4055
4056 if test ! -d \"\$progdir\"; then
4057 $MKDIR \"\$progdir\"
4058 else
4059 $RM \"\$progdir/\$file\"
4060 fi"
4061
4062 $ECHO "\
4063
4064 # relink executable if necessary
4065 if test -n \"\$relink_command\"; then
4066 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4067 else
4068 $ECHO \"\$relink_command_output\" >&2
4069 $RM \"\$progdir/\$file\"
4070 exit 1
4071 fi
4072 fi
4073
4074 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4075 { $RM \"\$progdir/\$program\";
4076 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4077 $RM \"\$progdir/\$file\"
4078 fi"
4079 else
4080 $ECHO "\
4081 program='$outputname'
4082 progdir=\"\$thisdir/$objdir\"
4083 "
4084 fi
4085
4086 $ECHO "\
4087
4088 if test -f \"\$progdir/\$program\"; then"
4089
4090 # fixup the dll searchpath if we need to.
4091 #
4092 # Fix the DLL searchpath if we need to. Do this before prepending
4093 # to shlibpath, because on Windows, both are PATH and uninstalled
4094 # libraries must come first.
4095 if test -n "$dllsearchpath"; then
4096 $ECHO "\
4097 # Add the dll search path components to the executable PATH
4098 PATH=$dllsearchpath:\$PATH
4099 "
4100 fi
4101
4102 # Export our shlibpath_var if we have one.
4103 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4104 $ECHO "\
4105 # Add our own library path to $shlibpath_var
4106 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4107
4108 # Some systems cannot cope with colon-terminated $shlibpath_var
4109 # The second colon is a workaround for a bug in BeOS R4 sed
4110 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
4111
4112 export $shlibpath_var
4113 "
4114 fi
4115
4116 $ECHO "\
4117 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4118 # Run the actual program with our arguments.
4119 func_exec_program \${1+\"\$@\"}
4120 fi
4121 else
4122 # The program doesn't exist.
4123 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4124 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
4125 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4126 exit 1
4127 fi
4128 fi\
4129 "
4130 }
4131
4132
4133 # func_emit_cwrapperexe_src
4134 # emit the source code for a wrapper executable on stdout
4135 # Must ONLY be called from within func_mode_link because
4136 # it depends on a number of variable set therein.
4137 func_emit_cwrapperexe_src ()
4138 {
4139 cat <<EOF
4140
4141 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4142 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
4143
4144 The $output program cannot be directly executed until all the libtool
4145 libraries that it depends on are installed.
4146
4147 This wrapper executable should never be moved out of the build directory.
4148 If it is, it will not operate correctly.
4149 */
4150 EOF
4151 cat <<"EOF"
4152 #ifdef _MSC_VER
4153 # define _CRT_SECURE_NO_DEPRECATE 1
4154 #endif
4155 #include <stdio.h>
4156 #include <stdlib.h>
4157 #ifdef _MSC_VER
4158 # include <direct.h>
4159 # include <process.h>
4160 # include <io.h>
4161 #else
4162 # include <unistd.h>
4163 # include <stdint.h>
4164 # ifdef __CYGWIN__
4165 # include <io.h>
4166 # endif
4167 #endif
4168 #include <malloc.h>
4169 #include <stdarg.h>
4170 #include <assert.h>
4171 #include <string.h>
4172 #include <ctype.h>
4173 #include <errno.h>
4174 #include <fcntl.h>
4175 #include <sys/stat.h>
4176
4177 /* declarations of non-ANSI functions */
4178 #if defined(__MINGW32__)
4179 # ifdef __STRICT_ANSI__
4180 int _putenv (const char *);
4181 # endif
4182 #elif defined(__CYGWIN__)
4183 # ifdef __STRICT_ANSI__
4184 char *realpath (const char *, char *);
4185 int putenv (char *);
4186 int setenv (const char *, const char *, int);
4187 # endif
4188 /* #elif defined (other platforms) ... */
4189 #endif
4190
4191 /* portability defines, excluding path handling macros */
4192 #if defined(_MSC_VER)
4193 # define setmode _setmode
4194 # define stat _stat
4195 # define chmod _chmod
4196 # define getcwd _getcwd
4197 # define putenv _putenv
4198 # define S_IXUSR _S_IEXEC
4199 # ifndef _INTPTR_T_DEFINED
4200 # define _INTPTR_T_DEFINED
4201 # define intptr_t int
4202 # endif
4203 #elif defined(__MINGW32__)
4204 # define setmode _setmode
4205 # define stat _stat
4206 # define chmod _chmod
4207 # define getcwd _getcwd
4208 # define putenv _putenv
4209 #elif defined(__CYGWIN__)
4210 # define HAVE_SETENV
4211 # define FOPEN_WB "wb"
4212 /* #elif defined (other platforms) ... */
4213 #endif
4214
4215 #if defined(PATH_MAX)
4216 # define LT_PATHMAX PATH_MAX
4217 #elif defined(MAXPATHLEN)
4218 # define LT_PATHMAX MAXPATHLEN
4219 #else
4220 # define LT_PATHMAX 1024
4221 #endif
4222
4223 #ifndef S_IXOTH
4224 # define S_IXOTH 0
4225 #endif
4226 #ifndef S_IXGRP
4227 # define S_IXGRP 0
4228 #endif
4229
4230 /* path handling portability macros */
4231 #ifndef DIR_SEPARATOR
4232 # define DIR_SEPARATOR '/'
4233 # define PATH_SEPARATOR ':'
4234 #endif
4235
4236 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4237 defined (__OS2__)
4238 # define HAVE_DOS_BASED_FILE_SYSTEM
4239 # define FOPEN_WB "wb"
4240 # ifndef DIR_SEPARATOR_2
4241 # define DIR_SEPARATOR_2 '\\'
4242 # endif
4243 # ifndef PATH_SEPARATOR_2
4244 # define PATH_SEPARATOR_2 ';'
4245 # endif
4246 #endif
4247
4248 #ifndef DIR_SEPARATOR_2
4249 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4250 #else /* DIR_SEPARATOR_2 */
4251 # define IS_DIR_SEPARATOR(ch) \
4252 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4253 #endif /* DIR_SEPARATOR_2 */
4254
4255 #ifndef PATH_SEPARATOR_2
4256 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4257 #else /* PATH_SEPARATOR_2 */
4258 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4259 #endif /* PATH_SEPARATOR_2 */
4260
4261 #ifndef FOPEN_WB
4262 # define FOPEN_WB "w"
4263 #endif
4264 #ifndef _O_BINARY
4265 # define _O_BINARY 0
4266 #endif
4267
4268 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4269 #define XFREE(stale) do { \
4270 if (stale) { free ((void *) stale); stale = 0; } \
4271 } while (0)
4272
4273 #if defined(LT_DEBUGWRAPPER)
4274 static int lt_debug = 1;
4275 #else
4276 static int lt_debug = 0;
4277 #endif
4278
4279 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
4280
4281 void *xmalloc (size_t num);
4282 char *xstrdup (const char *string);
4283 const char *base_name (const char *name);
4284 char *find_executable (const char *wrapper);
4285 char *chase_symlinks (const char *pathspec);
4286 int make_executable (const char *path);
4287 int check_executable (const char *path);
4288 char *strendzap (char *str, const char *pat);
4289 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4290 void lt_fatal (const char *file, int line, const char *message, ...);
4291 static const char *nonnull (const char *s);
4292 static const char *nonempty (const char *s);
4293 void lt_setenv (const char *name, const char *value);
4294 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
4295 void lt_update_exe_path (const char *name, const char *value);
4296 void lt_update_lib_path (const char *name, const char *value);
4297 char **prepare_spawn (char **argv);
4298 void lt_dump_script (FILE *f);
4299 EOF
4300
4301 cat <<EOF
4302 volatile const char * MAGIC_EXE = "$magic_exe";
4303 const char * LIB_PATH_VARNAME = "$shlibpath_var";
4304 EOF
4305
4306 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4307 func_to_host_path "$temp_rpath"
4308 cat <<EOF
4309 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
4310 EOF
4311 else
4312 cat <<"EOF"
4313 const char * LIB_PATH_VALUE = "";
4314 EOF
4315 fi
4316
4317 if test -n "$dllsearchpath"; then
4318 func_to_host_path "$dllsearchpath:"
4319 cat <<EOF
4320 const char * EXE_PATH_VARNAME = "PATH";
4321 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
4322 EOF
4323 else
4324 cat <<"EOF"
4325 const char * EXE_PATH_VARNAME = "";
4326 const char * EXE_PATH_VALUE = "";
4327 EOF
4328 fi
4329
4330 if test "$fast_install" = yes; then
4331 cat <<EOF
4332 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
4333 EOF
4334 else
4335 cat <<EOF
4336 const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
4337 EOF
4338 fi
4339
4340
4341 cat <<"EOF"
4342
4343 #define LTWRAPPER_OPTION_PREFIX "--lt-"
4344
4345 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
4346 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
4347 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
4348
4349 int
4350 main (int argc, char *argv[])
4351 {
4352 char **newargz;
4353 int newargc;
4354 char *tmp_pathspec;
4355 char *actual_cwrapper_path;
4356 char *actual_cwrapper_name;
4357 char *target_name;
4358 char *lt_argv_zero;
4359 intptr_t rval = 127;
4360
4361 int i;
4362
4363 program_name = (char *) xstrdup (base_name (argv[0]));
4364 newargz = XMALLOC (char *, argc + 1);
4365
4366 /* very simple arg parsing; don't want to rely on getopt
4367 * also, copy all non cwrapper options to newargz, except
4368 * argz[0], which is handled differently
4369 */
4370 newargc=0;
4371 for (i = 1; i < argc; i++)
4372 {
4373 if (strcmp (argv[i], dumpscript_opt) == 0)
4374 {
4375 EOF
4376 case "$host" in
4377 *mingw* | *cygwin* )
4378 # make stdout use "unix" line endings
4379 echo " setmode(1,_O_BINARY);"
4380 ;;
4381 esac
4382
4383 cat <<"EOF"
4384 lt_dump_script (stdout);
4385 return 0;
4386 }
4387 if (strcmp (argv[i], debug_opt) == 0)
4388 {
4389 lt_debug = 1;
4390 continue;
4391 }
4392 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4393 {
4394 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4395 namespace, but it is not one of the ones we know about and
4396 have already dealt with, above (inluding dump-script), then
4397 report an error. Otherwise, targets might begin to believe
4398 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4399 namespace. The first time any user complains about this, we'll
4400 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4401 or a configure.ac-settable value.
4402 */
4403 lt_fatal (__FILE__, __LINE__,
4404 "unrecognized %s option: '%s'",
4405 ltwrapper_option_prefix, argv[i]);
4406 }
4407 /* otherwise ... */
4408 newargz[++newargc] = xstrdup (argv[i]);
4409 }
4410 newargz[++newargc] = NULL;
4411
4412 EOF
4413 cat <<EOF
4414 /* The GNU banner must be the first non-error debug message */
4415 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4416 EOF
4417 cat <<"EOF"
4418 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4419 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4420
4421 tmp_pathspec = find_executable (argv[0]);
4422 if (tmp_pathspec == NULL)
4423 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
4424 lt_debugprintf (__FILE__, __LINE__,
4425 "(main) found exe (before symlink chase) at: %s\n",
4426 tmp_pathspec);
4427
4428 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
4429 lt_debugprintf (__FILE__, __LINE__,
4430 "(main) found exe (after symlink chase) at: %s\n",
4431 actual_cwrapper_path);
4432 XFREE (tmp_pathspec);
4433
4434 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
4435 strendzap (actual_cwrapper_path, actual_cwrapper_name);
4436
4437 /* wrapper name transforms */
4438 strendzap (actual_cwrapper_name, ".exe");
4439 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
4440 XFREE (actual_cwrapper_name);
4441 actual_cwrapper_name = tmp_pathspec;
4442 tmp_pathspec = 0;
4443
4444 /* target_name transforms -- use actual target program name; might have lt- prefix */
4445 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
4446 strendzap (target_name, ".exe");
4447 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
4448 XFREE (target_name);
4449 target_name = tmp_pathspec;
4450 tmp_pathspec = 0;
4451
4452 lt_debugprintf (__FILE__, __LINE__,
4453 "(main) libtool target name: %s\n",
4454 target_name);
4455 EOF
4456
4457 cat <<EOF
4458 newargz[0] =
4459 XMALLOC (char, (strlen (actual_cwrapper_path) +
4460 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
4461 strcpy (newargz[0], actual_cwrapper_path);
4462 strcat (newargz[0], "$objdir");
4463 strcat (newargz[0], "/");
4464 EOF
4465
4466 cat <<"EOF"
4467 /* stop here, and copy so we don't have to do this twice */
4468 tmp_pathspec = xstrdup (newargz[0]);
4469
4470 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
4471 strcat (newargz[0], actual_cwrapper_name);
4472
4473 /* DO want the lt- prefix here if it exists, so use target_name */
4474 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
4475 XFREE (tmp_pathspec);
4476 tmp_pathspec = NULL;
4477 EOF
4478
4479 case $host_os in
4480 mingw*)
4481 cat <<"EOF"
4482 {
4483 char* p;
4484 while ((p = strchr (newargz[0], '\\')) != NULL)
4485 {
4486 *p = '/';
4487 }
4488 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
4489 {
4490 *p = '/';
4491 }
4492 }
4493 EOF
4494 ;;
4495 esac
4496
4497 cat <<"EOF"
4498 XFREE (target_name);
4499 XFREE (actual_cwrapper_path);
4500 XFREE (actual_cwrapper_name);
4501
4502 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
4503 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
4504 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4505 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4506 because on Windows, both *_VARNAMEs are PATH but uninstalled
4507 libraries must come first. */
4508 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
4509 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4510
4511 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4512 nonnull (lt_argv_zero));
4513 for (i = 0; i < newargc; i++)
4514 {
4515 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
4516 i, nonnull (newargz[i]));
4517 }
4518
4519 EOF
4520
4521 case $host_os in
4522 mingw*)
4523 cat <<"EOF"
4524 /* execv doesn't actually work on mingw as expected on unix */
4525 newargz = prepare_spawn (newargz);
4526 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
4527 if (rval == -1)
4528 {
4529 /* failed to start process */
4530 lt_debugprintf (__FILE__, __LINE__,
4531 "(main) failed to launch target \"%s\": %s\n",
4532 lt_argv_zero, nonnull (strerror (errno)));
4533 return 127;
4534 }
4535 return rval;
4536 EOF
4537 ;;
4538 *)
4539 cat <<"EOF"
4540 execv (lt_argv_zero, newargz);
4541 return rval; /* =127, but avoids unused variable warning */
4542 EOF
4543 ;;
4544 esac
4545
4546 cat <<"EOF"
4547 }
4548
4549 void *
4550 xmalloc (size_t num)
4551 {
4552 void *p = (void *) malloc (num);
4553 if (!p)
4554 lt_fatal (__FILE__, __LINE__, "memory exhausted");
4555
4556 return p;
4557 }
4558
4559 char *
4560 xstrdup (const char *string)
4561 {
4562 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
4563 string) : NULL;
4564 }
4565
4566 const char *
4567 base_name (const char *name)
4568 {
4569 const char *base;
4570
4571 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4572 /* Skip over the disk name in MSDOS pathnames. */
4573 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
4574 name += 2;
4575 #endif
4576
4577 for (base = name; *name; name++)
4578 if (IS_DIR_SEPARATOR (*name))
4579 base = name + 1;
4580 return base;
4581 }
4582
4583 int
4584 check_executable (const char *path)
4585 {
4586 struct stat st;
4587
4588 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
4589 nonempty (path));
4590 if ((!path) || (!*path))
4591 return 0;
4592
4593 if ((stat (path, &st) >= 0)
4594 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
4595 return 1;
4596 else
4597 return 0;
4598 }
4599
4600 int
4601 make_executable (const char *path)
4602 {
4603 int rval = 0;
4604 struct stat st;
4605
4606 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
4607 nonempty (path));
4608 if ((!path) || (!*path))
4609 return 0;
4610
4611 if (stat (path, &st) >= 0)
4612 {
4613 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
4614 }
4615 return rval;
4616 }
4617
4618 /* Searches for the full path of the wrapper. Returns
4619 newly allocated full path name if found, NULL otherwise
4620 Does not chase symlinks, even on platforms that support them.
4621 */
4622 char *
4623 find_executable (const char *wrapper)
4624 {
4625 int has_slash = 0;
4626 const char *p;
4627 const char *p_next;
4628 /* static buffer for getcwd */
4629 char tmp[LT_PATHMAX + 1];
4630 int tmp_len;
4631 char *concat_name;
4632
4633 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
4634 nonempty (wrapper));
4635
4636 if ((wrapper == NULL) || (*wrapper == '\0'))
4637 return NULL;
4638
4639 /* Absolute path? */
4640 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4641 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
4642 {
4643 concat_name = xstrdup (wrapper);
4644 if (check_executable (concat_name))
4645 return concat_name;
4646 XFREE (concat_name);
4647 }
4648 else
4649 {
4650 #endif
4651 if (IS_DIR_SEPARATOR (wrapper[0]))
4652 {
4653 concat_name = xstrdup (wrapper);
4654 if (check_executable (concat_name))
4655 return concat_name;
4656 XFREE (concat_name);
4657 }
4658 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4659 }
4660 #endif
4661
4662 for (p = wrapper; *p; p++)
4663 if (*p == '/')
4664 {
4665 has_slash = 1;
4666 break;
4667 }
4668 if (!has_slash)
4669 {
4670 /* no slashes; search PATH */
4671 const char *path = getenv ("PATH");
4672 if (path != NULL)
4673 {
4674 for (p = path; *p; p = p_next)
4675 {
4676 const char *q;
4677 size_t p_len;
4678 for (q = p; *q; q++)
4679 if (IS_PATH_SEPARATOR (*q))
4680 break;
4681 p_len = q - p;
4682 p_next = (*q == '\0' ? q : q + 1);
4683 if (p_len == 0)
4684 {
4685 /* empty path: current directory */
4686 if (getcwd (tmp, LT_PATHMAX) == NULL)
4687 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4688 nonnull (strerror (errno)));
4689 tmp_len = strlen (tmp);
4690 concat_name =
4691 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4692 memcpy (concat_name, tmp, tmp_len);
4693 concat_name[tmp_len] = '/';
4694 strcpy (concat_name + tmp_len + 1, wrapper);
4695 }
4696 else
4697 {
4698 concat_name =
4699 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
4700 memcpy (concat_name, p, p_len);
4701 concat_name[p_len] = '/';
4702 strcpy (concat_name + p_len + 1, wrapper);
4703 }
4704 if (check_executable (concat_name))
4705 return concat_name;
4706 XFREE (concat_name);
4707 }
4708 }
4709 /* not found in PATH; assume curdir */
4710 }
4711 /* Relative path | not found in path: prepend cwd */
4712 if (getcwd (tmp, LT_PATHMAX) == NULL)
4713 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4714 nonnull (strerror (errno)));
4715 tmp_len = strlen (tmp);
4716 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
4717 memcpy (concat_name, tmp, tmp_len);
4718 concat_name[tmp_len] = '/';
4719 strcpy (concat_name + tmp_len + 1, wrapper);
4720
4721 if (check_executable (concat_name))
4722 return concat_name;
4723 XFREE (concat_name);
4724 return NULL;
4725 }
4726
4727 char *
4728 chase_symlinks (const char *pathspec)
4729 {
4730 #ifndef S_ISLNK
4731 return xstrdup (pathspec);
4732 #else
4733 char buf[LT_PATHMAX];
4734 struct stat s;
4735 char *tmp_pathspec = xstrdup (pathspec);
4736 char *p;
4737 int has_symlinks = 0;
4738 while (strlen (tmp_pathspec) && !has_symlinks)
4739 {
4740 lt_debugprintf (__FILE__, __LINE__,
4741 "checking path component for symlinks: %s\n",
4742 tmp_pathspec);
4743 if (lstat (tmp_pathspec, &s) == 0)
4744 {
4745 if (S_ISLNK (s.st_mode) != 0)
4746 {
4747 has_symlinks = 1;
4748 break;
4749 }
4750
4751 /* search backwards for last DIR_SEPARATOR */
4752 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
4753 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
4754 p--;
4755 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
4756 {
4757 /* no more DIR_SEPARATORS left */
4758 break;
4759 }
4760 *p = '\0';
4761 }
4762 else
4763 {
4764 lt_fatal (__FILE__, __LINE__,
4765 "error accessing file \"%s\": %s",
4766 tmp_pathspec, nonnull (strerror (errno)));
4767 }
4768 }
4769 XFREE (tmp_pathspec);
4770
4771 if (!has_symlinks)
4772 {
4773 return xstrdup (pathspec);
4774 }
4775
4776 tmp_pathspec = realpath (pathspec, buf);
4777 if (tmp_pathspec == 0)
4778 {
4779 lt_fatal (__FILE__, __LINE__,
4780 "could not follow symlinks for %s", pathspec);
4781 }
4782 return xstrdup (tmp_pathspec);
4783 #endif
4784 }
4785
4786 char *
4787 strendzap (char *str, const char *pat)
4788 {
4789 size_t len, patlen;
4790
4791 assert (str != NULL);
4792 assert (pat != NULL);
4793
4794 len = strlen (str);
4795 patlen = strlen (pat);
4796
4797 if (patlen <= len)
4798 {
4799 str += len - patlen;
4800 if (strcmp (str, pat) == 0)
4801 *str = '\0';
4802 }
4803 return str;
4804 }
4805
4806 void
4807 lt_debugprintf (const char *file, int line, const char *fmt, ...)
4808 {
4809 va_list args;
4810 if (lt_debug)
4811 {
4812 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4813 va_start (args, fmt);
4814 (void) vfprintf (stderr, fmt, args);
4815 va_end (args);
4816 }
4817 }
4818
4819 static void
4820 lt_error_core (int exit_status, const char *file,
4821 int line, const char *mode,
4822 const char *message, va_list ap)
4823 {
4824 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
4825 vfprintf (stderr, message, ap);
4826 fprintf (stderr, ".\n");
4827
4828 if (exit_status >= 0)
4829 exit (exit_status);
4830 }
4831
4832 void
4833 lt_fatal (const char *file, int line, const char *message, ...)
4834 {
4835 va_list ap;
4836 va_start (ap, message);
4837 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
4838 va_end (ap);
4839 }
4840
4841 static const char *
4842 nonnull (const char *s)
4843 {
4844 return s ? s : "(null)";
4845 }
4846
4847 static const char *
4848 nonempty (const char *s)
4849 {
4850 return (s && !*s) ? "(empty)" : nonnull (s);
4851 }
4852
4853 void
4854 lt_setenv (const char *name, const char *value)
4855 {
4856 lt_debugprintf (__FILE__, __LINE__,
4857 "(lt_setenv) setting '%s' to '%s'\n",
4858 nonnull (name), nonnull (value));
4859 {
4860 #ifdef HAVE_SETENV
4861 /* always make a copy, for consistency with !HAVE_SETENV */
4862 char *str = xstrdup (value);
4863 setenv (name, str, 1);
4864 #else
4865 int len = strlen (name) + 1 + strlen (value) + 1;
4866 char *str = XMALLOC (char, len);
4867 sprintf (str, "%s=%s", name, value);
4868 if (putenv (str) != EXIT_SUCCESS)
4869 {
4870 XFREE (str);
4871 }
4872 #endif
4873 }
4874 }
4875
4876 char *
4877 lt_extend_str (const char *orig_value, const char *add, int to_end)
4878 {
4879 char *new_value;
4880 if (orig_value && *orig_value)
4881 {
4882 int orig_value_len = strlen (orig_value);
4883 int add_len = strlen (add);
4884 new_value = XMALLOC (char, add_len + orig_value_len + 1);
4885 if (to_end)
4886 {
4887 strcpy (new_value, orig_value);
4888 strcpy (new_value + orig_value_len, add);
4889 }
4890 else
4891 {
4892 strcpy (new_value, add);
4893 strcpy (new_value + add_len, orig_value);
4894 }
4895 }
4896 else
4897 {
4898 new_value = xstrdup (add);
4899 }
4900 return new_value;
4901 }
4902
4903 void
4904 lt_update_exe_path (const char *name, const char *value)
4905 {
4906 lt_debugprintf (__FILE__, __LINE__,
4907 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4908 nonnull (name), nonnull (value));
4909
4910 if (name && *name && value && *value)
4911 {
4912 char *new_value = lt_extend_str (getenv (name), value, 0);
4913 /* some systems can't cope with a ':'-terminated path #' */
4914 int len = strlen (new_value);
4915 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
4916 {
4917 new_value[len-1] = '\0';
4918 }
4919 lt_setenv (name, new_value);
4920 XFREE (new_value);
4921 }
4922 }
4923
4924 void
4925 lt_update_lib_path (const char *name, const char *value)
4926 {
4927 lt_debugprintf (__FILE__, __LINE__,
4928 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4929 nonnull (name), nonnull (value));
4930
4931 if (name && *name && value && *value)
4932 {
4933 char *new_value = lt_extend_str (getenv (name), value, 0);
4934 lt_setenv (name, new_value);
4935 XFREE (new_value);
4936 }
4937 }
4938
4939 EOF
4940 case $host_os in
4941 mingw*)
4942 cat <<"EOF"
4943
4944 /* Prepares an argument vector before calling spawn().
4945 Note that spawn() does not by itself call the command interpreter
4946 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4947 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4948 GetVersionEx(&v);
4949 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4950 }) ? "cmd.exe" : "command.com").
4951 Instead it simply concatenates the arguments, separated by ' ', and calls
4952 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4953 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4954 special way:
4955 - Space and tab are interpreted as delimiters. They are not treated as
4956 delimiters if they are surrounded by double quotes: "...".
4957 - Unescaped double quotes are removed from the input. Their only effect is
4958 that within double quotes, space and tab are treated like normal
4959 characters.
4960 - Backslashes not followed by double quotes are not special.
4961 - But 2*n+1 backslashes followed by a double quote become
4962 n backslashes followed by a double quote (n >= 0):
4963 \" -> "
4964 \\\" -> \"
4965 \\\\\" -> \\"
4966 */
4967 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4968 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4969 char **
4970 prepare_spawn (char **argv)
4971 {
4972 size_t argc;
4973 char **new_argv;
4974 size_t i;
4975
4976 /* Count number of arguments. */
4977 for (argc = 0; argv[argc] != NULL; argc++)
4978 ;
4979
4980 /* Allocate new argument vector. */
4981 new_argv = XMALLOC (char *, argc + 1);
4982
4983 /* Put quoted arguments into the new argument vector. */
4984 for (i = 0; i < argc; i++)
4985 {
4986 const char *string = argv[i];
4987
4988 if (string[0] == '\0')
4989 new_argv[i] = xstrdup ("\"\"");
4990 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
4991 {
4992 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
4993 size_t length;
4994 unsigned int backslashes;
4995 const char *s;
4996 char *quoted_string;
4997 char *p;
4998
4999 length = 0;
5000 backslashes = 0;
5001 if (quote_around)
5002 length++;
5003 for (s = string; *s != '\0'; s++)
5004 {
5005 char c = *s;
5006 if (c == '"')
5007 length += backslashes + 1;
5008 length++;
5009 if (c == '\\')
5010 backslashes++;
5011 else
5012 backslashes = 0;
5013 }
5014 if (quote_around)
5015 length += backslashes + 1;
5016
5017 quoted_string = XMALLOC (char, length + 1);
5018
5019 p = quoted_string;
5020 backslashes = 0;
5021 if (quote_around)
5022 *p++ = '"';
5023 for (s = string; *s != '\0'; s++)
5024 {
5025 char c = *s;
5026 if (c == '"')
5027 {
5028 unsigned int j;
5029 for (j = backslashes + 1; j > 0; j--)
5030 *p++ = '\\';
5031 }
5032 *p++ = c;
5033 if (c == '\\')
5034 backslashes++;
5035 else
5036 backslashes = 0;
5037 }
5038 if (quote_around)
5039 {
5040 unsigned int j;
5041 for (j = backslashes; j > 0; j--)
5042 *p++ = '\\';
5043 *p++ = '"';
5044 }
5045 *p = '\0';
5046
5047 new_argv[i] = quoted_string;
5048 }
5049 else
5050 new_argv[i] = (char *) string;
5051 }
5052 new_argv[argc] = NULL;
5053
5054 return new_argv;
5055 }
5056 EOF
5057 ;;
5058 esac
5059
5060 cat <<"EOF"
5061 void lt_dump_script (FILE* f)
5062 {
5063 EOF
5064 func_emit_wrapper yes |
5065 $SED -n -e '
5066 s/^\(.\{79\}\)\(..*\)/\1\
5067 \2/
5068 h
5069 s/\([\\"]\)/\\\1/g
5070 s/$/\\n/
5071 s/\([^\n]*\).*/ fputs ("\1", f);/p
5072 g
5073 D'
5074 cat <<"EOF"
5075 }
5076 EOF
5077 }
5078 # end: func_emit_cwrapperexe_src
5079
5080 # func_win32_import_lib_p ARG
5081 # True if ARG is an import lib, as indicated by $file_magic_cmd
5082 func_win32_import_lib_p ()
5083 {
5084 $opt_debug
5085 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
5086 *import*) : ;;
5087 *) false ;;
5088 esac
5089 }
5090
5091 # func_mode_link arg...
5092 func_mode_link ()
5093 {
5094 $opt_debug
5095 case $host in
5096 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
5097 # It is impossible to link a dll without this setting, and
5098 # we shouldn't force the makefile maintainer to figure out
5099 # which system we are compiling for in order to pass an extra
5100 # flag for every libtool invocation.
5101 # allow_undefined=no
5102
5103 # FIXME: Unfortunately, there are problems with the above when trying
5104 # to make a dll which has undefined symbols, in which case not
5105 # even a static library is built. For now, we need to specify
5106 # -no-undefined on the libtool link line when we can be certain
5107 # that all symbols are satisfied, otherwise we get a static library.
5108 allow_undefined=yes
5109 ;;
5110 *)
5111 allow_undefined=yes
5112 ;;
5113 esac
5114 libtool_args=$nonopt
5115 base_compile="$nonopt $@"
5116 compile_command=$nonopt
5117 finalize_command=$nonopt
5118
5119 compile_rpath=
5120 finalize_rpath=
5121 compile_shlibpath=
5122 finalize_shlibpath=
5123 convenience=
5124 old_convenience=
5125 deplibs=
5126 old_deplibs=
5127 compiler_flags=
5128 linker_flags=
5129 dllsearchpath=
5130 lib_search_path=`pwd`
5131 inst_prefix_dir=
5132 new_inherited_linker_flags=
5133
5134 avoid_version=no
5135 bindir=
5136 dlfiles=
5137 dlprefiles=
5138 dlself=no
5139 export_dynamic=no
5140 export_symbols=
5141 export_symbols_regex=
5142 generated=
5143 libobjs=
5144 ltlibs=
5145 module=no
5146 no_install=no
5147 objs=
5148 non_pic_objects=
5149 precious_files_regex=
5150 prefer_static_libs=no
5151 preload=no
5152 prev=
5153 prevarg=
5154 release=
5155 rpath=
5156 xrpath=
5157 perm_rpath=
5158 temp_rpath=
5159 thread_safe=no
5160 vinfo=
5161 vinfo_number=no
5162 weak_libs=
5163 single_module="${wl}-single_module"
5164 func_infer_tag $base_compile
5165
5166 # We need to know -static, to get the right output filenames.
5167 for arg
5168 do
5169 case $arg in
5170 -shared)
5171 test "$build_libtool_libs" != yes && \
5172 func_fatal_configuration "can not build a shared library"
5173 build_old_libs=no
5174 break
5175 ;;
5176 -all-static | -static | -static-libtool-libs)
5177 case $arg in
5178 -all-static)
5179 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
5180 func_warning "complete static linking is impossible in this configuration"
5181 fi
5182 if test -n "$link_static_flag"; then
5183 dlopen_self=$dlopen_self_static
5184 fi
5185 prefer_static_libs=yes
5186 ;;
5187 -static)
5188 if test -z "$pic_flag" && test -n "$link_static_flag"; then
5189 dlopen_self=$dlopen_self_static
5190 fi
5191 prefer_static_libs=built
5192 ;;
5193 -static-libtool-libs)
5194 if test -z "$pic_flag" && test -n "$link_static_flag"; then
5195 dlopen_self=$dlopen_self_static
5196 fi
5197 prefer_static_libs=yes
5198 ;;
5199 esac
5200 build_libtool_libs=no
5201 build_old_libs=yes
5202 break
5203 ;;
5204 esac
5205 done
5206
5207 # See if our shared archives depend on static archives.
5208 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
5209
5210 # Go through the arguments, transforming them on the way.
5211 while test "$#" -gt 0; do
5212 arg="$1"
5213 shift
5214 func_quote_for_eval "$arg"
5215 qarg=$func_quote_for_eval_unquoted_result
5216 func_append libtool_args " $func_quote_for_eval_result"
5217
5218 # If the previous option needs an argument, assign it.
5219 if test -n "$prev"; then
5220 case $prev in
5221 output)
5222 func_append compile_command " @OUTPUT@"
5223 func_append finalize_command " @OUTPUT@"
5224 ;;
5225 esac
5226
5227 case $prev in
5228 bindir)
5229 bindir="$arg"
5230 prev=
5231 continue
5232 ;;
5233 dlfiles|dlprefiles)
5234 if test "$preload" = no; then
5235 # Add the symbol object into the linking commands.
5236 func_append compile_command " @SYMFILE@"
5237 func_append finalize_command " @SYMFILE@"
5238 preload=yes
5239 fi
5240 case $arg in
5241 *.la | *.lo) ;; # We handle these cases below.
5242 force)
5243 if test "$dlself" = no; then
5244 dlself=needless
5245 export_dynamic=yes
5246 fi
5247 prev=
5248 continue
5249 ;;
5250 self)
5251 if test "$prev" = dlprefiles; then
5252 dlself=yes
5253 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
5254 dlself=yes
5255 else
5256 dlself=needless
5257 export_dynamic=yes
5258 fi
5259 prev=
5260 continue
5261 ;;
5262 *)
5263 if test "$prev" = dlfiles; then
5264 func_append dlfiles " $arg"
5265 else
5266 func_append dlprefiles " $arg"
5267 fi
5268 prev=
5269 continue
5270 ;;
5271 esac
5272 ;;
5273 expsyms)
5274 export_symbols="$arg"
5275 test -f "$arg" \
5276 || func_fatal_error "symbol file \`$arg' does not exist"
5277 prev=
5278 continue
5279 ;;
5280 expsyms_regex)
5281 export_symbols_regex="$arg"
5282 prev=
5283 continue
5284 ;;
5285 framework)
5286 case $host in
5287 *-*-darwin*)
5288 case "$deplibs " in
5289 *" $qarg.ltframework "*) ;;
5290 *) func_append deplibs " $qarg.ltframework" # this is fixed later
5291 ;;
5292 esac
5293 ;;
5294 esac
5295 prev=
5296 continue
5297 ;;
5298 inst_prefix)
5299 inst_prefix_dir="$arg"
5300 prev=
5301 continue
5302 ;;
5303 objectlist)
5304 if test -f "$arg"; then
5305 save_arg=$arg
5306 moreargs=
5307 for fil in `cat "$save_arg"`
5308 do
5309 # func_append moreargs " $fil"
5310 arg=$fil
5311 # A libtool-controlled object.
5312
5313 # Check to see that this really is a libtool object.
5314 if func_lalib_unsafe_p "$arg"; then
5315 pic_object=
5316 non_pic_object=
5317
5318 # Read the .lo file
5319 func_source "$arg"
5320
5321 if test -z "$pic_object" ||
5322 test -z "$non_pic_object" ||
5323 test "$pic_object" = none &&
5324 test "$non_pic_object" = none; then
5325 func_fatal_error "cannot find name of object for \`$arg'"
5326 fi
5327
5328 # Extract subdirectory from the argument.
5329 func_dirname "$arg" "/" ""
5330 xdir="$func_dirname_result"
5331
5332 if test "$pic_object" != none; then
5333 # Prepend the subdirectory the object is found in.
5334 pic_object="$xdir$pic_object"
5335
5336 if test "$prev" = dlfiles; then
5337 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5338 func_append dlfiles " $pic_object"
5339 prev=
5340 continue
5341 else
5342 # If libtool objects are unsupported, then we need to preload.
5343 prev=dlprefiles
5344 fi
5345 fi
5346
5347 # CHECK ME: I think I busted this. -Ossama
5348 if test "$prev" = dlprefiles; then
5349 # Preload the old-style object.
5350 func_append dlprefiles " $pic_object"
5351 prev=
5352 fi
5353
5354 # A PIC object.
5355 func_append libobjs " $pic_object"
5356 arg="$pic_object"
5357 fi
5358
5359 # Non-PIC object.
5360 if test "$non_pic_object" != none; then
5361 # Prepend the subdirectory the object is found in.
5362 non_pic_object="$xdir$non_pic_object"
5363
5364 # A standard non-PIC object
5365 func_append non_pic_objects " $non_pic_object"
5366 if test -z "$pic_object" || test "$pic_object" = none ; then
5367 arg="$non_pic_object"
5368 fi
5369 else
5370 # If the PIC object exists, use it instead.
5371 # $xdir was prepended to $pic_object above.
5372 non_pic_object="$pic_object"
5373 func_append non_pic_objects " $non_pic_object"
5374 fi
5375 else
5376 # Only an error if not doing a dry-run.
5377 if $opt_dry_run; then
5378 # Extract subdirectory from the argument.
5379 func_dirname "$arg" "/" ""
5380 xdir="$func_dirname_result"
5381
5382 func_lo2o "$arg"
5383 pic_object=$xdir$objdir/$func_lo2o_result
5384 non_pic_object=$xdir$func_lo2o_result
5385 func_append libobjs " $pic_object"
5386 func_append non_pic_objects " $non_pic_object"
5387 else
5388 func_fatal_error "\`$arg' is not a valid libtool object"
5389 fi
5390 fi
5391 done
5392 else
5393 func_fatal_error "link input file \`$arg' does not exist"
5394 fi
5395 arg=$save_arg
5396 prev=
5397 continue
5398 ;;
5399 precious_regex)
5400 precious_files_regex="$arg"
5401 prev=
5402 continue
5403 ;;
5404 release)
5405 release="-$arg"
5406 prev=
5407 continue
5408 ;;
5409 rpath | xrpath)
5410 # We need an absolute path.
5411 case $arg in
5412 [\\/]* | [A-Za-z]:[\\/]*) ;;
5413 *)
5414 func_fatal_error "only absolute run-paths are allowed"
5415 ;;
5416 esac
5417 if test "$prev" = rpath; then
5418 case "$rpath " in
5419 *" $arg "*) ;;
5420 *) func_append rpath " $arg" ;;
5421 esac
5422 else
5423 case "$xrpath " in
5424 *" $arg "*) ;;
5425 *) func_append xrpath " $arg" ;;
5426 esac
5427 fi
5428 prev=
5429 continue
5430 ;;
5431 shrext)
5432 shrext_cmds="$arg"
5433 prev=
5434 continue
5435 ;;
5436 weak)
5437 func_append weak_libs " $arg"
5438 prev=
5439 continue
5440 ;;
5441 xcclinker)
5442 func_append linker_flags " $qarg"
5443 func_append compiler_flags " $qarg"
5444 prev=
5445 func_append compile_command " $qarg"
5446 func_append finalize_command " $qarg"
5447 continue
5448 ;;
5449 xcompiler)
5450 func_append compiler_flags " $qarg"
5451 prev=
5452 func_append compile_command " $qarg"
5453 func_append finalize_command " $qarg"
5454 continue
5455 ;;
5456 xlinker)
5457 func_append linker_flags " $qarg"
5458 func_append compiler_flags " $wl$qarg"
5459 prev=
5460 func_append compile_command " $wl$qarg"
5461 func_append finalize_command " $wl$qarg"
5462 continue
5463 ;;
5464 *)
5465 eval "$prev=\"\$arg\""
5466 prev=
5467 continue
5468 ;;
5469 esac
5470 fi # test -n "$prev"
5471
5472 prevarg="$arg"
5473
5474 case $arg in
5475 -all-static)
5476 if test -n "$link_static_flag"; then
5477 # See comment for -static flag below, for more details.
5478 func_append compile_command " $link_static_flag"
5479 func_append finalize_command " $link_static_flag"
5480 fi
5481 continue
5482 ;;
5483
5484 -allow-undefined)
5485 # FIXME: remove this flag sometime in the future.
5486 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
5487 ;;
5488
5489 -avoid-version)
5490 avoid_version=yes
5491 continue
5492 ;;
5493
5494 -bindir)
5495 prev=bindir
5496 continue
5497 ;;
5498
5499 -dlopen)
5500 prev=dlfiles
5501 continue
5502 ;;
5503
5504 -dlpreopen)
5505 prev=dlprefiles
5506 continue
5507 ;;
5508
5509 -export-dynamic)
5510 export_dynamic=yes
5511 continue
5512 ;;
5513
5514 -export-symbols | -export-symbols-regex)
5515 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
5516 func_fatal_error "more than one -exported-symbols argument is not allowed"
5517 fi
5518 if test "X$arg" = "X-export-symbols"; then
5519 prev=expsyms
5520 else
5521 prev=expsyms_regex
5522 fi
5523 continue
5524 ;;
5525
5526 -framework)
5527 prev=framework
5528 continue
5529 ;;
5530
5531 -inst-prefix-dir)
5532 prev=inst_prefix
5533 continue
5534 ;;
5535
5536 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
5537 # so, if we see these flags be careful not to treat them like -L
5538 -L[A-Z][A-Z]*:*)
5539 case $with_gcc/$host in
5540 no/*-*-irix* | /*-*-irix*)
5541 func_append compile_command " $arg"
5542 func_append finalize_command " $arg"
5543 ;;
5544 esac
5545 continue
5546 ;;
5547
5548 -L*)
5549 func_stripname "-L" '' "$arg"
5550 if test -z "$func_stripname_result"; then
5551 if test "$#" -gt 0; then
5552 func_fatal_error "require no space between \`-L' and \`$1'"
5553 else
5554 func_fatal_error "need path for \`-L' option"
5555 fi
5556 fi
5557 func_resolve_sysroot "$func_stripname_result"
5558 dir=$func_resolve_sysroot_result
5559 # We need an absolute path.
5560 case $dir in
5561 [\\/]* | [A-Za-z]:[\\/]*) ;;
5562 *)
5563 absdir=`cd "$dir" && pwd`
5564 test -z "$absdir" && \
5565 func_fatal_error "cannot determine absolute directory name of \`$dir'"
5566 dir="$absdir"
5567 ;;
5568 esac
5569 case "$deplibs " in
5570 *" -L$dir "* | *" $arg "*)
5571 # Will only happen for absolute or sysroot arguments
5572 ;;
5573 *)
5574 # Preserve sysroot, but never include relative directories
5575 case $dir in
5576 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
5577 *) func_append deplibs " -L$dir" ;;
5578 esac
5579 func_append lib_search_path " $dir"
5580 ;;
5581 esac
5582 case $host in
5583 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
5584 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
5585 case :$dllsearchpath: in
5586 *":$dir:"*) ;;
5587 ::) dllsearchpath=$dir;;
5588 *) func_append dllsearchpath ":$dir";;
5589 esac
5590 case :$dllsearchpath: in
5591 *":$testbindir:"*) ;;
5592 ::) dllsearchpath=$testbindir;;
5593 *) func_append dllsearchpath ":$testbindir";;
5594 esac
5595 ;;
5596 esac
5597 continue
5598 ;;
5599
5600 -l*)
5601 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
5602 case $host in
5603 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
5604 # These systems don't actually have a C or math library (as such)
5605 continue
5606 ;;
5607 *-*-os2*)
5608 # These systems don't actually have a C library (as such)
5609 test "X$arg" = "X-lc" && continue
5610 ;;
5611 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5612 # Do not include libc due to us having libc/libc_r.
5613 test "X$arg" = "X-lc" && continue
5614 ;;
5615 *-*-rhapsody* | *-*-darwin1.[012])
5616 # Rhapsody C and math libraries are in the System framework
5617 func_append deplibs " System.ltframework"
5618 continue
5619 ;;
5620 *-*-sco3.2v5* | *-*-sco5v6*)
5621 # Causes problems with __ctype
5622 test "X$arg" = "X-lc" && continue
5623 ;;
5624 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
5625 # Compiler inserts libc in the correct place for threads to work
5626 test "X$arg" = "X-lc" && continue
5627 ;;
5628 esac
5629 elif test "X$arg" = "X-lc_r"; then
5630 case $host in
5631 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5632 # Do not include libc_r directly, use -pthread flag.
5633 continue
5634 ;;
5635 esac
5636 fi
5637 func_append deplibs " $arg"
5638 continue
5639 ;;
5640
5641 -module)
5642 module=yes
5643 continue
5644 ;;
5645
5646 # Tru64 UNIX uses -model [arg] to determine the layout of C++
5647 # classes, name mangling, and exception handling.
5648 # Darwin uses the -arch flag to determine output architecture.
5649 -model|-arch|-isysroot|--sysroot)
5650 func_append compiler_flags " $arg"
5651 func_append compile_command " $arg"
5652 func_append finalize_command " $arg"
5653 prev=xcompiler
5654 continue
5655 ;;
5656
5657 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
5658 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5659 func_append compiler_flags " $arg"
5660 func_append compile_command " $arg"
5661 func_append finalize_command " $arg"
5662 case "$new_inherited_linker_flags " in
5663 *" $arg "*) ;;
5664 * ) func_append new_inherited_linker_flags " $arg" ;;
5665 esac
5666 continue
5667 ;;
5668
5669 -multi_module)
5670 single_module="${wl}-multi_module"
5671 continue
5672 ;;
5673
5674 -no-fast-install)
5675 fast_install=no
5676 continue
5677 ;;
5678
5679 -no-install)
5680 case $host in
5681 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
5682 # The PATH hackery in wrapper scripts is required on Windows
5683 # and Darwin in order for the loader to find any dlls it needs.
5684 func_warning "\`-no-install' is ignored for $host"
5685 func_warning "assuming \`-no-fast-install' instead"
5686 fast_install=no
5687 ;;
5688 *) no_install=yes ;;
5689 esac
5690 continue
5691 ;;
5692
5693 -no-undefined)
5694 allow_undefined=no
5695 continue
5696 ;;
5697
5698 -objectlist)
5699 prev=objectlist
5700 continue
5701 ;;
5702
5703 -o) prev=output ;;
5704
5705 -precious-files-regex)
5706 prev=precious_regex
5707 continue
5708 ;;
5709
5710 -release)
5711 prev=release
5712 continue
5713 ;;
5714
5715 -rpath)
5716 prev=rpath
5717 continue
5718 ;;
5719
5720 -R)
5721 prev=xrpath
5722 continue
5723 ;;
5724
5725 -R*)
5726 func_stripname '-R' '' "$arg"
5727 dir=$func_stripname_result
5728 # We need an absolute path.
5729 case $dir in
5730 [\\/]* | [A-Za-z]:[\\/]*) ;;
5731 =*)
5732 func_stripname '=' '' "$dir"
5733 dir=$lt_sysroot$func_stripname_result
5734 ;;
5735 *)
5736 func_fatal_error "only absolute run-paths are allowed"
5737 ;;
5738 esac
5739 case "$xrpath " in
5740 *" $dir "*) ;;
5741 *) func_append xrpath " $dir" ;;
5742 esac
5743 continue
5744 ;;
5745
5746 -shared)
5747 # The effects of -shared are defined in a previous loop.
5748 continue
5749 ;;
5750
5751 -shrext)
5752 prev=shrext
5753 continue
5754 ;;
5755
5756 -static | -static-libtool-libs)
5757 # The effects of -static are defined in a previous loop.
5758 # We used to do the same as -all-static on platforms that
5759 # didn't have a PIC flag, but the assumption that the effects
5760 # would be equivalent was wrong. It would break on at least
5761 # Digital Unix and AIX.
5762 continue
5763 ;;
5764
5765 -thread-safe)
5766 thread_safe=yes
5767 continue
5768 ;;
5769
5770 -version-info)
5771 prev=vinfo
5772 continue
5773 ;;
5774
5775 -version-number)
5776 prev=vinfo
5777 vinfo_number=yes
5778 continue
5779 ;;
5780
5781 -weak)
5782 prev=weak
5783 continue
5784 ;;
5785
5786 -Wc,*)
5787 func_stripname '-Wc,' '' "$arg"
5788 args=$func_stripname_result
5789 arg=
5790 save_ifs="$IFS"; IFS=','
5791 for flag in $args; do
5792 IFS="$save_ifs"
5793 func_quote_for_eval "$flag"
5794 func_append arg " $func_quote_for_eval_result"
5795 func_append compiler_flags " $func_quote_for_eval_result"
5796 done
5797 IFS="$save_ifs"
5798 func_stripname ' ' '' "$arg"
5799 arg=$func_stripname_result
5800 ;;
5801
5802 -Wl,*)
5803 func_stripname '-Wl,' '' "$arg"
5804 args=$func_stripname_result
5805 arg=
5806 save_ifs="$IFS"; IFS=','
5807 for flag in $args; do
5808 IFS="$save_ifs"
5809 func_quote_for_eval "$flag"
5810 func_append arg " $wl$func_quote_for_eval_result"
5811 func_append compiler_flags " $wl$func_quote_for_eval_result"
5812 func_append linker_flags " $func_quote_for_eval_result"
5813 done
5814 IFS="$save_ifs"
5815 func_stripname ' ' '' "$arg"
5816 arg=$func_stripname_result
5817 ;;
5818
5819 -Xcompiler)
5820 prev=xcompiler
5821 continue
5822 ;;
5823
5824 -Xlinker)
5825 prev=xlinker
5826 continue
5827 ;;
5828
5829 -XCClinker)
5830 prev=xcclinker
5831 continue
5832 ;;
5833
5834 # -msg_* for osf cc
5835 -msg_*)
5836 func_quote_for_eval "$arg"
5837 arg="$func_quote_for_eval_result"
5838 ;;
5839
5840 # Flags to be passed through unchanged, with rationale:
5841 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5842 # -r[0-9][0-9]* specify processor for the SGI compiler
5843 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5844 # +DA*, +DD* enable 64-bit mode for the HP compiler
5845 # -q* compiler args for the IBM compiler
5846 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5847 # -F/path path to uninstalled frameworks, gcc on darwin
5848 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5849 # @file GCC response files
5850 # -tp=* Portland pgcc target processor selection
5851 # --sysroot=* for sysroot support
5852 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
5853 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
5854 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5855 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
5856 func_quote_for_eval "$arg"
5857 arg="$func_quote_for_eval_result"
5858 func_append compile_command " $arg"
5859 func_append finalize_command " $arg"
5860 func_append compiler_flags " $arg"
5861 continue
5862 ;;
5863
5864 # Some other compiler flag.
5865 -* | +*)
5866 func_quote_for_eval "$arg"
5867 arg="$func_quote_for_eval_result"
5868 ;;
5869
5870 *.$objext)
5871 # A standard object.
5872 func_append objs " $arg"
5873 ;;
5874
5875 *.lo)
5876 # A libtool-controlled object.
5877
5878 # Check to see that this really is a libtool object.
5879 if func_lalib_unsafe_p "$arg"; then
5880 pic_object=
5881 non_pic_object=
5882
5883 # Read the .lo file
5884 func_source "$arg"
5885
5886 if test -z "$pic_object" ||
5887 test -z "$non_pic_object" ||
5888 test "$pic_object" = none &&
5889 test "$non_pic_object" = none; then
5890 func_fatal_error "cannot find name of object for \`$arg'"
5891 fi
5892
5893 # Extract subdirectory from the argument.
5894 func_dirname "$arg" "/" ""
5895 xdir="$func_dirname_result"
5896
5897 if test "$pic_object" != none; then
5898 # Prepend the subdirectory the object is found in.
5899 pic_object="$xdir$pic_object"
5900
5901 if test "$prev" = dlfiles; then
5902 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5903 func_append dlfiles " $pic_object"
5904 prev=
5905 continue
5906 else
5907 # If libtool objects are unsupported, then we need to preload.
5908 prev=dlprefiles
5909 fi
5910 fi
5911
5912 # CHECK ME: I think I busted this. -Ossama
5913 if test "$prev" = dlprefiles; then
5914 # Preload the old-style object.
5915 func_append dlprefiles " $pic_object"
5916 prev=
5917 fi
5918
5919 # A PIC object.
5920 func_append libobjs " $pic_object"
5921 arg="$pic_object"
5922 fi
5923
5924 # Non-PIC object.
5925 if test "$non_pic_object" != none; then
5926 # Prepend the subdirectory the object is found in.
5927 non_pic_object="$xdir$non_pic_object"
5928
5929 # A standard non-PIC object
5930 func_append non_pic_objects " $non_pic_object"
5931 if test -z "$pic_object" || test "$pic_object" = none ; then
5932 arg="$non_pic_object"
5933 fi
5934 else
5935 # If the PIC object exists, use it instead.
5936 # $xdir was prepended to $pic_object above.
5937 non_pic_object="$pic_object"
5938 func_append non_pic_objects " $non_pic_object"
5939 fi
5940 else
5941 # Only an error if not doing a dry-run.
5942 if $opt_dry_run; then
5943 # Extract subdirectory from the argument.
5944 func_dirname "$arg" "/" ""
5945 xdir="$func_dirname_result"
5946
5947 func_lo2o "$arg"
5948 pic_object=$xdir$objdir/$func_lo2o_result
5949 non_pic_object=$xdir$func_lo2o_result
5950 func_append libobjs " $pic_object"
5951 func_append non_pic_objects " $non_pic_object"
5952 else
5953 func_fatal_error "\`$arg' is not a valid libtool object"
5954 fi
5955 fi
5956 ;;
5957
5958 *.$libext)
5959 # An archive.
5960 func_append deplibs " $arg"
5961 func_append old_deplibs " $arg"
5962 continue
5963 ;;
5964
5965 *.la)
5966 # A libtool-controlled library.
5967
5968 func_resolve_sysroot "$arg"
5969 if test "$prev" = dlfiles; then
5970 # This library was specified with -dlopen.
5971 func_append dlfiles " $func_resolve_sysroot_result"
5972 prev=
5973 elif test "$prev" = dlprefiles; then
5974 # The library was specified with -dlpreopen.
5975 func_append dlprefiles " $func_resolve_sysroot_result"
5976 prev=
5977 else
5978 func_append deplibs " $func_resolve_sysroot_result"
5979 fi
5980 continue
5981 ;;
5982
5983 # Some other compiler argument.
5984 *)
5985 # Unknown arguments in both finalize_command and compile_command need
5986 # to be aesthetically quoted because they are evaled later.
5987 func_quote_for_eval "$arg"
5988 arg="$func_quote_for_eval_result"
5989 ;;
5990 esac # arg
5991
5992 # Now actually substitute the argument into the commands.
5993 if test -n "$arg"; then
5994 func_append compile_command " $arg"
5995 func_append finalize_command " $arg"
5996 fi
5997 done # argument parsing loop
5998
5999 test -n "$prev" && \
6000 func_fatal_help "the \`$prevarg' option requires an argument"
6001
6002 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
6003 eval arg=\"$export_dynamic_flag_spec\"
6004 func_append compile_command " $arg"
6005 func_append finalize_command " $arg"
6006 fi
6007
6008 oldlibs=
6009 # calculate the name of the file, without its directory
6010 func_basename "$output"
6011 outputname="$func_basename_result"
6012 libobjs_save="$libobjs"
6013
6014 if test -n "$shlibpath_var"; then
6015 # get the directories listed in $shlibpath_var
6016 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
6017 else
6018 shlib_search_path=
6019 fi
6020 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
6021 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
6022
6023 func_dirname "$output" "/" ""
6024 output_objdir="$func_dirname_result$objdir"
6025 func_to_tool_file "$output_objdir/"
6026 tool_output_objdir=$func_to_tool_file_result
6027 # Create the object directory.
6028 func_mkdir_p "$output_objdir"
6029
6030 # Determine the type of output
6031 case $output in
6032 "")
6033 func_fatal_help "you must specify an output file"
6034 ;;
6035 *.$libext) linkmode=oldlib ;;
6036 *.lo | *.$objext) linkmode=obj ;;
6037 *.la) linkmode=lib ;;
6038 *) linkmode=prog ;; # Anything else should be a program.
6039 esac
6040
6041 specialdeplibs=
6042
6043 libs=
6044 # Find all interdependent deplibs by searching for libraries
6045 # that are linked more than once (e.g. -la -lb -la)
6046 for deplib in $deplibs; do
6047 if $opt_preserve_dup_deps ; then
6048 case "$libs " in
6049 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6050 esac
6051 fi
6052 func_append libs " $deplib"
6053 done
6054
6055 if test "$linkmode" = lib; then
6056 libs="$predeps $libs $compiler_lib_search_path $postdeps"
6057
6058 # Compute libraries that are listed more than once in $predeps
6059 # $postdeps and mark them as special (i.e., whose duplicates are
6060 # not to be eliminated).
6061 pre_post_deps=
6062 if $opt_duplicate_compiler_generated_deps; then
6063 for pre_post_dep in $predeps $postdeps; do
6064 case "$pre_post_deps " in
6065 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
6066 esac
6067 func_append pre_post_deps " $pre_post_dep"
6068 done
6069 fi
6070 pre_post_deps=
6071 fi
6072
6073 deplibs=
6074 newdependency_libs=
6075 newlib_search_path=
6076 need_relink=no # whether we're linking any uninstalled libtool libraries
6077 notinst_deplibs= # not-installed libtool libraries
6078 notinst_path= # paths that contain not-installed libtool libraries
6079
6080 case $linkmode in
6081 lib)
6082 passes="conv dlpreopen link"
6083 for file in $dlfiles $dlprefiles; do
6084 case $file in
6085 *.la) ;;
6086 *)
6087 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
6088 ;;
6089 esac
6090 done
6091 ;;
6092 prog)
6093 compile_deplibs=
6094 finalize_deplibs=
6095 alldeplibs=no
6096 newdlfiles=
6097 newdlprefiles=
6098 passes="conv scan dlopen dlpreopen link"
6099 ;;
6100 *) passes="conv"
6101 ;;
6102 esac
6103
6104 for pass in $passes; do
6105 # The preopen pass in lib mode reverses $deplibs; put it back here
6106 # so that -L comes before libs that need it for instance...
6107 if test "$linkmode,$pass" = "lib,link"; then
6108 ## FIXME: Find the place where the list is rebuilt in the wrong
6109 ## order, and fix it there properly
6110 tmp_deplibs=
6111 for deplib in $deplibs; do
6112 tmp_deplibs="$deplib $tmp_deplibs"
6113 done
6114 deplibs="$tmp_deplibs"
6115 fi
6116
6117 if test "$linkmode,$pass" = "lib,link" ||
6118 test "$linkmode,$pass" = "prog,scan"; then
6119 libs="$deplibs"
6120 deplibs=
6121 fi
6122 if test "$linkmode" = prog; then
6123 case $pass in
6124 dlopen) libs="$dlfiles" ;;
6125 dlpreopen) libs="$dlprefiles" ;;
6126 link)
6127 libs="$deplibs %DEPLIBS%"
6128 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
6129 ;;
6130 esac
6131 fi
6132 if test "$linkmode,$pass" = "lib,dlpreopen"; then
6133 # Collect and forward deplibs of preopened libtool libs
6134 for lib in $dlprefiles; do
6135 # Ignore non-libtool-libs
6136 dependency_libs=
6137 func_resolve_sysroot "$lib"
6138 case $lib in
6139 *.la) func_source "$func_resolve_sysroot_result" ;;
6140 esac
6141
6142 # Collect preopened libtool deplibs, except any this library
6143 # has declared as weak libs
6144 for deplib in $dependency_libs; do
6145 func_basename "$deplib"
6146 deplib_base=$func_basename_result
6147 case " $weak_libs " in
6148 *" $deplib_base "*) ;;
6149 *) func_append deplibs " $deplib" ;;
6150 esac
6151 done
6152 done
6153 libs="$dlprefiles"
6154 fi
6155 if test "$pass" = dlopen; then
6156 # Collect dlpreopened libraries
6157 save_deplibs="$deplibs"
6158 deplibs=
6159 fi
6160
6161 for deplib in $libs; do
6162 lib=
6163 found=no
6164 case $deplib in
6165 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
6166 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
6167 if test "$linkmode,$pass" = "prog,link"; then
6168 compile_deplibs="$deplib $compile_deplibs"
6169 finalize_deplibs="$deplib $finalize_deplibs"
6170 else
6171 func_append compiler_flags " $deplib"
6172 if test "$linkmode" = lib ; then
6173 case "$new_inherited_linker_flags " in
6174 *" $deplib "*) ;;
6175 * ) func_append new_inherited_linker_flags " $deplib" ;;
6176 esac
6177 fi
6178 fi
6179 continue
6180 ;;
6181 -l*)
6182 if test "$linkmode" != lib && test "$linkmode" != prog; then
6183 func_warning "\`-l' is ignored for archives/objects"
6184 continue
6185 fi
6186 func_stripname '-l' '' "$deplib"
6187 name=$func_stripname_result
6188 if test "$linkmode" = lib; then
6189 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
6190 else
6191 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
6192 fi
6193 for searchdir in $searchdirs; do
6194 for search_ext in .la $std_shrext .so .a; do
6195 # Search the libtool library
6196 lib="$searchdir/lib${name}${search_ext}"
6197 if test -f "$lib"; then
6198 if test "$search_ext" = ".la"; then
6199 found=yes
6200 else
6201 found=no
6202 fi
6203 break 2
6204 fi
6205 done
6206 done
6207 if test "$found" != yes; then
6208 # deplib doesn't seem to be a libtool library
6209 if test "$linkmode,$pass" = "prog,link"; then
6210 compile_deplibs="$deplib $compile_deplibs"
6211 finalize_deplibs="$deplib $finalize_deplibs"
6212 else
6213 deplibs="$deplib $deplibs"
6214 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6215 fi
6216 continue
6217 else # deplib is a libtool library
6218 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
6219 # We need to do some special things here, and not later.
6220 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6221 case " $predeps $postdeps " in
6222 *" $deplib "*)
6223 if func_lalib_p "$lib"; then
6224 library_names=
6225 old_library=
6226 func_source "$lib"
6227 for l in $old_library $library_names; do
6228 ll="$l"
6229 done
6230 if test "X$ll" = "X$old_library" ; then # only static version available
6231 found=no
6232 func_dirname "$lib" "" "."
6233 ladir="$func_dirname_result"
6234 lib=$ladir/$old_library
6235 if test "$linkmode,$pass" = "prog,link"; then
6236 compile_deplibs="$deplib $compile_deplibs"
6237 finalize_deplibs="$deplib $finalize_deplibs"
6238 else
6239 deplibs="$deplib $deplibs"
6240 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6241 fi
6242 continue
6243 fi
6244 fi
6245 ;;
6246 *) ;;
6247 esac
6248 fi
6249 fi
6250 ;; # -l
6251 *.ltframework)
6252 if test "$linkmode,$pass" = "prog,link"; then
6253 compile_deplibs="$deplib $compile_deplibs"
6254 finalize_deplibs="$deplib $finalize_deplibs"
6255 else
6256 deplibs="$deplib $deplibs"
6257 if test "$linkmode" = lib ; then
6258 case "$new_inherited_linker_flags " in
6259 *" $deplib "*) ;;
6260 * ) func_append new_inherited_linker_flags " $deplib" ;;
6261 esac
6262 fi
6263 fi
6264 continue
6265 ;;
6266 -L*)
6267 case $linkmode in
6268 lib)
6269 deplibs="$deplib $deplibs"
6270 test "$pass" = conv && continue
6271 newdependency_libs="$deplib $newdependency_libs"
6272 func_stripname '-L' '' "$deplib"
6273 func_resolve_sysroot "$func_stripname_result"
6274 func_append newlib_search_path " $func_resolve_sysroot_result"
6275 ;;
6276 prog)
6277 if test "$pass" = conv; then
6278 deplibs="$deplib $deplibs"
6279 continue
6280 fi
6281 if test "$pass" = scan; then
6282 deplibs="$deplib $deplibs"
6283 else
6284 compile_deplibs="$deplib $compile_deplibs"
6285 finalize_deplibs="$deplib $finalize_deplibs"
6286 fi
6287 func_stripname '-L' '' "$deplib"
6288 func_resolve_sysroot "$func_stripname_result"
6289 func_append newlib_search_path " $func_resolve_sysroot_result"
6290 ;;
6291 *)
6292 func_warning "\`-L' is ignored for archives/objects"
6293 ;;
6294 esac # linkmode
6295 continue
6296 ;; # -L
6297 -R*)
6298 if test "$pass" = link; then
6299 func_stripname '-R' '' "$deplib"
6300 func_resolve_sysroot "$func_stripname_result"
6301 dir=$func_resolve_sysroot_result
6302 # Make sure the xrpath contains only unique directories.
6303 case "$xrpath " in
6304 *" $dir "*) ;;
6305 *) func_append xrpath " $dir" ;;
6306 esac
6307 fi
6308 deplibs="$deplib $deplibs"
6309 continue
6310 ;;
6311 *.la)
6312 func_resolve_sysroot "$deplib"
6313 lib=$func_resolve_sysroot_result
6314 ;;
6315 *.$libext)
6316 if test "$pass" = conv; then
6317 deplibs="$deplib $deplibs"
6318 continue
6319 fi
6320 case $linkmode in
6321 lib)
6322 # Linking convenience modules into shared libraries is allowed,
6323 # but linking other static libraries is non-portable.
6324 case " $dlpreconveniencelibs " in
6325 *" $deplib "*) ;;
6326 *)
6327 valid_a_lib=no
6328 case $deplibs_check_method in
6329 match_pattern*)
6330 set dummy $deplibs_check_method; shift
6331 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6332 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
6333 | $EGREP "$match_pattern_regex" > /dev/null; then
6334 valid_a_lib=yes
6335 fi
6336 ;;
6337 pass_all)
6338 valid_a_lib=yes
6339 ;;
6340 esac
6341 if test "$valid_a_lib" != yes; then
6342 echo
6343 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
6344 echo "*** I have the capability to make that library automatically link in when"
6345 echo "*** you link to this library. But I can only do this if you have a"
6346 echo "*** shared version of the library, which you do not appear to have"
6347 echo "*** because the file extensions .$libext of this argument makes me believe"
6348 echo "*** that it is just a static archive that I should not use here."
6349 else
6350 echo
6351 $ECHO "*** Warning: Linking the shared library $output against the"
6352 $ECHO "*** static library $deplib is not portable!"
6353 deplibs="$deplib $deplibs"
6354 fi
6355 ;;
6356 esac
6357 continue
6358 ;;
6359 prog)
6360 if test "$pass" != link; then
6361 deplibs="$deplib $deplibs"
6362 else
6363 compile_deplibs="$deplib $compile_deplibs"
6364 finalize_deplibs="$deplib $finalize_deplibs"
6365 fi
6366 continue
6367 ;;
6368 esac # linkmode
6369 ;; # *.$libext
6370 *.lo | *.$objext)
6371 if test "$pass" = conv; then
6372 deplibs="$deplib $deplibs"
6373 elif test "$linkmode" = prog; then
6374 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
6375 # If there is no dlopen support or we're linking statically,
6376 # we need to preload.
6377 func_append newdlprefiles " $deplib"
6378 compile_deplibs="$deplib $compile_deplibs"
6379 finalize_deplibs="$deplib $finalize_deplibs"
6380 else
6381 func_append newdlfiles " $deplib"
6382 fi
6383 fi
6384 continue
6385 ;;
6386 %DEPLIBS%)
6387 alldeplibs=yes
6388 continue
6389 ;;
6390 esac # case $deplib
6391
6392 if test "$found" = yes || test -f "$lib"; then :
6393 else
6394 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
6395 fi
6396
6397 # Check to see that this really is a libtool archive.
6398 func_lalib_unsafe_p "$lib" \
6399 || func_fatal_error "\`$lib' is not a valid libtool archive"
6400
6401 func_dirname "$lib" "" "."
6402 ladir="$func_dirname_result"
6403
6404 dlname=
6405 dlopen=
6406 dlpreopen=
6407 libdir=
6408 library_names=
6409 old_library=
6410 inherited_linker_flags=
6411 # If the library was installed with an old release of libtool,
6412 # it will not redefine variables installed, or shouldnotlink
6413 installed=yes
6414 shouldnotlink=no
6415 avoidtemprpath=
6416
6417
6418 # Read the .la file
6419 func_source "$lib"
6420
6421 # Convert "-framework foo" to "foo.ltframework"
6422 if test -n "$inherited_linker_flags"; then
6423 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
6424 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
6425 case " $new_inherited_linker_flags " in
6426 *" $tmp_inherited_linker_flag "*) ;;
6427 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
6428 esac
6429 done
6430 fi
6431 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
6432 if test "$linkmode,$pass" = "lib,link" ||
6433 test "$linkmode,$pass" = "prog,scan" ||
6434 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
6435 test -n "$dlopen" && func_append dlfiles " $dlopen"
6436 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
6437 fi
6438
6439 if test "$pass" = conv; then
6440 # Only check for convenience libraries
6441 deplibs="$lib $deplibs"
6442 if test -z "$libdir"; then
6443 if test -z "$old_library"; then
6444 func_fatal_error "cannot find name of link library for \`$lib'"
6445 fi
6446 # It is a libtool convenience library, so add in its objects.
6447 func_append convenience " $ladir/$objdir/$old_library"
6448 func_append old_convenience " $ladir/$objdir/$old_library"
6449 tmp_libs=
6450 for deplib in $dependency_libs; do
6451 deplibs="$deplib $deplibs"
6452 if $opt_preserve_dup_deps ; then
6453 case "$tmp_libs " in
6454 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6455 esac
6456 fi
6457 func_append tmp_libs " $deplib"
6458 done
6459 elif test "$linkmode" != prog && test "$linkmode" != lib; then
6460 func_fatal_error "\`$lib' is not a convenience library"
6461 fi
6462 continue
6463 fi # $pass = conv
6464
6465
6466 # Get the name of the library we link against.
6467 linklib=
6468 if test -n "$old_library" &&
6469 { test "$prefer_static_libs" = yes ||
6470 test "$prefer_static_libs,$installed" = "built,no"; }; then
6471 linklib=$old_library
6472 else
6473 for l in $old_library $library_names; do
6474 linklib="$l"
6475 done
6476 fi
6477 if test -z "$linklib"; then
6478 func_fatal_error "cannot find name of link library for \`$lib'"
6479 fi
6480
6481 # This library was specified with -dlopen.
6482 if test "$pass" = dlopen; then
6483 if test -z "$libdir"; then
6484 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
6485 fi
6486 if test -z "$dlname" ||
6487 test "$dlopen_support" != yes ||
6488 test "$build_libtool_libs" = no; then
6489 # If there is no dlname, no dlopen support or we're linking
6490 # statically, we need to preload. We also need to preload any
6491 # dependent libraries so libltdl's deplib preloader doesn't
6492 # bomb out in the load deplibs phase.
6493 func_append dlprefiles " $lib $dependency_libs"
6494 else
6495 func_append newdlfiles " $lib"
6496 fi
6497 continue
6498 fi # $pass = dlopen
6499
6500 # We need an absolute path.
6501 case $ladir in
6502 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
6503 *)
6504 abs_ladir=`cd "$ladir" && pwd`
6505 if test -z "$abs_ladir"; then
6506 func_warning "cannot determine absolute directory name of \`$ladir'"
6507 func_warning "passing it literally to the linker, although it might fail"
6508 abs_ladir="$ladir"
6509 fi
6510 ;;
6511 esac
6512 func_basename "$lib"
6513 laname="$func_basename_result"
6514
6515 # Find the relevant object directory and library name.
6516 if test "X$installed" = Xyes; then
6517 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6518 func_warning "library \`$lib' was moved."
6519 dir="$ladir"
6520 absdir="$abs_ladir"
6521 libdir="$abs_ladir"
6522 else
6523 dir="$lt_sysroot$libdir"
6524 absdir="$lt_sysroot$libdir"
6525 fi
6526 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
6527 else
6528 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6529 dir="$ladir"
6530 absdir="$abs_ladir"
6531 # Remove this search path later
6532 func_append notinst_path " $abs_ladir"
6533 else
6534 dir="$ladir/$objdir"
6535 absdir="$abs_ladir/$objdir"
6536 # Remove this search path later
6537 func_append notinst_path " $abs_ladir"
6538 fi
6539 fi # $installed = yes
6540 func_stripname 'lib' '.la' "$laname"
6541 name=$func_stripname_result
6542
6543 # This library was specified with -dlpreopen.
6544 if test "$pass" = dlpreopen; then
6545 if test -z "$libdir" && test "$linkmode" = prog; then
6546 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
6547 fi
6548 case "$host" in
6549 # special handling for platforms with PE-DLLs.
6550 *cygwin* | *mingw* | *cegcc* )
6551 # Linker will automatically link against shared library if both
6552 # static and shared are present. Therefore, ensure we extract
6553 # symbols from the import library if a shared library is present
6554 # (otherwise, the dlopen module name will be incorrect). We do
6555 # this by putting the import library name into $newdlprefiles.
6556 # We recover the dlopen module name by 'saving' the la file
6557 # name in a special purpose variable, and (later) extracting the
6558 # dlname from the la file.
6559 if test -n "$dlname"; then
6560 func_tr_sh "$dir/$linklib"
6561 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
6562 func_append newdlprefiles " $dir/$linklib"
6563 else
6564 func_append newdlprefiles " $dir/$old_library"
6565 # Keep a list of preopened convenience libraries to check
6566 # that they are being used correctly in the link pass.
6567 test -z "$libdir" && \
6568 func_append dlpreconveniencelibs " $dir/$old_library"
6569 fi
6570 ;;
6571 * )
6572 # Prefer using a static library (so that no silly _DYNAMIC symbols
6573 # are required to link).
6574 if test -n "$old_library"; then
6575 func_append newdlprefiles " $dir/$old_library"
6576 # Keep a list of preopened convenience libraries to check
6577 # that they are being used correctly in the link pass.
6578 test -z "$libdir" && \
6579 func_append dlpreconveniencelibs " $dir/$old_library"
6580 # Otherwise, use the dlname, so that lt_dlopen finds it.
6581 elif test -n "$dlname"; then
6582 func_append newdlprefiles " $dir/$dlname"
6583 else
6584 func_append newdlprefiles " $dir/$linklib"
6585 fi
6586 ;;
6587 esac
6588 fi # $pass = dlpreopen
6589
6590 if test -z "$libdir"; then
6591 # Link the convenience library
6592 if test "$linkmode" = lib; then
6593 deplibs="$dir/$old_library $deplibs"
6594 elif test "$linkmode,$pass" = "prog,link"; then
6595 compile_deplibs="$dir/$old_library $compile_deplibs"
6596 finalize_deplibs="$dir/$old_library $finalize_deplibs"
6597 else
6598 deplibs="$lib $deplibs" # used for prog,scan pass
6599 fi
6600 continue
6601 fi
6602
6603
6604 if test "$linkmode" = prog && test "$pass" != link; then
6605 func_append newlib_search_path " $ladir"
6606 deplibs="$lib $deplibs"
6607
6608 linkalldeplibs=no
6609 if test "$link_all_deplibs" != no || test -z "$library_names" ||
6610 test "$build_libtool_libs" = no; then
6611 linkalldeplibs=yes
6612 fi
6613
6614 tmp_libs=
6615 for deplib in $dependency_libs; do
6616 case $deplib in
6617 -L*) func_stripname '-L' '' "$deplib"
6618 func_resolve_sysroot "$func_stripname_result"
6619 func_append newlib_search_path " $func_resolve_sysroot_result"
6620 ;;
6621 esac
6622 # Need to link against all dependency_libs?
6623 if test "$linkalldeplibs" = yes; then
6624 deplibs="$deplib $deplibs"
6625 else
6626 # Need to hardcode shared library paths
6627 # or/and link against static libraries
6628 newdependency_libs="$deplib $newdependency_libs"
6629 fi
6630 if $opt_preserve_dup_deps ; then
6631 case "$tmp_libs " in
6632 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6633 esac
6634 fi
6635 func_append tmp_libs " $deplib"
6636 done # for deplib
6637 continue
6638 fi # $linkmode = prog...
6639
6640 if test "$linkmode,$pass" = "prog,link"; then
6641 if test -n "$library_names" &&
6642 { { test "$prefer_static_libs" = no ||
6643 test "$prefer_static_libs,$installed" = "built,yes"; } ||
6644 test -z "$old_library"; }; then
6645 # We need to hardcode the library path
6646 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
6647 # Make sure the rpath contains only unique directories.
6648 case "$temp_rpath:" in
6649 *"$absdir:"*) ;;
6650 *) func_append temp_rpath "$absdir:" ;;
6651 esac
6652 fi
6653
6654 # Hardcode the library path.
6655 # Skip directories that are in the system default run-time
6656 # search path.
6657 case " $sys_lib_dlsearch_path " in
6658 *" $absdir "*) ;;
6659 *)
6660 case "$compile_rpath " in
6661 *" $absdir "*) ;;
6662 *) func_append compile_rpath " $absdir" ;;
6663 esac
6664 ;;
6665 esac
6666 case " $sys_lib_dlsearch_path " in
6667 *" $libdir "*) ;;
6668 *)
6669 case "$finalize_rpath " in
6670 *" $libdir "*) ;;
6671 *) func_append finalize_rpath " $libdir" ;;
6672 esac
6673 ;;
6674 esac
6675 fi # $linkmode,$pass = prog,link...
6676
6677 if test "$alldeplibs" = yes &&
6678 { test "$deplibs_check_method" = pass_all ||
6679 { test "$build_libtool_libs" = yes &&
6680 test -n "$library_names"; }; }; then
6681 # We only need to search for static libraries
6682 continue
6683 fi
6684 fi
6685
6686 link_static=no # Whether the deplib will be linked statically
6687 use_static_libs=$prefer_static_libs
6688 if test "$use_static_libs" = built && test "$installed" = yes; then
6689 use_static_libs=no
6690 fi
6691 if test -n "$library_names" &&
6692 { test "$use_static_libs" = no || test -z "$old_library"; }; then
6693 case $host in
6694 *cygwin* | *mingw* | *cegcc*)
6695 # No point in relinking DLLs because paths are not encoded
6696 func_append notinst_deplibs " $lib"
6697 need_relink=no
6698 ;;
6699 *)
6700 if test "$installed" = no; then
6701 func_append notinst_deplibs " $lib"
6702 need_relink=yes
6703 fi
6704 ;;
6705 esac
6706 # This is a shared library
6707
6708 # Warn about portability, can't link against -module's on some
6709 # systems (darwin). Don't bleat about dlopened modules though!
6710 dlopenmodule=""
6711 for dlpremoduletest in $dlprefiles; do
6712 if test "X$dlpremoduletest" = "X$lib"; then
6713 dlopenmodule="$dlpremoduletest"
6714 break
6715 fi
6716 done
6717 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
6718 echo
6719 if test "$linkmode" = prog; then
6720 $ECHO "*** Warning: Linking the executable $output against the loadable module"
6721 else
6722 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
6723 fi
6724 $ECHO "*** $linklib is not portable!"
6725 fi
6726 if test "$linkmode" = lib &&
6727 test "$hardcode_into_libs" = yes; then
6728 # Hardcode the library path.
6729 # Skip directories that are in the system default run-time
6730 # search path.
6731 case " $sys_lib_dlsearch_path " in
6732 *" $absdir "*) ;;
6733 *)
6734 case "$compile_rpath " in
6735 *" $absdir "*) ;;
6736 *) func_append compile_rpath " $absdir" ;;
6737 esac
6738 ;;
6739 esac
6740 case " $sys_lib_dlsearch_path " in
6741 *" $libdir "*) ;;
6742 *)
6743 case "$finalize_rpath " in
6744 *" $libdir "*) ;;
6745 *) func_append finalize_rpath " $libdir" ;;
6746 esac
6747 ;;
6748 esac
6749 fi
6750
6751 if test -n "$old_archive_from_expsyms_cmds"; then
6752 # figure out the soname
6753 set dummy $library_names
6754 shift
6755 realname="$1"
6756 shift
6757 libname=`eval "\\$ECHO \"$libname_spec\""`
6758 # use dlname if we got it. it's perfectly good, no?
6759 if test -n "$dlname"; then
6760 soname="$dlname"
6761 elif test -n "$soname_spec"; then
6762 # bleh windows
6763 case $host in
6764 *cygwin* | mingw* | *cegcc*)
6765 func_arith $current - $age
6766 major=$func_arith_result
6767 versuffix="-$major"
6768 ;;
6769 esac
6770 eval soname=\"$soname_spec\"
6771 else
6772 soname="$realname"
6773 fi
6774
6775 # Make a new name for the extract_expsyms_cmds to use
6776 soroot="$soname"
6777 func_basename "$soroot"
6778 soname="$func_basename_result"
6779 func_stripname 'lib' '.dll' "$soname"
6780 newlib=libimp-$func_stripname_result.a
6781
6782 # If the library has no export list, then create one now
6783 if test -f "$output_objdir/$soname-def"; then :
6784 else
6785 func_verbose "extracting exported symbol list from \`$soname'"
6786 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
6787 fi
6788
6789 # Create $newlib
6790 if test -f "$output_objdir/$newlib"; then :; else
6791 func_verbose "generating import library for \`$soname'"
6792 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
6793 fi
6794 # make sure the library variables are pointing to the new library
6795 dir=$output_objdir
6796 linklib=$newlib
6797 fi # test -n "$old_archive_from_expsyms_cmds"
6798
6799 if test "$linkmode" = prog || test "$opt_mode" != relink; then
6800 add_shlibpath=
6801 add_dir=
6802 add=
6803 lib_linked=yes
6804 case $hardcode_action in
6805 immediate | unsupported)
6806 if test "$hardcode_direct" = no; then
6807 add="$dir/$linklib"
6808 case $host in
6809 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
6810 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
6811 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
6812 *-*-unixware7*) add_dir="-L$dir" ;;
6813 *-*-darwin* )
6814 # if the lib is a (non-dlopened) module then we can not
6815 # link against it, someone is ignoring the earlier warnings
6816 if /usr/bin/file -L $add 2> /dev/null |
6817 $GREP ": [^:]* bundle" >/dev/null ; then
6818 if test "X$dlopenmodule" != "X$lib"; then
6819 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
6820 if test -z "$old_library" ; then
6821 echo
6822 echo "*** And there doesn't seem to be a static archive available"
6823 echo "*** The link will probably fail, sorry"
6824 else
6825 add="$dir/$old_library"
6826 fi
6827 elif test -n "$old_library"; then
6828 add="$dir/$old_library"
6829 fi
6830 fi
6831 esac
6832 elif test "$hardcode_minus_L" = no; then
6833 case $host in
6834 *-*-sunos*) add_shlibpath="$dir" ;;
6835 esac
6836 add_dir="-L$dir"
6837 add="-l$name"
6838 elif test "$hardcode_shlibpath_var" = no; then
6839 add_shlibpath="$dir"
6840 add="-l$name"
6841 else
6842 lib_linked=no
6843 fi
6844 ;;
6845 relink)
6846 if test "$hardcode_direct" = yes &&
6847 test "$hardcode_direct_absolute" = no; then
6848 add="$dir/$linklib"
6849 elif test "$hardcode_minus_L" = yes; then
6850 add_dir="-L$absdir"
6851 # Try looking first in the location we're being installed to.
6852 if test -n "$inst_prefix_dir"; then
6853 case $libdir in
6854 [\\/]*)
6855 func_append add_dir " -L$inst_prefix_dir$libdir"
6856 ;;
6857 esac
6858 fi
6859 add="-l$name"
6860 elif test "$hardcode_shlibpath_var" = yes; then
6861 add_shlibpath="$dir"
6862 add="-l$name"
6863 else
6864 lib_linked=no
6865 fi
6866 ;;
6867 *) lib_linked=no ;;
6868 esac
6869
6870 if test "$lib_linked" != yes; then
6871 func_fatal_configuration "unsupported hardcode properties"
6872 fi
6873
6874 if test -n "$add_shlibpath"; then
6875 case :$compile_shlibpath: in
6876 *":$add_shlibpath:"*) ;;
6877 *) func_append compile_shlibpath "$add_shlibpath:" ;;
6878 esac
6879 fi
6880 if test "$linkmode" = prog; then
6881 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
6882 test -n "$add" && compile_deplibs="$add $compile_deplibs"
6883 else
6884 test -n "$add_dir" && deplibs="$add_dir $deplibs"
6885 test -n "$add" && deplibs="$add $deplibs"
6886 if test "$hardcode_direct" != yes &&
6887 test "$hardcode_minus_L" != yes &&
6888 test "$hardcode_shlibpath_var" = yes; then
6889 case :$finalize_shlibpath: in
6890 *":$libdir:"*) ;;
6891 *) func_append finalize_shlibpath "$libdir:" ;;
6892 esac
6893 fi
6894 fi
6895 fi
6896
6897 if test "$linkmode" = prog || test "$opt_mode" = relink; then
6898 add_shlibpath=
6899 add_dir=
6900 add=
6901 # Finalize command for both is simple: just hardcode it.
6902 if test "$hardcode_direct" = yes &&
6903 test "$hardcode_direct_absolute" = no; then
6904 add="$libdir/$linklib"
6905 elif test "$hardcode_minus_L" = yes; then
6906 add_dir="-L$libdir"
6907 add="-l$name"
6908 elif test "$hardcode_shlibpath_var" = yes; then
6909 case :$finalize_shlibpath: in
6910 *":$libdir:"*) ;;
6911 *) func_append finalize_shlibpath "$libdir:" ;;
6912 esac
6913 add="-l$name"
6914 elif test "$hardcode_automatic" = yes; then
6915 if test -n "$inst_prefix_dir" &&
6916 test -f "$inst_prefix_dir$libdir/$linklib" ; then
6917 add="$inst_prefix_dir$libdir/$linklib"
6918 else
6919 add="$libdir/$linklib"
6920 fi
6921 else
6922 # We cannot seem to hardcode it, guess we'll fake it.
6923 add_dir="-L$libdir"
6924 # Try looking first in the location we're being installed to.
6925 if test -n "$inst_prefix_dir"; then
6926 case $libdir in
6927 [\\/]*)
6928 func_append add_dir " -L$inst_prefix_dir$libdir"
6929 ;;
6930 esac
6931 fi
6932 add="-l$name"
6933 fi
6934
6935 if test "$linkmode" = prog; then
6936 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
6937 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
6938 else
6939 test -n "$add_dir" && deplibs="$add_dir $deplibs"
6940 test -n "$add" && deplibs="$add $deplibs"
6941 fi
6942 fi
6943 elif test "$linkmode" = prog; then
6944 # Here we assume that one of hardcode_direct or hardcode_minus_L
6945 # is not unsupported. This is valid on all known static and
6946 # shared platforms.
6947 if test "$hardcode_direct" != unsupported; then
6948 test -n "$old_library" && linklib="$old_library"
6949 compile_deplibs="$dir/$linklib $compile_deplibs"
6950 finalize_deplibs="$dir/$linklib $finalize_deplibs"
6951 else
6952 compile_deplibs="-l$name -L$dir $compile_deplibs"
6953 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
6954 fi
6955 elif test "$build_libtool_libs" = yes; then
6956 # Not a shared library
6957 if test "$deplibs_check_method" != pass_all; then
6958 # We're trying link a shared library against a static one
6959 # but the system doesn't support it.
6960
6961 # Just print a warning and add the library to dependency_libs so
6962 # that the program can be linked against the static library.
6963 echo
6964 $ECHO "*** Warning: This system can not link to static lib archive $lib."
6965 echo "*** I have the capability to make that library automatically link in when"
6966 echo "*** you link to this library. But I can only do this if you have a"
6967 echo "*** shared version of the library, which you do not appear to have."
6968 if test "$module" = yes; then
6969 echo "*** But as you try to build a module library, libtool will still create "
6970 echo "*** a static module, that should work as long as the dlopening application"
6971 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
6972 if test -z "$global_symbol_pipe"; then
6973 echo
6974 echo "*** However, this would only work if libtool was able to extract symbol"
6975 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6976 echo "*** not find such a program. So, this module is probably useless."
6977 echo "*** \`nm' from GNU binutils and a full rebuild may help."
6978 fi
6979 if test "$build_old_libs" = no; then
6980 build_libtool_libs=module
6981 build_old_libs=yes
6982 else
6983 build_libtool_libs=no
6984 fi
6985 fi
6986 else
6987 deplibs="$dir/$old_library $deplibs"
6988 link_static=yes
6989 fi
6990 fi # link shared/static library?
6991
6992 if test "$linkmode" = lib; then
6993 if test -n "$dependency_libs" &&
6994 { test "$hardcode_into_libs" != yes ||
6995 test "$build_old_libs" = yes ||
6996 test "$link_static" = yes; }; then
6997 # Extract -R from dependency_libs
6998 temp_deplibs=
6999 for libdir in $dependency_libs; do
7000 case $libdir in
7001 -R*) func_stripname '-R' '' "$libdir"
7002 temp_xrpath=$func_stripname_result
7003 case " $xrpath " in
7004 *" $temp_xrpath "*) ;;
7005 *) func_append xrpath " $temp_xrpath";;
7006 esac;;
7007 *) func_append temp_deplibs " $libdir";;
7008 esac
7009 done
7010 dependency_libs="$temp_deplibs"
7011 fi
7012
7013 func_append newlib_search_path " $absdir"
7014 # Link against this library
7015 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
7016 # ... and its dependency_libs
7017 tmp_libs=
7018 for deplib in $dependency_libs; do
7019 newdependency_libs="$deplib $newdependency_libs"
7020 case $deplib in
7021 -L*) func_stripname '-L' '' "$deplib"
7022 func_resolve_sysroot "$func_stripname_result";;
7023 *) func_resolve_sysroot "$deplib" ;;
7024 esac
7025 if $opt_preserve_dup_deps ; then
7026 case "$tmp_libs " in
7027 *" $func_resolve_sysroot_result "*)
7028 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
7029 esac
7030 fi
7031 func_append tmp_libs " $func_resolve_sysroot_result"
7032 done
7033
7034 if test "$link_all_deplibs" != no; then
7035 # Add the search paths of all dependency libraries
7036 for deplib in $dependency_libs; do
7037 path=
7038 case $deplib in
7039 -L*) path="$deplib" ;;
7040 *.la)
7041 func_resolve_sysroot "$deplib"
7042 deplib=$func_resolve_sysroot_result
7043 func_dirname "$deplib" "" "."
7044 dir=$func_dirname_result
7045 # We need an absolute path.
7046 case $dir in
7047 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
7048 *)
7049 absdir=`cd "$dir" && pwd`
7050 if test -z "$absdir"; then
7051 func_warning "cannot determine absolute directory name of \`$dir'"
7052 absdir="$dir"
7053 fi
7054 ;;
7055 esac
7056 if $GREP "^installed=no" $deplib > /dev/null; then
7057 case $host in
7058 *-*-darwin*)
7059 depdepl=
7060 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
7061 if test -n "$deplibrary_names" ; then
7062 for tmp in $deplibrary_names ; do
7063 depdepl=$tmp
7064 done
7065 if test -f "$absdir/$objdir/$depdepl" ; then
7066 depdepl="$absdir/$objdir/$depdepl"
7067 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
7068 if test -z "$darwin_install_name"; then
7069 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
7070 fi
7071 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7072 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
7073 path=
7074 fi
7075 fi
7076 ;;
7077 *)
7078 path="-L$absdir/$objdir"
7079 ;;
7080 esac
7081 else
7082 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
7083 test -z "$libdir" && \
7084 func_fatal_error "\`$deplib' is not a valid libtool archive"
7085 test "$absdir" != "$libdir" && \
7086 func_warning "\`$deplib' seems to be moved"
7087
7088 path="-L$absdir"
7089 fi
7090 ;;
7091 esac
7092 case " $deplibs " in
7093 *" $path "*) ;;
7094 *) deplibs="$path $deplibs" ;;
7095 esac
7096 done
7097 fi # link_all_deplibs != no
7098 fi # linkmode = lib
7099 done # for deplib in $libs
7100 if test "$pass" = link; then
7101 if test "$linkmode" = "prog"; then
7102 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
7103 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
7104 else
7105 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7106 fi
7107 fi
7108 dependency_libs="$newdependency_libs"
7109 if test "$pass" = dlpreopen; then
7110 # Link the dlpreopened libraries before other libraries
7111 for deplib in $save_deplibs; do
7112 deplibs="$deplib $deplibs"
7113 done
7114 fi
7115 if test "$pass" != dlopen; then
7116 if test "$pass" != conv; then
7117 # Make sure lib_search_path contains only unique directories.
7118 lib_search_path=
7119 for dir in $newlib_search_path; do
7120 case "$lib_search_path " in
7121 *" $dir "*) ;;
7122 *) func_append lib_search_path " $dir" ;;
7123 esac
7124 done
7125 newlib_search_path=
7126 fi
7127
7128 if test "$linkmode,$pass" != "prog,link"; then
7129 vars="deplibs"
7130 else
7131 vars="compile_deplibs finalize_deplibs"
7132 fi
7133 for var in $vars dependency_libs; do
7134 # Add libraries to $var in reverse order
7135 eval tmp_libs=\"\$$var\"
7136 new_libs=
7137 for deplib in $tmp_libs; do
7138 # FIXME: Pedantically, this is the right thing to do, so
7139 # that some nasty dependency loop isn't accidentally
7140 # broken:
7141 #new_libs="$deplib $new_libs"
7142 # Pragmatically, this seems to cause very few problems in
7143 # practice:
7144 case $deplib in
7145 -L*) new_libs="$deplib $new_libs" ;;
7146 -R*) ;;
7147 *)
7148 # And here is the reason: when a library appears more
7149 # than once as an explicit dependence of a library, or
7150 # is implicitly linked in more than once by the
7151 # compiler, it is considered special, and multiple
7152 # occurrences thereof are not removed. Compare this
7153 # with having the same library being listed as a
7154 # dependency of multiple other libraries: in this case,
7155 # we know (pedantically, we assume) the library does not
7156 # need to be listed more than once, so we keep only the
7157 # last copy. This is not always right, but it is rare
7158 # enough that we require users that really mean to play
7159 # such unportable linking tricks to link the library
7160 # using -Wl,-lname, so that libtool does not consider it
7161 # for duplicate removal.
7162 case " $specialdeplibs " in
7163 *" $deplib "*) new_libs="$deplib $new_libs" ;;
7164 *)
7165 case " $new_libs " in
7166 *" $deplib "*) ;;
7167 *) new_libs="$deplib $new_libs" ;;
7168 esac
7169 ;;
7170 esac
7171 ;;
7172 esac
7173 done
7174 tmp_libs=
7175 for deplib in $new_libs; do
7176 case $deplib in
7177 -L*)
7178 case " $tmp_libs " in
7179 *" $deplib "*) ;;
7180 *) func_append tmp_libs " $deplib" ;;
7181 esac
7182 ;;
7183 *) func_append tmp_libs " $deplib" ;;
7184 esac
7185 done
7186 eval $var=\"$tmp_libs\"
7187 done # for var
7188 fi
7189 # Last step: remove runtime libs from dependency_libs
7190 # (they stay in deplibs)
7191 tmp_libs=
7192 for i in $dependency_libs ; do
7193 case " $predeps $postdeps $compiler_lib_search_path " in
7194 *" $i "*)
7195 i=""
7196 ;;
7197 esac
7198 if test -n "$i" ; then
7199 func_append tmp_libs " $i"
7200 fi
7201 done
7202 dependency_libs=$tmp_libs
7203 done # for pass
7204 if test "$linkmode" = prog; then
7205 dlfiles="$newdlfiles"
7206 fi
7207 if test "$linkmode" = prog || test "$linkmode" = lib; then
7208 dlprefiles="$newdlprefiles"
7209 fi
7210
7211 case $linkmode in
7212 oldlib)
7213 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7214 func_warning "\`-dlopen' is ignored for archives"
7215 fi
7216
7217 case " $deplibs" in
7218 *\ -l* | *\ -L*)
7219 func_warning "\`-l' and \`-L' are ignored for archives" ;;
7220 esac
7221
7222 test -n "$rpath" && \
7223 func_warning "\`-rpath' is ignored for archives"
7224
7225 test -n "$xrpath" && \
7226 func_warning "\`-R' is ignored for archives"
7227
7228 test -n "$vinfo" && \
7229 func_warning "\`-version-info/-version-number' is ignored for archives"
7230
7231 test -n "$release" && \
7232 func_warning "\`-release' is ignored for archives"
7233
7234 test -n "$export_symbols$export_symbols_regex" && \
7235 func_warning "\`-export-symbols' is ignored for archives"
7236
7237 # Now set the variables for building old libraries.
7238 build_libtool_libs=no
7239 oldlibs="$output"
7240 func_append objs "$old_deplibs"
7241 ;;
7242
7243 lib)
7244 # Make sure we only generate libraries of the form `libNAME.la'.
7245 case $outputname in
7246 lib*)
7247 func_stripname 'lib' '.la' "$outputname"
7248 name=$func_stripname_result
7249 eval shared_ext=\"$shrext_cmds\"
7250 eval libname=\"$libname_spec\"
7251 ;;
7252 *)
7253 test "$module" = no && \
7254 func_fatal_help "libtool library \`$output' must begin with \`lib'"
7255
7256 if test "$need_lib_prefix" != no; then
7257 # Add the "lib" prefix for modules if required
7258 func_stripname '' '.la' "$outputname"
7259 name=$func_stripname_result
7260 eval shared_ext=\"$shrext_cmds\"
7261 eval libname=\"$libname_spec\"
7262 else
7263 func_stripname '' '.la' "$outputname"
7264 libname=$func_stripname_result
7265 fi
7266 ;;
7267 esac
7268
7269 if test -n "$objs"; then
7270 if test "$deplibs_check_method" != pass_all; then
7271 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
7272 else
7273 echo
7274 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
7275 $ECHO "*** objects $objs is not portable!"
7276 func_append libobjs " $objs"
7277 fi
7278 fi
7279
7280 test "$dlself" != no && \
7281 func_warning "\`-dlopen self' is ignored for libtool libraries"
7282
7283 set dummy $rpath
7284 shift
7285 test "$#" -gt 1 && \
7286 func_warning "ignoring multiple \`-rpath's for a libtool library"
7287
7288 install_libdir="$1"
7289
7290 oldlibs=
7291 if test -z "$rpath"; then
7292 if test "$build_libtool_libs" = yes; then
7293 # Building a libtool convenience library.
7294 # Some compilers have problems with a `.al' extension so
7295 # convenience libraries should have the same extension an
7296 # archive normally would.
7297 oldlibs="$output_objdir/$libname.$libext $oldlibs"
7298 build_libtool_libs=convenience
7299 build_old_libs=yes
7300 fi
7301
7302 test -n "$vinfo" && \
7303 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
7304
7305 test -n "$release" && \
7306 func_warning "\`-release' is ignored for convenience libraries"
7307 else
7308
7309 # Parse the version information argument.
7310 save_ifs="$IFS"; IFS=':'
7311 set dummy $vinfo 0 0 0
7312 shift
7313 IFS="$save_ifs"
7314
7315 test -n "$7" && \
7316 func_fatal_help "too many parameters to \`-version-info'"
7317
7318 # convert absolute version numbers to libtool ages
7319 # this retains compatibility with .la files and attempts
7320 # to make the code below a bit more comprehensible
7321
7322 case $vinfo_number in
7323 yes)
7324 number_major="$1"
7325 number_minor="$2"
7326 number_revision="$3"
7327 #
7328 # There are really only two kinds -- those that
7329 # use the current revision as the major version
7330 # and those that subtract age and use age as
7331 # a minor version. But, then there is irix
7332 # which has an extra 1 added just for fun
7333 #
7334 case $version_type in
7335 # correct linux to gnu/linux during the next big refactor
7336 darwin|linux|osf|windows|none)
7337 func_arith $number_major + $number_minor
7338 current=$func_arith_result
7339 age="$number_minor"
7340 revision="$number_revision"
7341 ;;
7342 freebsd-aout|freebsd-elf|qnx|sunos)
7343 current="$number_major"
7344 revision="$number_minor"
7345 age="0"
7346 ;;
7347 irix|nonstopux)
7348 func_arith $number_major + $number_minor
7349 current=$func_arith_result
7350 age="$number_minor"
7351 revision="$number_minor"
7352 lt_irix_increment=no
7353 ;;
7354 *)
7355 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
7356 ;;
7357 esac
7358 ;;
7359 no)
7360 current="$1"
7361 revision="$2"
7362 age="$3"
7363 ;;
7364 esac
7365
7366 # Check that each of the things are valid numbers.
7367 case $current in
7368 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]) ;;
7369 *)
7370 func_error "CURRENT \`$current' must be a nonnegative integer"
7371 func_fatal_error "\`$vinfo' is not valid version information"
7372 ;;
7373 esac
7374
7375 case $revision in
7376 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]) ;;
7377 *)
7378 func_error "REVISION \`$revision' must be a nonnegative integer"
7379 func_fatal_error "\`$vinfo' is not valid version information"
7380 ;;
7381 esac
7382
7383 case $age in
7384 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]) ;;
7385 *)
7386 func_error "AGE \`$age' must be a nonnegative integer"
7387 func_fatal_error "\`$vinfo' is not valid version information"
7388 ;;
7389 esac
7390
7391 if test "$age" -gt "$current"; then
7392 func_error "AGE \`$age' is greater than the current interface number \`$current'"
7393 func_fatal_error "\`$vinfo' is not valid version information"
7394 fi
7395
7396 # Calculate the version variables.
7397 major=
7398 versuffix=
7399 verstring=
7400 case $version_type in
7401 none) ;;
7402
7403 darwin)
7404 # Like Linux, but with the current version available in
7405 # verstring for coding it into the library header
7406 func_arith $current - $age
7407 major=.$func_arith_result
7408 versuffix="$major.$age.$revision"
7409 # Darwin ld doesn't like 0 for these options...
7410 func_arith $current + 1
7411 minor_current=$func_arith_result
7412 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
7413 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
7414 ;;
7415
7416 freebsd-aout)
7417 major=".$current"
7418 versuffix=".$current.$revision";
7419 ;;
7420
7421 freebsd-elf)
7422 major=".$current"
7423 versuffix=".$current"
7424 ;;
7425
7426 irix | nonstopux)
7427 if test "X$lt_irix_increment" = "Xno"; then
7428 func_arith $current - $age
7429 else
7430 func_arith $current - $age + 1
7431 fi
7432 major=$func_arith_result
7433
7434 case $version_type in
7435 nonstopux) verstring_prefix=nonstopux ;;
7436 *) verstring_prefix=sgi ;;
7437 esac
7438 verstring="$verstring_prefix$major.$revision"
7439
7440 # Add in all the interfaces that we are compatible with.
7441 loop=$revision
7442 while test "$loop" -ne 0; do
7443 func_arith $revision - $loop
7444 iface=$func_arith_result
7445 func_arith $loop - 1
7446 loop=$func_arith_result
7447 verstring="$verstring_prefix$major.$iface:$verstring"
7448 done
7449
7450 # Before this point, $major must not contain `.'.
7451 major=.$major
7452 versuffix="$major.$revision"
7453 ;;
7454
7455 linux) # correct to gnu/linux during the next big refactor
7456 func_arith $current - $age
7457 major=.$func_arith_result
7458 versuffix="$major.$age.$revision"
7459 ;;
7460
7461 osf)
7462 func_arith $current - $age
7463 major=.$func_arith_result
7464 versuffix=".$current.$age.$revision"
7465 verstring="$current.$age.$revision"
7466
7467 # Add in all the interfaces that we are compatible with.
7468 loop=$age
7469 while test "$loop" -ne 0; do
7470 func_arith $current - $loop
7471 iface=$func_arith_result
7472 func_arith $loop - 1
7473 loop=$func_arith_result
7474 verstring="$verstring:${iface}.0"
7475 done
7476
7477 # Make executables depend on our current version.
7478 func_append verstring ":${current}.0"
7479 ;;
7480
7481 qnx)
7482 major=".$current"
7483 versuffix=".$current"
7484 ;;
7485
7486 sunos)
7487 major=".$current"
7488 versuffix=".$current.$revision"
7489 ;;
7490
7491 windows)
7492 # Use '-' rather than '.', since we only want one
7493 # extension on DOS 8.3 filesystems.
7494 func_arith $current - $age
7495 major=$func_arith_result
7496 versuffix="-$major"
7497 ;;
7498
7499 *)
7500 func_fatal_configuration "unknown library version type \`$version_type'"
7501 ;;
7502 esac
7503
7504 # Clear the version info if we defaulted, and they specified a release.
7505 if test -z "$vinfo" && test -n "$release"; then
7506 major=
7507 case $version_type in
7508 darwin)
7509 # we can't check for "0.0" in archive_cmds due to quoting
7510 # problems, so we reset it completely
7511 verstring=
7512 ;;
7513 *)
7514 verstring="0.0"
7515 ;;
7516 esac
7517 if test "$need_version" = no; then
7518 versuffix=
7519 else
7520 versuffix=".0.0"
7521 fi
7522 fi
7523
7524 # Remove version info from name if versioning should be avoided
7525 if test "$avoid_version" = yes && test "$need_version" = no; then
7526 major=
7527 versuffix=
7528 verstring=""
7529 fi
7530
7531 # Check to see if the archive will have undefined symbols.
7532 if test "$allow_undefined" = yes; then
7533 if test "$allow_undefined_flag" = unsupported; then
7534 func_warning "undefined symbols not allowed in $host shared libraries"
7535 build_libtool_libs=no
7536 build_old_libs=yes
7537 fi
7538 else
7539 # Don't allow undefined symbols.
7540 allow_undefined_flag="$no_undefined_flag"
7541 fi
7542
7543 fi
7544
7545 func_generate_dlsyms "$libname" "$libname" "yes"
7546 func_append libobjs " $symfileobj"
7547 test "X$libobjs" = "X " && libobjs=
7548
7549 if test "$opt_mode" != relink; then
7550 # Remove our outputs, but don't remove object files since they
7551 # may have been created when compiling PIC objects.
7552 removelist=
7553 tempremovelist=`$ECHO "$output_objdir/*"`
7554 for p in $tempremovelist; do
7555 case $p in
7556 *.$objext | *.gcno)
7557 ;;
7558 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
7559 if test "X$precious_files_regex" != "X"; then
7560 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
7561 then
7562 continue
7563 fi
7564 fi
7565 func_append removelist " $p"
7566 ;;
7567 *) ;;
7568 esac
7569 done
7570 test -n "$removelist" && \
7571 func_show_eval "${RM}r \$removelist"
7572 fi
7573
7574 # Now set the variables for building old libraries.
7575 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
7576 func_append oldlibs " $output_objdir/$libname.$libext"
7577
7578 # Transform .lo files to .o files.
7579 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
7580 fi
7581
7582 # Eliminate all temporary directories.
7583 #for path in $notinst_path; do
7584 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
7585 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
7586 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
7587 #done
7588
7589 if test -n "$xrpath"; then
7590 # If the user specified any rpath flags, then add them.
7591 temp_xrpath=
7592 for libdir in $xrpath; do
7593 func_replace_sysroot "$libdir"
7594 func_append temp_xrpath " -R$func_replace_sysroot_result"
7595 case "$finalize_rpath " in
7596 *" $libdir "*) ;;
7597 *) func_append finalize_rpath " $libdir" ;;
7598 esac
7599 done
7600 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
7601 dependency_libs="$temp_xrpath $dependency_libs"
7602 fi
7603 fi
7604
7605 # Make sure dlfiles contains only unique files that won't be dlpreopened
7606 old_dlfiles="$dlfiles"
7607 dlfiles=
7608 for lib in $old_dlfiles; do
7609 case " $dlprefiles $dlfiles " in
7610 *" $lib "*) ;;
7611 *) func_append dlfiles " $lib" ;;
7612 esac
7613 done
7614
7615 # Make sure dlprefiles contains only unique files
7616 old_dlprefiles="$dlprefiles"
7617 dlprefiles=
7618 for lib in $old_dlprefiles; do
7619 case "$dlprefiles " in
7620 *" $lib "*) ;;
7621 *) func_append dlprefiles " $lib" ;;
7622 esac
7623 done
7624
7625 if test "$build_libtool_libs" = yes; then
7626 if test -n "$rpath"; then
7627 case $host in
7628 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
7629 # these systems don't actually have a c library (as such)!
7630 ;;
7631 *-*-rhapsody* | *-*-darwin1.[012])
7632 # Rhapsody C library is in the System framework
7633 func_append deplibs " System.ltframework"
7634 ;;
7635 *-*-netbsd*)
7636 # Don't link with libc until the a.out ld.so is fixed.
7637 ;;
7638 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7639 # Do not include libc due to us having libc/libc_r.
7640 ;;
7641 *-*-sco3.2v5* | *-*-sco5v6*)
7642 # Causes problems with __ctype
7643 ;;
7644 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7645 # Compiler inserts libc in the correct place for threads to work
7646 ;;
7647 *)
7648 # Add libc to deplibs on all other systems if necessary.
7649 if test "$build_libtool_need_lc" = "yes"; then
7650 func_append deplibs " -lc"
7651 fi
7652 ;;
7653 esac
7654 fi
7655
7656 # Transform deplibs into only deplibs that can be linked in shared.
7657 name_save=$name
7658 libname_save=$libname
7659 release_save=$release
7660 versuffix_save=$versuffix
7661 major_save=$major
7662 # I'm not sure if I'm treating the release correctly. I think
7663 # release should show up in the -l (ie -lgmp5) so we don't want to
7664 # add it in twice. Is that correct?
7665 release=""
7666 versuffix=""
7667 major=""
7668 newdeplibs=
7669 droppeddeps=no
7670 case $deplibs_check_method in
7671 pass_all)
7672 # Don't check for shared/static. Everything works.
7673 # This might be a little naive. We might want to check
7674 # whether the library exists or not. But this is on
7675 # osf3 & osf4 and I'm not really sure... Just
7676 # implementing what was already the behavior.
7677 newdeplibs=$deplibs
7678 ;;
7679 test_compile)
7680 # This code stresses the "libraries are programs" paradigm to its
7681 # limits. Maybe even breaks it. We compile a program, linking it
7682 # against the deplibs as a proxy for the library. Then we can check
7683 # whether they linked in statically or dynamically with ldd.
7684 $opt_dry_run || $RM conftest.c
7685 cat > conftest.c <<EOF
7686 int main() { return 0; }
7687 EOF
7688 $opt_dry_run || $RM conftest
7689 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
7690 ldd_output=`ldd conftest`
7691 for i in $deplibs; do
7692 case $i in
7693 -l*)
7694 func_stripname -l '' "$i"
7695 name=$func_stripname_result
7696 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7697 case " $predeps $postdeps " in
7698 *" $i "*)
7699 func_append newdeplibs " $i"
7700 i=""
7701 ;;
7702 esac
7703 fi
7704 if test -n "$i" ; then
7705 libname=`eval "\\$ECHO \"$libname_spec\""`
7706 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
7707 set dummy $deplib_matches; shift
7708 deplib_match=$1
7709 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7710 func_append newdeplibs " $i"
7711 else
7712 droppeddeps=yes
7713 echo
7714 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
7715 echo "*** I have the capability to make that library automatically link in when"
7716 echo "*** you link to this library. But I can only do this if you have a"
7717 echo "*** shared version of the library, which I believe you do not have"
7718 echo "*** because a test_compile did reveal that the linker did not use it for"
7719 echo "*** its dynamic dependency list that programs get resolved with at runtime."
7720 fi
7721 fi
7722 ;;
7723 *)
7724 func_append newdeplibs " $i"
7725 ;;
7726 esac
7727 done
7728 else
7729 # Error occurred in the first compile. Let's try to salvage
7730 # the situation: Compile a separate program for each library.
7731 for i in $deplibs; do
7732 case $i in
7733 -l*)
7734 func_stripname -l '' "$i"
7735 name=$func_stripname_result
7736 $opt_dry_run || $RM conftest
7737 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
7738 ldd_output=`ldd conftest`
7739 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7740 case " $predeps $postdeps " in
7741 *" $i "*)
7742 func_append newdeplibs " $i"
7743 i=""
7744 ;;
7745 esac
7746 fi
7747 if test -n "$i" ; then
7748 libname=`eval "\\$ECHO \"$libname_spec\""`
7749 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
7750 set dummy $deplib_matches; shift
7751 deplib_match=$1
7752 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7753 func_append newdeplibs " $i"
7754 else
7755 droppeddeps=yes
7756 echo
7757 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
7758 echo "*** I have the capability to make that library automatically link in when"
7759 echo "*** you link to this library. But I can only do this if you have a"
7760 echo "*** shared version of the library, which you do not appear to have"
7761 echo "*** because a test_compile did reveal that the linker did not use this one"
7762 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
7763 fi
7764 fi
7765 else
7766 droppeddeps=yes
7767 echo
7768 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
7769 echo "*** make it link in! You will probably need to install it or some"
7770 echo "*** library that it depends on before this library will be fully"
7771 echo "*** functional. Installing it before continuing would be even better."
7772 fi
7773 ;;
7774 *)
7775 func_append newdeplibs " $i"
7776 ;;
7777 esac
7778 done
7779 fi
7780 ;;
7781 file_magic*)
7782 set dummy $deplibs_check_method; shift
7783 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7784 for a_deplib in $deplibs; do
7785 case $a_deplib in
7786 -l*)
7787 func_stripname -l '' "$a_deplib"
7788 name=$func_stripname_result
7789 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7790 case " $predeps $postdeps " in
7791 *" $a_deplib "*)
7792 func_append newdeplibs " $a_deplib"
7793 a_deplib=""
7794 ;;
7795 esac
7796 fi
7797 if test -n "$a_deplib" ; then
7798 libname=`eval "\\$ECHO \"$libname_spec\""`
7799 if test -n "$file_magic_glob"; then
7800 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
7801 else
7802 libnameglob=$libname
7803 fi
7804 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
7805 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7806 if test "$want_nocaseglob" = yes; then
7807 shopt -s nocaseglob
7808 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7809 $nocaseglob
7810 else
7811 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7812 fi
7813 for potent_lib in $potential_libs; do
7814 # Follow soft links.
7815 if ls -lLd "$potent_lib" 2>/dev/null |
7816 $GREP " -> " >/dev/null; then
7817 continue
7818 fi
7819 # The statement above tries to avoid entering an
7820 # endless loop below, in case of cyclic links.
7821 # We might still enter an endless loop, since a link
7822 # loop can be closed while we follow links,
7823 # but so what?
7824 potlib="$potent_lib"
7825 while test -h "$potlib" 2>/dev/null; do
7826 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
7827 case $potliblink in
7828 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
7829 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
7830 esac
7831 done
7832 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
7833 $SED -e 10q |
7834 $EGREP "$file_magic_regex" > /dev/null; then
7835 func_append newdeplibs " $a_deplib"
7836 a_deplib=""
7837 break 2
7838 fi
7839 done
7840 done
7841 fi
7842 if test -n "$a_deplib" ; then
7843 droppeddeps=yes
7844 echo
7845 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
7846 echo "*** I have the capability to make that library automatically link in when"
7847 echo "*** you link to this library. But I can only do this if you have a"
7848 echo "*** shared version of the library, which you do not appear to have"
7849 echo "*** because I did check the linker path looking for a file starting"
7850 if test -z "$potlib" ; then
7851 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
7852 else
7853 $ECHO "*** with $libname and none of the candidates passed a file format test"
7854 $ECHO "*** using a file magic. Last file checked: $potlib"
7855 fi
7856 fi
7857 ;;
7858 *)
7859 # Add a -L argument.
7860 func_append newdeplibs " $a_deplib"
7861 ;;
7862 esac
7863 done # Gone through all deplibs.
7864 ;;
7865 match_pattern*)
7866 set dummy $deplibs_check_method; shift
7867 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
7868 for a_deplib in $deplibs; do
7869 case $a_deplib in
7870 -l*)
7871 func_stripname -l '' "$a_deplib"
7872 name=$func_stripname_result
7873 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7874 case " $predeps $postdeps " in
7875 *" $a_deplib "*)
7876 func_append newdeplibs " $a_deplib"
7877 a_deplib=""
7878 ;;
7879 esac
7880 fi
7881 if test -n "$a_deplib" ; then
7882 libname=`eval "\\$ECHO \"$libname_spec\""`
7883 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7884 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7885 for potent_lib in $potential_libs; do
7886 potlib="$potent_lib" # see symlink-check above in file_magic test
7887 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
7888 $EGREP "$match_pattern_regex" > /dev/null; then
7889 func_append newdeplibs " $a_deplib"
7890 a_deplib=""
7891 break 2
7892 fi
7893 done
7894 done
7895 fi
7896 if test -n "$a_deplib" ; then
7897 droppeddeps=yes
7898 echo
7899 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
7900 echo "*** I have the capability to make that library automatically link in when"
7901 echo "*** you link to this library. But I can only do this if you have a"
7902 echo "*** shared version of the library, which you do not appear to have"
7903 echo "*** because I did check the linker path looking for a file starting"
7904 if test -z "$potlib" ; then
7905 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
7906 else
7907 $ECHO "*** with $libname and none of the candidates passed a file format test"
7908 $ECHO "*** using a regex pattern. Last file checked: $potlib"
7909 fi
7910 fi
7911 ;;
7912 *)
7913 # Add a -L argument.
7914 func_append newdeplibs " $a_deplib"
7915 ;;
7916 esac
7917 done # Gone through all deplibs.
7918 ;;
7919 none | unknown | *)
7920 newdeplibs=""
7921 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
7922 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7923 for i in $predeps $postdeps ; do
7924 # can't use Xsed below, because $i might contain '/'
7925 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
7926 done
7927 fi
7928 case $tmp_deplibs in
7929 *[!\ \ ]*)
7930 echo
7931 if test "X$deplibs_check_method" = "Xnone"; then
7932 echo "*** Warning: inter-library dependencies are not supported in this platform."
7933 else
7934 echo "*** Warning: inter-library dependencies are not known to be supported."
7935 fi
7936 echo "*** All declared inter-library dependencies are being dropped."
7937 droppeddeps=yes
7938 ;;
7939 esac
7940 ;;
7941 esac
7942 versuffix=$versuffix_save
7943 major=$major_save
7944 release=$release_save
7945 libname=$libname_save
7946 name=$name_save
7947
7948 case $host in
7949 *-*-rhapsody* | *-*-darwin1.[012])
7950 # On Rhapsody replace the C library with the System framework
7951 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
7952 ;;
7953 esac
7954
7955 if test "$droppeddeps" = yes; then
7956 if test "$module" = yes; then
7957 echo
7958 echo "*** Warning: libtool could not satisfy all declared inter-library"
7959 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
7960 echo "*** a static module, that should work as long as the dlopening"
7961 echo "*** application is linked with the -dlopen flag."
7962 if test -z "$global_symbol_pipe"; then
7963 echo
7964 echo "*** However, this would only work if libtool was able to extract symbol"
7965 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7966 echo "*** not find such a program. So, this module is probably useless."
7967 echo "*** \`nm' from GNU binutils and a full rebuild may help."
7968 fi
7969 if test "$build_old_libs" = no; then
7970 oldlibs="$output_objdir/$libname.$libext"
7971 build_libtool_libs=module
7972 build_old_libs=yes
7973 else
7974 build_libtool_libs=no
7975 fi
7976 else
7977 echo "*** The inter-library dependencies that have been dropped here will be"
7978 echo "*** automatically added whenever a program is linked with this library"
7979 echo "*** or is declared to -dlopen it."
7980
7981 if test "$allow_undefined" = no; then
7982 echo
7983 echo "*** Since this library must not contain undefined symbols,"
7984 echo "*** because either the platform does not support them or"
7985 echo "*** it was explicitly requested with -no-undefined,"
7986 echo "*** libtool will only create a static version of it."
7987 if test "$build_old_libs" = no; then
7988 oldlibs="$output_objdir/$libname.$libext"
7989 build_libtool_libs=module
7990 build_old_libs=yes
7991 else
7992 build_libtool_libs=no
7993 fi
7994 fi
7995 fi
7996 fi
7997 # Done checking deplibs!
7998 deplibs=$newdeplibs
7999 fi
8000 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
8001 case $host in
8002 *-*-darwin*)
8003 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8004 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8005 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8006 ;;
8007 esac
8008
8009 # move library search paths that coincide with paths to not yet
8010 # installed libraries to the beginning of the library search list
8011 new_libs=
8012 for path in $notinst_path; do
8013 case " $new_libs " in
8014 *" -L$path/$objdir "*) ;;
8015 *)
8016 case " $deplibs " in
8017 *" -L$path/$objdir "*)
8018 func_append new_libs " -L$path/$objdir" ;;
8019 esac
8020 ;;
8021 esac
8022 done
8023 for deplib in $deplibs; do
8024 case $deplib in
8025 -L*)
8026 case " $new_libs " in
8027 *" $deplib "*) ;;
8028 *) func_append new_libs " $deplib" ;;
8029 esac
8030 ;;
8031 *) func_append new_libs " $deplib" ;;
8032 esac
8033 done
8034 deplibs="$new_libs"
8035
8036 # All the library-specific variables (install_libdir is set above).
8037 library_names=
8038 old_library=
8039 dlname=
8040
8041 # Test again, we may have decided not to build it any more
8042 if test "$build_libtool_libs" = yes; then
8043 # Remove ${wl} instances when linking with ld.
8044 # FIXME: should test the right _cmds variable.
8045 case $archive_cmds in
8046 *\$LD\ *) wl= ;;
8047 esac
8048 if test "$hardcode_into_libs" = yes; then
8049 # Hardcode the library paths
8050 hardcode_libdirs=
8051 dep_rpath=
8052 rpath="$finalize_rpath"
8053 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
8054 for libdir in $rpath; do
8055 if test -n "$hardcode_libdir_flag_spec"; then
8056 if test -n "$hardcode_libdir_separator"; then
8057 func_replace_sysroot "$libdir"
8058 libdir=$func_replace_sysroot_result
8059 if test -z "$hardcode_libdirs"; then
8060 hardcode_libdirs="$libdir"
8061 else
8062 # Just accumulate the unique libdirs.
8063 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8064 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8065 ;;
8066 *)
8067 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8068 ;;
8069 esac
8070 fi
8071 else
8072 eval flag=\"$hardcode_libdir_flag_spec\"
8073 func_append dep_rpath " $flag"
8074 fi
8075 elif test -n "$runpath_var"; then
8076 case "$perm_rpath " in
8077 *" $libdir "*) ;;
8078 *) func_append perm_rpath " $libdir" ;;
8079 esac
8080 fi
8081 done
8082 # Substitute the hardcoded libdirs into the rpath.
8083 if test -n "$hardcode_libdir_separator" &&
8084 test -n "$hardcode_libdirs"; then
8085 libdir="$hardcode_libdirs"
8086 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
8087 fi
8088 if test -n "$runpath_var" && test -n "$perm_rpath"; then
8089 # We should set the runpath_var.
8090 rpath=
8091 for dir in $perm_rpath; do
8092 func_append rpath "$dir:"
8093 done
8094 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
8095 fi
8096 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
8097 fi
8098
8099 shlibpath="$finalize_shlibpath"
8100 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
8101 if test -n "$shlibpath"; then
8102 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
8103 fi
8104
8105 # Get the real and link names of the library.
8106 eval shared_ext=\"$shrext_cmds\"
8107 eval library_names=\"$library_names_spec\"
8108 set dummy $library_names
8109 shift
8110 realname="$1"
8111 shift
8112
8113 if test -n "$soname_spec"; then
8114 eval soname=\"$soname_spec\"
8115 else
8116 soname="$realname"
8117 fi
8118 if test -z "$dlname"; then
8119 dlname=$soname
8120 fi
8121
8122 lib="$output_objdir/$realname"
8123 linknames=
8124 for link
8125 do
8126 func_append linknames " $link"
8127 done
8128
8129 # Use standard objects if they are pic
8130 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
8131 test "X$libobjs" = "X " && libobjs=
8132
8133 delfiles=
8134 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8135 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
8136 export_symbols="$output_objdir/$libname.uexp"
8137 func_append delfiles " $export_symbols"
8138 fi
8139
8140 orig_export_symbols=
8141 case $host_os in
8142 cygwin* | mingw* | cegcc*)
8143 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
8144 # exporting using user supplied symfile
8145 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
8146 # and it's NOT already a .def file. Must figure out
8147 # which of the given symbols are data symbols and tag
8148 # them as such. So, trigger use of export_symbols_cmds.
8149 # export_symbols gets reassigned inside the "prepare
8150 # the list of exported symbols" if statement, so the
8151 # include_expsyms logic still works.
8152 orig_export_symbols="$export_symbols"
8153 export_symbols=
8154 always_export_symbols=yes
8155 fi
8156 fi
8157 ;;
8158 esac
8159
8160 # Prepare the list of exported symbols
8161 if test -z "$export_symbols"; then
8162 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
8163 func_verbose "generating symbol list for \`$libname.la'"
8164 export_symbols="$output_objdir/$libname.exp"
8165 $opt_dry_run || $RM $export_symbols
8166 cmds=$export_symbols_cmds
8167 save_ifs="$IFS"; IFS='~'
8168 for cmd1 in $cmds; do
8169 IFS="$save_ifs"
8170 # Take the normal branch if the nm_file_list_spec branch
8171 # doesn't work or if tool conversion is not needed.
8172 case $nm_file_list_spec~$to_tool_file_cmd in
8173 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
8174 try_normal_branch=yes
8175 eval cmd=\"$cmd1\"
8176 func_len " $cmd"
8177 len=$func_len_result
8178 ;;
8179 *)
8180 try_normal_branch=no
8181 ;;
8182 esac
8183 if test "$try_normal_branch" = yes \
8184 && { test "$len" -lt "$max_cmd_len" \
8185 || test "$max_cmd_len" -le -1; }
8186 then
8187 func_show_eval "$cmd" 'exit $?'
8188 skipped_export=false
8189 elif test -n "$nm_file_list_spec"; then
8190 func_basename "$output"
8191 output_la=$func_basename_result
8192 save_libobjs=$libobjs
8193 save_output=$output
8194 output=${output_objdir}/${output_la}.nm
8195 func_to_tool_file "$output"
8196 libobjs=$nm_file_list_spec$func_to_tool_file_result
8197 func_append delfiles " $output"
8198 func_verbose "creating $NM input file list: $output"
8199 for obj in $save_libobjs; do
8200 func_to_tool_file "$obj"
8201 $ECHO "$func_to_tool_file_result"
8202 done > "$output"
8203 eval cmd=\"$cmd1\"
8204 func_show_eval "$cmd" 'exit $?'
8205 output=$save_output
8206 libobjs=$save_libobjs
8207 skipped_export=false
8208 else
8209 # The command line is too long to execute in one step.
8210 func_verbose "using reloadable object file for export list..."
8211 skipped_export=:
8212 # Break out early, otherwise skipped_export may be
8213 # set to false by a later but shorter cmd.
8214 break
8215 fi
8216 done
8217 IFS="$save_ifs"
8218 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
8219 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
8220 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
8221 fi
8222 fi
8223 fi
8224
8225 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8226 tmp_export_symbols="$export_symbols"
8227 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
8228 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
8229 fi
8230
8231 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
8232 # The given exports_symbols file has to be filtered, so filter it.
8233 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
8234 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8235 # 's' commands which not all seds can handle. GNU sed should be fine
8236 # though. Also, the filter scales superlinearly with the number of
8237 # global variables. join(1) would be nice here, but unfortunately
8238 # isn't a blessed tool.
8239 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
8240 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
8241 export_symbols=$output_objdir/$libname.def
8242 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
8243 fi
8244
8245 tmp_deplibs=
8246 for test_deplib in $deplibs; do
8247 case " $convenience " in
8248 *" $test_deplib "*) ;;
8249 *)
8250 func_append tmp_deplibs " $test_deplib"
8251 ;;
8252 esac
8253 done
8254 deplibs="$tmp_deplibs"
8255
8256 if test -n "$convenience"; then
8257 if test -n "$whole_archive_flag_spec" &&
8258 test "$compiler_needs_object" = yes &&
8259 test -z "$libobjs"; then
8260 # extract the archives, so we have objects to list.
8261 # TODO: could optimize this to just extract one archive.
8262 whole_archive_flag_spec=
8263 fi
8264 if test -n "$whole_archive_flag_spec"; then
8265 save_libobjs=$libobjs
8266 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
8267 test "X$libobjs" = "X " && libobjs=
8268 else
8269 gentop="$output_objdir/${outputname}x"
8270 func_append generated " $gentop"
8271
8272 func_extract_archives $gentop $convenience
8273 func_append libobjs " $func_extract_archives_result"
8274 test "X$libobjs" = "X " && libobjs=
8275 fi
8276 fi
8277
8278 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
8279 eval flag=\"$thread_safe_flag_spec\"
8280 func_append linker_flags " $flag"
8281 fi
8282
8283 # Make a backup of the uninstalled library when relinking
8284 if test "$opt_mode" = relink; then
8285 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
8286 fi
8287
8288 # Do each of the archive commands.
8289 if test "$module" = yes && test -n "$module_cmds" ; then
8290 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
8291 eval test_cmds=\"$module_expsym_cmds\"
8292 cmds=$module_expsym_cmds
8293 else
8294 eval test_cmds=\"$module_cmds\"
8295 cmds=$module_cmds
8296 fi
8297 else
8298 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
8299 eval test_cmds=\"$archive_expsym_cmds\"
8300 cmds=$archive_expsym_cmds
8301 else
8302 eval test_cmds=\"$archive_cmds\"
8303 cmds=$archive_cmds
8304 fi
8305 fi
8306
8307 if test "X$skipped_export" != "X:" &&
8308 func_len " $test_cmds" &&
8309 len=$func_len_result &&
8310 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8311 :
8312 else
8313 # The command line is too long to link in one step, link piecewise
8314 # or, if using GNU ld and skipped_export is not :, use a linker
8315 # script.
8316
8317 # Save the value of $output and $libobjs because we want to
8318 # use them later. If we have whole_archive_flag_spec, we
8319 # want to use save_libobjs as it was before
8320 # whole_archive_flag_spec was expanded, because we can't
8321 # assume the linker understands whole_archive_flag_spec.
8322 # This may have to be revisited, in case too many
8323 # convenience libraries get linked in and end up exceeding
8324 # the spec.
8325 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
8326 save_libobjs=$libobjs
8327 fi
8328 save_output=$output
8329 func_basename "$output"
8330 output_la=$func_basename_result
8331
8332 # Clear the reloadable object creation command queue and
8333 # initialize k to one.
8334 test_cmds=
8335 concat_cmds=
8336 objlist=
8337 last_robj=
8338 k=1
8339
8340 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
8341 output=${output_objdir}/${output_la}.lnkscript
8342 func_verbose "creating GNU ld script: $output"
8343 echo 'INPUT (' > $output
8344 for obj in $save_libobjs
8345 do
8346 func_to_tool_file "$obj"
8347 $ECHO "$func_to_tool_file_result" >> $output
8348 done
8349 echo ')' >> $output
8350 func_append delfiles " $output"
8351 func_to_tool_file "$output"
8352 output=$func_to_tool_file_result
8353 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
8354 output=${output_objdir}/${output_la}.lnk
8355 func_verbose "creating linker input file list: $output"
8356 : > $output
8357 set x $save_libobjs
8358 shift
8359 firstobj=
8360 if test "$compiler_needs_object" = yes; then
8361 firstobj="$1 "
8362 shift
8363 fi
8364 for obj
8365 do
8366 func_to_tool_file "$obj"
8367 $ECHO "$func_to_tool_file_result" >> $output
8368 done
8369 func_append delfiles " $output"
8370 func_to_tool_file "$output"
8371 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
8372 else
8373 if test -n "$save_libobjs"; then
8374 func_verbose "creating reloadable object files..."
8375 output=$output_objdir/$output_la-${k}.$objext
8376 eval test_cmds=\"$reload_cmds\"
8377 func_len " $test_cmds"
8378 len0=$func_len_result
8379 len=$len0
8380
8381 # Loop over the list of objects to be linked.
8382 for obj in $save_libobjs
8383 do
8384 func_len " $obj"
8385 func_arith $len + $func_len_result
8386 len=$func_arith_result
8387 if test "X$objlist" = X ||
8388 test "$len" -lt "$max_cmd_len"; then
8389 func_append objlist " $obj"
8390 else
8391 # The command $test_cmds is almost too long, add a
8392 # command to the queue.
8393 if test "$k" -eq 1 ; then
8394 # The first file doesn't have a previous command to add.
8395 reload_objs=$objlist
8396 eval concat_cmds=\"$reload_cmds\"
8397 else
8398 # All subsequent reloadable object files will link in
8399 # the last one created.
8400 reload_objs="$objlist $last_robj"
8401 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
8402 fi
8403 last_robj=$output_objdir/$output_la-${k}.$objext
8404 func_arith $k + 1
8405 k=$func_arith_result
8406 output=$output_objdir/$output_la-${k}.$objext
8407 objlist=" $obj"
8408 func_len " $last_robj"
8409 func_arith $len0 + $func_len_result
8410 len=$func_arith_result
8411 fi
8412 done
8413 # Handle the remaining objects by creating one last
8414 # reloadable object file. All subsequent reloadable object
8415 # files will link in the last one created.
8416 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8417 reload_objs="$objlist $last_robj"
8418 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
8419 if test -n "$last_robj"; then
8420 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
8421 fi
8422 func_append delfiles " $output"
8423
8424 else
8425 output=
8426 fi
8427
8428 if ${skipped_export-false}; then
8429 func_verbose "generating symbol list for \`$libname.la'"
8430 export_symbols="$output_objdir/$libname.exp"
8431 $opt_dry_run || $RM $export_symbols
8432 libobjs=$output
8433 # Append the command to create the export file.
8434 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8435 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
8436 if test -n "$last_robj"; then
8437 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
8438 fi
8439 fi
8440
8441 test -n "$save_libobjs" &&
8442 func_verbose "creating a temporary reloadable object file: $output"
8443
8444 # Loop through the commands generated above and execute them.
8445 save_ifs="$IFS"; IFS='~'
8446 for cmd in $concat_cmds; do
8447 IFS="$save_ifs"
8448 $opt_silent || {
8449 func_quote_for_expand "$cmd"
8450 eval "func_echo $func_quote_for_expand_result"
8451 }
8452 $opt_dry_run || eval "$cmd" || {
8453 lt_exit=$?
8454
8455 # Restore the uninstalled library and exit
8456 if test "$opt_mode" = relink; then
8457 ( cd "$output_objdir" && \
8458 $RM "${realname}T" && \
8459 $MV "${realname}U" "$realname" )
8460 fi
8461
8462 exit $lt_exit
8463 }
8464 done
8465 IFS="$save_ifs"
8466
8467 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
8468 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
8469 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
8470 fi
8471 fi
8472
8473 if ${skipped_export-false}; then
8474 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8475 tmp_export_symbols="$export_symbols"
8476 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
8477 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
8478 fi
8479
8480 if test -n "$orig_export_symbols"; then
8481 # The given exports_symbols file has to be filtered, so filter it.
8482 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
8483 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8484 # 's' commands which not all seds can handle. GNU sed should be fine
8485 # though. Also, the filter scales superlinearly with the number of
8486 # global variables. join(1) would be nice here, but unfortunately
8487 # isn't a blessed tool.
8488 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
8489 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
8490 export_symbols=$output_objdir/$libname.def
8491 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
8492 fi
8493 fi
8494
8495 libobjs=$output
8496 # Restore the value of output.
8497 output=$save_output
8498
8499 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
8500 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
8501 test "X$libobjs" = "X " && libobjs=
8502 fi
8503 # Expand the library linking commands again to reset the
8504 # value of $libobjs for piecewise linking.
8505
8506 # Do each of the archive commands.
8507 if test "$module" = yes && test -n "$module_cmds" ; then
8508 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
8509 cmds=$module_expsym_cmds
8510 else
8511 cmds=$module_cmds
8512 fi
8513 else
8514 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
8515 cmds=$archive_expsym_cmds
8516 else
8517 cmds=$archive_cmds
8518 fi
8519 fi
8520 fi
8521
8522 if test -n "$delfiles"; then
8523 # Append the command to remove temporary files to $cmds.
8524 eval cmds=\"\$cmds~\$RM $delfiles\"
8525 fi
8526
8527 # Add any objects from preloaded convenience libraries
8528 if test -n "$dlprefiles"; then
8529 gentop="$output_objdir/${outputname}x"
8530 func_append generated " $gentop"
8531
8532 func_extract_archives $gentop $dlprefiles
8533 func_append libobjs " $func_extract_archives_result"
8534 test "X$libobjs" = "X " && libobjs=
8535 fi
8536
8537 save_ifs="$IFS"; IFS='~'
8538 for cmd in $cmds; do
8539 IFS="$save_ifs"
8540 eval cmd=\"$cmd\"
8541 $opt_silent || {
8542 func_quote_for_expand "$cmd"
8543 eval "func_echo $func_quote_for_expand_result"
8544 }
8545 $opt_dry_run || eval "$cmd" || {
8546 lt_exit=$?
8547
8548 # Restore the uninstalled library and exit
8549 if test "$opt_mode" = relink; then
8550 ( cd "$output_objdir" && \
8551 $RM "${realname}T" && \
8552 $MV "${realname}U" "$realname" )
8553 fi
8554
8555 exit $lt_exit
8556 }
8557 done
8558 IFS="$save_ifs"
8559
8560 # Restore the uninstalled library and exit
8561 if test "$opt_mode" = relink; then
8562 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
8563
8564 if test -n "$convenience"; then
8565 if test -z "$whole_archive_flag_spec"; then
8566 func_show_eval '${RM}r "$gentop"'
8567 fi
8568 fi
8569
8570 exit $EXIT_SUCCESS
8571 fi
8572
8573 # Create links to the real library.
8574 for linkname in $linknames; do
8575 if test "$realname" != "$linkname"; then
8576 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
8577 fi
8578 done
8579
8580 # If -module or -export-dynamic was specified, set the dlname.
8581 if test "$module" = yes || test "$export_dynamic" = yes; then
8582 # On all known operating systems, these are identical.
8583 dlname="$soname"
8584 fi
8585 fi
8586 ;;
8587
8588 obj)
8589 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
8590 func_warning "\`-dlopen' is ignored for objects"
8591 fi
8592
8593 case " $deplibs" in
8594 *\ -l* | *\ -L*)
8595 func_warning "\`-l' and \`-L' are ignored for objects" ;;
8596 esac
8597
8598 test -n "$rpath" && \
8599 func_warning "\`-rpath' is ignored for objects"
8600
8601 test -n "$xrpath" && \
8602 func_warning "\`-R' is ignored for objects"
8603
8604 test -n "$vinfo" && \
8605 func_warning "\`-version-info' is ignored for objects"
8606
8607 test -n "$release" && \
8608 func_warning "\`-release' is ignored for objects"
8609
8610 case $output in
8611 *.lo)
8612 test -n "$objs$old_deplibs" && \
8613 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
8614
8615 libobj=$output
8616 func_lo2o "$libobj"
8617 obj=$func_lo2o_result
8618 ;;
8619 *)
8620 libobj=
8621 obj="$output"
8622 ;;
8623 esac
8624
8625 # Delete the old objects.
8626 $opt_dry_run || $RM $obj $libobj
8627
8628 # Objects from convenience libraries. This assumes
8629 # single-version convenience libraries. Whenever we create
8630 # different ones for PIC/non-PIC, this we'll have to duplicate
8631 # the extraction.
8632 reload_conv_objs=
8633 gentop=
8634 # reload_cmds runs $LD directly, so let us get rid of
8635 # -Wl from whole_archive_flag_spec and hope we can get by with
8636 # turning comma into space..
8637 wl=
8638
8639 if test -n "$convenience"; then
8640 if test -n "$whole_archive_flag_spec"; then
8641 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
8642 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
8643 else
8644 gentop="$output_objdir/${obj}x"
8645 func_append generated " $gentop"
8646
8647 func_extract_archives $gentop $convenience
8648 reload_conv_objs="$reload_objs $func_extract_archives_result"
8649 fi
8650 fi
8651
8652 # If we're not building shared, we need to use non_pic_objs
8653 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
8654
8655 # Create the old-style object.
8656 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8657
8658 output="$obj"
8659 func_execute_cmds "$reload_cmds" 'exit $?'
8660
8661 # Exit if we aren't doing a library object file.
8662 if test -z "$libobj"; then
8663 if test -n "$gentop"; then
8664 func_show_eval '${RM}r "$gentop"'
8665 fi
8666
8667 exit $EXIT_SUCCESS
8668 fi
8669
8670 if test "$build_libtool_libs" != yes; then
8671 if test -n "$gentop"; then
8672 func_show_eval '${RM}r "$gentop"'
8673 fi
8674
8675 # Create an invalid libtool object if no PIC, so that we don't
8676 # accidentally link it into a program.
8677 # $show "echo timestamp > $libobj"
8678 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
8679 exit $EXIT_SUCCESS
8680 fi
8681
8682 if test -n "$pic_flag" || test "$pic_mode" != default; then
8683 # Only do commands if we really have different PIC objects.
8684 reload_objs="$libobjs $reload_conv_objs"
8685 output="$libobj"
8686 func_execute_cmds "$reload_cmds" 'exit $?'
8687 fi
8688
8689 if test -n "$gentop"; then
8690 func_show_eval '${RM}r "$gentop"'
8691 fi
8692
8693 exit $EXIT_SUCCESS
8694 ;;
8695
8696 prog)
8697 case $host in
8698 *cygwin*) func_stripname '' '.exe' "$output"
8699 output=$func_stripname_result.exe;;
8700 esac
8701 test -n "$vinfo" && \
8702 func_warning "\`-version-info' is ignored for programs"
8703
8704 test -n "$release" && \
8705 func_warning "\`-release' is ignored for programs"
8706
8707 test "$preload" = yes \
8708 && test "$dlopen_support" = unknown \
8709 && test "$dlopen_self" = unknown \
8710 && test "$dlopen_self_static" = unknown && \
8711 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
8712
8713 case $host in
8714 *-*-rhapsody* | *-*-darwin1.[012])
8715 # On Rhapsody replace the C library is the System framework
8716 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
8717 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
8718 ;;
8719 esac
8720
8721 case $host in
8722 *-*-darwin*)
8723 # Don't allow lazy linking, it breaks C++ global constructors
8724 # But is supposedly fixed on 10.4 or later (yay!).
8725 if test "$tagname" = CXX ; then
8726 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
8727 10.[0123])
8728 func_append compile_command " ${wl}-bind_at_load"
8729 func_append finalize_command " ${wl}-bind_at_load"
8730 ;;
8731 esac
8732 fi
8733 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
8734 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8735 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8736 ;;
8737 esac
8738
8739
8740 # move library search paths that coincide with paths to not yet
8741 # installed libraries to the beginning of the library search list
8742 new_libs=
8743 for path in $notinst_path; do
8744 case " $new_libs " in
8745 *" -L$path/$objdir "*) ;;
8746 *)
8747 case " $compile_deplibs " in
8748 *" -L$path/$objdir "*)
8749 func_append new_libs " -L$path/$objdir" ;;
8750 esac
8751 ;;
8752 esac
8753 done
8754 for deplib in $compile_deplibs; do
8755 case $deplib in
8756 -L*)
8757 case " $new_libs " in
8758 *" $deplib "*) ;;
8759 *) func_append new_libs " $deplib" ;;
8760 esac
8761 ;;
8762 *) func_append new_libs " $deplib" ;;
8763 esac
8764 done
8765 compile_deplibs="$new_libs"
8766
8767
8768 func_append compile_command " $compile_deplibs"
8769 func_append finalize_command " $finalize_deplibs"
8770
8771 if test -n "$rpath$xrpath"; then
8772 # If the user specified any rpath flags, then add them.
8773 for libdir in $rpath $xrpath; do
8774 # This is the magic to use -rpath.
8775 case "$finalize_rpath " in
8776 *" $libdir "*) ;;
8777 *) func_append finalize_rpath " $libdir" ;;
8778 esac
8779 done
8780 fi
8781
8782 # Now hardcode the library paths
8783 rpath=
8784 hardcode_libdirs=
8785 for libdir in $compile_rpath $finalize_rpath; do
8786 if test -n "$hardcode_libdir_flag_spec"; then
8787 if test -n "$hardcode_libdir_separator"; then
8788 if test -z "$hardcode_libdirs"; then
8789 hardcode_libdirs="$libdir"
8790 else
8791 # Just accumulate the unique libdirs.
8792 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8793 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8794 ;;
8795 *)
8796 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8797 ;;
8798 esac
8799 fi
8800 else
8801 eval flag=\"$hardcode_libdir_flag_spec\"
8802 func_append rpath " $flag"
8803 fi
8804 elif test -n "$runpath_var"; then
8805 case "$perm_rpath " in
8806 *" $libdir "*) ;;
8807 *) func_append perm_rpath " $libdir" ;;
8808 esac
8809 fi
8810 case $host in
8811 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
8812 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
8813 case :$dllsearchpath: in
8814 *":$libdir:"*) ;;
8815 ::) dllsearchpath=$libdir;;
8816 *) func_append dllsearchpath ":$libdir";;
8817 esac
8818 case :$dllsearchpath: in
8819 *":$testbindir:"*) ;;
8820 ::) dllsearchpath=$testbindir;;
8821 *) func_append dllsearchpath ":$testbindir";;
8822 esac
8823 ;;
8824 esac
8825 done
8826 # Substitute the hardcoded libdirs into the rpath.
8827 if test -n "$hardcode_libdir_separator" &&
8828 test -n "$hardcode_libdirs"; then
8829 libdir="$hardcode_libdirs"
8830 eval rpath=\" $hardcode_libdir_flag_spec\"
8831 fi
8832 compile_rpath="$rpath"
8833
8834 rpath=
8835 hardcode_libdirs=
8836 for libdir in $finalize_rpath; do
8837 if test -n "$hardcode_libdir_flag_spec"; then
8838 if test -n "$hardcode_libdir_separator"; then
8839 if test -z "$hardcode_libdirs"; then
8840 hardcode_libdirs="$libdir"
8841 else
8842 # Just accumulate the unique libdirs.
8843 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8844 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8845 ;;
8846 *)
8847 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
8848 ;;
8849 esac
8850 fi
8851 else
8852 eval flag=\"$hardcode_libdir_flag_spec\"
8853 func_append rpath " $flag"
8854 fi
8855 elif test -n "$runpath_var"; then
8856 case "$finalize_perm_rpath " in
8857 *" $libdir "*) ;;
8858 *) func_append finalize_perm_rpath " $libdir" ;;
8859 esac
8860 fi
8861 done
8862 # Substitute the hardcoded libdirs into the rpath.
8863 if test -n "$hardcode_libdir_separator" &&
8864 test -n "$hardcode_libdirs"; then
8865 libdir="$hardcode_libdirs"
8866 eval rpath=\" $hardcode_libdir_flag_spec\"
8867 fi
8868 finalize_rpath="$rpath"
8869
8870 if test -n "$libobjs" && test "$build_old_libs" = yes; then
8871 # Transform all the library objects into standard objects.
8872 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8873 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8874 fi
8875
8876 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
8877
8878 # template prelinking step
8879 if test -n "$prelink_cmds"; then
8880 func_execute_cmds "$prelink_cmds" 'exit $?'
8881 fi
8882
8883 wrappers_required=yes
8884 case $host in
8885 *cegcc* | *mingw32ce*)
8886 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8887 wrappers_required=no
8888 ;;
8889 *cygwin* | *mingw* )
8890 if test "$build_libtool_libs" != yes; then
8891 wrappers_required=no
8892 fi
8893 ;;
8894 *)
8895 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
8896 wrappers_required=no
8897 fi
8898 ;;
8899 esac
8900 if test "$wrappers_required" = no; then
8901 # Replace the output file specification.
8902 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8903 link_command="$compile_command$compile_rpath"
8904
8905 # We have no uninstalled library dependencies, so finalize right now.
8906 exit_status=0
8907 func_show_eval "$link_command" 'exit_status=$?'
8908
8909 if test -n "$postlink_cmds"; then
8910 func_to_tool_file "$output"
8911 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8912 func_execute_cmds "$postlink_cmds" 'exit $?'
8913 fi
8914
8915 # Delete the generated files.
8916 if test -f "$output_objdir/${outputname}S.${objext}"; then
8917 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
8918 fi
8919
8920 exit $exit_status
8921 fi
8922
8923 if test -n "$compile_shlibpath$finalize_shlibpath"; then
8924 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
8925 fi
8926 if test -n "$finalize_shlibpath"; then
8927 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
8928 fi
8929
8930 compile_var=
8931 finalize_var=
8932 if test -n "$runpath_var"; then
8933 if test -n "$perm_rpath"; then
8934 # We should set the runpath_var.
8935 rpath=
8936 for dir in $perm_rpath; do
8937 func_append rpath "$dir:"
8938 done
8939 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
8940 fi
8941 if test -n "$finalize_perm_rpath"; then
8942 # We should set the runpath_var.
8943 rpath=
8944 for dir in $finalize_perm_rpath; do
8945 func_append rpath "$dir:"
8946 done
8947 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
8948 fi
8949 fi
8950
8951 if test "$no_install" = yes; then
8952 # We don't need to create a wrapper script.
8953 link_command="$compile_var$compile_command$compile_rpath"
8954 # Replace the output file specification.
8955 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8956 # Delete the old output file.
8957 $opt_dry_run || $RM $output
8958 # Link the executable and exit
8959 func_show_eval "$link_command" 'exit $?'
8960
8961 if test -n "$postlink_cmds"; then
8962 func_to_tool_file "$output"
8963 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8964 func_execute_cmds "$postlink_cmds" 'exit $?'
8965 fi
8966
8967 exit $EXIT_SUCCESS
8968 fi
8969
8970 if test "$hardcode_action" = relink; then
8971 # Fast installation is not supported
8972 link_command="$compile_var$compile_command$compile_rpath"
8973 relink_command="$finalize_var$finalize_command$finalize_rpath"
8974
8975 func_warning "this platform does not like uninstalled shared libraries"
8976 func_warning "\`$output' will be relinked during installation"
8977 else
8978 if test "$fast_install" != no; then
8979 link_command="$finalize_var$compile_command$finalize_rpath"
8980 if test "$fast_install" = yes; then
8981 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
8982 else
8983 # fast_install is set to needless
8984 relink_command=
8985 fi
8986 else
8987 link_command="$compile_var$compile_command$compile_rpath"
8988 relink_command="$finalize_var$finalize_command$finalize_rpath"
8989 fi
8990 fi
8991
8992 # Replace the output file specification.
8993 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
8994
8995 # Delete the old output files.
8996 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
8997
8998 func_show_eval "$link_command" 'exit $?'
8999
9000 if test -n "$postlink_cmds"; then
9001 func_to_tool_file "$output_objdir/$outputname"
9002 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
9003 func_execute_cmds "$postlink_cmds" 'exit $?'
9004 fi
9005
9006 # Now create the wrapper script.
9007 func_verbose "creating $output"
9008
9009 # Quote the relink command for shipping.
9010 if test -n "$relink_command"; then
9011 # Preserve any variables that may affect compiler behavior
9012 for var in $variables_saved_for_relink; do
9013 if eval test -z \"\${$var+set}\"; then
9014 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
9015 elif eval var_value=\$$var; test -z "$var_value"; then
9016 relink_command="$var=; export $var; $relink_command"
9017 else
9018 func_quote_for_eval "$var_value"
9019 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
9020 fi
9021 done
9022 relink_command="(cd `pwd`; $relink_command)"
9023 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9024 fi
9025
9026 # Only actually do things if not in dry run mode.
9027 $opt_dry_run || {
9028 # win32 will think the script is a binary if it has
9029 # a .exe suffix, so we strip it off here.
9030 case $output in
9031 *.exe) func_stripname '' '.exe' "$output"
9032 output=$func_stripname_result ;;
9033 esac
9034 # test for cygwin because mv fails w/o .exe extensions
9035 case $host in
9036 *cygwin*)
9037 exeext=.exe
9038 func_stripname '' '.exe' "$outputname"
9039 outputname=$func_stripname_result ;;
9040 *) exeext= ;;
9041 esac
9042 case $host in
9043 *cygwin* | *mingw* )
9044 func_dirname_and_basename "$output" "" "."
9045 output_name=$func_basename_result
9046 output_path=$func_dirname_result
9047 cwrappersource="$output_path/$objdir/lt-$output_name.c"
9048 cwrapper="$output_path/$output_name.exe"
9049 $RM $cwrappersource $cwrapper
9050 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
9051
9052 func_emit_cwrapperexe_src > $cwrappersource
9053
9054 # The wrapper executable is built using the $host compiler,
9055 # because it contains $host paths and files. If cross-
9056 # compiling, it, like the target executable, must be
9057 # executed on the $host or under an emulation environment.
9058 $opt_dry_run || {
9059 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
9060 $STRIP $cwrapper
9061 }
9062
9063 # Now, create the wrapper script for func_source use:
9064 func_ltwrapper_scriptname $cwrapper
9065 $RM $func_ltwrapper_scriptname_result
9066 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
9067 $opt_dry_run || {
9068 # note: this script will not be executed, so do not chmod.
9069 if test "x$build" = "x$host" ; then
9070 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
9071 else
9072 func_emit_wrapper no > $func_ltwrapper_scriptname_result
9073 fi
9074 }
9075 ;;
9076 * )
9077 $RM $output
9078 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
9079
9080 func_emit_wrapper no > $output
9081 chmod +x $output
9082 ;;
9083 esac
9084 }
9085 exit $EXIT_SUCCESS
9086 ;;
9087 esac
9088
9089 # See if we need to build an old-fashioned archive.
9090 for oldlib in $oldlibs; do
9091
9092 if test "$build_libtool_libs" = convenience; then
9093 oldobjs="$libobjs_save $symfileobj"
9094 addlibs="$convenience"
9095 build_libtool_libs=no
9096 else
9097 if test "$build_libtool_libs" = module; then
9098 oldobjs="$libobjs_save"
9099 build_libtool_libs=no
9100 else
9101 oldobjs="$old_deplibs $non_pic_objects"
9102 if test "$preload" = yes && test -f "$symfileobj"; then
9103 func_append oldobjs " $symfileobj"
9104 fi
9105 fi
9106 addlibs="$old_convenience"
9107 fi
9108
9109 if test -n "$addlibs"; then
9110 gentop="$output_objdir/${outputname}x"
9111 func_append generated " $gentop"
9112
9113 func_extract_archives $gentop $addlibs
9114 func_append oldobjs " $func_extract_archives_result"
9115 fi
9116
9117 # Do each command in the archive commands.
9118 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
9119 cmds=$old_archive_from_new_cmds
9120 else
9121
9122 # Add any objects from preloaded convenience libraries
9123 if test -n "$dlprefiles"; then
9124 gentop="$output_objdir/${outputname}x"
9125 func_append generated " $gentop"
9126
9127 func_extract_archives $gentop $dlprefiles
9128 func_append oldobjs " $func_extract_archives_result"
9129 fi
9130
9131 # POSIX demands no paths to be encoded in archives. We have
9132 # to avoid creating archives with duplicate basenames if we
9133 # might have to extract them afterwards, e.g., when creating a
9134 # static archive out of a convenience library, or when linking
9135 # the entirety of a libtool archive into another (currently
9136 # not supported by libtool).
9137 if (for obj in $oldobjs
9138 do
9139 func_basename "$obj"
9140 $ECHO "$func_basename_result"
9141 done | sort | sort -uc >/dev/null 2>&1); then
9142 :
9143 else
9144 echo "copying selected object files to avoid basename conflicts..."
9145 gentop="$output_objdir/${outputname}x"
9146 func_append generated " $gentop"
9147 func_mkdir_p "$gentop"
9148 save_oldobjs=$oldobjs
9149 oldobjs=
9150 counter=1
9151 for obj in $save_oldobjs
9152 do
9153 func_basename "$obj"
9154 objbase="$func_basename_result"
9155 case " $oldobjs " in
9156 " ") oldobjs=$obj ;;
9157 *[\ /]"$objbase "*)
9158 while :; do
9159 # Make sure we don't pick an alternate name that also
9160 # overlaps.
9161 newobj=lt$counter-$objbase
9162 func_arith $counter + 1
9163 counter=$func_arith_result
9164 case " $oldobjs " in
9165 *[\ /]"$newobj "*) ;;
9166 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
9167 esac
9168 done
9169 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
9170 func_append oldobjs " $gentop/$newobj"
9171 ;;
9172 *) func_append oldobjs " $obj" ;;
9173 esac
9174 done
9175 fi
9176 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
9177 tool_oldlib=$func_to_tool_file_result
9178 eval cmds=\"$old_archive_cmds\"
9179
9180 func_len " $cmds"
9181 len=$func_len_result
9182 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9183 cmds=$old_archive_cmds
9184 elif test -n "$archiver_list_spec"; then
9185 func_verbose "using command file archive linking..."
9186 for obj in $oldobjs
9187 do
9188 func_to_tool_file "$obj"
9189 $ECHO "$func_to_tool_file_result"
9190 done > $output_objdir/$libname.libcmd
9191 func_to_tool_file "$output_objdir/$libname.libcmd"
9192 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
9193 cmds=$old_archive_cmds
9194 else
9195 # the command line is too long to link in one step, link in parts
9196 func_verbose "using piecewise archive linking..."
9197 save_RANLIB=$RANLIB
9198 RANLIB=:
9199 objlist=
9200 concat_cmds=
9201 save_oldobjs=$oldobjs
9202 oldobjs=
9203 # Is there a better way of finding the last object in the list?
9204 for obj in $save_oldobjs
9205 do
9206 last_oldobj=$obj
9207 done
9208 eval test_cmds=\"$old_archive_cmds\"
9209 func_len " $test_cmds"
9210 len0=$func_len_result
9211 len=$len0
9212 for obj in $save_oldobjs
9213 do
9214 func_len " $obj"
9215 func_arith $len + $func_len_result
9216 len=$func_arith_result
9217 func_append objlist " $obj"
9218 if test "$len" -lt "$max_cmd_len"; then
9219 :
9220 else
9221 # the above command should be used before it gets too long
9222 oldobjs=$objlist
9223 if test "$obj" = "$last_oldobj" ; then
9224 RANLIB=$save_RANLIB
9225 fi
9226 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9227 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
9228 objlist=
9229 len=$len0
9230 fi
9231 done
9232 RANLIB=$save_RANLIB
9233 oldobjs=$objlist
9234 if test "X$oldobjs" = "X" ; then
9235 eval cmds=\"\$concat_cmds\"
9236 else
9237 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
9238 fi
9239 fi
9240 fi
9241 func_execute_cmds "$cmds" 'exit $?'
9242 done
9243
9244 test -n "$generated" && \
9245 func_show_eval "${RM}r$generated"
9246
9247 # Now create the libtool archive.
9248 case $output in
9249 *.la)
9250 old_library=
9251 test "$build_old_libs" = yes && old_library="$libname.$libext"
9252 func_verbose "creating $output"
9253
9254 # Preserve any variables that may affect compiler behavior
9255 for var in $variables_saved_for_relink; do
9256 if eval test -z \"\${$var+set}\"; then
9257 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
9258 elif eval var_value=\$$var; test -z "$var_value"; then
9259 relink_command="$var=; export $var; $relink_command"
9260 else
9261 func_quote_for_eval "$var_value"
9262 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
9263 fi
9264 done
9265 # Quote the link command for shipping.
9266 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
9267 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9268 if test "$hardcode_automatic" = yes ; then
9269 relink_command=
9270 fi
9271
9272 # Only create the output if not a dry run.
9273 $opt_dry_run || {
9274 for installed in no yes; do
9275 if test "$installed" = yes; then
9276 if test -z "$install_libdir"; then
9277 break
9278 fi
9279 output="$output_objdir/$outputname"i
9280 # Replace all uninstalled libtool libraries with the installed ones
9281 newdependency_libs=
9282 for deplib in $dependency_libs; do
9283 case $deplib in
9284 *.la)
9285 func_basename "$deplib"
9286 name="$func_basename_result"
9287 func_resolve_sysroot "$deplib"
9288 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
9289 test -z "$libdir" && \
9290 func_fatal_error "\`$deplib' is not a valid libtool archive"
9291 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
9292 ;;
9293 -L*)
9294 func_stripname -L '' "$deplib"
9295 func_replace_sysroot "$func_stripname_result"
9296 func_append newdependency_libs " -L$func_replace_sysroot_result"
9297 ;;
9298 -R*)
9299 func_stripname -R '' "$deplib"
9300 func_replace_sysroot "$func_stripname_result"
9301 func_append newdependency_libs " -R$func_replace_sysroot_result"
9302 ;;
9303 *) func_append newdependency_libs " $deplib" ;;
9304 esac
9305 done
9306 dependency_libs="$newdependency_libs"
9307 newdlfiles=
9308
9309 for lib in $dlfiles; do
9310 case $lib in
9311 *.la)
9312 func_basename "$lib"
9313 name="$func_basename_result"
9314 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9315 test -z "$libdir" && \
9316 func_fatal_error "\`$lib' is not a valid libtool archive"
9317 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
9318 ;;
9319 *) func_append newdlfiles " $lib" ;;
9320 esac
9321 done
9322 dlfiles="$newdlfiles"
9323 newdlprefiles=
9324 for lib in $dlprefiles; do
9325 case $lib in
9326 *.la)
9327 # Only pass preopened files to the pseudo-archive (for
9328 # eventual linking with the app. that links it) if we
9329 # didn't already link the preopened objects directly into
9330 # the library:
9331 func_basename "$lib"
9332 name="$func_basename_result"
9333 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9334 test -z "$libdir" && \
9335 func_fatal_error "\`$lib' is not a valid libtool archive"
9336 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
9337 ;;
9338 esac
9339 done
9340 dlprefiles="$newdlprefiles"
9341 else
9342 newdlfiles=
9343 for lib in $dlfiles; do
9344 case $lib in
9345 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9346 *) abs=`pwd`"/$lib" ;;
9347 esac
9348 func_append newdlfiles " $abs"
9349 done
9350 dlfiles="$newdlfiles"
9351 newdlprefiles=
9352 for lib in $dlprefiles; do
9353 case $lib in
9354 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9355 *) abs=`pwd`"/$lib" ;;
9356 esac
9357 func_append newdlprefiles " $abs"
9358 done
9359 dlprefiles="$newdlprefiles"
9360 fi
9361 $RM $output
9362 # place dlname in correct position for cygwin
9363 # In fact, it would be nice if we could use this code for all target
9364 # systems that can't hard-code library paths into their executables
9365 # and that have no shared library path variable independent of PATH,
9366 # but it turns out we can't easily determine that from inspecting
9367 # libtool variables, so we have to hard-code the OSs to which it
9368 # applies here; at the moment, that means platforms that use the PE
9369 # object format with DLL files. See the long comment at the top of
9370 # tests/bindir.at for full details.
9371 tdlname=$dlname
9372 case $host,$output,$installed,$module,$dlname in
9373 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
9374 # If a -bindir argument was supplied, place the dll there.
9375 if test "x$bindir" != x ;
9376 then
9377 func_relative_path "$install_libdir" "$bindir"
9378 tdlname=$func_relative_path_result$dlname
9379 else
9380 # Otherwise fall back on heuristic.
9381 tdlname=../bin/$dlname
9382 fi
9383 ;;
9384 esac
9385 $ECHO > $output "\
9386 # $outputname - a libtool library file
9387 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
9388 #
9389 # Please DO NOT delete this file!
9390 # It is necessary for linking the library.
9391
9392 # The name that we can dlopen(3).
9393 dlname='$tdlname'
9394
9395 # Names of this library.
9396 library_names='$library_names'
9397
9398 # The name of the static archive.
9399 old_library='$old_library'
9400
9401 # Linker flags that can not go in dependency_libs.
9402 inherited_linker_flags='$new_inherited_linker_flags'
9403
9404 # Libraries that this one depends upon.
9405 dependency_libs='$dependency_libs'
9406
9407 # Names of additional weak libraries provided by this library
9408 weak_library_names='$weak_libs'
9409
9410 # Version information for $libname.
9411 current=$current
9412 age=$age
9413 revision=$revision
9414
9415 # Is this an already installed library?
9416 installed=$installed
9417
9418 # Should we warn about portability when linking against -modules?
9419 shouldnotlink=$module
9420
9421 # Files to dlopen/dlpreopen
9422 dlopen='$dlfiles'
9423 dlpreopen='$dlprefiles'
9424
9425 # Directory that this library needs to be installed in:
9426 libdir='$install_libdir'"
9427 if test "$installed" = no && test "$need_relink" = yes; then
9428 $ECHO >> $output "\
9429 relink_command=\"$relink_command\""
9430 fi
9431 done
9432 }
9433
9434 # Do a symbolic link so that the libtool archive can be found in
9435 # LD_LIBRARY_PATH before the program is installed.
9436 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
9437 ;;
9438 esac
9439 exit $EXIT_SUCCESS
9440 }
9441
9442 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
9443 func_mode_link ${1+"$@"}
9444
9445
9446 # func_mode_uninstall arg...
9447 func_mode_uninstall ()
9448 {
9449 $opt_debug
9450 RM="$nonopt"
9451 files=
9452 rmforce=
9453 exit_status=0
9454
9455 # This variable tells wrapper scripts just to set variables rather
9456 # than running their programs.
9457 libtool_install_magic="$magic"
9458
9459 for arg
9460 do
9461 case $arg in
9462 -f) func_append RM " $arg"; rmforce=yes ;;
9463 -*) func_append RM " $arg" ;;
9464 *) func_append files " $arg" ;;
9465 esac
9466 done
9467
9468 test -z "$RM" && \
9469 func_fatal_help "you must specify an RM program"
9470
9471 rmdirs=
9472
9473 for file in $files; do
9474 func_dirname "$file" "" "."
9475 dir="$func_dirname_result"
9476 if test "X$dir" = X.; then
9477 odir="$objdir"
9478 else
9479 odir="$dir/$objdir"
9480 fi
9481 func_basename "$file"
9482 name="$func_basename_result"
9483 test "$opt_mode" = uninstall && odir="$dir"
9484
9485 # Remember odir for removal later, being careful to avoid duplicates
9486 if test "$opt_mode" = clean; then
9487 case " $rmdirs " in
9488 *" $odir "*) ;;
9489 *) func_append rmdirs " $odir" ;;
9490 esac
9491 fi
9492
9493 # Don't error if the file doesn't exist and rm -f was used.
9494 if { test -L "$file"; } >/dev/null 2>&1 ||
9495 { test -h "$file"; } >/dev/null 2>&1 ||
9496 test -f "$file"; then
9497 :
9498 elif test -d "$file"; then
9499 exit_status=1
9500 continue
9501 elif test "$rmforce" = yes; then
9502 continue
9503 fi
9504
9505 rmfiles="$file"
9506
9507 case $name in
9508 *.la)
9509 # Possibly a libtool archive, so verify it.
9510 if func_lalib_p "$file"; then
9511 func_source $dir/$name
9512
9513 # Delete the libtool libraries and symlinks.
9514 for n in $library_names; do
9515 func_append rmfiles " $odir/$n"
9516 done
9517 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
9518
9519 case "$opt_mode" in
9520 clean)
9521 case " $library_names " in
9522 *" $dlname "*) ;;
9523 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
9524 esac
9525 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
9526 ;;
9527 uninstall)
9528 if test -n "$library_names"; then
9529 # Do each command in the postuninstall commands.
9530 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
9531 fi
9532
9533 if test -n "$old_library"; then
9534 # Do each command in the old_postuninstall commands.
9535 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
9536 fi
9537 # FIXME: should reinstall the best remaining shared library.
9538 ;;
9539 esac
9540 fi
9541 ;;
9542
9543 *.lo)
9544 # Possibly a libtool object, so verify it.
9545 if func_lalib_p "$file"; then
9546
9547 # Read the .lo file
9548 func_source $dir/$name
9549
9550 # Add PIC object to the list of files to remove.
9551 if test -n "$pic_object" &&
9552 test "$pic_object" != none; then
9553 func_append rmfiles " $dir/$pic_object"
9554 fi
9555
9556 # Add non-PIC object to the list of files to remove.
9557 if test -n "$non_pic_object" &&
9558 test "$non_pic_object" != none; then
9559 func_append rmfiles " $dir/$non_pic_object"
9560 fi
9561 fi
9562 ;;
9563
9564 *)
9565 if test "$opt_mode" = clean ; then
9566 noexename=$name
9567 case $file in
9568 *.exe)
9569 func_stripname '' '.exe' "$file"
9570 file=$func_stripname_result
9571 func_stripname '' '.exe' "$name"
9572 noexename=$func_stripname_result
9573 # $file with .exe has already been added to rmfiles,
9574 # add $file without .exe
9575 func_append rmfiles " $file"
9576 ;;
9577 esac
9578 # Do a test to see if this is a libtool program.
9579 if func_ltwrapper_p "$file"; then
9580 if func_ltwrapper_executable_p "$file"; then
9581 func_ltwrapper_scriptname "$file"
9582 relink_command=
9583 func_source $func_ltwrapper_scriptname_result
9584 func_append rmfiles " $func_ltwrapper_scriptname_result"
9585 else
9586 relink_command=
9587 func_source $dir/$noexename
9588 fi
9589
9590 # note $name still contains .exe if it was in $file originally
9591 # as does the version of $file that was added into $rmfiles
9592 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
9593 if test "$fast_install" = yes && test -n "$relink_command"; then
9594 func_append rmfiles " $odir/lt-$name"
9595 fi
9596 if test "X$noexename" != "X$name" ; then
9597 func_append rmfiles " $odir/lt-${noexename}.c"
9598 fi
9599 fi
9600 fi
9601 ;;
9602 esac
9603 func_show_eval "$RM $rmfiles" 'exit_status=1'
9604 done
9605
9606 # Try to remove the ${objdir}s in the directories where we deleted files
9607 for dir in $rmdirs; do
9608 if test -d "$dir"; then
9609 func_show_eval "rmdir $dir >/dev/null 2>&1"
9610 fi
9611 done
9612
9613 exit $exit_status
9614 }
9615
9616 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
9617 func_mode_uninstall ${1+"$@"}
9618
9619 test -z "$opt_mode" && {
9620 help="$generic_help"
9621 func_fatal_help "you must specify a MODE"
9622 }
9623
9624 test -z "$exec_cmd" && \
9625 func_fatal_help "invalid operation mode \`$opt_mode'"
9626
9627 if test -n "$exec_cmd"; then
9628 eval exec "$exec_cmd"
9629 exit $EXIT_FAILURE
9630 fi
9631
9632 exit $exit_status
9633
9634
9635 # The TAGs below are defined such that we never get into a situation
9636 # in which we disable both kinds of libraries. Given conflicting
9637 # choices, we go for a static library, that is the most portable,
9638 # since we can't tell whether shared libraries were disabled because
9639 # the user asked for that or because the platform doesn't support
9640 # them. This is particularly important on AIX, because we don't
9641 # support having both static and shared libraries enabled at the same
9642 # time on that platform, so we default to a shared-only configuration.
9643 # If a disable-shared tag is given, we'll fallback to a static-only
9644 # configuration. But we'll never go from static-only to shared-only.
9645
9646 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
9647 build_libtool_libs=no
9648 build_old_libs=yes
9649 # ### END LIBTOOL TAG CONFIG: disable-shared
9650
9651 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
9652 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
9653 # ### END LIBTOOL TAG CONFIG: disable-static
9654
9655 # Local Variables:
9656 # mode:shell-script
9657 # sh-indentation:2
9658 # End:
9659 # vi:sw=2
9660
0 ## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
1 ## Copyright (C) 2001 Eazel, Inc.
2 ## Author: Maciej Stachowiak <mjs@noisehavoc.org>
3 ## Kenneth Christiansen <kenneth@gnu.org>
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
23
24 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
25 # serial 42 IT_PROG_INTLTOOL
26 AC_DEFUN([IT_PROG_INTLTOOL], [
27 AC_PREREQ([2.50])dnl
28 AC_REQUIRE([AM_NLS])dnl
29
30 case "$am__api_version" in
31 1.[01234])
32 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
33 ;;
34 *)
35 ;;
36 esac
37
38 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
39 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
40 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
41 if test -n "$1"; then
42 AC_MSG_CHECKING([for intltool >= $1])
43 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
44 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
45 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
46 fi
47
48 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
49 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
50 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
51 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
52 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
53 fi
54
55 if test -z "$AM_DEFAULT_VERBOSITY"; then
56 AM_DEFAULT_VERBOSITY=1
57 fi
58 AC_SUBST([AM_DEFAULT_VERBOSITY])
59
60 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
61 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
62 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
63 AC_SUBST(INTLTOOL_V_MERGE)
64 AC_SUBST(INTLTOOL__v_MERGE_)
65 AC_SUBST(INTLTOOL__v_MERGE_0)
66
67 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
68 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
69 intltool__v_merge_options_0='-q'
70 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
71 AC_SUBST(intltool__v_merge_options_)
72 AC_SUBST(intltool__v_merge_options_0)
73
74 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
75 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
76 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
77 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
78 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
79 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
80 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
81 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
82 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
83 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
84 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
85 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
86 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
87 else
88 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
89 fi
90 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
91 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
92 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
93 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
94 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
95 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
96 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
97
98 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
99 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
100 _IT_SUBST(INTLTOOL_KEYS_RULE)
101 _IT_SUBST(INTLTOOL_PROP_RULE)
102 _IT_SUBST(INTLTOOL_OAF_RULE)
103 _IT_SUBST(INTLTOOL_PONG_RULE)
104 _IT_SUBST(INTLTOOL_SERVER_RULE)
105 _IT_SUBST(INTLTOOL_SHEET_RULE)
106 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
107 _IT_SUBST(INTLTOOL_UI_RULE)
108 _IT_SUBST(INTLTOOL_XAM_RULE)
109 _IT_SUBST(INTLTOOL_KBD_RULE)
110 _IT_SUBST(INTLTOOL_XML_RULE)
111 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
112 _IT_SUBST(INTLTOOL_CAVES_RULE)
113 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
114 _IT_SUBST(INTLTOOL_THEME_RULE)
115 _IT_SUBST(INTLTOOL_SERVICE_RULE)
116 _IT_SUBST(INTLTOOL_POLICY_RULE)
117
118 # Check the gettext tools to make sure they are GNU
119 AC_PATH_PROG(XGETTEXT, xgettext)
120 AC_PATH_PROG(MSGMERGE, msgmerge)
121 AC_PATH_PROG(MSGFMT, msgfmt)
122 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
123 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
124 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
125 fi
126 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
127 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
128 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
129 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
130 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
131 fi
132
133 AC_PATH_PROG(INTLTOOL_PERL, perl)
134 if test -z "$INTLTOOL_PERL"; then
135 AC_MSG_ERROR([perl not found])
136 fi
137 AC_MSG_CHECKING([for perl >= 5.8.1])
138 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
139 if test $? -ne 0; then
140 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
141 else
142 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
143 AC_MSG_RESULT([$IT_PERL_VERSION])
144 fi
145 if test "x$2" != "xno-xml"; then
146 AC_MSG_CHECKING([for XML::Parser])
147 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
148 AC_MSG_RESULT([ok])
149 else
150 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
151 fi
152 fi
153
154 # Substitute ALL_LINGUAS so we can use it in po/Makefile
155 AC_SUBST(ALL_LINGUAS)
156
157 # Set DATADIRNAME correctly if it is not set yet
158 # (copied from glib-gettext.m4)
159 if test -z "$DATADIRNAME"; then
160 AC_LINK_IFELSE(
161 [AC_LANG_PROGRAM([[]],
162 [[extern int _nl_msg_cat_cntr;
163 return _nl_msg_cat_cntr]])],
164 [DATADIRNAME=share],
165 [case $host in
166 *-*-solaris*)
167 dnl On Solaris, if bind_textdomain_codeset is in libc,
168 dnl GNU format message catalog is always supported,
169 dnl since both are added to the libc all together.
170 dnl Hence, we'd like to go with DATADIRNAME=share
171 dnl in this case.
172 AC_CHECK_FUNC(bind_textdomain_codeset,
173 [DATADIRNAME=share], [DATADIRNAME=lib])
174 ;;
175 *)
176 [DATADIRNAME=lib]
177 ;;
178 esac])
179 fi
180 AC_SUBST(DATADIRNAME)
181
182 IT_PO_SUBDIR([po])
183
184 ])
185
186
187 # IT_PO_SUBDIR(DIRNAME)
188 # ---------------------
189 # All po subdirs have to be declared with this macro; the subdir "po" is
190 # declared by IT_PROG_INTLTOOL.
191 #
192 AC_DEFUN([IT_PO_SUBDIR],
193 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
194 dnl
195 dnl The following CONFIG_COMMANDS should be executed at the very end
196 dnl of config.status.
197 AC_CONFIG_COMMANDS_PRE([
198 AC_CONFIG_COMMANDS([$1/stamp-it], [
199 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
200 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
201 fi
202 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
203 >"$1/stamp-it.tmp"
204 [sed '/^#/d
205 s/^[[].*] *//
206 /^[ ]*$/d
207 '"s|^| $ac_top_srcdir/|" \
208 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
209 ]
210 [sed '/^POTFILES =/,/[^\\]$/ {
211 /^POTFILES =/!d
212 r $1/POTFILES
213 }
214 ' "$1/Makefile.in" >"$1/Makefile"]
215 rm -f "$1/Makefile.tmp"
216 mv "$1/stamp-it.tmp" "$1/stamp-it"
217 ])
218 ])dnl
219 ])
220
221 # _IT_SUBST(VARIABLE)
222 # -------------------
223 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
224 #
225 AC_DEFUN([_IT_SUBST],
226 [
227 AC_SUBST([$1])
228 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
229 ]
230 )
231
232 # deprecated macros
233 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
234 # A hint is needed for aclocal from Automake <= 1.9.4:
235 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
236
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
4 # Foundation, Inc.
5 # Written by Gordon Matzigkeit, 1996
6 #
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
10
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14 # Foundation, Inc.
15 # Written by Gordon Matzigkeit, 1996
16 #
17 # This file is part of GNU Libtool.
18 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 # GNU General Public License for more details.
33 #
34 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
39 ])
40
41 # serial 57 LT_INIT
42
43
44 # LT_PREREQ(VERSION)
45 # ------------------
46 # Complain and exit if this libtool version is less that VERSION.
47 m4_defun([LT_PREREQ],
48 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_default([$3],
50 [m4_fatal([Libtool version $1 or higher is required],
51 63)])],
52 [$2])])
53
54
55 # _LT_CHECK_BUILDDIR
56 # ------------------
57 # Complain if the absolute build directory name contains unusual characters
58 m4_defun([_LT_CHECK_BUILDDIR],
59 [case `pwd` in
60 *\ * | *\ *)
61 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
62 esac
63 ])
64
65
66 # LT_INIT([OPTIONS])
67 # ------------------
68 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
70 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
71 AC_BEFORE([$0], [LT_LANG])dnl
72 AC_BEFORE([$0], [LT_OUTPUT])dnl
73 AC_BEFORE([$0], [LTDL_INIT])dnl
74 m4_require([_LT_CHECK_BUILDDIR])dnl
75
76 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
77 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
78 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
79 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
80 dnl unless we require an AC_DEFUNed macro:
81 AC_REQUIRE([LTOPTIONS_VERSION])dnl
82 AC_REQUIRE([LTSUGAR_VERSION])dnl
83 AC_REQUIRE([LTVERSION_VERSION])dnl
84 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
85 m4_require([_LT_PROG_LTMAIN])dnl
86
87 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
88
89 dnl Parse OPTIONS
90 _LT_SET_OPTIONS([$0], [$1])
91
92 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
94
95 # Always use our own libtool.
96 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
97 AC_SUBST(LIBTOOL)dnl
98
99 _LT_SETUP
100
101 # Only expand once:
102 m4_define([LT_INIT])
103 ])# LT_INIT
104
105 # Old names:
106 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
107 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
108 dnl aclocal-1.4 backwards compatibility:
109 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
110 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111
112
113 # _LT_CC_BASENAME(CC)
114 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
116 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
126 ])
127
128
129 # _LT_FILEUTILS_DEFAULTS
130 # ----------------------
131 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
133 m4_defun([_LT_FILEUTILS_DEFAULTS],
134 [: ${CP="cp -f"}
135 : ${MV="mv -f"}
136 : ${RM="rm -f"}
137 ])# _LT_FILEUTILS_DEFAULTS
138
139
140 # _LT_SETUP
141 # ---------
142 m4_defun([_LT_SETUP],
143 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
144 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
145 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
146 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
147
148 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
149 dnl
150 _LT_DECL([], [host_alias], [0], [The host system])dnl
151 _LT_DECL([], [host], [0])dnl
152 _LT_DECL([], [host_os], [0])dnl
153 dnl
154 _LT_DECL([], [build_alias], [0], [The build system])dnl
155 _LT_DECL([], [build], [0])dnl
156 _LT_DECL([], [build_os], [0])dnl
157 dnl
158 AC_REQUIRE([AC_PROG_CC])dnl
159 AC_REQUIRE([LT_PATH_LD])dnl
160 AC_REQUIRE([LT_PATH_NM])dnl
161 dnl
162 AC_REQUIRE([AC_PROG_LN_S])dnl
163 test -z "$LN_S" && LN_S="ln -s"
164 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
165 dnl
166 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
167 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
168 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
169 dnl
170 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
171 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
172 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
173 m4_require([_LT_CMD_RELOAD])dnl
174 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
175 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
176 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
177 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
178 m4_require([_LT_WITH_SYSROOT])dnl
179
180 _LT_CONFIG_LIBTOOL_INIT([
181 # See if we are running on zsh, and set the options which allow our
182 # commands through without removal of \ escapes INIT.
183 if test -n "\${ZSH_VERSION+set}" ; then
184 setopt NO_GLOB_SUBST
185 fi
186 ])
187 if test -n "${ZSH_VERSION+set}" ; then
188 setopt NO_GLOB_SUBST
189 fi
190
191 _LT_CHECK_OBJDIR
192
193 m4_require([_LT_TAG_COMPILER])dnl
194
195 case $host_os in
196 aix3*)
197 # AIX sometimes has problems with the GCC collect2 program. For some
198 # reason, if we set the COLLECT_NAMES environment variable, the problems
199 # vanish in a puff of smoke.
200 if test "X${COLLECT_NAMES+set}" != Xset; then
201 COLLECT_NAMES=
202 export COLLECT_NAMES
203 fi
204 ;;
205 esac
206
207 # Global variables:
208 ofile=libtool
209 can_build_shared=yes
210
211 # All known linkers require a `.a' archive for static linking (except MSVC,
212 # which needs '.lib').
213 libext=a
214
215 with_gnu_ld="$lt_cv_prog_gnu_ld"
216
217 old_CC="$CC"
218 old_CFLAGS="$CFLAGS"
219
220 # Set sane defaults for various variables
221 test -z "$CC" && CC=cc
222 test -z "$LTCC" && LTCC=$CC
223 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
224 test -z "$LD" && LD=ld
225 test -z "$ac_objext" && ac_objext=o
226
227 _LT_CC_BASENAME([$compiler])
228
229 # Only perform the check for file, if the check method requires it
230 test -z "$MAGIC_CMD" && MAGIC_CMD=file
231 case $deplibs_check_method in
232 file_magic*)
233 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
234 _LT_PATH_MAGIC
235 fi
236 ;;
237 esac
238
239 # Use C for the default configuration in the libtool script
240 LT_SUPPORTED_TAG([CC])
241 _LT_LANG_C_CONFIG
242 _LT_LANG_DEFAULT_CONFIG
243 _LT_CONFIG_COMMANDS
244 ])# _LT_SETUP
245
246
247 # _LT_PREPARE_SED_QUOTE_VARS
248 # --------------------------
249 # Define a few sed substitution that help us do robust quoting.
250 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
251 [# Backslashify metacharacters that are still active within
252 # double-quoted strings.
253 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
254
255 # Same as above, but do not quote variable references.
256 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
257
258 # Sed substitution to delay expansion of an escaped shell variable in a
259 # double_quote_subst'ed string.
260 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
261
262 # Sed substitution to delay expansion of an escaped single quote.
263 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
264
265 # Sed substitution to avoid accidental globbing in evaled expressions
266 no_glob_subst='s/\*/\\\*/g'
267 ])
268
269 # _LT_PROG_LTMAIN
270 # ---------------
271 # Note that this code is called both from `configure', and `config.status'
272 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
273 # `config.status' has no value for ac_aux_dir unless we are using Automake,
274 # so we pass a copy along to make sure it has a sensible value anyway.
275 m4_defun([_LT_PROG_LTMAIN],
276 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
277 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
278 ltmain="$ac_aux_dir/ltmain.sh"
279 ])# _LT_PROG_LTMAIN
280
281
282 ## ------------------------------------- ##
283 ## Accumulate code for creating libtool. ##
284 ## ------------------------------------- ##
285
286 # So that we can recreate a full libtool script including additional
287 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
288 # in macros and then make a single call at the end using the `libtool'
289 # label.
290
291
292 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
293 # ----------------------------------------
294 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
295 m4_define([_LT_CONFIG_LIBTOOL_INIT],
296 [m4_ifval([$1],
297 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
298 [$1
299 ])])])
300
301 # Initialize.
302 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
303
304
305 # _LT_CONFIG_LIBTOOL([COMMANDS])
306 # ------------------------------
307 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308 m4_define([_LT_CONFIG_LIBTOOL],
309 [m4_ifval([$1],
310 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
311 [$1
312 ])])])
313
314 # Initialize.
315 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
316
317
318 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
319 # -----------------------------------------------------
320 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
321 [_LT_CONFIG_LIBTOOL([$1])
322 _LT_CONFIG_LIBTOOL_INIT([$2])
323 ])
324
325
326 # _LT_FORMAT_COMMENT([COMMENT])
327 # -----------------------------
328 # Add leading comment marks to the start of each line, and a trailing
329 # full-stop to the whole comment if one is not present already.
330 m4_define([_LT_FORMAT_COMMENT],
331 [m4_ifval([$1], [
332 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
333 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
334 )])
335
336
337
338 ## ------------------------ ##
339 ## FIXME: Eliminate VARNAME ##
340 ## ------------------------ ##
341
342
343 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
344 # -------------------------------------------------------------------
345 # CONFIGNAME is the name given to the value in the libtool script.
346 # VARNAME is the (base) name used in the configure script.
347 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
348 # VARNAME. Any other value will be used directly.
349 m4_define([_LT_DECL],
350 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
351 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
352 [m4_ifval([$1], [$1], [$2])])
353 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
354 m4_ifval([$4],
355 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
356 lt_dict_add_subkey([lt_decl_dict], [$2],
357 [tagged?], [m4_ifval([$5], [yes], [no])])])
358 ])
359
360
361 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
362 # --------------------------------------------------------
363 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
364
365
366 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
367 # ------------------------------------------------
368 m4_define([lt_decl_tag_varnames],
369 [_lt_decl_filter([tagged?], [yes], $@)])
370
371
372 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
373 # ---------------------------------------------------------
374 m4_define([_lt_decl_filter],
375 [m4_case([$#],
376 [0], [m4_fatal([$0: too few arguments: $#])],
377 [1], [m4_fatal([$0: too few arguments: $#: $1])],
378 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
379 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
380 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
381 ])
382
383
384 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
385 # --------------------------------------------------
386 m4_define([lt_decl_quote_varnames],
387 [_lt_decl_filter([value], [1], $@)])
388
389
390 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
391 # ---------------------------------------------------
392 m4_define([lt_decl_dquote_varnames],
393 [_lt_decl_filter([value], [2], $@)])
394
395
396 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
397 # ---------------------------------------------------
398 m4_define([lt_decl_varnames_tagged],
399 [m4_assert([$# <= 2])dnl
400 _$0(m4_quote(m4_default([$1], [[, ]])),
401 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
402 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
403 m4_define([_lt_decl_varnames_tagged],
404 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
405
406
407 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
408 # ------------------------------------------------
409 m4_define([lt_decl_all_varnames],
410 [_$0(m4_quote(m4_default([$1], [[, ]])),
411 m4_if([$2], [],
412 m4_quote(lt_decl_varnames),
413 m4_quote(m4_shift($@))))[]dnl
414 ])
415 m4_define([_lt_decl_all_varnames],
416 [lt_join($@, lt_decl_varnames_tagged([$1],
417 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
418 ])
419
420
421 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
422 # ------------------------------------
423 # Quote a variable value, and forward it to `config.status' so that its
424 # declaration there will have the same value as in `configure'. VARNAME
425 # must have a single quote delimited value for this to work.
426 m4_define([_LT_CONFIG_STATUS_DECLARE],
427 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
428
429
430 # _LT_CONFIG_STATUS_DECLARATIONS
431 # ------------------------------
432 # We delimit libtool config variables with single quotes, so when
433 # we write them to config.status, we have to be sure to quote all
434 # embedded single quotes properly. In configure, this macro expands
435 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
436 #
437 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
438 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
439 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
440 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
441
442
443 # _LT_LIBTOOL_TAGS
444 # ----------------
445 # Output comment and list of tags supported by the script
446 m4_defun([_LT_LIBTOOL_TAGS],
447 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
448 available_tags="_LT_TAGS"dnl
449 ])
450
451
452 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
453 # -----------------------------------
454 # Extract the dictionary values for VARNAME (optionally with TAG) and
455 # expand to a commented shell variable setting:
456 #
457 # # Some comment about what VAR is for.
458 # visible_name=$lt_internal_name
459 m4_define([_LT_LIBTOOL_DECLARE],
460 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
461 [description])))[]dnl
462 m4_pushdef([_libtool_name],
463 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
464 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
465 [0], [_libtool_name=[$]$1],
466 [1], [_libtool_name=$lt_[]$1],
467 [2], [_libtool_name=$lt_[]$1],
468 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
469 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
470 ])
471
472
473 # _LT_LIBTOOL_CONFIG_VARS
474 # -----------------------
475 # Produce commented declarations of non-tagged libtool config variables
476 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
477 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
478 # section) are produced by _LT_LIBTOOL_TAG_VARS.
479 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
480 [m4_foreach([_lt_var],
481 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
482 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
483
484
485 # _LT_LIBTOOL_TAG_VARS(TAG)
486 # -------------------------
487 m4_define([_LT_LIBTOOL_TAG_VARS],
488 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
489 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
490
491
492 # _LT_TAGVAR(VARNAME, [TAGNAME])
493 # ------------------------------
494 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
495
496
497 # _LT_CONFIG_COMMANDS
498 # -------------------
499 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
500 # variables for single and double quote escaping we saved from calls
501 # to _LT_DECL, we can put quote escaped variables declarations
502 # into `config.status', and then the shell code to quote escape them in
503 # for loops in `config.status'. Finally, any additional code accumulated
504 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
505 m4_defun([_LT_CONFIG_COMMANDS],
506 [AC_PROVIDE_IFELSE([LT_OUTPUT],
507 dnl If the libtool generation code has been placed in $CONFIG_LT,
508 dnl instead of duplicating it all over again into config.status,
509 dnl then we will have config.status run $CONFIG_LT later, so it
510 dnl needs to know what name is stored there:
511 [AC_CONFIG_COMMANDS([libtool],
512 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
513 dnl If the libtool generation code is destined for config.status,
514 dnl expand the accumulated commands and init code now:
515 [AC_CONFIG_COMMANDS([libtool],
516 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
517 ])#_LT_CONFIG_COMMANDS
518
519
520 # Initialize.
521 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
522 [
523
524 # The HP-UX ksh and POSIX shell print the target directory to stdout
525 # if CDPATH is set.
526 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
527
528 sed_quote_subst='$sed_quote_subst'
529 double_quote_subst='$double_quote_subst'
530 delay_variable_subst='$delay_variable_subst'
531 _LT_CONFIG_STATUS_DECLARATIONS
532 LTCC='$LTCC'
533 LTCFLAGS='$LTCFLAGS'
534 compiler='$compiler_DEFAULT'
535
536 # A function that is used when there is no print builtin or printf.
537 func_fallback_echo ()
538 {
539 eval 'cat <<_LTECHO_EOF
540 \$[]1
541 _LTECHO_EOF'
542 }
543
544 # Quote evaled strings.
545 for var in lt_decl_all_varnames([[ \
546 ]], lt_decl_quote_varnames); do
547 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
548 *[[\\\\\\\`\\"\\\$]]*)
549 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
550 ;;
551 *)
552 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
553 ;;
554 esac
555 done
556
557 # Double-quote double-evaled strings.
558 for var in lt_decl_all_varnames([[ \
559 ]], lt_decl_dquote_varnames); do
560 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561 *[[\\\\\\\`\\"\\\$]]*)
562 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
563 ;;
564 *)
565 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
566 ;;
567 esac
568 done
569
570 _LT_OUTPUT_LIBTOOL_INIT
571 ])
572
573 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
574 # ------------------------------------
575 # Generate a child script FILE with all initialization necessary to
576 # reuse the environment learned by the parent script, and make the
577 # file executable. If COMMENT is supplied, it is inserted after the
578 # `#!' sequence but before initialization text begins. After this
579 # macro, additional text can be appended to FILE to form the body of
580 # the child script. The macro ends with non-zero status if the
581 # file could not be fully written (such as if the disk is full).
582 m4_ifdef([AS_INIT_GENERATED],
583 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
584 [m4_defun([_LT_GENERATED_FILE_INIT],
585 [m4_require([AS_PREPARE])]dnl
586 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
587 [lt_write_fail=0
588 cat >$1 <<_ASEOF || lt_write_fail=1
589 #! $SHELL
590 # Generated by $as_me.
591 $2
592 SHELL=\${CONFIG_SHELL-$SHELL}
593 export SHELL
594 _ASEOF
595 cat >>$1 <<\_ASEOF || lt_write_fail=1
596 AS_SHELL_SANITIZE
597 _AS_PREPARE
598 exec AS_MESSAGE_FD>&1
599 _ASEOF
600 test $lt_write_fail = 0 && chmod +x $1[]dnl
601 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
602
603 # LT_OUTPUT
604 # ---------
605 # This macro allows early generation of the libtool script (before
606 # AC_OUTPUT is called), incase it is used in configure for compilation
607 # tests.
608 AC_DEFUN([LT_OUTPUT],
609 [: ${CONFIG_LT=./config.lt}
610 AC_MSG_NOTICE([creating $CONFIG_LT])
611 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
612 [# Run this file to recreate a libtool stub with the current configuration.])
613
614 cat >>"$CONFIG_LT" <<\_LTEOF
615 lt_cl_silent=false
616 exec AS_MESSAGE_LOG_FD>>config.log
617 {
618 echo
619 AS_BOX([Running $as_me.])
620 } >&AS_MESSAGE_LOG_FD
621
622 lt_cl_help="\
623 \`$as_me' creates a local libtool stub from the current configuration,
624 for use in further configure time tests before the real libtool is
625 generated.
626
627 Usage: $[0] [[OPTIONS]]
628
629 -h, --help print this help, then exit
630 -V, --version print version number, then exit
631 -q, --quiet do not print progress messages
632 -d, --debug don't remove temporary files
633
634 Report bugs to <bug-libtool@gnu.org>."
635
636 lt_cl_version="\
637 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
638 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
639 configured by $[0], generated by m4_PACKAGE_STRING.
640
641 Copyright (C) 2011 Free Software Foundation, Inc.
642 This config.lt script is free software; the Free Software Foundation
643 gives unlimited permision to copy, distribute and modify it."
644
645 while test $[#] != 0
646 do
647 case $[1] in
648 --version | --v* | -V )
649 echo "$lt_cl_version"; exit 0 ;;
650 --help | --h* | -h )
651 echo "$lt_cl_help"; exit 0 ;;
652 --debug | --d* | -d )
653 debug=: ;;
654 --quiet | --q* | --silent | --s* | -q )
655 lt_cl_silent=: ;;
656
657 -*) AC_MSG_ERROR([unrecognized option: $[1]
658 Try \`$[0] --help' for more information.]) ;;
659
660 *) AC_MSG_ERROR([unrecognized argument: $[1]
661 Try \`$[0] --help' for more information.]) ;;
662 esac
663 shift
664 done
665
666 if $lt_cl_silent; then
667 exec AS_MESSAGE_FD>/dev/null
668 fi
669 _LTEOF
670
671 cat >>"$CONFIG_LT" <<_LTEOF
672 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
673 _LTEOF
674
675 cat >>"$CONFIG_LT" <<\_LTEOF
676 AC_MSG_NOTICE([creating $ofile])
677 _LT_OUTPUT_LIBTOOL_COMMANDS
678 AS_EXIT(0)
679 _LTEOF
680 chmod +x "$CONFIG_LT"
681
682 # configure is writing to config.log, but config.lt does its own redirection,
683 # appending to config.log, which fails on DOS, as config.log is still kept
684 # open by configure. Here we exec the FD to /dev/null, effectively closing
685 # config.log, so it can be properly (re)opened and appended to by config.lt.
686 lt_cl_success=:
687 test "$silent" = yes &&
688 lt_config_lt_args="$lt_config_lt_args --quiet"
689 exec AS_MESSAGE_LOG_FD>/dev/null
690 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
691 exec AS_MESSAGE_LOG_FD>>config.log
692 $lt_cl_success || AS_EXIT(1)
693 ])# LT_OUTPUT
694
695
696 # _LT_CONFIG(TAG)
697 # ---------------
698 # If TAG is the built-in tag, create an initial libtool script with a
699 # default configuration from the untagged config vars. Otherwise add code
700 # to config.status for appending the configuration named by TAG from the
701 # matching tagged config vars.
702 m4_defun([_LT_CONFIG],
703 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
704 _LT_CONFIG_SAVE_COMMANDS([
705 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
706 m4_if(_LT_TAG, [C], [
707 # See if we are running on zsh, and set the options which allow our
708 # commands through without removal of \ escapes.
709 if test -n "${ZSH_VERSION+set}" ; then
710 setopt NO_GLOB_SUBST
711 fi
712
713 cfgfile="${ofile}T"
714 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
715 $RM "$cfgfile"
716
717 cat <<_LT_EOF >> "$cfgfile"
718 #! $SHELL
719
720 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
721 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
722 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
723 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
724 #
725 _LT_COPYING
726 _LT_LIBTOOL_TAGS
727
728 # ### BEGIN LIBTOOL CONFIG
729 _LT_LIBTOOL_CONFIG_VARS
730 _LT_LIBTOOL_TAG_VARS
731 # ### END LIBTOOL CONFIG
732
733 _LT_EOF
734
735 case $host_os in
736 aix3*)
737 cat <<\_LT_EOF >> "$cfgfile"
738 # AIX sometimes has problems with the GCC collect2 program. For some
739 # reason, if we set the COLLECT_NAMES environment variable, the problems
740 # vanish in a puff of smoke.
741 if test "X${COLLECT_NAMES+set}" != Xset; then
742 COLLECT_NAMES=
743 export COLLECT_NAMES
744 fi
745 _LT_EOF
746 ;;
747 esac
748
749 _LT_PROG_LTMAIN
750
751 # We use sed instead of cat because bash on DJGPP gets confused if
752 # if finds mixed CR/LF and LF-only lines. Since sed operates in
753 # text mode, it properly converts lines to CR/LF. This bash problem
754 # is reportedly fixed, but why not run on old versions too?
755 sed '$q' "$ltmain" >> "$cfgfile" \
756 || (rm -f "$cfgfile"; exit 1)
757
758 _LT_PROG_REPLACE_SHELLFNS
759
760 mv -f "$cfgfile" "$ofile" ||
761 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
762 chmod +x "$ofile"
763 ],
764 [cat <<_LT_EOF >> "$ofile"
765
766 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
767 dnl in a comment (ie after a #).
768 # ### BEGIN LIBTOOL TAG CONFIG: $1
769 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
770 # ### END LIBTOOL TAG CONFIG: $1
771 _LT_EOF
772 ])dnl /m4_if
773 ],
774 [m4_if([$1], [], [
775 PACKAGE='$PACKAGE'
776 VERSION='$VERSION'
777 TIMESTAMP='$TIMESTAMP'
778 RM='$RM'
779 ofile='$ofile'], [])
780 ])dnl /_LT_CONFIG_SAVE_COMMANDS
781 ])# _LT_CONFIG
782
783
784 # LT_SUPPORTED_TAG(TAG)
785 # ---------------------
786 # Trace this macro to discover what tags are supported by the libtool
787 # --tag option, using:
788 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
789 AC_DEFUN([LT_SUPPORTED_TAG], [])
790
791
792 # C support is built-in for now
793 m4_define([_LT_LANG_C_enabled], [])
794 m4_define([_LT_TAGS], [])
795
796
797 # LT_LANG(LANG)
798 # -------------
799 # Enable libtool support for the given language if not already enabled.
800 AC_DEFUN([LT_LANG],
801 [AC_BEFORE([$0], [LT_OUTPUT])dnl
802 m4_case([$1],
803 [C], [_LT_LANG(C)],
804 [C++], [_LT_LANG(CXX)],
805 [Go], [_LT_LANG(GO)],
806 [Java], [_LT_LANG(GCJ)],
807 [Fortran 77], [_LT_LANG(F77)],
808 [Fortran], [_LT_LANG(FC)],
809 [Windows Resource], [_LT_LANG(RC)],
810 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
811 [_LT_LANG($1)],
812 [m4_fatal([$0: unsupported language: "$1"])])])dnl
813 ])# LT_LANG
814
815
816 # _LT_LANG(LANGNAME)
817 # ------------------
818 m4_defun([_LT_LANG],
819 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
820 [LT_SUPPORTED_TAG([$1])dnl
821 m4_append([_LT_TAGS], [$1 ])dnl
822 m4_define([_LT_LANG_]$1[_enabled], [])dnl
823 _LT_LANG_$1_CONFIG($1)])dnl
824 ])# _LT_LANG
825
826
827 m4_ifndef([AC_PROG_GO], [
828 ############################################################
829 # NOTE: This macro has been submitted for inclusion into #
830 # GNU Autoconf as AC_PROG_GO. When it is available in #
831 # a released version of Autoconf we should remove this #
832 # macro and use it instead. #
833 ############################################################
834 m4_defun([AC_PROG_GO],
835 [AC_LANG_PUSH(Go)dnl
836 AC_ARG_VAR([GOC], [Go compiler command])dnl
837 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
838 _AC_ARG_VAR_LDFLAGS()dnl
839 AC_CHECK_TOOL(GOC, gccgo)
840 if test -z "$GOC"; then
841 if test -n "$ac_tool_prefix"; then
842 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
843 fi
844 fi
845 if test -z "$GOC"; then
846 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
847 fi
848 ])#m4_defun
849 ])#m4_ifndef
850
851
852 # _LT_LANG_DEFAULT_CONFIG
853 # -----------------------
854 m4_defun([_LT_LANG_DEFAULT_CONFIG],
855 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
856 [LT_LANG(CXX)],
857 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
858
859 AC_PROVIDE_IFELSE([AC_PROG_F77],
860 [LT_LANG(F77)],
861 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
862
863 AC_PROVIDE_IFELSE([AC_PROG_FC],
864 [LT_LANG(FC)],
865 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
866
867 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
868 dnl pulling things in needlessly.
869 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
870 [LT_LANG(GCJ)],
871 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
872 [LT_LANG(GCJ)],
873 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
874 [LT_LANG(GCJ)],
875 [m4_ifdef([AC_PROG_GCJ],
876 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
877 m4_ifdef([A][M_PROG_GCJ],
878 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
879 m4_ifdef([LT_PROG_GCJ],
880 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
881
882 AC_PROVIDE_IFELSE([AC_PROG_GO],
883 [LT_LANG(GO)],
884 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
885
886 AC_PROVIDE_IFELSE([LT_PROG_RC],
887 [LT_LANG(RC)],
888 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
889 ])# _LT_LANG_DEFAULT_CONFIG
890
891 # Obsolete macros:
892 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
893 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
894 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
895 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
896 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
897 dnl aclocal-1.4 backwards compatibility:
898 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
899 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
900 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
901 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
902 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
903
904
905 # _LT_TAG_COMPILER
906 # ----------------
907 m4_defun([_LT_TAG_COMPILER],
908 [AC_REQUIRE([AC_PROG_CC])dnl
909
910 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
911 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
912 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
913 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
914
915 # If no C compiler was specified, use CC.
916 LTCC=${LTCC-"$CC"}
917
918 # If no C compiler flags were specified, use CFLAGS.
919 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
920
921 # Allow CC to be a program name with arguments.
922 compiler=$CC
923 ])# _LT_TAG_COMPILER
924
925
926 # _LT_COMPILER_BOILERPLATE
927 # ------------------------
928 # Check for compiler boilerplate output or warnings with
929 # the simple compiler test code.
930 m4_defun([_LT_COMPILER_BOILERPLATE],
931 [m4_require([_LT_DECL_SED])dnl
932 ac_outfile=conftest.$ac_objext
933 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
934 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
935 _lt_compiler_boilerplate=`cat conftest.err`
936 $RM conftest*
937 ])# _LT_COMPILER_BOILERPLATE
938
939
940 # _LT_LINKER_BOILERPLATE
941 # ----------------------
942 # Check for linker boilerplate output or warnings with
943 # the simple link test code.
944 m4_defun([_LT_LINKER_BOILERPLATE],
945 [m4_require([_LT_DECL_SED])dnl
946 ac_outfile=conftest.$ac_objext
947 echo "$lt_simple_link_test_code" >conftest.$ac_ext
948 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
949 _lt_linker_boilerplate=`cat conftest.err`
950 $RM -r conftest*
951 ])# _LT_LINKER_BOILERPLATE
952
953 # _LT_REQUIRED_DARWIN_CHECKS
954 # -------------------------
955 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
956 case $host_os in
957 rhapsody* | darwin*)
958 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
959 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
960 AC_CHECK_TOOL([LIPO], [lipo], [:])
961 AC_CHECK_TOOL([OTOOL], [otool], [:])
962 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
963 _LT_DECL([], [DSYMUTIL], [1],
964 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
965 _LT_DECL([], [NMEDIT], [1],
966 [Tool to change global to local symbols on Mac OS X])
967 _LT_DECL([], [LIPO], [1],
968 [Tool to manipulate fat objects and archives on Mac OS X])
969 _LT_DECL([], [OTOOL], [1],
970 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
971 _LT_DECL([], [OTOOL64], [1],
972 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
973
974 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
975 [lt_cv_apple_cc_single_mod=no
976 if test -z "${LT_MULTI_MODULE}"; then
977 # By default we will add the -single_module flag. You can override
978 # by either setting the environment variable LT_MULTI_MODULE
979 # non-empty at configure time, or by adding -multi_module to the
980 # link flags.
981 rm -rf libconftest.dylib*
982 echo "int foo(void){return 1;}" > conftest.c
983 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
984 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
985 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
986 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
987 _lt_result=$?
988 # If there is a non-empty error log, and "single_module"
989 # appears in it, assume the flag caused a linker warning
990 if test -s conftest.err && $GREP single_module conftest.err; then
991 cat conftest.err >&AS_MESSAGE_LOG_FD
992 # Otherwise, if the output was created with a 0 exit code from
993 # the compiler, it worked.
994 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
995 lt_cv_apple_cc_single_mod=yes
996 else
997 cat conftest.err >&AS_MESSAGE_LOG_FD
998 fi
999 rm -rf libconftest.dylib*
1000 rm -f conftest.*
1001 fi])
1002
1003 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1004 [lt_cv_ld_exported_symbols_list],
1005 [lt_cv_ld_exported_symbols_list=no
1006 save_LDFLAGS=$LDFLAGS
1007 echo "_main" > conftest.sym
1008 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1009 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1010 [lt_cv_ld_exported_symbols_list=yes],
1011 [lt_cv_ld_exported_symbols_list=no])
1012 LDFLAGS="$save_LDFLAGS"
1013 ])
1014
1015 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1016 [lt_cv_ld_force_load=no
1017 cat > conftest.c << _LT_EOF
1018 int forced_loaded() { return 2;}
1019 _LT_EOF
1020 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1021 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1022 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1023 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1024 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1025 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1026 cat > conftest.c << _LT_EOF
1027 int main() { return 0;}
1028 _LT_EOF
1029 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1030 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1031 _lt_result=$?
1032 if test -s conftest.err && $GREP force_load conftest.err; then
1033 cat conftest.err >&AS_MESSAGE_LOG_FD
1034 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1035 lt_cv_ld_force_load=yes
1036 else
1037 cat conftest.err >&AS_MESSAGE_LOG_FD
1038 fi
1039 rm -f conftest.err libconftest.a conftest conftest.c
1040 rm -rf conftest.dSYM
1041 ])
1042 case $host_os in
1043 rhapsody* | darwin1.[[012]])
1044 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1045 darwin1.*)
1046 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1047 darwin*) # darwin 5.x on
1048 # if running on 10.5 or later, the deployment target defaults
1049 # to the OS version, if on x86, and 10.4, the deployment
1050 # target defaults to 10.4. Don't you love it?
1051 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1052 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1053 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1054 10.[[012]]*)
1055 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1056 10.*)
1057 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1058 esac
1059 ;;
1060 esac
1061 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1062 _lt_dar_single_mod='$single_module'
1063 fi
1064 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1065 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1066 else
1067 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1068 fi
1069 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1070 _lt_dsymutil='~$DSYMUTIL $lib || :'
1071 else
1072 _lt_dsymutil=
1073 fi
1074 ;;
1075 esac
1076 ])
1077
1078
1079 # _LT_DARWIN_LINKER_FEATURES([TAG])
1080 # ---------------------------------
1081 # Checks for linker and compiler features on darwin
1082 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1083 [
1084 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1085 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1086 _LT_TAGVAR(hardcode_direct, $1)=no
1087 _LT_TAGVAR(hardcode_automatic, $1)=yes
1088 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1089 if test "$lt_cv_ld_force_load" = "yes"; then
1090 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1091 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1092 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1093 else
1094 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1095 fi
1096 _LT_TAGVAR(link_all_deplibs, $1)=yes
1097 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1098 case $cc_basename in
1099 ifort*) _lt_dar_can_shared=yes ;;
1100 *) _lt_dar_can_shared=$GCC ;;
1101 esac
1102 if test "$_lt_dar_can_shared" = "yes"; then
1103 output_verbose_link_cmd=func_echo_all
1104 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1105 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1106 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1107 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1108 m4_if([$1], [CXX],
1109 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1110 _LT_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${_lt_dsymutil}"
1111 _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
1112 fi
1113 ],[])
1114 else
1115 _LT_TAGVAR(ld_shlibs, $1)=no
1116 fi
1117 ])
1118
1119 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1120 # ----------------------------------
1121 # Links a minimal program and checks the executable
1122 # for the system default hardcoded library path. In most cases,
1123 # this is /usr/lib:/lib, but when the MPI compilers are used
1124 # the location of the communication and MPI libs are included too.
1125 # If we don't find anything, use the default library path according
1126 # to the aix ld manual.
1127 # Store the results from the different compilers for each TAGNAME.
1128 # Allow to override them for all tags through lt_cv_aix_libpath.
1129 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1130 [m4_require([_LT_DECL_SED])dnl
1131 if test "${lt_cv_aix_libpath+set}" = set; then
1132 aix_libpath=$lt_cv_aix_libpath
1133 else
1134 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1135 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1136 lt_aix_libpath_sed='[
1137 /Import File Strings/,/^$/ {
1138 /^0/ {
1139 s/^0 *\([^ ]*\) *$/\1/
1140 p
1141 }
1142 }]'
1143 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1144 # Check for a 64-bit object if we didn't find anything.
1145 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1146 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1147 fi],[])
1148 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1149 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1150 fi
1151 ])
1152 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1153 fi
1154 ])# _LT_SYS_MODULE_PATH_AIX
1155
1156
1157 # _LT_SHELL_INIT(ARG)
1158 # -------------------
1159 m4_define([_LT_SHELL_INIT],
1160 [m4_divert_text([M4SH-INIT], [$1
1161 ])])# _LT_SHELL_INIT
1162
1163
1164
1165 # _LT_PROG_ECHO_BACKSLASH
1166 # -----------------------
1167 # Find how we can fake an echo command that does not interpret backslash.
1168 # In particular, with Autoconf 2.60 or later we add some code to the start
1169 # of the generated configure script which will find a shell with a builtin
1170 # printf (which we can use as an echo command).
1171 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1172 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1173 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1174 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1175
1176 AC_MSG_CHECKING([how to print strings])
1177 # Test print first, because it will be a builtin if present.
1178 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1179 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1180 ECHO='print -r --'
1181 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1182 ECHO='printf %s\n'
1183 else
1184 # Use this function as a fallback that always works.
1185 func_fallback_echo ()
1186 {
1187 eval 'cat <<_LTECHO_EOF
1188 $[]1
1189 _LTECHO_EOF'
1190 }
1191 ECHO='func_fallback_echo'
1192 fi
1193
1194 # func_echo_all arg...
1195 # Invoke $ECHO with all args, space-separated.
1196 func_echo_all ()
1197 {
1198 $ECHO "$*"
1199 }
1200
1201 case "$ECHO" in
1202 printf*) AC_MSG_RESULT([printf]) ;;
1203 print*) AC_MSG_RESULT([print -r]) ;;
1204 *) AC_MSG_RESULT([cat]) ;;
1205 esac
1206
1207 m4_ifdef([_AS_DETECT_SUGGESTED],
1208 [_AS_DETECT_SUGGESTED([
1209 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1210 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1211 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1212 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1213 PATH=/empty FPATH=/empty; export PATH FPATH
1214 test "X`printf %s $ECHO`" = "X$ECHO" \
1215 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1216
1217 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1218 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1219 ])# _LT_PROG_ECHO_BACKSLASH
1220
1221
1222 # _LT_WITH_SYSROOT
1223 # ----------------
1224 AC_DEFUN([_LT_WITH_SYSROOT],
1225 [AC_MSG_CHECKING([for sysroot])
1226 AC_ARG_WITH([sysroot],
1227 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1228 (or the compiler's sysroot if not specified).],
1229 [], [with_sysroot=no])
1230
1231 dnl lt_sysroot will always be passed unquoted. We quote it here
1232 dnl in case the user passed a directory name.
1233 lt_sysroot=
1234 case ${with_sysroot} in #(
1235 yes)
1236 if test "$GCC" = yes; then
1237 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1238 fi
1239 ;; #(
1240 /*)
1241 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1242 ;; #(
1243 no|'')
1244 ;; #(
1245 *)
1246 AC_MSG_RESULT([${with_sysroot}])
1247 AC_MSG_ERROR([The sysroot must be an absolute path.])
1248 ;;
1249 esac
1250
1251 AC_MSG_RESULT([${lt_sysroot:-no}])
1252 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1253 [dependent libraries, and in which our libraries should be installed.])])
1254
1255 # _LT_ENABLE_LOCK
1256 # ---------------
1257 m4_defun([_LT_ENABLE_LOCK],
1258 [AC_ARG_ENABLE([libtool-lock],
1259 [AS_HELP_STRING([--disable-libtool-lock],
1260 [avoid locking (might break parallel builds)])])
1261 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1262
1263 # Some flags need to be propagated to the compiler or linker for good
1264 # libtool support.
1265 case $host in
1266 ia64-*-hpux*)
1267 # Find out which ABI we are using.
1268 echo 'int i;' > conftest.$ac_ext
1269 if AC_TRY_EVAL(ac_compile); then
1270 case `/usr/bin/file conftest.$ac_objext` in
1271 *ELF-32*)
1272 HPUX_IA64_MODE="32"
1273 ;;
1274 *ELF-64*)
1275 HPUX_IA64_MODE="64"
1276 ;;
1277 esac
1278 fi
1279 rm -rf conftest*
1280 ;;
1281 *-*-irix6*)
1282 # Find out which ABI we are using.
1283 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1284 if AC_TRY_EVAL(ac_compile); then
1285 if test "$lt_cv_prog_gnu_ld" = yes; then
1286 case `/usr/bin/file conftest.$ac_objext` in
1287 *32-bit*)
1288 LD="${LD-ld} -melf32bsmip"
1289 ;;
1290 *N32*)
1291 LD="${LD-ld} -melf32bmipn32"
1292 ;;
1293 *64-bit*)
1294 LD="${LD-ld} -melf64bmip"
1295 ;;
1296 esac
1297 else
1298 case `/usr/bin/file conftest.$ac_objext` in
1299 *32-bit*)
1300 LD="${LD-ld} -32"
1301 ;;
1302 *N32*)
1303 LD="${LD-ld} -n32"
1304 ;;
1305 *64-bit*)
1306 LD="${LD-ld} -64"
1307 ;;
1308 esac
1309 fi
1310 fi
1311 rm -rf conftest*
1312 ;;
1313
1314 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1315 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1316 # Find out which ABI we are using.
1317 echo 'int i;' > conftest.$ac_ext
1318 if AC_TRY_EVAL(ac_compile); then
1319 case `/usr/bin/file conftest.o` in
1320 *32-bit*)
1321 case $host in
1322 x86_64-*kfreebsd*-gnu)
1323 LD="${LD-ld} -m elf_i386_fbsd"
1324 ;;
1325 x86_64-*linux*)
1326 case `/usr/bin/file conftest.o` in
1327 *x86-64*)
1328 LD="${LD-ld} -m elf32_x86_64"
1329 ;;
1330 *)
1331 LD="${LD-ld} -m elf_i386"
1332 ;;
1333 esac
1334 ;;
1335 ppc64-*linux*|powerpc64-*linux*)
1336 LD="${LD-ld} -m elf32ppclinux"
1337 ;;
1338 s390x-*linux*)
1339 LD="${LD-ld} -m elf_s390"
1340 ;;
1341 sparc64-*linux*)
1342 LD="${LD-ld} -m elf32_sparc"
1343 ;;
1344 esac
1345 ;;
1346 *64-bit*)
1347 case $host in
1348 x86_64-*kfreebsd*-gnu)
1349 LD="${LD-ld} -m elf_x86_64_fbsd"
1350 ;;
1351 x86_64-*linux*)
1352 LD="${LD-ld} -m elf_x86_64"
1353 ;;
1354 ppc*-*linux*|powerpc*-*linux*)
1355 LD="${LD-ld} -m elf64ppc"
1356 ;;
1357 s390*-*linux*|s390*-*tpf*)
1358 LD="${LD-ld} -m elf64_s390"
1359 ;;
1360 sparc*-*linux*)
1361 LD="${LD-ld} -m elf64_sparc"
1362 ;;
1363 esac
1364 ;;
1365 esac
1366 fi
1367 rm -rf conftest*
1368 ;;
1369
1370 *-*-sco3.2v5*)
1371 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1372 SAVE_CFLAGS="$CFLAGS"
1373 CFLAGS="$CFLAGS -belf"
1374 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1375 [AC_LANG_PUSH(C)
1376 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1377 AC_LANG_POP])
1378 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1379 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1380 CFLAGS="$SAVE_CFLAGS"
1381 fi
1382 ;;
1383 *-*solaris*)
1384 # Find out which ABI we are using.
1385 echo 'int i;' > conftest.$ac_ext
1386 if AC_TRY_EVAL(ac_compile); then
1387 case `/usr/bin/file conftest.o` in
1388 *64-bit*)
1389 case $lt_cv_prog_gnu_ld in
1390 yes*)
1391 case $host in
1392 i?86-*-solaris*)
1393 LD="${LD-ld} -m elf_x86_64"
1394 ;;
1395 sparc*-*-solaris*)
1396 LD="${LD-ld} -m elf64_sparc"
1397 ;;
1398 esac
1399 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1400 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1401 LD="${LD-ld}_sol2"
1402 fi
1403 ;;
1404 *)
1405 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1406 LD="${LD-ld} -64"
1407 fi
1408 ;;
1409 esac
1410 ;;
1411 esac
1412 fi
1413 rm -rf conftest*
1414 ;;
1415 esac
1416
1417 need_locks="$enable_libtool_lock"
1418 ])# _LT_ENABLE_LOCK
1419
1420
1421 # _LT_PROG_AR
1422 # -----------
1423 m4_defun([_LT_PROG_AR],
1424 [AC_CHECK_TOOLS(AR, [ar], false)
1425 : ${AR=ar}
1426 : ${AR_FLAGS=cru}
1427 _LT_DECL([], [AR], [1], [The archiver])
1428 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1429
1430 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1431 [lt_cv_ar_at_file=no
1432 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1433 [echo conftest.$ac_objext > conftest.lst
1434 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1435 AC_TRY_EVAL([lt_ar_try])
1436 if test "$ac_status" -eq 0; then
1437 # Ensure the archiver fails upon bogus file names.
1438 rm -f conftest.$ac_objext libconftest.a
1439 AC_TRY_EVAL([lt_ar_try])
1440 if test "$ac_status" -ne 0; then
1441 lt_cv_ar_at_file=@
1442 fi
1443 fi
1444 rm -f conftest.* libconftest.a
1445 ])
1446 ])
1447
1448 if test "x$lt_cv_ar_at_file" = xno; then
1449 archiver_list_spec=
1450 else
1451 archiver_list_spec=$lt_cv_ar_at_file
1452 fi
1453 _LT_DECL([], [archiver_list_spec], [1],
1454 [How to feed a file listing to the archiver])
1455 ])# _LT_PROG_AR
1456
1457
1458 # _LT_CMD_OLD_ARCHIVE
1459 # -------------------
1460 m4_defun([_LT_CMD_OLD_ARCHIVE],
1461 [_LT_PROG_AR
1462
1463 AC_CHECK_TOOL(STRIP, strip, :)
1464 test -z "$STRIP" && STRIP=:
1465 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1466
1467 AC_CHECK_TOOL(RANLIB, ranlib, :)
1468 test -z "$RANLIB" && RANLIB=:
1469 _LT_DECL([], [RANLIB], [1],
1470 [Commands used to install an old-style archive])
1471
1472 # Determine commands to create old-style static archives.
1473 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1474 old_postinstall_cmds='chmod 644 $oldlib'
1475 old_postuninstall_cmds=
1476
1477 if test -n "$RANLIB"; then
1478 case $host_os in
1479 openbsd*)
1480 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1481 ;;
1482 *)
1483 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1484 ;;
1485 esac
1486 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1487 fi
1488
1489 case $host_os in
1490 darwin*)
1491 lock_old_archive_extraction=yes ;;
1492 *)
1493 lock_old_archive_extraction=no ;;
1494 esac
1495 _LT_DECL([], [old_postinstall_cmds], [2])
1496 _LT_DECL([], [old_postuninstall_cmds], [2])
1497 _LT_TAGDECL([], [old_archive_cmds], [2],
1498 [Commands used to build an old-style archive])
1499 _LT_DECL([], [lock_old_archive_extraction], [0],
1500 [Whether to use a lock for old archive extraction])
1501 ])# _LT_CMD_OLD_ARCHIVE
1502
1503
1504 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1505 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1506 # ----------------------------------------------------------------
1507 # Check whether the given compiler option works
1508 AC_DEFUN([_LT_COMPILER_OPTION],
1509 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1510 m4_require([_LT_DECL_SED])dnl
1511 AC_CACHE_CHECK([$1], [$2],
1512 [$2=no
1513 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1514 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1515 lt_compiler_flag="$3"
1516 # Insert the option either (1) after the last *FLAGS variable, or
1517 # (2) before a word containing "conftest.", or (3) at the end.
1518 # Note that $ac_compile itself does not contain backslashes and begins
1519 # with a dollar sign (not a hyphen), so the echo should work correctly.
1520 # The option is referenced via a variable to avoid confusing sed.
1521 lt_compile=`echo "$ac_compile" | $SED \
1522 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1523 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1524 -e 's:$: $lt_compiler_flag:'`
1525 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1526 (eval "$lt_compile" 2>conftest.err)
1527 ac_status=$?
1528 cat conftest.err >&AS_MESSAGE_LOG_FD
1529 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1530 if (exit $ac_status) && test -s "$ac_outfile"; then
1531 # The compiler can only warn and ignore the option if not recognized
1532 # So say no if there are warnings other than the usual output.
1533 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1534 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1535 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1536 $2=yes
1537 fi
1538 fi
1539 $RM conftest*
1540 ])
1541
1542 if test x"[$]$2" = xyes; then
1543 m4_if([$5], , :, [$5])
1544 else
1545 m4_if([$6], , :, [$6])
1546 fi
1547 ])# _LT_COMPILER_OPTION
1548
1549 # Old name:
1550 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1551 dnl aclocal-1.4 backwards compatibility:
1552 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1553
1554
1555 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1556 # [ACTION-SUCCESS], [ACTION-FAILURE])
1557 # ----------------------------------------------------
1558 # Check whether the given linker option works
1559 AC_DEFUN([_LT_LINKER_OPTION],
1560 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1561 m4_require([_LT_DECL_SED])dnl
1562 AC_CACHE_CHECK([$1], [$2],
1563 [$2=no
1564 save_LDFLAGS="$LDFLAGS"
1565 LDFLAGS="$LDFLAGS $3"
1566 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1567 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1568 # The linker can only warn and ignore the option if not recognized
1569 # So say no if there are warnings
1570 if test -s conftest.err; then
1571 # Append any errors to the config.log.
1572 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1573 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1574 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1575 if diff conftest.exp conftest.er2 >/dev/null; then
1576 $2=yes
1577 fi
1578 else
1579 $2=yes
1580 fi
1581 fi
1582 $RM -r conftest*
1583 LDFLAGS="$save_LDFLAGS"
1584 ])
1585
1586 if test x"[$]$2" = xyes; then
1587 m4_if([$4], , :, [$4])
1588 else
1589 m4_if([$5], , :, [$5])
1590 fi
1591 ])# _LT_LINKER_OPTION
1592
1593 # Old name:
1594 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1595 dnl aclocal-1.4 backwards compatibility:
1596 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1597
1598
1599 # LT_CMD_MAX_LEN
1600 #---------------
1601 AC_DEFUN([LT_CMD_MAX_LEN],
1602 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1603 # find the maximum length of command line arguments
1604 AC_MSG_CHECKING([the maximum length of command line arguments])
1605 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1606 i=0
1607 teststring="ABCD"
1608
1609 case $build_os in
1610 msdosdjgpp*)
1611 # On DJGPP, this test can blow up pretty badly due to problems in libc
1612 # (any single argument exceeding 2000 bytes causes a buffer overrun
1613 # during glob expansion). Even if it were fixed, the result of this
1614 # check would be larger than it should be.
1615 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1616 ;;
1617
1618 gnu*)
1619 # Under GNU Hurd, this test is not required because there is
1620 # no limit to the length of command line arguments.
1621 # Libtool will interpret -1 as no limit whatsoever
1622 lt_cv_sys_max_cmd_len=-1;
1623 ;;
1624
1625 cygwin* | mingw* | cegcc*)
1626 # On Win9x/ME, this test blows up -- it succeeds, but takes
1627 # about 5 minutes as the teststring grows exponentially.
1628 # Worse, since 9x/ME are not pre-emptively multitasking,
1629 # you end up with a "frozen" computer, even though with patience
1630 # the test eventually succeeds (with a max line length of 256k).
1631 # Instead, let's just punt: use the minimum linelength reported by
1632 # all of the supported platforms: 8192 (on NT/2K/XP).
1633 lt_cv_sys_max_cmd_len=8192;
1634 ;;
1635
1636 mint*)
1637 # On MiNT this can take a long time and run out of memory.
1638 lt_cv_sys_max_cmd_len=8192;
1639 ;;
1640
1641 amigaos*)
1642 # On AmigaOS with pdksh, this test takes hours, literally.
1643 # So we just punt and use a minimum line length of 8192.
1644 lt_cv_sys_max_cmd_len=8192;
1645 ;;
1646
1647 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1648 # This has been around since 386BSD, at least. Likely further.
1649 if test -x /sbin/sysctl; then
1650 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1651 elif test -x /usr/sbin/sysctl; then
1652 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1653 else
1654 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1655 fi
1656 # And add a safety zone
1657 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1658 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1659 ;;
1660
1661 interix*)
1662 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1663 lt_cv_sys_max_cmd_len=196608
1664 ;;
1665
1666 os2*)
1667 # The test takes a long time on OS/2.
1668 lt_cv_sys_max_cmd_len=8192
1669 ;;
1670
1671 osf*)
1672 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1673 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1674 # nice to cause kernel panics so lets avoid the loop below.
1675 # First set a reasonable default.
1676 lt_cv_sys_max_cmd_len=16384
1677 #
1678 if test -x /sbin/sysconfig; then
1679 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1680 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1681 esac
1682 fi
1683 ;;
1684 sco3.2v5*)
1685 lt_cv_sys_max_cmd_len=102400
1686 ;;
1687 sysv5* | sco5v6* | sysv4.2uw2*)
1688 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1689 if test -n "$kargmax"; then
1690 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1691 else
1692 lt_cv_sys_max_cmd_len=32768
1693 fi
1694 ;;
1695 *)
1696 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1697 if test -n "$lt_cv_sys_max_cmd_len" && \
1698 test undefined != "$lt_cv_sys_max_cmd_len"; then
1699 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1700 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1701 else
1702 # Make teststring a little bigger before we do anything with it.
1703 # a 1K string should be a reasonable start.
1704 for i in 1 2 3 4 5 6 7 8 ; do
1705 teststring=$teststring$teststring
1706 done
1707 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1708 # If test is not a shell built-in, we'll probably end up computing a
1709 # maximum length that is only half of the actual maximum length, but
1710 # we can't tell.
1711 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1712 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1713 test $i != 17 # 1/2 MB should be enough
1714 do
1715 i=`expr $i + 1`
1716 teststring=$teststring$teststring
1717 done
1718 # Only check the string length outside the loop.
1719 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1720 teststring=
1721 # Add a significant safety factor because C++ compilers can tack on
1722 # massive amounts of additional arguments before passing them to the
1723 # linker. It appears as though 1/2 is a usable value.
1724 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1725 fi
1726 ;;
1727 esac
1728 ])
1729 if test -n $lt_cv_sys_max_cmd_len ; then
1730 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1731 else
1732 AC_MSG_RESULT(none)
1733 fi
1734 max_cmd_len=$lt_cv_sys_max_cmd_len
1735 _LT_DECL([], [max_cmd_len], [0],
1736 [What is the maximum length of a command?])
1737 ])# LT_CMD_MAX_LEN
1738
1739 # Old name:
1740 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1741 dnl aclocal-1.4 backwards compatibility:
1742 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1743
1744
1745 # _LT_HEADER_DLFCN
1746 # ----------------
1747 m4_defun([_LT_HEADER_DLFCN],
1748 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1749 ])# _LT_HEADER_DLFCN
1750
1751
1752 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1753 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1754 # ----------------------------------------------------------------
1755 m4_defun([_LT_TRY_DLOPEN_SELF],
1756 [m4_require([_LT_HEADER_DLFCN])dnl
1757 if test "$cross_compiling" = yes; then :
1758 [$4]
1759 else
1760 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1761 lt_status=$lt_dlunknown
1762 cat > conftest.$ac_ext <<_LT_EOF
1763 [#line $LINENO "configure"
1764 #include "confdefs.h"
1765
1766 #if HAVE_DLFCN_H
1767 #include <dlfcn.h>
1768 #endif
1769
1770 #include <stdio.h>
1771
1772 #ifdef RTLD_GLOBAL
1773 # define LT_DLGLOBAL RTLD_GLOBAL
1774 #else
1775 # ifdef DL_GLOBAL
1776 # define LT_DLGLOBAL DL_GLOBAL
1777 # else
1778 # define LT_DLGLOBAL 0
1779 # endif
1780 #endif
1781
1782 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1783 find out it does not work in some platform. */
1784 #ifndef LT_DLLAZY_OR_NOW
1785 # ifdef RTLD_LAZY
1786 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1787 # else
1788 # ifdef DL_LAZY
1789 # define LT_DLLAZY_OR_NOW DL_LAZY
1790 # else
1791 # ifdef RTLD_NOW
1792 # define LT_DLLAZY_OR_NOW RTLD_NOW
1793 # else
1794 # ifdef DL_NOW
1795 # define LT_DLLAZY_OR_NOW DL_NOW
1796 # else
1797 # define LT_DLLAZY_OR_NOW 0
1798 # endif
1799 # endif
1800 # endif
1801 # endif
1802 #endif
1803
1804 /* When -fvisbility=hidden is used, assume the code has been annotated
1805 correspondingly for the symbols needed. */
1806 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1807 int fnord () __attribute__((visibility("default")));
1808 #endif
1809
1810 int fnord () { return 42; }
1811 int main ()
1812 {
1813 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1814 int status = $lt_dlunknown;
1815
1816 if (self)
1817 {
1818 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1819 else
1820 {
1821 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1822 else puts (dlerror ());
1823 }
1824 /* dlclose (self); */
1825 }
1826 else
1827 puts (dlerror ());
1828
1829 return status;
1830 }]
1831 _LT_EOF
1832 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1833 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1834 lt_status=$?
1835 case x$lt_status in
1836 x$lt_dlno_uscore) $1 ;;
1837 x$lt_dlneed_uscore) $2 ;;
1838 x$lt_dlunknown|x*) $3 ;;
1839 esac
1840 else :
1841 # compilation failed
1842 $3
1843 fi
1844 fi
1845 rm -fr conftest*
1846 ])# _LT_TRY_DLOPEN_SELF
1847
1848
1849 # LT_SYS_DLOPEN_SELF
1850 # ------------------
1851 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1852 [m4_require([_LT_HEADER_DLFCN])dnl
1853 if test "x$enable_dlopen" != xyes; then
1854 enable_dlopen=unknown
1855 enable_dlopen_self=unknown
1856 enable_dlopen_self_static=unknown
1857 else
1858 lt_cv_dlopen=no
1859 lt_cv_dlopen_libs=
1860
1861 case $host_os in
1862 beos*)
1863 lt_cv_dlopen="load_add_on"
1864 lt_cv_dlopen_libs=
1865 lt_cv_dlopen_self=yes
1866 ;;
1867
1868 mingw* | pw32* | cegcc*)
1869 lt_cv_dlopen="LoadLibrary"
1870 lt_cv_dlopen_libs=
1871 ;;
1872
1873 cygwin*)
1874 lt_cv_dlopen="dlopen"
1875 lt_cv_dlopen_libs=
1876 ;;
1877
1878 darwin*)
1879 # if libdl is installed we need to link against it
1880 AC_CHECK_LIB([dl], [dlopen],
1881 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1882 lt_cv_dlopen="dyld"
1883 lt_cv_dlopen_libs=
1884 lt_cv_dlopen_self=yes
1885 ])
1886 ;;
1887
1888 *)
1889 AC_CHECK_FUNC([shl_load],
1890 [lt_cv_dlopen="shl_load"],
1891 [AC_CHECK_LIB([dld], [shl_load],
1892 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1893 [AC_CHECK_FUNC([dlopen],
1894 [lt_cv_dlopen="dlopen"],
1895 [AC_CHECK_LIB([dl], [dlopen],
1896 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1897 [AC_CHECK_LIB([svld], [dlopen],
1898 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1899 [AC_CHECK_LIB([dld], [dld_link],
1900 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1901 ])
1902 ])
1903 ])
1904 ])
1905 ])
1906 ;;
1907 esac
1908
1909 if test "x$lt_cv_dlopen" != xno; then
1910 enable_dlopen=yes
1911 else
1912 enable_dlopen=no
1913 fi
1914
1915 case $lt_cv_dlopen in
1916 dlopen)
1917 save_CPPFLAGS="$CPPFLAGS"
1918 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1919
1920 save_LDFLAGS="$LDFLAGS"
1921 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1922
1923 save_LIBS="$LIBS"
1924 LIBS="$lt_cv_dlopen_libs $LIBS"
1925
1926 AC_CACHE_CHECK([whether a program can dlopen itself],
1927 lt_cv_dlopen_self, [dnl
1928 _LT_TRY_DLOPEN_SELF(
1929 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1930 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1931 ])
1932
1933 if test "x$lt_cv_dlopen_self" = xyes; then
1934 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1935 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1936 lt_cv_dlopen_self_static, [dnl
1937 _LT_TRY_DLOPEN_SELF(
1938 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1939 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1940 ])
1941 fi
1942
1943 CPPFLAGS="$save_CPPFLAGS"
1944 LDFLAGS="$save_LDFLAGS"
1945 LIBS="$save_LIBS"
1946 ;;
1947 esac
1948
1949 case $lt_cv_dlopen_self in
1950 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1951 *) enable_dlopen_self=unknown ;;
1952 esac
1953
1954 case $lt_cv_dlopen_self_static in
1955 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1956 *) enable_dlopen_self_static=unknown ;;
1957 esac
1958 fi
1959 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1960 [Whether dlopen is supported])
1961 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1962 [Whether dlopen of programs is supported])
1963 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1964 [Whether dlopen of statically linked programs is supported])
1965 ])# LT_SYS_DLOPEN_SELF
1966
1967 # Old name:
1968 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1969 dnl aclocal-1.4 backwards compatibility:
1970 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1971
1972
1973 # _LT_COMPILER_C_O([TAGNAME])
1974 # ---------------------------
1975 # Check to see if options -c and -o are simultaneously supported by compiler.
1976 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1977 m4_defun([_LT_COMPILER_C_O],
1978 [m4_require([_LT_DECL_SED])dnl
1979 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1980 m4_require([_LT_TAG_COMPILER])dnl
1981 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1982 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1983 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1984 $RM -r conftest 2>/dev/null
1985 mkdir conftest
1986 cd conftest
1987 mkdir out
1988 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1989
1990 lt_compiler_flag="-o out/conftest2.$ac_objext"
1991 # Insert the option either (1) after the last *FLAGS variable, or
1992 # (2) before a word containing "conftest.", or (3) at the end.
1993 # Note that $ac_compile itself does not contain backslashes and begins
1994 # with a dollar sign (not a hyphen), so the echo should work correctly.
1995 lt_compile=`echo "$ac_compile" | $SED \
1996 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1997 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1998 -e 's:$: $lt_compiler_flag:'`
1999 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2000 (eval "$lt_compile" 2>out/conftest.err)
2001 ac_status=$?
2002 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2003 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2004 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2005 then
2006 # The compiler can only warn and ignore the option if not recognized
2007 # So say no if there are warnings
2008 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2009 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2010 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2011 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2012 fi
2013 fi
2014 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2015 $RM conftest*
2016 # SGI C++ compiler will create directory out/ii_files/ for
2017 # template instantiation
2018 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2019 $RM out/* && rmdir out
2020 cd ..
2021 $RM -r conftest
2022 $RM conftest*
2023 ])
2024 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2025 [Does compiler simultaneously support -c and -o options?])
2026 ])# _LT_COMPILER_C_O
2027
2028
2029 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2030 # ----------------------------------
2031 # Check to see if we can do hard links to lock some files if needed
2032 m4_defun([_LT_COMPILER_FILE_LOCKS],
2033 [m4_require([_LT_ENABLE_LOCK])dnl
2034 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2035 _LT_COMPILER_C_O([$1])
2036
2037 hard_links="nottested"
2038 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2039 # do not overwrite the value of need_locks provided by the user
2040 AC_MSG_CHECKING([if we can lock with hard links])
2041 hard_links=yes
2042 $RM conftest*
2043 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2044 touch conftest.a
2045 ln conftest.a conftest.b 2>&5 || hard_links=no
2046 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2047 AC_MSG_RESULT([$hard_links])
2048 if test "$hard_links" = no; then
2049 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2050 need_locks=warn
2051 fi
2052 else
2053 need_locks=no
2054 fi
2055 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2056 ])# _LT_COMPILER_FILE_LOCKS
2057
2058
2059 # _LT_CHECK_OBJDIR
2060 # ----------------
2061 m4_defun([_LT_CHECK_OBJDIR],
2062 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2063 [rm -f .libs 2>/dev/null
2064 mkdir .libs 2>/dev/null
2065 if test -d .libs; then
2066 lt_cv_objdir=.libs
2067 else
2068 # MS-DOS does not allow filenames that begin with a dot.
2069 lt_cv_objdir=_libs
2070 fi
2071 rmdir .libs 2>/dev/null])
2072 objdir=$lt_cv_objdir
2073 _LT_DECL([], [objdir], [0],
2074 [The name of the directory that contains temporary libtool files])dnl
2075 m4_pattern_allow([LT_OBJDIR])dnl
2076 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2077 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2078 ])# _LT_CHECK_OBJDIR
2079
2080
2081 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2082 # --------------------------------------
2083 # Check hardcoding attributes.
2084 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2085 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2086 _LT_TAGVAR(hardcode_action, $1)=
2087 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2088 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2089 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2090
2091 # We can hardcode non-existent directories.
2092 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2093 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2094 # have to relink, otherwise we might link with an installed library
2095 # when we should be linking with a yet-to-be-installed one
2096 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2097 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2098 # Linking always hardcodes the temporary library directory.
2099 _LT_TAGVAR(hardcode_action, $1)=relink
2100 else
2101 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2102 _LT_TAGVAR(hardcode_action, $1)=immediate
2103 fi
2104 else
2105 # We cannot hardcode anything, or else we can only hardcode existing
2106 # directories.
2107 _LT_TAGVAR(hardcode_action, $1)=unsupported
2108 fi
2109 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2110
2111 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2112 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2113 # Fast installation is not supported
2114 enable_fast_install=no
2115 elif test "$shlibpath_overrides_runpath" = yes ||
2116 test "$enable_shared" = no; then
2117 # Fast installation is not necessary
2118 enable_fast_install=needless
2119 fi
2120 _LT_TAGDECL([], [hardcode_action], [0],
2121 [How to hardcode a shared library path into an executable])
2122 ])# _LT_LINKER_HARDCODE_LIBPATH
2123
2124
2125 # _LT_CMD_STRIPLIB
2126 # ----------------
2127 m4_defun([_LT_CMD_STRIPLIB],
2128 [m4_require([_LT_DECL_EGREP])
2129 striplib=
2130 old_striplib=
2131 AC_MSG_CHECKING([whether stripping libraries is possible])
2132 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2133 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2134 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2135 AC_MSG_RESULT([yes])
2136 else
2137 # FIXME - insert some real tests, host_os isn't really good enough
2138 case $host_os in
2139 darwin*)
2140 if test -n "$STRIP" ; then
2141 striplib="$STRIP -x"
2142 old_striplib="$STRIP -S"
2143 AC_MSG_RESULT([yes])
2144 else
2145 AC_MSG_RESULT([no])
2146 fi
2147 ;;
2148 *)
2149 AC_MSG_RESULT([no])
2150 ;;
2151 esac
2152 fi
2153 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2154 _LT_DECL([], [striplib], [1])
2155 ])# _LT_CMD_STRIPLIB
2156
2157
2158 # _LT_SYS_DYNAMIC_LINKER([TAG])
2159 # -----------------------------
2160 # PORTME Fill in your ld.so characteristics
2161 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2162 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2163 m4_require([_LT_DECL_EGREP])dnl
2164 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2165 m4_require([_LT_DECL_OBJDUMP])dnl
2166 m4_require([_LT_DECL_SED])dnl
2167 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2168 AC_MSG_CHECKING([dynamic linker characteristics])
2169 m4_if([$1],
2170 [], [
2171 if test "$GCC" = yes; then
2172 case $host_os in
2173 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2174 *) lt_awk_arg="/^libraries:/" ;;
2175 esac
2176 case $host_os in
2177 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2178 *) lt_sed_strip_eq="s,=/,/,g" ;;
2179 esac
2180 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2181 case $lt_search_path_spec in
2182 *\;*)
2183 # if the path contains ";" then we assume it to be the separator
2184 # otherwise default to the standard path separator (i.e. ":") - it is
2185 # assumed that no part of a normal pathname contains ";" but that should
2186 # okay in the real world where ";" in dirpaths is itself problematic.
2187 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2188 ;;
2189 *)
2190 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2191 ;;
2192 esac
2193 # Ok, now we have the path, separated by spaces, we can step through it
2194 # and add multilib dir if necessary.
2195 lt_tmp_lt_search_path_spec=
2196 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2197 for lt_sys_path in $lt_search_path_spec; do
2198 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2199 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2200 else
2201 test -d "$lt_sys_path" && \
2202 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2203 fi
2204 done
2205 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2206 BEGIN {RS=" "; FS="/|\n";} {
2207 lt_foo="";
2208 lt_count=0;
2209 for (lt_i = NF; lt_i > 0; lt_i--) {
2210 if ($lt_i != "" && $lt_i != ".") {
2211 if ($lt_i == "..") {
2212 lt_count++;
2213 } else {
2214 if (lt_count == 0) {
2215 lt_foo="/" $lt_i lt_foo;
2216 } else {
2217 lt_count--;
2218 }
2219 }
2220 }
2221 }
2222 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2223 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2224 }'`
2225 # AWK program above erroneously prepends '/' to C:/dos/paths
2226 # for these hosts.
2227 case $host_os in
2228 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2229 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2230 esac
2231 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2232 else
2233 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2234 fi])
2235 library_names_spec=
2236 libname_spec='lib$name'
2237 soname_spec=
2238 shrext_cmds=".so"
2239 postinstall_cmds=
2240 postuninstall_cmds=
2241 finish_cmds=
2242 finish_eval=
2243 shlibpath_var=
2244 shlibpath_overrides_runpath=unknown
2245 version_type=none
2246 dynamic_linker="$host_os ld.so"
2247 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2248 need_lib_prefix=unknown
2249 hardcode_into_libs=no
2250
2251 # when you set need_version to no, make sure it does not cause -set_version
2252 # flags to be left without arguments
2253 need_version=unknown
2254
2255 case $host_os in
2256 aix3*)
2257 version_type=linux # correct to gnu/linux during the next big refactor
2258 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2259 shlibpath_var=LIBPATH
2260
2261 # AIX 3 has no versioning support, so we append a major version to the name.
2262 soname_spec='${libname}${release}${shared_ext}$major'
2263 ;;
2264
2265 aix[[4-9]]*)
2266 version_type=linux # correct to gnu/linux during the next big refactor
2267 need_lib_prefix=no
2268 need_version=no
2269 hardcode_into_libs=yes
2270 if test "$host_cpu" = ia64; then
2271 # AIX 5 supports IA64
2272 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2273 shlibpath_var=LD_LIBRARY_PATH
2274 else
2275 # With GCC up to 2.95.x, collect2 would create an import file
2276 # for dependence libraries. The import file would start with
2277 # the line `#! .'. This would cause the generated library to
2278 # depend on `.', always an invalid library. This was fixed in
2279 # development snapshots of GCC prior to 3.0.
2280 case $host_os in
2281 aix4 | aix4.[[01]] | aix4.[[01]].*)
2282 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2283 echo ' yes '
2284 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2285 :
2286 else
2287 can_build_shared=no
2288 fi
2289 ;;
2290 esac
2291 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2292 # soname into executable. Probably we can add versioning support to
2293 # collect2, so additional links can be useful in future.
2294 if test "$aix_use_runtimelinking" = yes; then
2295 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2296 # instead of lib<name>.a to let people know that these are not
2297 # typical AIX shared libraries.
2298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2299 else
2300 # We preserve .a as extension for shared libraries through AIX4.2
2301 # and later when we are not doing run time linking.
2302 library_names_spec='${libname}${release}.a $libname.a'
2303 soname_spec='${libname}${release}${shared_ext}$major'
2304 fi
2305 shlibpath_var=LIBPATH
2306 fi
2307 ;;
2308
2309 amigaos*)
2310 case $host_cpu in
2311 powerpc)
2312 # Since July 2007 AmigaOS4 officially supports .so libraries.
2313 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2314 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2315 ;;
2316 m68k)
2317 library_names_spec='$libname.ixlibrary $libname.a'
2318 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2319 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
2320 ;;
2321 esac
2322 ;;
2323
2324 beos*)
2325 library_names_spec='${libname}${shared_ext}'
2326 dynamic_linker="$host_os ld.so"
2327 shlibpath_var=LIBRARY_PATH
2328 ;;
2329
2330 bsdi[[45]]*)
2331 version_type=linux # correct to gnu/linux during the next big refactor
2332 need_version=no
2333 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2334 soname_spec='${libname}${release}${shared_ext}$major'
2335 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2336 shlibpath_var=LD_LIBRARY_PATH
2337 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2338 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2339 # the default ld.so.conf also contains /usr/contrib/lib and
2340 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2341 # libtool to hard-code these into programs
2342 ;;
2343
2344 cygwin* | mingw* | pw32* | cegcc*)
2345 version_type=windows
2346 shrext_cmds=".dll"
2347 need_version=no
2348 need_lib_prefix=no
2349
2350 case $GCC,$cc_basename in
2351 yes,*)
2352 # gcc
2353 library_names_spec='$libname.dll.a'
2354 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2355 postinstall_cmds='base_file=`basename \${file}`~
2356 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2357 dldir=$destdir/`dirname \$dlpath`~
2358 test -d \$dldir || mkdir -p \$dldir~
2359 $install_prog $dir/$dlname \$dldir/$dlname~
2360 chmod a+x \$dldir/$dlname~
2361 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2362 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2363 fi'
2364 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2365 dlpath=$dir/\$dldll~
2366 $RM \$dlpath'
2367 shlibpath_overrides_runpath=yes
2368
2369 case $host_os in
2370 cygwin*)
2371 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2372 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2373 m4_if([$1], [],[
2374 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2375 ;;
2376 mingw* | cegcc*)
2377 # MinGW DLLs use traditional 'lib' prefix
2378 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2379 ;;
2380 pw32*)
2381 # pw32 DLLs use 'pw' prefix rather than 'lib'
2382 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2383 ;;
2384 esac
2385 dynamic_linker='Win32 ld.exe'
2386 ;;
2387
2388 *,cl*)
2389 # Native MSVC
2390 libname_spec='$name'
2391 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2392 library_names_spec='${libname}.dll.lib'
2393
2394 case $build_os in
2395 mingw*)
2396 sys_lib_search_path_spec=
2397 lt_save_ifs=$IFS
2398 IFS=';'
2399 for lt_path in $LIB
2400 do
2401 IFS=$lt_save_ifs
2402 # Let DOS variable expansion print the short 8.3 style file name.
2403 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2404 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2405 done
2406 IFS=$lt_save_ifs
2407 # Convert to MSYS style.
2408 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2409 ;;
2410 cygwin*)
2411 # Convert to unix form, then to dos form, then back to unix form
2412 # but this time dos style (no spaces!) so that the unix form looks
2413 # like /cygdrive/c/PROGRA~1:/cygdr...
2414 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2415 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2416 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2417 ;;
2418 *)
2419 sys_lib_search_path_spec="$LIB"
2420 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2421 # It is most probably a Windows format PATH.
2422 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2423 else
2424 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2425 fi
2426 # FIXME: find the short name or the path components, as spaces are
2427 # common. (e.g. "Program Files" -> "PROGRA~1")
2428 ;;
2429 esac
2430
2431 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2432 postinstall_cmds='base_file=`basename \${file}`~
2433 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2434 dldir=$destdir/`dirname \$dlpath`~
2435 test -d \$dldir || mkdir -p \$dldir~
2436 $install_prog $dir/$dlname \$dldir/$dlname'
2437 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2438 dlpath=$dir/\$dldll~
2439 $RM \$dlpath'
2440 shlibpath_overrides_runpath=yes
2441 dynamic_linker='Win32 link.exe'
2442 ;;
2443
2444 *)
2445 # Assume MSVC wrapper
2446 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2447 dynamic_linker='Win32 ld.exe'
2448 ;;
2449 esac
2450 # FIXME: first we should search . and the directory the executable is in
2451 shlibpath_var=PATH
2452 ;;
2453
2454 darwin* | rhapsody*)
2455 dynamic_linker="$host_os dyld"
2456 version_type=darwin
2457 need_lib_prefix=no
2458 need_version=no
2459 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2460 soname_spec='${libname}${release}${major}$shared_ext'
2461 shlibpath_overrides_runpath=yes
2462 shlibpath_var=DYLD_LIBRARY_PATH
2463 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2464 m4_if([$1], [],[
2465 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2466 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2467 ;;
2468
2469 dgux*)
2470 version_type=linux # correct to gnu/linux during the next big refactor
2471 need_lib_prefix=no
2472 need_version=no
2473 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2474 soname_spec='${libname}${release}${shared_ext}$major'
2475 shlibpath_var=LD_LIBRARY_PATH
2476 ;;
2477
2478 freebsd* | dragonfly*)
2479 # DragonFly does not have aout. When/if they implement a new
2480 # versioning mechanism, adjust this.
2481 if test -x /usr/bin/objformat; then
2482 objformat=`/usr/bin/objformat`
2483 else
2484 case $host_os in
2485 freebsd[[23]].*) objformat=aout ;;
2486 *) objformat=elf ;;
2487 esac
2488 fi
2489 version_type=freebsd-$objformat
2490 case $version_type in
2491 freebsd-elf*)
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2493 need_version=no
2494 need_lib_prefix=no
2495 ;;
2496 freebsd-*)
2497 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2498 need_version=yes
2499 ;;
2500 esac
2501 shlibpath_var=LD_LIBRARY_PATH
2502 case $host_os in
2503 freebsd2.*)
2504 shlibpath_overrides_runpath=yes
2505 ;;
2506 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2507 shlibpath_overrides_runpath=yes
2508 hardcode_into_libs=yes
2509 ;;
2510 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2511 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2512 shlibpath_overrides_runpath=no
2513 hardcode_into_libs=yes
2514 ;;
2515 *) # from 4.6 on, and DragonFly
2516 shlibpath_overrides_runpath=yes
2517 hardcode_into_libs=yes
2518 ;;
2519 esac
2520 ;;
2521
2522 haiku*)
2523 version_type=linux # correct to gnu/linux during the next big refactor
2524 need_lib_prefix=no
2525 need_version=no
2526 dynamic_linker="$host_os runtime_loader"
2527 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2528 soname_spec='${libname}${release}${shared_ext}$major'
2529 shlibpath_var=LIBRARY_PATH
2530 shlibpath_overrides_runpath=yes
2531 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2532 hardcode_into_libs=yes
2533 ;;
2534
2535 hpux9* | hpux10* | hpux11*)
2536 # Give a soname corresponding to the major version so that dld.sl refuses to
2537 # link against other versions.
2538 version_type=sunos
2539 need_lib_prefix=no
2540 need_version=no
2541 case $host_cpu in
2542 ia64*)
2543 shrext_cmds='.so'
2544 hardcode_into_libs=yes
2545 dynamic_linker="$host_os dld.so"
2546 shlibpath_var=LD_LIBRARY_PATH
2547 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2549 soname_spec='${libname}${release}${shared_ext}$major'
2550 if test "X$HPUX_IA64_MODE" = X32; then
2551 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2552 else
2553 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2554 fi
2555 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2556 ;;
2557 hppa*64*)
2558 shrext_cmds='.sl'
2559 hardcode_into_libs=yes
2560 dynamic_linker="$host_os dld.sl"
2561 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2562 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2564 soname_spec='${libname}${release}${shared_ext}$major'
2565 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2566 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2567 ;;
2568 *)
2569 shrext_cmds='.sl'
2570 dynamic_linker="$host_os dld.sl"
2571 shlibpath_var=SHLIB_PATH
2572 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2573 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2574 soname_spec='${libname}${release}${shared_ext}$major'
2575 ;;
2576 esac
2577 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2578 postinstall_cmds='chmod 555 $lib'
2579 # or fails outright, so override atomically:
2580 install_override_mode=555
2581 ;;
2582
2583 interix[[3-9]]*)
2584 version_type=linux # correct to gnu/linux during the next big refactor
2585 need_lib_prefix=no
2586 need_version=no
2587 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2588 soname_spec='${libname}${release}${shared_ext}$major'
2589 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2590 shlibpath_var=LD_LIBRARY_PATH
2591 shlibpath_overrides_runpath=no
2592 hardcode_into_libs=yes
2593 ;;
2594
2595 irix5* | irix6* | nonstopux*)
2596 case $host_os in
2597 nonstopux*) version_type=nonstopux ;;
2598 *)
2599 if test "$lt_cv_prog_gnu_ld" = yes; then
2600 version_type=linux # correct to gnu/linux during the next big refactor
2601 else
2602 version_type=irix
2603 fi ;;
2604 esac
2605 need_lib_prefix=no
2606 need_version=no
2607 soname_spec='${libname}${release}${shared_ext}$major'
2608 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2609 case $host_os in
2610 irix5* | nonstopux*)
2611 libsuff= shlibsuff=
2612 ;;
2613 *)
2614 case $LD in # libtool.m4 will add one of these switches to LD
2615 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2616 libsuff= shlibsuff= libmagic=32-bit;;
2617 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2618 libsuff=32 shlibsuff=N32 libmagic=N32;;
2619 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2620 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2621 *) libsuff= shlibsuff= libmagic=never-match;;
2622 esac
2623 ;;
2624 esac
2625 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2626 shlibpath_overrides_runpath=no
2627 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2628 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2629 hardcode_into_libs=yes
2630 ;;
2631
2632 # No shared lib support for Linux oldld, aout, or coff.
2633 linux*oldld* | linux*aout* | linux*coff*)
2634 dynamic_linker=no
2635 ;;
2636
2637 # This must be glibc/ELF.
2638 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2639 version_type=linux # correct to gnu/linux during the next big refactor
2640 need_lib_prefix=no
2641 need_version=no
2642 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2643 soname_spec='${libname}${release}${shared_ext}$major'
2644 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2645 shlibpath_var=LD_LIBRARY_PATH
2646 shlibpath_overrides_runpath=no
2647
2648 # Some binutils ld are patched to set DT_RUNPATH
2649 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2650 [lt_cv_shlibpath_overrides_runpath=no
2651 save_LDFLAGS=$LDFLAGS
2652 save_libdir=$libdir
2653 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2654 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2655 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2656 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2657 [lt_cv_shlibpath_overrides_runpath=yes])])
2658 LDFLAGS=$save_LDFLAGS
2659 libdir=$save_libdir
2660 ])
2661 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2662
2663 # This implies no fast_install, which is unacceptable.
2664 # Some rework will be needed to allow for fast_install
2665 # before this can be enabled.
2666 hardcode_into_libs=yes
2667
2668 # Append ld.so.conf contents to the search path
2669 if test -f /etc/ld.so.conf; then
2670 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2671 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2672 fi
2673
2674 # We used to test for /lib/ld.so.1 and disable shared libraries on
2675 # powerpc, because MkLinux only supported shared libraries with the
2676 # GNU dynamic linker. Since this was broken with cross compilers,
2677 # most powerpc-linux boxes support dynamic linking these days and
2678 # people can always --disable-shared, the test was removed, and we
2679 # assume the GNU/Linux dynamic linker is in use.
2680 dynamic_linker='GNU/Linux ld.so'
2681 ;;
2682
2683 netbsdelf*-gnu)
2684 version_type=linux
2685 need_lib_prefix=no
2686 need_version=no
2687 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2688 soname_spec='${libname}${release}${shared_ext}$major'
2689 shlibpath_var=LD_LIBRARY_PATH
2690 shlibpath_overrides_runpath=no
2691 hardcode_into_libs=yes
2692 dynamic_linker='NetBSD ld.elf_so'
2693 ;;
2694
2695 netbsd*)
2696 version_type=sunos
2697 need_lib_prefix=no
2698 need_version=no
2699 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2700 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2701 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2702 dynamic_linker='NetBSD (a.out) ld.so'
2703 else
2704 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2705 soname_spec='${libname}${release}${shared_ext}$major'
2706 dynamic_linker='NetBSD ld.elf_so'
2707 fi
2708 shlibpath_var=LD_LIBRARY_PATH
2709 shlibpath_overrides_runpath=yes
2710 hardcode_into_libs=yes
2711 ;;
2712
2713 newsos6)
2714 version_type=linux # correct to gnu/linux during the next big refactor
2715 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2716 shlibpath_var=LD_LIBRARY_PATH
2717 shlibpath_overrides_runpath=yes
2718 ;;
2719
2720 *nto* | *qnx*)
2721 version_type=qnx
2722 need_lib_prefix=no
2723 need_version=no
2724 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2725 soname_spec='${libname}${release}${shared_ext}$major'
2726 shlibpath_var=LD_LIBRARY_PATH
2727 shlibpath_overrides_runpath=no
2728 hardcode_into_libs=yes
2729 dynamic_linker='ldqnx.so'
2730 ;;
2731
2732 openbsd*)
2733 version_type=sunos
2734 sys_lib_dlsearch_path_spec="/usr/lib"
2735 need_lib_prefix=no
2736 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2737 case $host_os in
2738 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2739 *) need_version=no ;;
2740 esac
2741 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2742 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2743 shlibpath_var=LD_LIBRARY_PATH
2744 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2745 case $host_os in
2746 openbsd2.[[89]] | openbsd2.[[89]].*)
2747 shlibpath_overrides_runpath=no
2748 ;;
2749 *)
2750 shlibpath_overrides_runpath=yes
2751 ;;
2752 esac
2753 else
2754 shlibpath_overrides_runpath=yes
2755 fi
2756 ;;
2757
2758 os2*)
2759 libname_spec='$name'
2760 shrext_cmds=".dll"
2761 need_lib_prefix=no
2762 library_names_spec='$libname${shared_ext} $libname.a'
2763 dynamic_linker='OS/2 ld.exe'
2764 shlibpath_var=LIBPATH
2765 ;;
2766
2767 osf3* | osf4* | osf5*)
2768 version_type=osf
2769 need_lib_prefix=no
2770 need_version=no
2771 soname_spec='${libname}${release}${shared_ext}$major'
2772 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2773 shlibpath_var=LD_LIBRARY_PATH
2774 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2775 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2776 ;;
2777
2778 rdos*)
2779 dynamic_linker=no
2780 ;;
2781
2782 solaris*)
2783 version_type=linux # correct to gnu/linux during the next big refactor
2784 need_lib_prefix=no
2785 need_version=no
2786 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2787 soname_spec='${libname}${release}${shared_ext}$major'
2788 shlibpath_var=LD_LIBRARY_PATH
2789 shlibpath_overrides_runpath=yes
2790 hardcode_into_libs=yes
2791 # ldd complains unless libraries are executable
2792 postinstall_cmds='chmod +x $lib'
2793 ;;
2794
2795 sunos4*)
2796 version_type=sunos
2797 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2798 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2799 shlibpath_var=LD_LIBRARY_PATH
2800 shlibpath_overrides_runpath=yes
2801 if test "$with_gnu_ld" = yes; then
2802 need_lib_prefix=no
2803 fi
2804 need_version=yes
2805 ;;
2806
2807 sysv4 | sysv4.3*)
2808 version_type=linux # correct to gnu/linux during the next big refactor
2809 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2810 soname_spec='${libname}${release}${shared_ext}$major'
2811 shlibpath_var=LD_LIBRARY_PATH
2812 case $host_vendor in
2813 sni)
2814 shlibpath_overrides_runpath=no
2815 need_lib_prefix=no
2816 runpath_var=LD_RUN_PATH
2817 ;;
2818 siemens)
2819 need_lib_prefix=no
2820 ;;
2821 motorola)
2822 need_lib_prefix=no
2823 need_version=no
2824 shlibpath_overrides_runpath=no
2825 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2826 ;;
2827 esac
2828 ;;
2829
2830 sysv4*MP*)
2831 if test -d /usr/nec ;then
2832 version_type=linux # correct to gnu/linux during the next big refactor
2833 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2834 soname_spec='$libname${shared_ext}.$major'
2835 shlibpath_var=LD_LIBRARY_PATH
2836 fi
2837 ;;
2838
2839 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2840 version_type=freebsd-elf
2841 need_lib_prefix=no
2842 need_version=no
2843 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2844 soname_spec='${libname}${release}${shared_ext}$major'
2845 shlibpath_var=LD_LIBRARY_PATH
2846 shlibpath_overrides_runpath=yes
2847 hardcode_into_libs=yes
2848 if test "$with_gnu_ld" = yes; then
2849 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2850 else
2851 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2852 case $host_os in
2853 sco3.2v5*)
2854 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2855 ;;
2856 esac
2857 fi
2858 sys_lib_dlsearch_path_spec='/usr/lib'
2859 ;;
2860
2861 tpf*)
2862 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2863 version_type=linux # correct to gnu/linux during the next big refactor
2864 need_lib_prefix=no
2865 need_version=no
2866 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2867 shlibpath_var=LD_LIBRARY_PATH
2868 shlibpath_overrides_runpath=no
2869 hardcode_into_libs=yes
2870 ;;
2871
2872 uts4*)
2873 version_type=linux # correct to gnu/linux during the next big refactor
2874 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2875 soname_spec='${libname}${release}${shared_ext}$major'
2876 shlibpath_var=LD_LIBRARY_PATH
2877 ;;
2878
2879 *)
2880 dynamic_linker=no
2881 ;;
2882 esac
2883 AC_MSG_RESULT([$dynamic_linker])
2884 test "$dynamic_linker" = no && can_build_shared=no
2885
2886 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2887 if test "$GCC" = yes; then
2888 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2889 fi
2890
2891 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2892 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2893 fi
2894 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2895 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2896 fi
2897
2898 _LT_DECL([], [variables_saved_for_relink], [1],
2899 [Variables whose values should be saved in libtool wrapper scripts and
2900 restored at link time])
2901 _LT_DECL([], [need_lib_prefix], [0],
2902 [Do we need the "lib" prefix for modules?])
2903 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2904 _LT_DECL([], [version_type], [0], [Library versioning type])
2905 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2906 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2907 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2908 [Is shlibpath searched before the hard-coded library search path?])
2909 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2910 _LT_DECL([], [library_names_spec], [1],
2911 [[List of archive names. First name is the real one, the rest are links.
2912 The last name is the one that the linker finds with -lNAME]])
2913 _LT_DECL([], [soname_spec], [1],
2914 [[The coded name of the library, if different from the real name]])
2915 _LT_DECL([], [install_override_mode], [1],
2916 [Permission mode override for installation of shared libraries])
2917 _LT_DECL([], [postinstall_cmds], [2],
2918 [Command to use after installation of a shared archive])
2919 _LT_DECL([], [postuninstall_cmds], [2],
2920 [Command to use after uninstallation of a shared archive])
2921 _LT_DECL([], [finish_cmds], [2],
2922 [Commands used to finish a libtool library installation in a directory])
2923 _LT_DECL([], [finish_eval], [1],
2924 [[As "finish_cmds", except a single script fragment to be evaled but
2925 not shown]])
2926 _LT_DECL([], [hardcode_into_libs], [0],
2927 [Whether we should hardcode library paths into libraries])
2928 _LT_DECL([], [sys_lib_search_path_spec], [2],
2929 [Compile-time system search path for libraries])
2930 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2931 [Run-time system search path for libraries])
2932 ])# _LT_SYS_DYNAMIC_LINKER
2933
2934
2935 # _LT_PATH_TOOL_PREFIX(TOOL)
2936 # --------------------------
2937 # find a file program which can recognize shared library
2938 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2939 [m4_require([_LT_DECL_EGREP])dnl
2940 AC_MSG_CHECKING([for $1])
2941 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2942 [case $MAGIC_CMD in
2943 [[\\/*] | ?:[\\/]*])
2944 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2945 ;;
2946 *)
2947 lt_save_MAGIC_CMD="$MAGIC_CMD"
2948 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2949 dnl $ac_dummy forces splitting on constant user-supplied paths.
2950 dnl POSIX.2 word splitting is done only on the output of word expansions,
2951 dnl not every word. This closes a longstanding sh security hole.
2952 ac_dummy="m4_if([$2], , $PATH, [$2])"
2953 for ac_dir in $ac_dummy; do
2954 IFS="$lt_save_ifs"
2955 test -z "$ac_dir" && ac_dir=.
2956 if test -f $ac_dir/$1; then
2957 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2958 if test -n "$file_magic_test_file"; then
2959 case $deplibs_check_method in
2960 "file_magic "*)
2961 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2962 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2963 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2964 $EGREP "$file_magic_regex" > /dev/null; then
2965 :
2966 else
2967 cat <<_LT_EOF 1>&2
2968
2969 *** Warning: the command libtool uses to detect shared libraries,
2970 *** $file_magic_cmd, produces output that libtool cannot recognize.
2971 *** The result is that libtool may fail to recognize shared libraries
2972 *** as such. This will affect the creation of libtool libraries that
2973 *** depend on shared libraries, but programs linked with such libtool
2974 *** libraries will work regardless of this problem. Nevertheless, you
2975 *** may want to report the problem to your system manager and/or to
2976 *** bug-libtool@gnu.org
2977
2978 _LT_EOF
2979 fi ;;
2980 esac
2981 fi
2982 break
2983 fi
2984 done
2985 IFS="$lt_save_ifs"
2986 MAGIC_CMD="$lt_save_MAGIC_CMD"
2987 ;;
2988 esac])
2989 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2990 if test -n "$MAGIC_CMD"; then
2991 AC_MSG_RESULT($MAGIC_CMD)
2992 else
2993 AC_MSG_RESULT(no)
2994 fi
2995 _LT_DECL([], [MAGIC_CMD], [0],
2996 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2997 ])# _LT_PATH_TOOL_PREFIX
2998
2999 # Old name:
3000 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3001 dnl aclocal-1.4 backwards compatibility:
3002 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3003
3004
3005 # _LT_PATH_MAGIC
3006 # --------------
3007 # find a file program which can recognize a shared library
3008 m4_defun([_LT_PATH_MAGIC],
3009 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3010 if test -z "$lt_cv_path_MAGIC_CMD"; then
3011 if test -n "$ac_tool_prefix"; then
3012 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3013 else
3014 MAGIC_CMD=:
3015 fi
3016 fi
3017 ])# _LT_PATH_MAGIC
3018
3019
3020 # LT_PATH_LD
3021 # ----------
3022 # find the pathname to the GNU or non-GNU linker
3023 AC_DEFUN([LT_PATH_LD],
3024 [AC_REQUIRE([AC_PROG_CC])dnl
3025 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3026 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3027 m4_require([_LT_DECL_SED])dnl
3028 m4_require([_LT_DECL_EGREP])dnl
3029 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3030
3031 AC_ARG_WITH([gnu-ld],
3032 [AS_HELP_STRING([--with-gnu-ld],
3033 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3034 [test "$withval" = no || with_gnu_ld=yes],
3035 [with_gnu_ld=no])dnl
3036
3037 ac_prog=ld
3038 if test "$GCC" = yes; then
3039 # Check if gcc -print-prog-name=ld gives a path.
3040 AC_MSG_CHECKING([for ld used by $CC])
3041 case $host in
3042 *-*-mingw*)
3043 # gcc leaves a trailing carriage return which upsets mingw
3044 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3045 *)
3046 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3047 esac
3048 case $ac_prog in
3049 # Accept absolute paths.
3050 [[\\/]]* | ?:[[\\/]]*)
3051 re_direlt='/[[^/]][[^/]]*/\.\./'
3052 # Canonicalize the pathname of ld
3053 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3054 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3055 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3056 done
3057 test -z "$LD" && LD="$ac_prog"
3058 ;;
3059 "")
3060 # If it fails, then pretend we aren't using GCC.
3061 ac_prog=ld
3062 ;;
3063 *)
3064 # If it is relative, then search for the first ld in PATH.
3065 with_gnu_ld=unknown
3066 ;;
3067 esac
3068 elif test "$with_gnu_ld" = yes; then
3069 AC_MSG_CHECKING([for GNU ld])
3070 else
3071 AC_MSG_CHECKING([for non-GNU ld])
3072 fi
3073 AC_CACHE_VAL(lt_cv_path_LD,
3074 [if test -z "$LD"; then
3075 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3076 for ac_dir in $PATH; do
3077 IFS="$lt_save_ifs"
3078 test -z "$ac_dir" && ac_dir=.
3079 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3080 lt_cv_path_LD="$ac_dir/$ac_prog"
3081 # Check to see if the program is GNU ld. I'd rather use --version,
3082 # but apparently some variants of GNU ld only accept -v.
3083 # Break only if it was the GNU/non-GNU ld that we prefer.
3084 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3085 *GNU* | *'with BFD'*)
3086 test "$with_gnu_ld" != no && break
3087 ;;
3088 *)
3089 test "$with_gnu_ld" != yes && break
3090 ;;
3091 esac
3092 fi
3093 done
3094 IFS="$lt_save_ifs"
3095 else
3096 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3097 fi])
3098 LD="$lt_cv_path_LD"
3099 if test -n "$LD"; then
3100 AC_MSG_RESULT($LD)
3101 else
3102 AC_MSG_RESULT(no)
3103 fi
3104 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3105 _LT_PATH_LD_GNU
3106 AC_SUBST([LD])
3107
3108 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3109 ])# LT_PATH_LD
3110
3111 # Old names:
3112 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3113 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3114 dnl aclocal-1.4 backwards compatibility:
3115 dnl AC_DEFUN([AM_PROG_LD], [])
3116 dnl AC_DEFUN([AC_PROG_LD], [])
3117
3118
3119 # _LT_PATH_LD_GNU
3120 #- --------------
3121 m4_defun([_LT_PATH_LD_GNU],
3122 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3123 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3124 case `$LD -v 2>&1 </dev/null` in
3125 *GNU* | *'with BFD'*)
3126 lt_cv_prog_gnu_ld=yes
3127 ;;
3128 *)
3129 lt_cv_prog_gnu_ld=no
3130 ;;
3131 esac])
3132 with_gnu_ld=$lt_cv_prog_gnu_ld
3133 ])# _LT_PATH_LD_GNU
3134
3135
3136 # _LT_CMD_RELOAD
3137 # --------------
3138 # find reload flag for linker
3139 # -- PORTME Some linkers may need a different reload flag.
3140 m4_defun([_LT_CMD_RELOAD],
3141 [AC_CACHE_CHECK([for $LD option to reload object files],
3142 lt_cv_ld_reload_flag,
3143 [lt_cv_ld_reload_flag='-r'])
3144 reload_flag=$lt_cv_ld_reload_flag
3145 case $reload_flag in
3146 "" | " "*) ;;
3147 *) reload_flag=" $reload_flag" ;;
3148 esac
3149 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3150 case $host_os in
3151 cygwin* | mingw* | pw32* | cegcc*)
3152 if test "$GCC" != yes; then
3153 reload_cmds=false
3154 fi
3155 ;;
3156 darwin*)
3157 if test "$GCC" = yes; then
3158 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3159 else
3160 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3161 fi
3162 ;;
3163 esac
3164 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3165 _LT_TAGDECL([], [reload_cmds], [2])dnl
3166 ])# _LT_CMD_RELOAD
3167
3168
3169 # _LT_CHECK_MAGIC_METHOD
3170 # ----------------------
3171 # how to check for library dependencies
3172 # -- PORTME fill in with the dynamic library characteristics
3173 m4_defun([_LT_CHECK_MAGIC_METHOD],
3174 [m4_require([_LT_DECL_EGREP])
3175 m4_require([_LT_DECL_OBJDUMP])
3176 AC_CACHE_CHECK([how to recognize dependent libraries],
3177 lt_cv_deplibs_check_method,
3178 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3179 lt_cv_file_magic_test_file=
3180 lt_cv_deplibs_check_method='unknown'
3181 # Need to set the preceding variable on all platforms that support
3182 # interlibrary dependencies.
3183 # 'none' -- dependencies not supported.
3184 # `unknown' -- same as none, but documents that we really don't know.
3185 # 'pass_all' -- all dependencies passed with no checks.
3186 # 'test_compile' -- check by making test program.
3187 # 'file_magic [[regex]]' -- check by looking for files in library path
3188 # which responds to the $file_magic_cmd with a given extended regex.
3189 # If you have `file' or equivalent on your system and you're not sure
3190 # whether `pass_all' will *always* work, you probably want this one.
3191
3192 case $host_os in
3193 aix[[4-9]]*)
3194 lt_cv_deplibs_check_method=pass_all
3195 ;;
3196
3197 beos*)
3198 lt_cv_deplibs_check_method=pass_all
3199 ;;
3200
3201 bsdi[[45]]*)
3202 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3203 lt_cv_file_magic_cmd='/usr/bin/file -L'
3204 lt_cv_file_magic_test_file=/shlib/libc.so
3205 ;;
3206
3207 cygwin*)
3208 # func_win32_libid is a shell function defined in ltmain.sh
3209 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3210 lt_cv_file_magic_cmd='func_win32_libid'
3211 ;;
3212
3213 mingw* | pw32*)
3214 # Base MSYS/MinGW do not provide the 'file' command needed by
3215 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3216 # unless we find 'file', for example because we are cross-compiling.
3217 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3218 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3219 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3220 lt_cv_file_magic_cmd='func_win32_libid'
3221 else
3222 # Keep this pattern in sync with the one in func_win32_libid.
3223 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3224 lt_cv_file_magic_cmd='$OBJDUMP -f'
3225 fi
3226 ;;
3227
3228 cegcc*)
3229 # use the weaker test based on 'objdump'. See mingw*.
3230 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3231 lt_cv_file_magic_cmd='$OBJDUMP -f'
3232 ;;
3233
3234 darwin* | rhapsody*)
3235 lt_cv_deplibs_check_method=pass_all
3236 ;;
3237
3238 freebsd* | dragonfly*)
3239 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3240 case $host_cpu in
3241 i*86 )
3242 # Not sure whether the presence of OpenBSD here was a mistake.
3243 # Let's accept both of them until this is cleared up.
3244 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3245 lt_cv_file_magic_cmd=/usr/bin/file
3246 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3247 ;;
3248 esac
3249 else
3250 lt_cv_deplibs_check_method=pass_all
3251 fi
3252 ;;
3253
3254 haiku*)
3255 lt_cv_deplibs_check_method=pass_all
3256 ;;
3257
3258 hpux10.20* | hpux11*)
3259 lt_cv_file_magic_cmd=/usr/bin/file
3260 case $host_cpu in
3261 ia64*)
3262 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3263 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3264 ;;
3265 hppa*64*)
3266 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3267 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3268 ;;
3269 *)
3270 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3271 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3272 ;;
3273 esac
3274 ;;
3275
3276 interix[[3-9]]*)
3277 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3278 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3279 ;;
3280
3281 irix5* | irix6* | nonstopux*)
3282 case $LD in
3283 *-32|*"-32 ") libmagic=32-bit;;
3284 *-n32|*"-n32 ") libmagic=N32;;
3285 *-64|*"-64 ") libmagic=64-bit;;
3286 *) libmagic=never-match;;
3287 esac
3288 lt_cv_deplibs_check_method=pass_all
3289 ;;
3290
3291 # This must be glibc/ELF.
3292 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3293 lt_cv_deplibs_check_method=pass_all
3294 ;;
3295
3296 netbsd* | netbsdelf*-gnu)
3297 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3298 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3299 else
3300 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3301 fi
3302 ;;
3303
3304 newos6*)
3305 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3306 lt_cv_file_magic_cmd=/usr/bin/file
3307 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3308 ;;
3309
3310 *nto* | *qnx*)
3311 lt_cv_deplibs_check_method=pass_all
3312 ;;
3313
3314 openbsd*)
3315 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3316 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3317 else
3318 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3319 fi
3320 ;;
3321
3322 osf3* | osf4* | osf5*)
3323 lt_cv_deplibs_check_method=pass_all
3324 ;;
3325
3326 rdos*)
3327 lt_cv_deplibs_check_method=pass_all
3328 ;;
3329
3330 solaris*)
3331 lt_cv_deplibs_check_method=pass_all
3332 ;;
3333
3334 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3335 lt_cv_deplibs_check_method=pass_all
3336 ;;
3337
3338 sysv4 | sysv4.3*)
3339 case $host_vendor in
3340 motorola)
3341 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]]'
3342 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3343 ;;
3344 ncr)
3345 lt_cv_deplibs_check_method=pass_all
3346 ;;
3347 sequent)
3348 lt_cv_file_magic_cmd='/bin/file'
3349 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3350 ;;
3351 sni)
3352 lt_cv_file_magic_cmd='/bin/file'
3353 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3354 lt_cv_file_magic_test_file=/lib/libc.so
3355 ;;
3356 siemens)
3357 lt_cv_deplibs_check_method=pass_all
3358 ;;
3359 pc)
3360 lt_cv_deplibs_check_method=pass_all
3361 ;;
3362 esac
3363 ;;
3364
3365 tpf*)
3366 lt_cv_deplibs_check_method=pass_all
3367 ;;
3368 esac
3369 ])
3370
3371 file_magic_glob=
3372 want_nocaseglob=no
3373 if test "$build" = "$host"; then
3374 case $host_os in
3375 mingw* | pw32*)
3376 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3377 want_nocaseglob=yes
3378 else
3379 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3380 fi
3381 ;;
3382 esac
3383 fi
3384
3385 file_magic_cmd=$lt_cv_file_magic_cmd
3386 deplibs_check_method=$lt_cv_deplibs_check_method
3387 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3388
3389 _LT_DECL([], [deplibs_check_method], [1],
3390 [Method to check whether dependent libraries are shared objects])
3391 _LT_DECL([], [file_magic_cmd], [1],
3392 [Command to use when deplibs_check_method = "file_magic"])
3393 _LT_DECL([], [file_magic_glob], [1],
3394 [How to find potential files when deplibs_check_method = "file_magic"])
3395 _LT_DECL([], [want_nocaseglob], [1],
3396 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3397 ])# _LT_CHECK_MAGIC_METHOD
3398
3399
3400 # LT_PATH_NM
3401 # ----------
3402 # find the pathname to a BSD- or MS-compatible name lister
3403 AC_DEFUN([LT_PATH_NM],
3404 [AC_REQUIRE([AC_PROG_CC])dnl
3405 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3406 [if test -n "$NM"; then
3407 # Let the user override the test.
3408 lt_cv_path_NM="$NM"
3409 else
3410 lt_nm_to_check="${ac_tool_prefix}nm"
3411 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3412 lt_nm_to_check="$lt_nm_to_check nm"
3413 fi
3414 for lt_tmp_nm in $lt_nm_to_check; do
3415 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3416 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3417 IFS="$lt_save_ifs"
3418 test -z "$ac_dir" && ac_dir=.
3419 tmp_nm="$ac_dir/$lt_tmp_nm"
3420 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3421 # Check to see if the nm accepts a BSD-compat flag.
3422 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3423 # nm: unknown option "B" ignored
3424 # Tru64's nm complains that /dev/null is an invalid object file
3425 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3426 */dev/null* | *'Invalid file or object type'*)
3427 lt_cv_path_NM="$tmp_nm -B"
3428 break
3429 ;;
3430 *)
3431 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3432 */dev/null*)
3433 lt_cv_path_NM="$tmp_nm -p"
3434 break
3435 ;;
3436 *)
3437 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3438 continue # so that we can try to find one that supports BSD flags
3439 ;;
3440 esac
3441 ;;
3442 esac
3443 fi
3444 done
3445 IFS="$lt_save_ifs"
3446 done
3447 : ${lt_cv_path_NM=no}
3448 fi])
3449 if test "$lt_cv_path_NM" != "no"; then
3450 NM="$lt_cv_path_NM"
3451 else
3452 # Didn't find any BSD compatible name lister, look for dumpbin.
3453 if test -n "$DUMPBIN"; then :
3454 # Let the user override the test.
3455 else
3456 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3457 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3458 *COFF*)
3459 DUMPBIN="$DUMPBIN -symbols"
3460 ;;
3461 *)
3462 DUMPBIN=:
3463 ;;
3464 esac
3465 fi
3466 AC_SUBST([DUMPBIN])
3467 if test "$DUMPBIN" != ":"; then
3468 NM="$DUMPBIN"
3469 fi
3470 fi
3471 test -z "$NM" && NM=nm
3472 AC_SUBST([NM])
3473 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3474
3475 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3476 [lt_cv_nm_interface="BSD nm"
3477 echo "int some_variable = 0;" > conftest.$ac_ext
3478 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3479 (eval "$ac_compile" 2>conftest.err)
3480 cat conftest.err >&AS_MESSAGE_LOG_FD
3481 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3482 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3483 cat conftest.err >&AS_MESSAGE_LOG_FD
3484 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3485 cat conftest.out >&AS_MESSAGE_LOG_FD
3486 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3487 lt_cv_nm_interface="MS dumpbin"
3488 fi
3489 rm -f conftest*])
3490 ])# LT_PATH_NM
3491
3492 # Old names:
3493 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3494 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3495 dnl aclocal-1.4 backwards compatibility:
3496 dnl AC_DEFUN([AM_PROG_NM], [])
3497 dnl AC_DEFUN([AC_PROG_NM], [])
3498
3499 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3500 # --------------------------------
3501 # how to determine the name of the shared library
3502 # associated with a specific link library.
3503 # -- PORTME fill in with the dynamic library characteristics
3504 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3505 [m4_require([_LT_DECL_EGREP])
3506 m4_require([_LT_DECL_OBJDUMP])
3507 m4_require([_LT_DECL_DLLTOOL])
3508 AC_CACHE_CHECK([how to associate runtime and link libraries],
3509 lt_cv_sharedlib_from_linklib_cmd,
3510 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3511
3512 case $host_os in
3513 cygwin* | mingw* | pw32* | cegcc*)
3514 # two different shell functions defined in ltmain.sh
3515 # decide which to use based on capabilities of $DLLTOOL
3516 case `$DLLTOOL --help 2>&1` in
3517 *--identify-strict*)
3518 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3519 ;;
3520 *)
3521 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3522 ;;
3523 esac
3524 ;;
3525 *)
3526 # fallback: assume linklib IS sharedlib
3527 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3528 ;;
3529 esac
3530 ])
3531 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3532 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3533
3534 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3535 [Command to associate shared and link libraries])
3536 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3537
3538
3539 # _LT_PATH_MANIFEST_TOOL
3540 # ----------------------
3541 # locate the manifest tool
3542 m4_defun([_LT_PATH_MANIFEST_TOOL],
3543 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3544 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3545 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3546 [lt_cv_path_mainfest_tool=no
3547 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3548 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3549 cat conftest.err >&AS_MESSAGE_LOG_FD
3550 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3551 lt_cv_path_mainfest_tool=yes
3552 fi
3553 rm -f conftest*])
3554 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3555 MANIFEST_TOOL=:
3556 fi
3557 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3558 ])# _LT_PATH_MANIFEST_TOOL
3559
3560
3561 # LT_LIB_M
3562 # --------
3563 # check for math library
3564 AC_DEFUN([LT_LIB_M],
3565 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3566 LIBM=
3567 case $host in
3568 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3569 # These system don't have libm, or don't need it
3570 ;;
3571 *-ncr-sysv4.3*)
3572 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3573 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3574 ;;
3575 *)
3576 AC_CHECK_LIB(m, cos, LIBM="-lm")
3577 ;;
3578 esac
3579 AC_SUBST([LIBM])
3580 ])# LT_LIB_M
3581
3582 # Old name:
3583 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3584 dnl aclocal-1.4 backwards compatibility:
3585 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3586
3587
3588 # _LT_COMPILER_NO_RTTI([TAGNAME])
3589 # -------------------------------
3590 m4_defun([_LT_COMPILER_NO_RTTI],
3591 [m4_require([_LT_TAG_COMPILER])dnl
3592
3593 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3594
3595 if test "$GCC" = yes; then
3596 case $cc_basename in
3597 nvcc*)
3598 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3599 *)
3600 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3601 esac
3602
3603 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3604 lt_cv_prog_compiler_rtti_exceptions,
3605 [-fno-rtti -fno-exceptions], [],
3606 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3607 fi
3608 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3609 [Compiler flag to turn off builtin functions])
3610 ])# _LT_COMPILER_NO_RTTI
3611
3612
3613 # _LT_CMD_GLOBAL_SYMBOLS
3614 # ----------------------
3615 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3616 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3617 AC_REQUIRE([AC_PROG_CC])dnl
3618 AC_REQUIRE([AC_PROG_AWK])dnl
3619 AC_REQUIRE([LT_PATH_NM])dnl
3620 AC_REQUIRE([LT_PATH_LD])dnl
3621 m4_require([_LT_DECL_SED])dnl
3622 m4_require([_LT_DECL_EGREP])dnl
3623 m4_require([_LT_TAG_COMPILER])dnl
3624
3625 # Check for command to grab the raw symbol name followed by C symbol from nm.
3626 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3627 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3628 [
3629 # These are sane defaults that work on at least a few old systems.
3630 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3631
3632 # Character class describing NM global symbol codes.
3633 symcode='[[BCDEGRST]]'
3634
3635 # Regexp to match symbols that can be accessed directly from C.
3636 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3637
3638 # Define system-specific variables.
3639 case $host_os in
3640 aix*)
3641 symcode='[[BCDT]]'
3642 ;;
3643 cygwin* | mingw* | pw32* | cegcc*)
3644 symcode='[[ABCDGISTW]]'
3645 ;;
3646 hpux*)
3647 if test "$host_cpu" = ia64; then
3648 symcode='[[ABCDEGRST]]'
3649 fi
3650 ;;
3651 irix* | nonstopux*)
3652 symcode='[[BCDEGRST]]'
3653 ;;
3654 osf*)
3655 symcode='[[BCDEGQRST]]'
3656 ;;
3657 solaris*)
3658 symcode='[[BDRT]]'
3659 ;;
3660 sco3.2v5*)
3661 symcode='[[DT]]'
3662 ;;
3663 sysv4.2uw2*)
3664 symcode='[[DT]]'
3665 ;;
3666 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3667 symcode='[[ABDT]]'
3668 ;;
3669 sysv4)
3670 symcode='[[DFNSTU]]'
3671 ;;
3672 esac
3673
3674 # If we're using GNU nm, then use its standard symbol codes.
3675 case `$NM -V 2>&1` in
3676 *GNU* | *'with BFD'*)
3677 symcode='[[ABCDGIRSTW]]' ;;
3678 esac
3679
3680 # Transform an extracted symbol line into a proper C declaration.
3681 # Some systems (esp. on ia64) link data and code symbols differently,
3682 # so use this general approach.
3683 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3684
3685 # Transform an extracted symbol line into symbol name and symbol address
3686 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3687 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3688
3689 # Handle CRLF in mingw tool chain
3690 opt_cr=
3691 case $build_os in
3692 mingw*)
3693 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3694 ;;
3695 esac
3696
3697 # Try without a prefix underscore, then with it.
3698 for ac_symprfx in "" "_"; do
3699
3700 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3701 symxfrm="\\1 $ac_symprfx\\2 \\2"
3702
3703 # Write the raw and C identifiers.
3704 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3705 # Fake it for dumpbin and say T for any non-static function
3706 # and D for any global variable.
3707 # Also find C++ and __fastcall symbols from MSVC++,
3708 # which start with @ or ?.
3709 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3710 " {last_section=section; section=\$ 3};"\
3711 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3712 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3713 " \$ 0!~/External *\|/{next};"\
3714 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3715 " {if(hide[section]) next};"\
3716 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3717 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3718 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3719 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3720 " ' prfx=^$ac_symprfx]"
3721 else
3722 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3723 fi
3724 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3725
3726 # Check to see that the pipe works correctly.
3727 pipe_works=no
3728
3729 rm -f conftest*
3730 cat > conftest.$ac_ext <<_LT_EOF
3731 #ifdef __cplusplus
3732 extern "C" {
3733 #endif
3734 char nm_test_var;
3735 void nm_test_func(void);
3736 void nm_test_func(void){}
3737 #ifdef __cplusplus
3738 }
3739 #endif
3740 int main(){nm_test_var='a';nm_test_func();return(0);}
3741 _LT_EOF
3742
3743 if AC_TRY_EVAL(ac_compile); then
3744 # Now try to grab the symbols.
3745 nlist=conftest.nm
3746 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3747 # Try sorting and uniquifying the output.
3748 if sort "$nlist" | uniq > "$nlist"T; then
3749 mv -f "$nlist"T "$nlist"
3750 else
3751 rm -f "$nlist"T
3752 fi
3753
3754 # Make sure that we snagged all the symbols we need.
3755 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3756 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3757 cat <<_LT_EOF > conftest.$ac_ext
3758 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3759 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3760 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3761 relocations are performed -- see ld's documentation on pseudo-relocs. */
3762 # define LT@&t@_DLSYM_CONST
3763 #elif defined(__osf__)
3764 /* This system does not cope well with relocations in const data. */
3765 # define LT@&t@_DLSYM_CONST
3766 #else
3767 # define LT@&t@_DLSYM_CONST const
3768 #endif
3769
3770 #ifdef __cplusplus
3771 extern "C" {
3772 #endif
3773
3774 _LT_EOF
3775 # Now generate the symbol file.
3776 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3777
3778 cat <<_LT_EOF >> conftest.$ac_ext
3779
3780 /* The mapping between symbol names and symbols. */
3781 LT@&t@_DLSYM_CONST struct {
3782 const char *name;
3783 void *address;
3784 }
3785 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3786 {
3787 { "@PROGRAM@", (void *) 0 },
3788 _LT_EOF
3789 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3790 cat <<\_LT_EOF >> conftest.$ac_ext
3791 {0, (void *) 0}
3792 };
3793
3794 /* This works around a problem in FreeBSD linker */
3795 #ifdef FREEBSD_WORKAROUND
3796 static const void *lt_preloaded_setup() {
3797 return lt__PROGRAM__LTX_preloaded_symbols;
3798 }
3799 #endif
3800
3801 #ifdef __cplusplus
3802 }
3803 #endif
3804 _LT_EOF
3805 # Now try linking the two files.
3806 mv conftest.$ac_objext conftstm.$ac_objext
3807 lt_globsym_save_LIBS=$LIBS
3808 lt_globsym_save_CFLAGS=$CFLAGS
3809 LIBS="conftstm.$ac_objext"
3810 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3811 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3812 pipe_works=yes
3813 fi
3814 LIBS=$lt_globsym_save_LIBS
3815 CFLAGS=$lt_globsym_save_CFLAGS
3816 else
3817 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3818 fi
3819 else
3820 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3821 fi
3822 else
3823 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3824 fi
3825 else
3826 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3827 cat conftest.$ac_ext >&5
3828 fi
3829 rm -rf conftest* conftst*
3830
3831 # Do not use the global_symbol_pipe unless it works.
3832 if test "$pipe_works" = yes; then
3833 break
3834 else
3835 lt_cv_sys_global_symbol_pipe=
3836 fi
3837 done
3838 ])
3839 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3840 lt_cv_sys_global_symbol_to_cdecl=
3841 fi
3842 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3843 AC_MSG_RESULT(failed)
3844 else
3845 AC_MSG_RESULT(ok)
3846 fi
3847
3848 # Response file support.
3849 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3850 nm_file_list_spec='@'
3851 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3852 nm_file_list_spec='@'
3853 fi
3854
3855 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3856 [Take the output of nm and produce a listing of raw symbols and C names])
3857 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3858 [Transform the output of nm in a proper C declaration])
3859 _LT_DECL([global_symbol_to_c_name_address],
3860 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3861 [Transform the output of nm in a C name address pair])
3862 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3863 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3864 [Transform the output of nm in a C name address pair when lib prefix is needed])
3865 _LT_DECL([], [nm_file_list_spec], [1],
3866 [Specify filename containing input files for $NM])
3867 ]) # _LT_CMD_GLOBAL_SYMBOLS
3868
3869
3870 # _LT_COMPILER_PIC([TAGNAME])
3871 # ---------------------------
3872 m4_defun([_LT_COMPILER_PIC],
3873 [m4_require([_LT_TAG_COMPILER])dnl
3874 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3875 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3876 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3877
3878 m4_if([$1], [CXX], [
3879 # C++ specific cases for pic, static, wl, etc.
3880 if test "$GXX" = yes; then
3881 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3882 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3883
3884 case $host_os in
3885 aix*)
3886 # All AIX code is PIC.
3887 if test "$host_cpu" = ia64; then
3888 # AIX 5 now supports IA64 processor
3889 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3890 fi
3891 ;;
3892
3893 amigaos*)
3894 case $host_cpu in
3895 powerpc)
3896 # see comment about AmigaOS4 .so support
3897 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3898 ;;
3899 m68k)
3900 # FIXME: we need at least 68020 code to build shared libraries, but
3901 # adding the `-m68020' flag to GCC prevents building anything better,
3902 # like `-m68040'.
3903 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3904 ;;
3905 esac
3906 ;;
3907
3908 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3909 # PIC is the default for these OSes.
3910 ;;
3911 mingw* | cygwin* | os2* | pw32* | cegcc*)
3912 # This hack is so that the source file can tell whether it is being
3913 # built for inclusion in a dll (and should export symbols for example).
3914 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3915 # (--disable-auto-import) libraries
3916 m4_if([$1], [GCJ], [],
3917 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3918 ;;
3919 darwin* | rhapsody*)
3920 # PIC is the default on this platform
3921 # Common symbols not allowed in MH_DYLIB files
3922 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3923 ;;
3924 *djgpp*)
3925 # DJGPP does not support shared libraries at all
3926 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3927 ;;
3928 haiku*)
3929 # PIC is the default for Haiku.
3930 # The "-static" flag exists, but is broken.
3931 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3932 ;;
3933 interix[[3-9]]*)
3934 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3935 # Instead, we relocate shared libraries at runtime.
3936 ;;
3937 sysv4*MP*)
3938 if test -d /usr/nec; then
3939 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3940 fi
3941 ;;
3942 hpux*)
3943 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3944 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3945 # sets the default TLS model and affects inlining.
3946 case $host_cpu in
3947 hppa*64*)
3948 ;;
3949 *)
3950 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3951 ;;
3952 esac
3953 ;;
3954 *qnx* | *nto*)
3955 # QNX uses GNU C++, but need to define -shared option too, otherwise
3956 # it will coredump.
3957 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3958 ;;
3959 *)
3960 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3961 ;;
3962 esac
3963 else
3964 case $host_os in
3965 aix[[4-9]]*)
3966 # All AIX code is PIC.
3967 if test "$host_cpu" = ia64; then
3968 # AIX 5 now supports IA64 processor
3969 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3970 else
3971 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3972 fi
3973 ;;
3974 chorus*)
3975 case $cc_basename in
3976 cxch68*)
3977 # Green Hills C++ Compiler
3978 # _LT_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"
3979 ;;
3980 esac
3981 ;;
3982 mingw* | cygwin* | os2* | pw32* | cegcc*)
3983 # This hack is so that the source file can tell whether it is being
3984 # built for inclusion in a dll (and should export symbols for example).
3985 m4_if([$1], [GCJ], [],
3986 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3987 ;;
3988 dgux*)
3989 case $cc_basename in
3990 ec++*)
3991 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3992 ;;
3993 ghcx*)
3994 # Green Hills C++ Compiler
3995 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3996 ;;
3997 *)
3998 ;;
3999 esac
4000 ;;
4001 freebsd* | dragonfly*)
4002 # FreeBSD uses GNU C++
4003 ;;
4004 hpux9* | hpux10* | hpux11*)
4005 case $cc_basename in
4006 CC*)
4007 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4008 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4009 if test "$host_cpu" != ia64; then
4010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4011 fi
4012 ;;
4013 aCC*)
4014 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4016 case $host_cpu in
4017 hppa*64*|ia64*)
4018 # +Z the default
4019 ;;
4020 *)
4021 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4022 ;;
4023 esac
4024 ;;
4025 *)
4026 ;;
4027 esac
4028 ;;
4029 interix*)
4030 # This is c89, which is MS Visual C++ (no shared libs)
4031 # Anyone wants to do a port?
4032 ;;
4033 irix5* | irix6* | nonstopux*)
4034 case $cc_basename in
4035 CC*)
4036 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4037 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4038 # CC pic flag -KPIC is the default.
4039 ;;
4040 *)
4041 ;;
4042 esac
4043 ;;
4044 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4045 case $cc_basename in
4046 KCC*)
4047 # KAI C++ Compiler
4048 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4049 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4050 ;;
4051 ecpc* )
4052 # old Intel C++ for x86_64 which still supported -KPIC.
4053 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4054 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4055 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4056 ;;
4057 icpc* )
4058 # Intel C++, used to be incompatible with GCC.
4059 # ICC 10 doesn't accept -KPIC any more.
4060 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4063 ;;
4064 pgCC* | pgcpp*)
4065 # Portland Group C++ compiler
4066 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4067 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4068 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4069 ;;
4070 cxx*)
4071 # Compaq C++
4072 # Make sure the PIC flag is empty. It appears that all Alpha
4073 # Linux and Compaq Tru64 Unix objects are PIC.
4074 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4075 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4076 ;;
4077 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4078 # IBM XL 8.0, 9.0 on PPC and BlueGene
4079 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4080 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4081 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4082 ;;
4083 *)
4084 case `$CC -V 2>&1 | sed 5q` in
4085 *Sun\ C*)
4086 # Sun C++ 5.9
4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4088 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4089 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4090 ;;
4091 esac
4092 ;;
4093 esac
4094 ;;
4095 lynxos*)
4096 ;;
4097 m88k*)
4098 ;;
4099 mvs*)
4100 case $cc_basename in
4101 cxx*)
4102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4103 ;;
4104 *)
4105 ;;
4106 esac
4107 ;;
4108 netbsd* | netbsdelf*-gnu)
4109 ;;
4110 *qnx* | *nto*)
4111 # QNX uses GNU C++, but need to define -shared option too, otherwise
4112 # it will coredump.
4113 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4114 ;;
4115 osf3* | osf4* | osf5*)
4116 case $cc_basename in
4117 KCC*)
4118 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4119 ;;
4120 RCC*)
4121 # Rational C++ 2.4.1
4122 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4123 ;;
4124 cxx*)
4125 # Digital/Compaq C++
4126 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4127 # Make sure the PIC flag is empty. It appears that all Alpha
4128 # Linux and Compaq Tru64 Unix objects are PIC.
4129 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4130 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4131 ;;
4132 *)
4133 ;;
4134 esac
4135 ;;
4136 psos*)
4137 ;;
4138 solaris*)
4139 case $cc_basename in
4140 CC* | sunCC*)
4141 # Sun C++ 4.2, 5.x and Centerline C++
4142 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4143 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4144 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4145 ;;
4146 gcx*)
4147 # Green Hills C++ Compiler
4148 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4149 ;;
4150 *)
4151 ;;
4152 esac
4153 ;;
4154 sunos4*)
4155 case $cc_basename in
4156 CC*)
4157 # Sun C++ 4.x
4158 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4159 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4160 ;;
4161 lcc*)
4162 # Lucid
4163 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4164 ;;
4165 *)
4166 ;;
4167 esac
4168 ;;
4169 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4170 case $cc_basename in
4171 CC*)
4172 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4174 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4175 ;;
4176 esac
4177 ;;
4178 tandem*)
4179 case $cc_basename in
4180 NCC*)
4181 # NonStop-UX NCC 3.20
4182 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4183 ;;
4184 *)
4185 ;;
4186 esac
4187 ;;
4188 vxworks*)
4189 ;;
4190 *)
4191 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4192 ;;
4193 esac
4194 fi
4195 ],
4196 [
4197 if test "$GCC" = yes; then
4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4199 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4200
4201 case $host_os in
4202 aix*)
4203 # All AIX code is PIC.
4204 if test "$host_cpu" = ia64; then
4205 # AIX 5 now supports IA64 processor
4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4207 fi
4208 ;;
4209
4210 amigaos*)
4211 case $host_cpu in
4212 powerpc)
4213 # see comment about AmigaOS4 .so support
4214 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4215 ;;
4216 m68k)
4217 # FIXME: we need at least 68020 code to build shared libraries, but
4218 # adding the `-m68020' flag to GCC prevents building anything better,
4219 # like `-m68040'.
4220 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4221 ;;
4222 esac
4223 ;;
4224
4225 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4226 # PIC is the default for these OSes.
4227 ;;
4228
4229 mingw* | cygwin* | pw32* | os2* | cegcc*)
4230 # This hack is so that the source file can tell whether it is being
4231 # built for inclusion in a dll (and should export symbols for example).
4232 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4233 # (--disable-auto-import) libraries
4234 m4_if([$1], [GCJ], [],
4235 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4236 ;;
4237
4238 darwin* | rhapsody*)
4239 # PIC is the default on this platform
4240 # Common symbols not allowed in MH_DYLIB files
4241 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4242 ;;
4243
4244 haiku*)
4245 # PIC is the default for Haiku.
4246 # The "-static" flag exists, but is broken.
4247 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4248 ;;
4249
4250 hpux*)
4251 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4252 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4253 # sets the default TLS model and affects inlining.
4254 case $host_cpu in
4255 hppa*64*)
4256 # +Z the default
4257 ;;
4258 *)
4259 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4260 ;;
4261 esac
4262 ;;
4263
4264 interix[[3-9]]*)
4265 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4266 # Instead, we relocate shared libraries at runtime.
4267 ;;
4268
4269 msdosdjgpp*)
4270 # Just because we use GCC doesn't mean we suddenly get shared libraries
4271 # on systems that don't support them.
4272 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4273 enable_shared=no
4274 ;;
4275
4276 *nto* | *qnx*)
4277 # QNX uses GNU C++, but need to define -shared option too, otherwise
4278 # it will coredump.
4279 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4280 ;;
4281
4282 sysv4*MP*)
4283 if test -d /usr/nec; then
4284 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4285 fi
4286 ;;
4287
4288 *)
4289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4290 ;;
4291 esac
4292
4293 case $cc_basename in
4294 nvcc*) # Cuda Compiler Driver 2.2
4295 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4296 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4297 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4298 fi
4299 ;;
4300 esac
4301 else
4302 # PORTME Check for flag to pass linker flags through the system compiler.
4303 case $host_os in
4304 aix*)
4305 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4306 if test "$host_cpu" = ia64; then
4307 # AIX 5 now supports IA64 processor
4308 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4309 else
4310 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4311 fi
4312 ;;
4313
4314 mingw* | cygwin* | pw32* | os2* | cegcc*)
4315 # This hack is so that the source file can tell whether it is being
4316 # built for inclusion in a dll (and should export symbols for example).
4317 m4_if([$1], [GCJ], [],
4318 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4319 ;;
4320
4321 hpux9* | hpux10* | hpux11*)
4322 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4323 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4324 # not for PA HP-UX.
4325 case $host_cpu in
4326 hppa*64*|ia64*)
4327 # +Z the default
4328 ;;
4329 *)
4330 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4331 ;;
4332 esac
4333 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4334 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4335 ;;
4336
4337 irix5* | irix6* | nonstopux*)
4338 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4339 # PIC (with -KPIC) is the default.
4340 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4341 ;;
4342
4343 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4344 case $cc_basename in
4345 # old Intel for x86_64 which still supported -KPIC.
4346 ecc*)
4347 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4348 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4349 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4350 ;;
4351 # icc used to be incompatible with GCC.
4352 # ICC 10 doesn't accept -KPIC any more.
4353 icc* | ifort*)
4354 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4357 ;;
4358 # Lahey Fortran 8.1.
4359 lf95*)
4360 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4361 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4362 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4363 ;;
4364 nagfor*)
4365 # NAG Fortran compiler
4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4368 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4369 ;;
4370 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4371 # Portland Group compilers (*not* the Pentium gcc compiler,
4372 # which looks to be a dead project)
4373 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4374 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4375 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4376 ;;
4377 ccc*)
4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4379 # All Alpha code is PIC.
4380 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4381 ;;
4382 xl* | bgxl* | bgf* | mpixl*)
4383 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4385 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4386 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4387 ;;
4388 *)
4389 case `$CC -V 2>&1 | sed 5q` in
4390 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4391 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4394 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4395 ;;
4396 *Sun\ F* | *Sun*Fortran*)
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4400 ;;
4401 *Sun\ C*)
4402 # Sun C 5.9
4403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4404 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4405 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4406 ;;
4407 *Intel*\ [[CF]]*Compiler*)
4408 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4411 ;;
4412 *Portland\ Group*)
4413 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4415 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4416 ;;
4417 esac
4418 ;;
4419 esac
4420 ;;
4421
4422 newsos6)
4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4425 ;;
4426
4427 *nto* | *qnx*)
4428 # QNX uses GNU C++, but need to define -shared option too, otherwise
4429 # it will coredump.
4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4431 ;;
4432
4433 osf3* | osf4* | osf5*)
4434 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4435 # All OSF/1 code is PIC.
4436 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4437 ;;
4438
4439 rdos*)
4440 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4441 ;;
4442
4443 solaris*)
4444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4445 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4446 case $cc_basename in
4447 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4449 *)
4450 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4451 esac
4452 ;;
4453
4454 sunos4*)
4455 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4456 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4457 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4458 ;;
4459
4460 sysv4 | sysv4.2uw2* | sysv4.3*)
4461 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4462 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4463 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4464 ;;
4465
4466 sysv4*MP*)
4467 if test -d /usr/nec ;then
4468 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4469 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4470 fi
4471 ;;
4472
4473 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4475 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4476 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4477 ;;
4478
4479 unicos*)
4480 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4481 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4482 ;;
4483
4484 uts4*)
4485 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4486 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4487 ;;
4488
4489 *)
4490 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4491 ;;
4492 esac
4493 fi
4494 ])
4495 case $host_os in
4496 # For platforms which do not support PIC, -DPIC is meaningless:
4497 *djgpp*)
4498 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4499 ;;
4500 *)
4501 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4502 ;;
4503 esac
4504
4505 AC_CACHE_CHECK([for $compiler option to produce PIC],
4506 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4507 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4508 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4509
4510 #
4511 # Check to make sure the PIC flag actually works.
4512 #
4513 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4514 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4515 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4516 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4517 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4518 "" | " "*) ;;
4519 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4520 esac],
4521 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4522 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4523 fi
4524 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4525 [Additional compiler flags for building library objects])
4526
4527 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4528 [How to pass a linker flag through the compiler])
4529 #
4530 # Check to make sure the static flag actually works.
4531 #
4532 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4533 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4534 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4535 $lt_tmp_static_flag,
4536 [],
4537 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4538 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4539 [Compiler flag to prevent dynamic linking])
4540 ])# _LT_COMPILER_PIC
4541
4542
4543 # _LT_LINKER_SHLIBS([TAGNAME])
4544 # ----------------------------
4545 # See if the linker supports building shared libraries.
4546 m4_defun([_LT_LINKER_SHLIBS],
4547 [AC_REQUIRE([LT_PATH_LD])dnl
4548 AC_REQUIRE([LT_PATH_NM])dnl
4549 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4550 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4551 m4_require([_LT_DECL_EGREP])dnl
4552 m4_require([_LT_DECL_SED])dnl
4553 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4554 m4_require([_LT_TAG_COMPILER])dnl
4555 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4556 m4_if([$1], [CXX], [
4557 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4558 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4559 case $host_os in
4560 aix[[4-9]]*)
4561 # If we're using GNU nm, then we don't want the "-C" option.
4562 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4563 # Also, AIX nm treats weak defined symbols like other global defined
4564 # symbols, whereas GNU nm marks them as "W".
4565 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4566 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4567 else
4568 _LT_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'
4569 fi
4570 ;;
4571 pw32*)
4572 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4573 ;;
4574 cygwin* | mingw* | cegcc*)
4575 case $cc_basename in
4576 cl*)
4577 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4578 ;;
4579 *)
4580 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4581 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4582 ;;
4583 esac
4584 ;;
4585 linux* | k*bsd*-gnu | gnu*)
4586 _LT_TAGVAR(link_all_deplibs, $1)=no
4587 ;;
4588 *)
4589 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4590 ;;
4591 esac
4592 ], [
4593 runpath_var=
4594 _LT_TAGVAR(allow_undefined_flag, $1)=
4595 _LT_TAGVAR(always_export_symbols, $1)=no
4596 _LT_TAGVAR(archive_cmds, $1)=
4597 _LT_TAGVAR(archive_expsym_cmds, $1)=
4598 _LT_TAGVAR(compiler_needs_object, $1)=no
4599 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4600 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4601 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4602 _LT_TAGVAR(hardcode_automatic, $1)=no
4603 _LT_TAGVAR(hardcode_direct, $1)=no
4604 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4605 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4606 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4607 _LT_TAGVAR(hardcode_minus_L, $1)=no
4608 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4609 _LT_TAGVAR(inherit_rpath, $1)=no
4610 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4611 _LT_TAGVAR(module_cmds, $1)=
4612 _LT_TAGVAR(module_expsym_cmds, $1)=
4613 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4614 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4615 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4616 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4617 # include_expsyms should be a list of space-separated symbols to be *always*
4618 # included in the symbol list
4619 _LT_TAGVAR(include_expsyms, $1)=
4620 # exclude_expsyms can be an extended regexp of symbols to exclude
4621 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4622 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4623 # as well as any symbol that contains `d'.
4624 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4625 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4626 # platforms (ab)use it in PIC code, but their linkers get confused if
4627 # the symbol is explicitly referenced. Since portable code cannot
4628 # rely on this symbol name, it's probably fine to never include it in
4629 # preloaded symbol tables.
4630 # Exclude shared library initialization/finalization symbols.
4631 dnl Note also adjust exclude_expsyms for C++ above.
4632 extract_expsyms_cmds=
4633
4634 case $host_os in
4635 cygwin* | mingw* | pw32* | cegcc*)
4636 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4637 # When not using gcc, we currently assume that we are using
4638 # Microsoft Visual C++.
4639 if test "$GCC" != yes; then
4640 with_gnu_ld=no
4641 fi
4642 ;;
4643 interix*)
4644 # we just hope/assume this is gcc and not c89 (= MSVC++)
4645 with_gnu_ld=yes
4646 ;;
4647 openbsd*)
4648 with_gnu_ld=no
4649 ;;
4650 linux* | k*bsd*-gnu | gnu*)
4651 _LT_TAGVAR(link_all_deplibs, $1)=no
4652 ;;
4653 esac
4654
4655 _LT_TAGVAR(ld_shlibs, $1)=yes
4656
4657 # On some targets, GNU ld is compatible enough with the native linker
4658 # that we're better off using the native interface for both.
4659 lt_use_gnu_ld_interface=no
4660 if test "$with_gnu_ld" = yes; then
4661 case $host_os in
4662 aix*)
4663 # The AIX port of GNU ld has always aspired to compatibility
4664 # with the native linker. However, as the warning in the GNU ld
4665 # block says, versions before 2.19.5* couldn't really create working
4666 # shared libraries, regardless of the interface used.
4667 case `$LD -v 2>&1` in
4668 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4669 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4670 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4671 *)
4672 lt_use_gnu_ld_interface=yes
4673 ;;
4674 esac
4675 ;;
4676 *)
4677 lt_use_gnu_ld_interface=yes
4678 ;;
4679 esac
4680 fi
4681
4682 if test "$lt_use_gnu_ld_interface" = yes; then
4683 # If archive_cmds runs LD, not CC, wlarc should be empty
4684 wlarc='${wl}'
4685
4686 # Set some defaults for GNU ld with shared library support. These
4687 # are reset later if shared libraries are not supported. Putting them
4688 # here allows them to be overridden if necessary.
4689 runpath_var=LD_RUN_PATH
4690 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4691 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4692 # ancient GNU ld didn't support --whole-archive et. al.
4693 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4694 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4695 else
4696 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4697 fi
4698 supports_anon_versioning=no
4699 case `$LD -v 2>&1` in
4700 *GNU\ gold*) supports_anon_versioning=yes ;;
4701 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4702 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4703 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4704 *\ 2.11.*) ;; # other 2.11 versions
4705 *) supports_anon_versioning=yes ;;
4706 esac
4707
4708 # See if GNU ld supports shared libraries.
4709 case $host_os in
4710 aix[[3-9]]*)
4711 # On AIX/PPC, the GNU linker is very broken
4712 if test "$host_cpu" != ia64; then
4713 _LT_TAGVAR(ld_shlibs, $1)=no
4714 cat <<_LT_EOF 1>&2
4715
4716 *** Warning: the GNU linker, at least up to release 2.19, is reported
4717 *** to be unable to reliably create shared libraries on AIX.
4718 *** Therefore, libtool is disabling shared libraries support. If you
4719 *** really care for shared libraries, you may want to install binutils
4720 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4721 *** You will then need to restart the configuration process.
4722
4723 _LT_EOF
4724 fi
4725 ;;
4726
4727 amigaos*)
4728 case $host_cpu in
4729 powerpc)
4730 # see comment about AmigaOS4 .so support
4731 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4732 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4733 ;;
4734 m68k)
4735 _LT_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)'
4736 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4737 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4738 ;;
4739 esac
4740 ;;
4741
4742 beos*)
4743 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4744 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4745 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4746 # support --undefined. This deserves some investigation. FIXME
4747 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4748 else
4749 _LT_TAGVAR(ld_shlibs, $1)=no
4750 fi
4751 ;;
4752
4753 cygwin* | mingw* | pw32* | cegcc*)
4754 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4755 # as there is no search path for DLLs.
4756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4757 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4758 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4759 _LT_TAGVAR(always_export_symbols, $1)=no
4760 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4761 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4762 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4763
4764 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4765 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4766 # If the export-symbols file already is a .def file (1st line
4767 # is EXPORTS), use it as is; otherwise, prepend...
4768 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4769 cp $export_symbols $output_objdir/$soname.def;
4770 else
4771 echo EXPORTS > $output_objdir/$soname.def;
4772 cat $export_symbols >> $output_objdir/$soname.def;
4773 fi~
4774 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4775 else
4776 _LT_TAGVAR(ld_shlibs, $1)=no
4777 fi
4778 ;;
4779
4780 haiku*)
4781 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4782 _LT_TAGVAR(link_all_deplibs, $1)=yes
4783 ;;
4784
4785 interix[[3-9]]*)
4786 _LT_TAGVAR(hardcode_direct, $1)=no
4787 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4788 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4789 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4790 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4791 # Instead, shared libraries are loaded at an image base (0x10000000 by
4792 # default) and relocated if they conflict, which is a slow very memory
4793 # consuming and fragmenting process. To avoid this, we pick a random,
4794 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4795 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4796 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4797 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4798 ;;
4799
4800 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4801 tmp_diet=no
4802 if test "$host_os" = linux-dietlibc; then
4803 case $cc_basename in
4804 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4805 esac
4806 fi
4807 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4808 && test "$tmp_diet" = no
4809 then
4810 tmp_addflag=' $pic_flag'
4811 tmp_sharedflag='-shared'
4812 case $cc_basename,$host_cpu in
4813 pgcc*) # Portland Group C compiler
4814 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4815 tmp_addflag=' $pic_flag'
4816 ;;
4817 pgf77* | pgf90* | pgf95* | pgfortran*)
4818 # Portland Group f77 and f90 compilers
4819 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4820 tmp_addflag=' $pic_flag -Mnomain' ;;
4821 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4822 tmp_addflag=' -i_dynamic' ;;
4823 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4824 tmp_addflag=' -i_dynamic -nofor_main' ;;
4825 ifc* | ifort*) # Intel Fortran compiler
4826 tmp_addflag=' -nofor_main' ;;
4827 lf95*) # Lahey Fortran 8.1
4828 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4829 tmp_sharedflag='--shared' ;;
4830 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4831 tmp_sharedflag='-qmkshrobj'
4832 tmp_addflag= ;;
4833 nvcc*) # Cuda Compiler Driver 2.2
4834 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4835 _LT_TAGVAR(compiler_needs_object, $1)=yes
4836 ;;
4837 esac
4838 case `$CC -V 2>&1 | sed 5q` in
4839 *Sun\ C*) # Sun C 5.9
4840 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4841 _LT_TAGVAR(compiler_needs_object, $1)=yes
4842 tmp_sharedflag='-G' ;;
4843 *Sun\ F*) # Sun Fortran 8.3
4844 tmp_sharedflag='-G' ;;
4845 esac
4846 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4847
4848 if test "x$supports_anon_versioning" = xyes; then
4849 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4850 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4851 echo "local: *; };" >> $output_objdir/$libname.ver~
4852 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4853 fi
4854
4855 case $cc_basename in
4856 xlf* | bgf* | bgxlf* | mpixlf*)
4857 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4858 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4860 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4861 if test "x$supports_anon_versioning" = xyes; then
4862 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4863 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4864 echo "local: *; };" >> $output_objdir/$libname.ver~
4865 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4866 fi
4867 ;;
4868 esac
4869 else
4870 _LT_TAGVAR(ld_shlibs, $1)=no
4871 fi
4872 ;;
4873
4874 netbsd* | netbsdelf*-gnu)
4875 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4876 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4877 wlarc=
4878 else
4879 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4880 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4881 fi
4882 ;;
4883
4884 solaris*)
4885 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4886 _LT_TAGVAR(ld_shlibs, $1)=no
4887 cat <<_LT_EOF 1>&2
4888
4889 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4890 *** create shared libraries on Solaris systems. Therefore, libtool
4891 *** is disabling shared libraries support. We urge you to upgrade GNU
4892 *** binutils to release 2.9.1 or newer. Another option is to modify
4893 *** your PATH or compiler configuration so that the native linker is
4894 *** used, and then restart.
4895
4896 _LT_EOF
4897 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4898 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4899 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4900 else
4901 _LT_TAGVAR(ld_shlibs, $1)=no
4902 fi
4903 ;;
4904
4905 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4906 case `$LD -v 2>&1` in
4907 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4908 _LT_TAGVAR(ld_shlibs, $1)=no
4909 cat <<_LT_EOF 1>&2
4910
4911 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4912 *** reliably create shared libraries on SCO systems. Therefore, libtool
4913 *** is disabling shared libraries support. We urge you to upgrade GNU
4914 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4915 *** your PATH or compiler configuration so that the native linker is
4916 *** used, and then restart.
4917
4918 _LT_EOF
4919 ;;
4920 *)
4921 # For security reasons, it is highly recommended that you always
4922 # use absolute paths for naming shared libraries, and exclude the
4923 # DT_RUNPATH tag from executables and libraries. But doing so
4924 # requires that you compile everything twice, which is a pain.
4925 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4926 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4927 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4928 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4929 else
4930 _LT_TAGVAR(ld_shlibs, $1)=no
4931 fi
4932 ;;
4933 esac
4934 ;;
4935
4936 sunos4*)
4937 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4938 wlarc=
4939 _LT_TAGVAR(hardcode_direct, $1)=yes
4940 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4941 ;;
4942
4943 *)
4944 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4946 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4947 else
4948 _LT_TAGVAR(ld_shlibs, $1)=no
4949 fi
4950 ;;
4951 esac
4952
4953 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4954 runpath_var=
4955 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4956 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4957 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4958 fi
4959 else
4960 # PORTME fill in a description of your system's linker (not GNU ld)
4961 case $host_os in
4962 aix3*)
4963 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4964 _LT_TAGVAR(always_export_symbols, $1)=yes
4965 _LT_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'
4966 # Note: this linker hardcodes the directories in LIBPATH if there
4967 # are no directories specified by -L.
4968 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4969 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4970 # Neither direct hardcoding nor static linking is supported with a
4971 # broken collect2.
4972 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4973 fi
4974 ;;
4975
4976 aix[[4-9]]*)
4977 if test "$host_cpu" = ia64; then
4978 # On IA64, the linker does run time linking by default, so we don't
4979 # have to do anything special.
4980 aix_use_runtimelinking=no
4981 exp_sym_flag='-Bexport'
4982 no_entry_flag=""
4983 else
4984 # If we're using GNU nm, then we don't want the "-C" option.
4985 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4986 # Also, AIX nm treats weak defined symbols like other global
4987 # defined symbols, whereas GNU nm marks them as "W".
4988 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4989 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4990 else
4991 _LT_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'
4992 fi
4993 aix_use_runtimelinking=no
4994
4995 # Test if we are trying to use run time linking or normal
4996 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4997 # need to do runtime linking.
4998 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4999 for ld_flag in $LDFLAGS; do
5000 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5001 aix_use_runtimelinking=yes
5002 break
5003 fi
5004 done
5005 ;;
5006 esac
5007
5008 exp_sym_flag='-bexport'
5009 no_entry_flag='-bnoentry'
5010 fi
5011
5012 # When large executables or shared objects are built, AIX ld can
5013 # have problems creating the table of contents. If linking a library
5014 # or program results in "error TOC overflow" add -mminimal-toc to
5015 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5016 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5017
5018 _LT_TAGVAR(archive_cmds, $1)=''
5019 _LT_TAGVAR(hardcode_direct, $1)=yes
5020 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5021 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5022 _LT_TAGVAR(link_all_deplibs, $1)=yes
5023 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5024
5025 if test "$GCC" = yes; then
5026 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5027 # We only want to do this on AIX 4.2 and lower, the check
5028 # below for broken collect2 doesn't work under 4.3+
5029 collect2name=`${CC} -print-prog-name=collect2`
5030 if test -f "$collect2name" &&
5031 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5032 then
5033 # We have reworked collect2
5034 :
5035 else
5036 # We have old collect2
5037 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5038 # It fails to find uninstalled libraries when the uninstalled
5039 # path is not listed in the libpath. Setting hardcode_minus_L
5040 # to unsupported forces relinking
5041 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5042 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5043 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5044 fi
5045 ;;
5046 esac
5047 shared_flag='-shared'
5048 if test "$aix_use_runtimelinking" = yes; then
5049 shared_flag="$shared_flag "'${wl}-G'
5050 fi
5051 _LT_TAGVAR(link_all_deplibs, $1)=no
5052 else
5053 # not using gcc
5054 if test "$host_cpu" = ia64; then
5055 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5056 # chokes on -Wl,-G. The following line is correct:
5057 shared_flag='-G'
5058 else
5059 if test "$aix_use_runtimelinking" = yes; then
5060 shared_flag='${wl}-G'
5061 else
5062 shared_flag='${wl}-bM:SRE'
5063 fi
5064 fi
5065 fi
5066
5067 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5068 # It seems that -bexpall does not export symbols beginning with
5069 # underscore (_), so it is better to generate a list of symbols to export.
5070 _LT_TAGVAR(always_export_symbols, $1)=yes
5071 if test "$aix_use_runtimelinking" = yes; then
5072 # Warning - without using the other runtime loading flags (-brtl),
5073 # -berok will link without error, but may produce a broken library.
5074 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5075 # Determine the default libpath from the value encoded in an
5076 # empty executable.
5077 _LT_SYS_MODULE_PATH_AIX([$1])
5078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5079 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5080 else
5081 if test "$host_cpu" = ia64; then
5082 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5083 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5084 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5085 else
5086 # Determine the default libpath from the value encoded in an
5087 # empty executable.
5088 _LT_SYS_MODULE_PATH_AIX([$1])
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5090 # Warning - without using the other run time loading flags,
5091 # -berok will link without error, but may produce a broken library.
5092 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5093 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5094 if test "$with_gnu_ld" = yes; then
5095 # We only use this code for GNU lds that support --whole-archive.
5096 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5097 else
5098 # Exported symbols can be pulled into shared objects from archives
5099 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5100 fi
5101 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5102 # This is similar to how AIX traditionally builds its shared libraries.
5103 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5104 fi
5105 fi
5106 ;;
5107
5108 amigaos*)
5109 case $host_cpu in
5110 powerpc)
5111 # see comment about AmigaOS4 .so support
5112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5113 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5114 ;;
5115 m68k)
5116 _LT_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)'
5117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5118 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5119 ;;
5120 esac
5121 ;;
5122
5123 bsdi[[45]]*)
5124 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5125 ;;
5126
5127 cygwin* | mingw* | pw32* | cegcc*)
5128 # When not using gcc, we currently assume that we are using
5129 # Microsoft Visual C++.
5130 # hardcode_libdir_flag_spec is actually meaningless, as there is
5131 # no search path for DLLs.
5132 case $cc_basename in
5133 cl*)
5134 # Native MSVC
5135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5136 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5137 _LT_TAGVAR(always_export_symbols, $1)=yes
5138 _LT_TAGVAR(file_list_spec, $1)='@'
5139 # Tell ltmain to make .lib files, not .a files.
5140 libext=lib
5141 # Tell ltmain to make .dll files, not .so files.
5142 shrext_cmds=".dll"
5143 # FIXME: Setting linknames here is a bad hack.
5144 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5145 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5146 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5147 else
5148 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5149 fi~
5150 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5151 linknames='
5152 # The linker will not automatically build a static lib if we build a DLL.
5153 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5154 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5155 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5156 _LT_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'
5157 # Don't use ranlib
5158 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5159 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5160 lt_tool_outputfile="@TOOL_OUTPUT@"~
5161 case $lt_outputfile in
5162 *.exe|*.EXE) ;;
5163 *)
5164 lt_outputfile="$lt_outputfile.exe"
5165 lt_tool_outputfile="$lt_tool_outputfile.exe"
5166 ;;
5167 esac~
5168 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5169 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5170 $RM "$lt_outputfile.manifest";
5171 fi'
5172 ;;
5173 *)
5174 # Assume MSVC wrapper
5175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5176 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5177 # Tell ltmain to make .lib files, not .a files.
5178 libext=lib
5179 # Tell ltmain to make .dll files, not .so files.
5180 shrext_cmds=".dll"
5181 # FIXME: Setting linknames here is a bad hack.
5182 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5183 # The linker will automatically build a .lib file if we build a DLL.
5184 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5185 # FIXME: Should let the user specify the lib program.
5186 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5187 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5188 ;;
5189 esac
5190 ;;
5191
5192 darwin* | rhapsody*)
5193 _LT_DARWIN_LINKER_FEATURES($1)
5194 ;;
5195
5196 dgux*)
5197 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5198 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5199 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5200 ;;
5201
5202 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5203 # support. Future versions do this automatically, but an explicit c++rt0.o
5204 # does not break anything, and helps significantly (at the cost of a little
5205 # extra space).
5206 freebsd2.2*)
5207 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5208 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5209 _LT_TAGVAR(hardcode_direct, $1)=yes
5210 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5211 ;;
5212
5213 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5214 freebsd2.*)
5215 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5216 _LT_TAGVAR(hardcode_direct, $1)=yes
5217 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5218 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5219 ;;
5220
5221 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5222 freebsd* | dragonfly*)
5223 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5224 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5225 _LT_TAGVAR(hardcode_direct, $1)=yes
5226 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5227 ;;
5228
5229 hpux9*)
5230 if test "$GCC" = yes; then
5231 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5232 else
5233 _LT_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'
5234 fi
5235 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5236 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5237 _LT_TAGVAR(hardcode_direct, $1)=yes
5238
5239 # hardcode_minus_L: Not really in the search PATH,
5240 # but as the default location of the library.
5241 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5242 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5243 ;;
5244
5245 hpux10*)
5246 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5247 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5248 else
5249 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5250 fi
5251 if test "$with_gnu_ld" = no; then
5252 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5253 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5254 _LT_TAGVAR(hardcode_direct, $1)=yes
5255 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5256 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5257 # hardcode_minus_L: Not really in the search PATH,
5258 # but as the default location of the library.
5259 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5260 fi
5261 ;;
5262
5263 hpux11*)
5264 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5265 case $host_cpu in
5266 hppa*64*)
5267 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5268 ;;
5269 ia64*)
5270 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5271 ;;
5272 *)
5273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5274 ;;
5275 esac
5276 else
5277 case $host_cpu in
5278 hppa*64*)
5279 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5280 ;;
5281 ia64*)
5282 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5283 ;;
5284 *)
5285 m4_if($1, [], [
5286 # Older versions of the 11.00 compiler do not understand -b yet
5287 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5288 _LT_LINKER_OPTION([if $CC understands -b],
5289 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5290 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5291 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5292 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5293 ;;
5294 esac
5295 fi
5296 if test "$with_gnu_ld" = no; then
5297 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5298 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5299
5300 case $host_cpu in
5301 hppa*64*|ia64*)
5302 _LT_TAGVAR(hardcode_direct, $1)=no
5303 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5304 ;;
5305 *)
5306 _LT_TAGVAR(hardcode_direct, $1)=yes
5307 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5308 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5309
5310 # hardcode_minus_L: Not really in the search PATH,
5311 # but as the default location of the library.
5312 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5313 ;;
5314 esac
5315 fi
5316 ;;
5317
5318 irix5* | irix6* | nonstopux*)
5319 if test "$GCC" = yes; then
5320 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5321 # Try to use the -exported_symbol ld option, if it does not
5322 # work, assume that -exports_file does not work either and
5323 # implicitly export all symbols.
5324 # This should be the same for all languages, so no per-tag cache variable.
5325 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5326 [lt_cv_irix_exported_symbol],
5327 [save_LDFLAGS="$LDFLAGS"
5328 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5329 AC_LINK_IFELSE(
5330 [AC_LANG_SOURCE(
5331 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5332 [C++], [[int foo (void) { return 0; }]],
5333 [Fortran 77], [[
5334 subroutine foo
5335 end]],
5336 [Fortran], [[
5337 subroutine foo
5338 end]])])],
5339 [lt_cv_irix_exported_symbol=yes],
5340 [lt_cv_irix_exported_symbol=no])
5341 LDFLAGS="$save_LDFLAGS"])
5342 if test "$lt_cv_irix_exported_symbol" = yes; then
5343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5344 fi
5345 else
5346 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5347 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5348 fi
5349 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5351 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5352 _LT_TAGVAR(inherit_rpath, $1)=yes
5353 _LT_TAGVAR(link_all_deplibs, $1)=yes
5354 ;;
5355
5356 netbsd* | netbsdelf*-gnu)
5357 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5358 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5359 else
5360 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5361 fi
5362 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5363 _LT_TAGVAR(hardcode_direct, $1)=yes
5364 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5365 ;;
5366
5367 newsos6)
5368 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5369 _LT_TAGVAR(hardcode_direct, $1)=yes
5370 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5371 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5372 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5373 ;;
5374
5375 *nto* | *qnx*)
5376 ;;
5377
5378 openbsd*)
5379 if test -f /usr/libexec/ld.so; then
5380 _LT_TAGVAR(hardcode_direct, $1)=yes
5381 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5382 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5383 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5384 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5385 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5387 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5388 else
5389 case $host_os in
5390 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5391 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5392 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5393 ;;
5394 *)
5395 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5396 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5397 ;;
5398 esac
5399 fi
5400 else
5401 _LT_TAGVAR(ld_shlibs, $1)=no
5402 fi
5403 ;;
5404
5405 os2*)
5406 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5407 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5408 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5409 _LT_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'
5410 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5411 ;;
5412
5413 osf3*)
5414 if test "$GCC" = yes; then
5415 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5416 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5417 else
5418 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5419 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5420 fi
5421 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5422 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5423 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5424 ;;
5425
5426 osf4* | osf5*) # as osf3* with the addition of -msym flag
5427 if test "$GCC" = yes; then
5428 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5429 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5431 else
5432 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5434 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5435 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5436
5437 # Both c and cxx compiler support -rpath directly
5438 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5439 fi
5440 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5441 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5442 ;;
5443
5444 solaris*)
5445 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5446 if test "$GCC" = yes; then
5447 wlarc='${wl}'
5448 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5449 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5450 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5451 else
5452 case `$CC -V 2>&1` in
5453 *"Compilers 5.0"*)
5454 wlarc=''
5455 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5456 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5457 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5458 ;;
5459 *)
5460 wlarc='${wl}'
5461 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5462 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5463 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5464 ;;
5465 esac
5466 fi
5467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5468 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5469 case $host_os in
5470 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5471 *)
5472 # The compiler driver will combine and reorder linker options,
5473 # but understands `-z linker_flag'. GCC discards it without `$wl',
5474 # but is careful enough not to reorder.
5475 # Supported since Solaris 2.6 (maybe 2.5.1?)
5476 if test "$GCC" = yes; then
5477 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5478 else
5479 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5480 fi
5481 ;;
5482 esac
5483 _LT_TAGVAR(link_all_deplibs, $1)=yes
5484 ;;
5485
5486 sunos4*)
5487 if test "x$host_vendor" = xsequent; then
5488 # Use $CC to link under sequent, because it throws in some extra .o
5489 # files that make .init and .fini sections work.
5490 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5491 else
5492 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5493 fi
5494 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5495 _LT_TAGVAR(hardcode_direct, $1)=yes
5496 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5497 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5498 ;;
5499
5500 sysv4)
5501 case $host_vendor in
5502 sni)
5503 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5504 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5505 ;;
5506 siemens)
5507 ## LD is ld it makes a PLAMLIB
5508 ## CC just makes a GrossModule.
5509 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5510 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5511 _LT_TAGVAR(hardcode_direct, $1)=no
5512 ;;
5513 motorola)
5514 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5515 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5516 ;;
5517 esac
5518 runpath_var='LD_RUN_PATH'
5519 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5520 ;;
5521
5522 sysv4.3*)
5523 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5524 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5525 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5526 ;;
5527
5528 sysv4*MP*)
5529 if test -d /usr/nec; then
5530 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5531 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5532 runpath_var=LD_RUN_PATH
5533 hardcode_runpath_var=yes
5534 _LT_TAGVAR(ld_shlibs, $1)=yes
5535 fi
5536 ;;
5537
5538 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5539 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5540 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5541 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5542 runpath_var='LD_RUN_PATH'
5543
5544 if test "$GCC" = yes; then
5545 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5546 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5547 else
5548 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5549 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5550 fi
5551 ;;
5552
5553 sysv5* | sco3.2v5* | sco5v6*)
5554 # Note: We can NOT use -z defs as we might desire, because we do not
5555 # link with -lc, and that would cause any symbols used from libc to
5556 # always be unresolved, which means just about no library would
5557 # ever link correctly. If we're not using GNU ld we use -z text
5558 # though, which does catch some bad symbols but isn't as heavy-handed
5559 # as -z defs.
5560 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5561 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5562 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5563 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5565 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5566 _LT_TAGVAR(link_all_deplibs, $1)=yes
5567 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5568 runpath_var='LD_RUN_PATH'
5569
5570 if test "$GCC" = yes; then
5571 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5572 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5573 else
5574 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5575 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5576 fi
5577 ;;
5578
5579 uts4*)
5580 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5581 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5582 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5583 ;;
5584
5585 *)
5586 _LT_TAGVAR(ld_shlibs, $1)=no
5587 ;;
5588 esac
5589
5590 if test x$host_vendor = xsni; then
5591 case $host in
5592 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5593 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5594 ;;
5595 esac
5596 fi
5597 fi
5598 ])
5599 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5600 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5601
5602 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5603
5604 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5605 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5606 _LT_DECL([], [extract_expsyms_cmds], [2],
5607 [The commands to extract the exported symbol list from a shared archive])
5608
5609 #
5610 # Do we need to explicitly link libc?
5611 #
5612 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5613 x|xyes)
5614 # Assume -lc should be added
5615 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5616
5617 if test "$enable_shared" = yes && test "$GCC" = yes; then
5618 case $_LT_TAGVAR(archive_cmds, $1) in
5619 *'~'*)
5620 # FIXME: we may have to deal with multi-command sequences.
5621 ;;
5622 '$CC '*)
5623 # Test whether the compiler implicitly links with -lc since on some
5624 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5625 # to ld, don't add -lc before -lgcc.
5626 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5627 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5628 [$RM conftest*
5629 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5630
5631 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5632 soname=conftest
5633 lib=conftest
5634 libobjs=conftest.$ac_objext
5635 deplibs=
5636 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5637 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5638 compiler_flags=-v
5639 linker_flags=-v
5640 verstring=
5641 output_objdir=.
5642 libname=conftest
5643 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5644 _LT_TAGVAR(allow_undefined_flag, $1)=
5645 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5646 then
5647 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5648 else
5649 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5650 fi
5651 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5652 else
5653 cat conftest.err 1>&5
5654 fi
5655 $RM conftest*
5656 ])
5657 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5658 ;;
5659 esac
5660 fi
5661 ;;
5662 esac
5663
5664 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5665 [Whether or not to add -lc for building shared libraries])
5666 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5667 [enable_shared_with_static_runtimes], [0],
5668 [Whether or not to disallow shared libs when runtime libs are static])
5669 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5670 [Compiler flag to allow reflexive dlopens])
5671 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5672 [Compiler flag to generate shared objects directly from archives])
5673 _LT_TAGDECL([], [compiler_needs_object], [1],
5674 [Whether the compiler copes with passing no objects directly])
5675 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5676 [Create an old-style archive from a shared archive])
5677 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5678 [Create a temporary old-style archive to link instead of a shared archive])
5679 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5680 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5681 _LT_TAGDECL([], [module_cmds], [2],
5682 [Commands used to build a loadable module if different from building
5683 a shared archive.])
5684 _LT_TAGDECL([], [module_expsym_cmds], [2])
5685 _LT_TAGDECL([], [with_gnu_ld], [1],
5686 [Whether we are building with GNU ld or not])
5687 _LT_TAGDECL([], [allow_undefined_flag], [1],
5688 [Flag that allows shared libraries with undefined symbols to be built])
5689 _LT_TAGDECL([], [no_undefined_flag], [1],
5690 [Flag that enforces no undefined symbols])
5691 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5692 [Flag to hardcode $libdir into a binary during linking.
5693 This must work even if $libdir does not exist])
5694 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5695 [Whether we need a single "-rpath" flag with a separated argument])
5696 _LT_TAGDECL([], [hardcode_direct], [0],
5697 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5698 DIR into the resulting binary])
5699 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5700 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5701 DIR into the resulting binary and the resulting library dependency is
5702 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5703 library is relocated])
5704 _LT_TAGDECL([], [hardcode_minus_L], [0],
5705 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5706 into the resulting binary])
5707 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5708 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5709 into the resulting binary])
5710 _LT_TAGDECL([], [hardcode_automatic], [0],
5711 [Set to "yes" if building a shared library automatically hardcodes DIR
5712 into the library and all subsequent libraries and executables linked
5713 against it])
5714 _LT_TAGDECL([], [inherit_rpath], [0],
5715 [Set to yes if linker adds runtime paths of dependent libraries
5716 to runtime path list])
5717 _LT_TAGDECL([], [link_all_deplibs], [0],
5718 [Whether libtool must link a program against all its dependency libraries])
5719 _LT_TAGDECL([], [always_export_symbols], [0],
5720 [Set to "yes" if exported symbols are required])
5721 _LT_TAGDECL([], [export_symbols_cmds], [2],
5722 [The commands to list exported symbols])
5723 _LT_TAGDECL([], [exclude_expsyms], [1],
5724 [Symbols that should not be listed in the preloaded symbols])
5725 _LT_TAGDECL([], [include_expsyms], [1],
5726 [Symbols that must always be exported])
5727 _LT_TAGDECL([], [prelink_cmds], [2],
5728 [Commands necessary for linking programs (against libraries) with templates])
5729 _LT_TAGDECL([], [postlink_cmds], [2],
5730 [Commands necessary for finishing linking programs])
5731 _LT_TAGDECL([], [file_list_spec], [1],
5732 [Specify filename containing input files])
5733 dnl FIXME: Not yet implemented
5734 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5735 dnl [Compiler flag to generate thread safe objects])
5736 ])# _LT_LINKER_SHLIBS
5737
5738
5739 # _LT_LANG_C_CONFIG([TAG])
5740 # ------------------------
5741 # Ensure that the configuration variables for a C compiler are suitably
5742 # defined. These variables are subsequently used by _LT_CONFIG to write
5743 # the compiler configuration to `libtool'.
5744 m4_defun([_LT_LANG_C_CONFIG],
5745 [m4_require([_LT_DECL_EGREP])dnl
5746 lt_save_CC="$CC"
5747 AC_LANG_PUSH(C)
5748
5749 # Source file extension for C test sources.
5750 ac_ext=c
5751
5752 # Object file extension for compiled C test sources.
5753 objext=o
5754 _LT_TAGVAR(objext, $1)=$objext
5755
5756 # Code to be used in simple compile tests
5757 lt_simple_compile_test_code="int some_variable = 0;"
5758
5759 # Code to be used in simple link tests
5760 lt_simple_link_test_code='int main(){return(0);}'
5761
5762 _LT_TAG_COMPILER
5763 # Save the default compiler, since it gets overwritten when the other
5764 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5765 compiler_DEFAULT=$CC
5766
5767 # save warnings/boilerplate of simple test code
5768 _LT_COMPILER_BOILERPLATE
5769 _LT_LINKER_BOILERPLATE
5770
5771 ## CAVEAT EMPTOR:
5772 ## There is no encapsulation within the following macros, do not change
5773 ## the running order or otherwise move them around unless you know exactly
5774 ## what you are doing...
5775 if test -n "$compiler"; then
5776 _LT_COMPILER_NO_RTTI($1)
5777 _LT_COMPILER_PIC($1)
5778 _LT_COMPILER_C_O($1)
5779 _LT_COMPILER_FILE_LOCKS($1)
5780 _LT_LINKER_SHLIBS($1)
5781 _LT_SYS_DYNAMIC_LINKER($1)
5782 _LT_LINKER_HARDCODE_LIBPATH($1)
5783 LT_SYS_DLOPEN_SELF
5784 _LT_CMD_STRIPLIB
5785
5786 # Report which library types will actually be built
5787 AC_MSG_CHECKING([if libtool supports shared libraries])
5788 AC_MSG_RESULT([$can_build_shared])
5789
5790 AC_MSG_CHECKING([whether to build shared libraries])
5791 test "$can_build_shared" = "no" && enable_shared=no
5792
5793 # On AIX, shared libraries and static libraries use the same namespace, and
5794 # are all built from PIC.
5795 case $host_os in
5796 aix3*)
5797 test "$enable_shared" = yes && enable_static=no
5798 if test -n "$RANLIB"; then
5799 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5800 postinstall_cmds='$RANLIB $lib'
5801 fi
5802 ;;
5803
5804 aix[[4-9]]*)
5805 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5806 test "$enable_shared" = yes && enable_static=no
5807 fi
5808 ;;
5809 esac
5810 AC_MSG_RESULT([$enable_shared])
5811
5812 AC_MSG_CHECKING([whether to build static libraries])
5813 # Make sure either enable_shared or enable_static is yes.
5814 test "$enable_shared" = yes || enable_static=yes
5815 AC_MSG_RESULT([$enable_static])
5816
5817 _LT_CONFIG($1)
5818 fi
5819 AC_LANG_POP
5820 CC="$lt_save_CC"
5821 ])# _LT_LANG_C_CONFIG
5822
5823
5824 # _LT_LANG_CXX_CONFIG([TAG])
5825 # --------------------------
5826 # Ensure that the configuration variables for a C++ compiler are suitably
5827 # defined. These variables are subsequently used by _LT_CONFIG to write
5828 # the compiler configuration to `libtool'.
5829 m4_defun([_LT_LANG_CXX_CONFIG],
5830 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5831 m4_require([_LT_DECL_EGREP])dnl
5832 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5833 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5834 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5835 (test "X$CXX" != "Xg++"))) ; then
5836 AC_PROG_CXXCPP
5837 else
5838 _lt_caught_CXX_error=yes
5839 fi
5840
5841 AC_LANG_PUSH(C++)
5842 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5843 _LT_TAGVAR(allow_undefined_flag, $1)=
5844 _LT_TAGVAR(always_export_symbols, $1)=no
5845 _LT_TAGVAR(archive_expsym_cmds, $1)=
5846 _LT_TAGVAR(compiler_needs_object, $1)=no
5847 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5848 _LT_TAGVAR(hardcode_direct, $1)=no
5849 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5851 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5852 _LT_TAGVAR(hardcode_minus_L, $1)=no
5853 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5854 _LT_TAGVAR(hardcode_automatic, $1)=no
5855 _LT_TAGVAR(inherit_rpath, $1)=no
5856 _LT_TAGVAR(module_cmds, $1)=
5857 _LT_TAGVAR(module_expsym_cmds, $1)=
5858 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5859 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5860 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5861 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5862 _LT_TAGVAR(no_undefined_flag, $1)=
5863 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5864 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5865
5866 # Source file extension for C++ test sources.
5867 ac_ext=cpp
5868
5869 # Object file extension for compiled C++ test sources.
5870 objext=o
5871 _LT_TAGVAR(objext, $1)=$objext
5872
5873 # No sense in running all these tests if we already determined that
5874 # the CXX compiler isn't working. Some variables (like enable_shared)
5875 # are currently assumed to apply to all compilers on this platform,
5876 # and will be corrupted by setting them based on a non-working compiler.
5877 if test "$_lt_caught_CXX_error" != yes; then
5878 # Code to be used in simple compile tests
5879 lt_simple_compile_test_code="int some_variable = 0;"
5880
5881 # Code to be used in simple link tests
5882 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5883
5884 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5885 _LT_TAG_COMPILER
5886
5887 # save warnings/boilerplate of simple test code
5888 _LT_COMPILER_BOILERPLATE
5889 _LT_LINKER_BOILERPLATE
5890
5891 # Allow CC to be a program name with arguments.
5892 lt_save_CC=$CC
5893 lt_save_CFLAGS=$CFLAGS
5894 lt_save_LD=$LD
5895 lt_save_GCC=$GCC
5896 GCC=$GXX
5897 lt_save_with_gnu_ld=$with_gnu_ld
5898 lt_save_path_LD=$lt_cv_path_LD
5899 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5900 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5901 else
5902 $as_unset lt_cv_prog_gnu_ld
5903 fi
5904 if test -n "${lt_cv_path_LDCXX+set}"; then
5905 lt_cv_path_LD=$lt_cv_path_LDCXX
5906 else
5907 $as_unset lt_cv_path_LD
5908 fi
5909 test -z "${LDCXX+set}" || LD=$LDCXX
5910 CC=${CXX-"c++"}
5911 CFLAGS=$CXXFLAGS
5912 compiler=$CC
5913 _LT_TAGVAR(compiler, $1)=$CC
5914 _LT_CC_BASENAME([$compiler])
5915
5916 if test -n "$compiler"; then
5917 # We don't want -fno-exception when compiling C++ code, so set the
5918 # no_builtin_flag separately
5919 if test "$GXX" = yes; then
5920 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5921 else
5922 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5923 fi
5924
5925 if test "$GXX" = yes; then
5926 # Set up default GNU C++ configuration
5927
5928 LT_PATH_LD
5929
5930 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5931 # archiving commands below assume that GNU ld is being used.
5932 if test "$with_gnu_ld" = yes; then
5933 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5934 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5935
5936 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5937 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5938
5939 # If archive_cmds runs LD, not CC, wlarc should be empty
5940 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5941 # investigate it a little bit more. (MM)
5942 wlarc='${wl}'
5943
5944 # ancient GNU ld didn't support --whole-archive et. al.
5945 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5946 $GREP 'no-whole-archive' > /dev/null; then
5947 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5948 else
5949 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5950 fi
5951 else
5952 with_gnu_ld=no
5953 wlarc=
5954
5955 # A generic and very simple default shared library creation
5956 # command for GNU C++ for the case where it uses the native
5957 # linker, instead of GNU ld. If possible, this setting should
5958 # overridden to take advantage of the native linker features on
5959 # the platform it is being used on.
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5961 fi
5962
5963 # Commands to make compiler produce verbose output that lists
5964 # what "hidden" libraries, object files and flags are used when
5965 # linking a shared library.
5966 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5967
5968 else
5969 GXX=no
5970 with_gnu_ld=no
5971 wlarc=
5972 fi
5973
5974 # PORTME: fill in a description of your system's C++ link characteristics
5975 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5976 _LT_TAGVAR(ld_shlibs, $1)=yes
5977 case $host_os in
5978 aix3*)
5979 # FIXME: insert proper C++ library support
5980 _LT_TAGVAR(ld_shlibs, $1)=no
5981 ;;
5982 aix[[4-9]]*)
5983 if test "$host_cpu" = ia64; then
5984 # On IA64, the linker does run time linking by default, so we don't
5985 # have to do anything special.
5986 aix_use_runtimelinking=no
5987 exp_sym_flag='-Bexport'
5988 no_entry_flag=""
5989 else
5990 aix_use_runtimelinking=no
5991
5992 # Test if we are trying to use run time linking or normal
5993 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5994 # need to do runtime linking.
5995 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5996 for ld_flag in $LDFLAGS; do
5997 case $ld_flag in
5998 *-brtl*)
5999 aix_use_runtimelinking=yes
6000 break
6001 ;;
6002 esac
6003 done
6004 ;;
6005 esac
6006
6007 exp_sym_flag='-bexport'
6008 no_entry_flag='-bnoentry'
6009 fi
6010
6011 # When large executables or shared objects are built, AIX ld can
6012 # have problems creating the table of contents. If linking a library
6013 # or program results in "error TOC overflow" add -mminimal-toc to
6014 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6015 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6016
6017 _LT_TAGVAR(archive_cmds, $1)=''
6018 _LT_TAGVAR(hardcode_direct, $1)=yes
6019 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6020 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6021 _LT_TAGVAR(link_all_deplibs, $1)=yes
6022 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6023
6024 if test "$GXX" = yes; then
6025 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6026 # We only want to do this on AIX 4.2 and lower, the check
6027 # below for broken collect2 doesn't work under 4.3+
6028 collect2name=`${CC} -print-prog-name=collect2`
6029 if test -f "$collect2name" &&
6030 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6031 then
6032 # We have reworked collect2
6033 :
6034 else
6035 # We have old collect2
6036 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6037 # It fails to find uninstalled libraries when the uninstalled
6038 # path is not listed in the libpath. Setting hardcode_minus_L
6039 # to unsupported forces relinking
6040 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6042 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6043 fi
6044 esac
6045 shared_flag='-shared'
6046 if test "$aix_use_runtimelinking" = yes; then
6047 shared_flag="$shared_flag "'${wl}-G'
6048 fi
6049 else
6050 # not using gcc
6051 if test "$host_cpu" = ia64; then
6052 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6053 # chokes on -Wl,-G. The following line is correct:
6054 shared_flag='-G'
6055 else
6056 if test "$aix_use_runtimelinking" = yes; then
6057 shared_flag='${wl}-G'
6058 else
6059 shared_flag='${wl}-bM:SRE'
6060 fi
6061 fi
6062 fi
6063
6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6065 # It seems that -bexpall does not export symbols beginning with
6066 # underscore (_), so it is better to generate a list of symbols to
6067 # export.
6068 _LT_TAGVAR(always_export_symbols, $1)=yes
6069 if test "$aix_use_runtimelinking" = yes; then
6070 # Warning - without using the other runtime loading flags (-brtl),
6071 # -berok will link without error, but may produce a broken library.
6072 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6073 # Determine the default libpath from the value encoded in an empty
6074 # executable.
6075 _LT_SYS_MODULE_PATH_AIX([$1])
6076 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6077
6078 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6079 else
6080 if test "$host_cpu" = ia64; then
6081 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6082 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6083 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6084 else
6085 # Determine the default libpath from the value encoded in an
6086 # empty executable.
6087 _LT_SYS_MODULE_PATH_AIX([$1])
6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6089 # Warning - without using the other run time loading flags,
6090 # -berok will link without error, but may produce a broken library.
6091 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6092 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6093 if test "$with_gnu_ld" = yes; then
6094 # We only use this code for GNU lds that support --whole-archive.
6095 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6096 else
6097 # Exported symbols can be pulled into shared objects from archives
6098 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6099 fi
6100 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6101 # This is similar to how AIX traditionally builds its shared
6102 # libraries.
6103 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6104 fi
6105 fi
6106 ;;
6107
6108 beos*)
6109 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6110 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6111 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6112 # support --undefined. This deserves some investigation. FIXME
6113 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6114 else
6115 _LT_TAGVAR(ld_shlibs, $1)=no
6116 fi
6117 ;;
6118
6119 chorus*)
6120 case $cc_basename in
6121 *)
6122 # FIXME: insert proper C++ library support
6123 _LT_TAGVAR(ld_shlibs, $1)=no
6124 ;;
6125 esac
6126 ;;
6127
6128 cygwin* | mingw* | pw32* | cegcc*)
6129 case $GXX,$cc_basename in
6130 ,cl* | no,cl*)
6131 # Native MSVC
6132 # hardcode_libdir_flag_spec is actually meaningless, as there is
6133 # no search path for DLLs.
6134 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6135 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6136 _LT_TAGVAR(always_export_symbols, $1)=yes
6137 _LT_TAGVAR(file_list_spec, $1)='@'
6138 # Tell ltmain to make .lib files, not .a files.
6139 libext=lib
6140 # Tell ltmain to make .dll files, not .so files.
6141 shrext_cmds=".dll"
6142 # FIXME: Setting linknames here is a bad hack.
6143 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6144 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6145 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6146 else
6147 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6148 fi~
6149 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6150 linknames='
6151 # The linker will not automatically build a static lib if we build a DLL.
6152 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6153 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6154 # Don't use ranlib
6155 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6156 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6157 lt_tool_outputfile="@TOOL_OUTPUT@"~
6158 case $lt_outputfile in
6159 *.exe|*.EXE) ;;
6160 *)
6161 lt_outputfile="$lt_outputfile.exe"
6162 lt_tool_outputfile="$lt_tool_outputfile.exe"
6163 ;;
6164 esac~
6165 func_to_tool_file "$lt_outputfile"~
6166 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6167 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6168 $RM "$lt_outputfile.manifest";
6169 fi'
6170 ;;
6171 *)
6172 # g++
6173 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6174 # as there is no search path for DLLs.
6175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6176 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6177 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6178 _LT_TAGVAR(always_export_symbols, $1)=no
6179 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6180
6181 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6182 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6183 # If the export-symbols file already is a .def file (1st line
6184 # is EXPORTS), use it as is; otherwise, prepend...
6185 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6186 cp $export_symbols $output_objdir/$soname.def;
6187 else
6188 echo EXPORTS > $output_objdir/$soname.def;
6189 cat $export_symbols >> $output_objdir/$soname.def;
6190 fi~
6191 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6192 else
6193 _LT_TAGVAR(ld_shlibs, $1)=no
6194 fi
6195 ;;
6196 esac
6197 ;;
6198 darwin* | rhapsody*)
6199 _LT_DARWIN_LINKER_FEATURES($1)
6200 ;;
6201
6202 dgux*)
6203 case $cc_basename in
6204 ec++*)
6205 # FIXME: insert proper C++ library support
6206 _LT_TAGVAR(ld_shlibs, $1)=no
6207 ;;
6208 ghcx*)
6209 # Green Hills C++ Compiler
6210 # FIXME: insert proper C++ library support
6211 _LT_TAGVAR(ld_shlibs, $1)=no
6212 ;;
6213 *)
6214 # FIXME: insert proper C++ library support
6215 _LT_TAGVAR(ld_shlibs, $1)=no
6216 ;;
6217 esac
6218 ;;
6219
6220 freebsd2.*)
6221 # C++ shared libraries reported to be fairly broken before
6222 # switch to ELF
6223 _LT_TAGVAR(ld_shlibs, $1)=no
6224 ;;
6225
6226 freebsd-elf*)
6227 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6228 ;;
6229
6230 freebsd* | dragonfly*)
6231 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6232 # conventions
6233 _LT_TAGVAR(ld_shlibs, $1)=yes
6234 ;;
6235
6236 haiku*)
6237 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6238 _LT_TAGVAR(link_all_deplibs, $1)=yes
6239 ;;
6240
6241 hpux9*)
6242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6243 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6244 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6245 _LT_TAGVAR(hardcode_direct, $1)=yes
6246 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6247 # but as the default
6248 # location of the library.
6249
6250 case $cc_basename in
6251 CC*)
6252 # FIXME: insert proper C++ library support
6253 _LT_TAGVAR(ld_shlibs, $1)=no
6254 ;;
6255 aCC*)
6256 _LT_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'
6257 # Commands to make compiler produce verbose output that lists
6258 # what "hidden" libraries, object files and flags are used when
6259 # linking a shared library.
6260 #
6261 # There doesn't appear to be a way to prevent this compiler from
6262 # explicitly linking system object files so we need to strip them
6263 # from the output so that they don't get included in the library
6264 # dependencies.
6265 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6266 ;;
6267 *)
6268 if test "$GXX" = yes; then
6269 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
6270 else
6271 # FIXME: insert proper C++ library support
6272 _LT_TAGVAR(ld_shlibs, $1)=no
6273 fi
6274 ;;
6275 esac
6276 ;;
6277
6278 hpux10*|hpux11*)
6279 if test $with_gnu_ld = no; then
6280 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6281 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6282
6283 case $host_cpu in
6284 hppa*64*|ia64*)
6285 ;;
6286 *)
6287 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6288 ;;
6289 esac
6290 fi
6291 case $host_cpu in
6292 hppa*64*|ia64*)
6293 _LT_TAGVAR(hardcode_direct, $1)=no
6294 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6295 ;;
6296 *)
6297 _LT_TAGVAR(hardcode_direct, $1)=yes
6298 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6299 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6300 # but as the default
6301 # location of the library.
6302 ;;
6303 esac
6304
6305 case $cc_basename in
6306 CC*)
6307 # FIXME: insert proper C++ library support
6308 _LT_TAGVAR(ld_shlibs, $1)=no
6309 ;;
6310 aCC*)
6311 case $host_cpu in
6312 hppa*64*)
6313 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6314 ;;
6315 ia64*)
6316 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6317 ;;
6318 *)
6319 _LT_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'
6320 ;;
6321 esac
6322 # Commands to make compiler produce verbose output that lists
6323 # what "hidden" libraries, object files and flags are used when
6324 # linking a shared library.
6325 #
6326 # There doesn't appear to be a way to prevent this compiler from
6327 # explicitly linking system object files so we need to strip them
6328 # from the output so that they don't get included in the library
6329 # dependencies.
6330 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; func_echo_all "$list"'
6331 ;;
6332 *)
6333 if test "$GXX" = yes; then
6334 if test $with_gnu_ld = no; then
6335 case $host_cpu in
6336 hppa*64*)
6337 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6338 ;;
6339 ia64*)
6340 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6341 ;;
6342 *)
6343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6344 ;;
6345 esac
6346 fi
6347 else
6348 # FIXME: insert proper C++ library support
6349 _LT_TAGVAR(ld_shlibs, $1)=no
6350 fi
6351 ;;
6352 esac
6353 ;;
6354
6355 interix[[3-9]]*)
6356 _LT_TAGVAR(hardcode_direct, $1)=no
6357 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6358 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6359 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6360 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6361 # Instead, shared libraries are loaded at an image base (0x10000000 by
6362 # default) and relocated if they conflict, which is a slow very memory
6363 # consuming and fragmenting process. To avoid this, we pick a random,
6364 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6365 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6367 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6368 ;;
6369 irix5* | irix6*)
6370 case $cc_basename in
6371 CC*)
6372 # SGI C++
6373 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6374
6375 # Archives containing C++ object files must be created using
6376 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6377 # necessary to make sure instantiated templates are included
6378 # in the archive.
6379 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6380 ;;
6381 *)
6382 if test "$GXX" = yes; then
6383 if test "$with_gnu_ld" = no; then
6384 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6385 else
6386 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6387 fi
6388 fi
6389 _LT_TAGVAR(link_all_deplibs, $1)=yes
6390 ;;
6391 esac
6392 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6393 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6394 _LT_TAGVAR(inherit_rpath, $1)=yes
6395 ;;
6396
6397 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6398 case $cc_basename in
6399 KCC*)
6400 # Kuck and Associates, Inc. (KAI) C++ Compiler
6401
6402 # KCC will only create a shared library if the output file
6403 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6404 # to its proper name (with version) after linking.
6405 _LT_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'
6406 _LT_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'
6407 # Commands to make compiler produce verbose output that lists
6408 # what "hidden" libraries, object files and flags are used when
6409 # linking a shared library.
6410 #
6411 # There doesn't appear to be a way to prevent this compiler from
6412 # explicitly linking system object files so we need to strip them
6413 # from the output so that they don't get included in the library
6414 # dependencies.
6415 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; func_echo_all "$list"'
6416
6417 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6418 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6419
6420 # Archives containing C++ object files must be created using
6421 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6422 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6423 ;;
6424 icpc* | ecpc* )
6425 # Intel C++
6426 with_gnu_ld=yes
6427 # version 8.0 and above of icpc choke on multiply defined symbols
6428 # if we add $predep_objects and $postdep_objects, however 7.1 and
6429 # earlier do not add the objects themselves.
6430 case `$CC -V 2>&1` in
6431 *"Version 7."*)
6432 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6433 _LT_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'
6434 ;;
6435 *) # Version 8.0 or newer
6436 tmp_idyn=
6437 case $host_cpu in
6438 ia64*) tmp_idyn=' -i_dynamic';;
6439 esac
6440 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6441 _LT_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'
6442 ;;
6443 esac
6444 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6446 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6447 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6448 ;;
6449 pgCC* | pgcpp*)
6450 # Portland Group C++ compiler
6451 case `$CC -V` in
6452 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6453 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6454 rm -rf $tpldir~
6455 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6456 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6457 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6458 rm -rf $tpldir~
6459 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6460 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6461 $RANLIB $oldlib'
6462 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6463 rm -rf $tpldir~
6464 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6465 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6466 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6467 rm -rf $tpldir~
6468 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6469 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6470 ;;
6471 *) # Version 6 and above use weak symbols
6472 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6473 _LT_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'
6474 ;;
6475 esac
6476
6477 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6478 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6479 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6480 ;;
6481 cxx*)
6482 # Compaq C++
6483 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6484 _LT_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'
6485
6486 runpath_var=LD_RUN_PATH
6487 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6488 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6489
6490 # Commands to make compiler produce verbose output that lists
6491 # what "hidden" libraries, object files and flags are used when
6492 # linking a shared library.
6493 #
6494 # There doesn't appear to be a way to prevent this compiler from
6495 # explicitly linking system object files so we need to strip them
6496 # from the output so that they don't get included in the library
6497 # dependencies.
6498 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
6499 ;;
6500 xl* | mpixl* | bgxl*)
6501 # IBM XL 8.0 on PPC, with GNU ld
6502 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6503 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6504 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6505 if test "x$supports_anon_versioning" = xyes; then
6506 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6507 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6508 echo "local: *; };" >> $output_objdir/$libname.ver~
6509 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6510 fi
6511 ;;
6512 *)
6513 case `$CC -V 2>&1 | sed 5q` in
6514 *Sun\ C*)
6515 # Sun C++ 5.9
6516 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6517 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6518 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6519 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6520 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6521 _LT_TAGVAR(compiler_needs_object, $1)=yes
6522
6523 # Not sure whether something based on
6524 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6525 # would be better.
6526 output_verbose_link_cmd='func_echo_all'
6527
6528 # Archives containing C++ object files must be created using
6529 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6530 # necessary to make sure instantiated templates are included
6531 # in the archive.
6532 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6533 ;;
6534 esac
6535 ;;
6536 esac
6537 ;;
6538
6539 lynxos*)
6540 # FIXME: insert proper C++ library support
6541 _LT_TAGVAR(ld_shlibs, $1)=no
6542 ;;
6543
6544 m88k*)
6545 # FIXME: insert proper C++ library support
6546 _LT_TAGVAR(ld_shlibs, $1)=no
6547 ;;
6548
6549 mvs*)
6550 case $cc_basename in
6551 cxx*)
6552 # FIXME: insert proper C++ library support
6553 _LT_TAGVAR(ld_shlibs, $1)=no
6554 ;;
6555 *)
6556 # FIXME: insert proper C++ library support
6557 _LT_TAGVAR(ld_shlibs, $1)=no
6558 ;;
6559 esac
6560 ;;
6561
6562 netbsd*)
6563 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6564 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6565 wlarc=
6566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6567 _LT_TAGVAR(hardcode_direct, $1)=yes
6568 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6569 fi
6570 # Workaround some broken pre-1.5 toolchains
6571 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6572 ;;
6573
6574 *nto* | *qnx*)
6575 _LT_TAGVAR(ld_shlibs, $1)=yes
6576 ;;
6577
6578 openbsd2*)
6579 # C++ shared libraries are fairly broken
6580 _LT_TAGVAR(ld_shlibs, $1)=no
6581 ;;
6582
6583 openbsd*)
6584 if test -f /usr/libexec/ld.so; then
6585 _LT_TAGVAR(hardcode_direct, $1)=yes
6586 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6587 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6588 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6589 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6590 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6591 _LT_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'
6592 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6593 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6594 fi
6595 output_verbose_link_cmd=func_echo_all
6596 else
6597 _LT_TAGVAR(ld_shlibs, $1)=no
6598 fi
6599 ;;
6600
6601 osf3* | osf4* | osf5*)
6602 case $cc_basename in
6603 KCC*)
6604 # Kuck and Associates, Inc. (KAI) C++ Compiler
6605
6606 # KCC will only create a shared library if the output file
6607 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6608 # to its proper name (with version) after linking.
6609 _LT_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'
6610
6611 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6612 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6613
6614 # Archives containing C++ object files must be created using
6615 # the KAI C++ compiler.
6616 case $host in
6617 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6618 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6619 esac
6620 ;;
6621 RCC*)
6622 # Rational C++ 2.4.1
6623 # FIXME: insert proper C++ library support
6624 _LT_TAGVAR(ld_shlibs, $1)=no
6625 ;;
6626 cxx*)
6627 case $host in
6628 osf3*)
6629 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6630 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6631 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6632 ;;
6633 *)
6634 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6635 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6636 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6637 echo "-hidden">> $lib.exp~
6638 $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~
6639 $RM $lib.exp'
6640 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6641 ;;
6642 esac
6643
6644 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6645
6646 # Commands to make compiler produce verbose output that lists
6647 # what "hidden" libraries, object files and flags are used when
6648 # linking a shared library.
6649 #
6650 # There doesn't appear to be a way to prevent this compiler from
6651 # explicitly linking system object files so we need to strip them
6652 # from the output so that they don't get included in the library
6653 # dependencies.
6654 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
6655 ;;
6656 *)
6657 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6658 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6659 case $host in
6660 osf3*)
6661 _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6662 ;;
6663 *)
6664 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6665 ;;
6666 esac
6667
6668 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6669 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6670
6671 # Commands to make compiler produce verbose output that lists
6672 # what "hidden" libraries, object files and flags are used when
6673 # linking a shared library.
6674 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6675
6676 else
6677 # FIXME: insert proper C++ library support
6678 _LT_TAGVAR(ld_shlibs, $1)=no
6679 fi
6680 ;;
6681 esac
6682 ;;
6683
6684 psos*)
6685 # FIXME: insert proper C++ library support
6686 _LT_TAGVAR(ld_shlibs, $1)=no
6687 ;;
6688
6689 sunos4*)
6690 case $cc_basename in
6691 CC*)
6692 # Sun C++ 4.x
6693 # FIXME: insert proper C++ library support
6694 _LT_TAGVAR(ld_shlibs, $1)=no
6695 ;;
6696 lcc*)
6697 # Lucid
6698 # FIXME: insert proper C++ library support
6699 _LT_TAGVAR(ld_shlibs, $1)=no
6700 ;;
6701 *)
6702 # FIXME: insert proper C++ library support
6703 _LT_TAGVAR(ld_shlibs, $1)=no
6704 ;;
6705 esac
6706 ;;
6707
6708 solaris*)
6709 case $cc_basename in
6710 CC* | sunCC*)
6711 # Sun C++ 4.2, 5.x and Centerline C++
6712 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6713 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6714 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6715 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6716 $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'
6717
6718 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6719 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6720 case $host_os in
6721 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6722 *)
6723 # The compiler driver will combine and reorder linker options,
6724 # but understands `-z linker_flag'.
6725 # Supported since Solaris 2.6 (maybe 2.5.1?)
6726 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6727 ;;
6728 esac
6729 _LT_TAGVAR(link_all_deplibs, $1)=yes
6730
6731 output_verbose_link_cmd='func_echo_all'
6732
6733 # Archives containing C++ object files must be created using
6734 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6735 # necessary to make sure instantiated templates are included
6736 # in the archive.
6737 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6738 ;;
6739 gcx*)
6740 # Green Hills C++ Compiler
6741 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6742
6743 # The C++ compiler must be used to create the archive.
6744 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6745 ;;
6746 *)
6747 # GNU C++ compiler with Solaris linker
6748 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6749 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6750 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6751 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6752 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6753 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6754
6755 # Commands to make compiler produce verbose output that lists
6756 # what "hidden" libraries, object files and flags are used when
6757 # linking a shared library.
6758 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6759 else
6760 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6761 # platform.
6762 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6763 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6764 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6765
6766 # Commands to make compiler produce verbose output that lists
6767 # what "hidden" libraries, object files and flags are used when
6768 # linking a shared library.
6769 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6770 fi
6771
6772 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6773 case $host_os in
6774 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6775 *)
6776 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6777 ;;
6778 esac
6779 fi
6780 ;;
6781 esac
6782 ;;
6783
6784 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6785 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6786 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6787 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6788 runpath_var='LD_RUN_PATH'
6789
6790 case $cc_basename in
6791 CC*)
6792 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6793 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6794 ;;
6795 *)
6796 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6797 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6798 ;;
6799 esac
6800 ;;
6801
6802 sysv5* | sco3.2v5* | sco5v6*)
6803 # Note: We can NOT use -z defs as we might desire, because we do not
6804 # link with -lc, and that would cause any symbols used from libc to
6805 # always be unresolved, which means just about no library would
6806 # ever link correctly. If we're not using GNU ld we use -z text
6807 # though, which does catch some bad symbols but isn't as heavy-handed
6808 # as -z defs.
6809 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6810 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6811 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6812 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6813 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6814 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6815 _LT_TAGVAR(link_all_deplibs, $1)=yes
6816 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6817 runpath_var='LD_RUN_PATH'
6818
6819 case $cc_basename in
6820 CC*)
6821 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6822 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6823 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6824 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6825 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6826 '"$_LT_TAGVAR(reload_cmds, $1)"
6827 ;;
6828 *)
6829 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6830 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6831 ;;
6832 esac
6833 ;;
6834
6835 tandem*)
6836 case $cc_basename in
6837 NCC*)
6838 # NonStop-UX NCC 3.20
6839 # FIXME: insert proper C++ library support
6840 _LT_TAGVAR(ld_shlibs, $1)=no
6841 ;;
6842 *)
6843 # FIXME: insert proper C++ library support
6844 _LT_TAGVAR(ld_shlibs, $1)=no
6845 ;;
6846 esac
6847 ;;
6848
6849 vxworks*)
6850 # FIXME: insert proper C++ library support
6851 _LT_TAGVAR(ld_shlibs, $1)=no
6852 ;;
6853
6854 *)
6855 # FIXME: insert proper C++ library support
6856 _LT_TAGVAR(ld_shlibs, $1)=no
6857 ;;
6858 esac
6859
6860 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6861 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6862
6863 _LT_TAGVAR(GCC, $1)="$GXX"
6864 _LT_TAGVAR(LD, $1)="$LD"
6865
6866 ## CAVEAT EMPTOR:
6867 ## There is no encapsulation within the following macros, do not change
6868 ## the running order or otherwise move them around unless you know exactly
6869 ## what you are doing...
6870 _LT_SYS_HIDDEN_LIBDEPS($1)
6871 _LT_COMPILER_PIC($1)
6872 _LT_COMPILER_C_O($1)
6873 _LT_COMPILER_FILE_LOCKS($1)
6874 _LT_LINKER_SHLIBS($1)
6875 _LT_SYS_DYNAMIC_LINKER($1)
6876 _LT_LINKER_HARDCODE_LIBPATH($1)
6877
6878 _LT_CONFIG($1)
6879 fi # test -n "$compiler"
6880
6881 CC=$lt_save_CC
6882 CFLAGS=$lt_save_CFLAGS
6883 LDCXX=$LD
6884 LD=$lt_save_LD
6885 GCC=$lt_save_GCC
6886 with_gnu_ld=$lt_save_with_gnu_ld
6887 lt_cv_path_LDCXX=$lt_cv_path_LD
6888 lt_cv_path_LD=$lt_save_path_LD
6889 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6890 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6891 fi # test "$_lt_caught_CXX_error" != yes
6892
6893 AC_LANG_POP
6894 ])# _LT_LANG_CXX_CONFIG
6895
6896
6897 # _LT_FUNC_STRIPNAME_CNF
6898 # ----------------------
6899 # func_stripname_cnf prefix suffix name
6900 # strip PREFIX and SUFFIX off of NAME.
6901 # PREFIX and SUFFIX must not contain globbing or regex special
6902 # characters, hashes, percent signs, but SUFFIX may contain a leading
6903 # dot (in which case that matches only a dot).
6904 #
6905 # This function is identical to the (non-XSI) version of func_stripname,
6906 # except this one can be used by m4 code that may be executed by configure,
6907 # rather than the libtool script.
6908 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6909 AC_REQUIRE([_LT_DECL_SED])
6910 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6911 func_stripname_cnf ()
6912 {
6913 case ${2} in
6914 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6915 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6916 esac
6917 } # func_stripname_cnf
6918 ])# _LT_FUNC_STRIPNAME_CNF
6919
6920 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6921 # ---------------------------------
6922 # Figure out "hidden" library dependencies from verbose
6923 # compiler output when linking a shared library.
6924 # Parse the compiler output and extract the necessary
6925 # objects, libraries and library flags.
6926 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6927 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6928 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6929 # Dependencies to place before and after the object being linked:
6930 _LT_TAGVAR(predep_objects, $1)=
6931 _LT_TAGVAR(postdep_objects, $1)=
6932 _LT_TAGVAR(predeps, $1)=
6933 _LT_TAGVAR(postdeps, $1)=
6934 _LT_TAGVAR(compiler_lib_search_path, $1)=
6935
6936 dnl we can't use the lt_simple_compile_test_code here,
6937 dnl because it contains code intended for an executable,
6938 dnl not a library. It's possible we should let each
6939 dnl tag define a new lt_????_link_test_code variable,
6940 dnl but it's only used here...
6941 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6942 int a;
6943 void foo (void) { a = 0; }
6944 _LT_EOF
6945 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6946 class Foo
6947 {
6948 public:
6949 Foo (void) { a = 0; }
6950 private:
6951 int a;
6952 };
6953 _LT_EOF
6954 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6955 subroutine foo
6956 implicit none
6957 integer*4 a
6958 a=0
6959 return
6960 end
6961 _LT_EOF
6962 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6963 subroutine foo
6964 implicit none
6965 integer a
6966 a=0
6967 return
6968 end
6969 _LT_EOF
6970 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6971 public class foo {
6972 private int a;
6973 public void bar (void) {
6974 a = 0;
6975 }
6976 };
6977 _LT_EOF
6978 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6979 package foo
6980 func foo() {
6981 }
6982 _LT_EOF
6983 ])
6984
6985 _lt_libdeps_save_CFLAGS=$CFLAGS
6986 case "$CC $CFLAGS " in #(
6987 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6988 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6989 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
6990 esac
6991
6992 dnl Parse the compiler output and extract the necessary
6993 dnl objects, libraries and library flags.
6994 if AC_TRY_EVAL(ac_compile); then
6995 # Parse the compiler output and extract the necessary
6996 # objects, libraries and library flags.
6997
6998 # Sentinel used to keep track of whether or not we are before
6999 # the conftest object file.
7000 pre_test_object_deps_done=no
7001
7002 for p in `eval "$output_verbose_link_cmd"`; do
7003 case ${prev}${p} in
7004
7005 -L* | -R* | -l*)
7006 # Some compilers place space between "-{L,R}" and the path.
7007 # Remove the space.
7008 if test $p = "-L" ||
7009 test $p = "-R"; then
7010 prev=$p
7011 continue
7012 fi
7013
7014 # Expand the sysroot to ease extracting the directories later.
7015 if test -z "$prev"; then
7016 case $p in
7017 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7018 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7019 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7020 esac
7021 fi
7022 case $p in
7023 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7024 esac
7025 if test "$pre_test_object_deps_done" = no; then
7026 case ${prev} in
7027 -L | -R)
7028 # Internal compiler library paths should come after those
7029 # provided the user. The postdeps already come after the
7030 # user supplied libs so there is no need to process them.
7031 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7032 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7033 else
7034 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7035 fi
7036 ;;
7037 # The "-l" case would never come before the object being
7038 # linked, so don't bother handling this case.
7039 esac
7040 else
7041 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7042 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7043 else
7044 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7045 fi
7046 fi
7047 prev=
7048 ;;
7049
7050 *.lto.$objext) ;; # Ignore GCC LTO objects
7051 *.$objext)
7052 # This assumes that the test object file only shows up
7053 # once in the compiler output.
7054 if test "$p" = "conftest.$objext"; then
7055 pre_test_object_deps_done=yes
7056 continue
7057 fi
7058
7059 if test "$pre_test_object_deps_done" = no; then
7060 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7061 _LT_TAGVAR(predep_objects, $1)="$p"
7062 else
7063 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7064 fi
7065 else
7066 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7067 _LT_TAGVAR(postdep_objects, $1)="$p"
7068 else
7069 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7070 fi
7071 fi
7072 ;;
7073
7074 *) ;; # Ignore the rest.
7075
7076 esac
7077 done
7078
7079 # Clean up.
7080 rm -f a.out a.exe
7081 else
7082 echo "libtool.m4: error: problem compiling $1 test program"
7083 fi
7084
7085 $RM -f confest.$objext
7086 CFLAGS=$_lt_libdeps_save_CFLAGS
7087
7088 # PORTME: override above test on systems where it is broken
7089 m4_if([$1], [CXX],
7090 [case $host_os in
7091 interix[[3-9]]*)
7092 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7093 # hack all around it, let's just trust "g++" to DTRT.
7094 _LT_TAGVAR(predep_objects,$1)=
7095 _LT_TAGVAR(postdep_objects,$1)=
7096 _LT_TAGVAR(postdeps,$1)=
7097 ;;
7098
7099 linux*)
7100 case `$CC -V 2>&1 | sed 5q` in
7101 *Sun\ C*)
7102 # Sun C++ 5.9
7103
7104 # The more standards-conforming stlport4 library is
7105 # incompatible with the Cstd library. Avoid specifying
7106 # it if it's in CXXFLAGS. Ignore libCrun as
7107 # -library=stlport4 depends on it.
7108 case " $CXX $CXXFLAGS " in
7109 *" -library=stlport4 "*)
7110 solaris_use_stlport4=yes
7111 ;;
7112 esac
7113
7114 if test "$solaris_use_stlport4" != yes; then
7115 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7116 fi
7117 ;;
7118 esac
7119 ;;
7120
7121 solaris*)
7122 case $cc_basename in
7123 CC* | sunCC*)
7124 # The more standards-conforming stlport4 library is
7125 # incompatible with the Cstd library. Avoid specifying
7126 # it if it's in CXXFLAGS. Ignore libCrun as
7127 # -library=stlport4 depends on it.
7128 case " $CXX $CXXFLAGS " in
7129 *" -library=stlport4 "*)
7130 solaris_use_stlport4=yes
7131 ;;
7132 esac
7133
7134 # Adding this requires a known-good setup of shared libraries for
7135 # Sun compiler versions before 5.6, else PIC objects from an old
7136 # archive will be linked into the output, leading to subtle bugs.
7137 if test "$solaris_use_stlport4" != yes; then
7138 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7139 fi
7140 ;;
7141 esac
7142 ;;
7143 esac
7144 ])
7145
7146 case " $_LT_TAGVAR(postdeps, $1) " in
7147 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7148 esac
7149 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7150 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7151 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7152 fi
7153 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7154 [The directories searched by this compiler when creating a shared library])
7155 _LT_TAGDECL([], [predep_objects], [1],
7156 [Dependencies to place before and after the objects being linked to
7157 create a shared library])
7158 _LT_TAGDECL([], [postdep_objects], [1])
7159 _LT_TAGDECL([], [predeps], [1])
7160 _LT_TAGDECL([], [postdeps], [1])
7161 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7162 [The library search path used internally by the compiler when linking
7163 a shared library])
7164 ])# _LT_SYS_HIDDEN_LIBDEPS
7165
7166
7167 # _LT_LANG_F77_CONFIG([TAG])
7168 # --------------------------
7169 # Ensure that the configuration variables for a Fortran 77 compiler are
7170 # suitably defined. These variables are subsequently used by _LT_CONFIG
7171 # to write the compiler configuration to `libtool'.
7172 m4_defun([_LT_LANG_F77_CONFIG],
7173 [AC_LANG_PUSH(Fortran 77)
7174 if test -z "$F77" || test "X$F77" = "Xno"; then
7175 _lt_disable_F77=yes
7176 fi
7177
7178 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7179 _LT_TAGVAR(allow_undefined_flag, $1)=
7180 _LT_TAGVAR(always_export_symbols, $1)=no
7181 _LT_TAGVAR(archive_expsym_cmds, $1)=
7182 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7183 _LT_TAGVAR(hardcode_direct, $1)=no
7184 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7186 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7187 _LT_TAGVAR(hardcode_minus_L, $1)=no
7188 _LT_TAGVAR(hardcode_automatic, $1)=no
7189 _LT_TAGVAR(inherit_rpath, $1)=no
7190 _LT_TAGVAR(module_cmds, $1)=
7191 _LT_TAGVAR(module_expsym_cmds, $1)=
7192 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7193 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7194 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7195 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7196 _LT_TAGVAR(no_undefined_flag, $1)=
7197 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7198 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7199
7200 # Source file extension for f77 test sources.
7201 ac_ext=f
7202
7203 # Object file extension for compiled f77 test sources.
7204 objext=o
7205 _LT_TAGVAR(objext, $1)=$objext
7206
7207 # No sense in running all these tests if we already determined that
7208 # the F77 compiler isn't working. Some variables (like enable_shared)
7209 # are currently assumed to apply to all compilers on this platform,
7210 # and will be corrupted by setting them based on a non-working compiler.
7211 if test "$_lt_disable_F77" != yes; then
7212 # Code to be used in simple compile tests
7213 lt_simple_compile_test_code="\
7214 subroutine t
7215 return
7216 end
7217 "
7218
7219 # Code to be used in simple link tests
7220 lt_simple_link_test_code="\
7221 program t
7222 end
7223 "
7224
7225 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7226 _LT_TAG_COMPILER
7227
7228 # save warnings/boilerplate of simple test code
7229 _LT_COMPILER_BOILERPLATE
7230 _LT_LINKER_BOILERPLATE
7231
7232 # Allow CC to be a program name with arguments.
7233 lt_save_CC="$CC"
7234 lt_save_GCC=$GCC
7235 lt_save_CFLAGS=$CFLAGS
7236 CC=${F77-"f77"}
7237 CFLAGS=$FFLAGS
7238 compiler=$CC
7239 _LT_TAGVAR(compiler, $1)=$CC
7240 _LT_CC_BASENAME([$compiler])
7241 GCC=$G77
7242 if test -n "$compiler"; then
7243 AC_MSG_CHECKING([if libtool supports shared libraries])
7244 AC_MSG_RESULT([$can_build_shared])
7245
7246 AC_MSG_CHECKING([whether to build shared libraries])
7247 test "$can_build_shared" = "no" && enable_shared=no
7248
7249 # On AIX, shared libraries and static libraries use the same namespace, and
7250 # are all built from PIC.
7251 case $host_os in
7252 aix3*)
7253 test "$enable_shared" = yes && enable_static=no
7254 if test -n "$RANLIB"; then
7255 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7256 postinstall_cmds='$RANLIB $lib'
7257 fi
7258 ;;
7259 aix[[4-9]]*)
7260 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7261 test "$enable_shared" = yes && enable_static=no
7262 fi
7263 ;;
7264 esac
7265 AC_MSG_RESULT([$enable_shared])
7266
7267 AC_MSG_CHECKING([whether to build static libraries])
7268 # Make sure either enable_shared or enable_static is yes.
7269 test "$enable_shared" = yes || enable_static=yes
7270 AC_MSG_RESULT([$enable_static])
7271
7272 _LT_TAGVAR(GCC, $1)="$G77"
7273 _LT_TAGVAR(LD, $1)="$LD"
7274
7275 ## CAVEAT EMPTOR:
7276 ## There is no encapsulation within the following macros, do not change
7277 ## the running order or otherwise move them around unless you know exactly
7278 ## what you are doing...
7279 _LT_COMPILER_PIC($1)
7280 _LT_COMPILER_C_O($1)
7281 _LT_COMPILER_FILE_LOCKS($1)
7282 _LT_LINKER_SHLIBS($1)
7283 _LT_SYS_DYNAMIC_LINKER($1)
7284 _LT_LINKER_HARDCODE_LIBPATH($1)
7285
7286 _LT_CONFIG($1)
7287 fi # test -n "$compiler"
7288
7289 GCC=$lt_save_GCC
7290 CC="$lt_save_CC"
7291 CFLAGS="$lt_save_CFLAGS"
7292 fi # test "$_lt_disable_F77" != yes
7293
7294 AC_LANG_POP
7295 ])# _LT_LANG_F77_CONFIG
7296
7297
7298 # _LT_LANG_FC_CONFIG([TAG])
7299 # -------------------------
7300 # Ensure that the configuration variables for a Fortran compiler are
7301 # suitably defined. These variables are subsequently used by _LT_CONFIG
7302 # to write the compiler configuration to `libtool'.
7303 m4_defun([_LT_LANG_FC_CONFIG],
7304 [AC_LANG_PUSH(Fortran)
7305
7306 if test -z "$FC" || test "X$FC" = "Xno"; then
7307 _lt_disable_FC=yes
7308 fi
7309
7310 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7311 _LT_TAGVAR(allow_undefined_flag, $1)=
7312 _LT_TAGVAR(always_export_symbols, $1)=no
7313 _LT_TAGVAR(archive_expsym_cmds, $1)=
7314 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7315 _LT_TAGVAR(hardcode_direct, $1)=no
7316 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7318 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7319 _LT_TAGVAR(hardcode_minus_L, $1)=no
7320 _LT_TAGVAR(hardcode_automatic, $1)=no
7321 _LT_TAGVAR(inherit_rpath, $1)=no
7322 _LT_TAGVAR(module_cmds, $1)=
7323 _LT_TAGVAR(module_expsym_cmds, $1)=
7324 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7325 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7326 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7327 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7328 _LT_TAGVAR(no_undefined_flag, $1)=
7329 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7330 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7331
7332 # Source file extension for fc test sources.
7333 ac_ext=${ac_fc_srcext-f}
7334
7335 # Object file extension for compiled fc test sources.
7336 objext=o
7337 _LT_TAGVAR(objext, $1)=$objext
7338
7339 # No sense in running all these tests if we already determined that
7340 # the FC compiler isn't working. Some variables (like enable_shared)
7341 # are currently assumed to apply to all compilers on this platform,
7342 # and will be corrupted by setting them based on a non-working compiler.
7343 if test "$_lt_disable_FC" != yes; then
7344 # Code to be used in simple compile tests
7345 lt_simple_compile_test_code="\
7346 subroutine t
7347 return
7348 end
7349 "
7350
7351 # Code to be used in simple link tests
7352 lt_simple_link_test_code="\
7353 program t
7354 end
7355 "
7356
7357 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7358 _LT_TAG_COMPILER
7359
7360 # save warnings/boilerplate of simple test code
7361 _LT_COMPILER_BOILERPLATE
7362 _LT_LINKER_BOILERPLATE
7363
7364 # Allow CC to be a program name with arguments.
7365 lt_save_CC="$CC"
7366 lt_save_GCC=$GCC
7367 lt_save_CFLAGS=$CFLAGS
7368 CC=${FC-"f95"}
7369 CFLAGS=$FCFLAGS
7370 compiler=$CC
7371 GCC=$ac_cv_fc_compiler_gnu
7372
7373 _LT_TAGVAR(compiler, $1)=$CC
7374 _LT_CC_BASENAME([$compiler])
7375
7376 if test -n "$compiler"; then
7377 AC_MSG_CHECKING([if libtool supports shared libraries])
7378 AC_MSG_RESULT([$can_build_shared])
7379
7380 AC_MSG_CHECKING([whether to build shared libraries])
7381 test "$can_build_shared" = "no" && enable_shared=no
7382
7383 # On AIX, shared libraries and static libraries use the same namespace, and
7384 # are all built from PIC.
7385 case $host_os in
7386 aix3*)
7387 test "$enable_shared" = yes && enable_static=no
7388 if test -n "$RANLIB"; then
7389 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7390 postinstall_cmds='$RANLIB $lib'
7391 fi
7392 ;;
7393 aix[[4-9]]*)
7394 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7395 test "$enable_shared" = yes && enable_static=no
7396 fi
7397 ;;
7398 esac
7399 AC_MSG_RESULT([$enable_shared])
7400
7401 AC_MSG_CHECKING([whether to build static libraries])
7402 # Make sure either enable_shared or enable_static is yes.
7403 test "$enable_shared" = yes || enable_static=yes
7404 AC_MSG_RESULT([$enable_static])
7405
7406 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7407 _LT_TAGVAR(LD, $1)="$LD"
7408
7409 ## CAVEAT EMPTOR:
7410 ## There is no encapsulation within the following macros, do not change
7411 ## the running order or otherwise move them around unless you know exactly
7412 ## what you are doing...
7413 _LT_SYS_HIDDEN_LIBDEPS($1)
7414 _LT_COMPILER_PIC($1)
7415 _LT_COMPILER_C_O($1)
7416 _LT_COMPILER_FILE_LOCKS($1)
7417 _LT_LINKER_SHLIBS($1)
7418 _LT_SYS_DYNAMIC_LINKER($1)
7419 _LT_LINKER_HARDCODE_LIBPATH($1)
7420
7421 _LT_CONFIG($1)
7422 fi # test -n "$compiler"
7423
7424 GCC=$lt_save_GCC
7425 CC=$lt_save_CC
7426 CFLAGS=$lt_save_CFLAGS
7427 fi # test "$_lt_disable_FC" != yes
7428
7429 AC_LANG_POP
7430 ])# _LT_LANG_FC_CONFIG
7431
7432
7433 # _LT_LANG_GCJ_CONFIG([TAG])
7434 # --------------------------
7435 # Ensure that the configuration variables for the GNU Java Compiler compiler
7436 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7437 # to write the compiler configuration to `libtool'.
7438 m4_defun([_LT_LANG_GCJ_CONFIG],
7439 [AC_REQUIRE([LT_PROG_GCJ])dnl
7440 AC_LANG_SAVE
7441
7442 # Source file extension for Java test sources.
7443 ac_ext=java
7444
7445 # Object file extension for compiled Java test sources.
7446 objext=o
7447 _LT_TAGVAR(objext, $1)=$objext
7448
7449 # Code to be used in simple compile tests
7450 lt_simple_compile_test_code="class foo {}"
7451
7452 # Code to be used in simple link tests
7453 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7454
7455 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7456 _LT_TAG_COMPILER
7457
7458 # save warnings/boilerplate of simple test code
7459 _LT_COMPILER_BOILERPLATE
7460 _LT_LINKER_BOILERPLATE
7461
7462 # Allow CC to be a program name with arguments.
7463 lt_save_CC=$CC
7464 lt_save_CFLAGS=$CFLAGS
7465 lt_save_GCC=$GCC
7466 GCC=yes
7467 CC=${GCJ-"gcj"}
7468 CFLAGS=$GCJFLAGS
7469 compiler=$CC
7470 _LT_TAGVAR(compiler, $1)=$CC
7471 _LT_TAGVAR(LD, $1)="$LD"
7472 _LT_CC_BASENAME([$compiler])
7473
7474 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7475 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7476
7477 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7478 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7479 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7480
7481 ## CAVEAT EMPTOR:
7482 ## There is no encapsulation within the following macros, do not change
7483 ## the running order or otherwise move them around unless you know exactly
7484 ## what you are doing...
7485 if test -n "$compiler"; then
7486 _LT_COMPILER_NO_RTTI($1)
7487 _LT_COMPILER_PIC($1)
7488 _LT_COMPILER_C_O($1)
7489 _LT_COMPILER_FILE_LOCKS($1)
7490 _LT_LINKER_SHLIBS($1)
7491 _LT_LINKER_HARDCODE_LIBPATH($1)
7492
7493 _LT_CONFIG($1)
7494 fi
7495
7496 AC_LANG_RESTORE
7497
7498 GCC=$lt_save_GCC
7499 CC=$lt_save_CC
7500 CFLAGS=$lt_save_CFLAGS
7501 ])# _LT_LANG_GCJ_CONFIG
7502
7503
7504 # _LT_LANG_GO_CONFIG([TAG])
7505 # --------------------------
7506 # Ensure that the configuration variables for the GNU Go compiler
7507 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7508 # to write the compiler configuration to `libtool'.
7509 m4_defun([_LT_LANG_GO_CONFIG],
7510 [AC_REQUIRE([LT_PROG_GO])dnl
7511 AC_LANG_SAVE
7512
7513 # Source file extension for Go test sources.
7514 ac_ext=go
7515
7516 # Object file extension for compiled Go test sources.
7517 objext=o
7518 _LT_TAGVAR(objext, $1)=$objext
7519
7520 # Code to be used in simple compile tests
7521 lt_simple_compile_test_code="package main; func main() { }"
7522
7523 # Code to be used in simple link tests
7524 lt_simple_link_test_code='package main; func main() { }'
7525
7526 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7527 _LT_TAG_COMPILER
7528
7529 # save warnings/boilerplate of simple test code
7530 _LT_COMPILER_BOILERPLATE
7531 _LT_LINKER_BOILERPLATE
7532
7533 # Allow CC to be a program name with arguments.
7534 lt_save_CC=$CC
7535 lt_save_CFLAGS=$CFLAGS
7536 lt_save_GCC=$GCC
7537 GCC=yes
7538 CC=${GOC-"gccgo"}
7539 CFLAGS=$GOFLAGS
7540 compiler=$CC
7541 _LT_TAGVAR(compiler, $1)=$CC
7542 _LT_TAGVAR(LD, $1)="$LD"
7543 _LT_CC_BASENAME([$compiler])
7544
7545 # Go did not exist at the time GCC didn't implicitly link libc in.
7546 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7547
7548 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7549 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7550 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7551
7552 ## CAVEAT EMPTOR:
7553 ## There is no encapsulation within the following macros, do not change
7554 ## the running order or otherwise move them around unless you know exactly
7555 ## what you are doing...
7556 if test -n "$compiler"; then
7557 _LT_COMPILER_NO_RTTI($1)
7558 _LT_COMPILER_PIC($1)
7559 _LT_COMPILER_C_O($1)
7560 _LT_COMPILER_FILE_LOCKS($1)
7561 _LT_LINKER_SHLIBS($1)
7562 _LT_LINKER_HARDCODE_LIBPATH($1)
7563
7564 _LT_CONFIG($1)
7565 fi
7566
7567 AC_LANG_RESTORE
7568
7569 GCC=$lt_save_GCC
7570 CC=$lt_save_CC
7571 CFLAGS=$lt_save_CFLAGS
7572 ])# _LT_LANG_GO_CONFIG
7573
7574
7575 # _LT_LANG_RC_CONFIG([TAG])
7576 # -------------------------
7577 # Ensure that the configuration variables for the Windows resource compiler
7578 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7579 # to write the compiler configuration to `libtool'.
7580 m4_defun([_LT_LANG_RC_CONFIG],
7581 [AC_REQUIRE([LT_PROG_RC])dnl
7582 AC_LANG_SAVE
7583
7584 # Source file extension for RC test sources.
7585 ac_ext=rc
7586
7587 # Object file extension for compiled RC test sources.
7588 objext=o
7589 _LT_TAGVAR(objext, $1)=$objext
7590
7591 # Code to be used in simple compile tests
7592 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7593
7594 # Code to be used in simple link tests
7595 lt_simple_link_test_code="$lt_simple_compile_test_code"
7596
7597 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7598 _LT_TAG_COMPILER
7599
7600 # save warnings/boilerplate of simple test code
7601 _LT_COMPILER_BOILERPLATE
7602 _LT_LINKER_BOILERPLATE
7603
7604 # Allow CC to be a program name with arguments.
7605 lt_save_CC="$CC"
7606 lt_save_CFLAGS=$CFLAGS
7607 lt_save_GCC=$GCC
7608 GCC=
7609 CC=${RC-"windres"}
7610 CFLAGS=
7611 compiler=$CC
7612 _LT_TAGVAR(compiler, $1)=$CC
7613 _LT_CC_BASENAME([$compiler])
7614 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7615
7616 if test -n "$compiler"; then
7617 :
7618 _LT_CONFIG($1)
7619 fi
7620
7621 GCC=$lt_save_GCC
7622 AC_LANG_RESTORE
7623 CC=$lt_save_CC
7624 CFLAGS=$lt_save_CFLAGS
7625 ])# _LT_LANG_RC_CONFIG
7626
7627
7628 # LT_PROG_GCJ
7629 # -----------
7630 AC_DEFUN([LT_PROG_GCJ],
7631 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7632 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7633 [AC_CHECK_TOOL(GCJ, gcj,)
7634 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7635 AC_SUBST(GCJFLAGS)])])[]dnl
7636 ])
7637
7638 # Old name:
7639 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7640 dnl aclocal-1.4 backwards compatibility:
7641 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7642
7643
7644 # LT_PROG_GO
7645 # ----------
7646 AC_DEFUN([LT_PROG_GO],
7647 [AC_CHECK_TOOL(GOC, gccgo,)
7648 ])
7649
7650
7651 # LT_PROG_RC
7652 # ----------
7653 AC_DEFUN([LT_PROG_RC],
7654 [AC_CHECK_TOOL(RC, windres,)
7655 ])
7656
7657 # Old name:
7658 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7659 dnl aclocal-1.4 backwards compatibility:
7660 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7661
7662
7663 # _LT_DECL_EGREP
7664 # --------------
7665 # If we don't have a new enough Autoconf to choose the best grep
7666 # available, choose the one first in the user's PATH.
7667 m4_defun([_LT_DECL_EGREP],
7668 [AC_REQUIRE([AC_PROG_EGREP])dnl
7669 AC_REQUIRE([AC_PROG_FGREP])dnl
7670 test -z "$GREP" && GREP=grep
7671 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7672 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7673 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7674 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7675 AC_SUBST([GREP])
7676 ])
7677
7678
7679 # _LT_DECL_OBJDUMP
7680 # --------------
7681 # If we don't have a new enough Autoconf to choose the best objdump
7682 # available, choose the one first in the user's PATH.
7683 m4_defun([_LT_DECL_OBJDUMP],
7684 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7685 test -z "$OBJDUMP" && OBJDUMP=objdump
7686 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7687 AC_SUBST([OBJDUMP])
7688 ])
7689
7690 # _LT_DECL_DLLTOOL
7691 # ----------------
7692 # Ensure DLLTOOL variable is set.
7693 m4_defun([_LT_DECL_DLLTOOL],
7694 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7695 test -z "$DLLTOOL" && DLLTOOL=dlltool
7696 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7697 AC_SUBST([DLLTOOL])
7698 ])
7699
7700 # _LT_DECL_SED
7701 # ------------
7702 # Check for a fully-functional sed program, that truncates
7703 # as few characters as possible. Prefer GNU sed if found.
7704 m4_defun([_LT_DECL_SED],
7705 [AC_PROG_SED
7706 test -z "$SED" && SED=sed
7707 Xsed="$SED -e 1s/^X//"
7708 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7709 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7710 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7711 ])# _LT_DECL_SED
7712
7713 m4_ifndef([AC_PROG_SED], [
7714 ############################################################
7715 # NOTE: This macro has been submitted for inclusion into #
7716 # GNU Autoconf as AC_PROG_SED. When it is available in #
7717 # a released version of Autoconf we should remove this #
7718 # macro and use it instead. #
7719 ############################################################
7720
7721 m4_defun([AC_PROG_SED],
7722 [AC_MSG_CHECKING([for a sed that does not truncate output])
7723 AC_CACHE_VAL(lt_cv_path_SED,
7724 [# Loop through the user's path and test for sed and gsed.
7725 # Then use that list of sed's as ones to test for truncation.
7726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727 for as_dir in $PATH
7728 do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
7731 for lt_ac_prog in sed gsed; do
7732 for ac_exec_ext in '' $ac_executable_extensions; do
7733 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7734 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7735 fi
7736 done
7737 done
7738 done
7739 IFS=$as_save_IFS
7740 lt_ac_max=0
7741 lt_ac_count=0
7742 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7743 # along with /bin/sed that truncates output.
7744 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7745 test ! -f $lt_ac_sed && continue
7746 cat /dev/null > conftest.in
7747 lt_ac_count=0
7748 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7749 # Check for GNU sed and select it if it is found.
7750 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7751 lt_cv_path_SED=$lt_ac_sed
7752 break
7753 fi
7754 while true; do
7755 cat conftest.in conftest.in >conftest.tmp
7756 mv conftest.tmp conftest.in
7757 cp conftest.in conftest.nl
7758 echo >>conftest.nl
7759 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7760 cmp -s conftest.out conftest.nl || break
7761 # 10000 chars as input seems more than enough
7762 test $lt_ac_count -gt 10 && break
7763 lt_ac_count=`expr $lt_ac_count + 1`
7764 if test $lt_ac_count -gt $lt_ac_max; then
7765 lt_ac_max=$lt_ac_count
7766 lt_cv_path_SED=$lt_ac_sed
7767 fi
7768 done
7769 done
7770 ])
7771 SED=$lt_cv_path_SED
7772 AC_SUBST([SED])
7773 AC_MSG_RESULT([$SED])
7774 ])#AC_PROG_SED
7775 ])#m4_ifndef
7776
7777 # Old name:
7778 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7779 dnl aclocal-1.4 backwards compatibility:
7780 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7781
7782
7783 # _LT_CHECK_SHELL_FEATURES
7784 # ------------------------
7785 # Find out whether the shell is Bourne or XSI compatible,
7786 # or has some other useful features.
7787 m4_defun([_LT_CHECK_SHELL_FEATURES],
7788 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7789 # Try some XSI features
7790 xsi_shell=no
7791 ( _lt_dummy="a/b/c"
7792 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7793 = c,a/b,b/c, \
7794 && eval 'test $(( 1 + 1 )) -eq 2 \
7795 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7796 && xsi_shell=yes
7797 AC_MSG_RESULT([$xsi_shell])
7798 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7799
7800 AC_MSG_CHECKING([whether the shell understands "+="])
7801 lt_shell_append=no
7802 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7803 >/dev/null 2>&1 \
7804 && lt_shell_append=yes
7805 AC_MSG_RESULT([$lt_shell_append])
7806 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7807
7808 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7809 lt_unset=unset
7810 else
7811 lt_unset=false
7812 fi
7813 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7814
7815 # test EBCDIC or ASCII
7816 case `echo X|tr X '\101'` in
7817 A) # ASCII based system
7818 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7819 lt_SP2NL='tr \040 \012'
7820 lt_NL2SP='tr \015\012 \040\040'
7821 ;;
7822 *) # EBCDIC based system
7823 lt_SP2NL='tr \100 \n'
7824 lt_NL2SP='tr \r\n \100\100'
7825 ;;
7826 esac
7827 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7828 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7829 ])# _LT_CHECK_SHELL_FEATURES
7830
7831
7832 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7833 # ------------------------------------------------------
7834 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7835 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7836 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7837 [dnl {
7838 sed -e '/^$1 ()$/,/^} # $1 /c\
7839 $1 ()\
7840 {\
7841 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7842 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7843 && mv -f "$cfgfile.tmp" "$cfgfile" \
7844 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7845 test 0 -eq $? || _lt_function_replace_fail=:
7846 ])
7847
7848
7849 # _LT_PROG_REPLACE_SHELLFNS
7850 # -------------------------
7851 # Replace existing portable implementations of several shell functions with
7852 # equivalent extended shell implementations where those features are available..
7853 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7854 [if test x"$xsi_shell" = xyes; then
7855 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7856 case ${1} in
7857 */*) func_dirname_result="${1%/*}${2}" ;;
7858 * ) func_dirname_result="${3}" ;;
7859 esac])
7860
7861 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7862 func_basename_result="${1##*/}"])
7863
7864 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7865 case ${1} in
7866 */*) func_dirname_result="${1%/*}${2}" ;;
7867 * ) func_dirname_result="${3}" ;;
7868 esac
7869 func_basename_result="${1##*/}"])
7870
7871 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7872 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7873 # positional parameters, so assign one to ordinary parameter first.
7874 func_stripname_result=${3}
7875 func_stripname_result=${func_stripname_result#"${1}"}
7876 func_stripname_result=${func_stripname_result%"${2}"}])
7877
7878 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7879 func_split_long_opt_name=${1%%=*}
7880 func_split_long_opt_arg=${1#*=}])
7881
7882 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7883 func_split_short_opt_arg=${1#??}
7884 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7885
7886 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7887 case ${1} in
7888 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7889 *) func_lo2o_result=${1} ;;
7890 esac])
7891
7892 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7893
7894 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7895
7896 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7897 fi
7898
7899 if test x"$lt_shell_append" = xyes; then
7900 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7901
7902 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7903 func_quote_for_eval "${2}"
7904 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7905 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7906
7907 # Save a `func_append' function call where possible by direct use of '+='
7908 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7909 && mv -f "$cfgfile.tmp" "$cfgfile" \
7910 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7911 test 0 -eq $? || _lt_function_replace_fail=:
7912 else
7913 # Save a `func_append' function call even when '+=' is not available
7914 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7915 && mv -f "$cfgfile.tmp" "$cfgfile" \
7916 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7917 test 0 -eq $? || _lt_function_replace_fail=:
7918 fi
7919
7920 if test x"$_lt_function_replace_fail" = x":"; then
7921 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7922 fi
7923 ])
7924
7925 # _LT_PATH_CONVERSION_FUNCTIONS
7926 # -----------------------------
7927 # Determine which file name conversion functions should be used by
7928 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7929 # for certain cross-compile configurations and native mingw.
7930 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7931 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7932 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7933 AC_MSG_CHECKING([how to convert $build file names to $host format])
7934 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7935 [case $host in
7936 *-*-mingw* )
7937 case $build in
7938 *-*-mingw* ) # actually msys
7939 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7940 ;;
7941 *-*-cygwin* )
7942 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7943 ;;
7944 * ) # otherwise, assume *nix
7945 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7946 ;;
7947 esac
7948 ;;
7949 *-*-cygwin* )
7950 case $build in
7951 *-*-mingw* ) # actually msys
7952 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7953 ;;
7954 *-*-cygwin* )
7955 lt_cv_to_host_file_cmd=func_convert_file_noop
7956 ;;
7957 * ) # otherwise, assume *nix
7958 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7959 ;;
7960 esac
7961 ;;
7962 * ) # unhandled hosts (and "normal" native builds)
7963 lt_cv_to_host_file_cmd=func_convert_file_noop
7964 ;;
7965 esac
7966 ])
7967 to_host_file_cmd=$lt_cv_to_host_file_cmd
7968 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7969 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7970 [0], [convert $build file names to $host format])dnl
7971
7972 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7973 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7974 [#assume ordinary cross tools, or native build.
7975 lt_cv_to_tool_file_cmd=func_convert_file_noop
7976 case $host in
7977 *-*-mingw* )
7978 case $build in
7979 *-*-mingw* ) # actually msys
7980 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7981 ;;
7982 esac
7983 ;;
7984 esac
7985 ])
7986 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7987 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7988 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7989 [0], [convert $build files to toolchain format])dnl
7990 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 7 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85 ])# _LT_SET_OPTIONS
86
87
88 ## --------------------------------- ##
89 ## Macros to handle LT_INIT options. ##
90 ## --------------------------------- ##
91
92 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93 # -----------------------------------------
94 m4_define([_LT_MANGLE_DEFUN],
95 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99 # -----------------------------------------------
100 m4_define([LT_OPTION_DEFINE],
101 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102 ])# LT_OPTION_DEFINE
103
104
105 # dlopen
106 # ------
107 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108 ])
109
110 AU_DEFUN([AC_LIBTOOL_DLOPEN],
111 [_LT_SET_OPTION([LT_INIT], [dlopen])
112 AC_DIAGNOSE([obsolete],
113 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
115 ])
116
117 dnl aclocal-1.4 backwards compatibility:
118 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121 # win32-dll
122 # ---------
123 # Declare package support for building win32 dll's.
124 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125 [enable_win32_dll=yes
126
127 case $host in
128 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133 esac
134
135 test -z "$AS" && AS=as
136 _LT_DECL([], [AS], [1], [Assembler program])dnl
137
138 test -z "$DLLTOOL" && DLLTOOL=dlltool
139 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
140
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
143 ])# win32-dll
144
145 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
147 _LT_SET_OPTION([LT_INIT], [win32-dll])
148 AC_DIAGNOSE([obsolete],
149 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
151 ])
152
153 dnl aclocal-1.4 backwards compatibility:
154 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157 # _LT_ENABLE_SHARED([DEFAULT])
158 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162 m4_define([_LT_ENABLE_SHARED],
163 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164 AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188 ])# _LT_ENABLE_SHARED
189
190 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193 # Old names:
194 AC_DEFUN([AC_ENABLE_SHARED],
195 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196 ])
197
198 AC_DEFUN([AC_DISABLE_SHARED],
199 [_LT_SET_OPTION([LT_INIT], [disable-shared])
200 ])
201
202 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205 dnl aclocal-1.4 backwards compatibility:
206 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211 # _LT_ENABLE_STATIC([DEFAULT])
212 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216 m4_define([_LT_ENABLE_STATIC],
217 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218 AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242 ])# _LT_ENABLE_STATIC
243
244 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247 # Old names:
248 AC_DEFUN([AC_ENABLE_STATIC],
249 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250 ])
251
252 AC_DEFUN([AC_DISABLE_STATIC],
253 [_LT_SET_OPTION([LT_INIT], [disable-static])
254 ])
255
256 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259 dnl aclocal-1.4 backwards compatibility:
260 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270 m4_define([_LT_ENABLE_FAST_INSTALL],
271 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272 AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294 _LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296 ])# _LT_ENABLE_FAST_INSTALL
297
298 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301 # Old names:
302 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304 AC_DIAGNOSE([obsolete],
305 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
307 ])
308
309 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311 AC_DIAGNOSE([obsolete],
312 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
314 ])
315
316 dnl aclocal-1.4 backwards compatibility:
317 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321 # _LT_WITH_PIC([MODE])
322 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
324 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326 m4_define([_LT_WITH_PIC],
327 [AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [lt_p=${PACKAGE-default}
331 case $withval in
332 yes|no) pic_mode=$withval ;;
333 *)
334 pic_mode=default
335 # Look at the argument we got. We use all the common list separators.
336 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
337 for lt_pkg in $withval; do
338 IFS="$lt_save_ifs"
339 if test "X$lt_pkg" = "X$lt_p"; then
340 pic_mode=yes
341 fi
342 done
343 IFS="$lt_save_ifs"
344 ;;
345 esac],
346 [pic_mode=default])
347
348 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
349
350 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
351 ])# _LT_WITH_PIC
352
353 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
354 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
355
356 # Old name:
357 AU_DEFUN([AC_LIBTOOL_PICMODE],
358 [_LT_SET_OPTION([LT_INIT], [pic-only])
359 AC_DIAGNOSE([obsolete],
360 [$0: Remove this warning and the call to _LT_SET_OPTION when you
361 put the `pic-only' option into LT_INIT's first parameter.])
362 ])
363
364 dnl aclocal-1.4 backwards compatibility:
365 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
366
367 ## ----------------- ##
368 ## LTDL_INIT Options ##
369 ## ----------------- ##
370
371 m4_define([_LTDL_MODE], [])
372 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
373 [m4_define([_LTDL_MODE], [nonrecursive])])
374 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
375 [m4_define([_LTDL_MODE], [recursive])])
376 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
377 [m4_define([_LTDL_MODE], [subproject])])
378
379 m4_define([_LTDL_TYPE], [])
380 LT_OPTION_DEFINE([LTDL_INIT], [installable],
381 [m4_define([_LTDL_TYPE], [installable])])
382 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
383 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltsugar.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
13
14
15 # lt_join(SEP, ARG1, [ARG2...])
16 # -----------------------------
17 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
18 # associated separator.
19 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
20 # versions in m4sugar had bugs.
21 m4_define([lt_join],
22 [m4_if([$#], [1], [],
23 [$#], [2], [[$2]],
24 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
25 m4_define([_lt_join],
26 [m4_if([$#$2], [2], [],
27 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
28
29
30 # lt_car(LIST)
31 # lt_cdr(LIST)
32 # ------------
33 # Manipulate m4 lists.
34 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 m4_define([lt_car], [[$1]])
37 m4_define([lt_cdr],
38 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
39 [$#], 1, [],
40 [m4_dquote(m4_shift($@))])])
41 m4_define([lt_unquote], $1)
42
43
44 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
45 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Note that neither SEPARATOR nor STRING are expanded; they are appended
48 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
49 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
50 # than defined and empty).
51 #
52 # This macro is needed until we can rely on Autoconf 2.62, since earlier
53 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
54 m4_define([lt_append],
55 [m4_define([$1],
56 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
57
58
59
60 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
61 # ----------------------------------------------------------
62 # Produce a SEP delimited list of all paired combinations of elements of
63 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
64 # has the form PREFIXmINFIXSUFFIXn.
65 # Needed until we can rely on m4_combine added in Autoconf 2.62.
66 m4_define([lt_combine],
67 [m4_if(m4_eval([$# > 3]), [1],
68 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
69 [[m4_foreach([_Lt_prefix], [$2],
70 [m4_foreach([_Lt_suffix],
71 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
72 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
73
74
75 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
76 # -----------------------------------------------------------------------
77 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
79 m4_define([lt_if_append_uniq],
80 [m4_ifdef([$1],
81 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
82 [lt_append([$1], [$2], [$3])$4],
83 [$5])],
84 [lt_append([$1], [$2], [$3])$4])])
85
86
87 # lt_dict_add(DICT, KEY, VALUE)
88 # -----------------------------
89 m4_define([lt_dict_add],
90 [m4_define([$1($2)], [$3])])
91
92
93 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94 # --------------------------------------------
95 m4_define([lt_dict_add_subkey],
96 [m4_define([$1($2:$3)], [$4])])
97
98
99 # lt_dict_fetch(DICT, KEY, [SUBKEY])
100 # ----------------------------------
101 m4_define([lt_dict_fetch],
102 [m4_ifval([$3],
103 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
104 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
105
106
107 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
108 # -----------------------------------------------------------------
109 m4_define([lt_if_dict_fetch],
110 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
111 [$5],
112 [$6])])
113
114
115 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
116 # --------------------------------------------------------------
117 m4_define([lt_dict_filter],
118 [m4_if([$5], [], [],
119 [lt_join(m4_quote(m4_default([$4], [[, ]])),
120 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
121 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 3337 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4.2])
15 m4_define([LT_PACKAGE_REVISION], [1.3337])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.2'
19 macro_revision='1.3337'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004.
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 5 lt~obsolete.m4
10
11 # These exist entirely to fool aclocal when bootstrapping libtool.
12 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # which have later been changed to m4_define as they aren't part of the
15 # exported API, or moved to Autoconf or Automake where they belong.
16 #
17 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
18 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
19 # using a macro with the same name in our local m4/libtool.m4 it'll
20 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
21 # and doesn't know about Autoconf macros at all.)
22 #
23 # So we provide this file, which has a silly filename so it's always
24 # included after everything else. This provides aclocal with the
25 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
26 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 #
29 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
30 # Yes, that means every name once taken will need to remain here until
31 # we give up compatibility with versions before 1.7, at which point
32 # we need to keep only those names which we still refer to.
33
34 # This is to help aclocal find these macros, as it can't see m4_define.
35 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
36
37 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
38 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
39 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
40 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
41 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
42 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
43 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
44 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
45 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
46 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
47 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
48 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
49 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
50 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
51 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
52 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
53 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
54 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
55 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
56 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
57 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
58 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
59 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
60 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
61 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
62 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
63 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
64 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
65 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
66 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
67 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
68 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
69 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
70 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
71 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
72 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
73 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
74 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
75 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
76 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
77 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
78 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
79 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
80 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
81 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
82 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
83 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
84 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
85 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
86 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
87 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
88 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
89 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
90 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
91 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
92 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
93 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
94 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
96 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
97 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2012-06-26.16; # UTC
4
5 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
6 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 if test $# -eq 0; then
27 echo 1>&2 "Try '$0 --help' for more information"
28 exit 1
29 fi
30
31 case $1 in
32
33 --is-lightweight)
34 # Used by our autoconf macros to check whether the available missing
35 # script is modern enough.
36 exit 0
37 ;;
38
39 --run)
40 # Back-compat with the calling convention used by older automake.
41 shift
42 ;;
43
44 -h|--h|--he|--hel|--help)
45 echo "\
46 $0 [OPTION]... PROGRAM [ARGUMENT]...
47
48 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
49 to PROGRAM being missing or too old.
50
51 Options:
52 -h, --help display this help and exit
53 -v, --version output version information and exit
54
55 Supported PROGRAM values:
56 aclocal autoconf autoheader autom4te automake makeinfo
57 bison yacc flex lex help2man
58
59 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
60 'g' are ignored when checking the name.
61
62 Send bug reports to <bug-automake@gnu.org>."
63 exit $?
64 ;;
65
66 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
67 echo "missing $scriptversion (GNU Automake)"
68 exit $?
69 ;;
70
71 -*)
72 echo 1>&2 "$0: unknown '$1' option"
73 echo 1>&2 "Try '$0 --help' for more information"
74 exit 1
75 ;;
76
77 esac
78
79 # Run the given program, remember its exit status.
80 "$@"; st=$?
81
82 # If it succeeded, we are done.
83 test $st -eq 0 && exit 0
84
85 # Also exit now if we it failed (or wasn't found), and '--version' was
86 # passed; such an option is passed most likely to detect whether the
87 # program is present and works.
88 case $2 in --version|--help) exit $st;; esac
89
90 # Exit code 63 means version mismatch. This often happens when the user
91 # tries to use an ancient version of a tool on a file that requires a
92 # minimum version.
93 if test $st -eq 63; then
94 msg="probably too old"
95 elif test $st -eq 127; then
96 # Program was missing.
97 msg="missing on your system"
98 else
99 # Program was found and executed, but failed. Give up.
100 exit $st
101 fi
102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'automa4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
207
208 # Local variables:
209 # eval: (add-hook 'write-file-hooks 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC"
213 # time-stamp-end: "; # UTC"
214 # End:
0 #
1 # No modifications of this Makefile should be necessary.
2 #
3 # This file contains the build instructions for installing OMF files. It is
4 # generally called from the makefiles for particular formats of documentation.
5 #
6 # Note that you must configure your package with --localstatedir=/var
7 # so that the scrollkeeper-update command below will update the database
8 # in the standard scrollkeeper directory.
9 #
10 # If it is impossible to configure with --localstatedir=/var, then
11 # modify the definition of scrollkeeper_localstate_dir so that
12 # it points to the correct location. Note that you must still use
13 # $(localstatedir) in this or when people build RPMs it will update
14 # the real database on their system instead of the one under RPM_BUILD_ROOT.
15 #
16 # Note: This make file is not incorporated into xmldocs.make because, in
17 # general, there will be other documents install besides XML documents
18 # and the makefiles for these formats should also include this file.
19 #
20 # About this file:
21 # This file was derived from scrollkeeper_example2, a package
22 # illustrating how to install documentation and OMF files for use with
23 # ScrollKeeper 0.3.x and 0.4.x. For more information, see:
24 # http://scrollkeeper.sourceforge.net/
25 # Version: 0.1.3 (last updated: March 20, 2002)
26 #
27
28 omf_dest_dir=$(datadir)/omf/@PACKAGE@
29 scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper
30
31 # At some point, it may be wise to change to something like this:
32 # scrollkeeper_localstate_dir = @SCROLLKEEPER_STATEDIR@
33
34 omf: omf_timestamp
35
36 omf_timestamp: $(omffile)
37 -for file in $(omffile); do \
38 absfile=$(srcdir)/$$file; \
39 test -r $$file && absfile=$$file; \
40 scrollkeeper-preinstall $(docdir)/$(docname).xml $$absfile $$file.out; \
41 done; \
42 touch omf_timestamp
43
44 install-data-hook-omf:
45 $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
46 for file in $(omffile); do \
47 absfile=$(srcdir)/$$file.out; \
48 test -r $$file.out && absfile=$$file.out; \
49 $(INSTALL_DATA) $$absfile $(DESTDIR)$(omf_dest_dir)/$$file; \
50 done
51 -scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir)
52
53 uninstall-local-omf:
54 -for file in $(omffile); do \
55 basefile=`basename $$file`; \
56 rm -f $(DESTDIR)$(omf_dest_dir)/$$basefile; \
57 done
58 -rmdir $(DESTDIR)$(omf_dest_dir)
59 -scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir)
60
61 clean-local-omf:
62 -for file in $(omffile); do \
63 rm -f $$file.out; \
64 done
0 #
1 # No modifications of this Makefile should be necessary.
2 #
3 # To use this template:
4 # 1) Define: figdir, docname, lang, omffile, and entities in
5 # your Makefile.am file for each document directory,
6 # although figdir, omffile, and entities may be empty
7 # 2) Make sure the Makefile in (1) also includes
8 # "include $(top_srcdir)/xmldocs.make" and
9 # "dist-hook: app-dist-hook".
10 # 3) Optionally define 'entities' to hold xml entities which
11 # you would also like installed
12 # 4) Figures must go under $(figdir)/ and be in PNG format
13 # 5) You should only have one document per directory
14 # 6) Note that the figure directory, $(figdir)/, should not have its
15 # own Makefile since this Makefile installs those figures.
16 #
17 # example Makefile.am:
18 # figdir = figures
19 # docname = scrollkeeper-manual
20 # lang = C
21 # omffile=scrollkeeper-manual-C.omf
22 # entities = fdl.xml
23 # include $(top_srcdir)/xmldocs.make
24 # dist-hook: app-dist-hook
25 #
26 # About this file:
27 # This file was taken from scrollkeeper_example2, a package illustrating
28 # how to install documentation and OMF files for use with ScrollKeeper
29 # 0.3.x and 0.4.x. For more information, see:
30 # http://scrollkeeper.sourceforge.net/
31 # Version: 0.1.2 (last updated: March 20, 2002)
32 #
33
34
35 # ********** Begin of section some packagers may need to modify **********
36 # This variable (docdir) specifies where the documents should be installed.
37 # This default value should work for most packages.
38 docdir = $(datadir)/gnome/help/$(docname)/$(lang)
39
40 # ********** You should not have to edit below this line **********
41 xml_files = $(entities) $(docname).xml
42
43 EXTRA_DIST = $(xml_files) $(omffile)
44 CLEANFILES = omf_timestamp
45
46 include $(top_srcdir)/omf.make
47
48 all: omf
49
50 $(docname).xml: $(entities)
51 -ourdir=`pwd`; \
52 cd $(srcdir); \
53 cp $(entities) $$ourdir
54
55 app-dist-hook:
56 if test "$(figdir)"; then \
57 $(mkinstalldirs) $(distdir)/$(figdir); \
58 for file in $(srcdir)/$(figdir)/*.png; do \
59 basefile=`echo $$file | sed -e 's,^.*/,,'`; \
60 $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \
61 done \
62 fi
63
64 install-data-local: omf
65 $(mkinstalldirs) $(DESTDIR)$(docdir)
66 for file in $(xml_files); do \
67 cp $(srcdir)/$$file $(DESTDIR)$(docdir); \
68 done
69 if test "$(figdir)"; then \
70 $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \
71 for file in $(srcdir)/$(figdir)/*.png; do \
72 basefile=`echo $$file | sed -e 's,^.*/,,'`; \
73 $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \
74 done \
75 fi
76
77 install-data-hook: install-data-hook-omf
78
79 uninstall-local: uninstall-local-doc uninstall-local-omf
80
81 uninstall-local-doc:
82 -if test "$(figdir)"; then \
83 for file in $(srcdir)/$(figdir)/*.png; do \
84 basefile=`echo $$file | sed -e 's,^.*/,,'`; \
85 rm -f $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \
86 done; \
87 rmdir $(DESTDIR)$(docdir)/$(figdir); \
88 fi
89 -for file in $(xml_files); do \
90 rm -f $(DESTDIR)$(docdir)/$$file; \
91 done
92 -rmdir $(DESTDIR)$(docdir)
93
94 clean-local: clean-local-doc clean-local-omf
95
96 # for non-srcdir builds, remove the copied entities.
97 clean-local-doc:
98 if test $(srcdir) != .; then \
99 rm -f $(entities); \
100 fi