Codebase list ui-utilcpp / 386770b
Imported Upstream version 1.8.1.snapshot20140701142031weslok Stephan Sürken 9 years ago
91 changed file(s) with 70981 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #----------------------------------------------------------------------
1 # [ui-auto-release configuration]
2 #----------------------------------------------------------------------
3 ui_release_vc_loc="ssh://spabsurd@git.code.sf.net/p/ui-utilcpp/code"
4 ui_release_vc_loc_tags="ssh://spabsurd@git.code.sf.net/p/ui-utilcpp/code"
5 ui_release_vc_loc_branches="ssh://spabsurd@git.code.sf.net/p/ui-utilcpp/code"
6
7 # Where we up- and download tarballs.
8 ui_release_upload_loc="spabsurd,ui-utilcpp@frs.sourceforge.net:/home/frs/project/u/ui/"
9 ui_release_download_loc="http://sourceforge.net/projects/ui-utilcpp/files/"
10
11 ui_release_autochangelog=true
12 ui_release_autonews=true
13
14 # We want an email to be sent on releases here.
15 ui_release_notify="ui-utilcpp-devel@lists.sourceforge.net"
16
17 #----------------------------------------------------------------------
18 # [ui-auto-release Debian configuration]
19 #----------------------------------------------------------------------
20 # @todo: This wont work currently
21 . template.deb_svn+mbd "git+ssh://absurd@git.debian.org/git/collab-maint/ui-auto.git" "ui" "sid" "squeeze"
22 ui_release_deb_vc_tag="branches/1_8_PATCHES"
23
24 #----------------------------------------------------------------------
25 # [ui-auto-env|shell|update configuration ]
26 # ----------------------------------------------------------------------
27 ui_env_library_paths="src/ui-utilcpp/.libs"
28 ui_env_include_paths="src"
29 ui_env_program_paths="src/tools"
0 United Internet, Karlsruhe, Germany.
0 GNU LESSER GENERAL PUBLIC LICENSE
1 Version 3, 29 June 2007
2
3 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4 Everyone is permitted to copy and distribute verbatim copies
5 of this license document, but changing it is not allowed.
6
7
8 This version of the GNU Lesser General Public License incorporates
9 the terms and conditions of version 3 of the GNU General Public
10 License, supplemented by the additional permissions listed below.
11
12 0. Additional Definitions.
13
14 As used herein, "this License" refers to version 3 of the GNU Lesser
15 General Public License, and the "GNU GPL" refers to version 3 of the GNU
16 General Public License.
17
18 "The Library" refers to a covered work governed by this License,
19 other than an Application or a Combined Work as defined below.
20
21 An "Application" is any work that makes use of an interface provided
22 by the Library, but which is not otherwise based on the Library.
23 Defining a subclass of a class defined by the Library is deemed a mode
24 of using an interface provided by the Library.
25
26 A "Combined Work" is a work produced by combining or linking an
27 Application with the Library. The particular version of the Library
28 with which the Combined Work was made is also called the "Linked
29 Version".
30
31 The "Minimal Corresponding Source" for a Combined Work means the
32 Corresponding Source for the Combined Work, excluding any source code
33 for portions of the Combined Work that, considered in isolation, are
34 based on the Application, and not on the Linked Version.
35
36 The "Corresponding Application Code" for a Combined Work means the
37 object code and/or source code for the Application, including any data
38 and utility programs needed for reproducing the Combined Work from the
39 Application, but excluding the System Libraries of the Combined Work.
40
41 1. Exception to Section 3 of the GNU GPL.
42
43 You may convey a covered work under sections 3 and 4 of this License
44 without being bound by section 3 of the GNU GPL.
45
46 2. Conveying Modified Versions.
47
48 If you modify a copy of the Library, and, in your modifications, a
49 facility refers to a function or data to be supplied by an Application
50 that uses the facility (other than as an argument passed when the
51 facility is invoked), then you may convey a copy of the modified
52 version:
53
54 a) under this License, provided that you make a good faith effort to
55 ensure that, in the event an Application does not supply the
56 function or data, the facility still operates, and performs
57 whatever part of its purpose remains meaningful, or
58
59 b) under the GNU GPL, with none of the additional permissions of
60 this License applicable to that copy.
61
62 3. Object Code Incorporating Material from Library Header Files.
63
64 The object code form of an Application may incorporate material from
65 a header file that is part of the Library. You may convey such object
66 code under terms of your choice, provided that, if the incorporated
67 material is not limited to numerical parameters, data structure
68 layouts and accessors, or small macros, inline functions and templates
69 (ten or fewer lines in length), you do both of the following:
70
71 a) Give prominent notice with each copy of the object code that the
72 Library is used in it and that the Library and its use are
73 covered by this License.
74
75 b) Accompany the object code with a copy of the GNU GPL and this license
76 document.
77
78 4. Combined Works.
79
80 You may convey a Combined Work under terms of your choice that,
81 taken together, effectively do not restrict modification of the
82 portions of the Library contained in the Combined Work and reverse
83 engineering for debugging such modifications, if you also do each of
84 the following:
85
86 a) Give prominent notice with each copy of the Combined Work that
87 the Library is used in it and that the Library and its use are
88 covered by this License.
89
90 b) Accompany the Combined Work with a copy of the GNU GPL and this license
91 document.
92
93 c) For a Combined Work that displays copyright notices during
94 execution, include the copyright notice for the Library among
95 these notices, as well as a reference directing the user to the
96 copies of the GNU GPL and this license document.
97
98 d) Do one of the following:
99
100 0) Convey the Minimal Corresponding Source under the terms of this
101 License, and the Corresponding Application Code in a form
102 suitable for, and under terms that permit, the user to
103 recombine or relink the Application with a modified version of
104 the Linked Version to produce a modified Combined Work, in the
105 manner specified by section 6 of the GNU GPL for conveying
106 Corresponding Source.
107
108 1) Use a suitable shared library mechanism for linking with the
109 Library. A suitable mechanism is one that (a) uses at run time
110 a copy of the Library already present on the user's computer
111 system, and (b) will operate properly with a modified version
112 of the Library that is interface-compatible with the Linked
113 Version.
114
115 e) Provide Installation Information, but only if you would otherwise
116 be required to provide such information under section 6 of the
117 GNU GPL, and only to the extent that such information is
118 necessary to install and execute a modified version of the
119 Combined Work produced by recombining or relinking the
120 Application with a modified version of the Linked Version. (If
121 you use option 4d0, the Installation Information must accompany
122 the Minimal Corresponding Source and Corresponding Application
123 Code. If you use option 4d1, you must provide the Installation
124 Information in the manner specified by section 6 of the GNU GPL
125 for conveying Corresponding Source.)
126
127 5. Combined Libraries.
128
129 You may place library facilities that are a work based on the
130 Library side by side in a single library together with other library
131 facilities that are not Applications and are not covered by this
132 License, and convey such a combined library under terms of your
133 choice, if you do both of the following:
134
135 a) Accompany the combined library with a copy of the same work based
136 on the Library, uncombined with any other library facilities,
137 conveyed under the terms of this License.
138
139 b) Give prominent notice with the combined library that part of it
140 is a work based on the Library, and explaining where to find the
141 accompanying uncombined form of the same work.
142
143 6. Revised Versions of the GNU Lesser General Public License.
144
145 The Free Software Foundation may publish revised and/or new versions
146 of the GNU Lesser General Public License from time to time. Such new
147 versions will be similar in spirit to the present version, but may
148 differ in detail to address new problems or concerns.
149
150 Each version is given a distinguishing version number. If the
151 Library as you received it specifies that a certain numbered version
152 of the GNU Lesser General Public License "or any later version"
153 applies to it, you have the option of following the terms and
154 conditions either of that published version or of any later version
155 published by the Free Software Foundation. If the Library as you
156 received it does not specify a version number of the GNU Lesser
157 General Public License, you may choose any version of the GNU Lesser
158 General Public License ever published by the Free Software Foundation.
159
160 If the Library as you received it specifies that a proxy can decide
161 whether future versions of the GNU Lesser General Public License shall
162 apply, that proxy's public statement of acceptance of any version is
163 permanent authorization for you to choose that version for the
164 Library.
0 2013-05-07 12:32 srken
1
2 * configure.ac: * configure.ac: Prepare 1.8.1
3
4 2013-05-07 12:29 srken
5
6 * src/ui-utilcpp/Socket.cpp: Socket::getId: Catch std::exception,
7 not Exception (this method should never fail/raise Exception).
8 (cherry picked from commit
9 6267022c2165bb5fe9c0b2f914617a044d5bf7d6)
10
11 2012-05-08 09:20 srken
12
13 * .ui-auto.conf: .ui-auto.conf: Update stable branch to new stable
14 Debian branch.
15
16 2012-05-07 16:54 srken
17
18 * .ui-auto.conf: argl: Never commit release tarballs.
19
20 (cherry picked from commit
21 e47f895fc156aeba4f39b2441a4c1f9db35936be)
22
23 2012-05-07 16:40 autuse
24
25 * .: [ui-auto-release run by autuse@volvic.schlund.de]: Branch
26 forking at 1.8.0
27
28 2012-05-07 16:36 autuse
29
30 * [ui-auto-release run by autuse@volvic.schlund.de]: Updated from
31 version control.
32
33 2012-05-07 16:35 autuse
34
35 * [ui-auto-release run by autuse@volvic.schlund.de]: News for
36 1.8.0.
37
38 2012-05-07 16:13 autuse
39
40 * [ui-auto-release run by autuse@volvic.schlund.de]: Updated from
41 version control.
42
43 2012-05-07 16:11 autuse
44
45 * [ui-auto-release run by autuse@volvic.schlund.de]: News for
46 1.8.0.
47
48 2012-05-07 16:10 srken
49
50 * NEWS: Update again.
51
52 2012-05-07 14:20 srken
53
54 * Revert ".ui-auto.conf: Only build for squeeze."
55
56 This reverts commit 793cf6cc29079b7fe5fc9ac264f0b60d12563fd1.
57
58 2012-05-07 12:57 srken
59
60 * .ui-auto.conf: Only build for squeeze.
61
62 2012-05-07 12:36 srken
63
64 * .ui-auto.conf: Update to new svn URL (TECITO 1544i).
65
66 2012-05-07 11:12 srken
67
68 * Prepare release notes for 1.8.0
69
70 2012-05-07 10:57 srken
71
72 * Prepare stable release 1.8.0 (library main version 9).
73
74 2012-05-07 10:56 srken
75
76 * ui-auto: Add Eduard && Patrick to release notify (for the Win
77 port).
78
79 2012-04-10 15:22 srken
80
81 * Remove all vc-proprietary $Id$ tags from source.
82
83 2012-04-10 14:52 srken
84
85 * Doxygen: Eliminate new warning with Caps.?pp.
86
87 Doxygen docs are nore warning-free for doxygen 1.7.6.1.
88
89 2012-04-10 14:52 srken
90
91 * Doxygen: Update config to 1.7.6.1.
92
93 2012-04-10 14:52 srken
94
95 * Remove helper tools for already removed code: ContainerUnitTests,
96 HelperUnitTests.
97
98 These would only still compile by accident if the old headers
99 could still be found on the system.
100
101 2012-04-10 14:52 srken
102
103 * c++: Fix last three compiler warnings.
104
105 ui-utilcpp is now checked against g++-4.7 to be warning-free
106 against '-Wall -Wextra -pedantic'.
107
108 2012-04-10 13:28 srken
109
110 * INetSocket: Disable default copy constructor.
111
112 2012-04-10 11:35 srken
113
114 * svn-ignore: Add *-cap tool utility.
115
116 2012-04-04 08:32 ewetzel
117
118 * WSAStartup and WSACleanup added
119
120 2012-04-03 11:41 srken
121
122 * Sockets: Support IPv6 for class INetSocket.
123
124 This API-transparently adds support for IPv6 for the class
125 INetSocket, and updates to the more generic getaddrinfo() and
126 getnameinfo() function family (obsoleting quite some code).
127
128 2012-04-03 11:41 srken
129
130 * Sys: Add system wrappers for ::getaddrinfo and ::getnameinfo.
131
132 These are needed for the IPv6 support for sockets; this also
133 improves the exception error strings for Sys::connect() and
134 Sys::bind().
135
136 2012-02-15 13:36 srken
137
138 * Add source lines of code estimation.
139
140 2011-01-31 12:33 slinder
141
142 * fixed: removed exceptions that were thrown in Windows build; that
143 led to unsalvagable db files
144
145 2011-01-17 14:11 srken
146
147 * Removing helper and container ("Nico Cache") from build system
148 (now in apache 2 common code).
149
150 2011-01-17 14:05 srken
151
152 * Move docroot cache helpers to apache2 common code.
153
154 2011-01-17 14:04 srken
155
156 * Move docroot cache helpers to apache2 common code.
157
158 2010-12-22 14:35 srken
159
160 * configure.ac: Update to a new developemnt version to avoid
161 confusion.
162
163 2010-12-22 13:19 srken
164
165 * .ui-auto.conf: Update to build for sid/squeeze by default.
166
167 2010-10-27 13:05 slinder
168
169 * fixed: yet another quota issue; forgot to divide by blocksize, so
170 the value was to big for unsigned long
171
172 2010-10-26 15:29 slinder
173
174 * changed: making compilable after merging code to TINC 2.01
175 fixed: W2k8 quota issue if there is NO quota
176
177 2010-09-17 14:14 srken
178
179 * [ui-auto-release run by absurd@manwe.use.schlund.de]: Updated
180 from version control.
181
182 2010-09-17 14:14 srken
183
184 * [ui-auto-release run by absurd@manwe.use.schlund.de]: News for
185 1.6.0.
186
187 2010-09-17 14:02 srken
188
189 * configure.ac: Prepare release 1.6.0.
190
191 2010-09-02 09:08 slinder
192
193 * fixed: quota
194
195 2010-09-01 15:19 slinder
196
197 * SL:
198 fixed: Quota/W2k8
199
200 2010-08-05 07:47 srken
201
202 * * src/ui-utilcpp/Sys: getenv(3): Fix: On error, throw (don't
203 return null pointer).
204
205 2010-06-25 13:09 srken
206
207 * * src/ui-utilcpp/Sys: Add support for linux' gettid(), and use
208 that as default for 'fsuid' calls.
209
210 2010-06-25 13:09 srken
211
212 * * src/ui-utilcpp/Sys.cpp: Fix: Should not use ERRNO here.
213
214 2010-06-23 14:59 srken
215
216 * * src/ui-utilcpp/Sys: Fix throws to use ui-utilcpp convention.
217
218 2010-06-23 11:38 srken
219
220 * * src/ui-utilcpp/Sys.cpp: setfsuid: Fix check for error using new
221 getfsuid|gid methods.
222
223 2010-06-23 11:38 srken
224
225 * * src/ui-utilcpp/Sys.cpp: Cosmetic: Adapt exception texts for
226 ui-utilcpp wording.
227
228 2010-06-23 11:38 srken
229
230 * * src/ui-utilcpp/Sys: getfsgid must be implemented the hard way,
231 parsing procfs.
232
233 Just the same as for getfsuid; this adds a generic helper
234 function that can be used for both.
235
236 2010-06-23 11:38 srken
237
238 * * src/ui-utilcpp/Sys: getfsuid must be implemented the hard way,
239 parsing procfs.
240
241 This adds two impls: via libproc (preferred, but cant be used
242 due to memory leaks; enabled via --enable-libproc), and a home
243 made specialised parser (default).
244
245 2010-06-23 11:38 srken
246
247 * * configure.ac: Add --enable-libproc: Optionally use libproc.
248
249 2010-06-16 17:12 srken
250
251 * * src/ui-utilcpp/Sys: getfsuid(): Workaround: Unlike described in
252 the man page, result may be -1 sometimes; use geteuid() then.
253
254 2010-06-14 15:35 srken
255
256 * * src/ui-utilcpp/Sys.cpp: Add support for "pseudo" calls
257 getfsuid() and getfsgid().
258
259 2010-06-14 15:35 srken
260
261 * * src/ui-utilcpp/Sys.hpp: chown: default 2nd arg to -1.
262
263 2010-06-11 09:27 srken
264
265 * * src/ui-utilcpp/GetOpt: Doxygen fix.
266
267 2010-06-11 09:27 srken
268
269 * * src/ui-utilcpp/Sys: Fix three exception error strings.
270
271 2010-06-10 14:19 srken
272
273 * src/ui-utilcpp/GetOpt: Add support for default argument values.
274
275 2010-06-09 13:02 srken
276
277 * src/ui-utilcpp/Sys.cpp: Add support for setfsuid and setfsgid
278 linux calls.
279
280 2010-06-09 13:02 srken
281
282 * * Connection: Add simpleHttpRequest method.
283
284 2010-06-09 13:02 srken
285
286 * * Socket: Add shutdown() method.
287
288 2010-04-20 15:22 srken
289
290 * * .ui-auto.conf: Hmm, skipping squeeze for now.
291
292 2010-04-20 14:59 srken
293
294 * * .ui-auto.conf: Manual support for squeeze (ui-auto template
295 hasn't yet).
296
297 2010-04-20 12:51 srken
298
299 * * .ui-auto.conf: Change Debian target dist to squeeze, with
300 backports to lenny and etch.
301
302 2010-04-19 16:06 srken
303
304 * docs: Fix some doxygen warnings.
305
306 2010-04-19 15:52 srken
307
308 * typo fix in dox docs.
309
310 2010-04-19 15:52 srken
311
312 * Capabilties: Add example program.
313
314 2010-04-19 15:52 srken
315
316 * Capabilities: Compatibility for libcap1 (Debian etch).
317
318 2010-04-19 15:52 srken
319
320 * Capabilities: Add scope capabilities helper class CapScope.
321
322 2010-04-19 15:52 srken
323
324 * Add new header/class "Cap": Abstraction class for posix
325 capabilities.
326
327 2010-04-19 15:52 srken
328
329 * Sys: Add C++ system wrappers for (nearly) all libcap library
330 calls (linux only)
331
332 2010-04-19 15:52 srken
333
334 * Sys: Add wrapper support for prctl (linux only).
335
336 2010-04-19 15:49 srken
337
338 * Fix ignore (used old "sp" prefix).
339
340 2010-03-18 13:36 srken
341
342 * QuotaInfo: Fix class variable order which leads to gcc compile
343 errors with -pedantic.
344
345 2010-03-15 17:00 slinder
346
347 * SL
348 added: Quota for W2k8
349
350 2010-03-12 16:21 srken
351
352 * Sys: Add getgrnam(3) c++ wrapper.
353
354 2009-11-30 14:50 slinder
355
356 * fixed: Win2k8 support
357
358 2009-10-15 12:28 srken
359
360 * Half reverting/fixing change for a a VC++ warning
361
362 In WIN32 code, arg "file" is not used, but in linux code; i.e.,
363 we need it, so it is put back in. To avoid warnings, "file" is
364 now used in the exception string in WIN32 code.
365
366 2009-10-15 12:28 srken
367
368 * Changing prefix "_" for POSIX calls back to non-prefixed.
369
370 Visual C++ compiler warns on POSIX calls (though it supports
371 them), stating "_<POSIXCALL>" would be ISO C++
372 compliant. However, this is just an arbitrary renaming by
373 VisualC++ for implementation-dependent functions, and there are
374 no such names for gcc.
375
376 To simplify porting, we just use the standard POSIX names, and
377 suppress the warnings.
378
379 2009-10-15 09:44 slinder
380
381 * Disabled another warning.
382
383 2009-10-15 08:48 slinder
384
385 * Lots of clean up.
386
387 changed: raised to warning level 4
388 removed: lots of warnings
389 removed: #ifdef WIN32 where I could
390 added: #pragma warning disable where necessary
391
392 2009-10-13 16:27 slinder
393
394 * fixed: make compilable for Win32
395 removed: some compiler warnings
396
397 2009-10-12 15:59 srken
398
399 * Code cleanup: Fix possible warnings (envp not used).
400
401 2009-09-28 16:12 srken
402
403 * RealTime: When normalizing negative values, silently set to 0
404 instead of throwing exception
405
406 We are not imposing an exception here as this might happen with
407 a diff (s1-s0) when the system time has changed between the two
408 stamps (administrator, ntp, etc...). This quite legal action
409 should
410 not lead to an exception (and thusly impose complicated error
411 handling
412 on the caller's side).
413
414 2009-07-29 15:03 srken
415
416 * add NEWS entry for Simon's uid bug fix.
417
418 2009-07-24 11:55 slinder
419
420 * fixed: UID was 1000 which it cannot be (always 0 for Windows)
421
422 2009-06-18 14:55 srken
423
424 * - use the new template for Debian config
425 - build for lenny, bp for etch.
426
427 2009-06-18 11:12 srken
428
429 * Debian config: "Default template" for ui packages.
430
431 2009-06-16 11:48 srken
432
433 * add missing NEWS skel for 1.5.0.
434
435 2009-03-30 12:40 srken
436
437 * fix revapx.
438
439 2009-03-27 17:29 srken
440
441 * build stable snapshots to experimental.
442
443 2009-03-27 14:10 srken
444
445 * Bump versions to new unstable.
446
447 2009-03-27 10:36 srken
448
449 * [ui-auto-release run by absurd@manwe.use.schlund.de]:
450 Automatically updated from vc.
451
452 2009-03-27 10:36 srken
453
454 * [ui-auto-release run by absurd@manwe.use.schlund.de]: News
455 update.
456
457 2009-03-27 10:17 srken
458
459 * update news to new recommended lline length 64.
460
461 2009-03-27 10:14 srken
462
463 * prep stable 1.4.0: Dump version (1.4.0), so main version to 5.
464
465 2009-03-20 14:46 srken
466
467 * orig auto commit settings.
468
469 2009-03-06 15:14 srken
470
471 * cosmetic: use gtpgod(0) here.
472
473 2009-02-18 09:45 slinder
474
475 * fixed: compiler error for W2k8
476
477 2009-02-17 14:18 srken
478
479 * * Update tar format to tar-pax.
480
481 2009-02-17 09:54 srken
482
483 * Update .ui-auto.conf.
484
485 2009-02-06 14:01 slinder
486
487 * fixed: didn't compile for Windows
488
489 2009-02-05 17:49 srken
490
491 * some output cosmetics.
492
493 2009-02-05 17:49 srken
494
495 * Update .ui-auto.conf for autotmatic debian release.
496
497 2009-02-05 15:37 srken
498
499 * typo fix.
500
501 2009-02-05 15:37 srken
502
503 * - Change internal code so taht methods tried depend on fs type.
504
505 2009-02-05 15:36 srken
506
507 * add rpcsvc to library dependency.
508
509 2009-02-05 14:59 srken
510
511 * fix up informational output.
512
513 2009-02-05 14:14 srken
514
515 * select methods depending on fs.
516
517 2009-02-05 12:48 srken
518
519 * fix ols description.
520
521 2009-02-05 12:47 srken
522
523 * yet anotzher note.
524
525 2009-02-05 12:42 srken
526
527 * add warninga about potential not-thread safe file2fs.
528
529 2009-02-05 12:24 srken
530
531 * - New class FQuotaInfo that uses the above tool automatically.
532
533 2009-02-05 10:12 srken
534
535 * qzuota: add preferred method function.
536
537 2009-02-05 09:57 srken
538
539 * Use map, not vector, for methods.
540
541 2009-02-05 09:53 srken
542
543 * also write available methods.
544
545 2009-02-04 18:15 srken
546
547 * seems we only have user quota for rpc.
548
549 2009-02-04 18:03 srken
550
551 * rm debug output.
552
553 2009-02-04 18:02 srken
554
555 * niver ouztput order.
556
557 2009-02-04 17:59 srken
558
559 * fix docygen docs.
560
561 2009-02-04 17:51 srken
562
563 * FIX: any exception should mark the method "not working", not just
564 Sys::.
565
566 2009-02-04 17:49 srken
567
568 * Fix the used block size in constant.
569
570 2009-02-04 16:44 srken
571
572 * - Add new class FS (dev+fstype instead of dev only) to construct
573 QuotaInfo (API extension, old code using QuotaInfo is compatible
574 but need to be recompiled).
575 - Add helper function file2fs to generate an FS (dev+fstype) from
576 any file on that fs.
577
578 2009-02-04 15:04 srken
579
580 * fix: all linked programs need dep in rpcsvc.
581
582 2009-02-04 13:57 srken
583
584 * * QuotaInfo: Add method for quota via rpc (for nfs).
585
586 2009-01-19 15:10 srken
587
588 * [ui-auto-release (1.3.3) run by absurd@manwe.use.schlund.de]:
589 Automatically updated from vc.
590
591 2009-01-19 15:09 srken
592
593 * [ui-auto-release (1.3.3) run by absurd@manwe.use.schlund.de].
594
595 2009-01-19 15:08 srken
596
597 * prep 1.3.3
598
599 2008-12-19 15:12 slinder
600
601 * added: boost 1.35 support
602
603 2008-12-15 17:31 srken
604
605 * - ContainerUnitTests: Uninitialized variable.
606
607 2008-12-15 17:19 srken
608
609 * ignore makefiel.in s.
610
611 2008-12-15 17:18 srken
612
613 * - add new NEWS skeleton
614 - PosixRegexx: Fix Subclass not initialized warning.
615
616 2008-12-15 17:08 srken
617
618 * ignore new version man page.
619
620 2008-12-15 17:07 srken
621
622 * cosmetic: white space fix.
623
624 2008-12-01 16:36 srken
625
626 * [ui-auto-release (1.3.2) run by absurd@manwe.use.schlund.de]:
627 Automatically updated from vc.
628
629 2008-12-01 16:36 srken
630
631 * [ui-auto-release (1.3.2) run by absurd@manwe.use.schlund.de].
632
633 2008-12-01 16:34 srken
634
635 * [ui-auto-release (1.3.2) run by absurd@manwe.use.schlund.de].
636
637 2008-12-01 16:34 srken
638
639 * ignore proteties: Laso ignore tar.gz.sig files.
640
641 2008-12-01 16:31 srken
642
643 * Bump library version for 0.3.2.
644
645 2008-12-01 16:31 srken
646
647 * Fix: Makefile.in's must not be in svn.
648
649 2008-12-01 15:12 srken
650
651 * * Update doxygen config for doxygen 1.5.6 (fixing some warnings).
652
653 2008-11-28 15:00 srken
654
655 * fix ignore prpoerties.
656
657 2008-11-28 14:58 srken
658
659 * * CmdLine: Fix a g++ warning (use std::string::size_type).
660
661 2008-11-21 17:46 slinder
662
663 * added: support for W2k8
664
665 2008-11-20 14:02 slinder
666
667 * fixed: compiler error in WIN32
668
669 2008-10-07 15:05 nsiomos
670
671 * * Added documentation for cache_map and the functions in Helper
672 namespace
673 * Added a unit test for the functions in Helper namespace
674 * modified Helper::to_time_t to return 0 if its given ptime value
675 is special
676
677 2008-09-25 11:40 nsiomos
678
679 * [ui-auto-release (1.3.1) run by user@]: Automatically updated
680 from vc.
681
682 2008-09-25 11:39 nsiomos
683
684 * [ui-auto-release (1.3.1) run by user@].
685
686 2008-09-25 11:38 nsiomos
687
688 * * Fixed atime setting with calls using iterator ranges
689 * Set library version to 4:0:0
690
691 2008-09-25 08:38 nsiomos
692
693 * corrected header guards for ui-nite tests
694
695 2008-09-23 16:07 nsiomos
696
697 * [ui-auto-release (1.3.0) run by user@]: Automatically updated
698 from vc.
699
700 2008-09-23 16:07 nsiomos
701
702 * [ui-auto-release (1.3.0) run by user@].
703
704 2008-09-23 16:06 nsiomos
705
706 * z
707
708 2008-09-23 16:02 nsiomos
709
710 * [ui-auto-release (1.3.0) run by user@]: Automatically updated
711 from vc.
712
713 2008-09-23 16:01 nsiomos
714
715 * [ui-auto-release (1.3.0) run by user@].
716
717 2008-09-23 15:53 nsiomos
718
719 * * Introduced namespaces "Container" and "Helper"
720 * Added hash container Container::cache_map which is particular
721 useful for cache entries
722 * Added several boost-related helper hunctions in
723 helper/Boost.hpp
724
725 2008-07-02 15:35 srken
726
727 * * Bug fix: Http::Connection: Protect constructors against
728 exceptions
729 (potential missing data/fd removal on failing connects).
730
731 2008-06-19 10:54 srken
732
733 * Dump version to unstable.
734
735 2008-06-19 10:38 srken
736
737 * [ui-auto-release (1.2.0) run by absurd@manwe.use.schlund.de]:
738 Automatically updated from vc.
739
740 2008-06-19 10:38 srken
741
742 * [ui-auto-release (1.2.0) run by absurd@manwe.use.schlund.de].
743
744 2008-06-19 10:37 srken
745
746 * release 1.2.
747
748 2008-06-19 10:29 srken
749
750 * prepare 1.2.
751 * Dump library main version to 3 (stable).
752
753 2008-03-27 08:52 vgrecescu
754
755 * removed auto-running of tests on the build machine
756
757 2008-03-18 09:58 vgrecescu
758
759 * update visual studio projects
760
761 2008-02-14 13:37 srken
762
763 * Fix: Use the new-style https:// svn urls.
764
765 2008-01-22 11:13 vgrecescu
766
767 * visual studio 9.0 project files
768
769 2008-01-10 16:44 srken
770
771 * * sp2ui: Fix: Also update macros SP_THROW to UI_THROW.
772
773 2008-01-08 16:36 srken
774
775 * [ui-auto-release (1.1.40) run by absurd@manwe.use.schlund.de]:
776 Automatically updated from vc.
777
778 2008-01-08 16:36 srken
779
780 * [ui-auto-release (1.1.40) run by absurd@manwe.use.schlund.de].
781
782 2008-01-08 16:35 srken
783
784 * prepare release 40.
785
786 2008-01-08 16:35 srken
787
788 * * README/AUTHORS updates:
789 - SP->UI fixes.
790 - Temp. 1.2 todo section: remove hints to very old (fixed) bugs
791 - mv old SPRelease explanation to ui-auto.
792
793 2008-01-08 16:19 srken
794
795 * also fix all warnings w/ new g++ 4.3.
796
797 2008-01-08 15:33 srken
798
799 * * Tested against upcoming g++-3.4 and fixed all compile errors
800 due
801 to missing includes.
802
803 2008-01-08 15:07 srken
804
805 * * boost test: Boost 34 deprecated some parts of API; updated to
806 a variant that works for both, 33 and 34.
807
808 2008-01-07 17:14 srken
809
810 * cosmetics: urls w/o trailing "/".
811
812 2008-01-07 16:50 srken
813
814 * [ui-auto-release (1.1.39) run by absurd@manwe.use.schlund.de]:
815 Automatically updated from vc.
816
817 2008-01-07 16:49 srken
818
819 * [ui-auto-release (1.1.39) run by absurd@manwe.use.schlund.de].
820
821 2008-01-07 16:48 srken
822
823 * prep 1.1.39.
824
825 2008-01-07 14:16 srken
826
827 * fix help/description.
828
829 2008-01-07 13:41 srken
830
831 * cosmetic: fix tempioryr file name.
832
833 2008-01-07 13:06 srken
834
835 * sp2ui must be in extra_dist; fixing distcheck.
836
837 2008-01-04 16:09 srken
838
839 * sp->ui: Completed, add some notes to NEWS.
840
841 2008-01-04 16:06 srken
842
843 * sp->ui: Fix ignore settings.
844
845 2008-01-04 16:04 srken
846
847 * sp->ui: Fix ignore settings.
848
849 2008-01-04 15:57 srken
850
851 * cvs->svn: Remove obsolete cvsignore files.
852
853 2008-01-04 15:55 srken
854
855 * sp->ui: Automatically update ourselves via ui-utilcpp-sp2ui tool.
856
857 2008-01-04 15:54 srken
858
859 * sp->ui: sp2ui tool: fix sp2ui file exception.
860
861 2008-01-04 15:50 srken
862
863 * sp->ui: Add sp2ui tool, analogous to the ui-auto-sp2ui tool.
864
865 2008-01-04 15:21 srken
866
867 * sp->ui: Change file names.
868
869 2008-01-04 15:19 srken
870
871 * sp->ui: Change file names.
872
873 2008-01-04 15:16 srken
874
875 * Update vc location.
876
877 2008-01-04 15:12 srken
878
879 * Update NEWS.
880
881 2008-01-04 15:02 srken
882
883 * win32 iconv change:
884
885 - Add NEWS note: iconvctl() support (sloppy) for non-linux
886 systems (using GNU libiconv).
887 - Fix linux compilation: Don't use iconvctl on linux (it's
888 non-standard and in GNU libiconv only).
889
890 2008-01-04 14:31 srken
891
892 * sp->ui: Automatic changes from ui-auto-sp2ui.
893
894 2008-01-04 14:26 srken
895
896 * sp->ui: Automatic changes from ui-auto-sp2ui.
897
898 2007-12-13 12:38 vgrecescu
899
900 * IConvConverter 'sloppy mode'
901
902 2007-11-26 11:18 ldumitrescu
903
904 * update win32 project files
905
906 2007-11-13 14:46 srken
907
908 * Moving project sp-utilcpp to correct location after cvs import.
909
910 2007-10-29 10:25 ldumitrescu
911
912 * solve rename issue, if the destination file exists.
913
914 2007-10-19 13:01 suerken
915
916 * [sp-auto-release (1.1.38) run by absurd@manwe.use.schlund.de]:
917 Automatically updated from vc.
918
919 2007-10-19 13:01 suerken
920
921 * [sp-auto-release (1.1.38) run by absurd@manwe.use.schlund.de].
922
923 2007-10-19 13:01 suerken
924
925 * prepare 1.1.38.
926
927 2007-10-19 13:00 suerken
928
929 * * Http::HeaderField: Bugfix: Allow empty header field values when
930 parsing line.
931
932 2007-10-19 13:00 suerken
933
934 * update unit tests...
935
936 2007-10-19 12:53 suerken
937
938 * add unit tests for empty header fiels values.
939
940 2007-10-19 12:43 suerken
941
942 * http header tests: change all add(a,b) to add(line), so we also
943 test line parsing.
944
945 2007-08-30 11:43 ldumitrescu
946
947 * changes in VC project files
948
949 2007-08-30 11:41 ldumitrescu
950
951 * again, min max windows bug
952
953 2007-08-30 11:37 ldumitrescu
954
955 * minor changes for windows compatibility
956
957 2007-08-23 16:40 suerken
958
959 * [sp-auto-release (1.1.37) run by absurd@manwe.use.schlund.de]:
960 Automatically updated from vc.
961
962 2007-08-23 16:40 suerken
963
964 * [sp-auto-release (1.1.37) run by absurd@manwe.use.schlund.de].
965
966 2007-08-23 16:39 suerken
967
968 * prep 1.1.37.
969
970 2007-08-23 16:39 suerken
971
972 * * Recoder: rfc2047 encoder: Fix possible segfaults due to typo;
973 add
974 unit test for the segfault case.
975
976 2007-07-31 14:38 ldumitrescu
977
978 * - adding sp-utillcpp unit test project
979 - adding libidna reference to sp-utilcpp
980
981 2007-07-18 11:57 ldumitrescu
982
983 * adding idna lib paths
984
985 2007-07-18 11:55 suerken
986
987 * Fix include order.
988
989 2007-07-18 11:23 ldumitrescu
990
991 * global space removed
992
993 2007-07-11 15:28 suerken
994
995 * [sp-auto-release (1.1.36) run by absurd@manwe.use.schlund.de]:
996 Automatically updated from vc.
997
998 2007-07-11 15:28 suerken
999
1000 * [sp-auto-release (1.1.36) run by absurd@manwe.use.schlund.de].
1001
1002 2007-07-11 15:28 suerken
1003
1004 * prep 1.99.36.
1005
1006 2007-07-11 13:47 suerken
1007
1008 * idnEMail recoder tests.
1009
1010 2007-07-11 13:47 suerken
1011
1012 * * Recoder: Add "idn-email" (any-string w/ emails to string w/
1013 IDN-encoded EMail domains) converter.
1014
1015 2007-07-11 13:44 suerken
1016
1017 * add "idnEMail" converter.
1018
1019 2007-07-09 15:41 suerken
1020
1021 * [sp-auto-release (1.1.35) run by absurd@manwe.use.schlund.de]:
1022 Automatically updated from vc.
1023
1024 2007-07-09 15:41 suerken
1025
1026 * [sp-auto-release (1.1.35) run by absurd@manwe.use.schlund.de].
1027
1028 2007-07-09 15:40 suerken
1029
1030 * prepare 1.99.35.
1031
1032 2007-07-09 15:35 suerken
1033
1034 * * Recoder: Add rfc3490 (International Domain Names, IDN)
1035 converter.
1036
1037 2007-07-09 15:32 suerken
1038
1039 * rcf2046: Use new std::string directly for efficiency.
1040
1041 2007-07-09 15:25 suerken
1042
1043 * rcf2046: Obsolete extra encode method.
1044
1045 2007-07-09 15:19 suerken
1046
1047 * rcf2046:encode: input: Use char/size instead of std::string.
1048
1049 2007-07-09 15:11 suerken
1050
1051 * - todo: we use no flags.
1052 - comsetics.
1053
1054 2007-07-09 15:00 suerken
1055
1056 * fix: strlen is std.
1057
1058 2007-07-09 14:59 suerken
1059
1060 * idn: rm redundancy..
1061
1062 2007-07-09 14:56 suerken
1063
1064 * no need for extra scope
1065
1066 2007-07-09 14:44 suerken
1067
1068 * initial idn implementation.
1069
1070 2007-07-09 14:10 suerken
1071
1072 * skeleton for idn encoding.
1073
1074 2007-07-09 13:51 suerken
1075
1076 * * Add dependency to "libidn" (for IDNA recode facility).
1077
1078 2007-07-09 13:35 suerken
1079
1080 * add check for rfc2047 encoding.
1081
1082 2007-07-09 13:17 suerken
1083
1084 * const fixes.
1085
1086 2007-07-06 15:09 suerken
1087
1088 * activate rfc2047 in Recoder.
1089
1090 2007-07-06 14:57 suerken
1091
1092 * sp-utilcpp-1.1.35 (unstable) (NOT RELEASED):
1093
1094 * Recoder: Add rfc2047 (MIME) converter.
1095
1096 2007-03-28 16:51 suerken
1097
1098 * again, and some more cosmetics.
1099
1100 2007-03-28 16:50 suerken
1101
1102 * cosmetic fix: getId() should not be used in constructor.
1103
1104 2007-03-28 13:11 suerken
1105
1106 * cosmetic fixes.
1107
1108 2007-03-13 11:25 suerken
1109
1110 * Fix: Move readline includes to *.cpp.
1111
1112 2007-03-12 13:53 suerken
1113
1114 * [sp-auto-release (1.1.34) run by absurd@manwe.use.schlund.de]:
1115 Automatically updated from vc.
1116
1117 2007-03-12 13:52 suerken
1118
1119 * [sp-auto-release (1.1.34) run by absurd@manwe.use.schlund.de].
1120
1121 2007-03-12 13:52 suerken
1122
1123 * Prepare release 34.
1124
1125 2007-03-09 16:25 suerken
1126
1127 * * New Sys-Macros: getpwnam.
1128
1129 2007-03-09 13:46 suerken
1130
1131 * rm check for prog perl: This was used together w/ doxygen test,
1132 whcih is now done via SP_DOXYGEN.
1133
1134 2007-03-09 13:45 suerken
1135
1136 * * New Sys-Macros: confstr,getconf (POSIX system configuration
1137 variables).
1138
1139 2007-03-08 13:39 mlaue
1140
1141 * No need to explicitly check for doxygen. SP_DOXYGEN does a better
1142 job.
1143
1144 2007-01-31 16:18 suerken
1145
1146 * new news skeleton.
1147
1148 2007-01-31 16:16 suerken
1149
1150 * Use 320 chars for script reading.
1151
1152 2007-01-31 15:34 suerken
1153
1154 * [sp-auto-release (1.1.33) run by absurd@manwe.use.schlund.de]:
1155 Automatically updated from vc.
1156
1157 2007-01-31 15:34 suerken
1158
1159 * [sp-auto-release (1.1.33) run by absurd@manwe.use.schlund.de].
1160
1161 2007-01-31 15:33 suerken
1162
1163 * prep 1.1.33.
1164
1165 2007-01-31 10:03 daniel
1166
1167 * Remove statvfs from Win32 build (no support for it under Win32).
1168
1169 2007-01-31 09:58 daniel
1170
1171 * Added uint64_t definition.
1172
1173 2007-01-30 18:27 suerken
1174
1175 * * Text.?pp: Switch to use boost's random to produce pseudo random
1176 alpha-numeric keys.
1177
1178 2007-01-25 15:49 suerken
1179
1180 * [win32] Remove "DiskInfo as quota method" hack from QuotaInfo.
1181
1182 2007-01-25 15:45 suerken
1183
1184 * Adjust win32 code from QuotaInfo && move to FsInfo.
1185
1186 2007-01-25 15:34 suerken
1187
1188 * sort of "test" for FsInfo.
1189
1190 2007-01-25 15:34 suerken
1191
1192 * FsInfo initial version.
1193
1194 2007-01-23 14:21 suerken
1195
1196 * update.
1197
1198 2007-01-23 14:20 suerken
1199
1200 * Fix ::statvfs macro: shoould be void.
1201
1202 2007-01-23 14:05 suerken
1203
1204 * Sys "macro support" for ::statvfs.
1205
1206 2006-11-21 11:00 daniel
1207
1208 * no message
1209
1210 2006-11-13 10:21 suerken
1211
1212 * Fix warnings w/ g++ 4.1.
1213
1214 2006-11-08 12:27 suerken
1215
1216 * + * Having the SP_PROG_CXX c++ checker (rules out g++-2.95):
1217 Removed
1218 + all gcc 2.95 compat code.
1219
1220 2006-11-03 13:41 suerken
1221
1222 * [sp-auto-release (1.1.32) run by absurd@manwe.use.schlund.de]:
1223 Automatically updated from vc.
1224
1225 2006-11-03 13:41 suerken
1226
1227 * [sp-auto-release (1.1.32) run by absurd@manwe.use.schlund.de].
1228
1229 2006-11-03 13:39 suerken
1230
1231 * Updates for sp-auto-0.2.
1232
1233 2006-11-03 12:00 suerken
1234
1235 * increase margins for reltimestamp test; more suitable for busy
1236 systenms ;(.
1237
1238 2006-10-26 11:54 daniel
1239
1240 * no message
1241
1242 2006-10-20 12:01 suerken
1243
1244 * Cosmetic: Use xplicit "long int" where only "long" was used.
1245
1246 2006-10-11 12:44 daniel
1247
1248 * Win32 fix for disk quota bigger than 4TB.
1249
1250 2006-10-09 11:17 daniel
1251
1252 * Added free disk check for Win32.
1253
1254 2006-09-06 12:47 suerken
1255
1256 * [sp-auto-release (1.1.31) run by absurd@manwe.use.schlund.de]:
1257 Automatically updated from vc.
1258
1259 2006-09-06 12:47 suerken
1260
1261 * [sp-auto-release (1.1.31) run by absurd@manwe.use.schlund.de].
1262
1263 2006-09-06 12:44 suerken
1264
1265 * Prepare 1.1.31.
1266
1267 2006-09-04 14:04 suerken
1268
1269 * * Text: Some convenience stream operators.
1270
1271 2006-08-18 14:10 suerken
1272
1273 * [sp-auto-release (1.1.30) run by absurd@manwe.use.schlund.de]:
1274 Automatically updated from vc.
1275
1276 2006-08-18 14:10 suerken
1277
1278 * [sp-auto-release (1.1.30) run by absurd@manwe.use.schlund.de].
1279
1280 2006-08-18 14:10 suerken
1281
1282 * prep 1.1.30.
1283
1284 2006-08-18 14:08 suerken
1285
1286 * * Add Http::Connection::getConnId() convenience method.
1287
1288 2006-08-17 08:43 suerken
1289
1290 * [sp-auto-release (1.1.29) run by absurd@manwe.use.schlund.de]:
1291 Automatically updated from vc.
1292
1293 2006-08-17 08:43 suerken
1294
1295 * [sp-auto-release (1.1.29) run by absurd@manwe.use.schlund.de].
1296
1297 2006-08-17 08:43 suerken
1298
1299 * Prep. 1.1.29.
1300
1301 2006-08-16 11:18 suerken
1302
1303 * default for match,
1304
1305 2006-08-16 11:05 suerken
1306
1307 * * Fix: Use "const ref" for join() method.
1308
1309 2006-08-16 11:02 suerken
1310
1311 * * Add "isToken()" for already existing StrVecs (speedup).
1312
1313 2006-08-01 11:08 suerken
1314
1315 * fixing typo in doxygen doc.
1316
1317 2006-07-21 08:50 zachmann
1318
1319 * [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de]:
1320 Automatically updated from vc.
1321
1322 2006-07-21 08:50 zachmann
1323
1324 * [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de].
1325
1326 2006-07-21 08:45 zachmann
1327
1328 * [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de]:
1329 Automatically updated from vc.
1330
1331 2006-07-21 08:44 zachmann
1332
1333 * [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de].
1334
1335 2006-07-21 08:44 zachmann
1336
1337 * o updated version
1338
1339 2006-07-21 08:39 zachmann
1340
1341 * o added a perl like join method for strings
1342
1343 2006-07-13 11:28 daniel
1344
1345 * Added convertPath function to fix Win32 paths in stat function.
1346
1347 2006-07-11 09:57 daniel
1348
1349 * no message
1350
1351 2006-07-04 13:33 suerken
1352
1353 * fix indent.
1354
1355 2006-07-04 11:05 suerken
1356
1357 * [sp-auto-release (1.1.27) run by absurd@manwe.use.schlund.de]:
1358 Automatically updated from vc.
1359
1360 2006-07-04 11:05 suerken
1361
1362 * [sp-auto-release (1.1.27) run by absurd@manwe.use.schlund.de].
1363
1364 2006-07-04 11:04 suerken
1365
1366 * preparing 27.
1367
1368 2006-07-04 10:54 suerken
1369
1370 * * New text tool: str2ascii.
1371 * Http fix: Force pure ASCII values for any Headerfield.
1372
1373 2006-06-26 13:57 hund
1374
1375 * marginal reformatting
1376
1377 2006-06-26 13:56 hund
1378
1379 * return a reference in non const strrpl()
1380
1381 2006-06-15 08:52 daniel
1382
1383 * no message
1384
1385 2006-06-09 11:47 suerken
1386
1387 * human redabale output for realtime stamp test.Add real time stamp
1388 unist test.
1389
1390 2006-06-09 11:39 suerken
1391
1392 * Add real time stamp unist test.
1393
1394 2006-06-08 15:00 suerken
1395
1396 * cosmetics: Use StrVec typedef.
1397
1398 2006-06-07 17:05 suerken
1399
1400 * [sp-auto-release (1.1.26) run by absurd@manwe.use.schlund.de]:
1401 Automatically updated from vc.
1402
1403 2006-06-07 17:05 suerken
1404
1405 * [sp-auto-release (1.1.26) run by absurd@manwe.use.schlund.de].
1406
1407 2006-06-07 17:04 suerken
1408
1409 * prep 1.1.26.
1410
1411 2006-06-07 16:57 suerken
1412
1413 * some more doc updates.
1414
1415 2006-06-07 16:56 suerken
1416
1417 * preparing 1.1.26.
1418
1419 2006-06-07 16:04 suerken
1420
1421 * * Obsolete tool "misc" removed.
1422
1423 2006-06-07 15:44 suerken
1424
1425 * * Bugfix File: Remove a number of now-obsolete exception
1426 specifications.
1427
1428 2006-06-07 14:41 suerken
1429
1430 * update...
1431
1432 2006-06-07 14:41 suerken
1433
1434 * sys update _is_ completed.
1435
1436 2006-06-07 14:23 suerken
1437
1438 * Gor Exception HOWTO now.
1439
1440 2006-06-07 14:22 suerken
1441
1442 * - Exception HOWTO.
1443 - Include Text.hpp in Exception.hpp, not cpp. Remove note.
1444
1445 2006-06-07 12:43 suerken
1446
1447 * - Some fixes for exception classes.
1448 - Started exception howto.
1449
1450 2006-06-07 12:42 suerken
1451
1452 * - Add "mkdir" and "rmdir"
1453 - Some doc updtes.
1454
1455 2006-06-07 12:41 suerken
1456
1457 * exception unit tests updates.
1458
1459 2006-06-01 12:24 daniel
1460
1461 * no message
1462
1463 2006-06-01 12:07 daniel
1464
1465 * no message
1466
1467 2006-06-01 11:48 daniel
1468
1469 * no message
1470
1471 2006-05-31 15:44 suerken
1472
1473 * - Adding initial exception unit tests (one errno test only
1474 currently).
1475
1476 2006-05-31 15:15 suerken
1477
1478 * - SP_THROW_ERRNO, SP_THROW_CODE_ERRNO: Catching global errno
1479 early
1480 in these two macros to avoid the possibility that code in
1481 argument evaluation tampers w/ the value.
1482
1483 2006-05-31 15:10 suerken
1484
1485 * Cosmetics.
1486
1487 2006-05-31 15:08 suerken
1488
1489 * - Set default errNo to 0=Success (was global errno); this means
1490 exceptions not dealing w/ "errnos" always have
1491 getErrNo()==Success
1492 instead of "random", which is more reasonable.
1493
1494 2006-05-31 15:03 suerken
1495
1496 * Remove unused macros: SP_THROW_SP, SP_THROW_ERRNO_E.
1497
1498 2006-05-31 15:00 suerken
1499
1500 * - Sys::Exception: Making it non "Code" exception again
1501 (getErrNo() is
1502 already available in all exceptions were aplicable).
1503
1504 2006-05-31 13:07 suerken
1505
1506 * space fix.
1507
1508 2006-05-31 13:04 suerken
1509
1510 * * Exceptions:
1511 - Remove unsused macro SP_THROW_SP.
1512
1513 2006-05-29 16:47 suerken
1514
1515 * * PIDFile fix: Use chmod on file, defaults to "rw-r--r--".
1516
1517 2006-05-29 16:18 suerken
1518
1519 * space fix.
1520
1521 2006-05-25 11:13 daniel
1522
1523 * no message
1524
1525 2006-05-25 11:12 daniel
1526
1527 * Win32 fixes.
1528
1529 2006-05-19 13:35 suerken
1530
1531 * * "Shortcuts.hpp" fix: Make sure all namespaces are defined.
1532
1533 2006-05-18 16:05 suerken
1534
1535 * [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de]:
1536 Automatically updated from vc.
1537
1538 2006-05-18 16:05 suerken
1539
1540 * [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de].
1541
1542 2006-05-18 16:05 suerken
1543
1544 * Various doc/style fixes.
1545
1546 2006-05-18 15:55 suerken
1547
1548 * [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de]:
1549 Automatically updated from vc.
1550
1551 2006-05-18 15:55 suerken
1552
1553 * [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de].
1554
1555 2006-05-18 15:54 suerken
1556
1557 * prep 25.
1558
1559 2006-05-18 15:48 suerken
1560
1561 * prep 25.
1562
1563 2006-05-18 14:11 suerken
1564
1565 * Count every started block.
1566
1567 2006-05-18 13:35 suerken
1568
1569 * Updaaaaaaaaaaaaaaaaaaaaaaaaaaaaargh.............
1570
1571 2006-05-18 13:33 suerken
1572
1573 * * QuotaInfo: Fix bug due to wrong struct comment in "linux
1574 version 2".
1575 * QuotaInfo: Clean up quota methods "linux version 1" and "linux
1576 version 2".
1577
1578 2006-05-18 13:18 suerken
1579
1580 * Update linux quota, version 2 method.
1581
1582 2006-05-18 13:04 suerken
1583
1584 * Update linux quota, version 1 method.
1585
1586 2006-05-18 12:43 suerken
1587
1588 * type in comment.
1589
1590 2006-05-18 12:41 suerken
1591
1592 * chose more adequate name for quota methods.
1593
1594 2006-05-18 12:37 suerken
1595
1596 * * Remove support for non-standard g++-2.95 code. Mark g++-2.95
1597 compatibilty helper functions deprecated.
1598
1599 2006-05-18 12:22 suerken
1600
1601 * * QuotaInfo: Use "effective uid" as default (was: real uid).
1602
1603 2006-05-18 12:16 suerken
1604
1605 * fix: use Sys-wrapper for getuid.
1606
1607 2006-05-18 10:56 suerken
1608
1609 * Initial fix for linux version 2 quota (but this needs a rewrite).
1610
1611 2006-05-11 14:54 suerken
1612
1613 * Mark getopt deprecated.
1614
1615 2006-05-11 14:54 suerken
1616
1617 * * Add "Shortcuts.hpp" helper include.
1618
1619 2006-05-11 14:41 suerken
1620
1621 * Fis desc.
1622
1623 2006-05-11 14:33 suerken
1624
1625 * Update...
1626
1627 2006-05-11 14:32 suerken
1628
1629 * Add descs for SP::Util:Http namespace.
1630
1631 2006-05-11 14:30 suerken
1632
1633 * Add descs for SP and SP::Util namespaces.
1634
1635 2006-05-11 14:27 suerken
1636
1637 * More nice docs for Sys.
1638
1639 2006-05-11 14:01 suerken
1640
1641 * Update docs.
1642
1643 2006-05-11 13:55 suerken
1644
1645 * Remove some onsiolete/unmaintained doc cruft.
1646
1647 2006-05-11 11:58 suerken
1648
1649 * error string typo fix.
1650
1651 2006-05-11 11:57 suerken
1652
1653 * * Replace Sys:Exception by a CodeException (thus having errno
1654 transported up in exception object).
1655
1656 2006-05-11 08:59 suerken
1657
1658 * Rm <time.h> include for win32 (Fix Nightly Test Warning).
1659 <time.h> should be replaced now by STDC++ C header "ctime".
1660
1661 2006-05-11 08:58 suerken
1662
1663 * - Add STDC++ C header "ctime".
1664 - Move includes gettimeofday et.all "sys/time.h" doen to "system
1665 c"
1666
1667 2006-05-10 12:22 suerken
1668
1669 * [sp-auto-release (1.1.24) run by absurd@manwe.use.schlund.de]:
1670 Automatically updated from vc.
1671
1672 2006-05-10 12:22 suerken
1673
1674 * [sp-auto-release (1.1.24) run by absurd@manwe.use.schlund.de].
1675
1676 2006-05-10 12:21 suerken
1677
1678 * Prep 1.1.24.
1679
1680 2006-05-10 12:13 suerken
1681
1682 * Rm seemingly obsolete bug note.
1683
1684 2006-05-10 12:08 suerken
1685
1686 * cosmetci
1687
1688 2006-05-10 12:06 suerken
1689
1690 * * Fix all doxygen warnings (needs doxygen >= 1.4.6 [in bpo for
1691 debian]).
1692
1693 2006-05-10 11:00 suerken
1694
1695 * Don't warn for undocumented.
1696
1697 2006-05-10 09:00 suerken
1698
1699 * Better way to define sun_path; add note.
1700
1701 2006-05-10 08:55 suerken
1702
1703 * Fix: Use Sys::unlink.
1704
1705 2006-05-10 08:51 suerken
1706
1707 * * Bugfix: UnixSocket: Protect sun_path C-string from being
1708 undefined
1709 when constructed via fd -- as it might be used in getId().
1710
1711 2006-05-10 06:44 suerken
1712
1713 * [sp-auto-release (1.1.23) run by absurd@manwe.use.schlund.de]:
1714 Automatically updated from vc.
1715
1716 2006-05-10 06:44 suerken
1717
1718 * [sp-auto-release (1.1.23) run by absurd@manwe.use.schlund.de].
1719
1720 2006-05-10 06:40 suerken
1721
1722 * Prepare 23.
1723
1724 2006-05-09 13:25 suerken
1725
1726 * * Sys-macros support for resource limits.
1727
1728 2006-05-08 09:41 daniel
1729
1730 * Win32 fixes.
1731
1732 2006-04-07 15:26 suerken
1733
1734 * [sp-auto-release (1.1.22) run by absurd@manwe.use.schlund.de]:
1735 Automatically updated from vc.
1736
1737 2006-04-07 15:26 suerken
1738
1739 * [sp-auto-release (1.1.22) run by absurd@manwe.use.schlund.de].
1740
1741 2006-04-07 15:24 suerken
1742
1743 * prepare 1.1.22.
1744
1745 2006-04-07 15:17 suerken
1746
1747 * * More Sys-macros around uid.
1748
1749 2006-04-07 15:15 suerken
1750
1751 * fix news separator.
1752
1753 2006-04-06 12:11 suerken
1754
1755 * [sp-auto-release (1.1.21) run by absurd@manwe.use.schlund.de]:
1756 Automatically updated from vc.
1757
1758 2006-04-06 12:11 suerken
1759
1760 * [sp-auto-release (1.1.21) run by absurd@manwe.use.schlund.de].
1761
1762 2006-04-06 12:10 suerken
1763
1764 * preparing 1.1.21.
1765
1766 2006-04-06 11:41 suerken
1767
1768 * * Recoder: Also add run(char,size) convenience method.
1769
1770 2006-04-06 11:05 suerken
1771
1772 * Add special recoder test from third source.
1773
1774 2006-04-06 10:37 suerken
1775
1776 * * RealTimeScope: No default stream on destructor (fixes cerr
1777 usage).
1778
1779 2006-04-06 09:47 suerken
1780
1781 * Replace std::cerr error handling by exception. in win32 code.
1782
1783 2006-04-06 09:37 suerken
1784
1785 * Fix type: WriteErr (not Read) on write.
1786
1787 2006-04-05 14:12 suerken
1788
1789 * [sp-auto-release (1.1.20) run by absurd@manwe.use.schlund.de]:
1790 Automatically updated from vc.
1791
1792 2006-04-05 14:12 suerken
1793
1794 * [sp-auto-release (1.1.20) run by absurd@manwe.use.schlund.de].
1795
1796 2006-04-05 14:12 suerken
1797
1798 * Prepare 1.1.20.
1799
1800 2006-04-05 13:39 suerken
1801
1802 * remove obsolete qualificatons.
1803
1804 2006-04-05 13:37 suerken
1805
1806 * Re-integrating context exceptions for EUIDSwap (we need that).
1807
1808 2006-04-05 13:27 suerken
1809
1810 * Bufix: Call ::getpid() ;).
1811
1812 2006-04-05 12:26 suerken
1813
1814 * Cleanup up system includes.
1815
1816 2006-04-05 12:09 suerken
1817
1818 * Update docs for daemonize.
1819
1820 2006-04-05 12:08 suerken
1821
1822 * System includes cleanup: Time.
1823
1824 2006-04-05 12:07 suerken
1825
1826 * System includes cleanup: Thread.
1827
1828 2006-04-05 12:02 suerken
1829
1830 * System includes cleanup: Socket.
1831
1832 2006-04-05 11:53 suerken
1833
1834 * System includes cleanup: Recoder.
1835
1836 2006-04-05 11:49 suerken
1837
1838 * - Obsolete icnovn include.
1839 - Yet more notes on Recoder make/run.
1840
1841 2006-04-05 11:42 suerken
1842
1843 * cosmetic.
1844
1845 2006-04-05 11:41 suerken
1846
1847 * + * "Sys::-Update": Recoder: iconv_open(3),iconv_close(3).
1848
1849 2006-04-05 11:23 suerken
1850
1851 * System includes cleanup: QuotaInfo.
1852
1853 2006-04-05 11:19 suerken
1854
1855 * System includes cleanup: Misc.
1856
1857 2006-04-05 11:02 suerken
1858
1859 * * "Sys::-Update": PIDFile,getpguid(2).
1860
1861 2006-04-05 10:52 suerken
1862
1863 * System includes cleanup: File.
1864
1865 2006-04-05 10:46 suerken
1866
1867 * rm CloseErr_, really.
1868
1869 2006-04-05 10:44 suerken
1870
1871 * * File/Socket: Code cleanup; now-obsolete (by Sys::, we now catch
1872 down to throw matching the abstraction) exception codes removed:
1873 CloseErr_, SocketErr_, HostnameErr_, PathErr_, ReuseaddrErr_,
1874 SetuidErr_, PermErr_.
1875
1876 2006-04-05 10:35 suerken
1877
1878 * Fix: Proper Filedescriptor::Exception catch down for: read,
1879 write.
1880
1881 2006-04-05 10:30 suerken
1882
1883 * Fix in WIN32 code: Destructor should not throw; also uses
1884 obsolete "CloseErr_".
1885
1886 2006-04-05 09:46 suerken
1887
1888 * Fixing/simplifying UnixSocket constructor.
1889
1890 2006-04-05 09:43 suerken
1891
1892 * Fixing/simplifying INetSocket constructor.
1893
1894 2006-04-05 09:36 suerken
1895
1896 * Fix: Using std::exception for Filedescriptor::Exception catch
1897 downs.
1898
1899 2006-04-05 09:28 suerken
1900
1901 * cosmetic fixes.
1902
1903 2006-04-05 09:23 suerken
1904
1905 * cosmetic fix: ifndef -> ifdef.
1906
1907 2006-04-04 15:44 suerken
1908
1909 * * "Sys::-Update": Time/gettimeofday(2),settimeofday(2).
1910
1911 2006-04-04 15:15 suerken
1912
1913 * Fix: Hiding timout/setsockopt win32 specials in special
1914 Sys::setsockopt_to.
1915
1916 2006-04-04 14:57 suerken
1917
1918 * *
1919 "Sys::-Update":Socket/chown(2),fcntl(2),socket(2),getpeername(2),
1920 getsockname(2),setsockopt(2),recv(2),send(2),listen(2),bind(2),
1921 connect(2),select(2),socketpair(2)
1922 * Exception: Rm SP_THROW_CODE_ERRNO_E macro: No longer needed w/
1923 Sys.
1924
1925 2006-04-04 08:49 suerken
1926
1927 * * Recoder: Adding run(char const *) for convenience.
1928
1929 2006-04-03 17:41 suerken
1930
1931 * File/Socket: Renaming stdRead/stdWrite to read/write.
1932
1933 2006-04-03 17:35 suerken
1934
1935 * Fix: we should use std::memset.
1936
1937 2006-04-03 17:31 suerken
1938
1939 * * "Sys::-Update": BSD/POSIXLock/fcntl(2),flock(2).
1940
1941 2006-04-03 12:49 suerken
1942
1943 * * "Sys::-Update": FileDescriptor/open[m](2),read(2),write(2).
1944 - Rm obsolete FileDescriptor::read/write wrappers.
1945
1946 2006-04-03 12:27 suerken
1947
1948 * * "Sys::-Update": File/[fl]stat(2),getenv(2).
1949
1950 2006-04-03 11:13 suerken
1951
1952 * Rm now-obsolete "non-error handling" get() method.
1953
1954 2006-03-31 16:56 suerken
1955
1956 * * "Sys::-Update": IConv|b64Converter:malloc(2),calloc(2),free(2).
1957
1958 2006-03-31 16:37 suerken
1959
1960 * * Recoder(librecode): Fix: Move "task" into the factory level
1961 (i.e. Converter::make()) as this obviously can't be thread-safe.
1962
1963 2006-03-31 15:59 suerken
1964
1965 * * Recoder(librecode): Fix deletion order.
1966
1967 2006-03-31 15:32 suerken
1968
1969 * Sys::-Update: QuotaInfo/quotactl(2).
1970
1971 2006-03-31 15:06 suerken
1972
1973 * update todo.
1974
1975 2006-03-31 15:03 suerken
1976
1977 * Sys-update: Misc:EUIDSwap/seteuid(2)+setegid(2).
1978
1979 2006-03-31 14:48 suerken
1980
1981 * * "Sys::-Update" completion: Misc/realpath(3)
1982
1983 2006-03-31 14:22 suerken
1984
1985 * Fix: realpath() impl -> Misc.cpp, not Text.cpp.
1986
1987 2006-03-31 13:35 suerken
1988
1989 * Doc update.
1990
1991 2006-03-31 13:26 suerken
1992
1993 * * "Sys::-Update" completion: CmdLine/sleep,
1994
1995 2006-03-31 13:12 suerken
1996
1997 * * Recoder: Renaming all factory calls "run" to "make", so nobody
1998 has
1999 excuses any more ;).
2000
2001 2006-03-30 15:16 suerken
2002
2003 * [sp-auto-release (1.1.19) run by absurd@manwe.use.schlund.de]:
2004 Automatically updated from vc.
2005
2006 2006-03-30 15:16 suerken
2007
2008 * [sp-auto-release (1.1.19) run by absurd@manwe.use.schlund.de].
2009
2010 2006-03-30 15:13 suerken
2011
2012 * prepare 1.1.19.
2013
2014 2006-03-30 15:13 suerken
2015
2016 * update todo.
2017
2018 2006-03-30 15:11 suerken
2019
2020 * * REMOVING PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread (also
2021 purges --enable-linux-atomic configure option).
2022
2023 2006-03-30 13:18 suerken
2024
2025 * Add yet another note that returned Conversion's are factoried.
2026
2027 2006-03-30 13:14 suerken
2028
2029 * Add note for recoder cache.
2030
2031 2006-03-30 13:10 suerken
2032
2033 * RecoderCache: Fix key to saveguard against ambiguities.
2034
2035 2006-03-30 13:09 suerken
2036
2037 * Using RecoderCache for recode unit tests.
2038
2039 2006-03-30 09:29 daniel
2040
2041 * no message
2042
2043 2006-03-29 14:12 suerken
2044
2045 * + * New RecoderCache singleton to cache recoders (speed
2046 improvments &&
2047 + workaround against librecode memory leaks).
2048
2049 2006-03-23 17:35 suerken
2050
2051 * [sp-auto-release (1.1.18) run by absurd@manwe.use.schlund.de]:
2052 Automatically updated from vc.
2053
2054 2006-03-23 17:35 suerken
2055
2056 * [sp-auto-release (1.1.18) run by absurd@manwe.use.schlund.de].
2057
2058 2006-03-23 17:32 suerken
2059
2060 * Prep 1.1.18.
2061
2062 2006-03-23 17:31 suerken
2063
2064 * Sys: add chmod,system.
2065
2066 2006-03-23 16:34 suerken
2067
2068 * * PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread. Will
2069 be removed on next release unless there are vetos.
2070
2071 2006-03-23 16:32 suerken
2072
2073 * - Update to void start().
2074 - Rm NaiveCloneThread part.
2075
2076 2006-03-23 16:21 suerken
2077
2078 * News update.
2079
2080 2006-03-23 16:19 suerken
2081
2082 * Lot more updates SYS updates: Thread+File.
2083
2084 2006-03-23 15:43 suerken
2085
2086 * + * Thread: New fd2DevNull helper tool.
2087 + * Thread: Harden "daemonize" to reopen std fd's 0,1,2 to
2088 protect
2089 + against library xyz reading from/writing to fds.
2090 + * Updates to Sys:: Thread,
2091
2092 2006-03-23 15:42 suerken
2093
2094 * Fix: Missing impl for Sys::Exception.
2095
2096 2006-03-23 15:41 suerken
2097
2098 * Add getpid,getppid,waitpid.
2099
2100 2006-03-23 15:01 suerken
2101
2102 * Add umask,chdir,fork,setsid.
2103
2104 2006-03-23 14:40 suerken
2105
2106 * * New Sys.?pp: Long-due "ernno exception" drop-in replacements
2107 for
2108 system(2) and library(3) calls.
2109 * Sys::open,close,dup,dup2.
2110
2111 2006-03-22 14:01 suerken
2112
2113 * [sp-auto-release (1.1.17) run by absurd@manwe.use.schlund.de]:
2114 Automatically updated from vc.
2115
2116 2006-03-22 14:01 suerken
2117
2118 * [sp-auto-release (1.1.17) run by absurd@manwe.use.schlund.de].
2119
2120 2006-03-22 14:01 suerken
2121
2122 * prepare 1.1.17.
2123
2124 2006-03-22 13:52 suerken
2125
2126 * * --disable-linux-atomic -> --enable-linux-atomic: Opt-in, as
2127 this
2128 is non-standard.
2129
2130 2006-03-22 13:31 suerken
2131
2132 * + * Separate File.?pp into File.?pp + Socket.?pp (confusing, too
2133 much code).
2134 + * Text: Remove tool function "sha1sum" as this is not used,
2135 unavaible
2136 + for win32 and code is missing in newer libcommoncpp2 upstreams
2137 + (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352122).
2138
2139 2006-03-22 12:13 suerken
2140
2141 * * File: New helper class "AutoRemoveFile".
2142
2143 2006-03-16 11:13 daniel
2144
2145 * There's no ::socketpair for WIN32 build.
2146
2147 2006-02-28 16:41 suerken
2148
2149 * Seems win32 needs this ifdef ?
2150
2151 2006-02-28 13:36 suerken
2152
2153 * [sp-auto-release (1.1.16) run by absurd@manwe.use.schlund.de]:
2154 Automatically updated from vc.
2155
2156 2006-02-28 13:36 suerken
2157
2158 * [sp-auto-release (1.1.16) run by absurd@manwe.use.schlund.de].
2159
2160 2006-02-28 13:34 suerken
2161
2162 * Prepare 1.1.16.
2163
2164 2006-02-28 13:34 suerken
2165
2166 * * QuotaInfo: Fix compile for newer systems using
2167 _LINUX_QUOTA_VERSION = 2 for 2.6 style quota.
2168
2169 2006-02-27 14:48 suerken
2170
2171 * * File: PIDFile: Check for pid file existence. Default is now to
2172 throw if found (was: overwrite silently).
2173
2174 2006-02-27 14:29 suerken
2175
2176 * * File: New "SocketPair" abstraction (helps writing tests for
2177 protocols).
2178
2179 2006-02-17 13:43 suerken
2180
2181 * fixes for scope time log helper (destructor does not call
2182 virtuals ;).
2183
2184 2006-02-17 09:49 suerken
2185
2186 * [sp-auto-release (1.1.15) run by absurd@manwe.use.schlund.de]:
2187 Automatically updated from vc.
2188
2189 2006-02-17 09:49 suerken
2190
2191 * [sp-auto-release (1.1.15) run by absurd@manwe.use.schlund.de].
2192
2193 2006-02-17 09:48 suerken
2194
2195 * Prepare 1.1.15.
2196
2197 2006-02-16 15:34 suerken
2198
2199 * Time: Add ScopeRealTime class (easy latency logging for scopes).
2200
2201 2006-02-14 13:24 suerken
2202
2203 * Http::URL: addParam() support; generate URL().
2204
2205 2006-02-14 11:25 daniel
2206
2207 * no message
2208
2209 2006-02-09 21:18 suerken
2210
2211 * [sp-auto-release (1.1.14) run by absurd@manwe.use.schlund.de]:
2212 Automatically updated from vc.
2213
2214 2006-02-09 21:18 suerken
2215
2216 * [sp-auto-release (1.1.14) run by absurd@manwe.use.schlund.de].
2217
2218 2006-02-09 21:17 suerken
2219
2220 * Prepare 1.1.14.
2221
2222 2006-02-09 13:25 suerken
2223
2224 * Updating to new Http::URLGet.
2225
2226 2006-02-09 12:53 suerken
2227
2228 * Typos, format.
2229
2230 2006-02-09 12:52 suerken
2231
2232 * * Http: Update Exception for debug support; use SP_THROW for all
2233 exceptions.
2234
2235 2006-02-09 12:45 suerken
2236
2237 * Fix: inet "port" should be unsigned.
2238
2239 2006-02-09 12:41 suerken
2240
2241 * rm cerr debug output.
2242
2243 2006-02-09 12:38 suerken
2244
2245 * Update.
2246
2247 2006-02-09 12:38 suerken
2248
2249 * Fix: "/" even if we only have query.
2250
2251 2006-02-09 12:10 suerken
2252
2253 * Use localhost rather that external url.
2254
2255 2006-02-09 12:05 suerken
2256
2257 * * Http: Add Http.hpp for convenience: Include all http headers.
2258 * Http: New class URL: Parse HTTP URLs (rfc 2616, 3.2.2).
2259 * Http: New class URLGet: Simple HTTP GET impl. based on given
2260 HTTP URL.
2261
2262 2006-02-09 10:36 suerken
2263
2264 * Http: StatusLine: Allow status lines w/o "reason" text.
2265
2266 2006-02-07 14:54 suerken
2267
2268 * * Bugfix strerror(errNum): Actually use errNum arg, not errno.
2269 * Exception: Updated Exception base class internals update; new
2270 errno macros "*_E" to give errNo explicitely.
2271 * Bugfix File: Fixes w/ new *_E macros where appropriate (fixes
2272 wrong errno messages in some circumstances).
2273
2274 2006-02-06 17:23 suerken
2275
2276 * Shoukld be a const ref.
2277
2278 2006-02-06 17:21 suerken
2279
2280 * * File: Exception "errno" error handling: Make sure error strings
2281 don't inlcude calls changing errno.
2282
2283 2006-01-31 18:01 suerken
2284
2285 * [sp-auto-release (1.1.13) run by absurd@manwe.use.schlund.de]:
2286 Automatically updated from vc.
2287
2288 2006-01-31 18:01 suerken
2289
2290 * [sp-auto-release (1.1.13) run by absurd@manwe.use.schlund.de].
2291
2292 2006-01-31 18:00 suerken
2293
2294 * new release-
2295
2296 2006-01-31 13:02 suerken
2297
2298 * Fix: Missing virtual destructor.
2299
2300 2006-01-30 17:34 suerken
2301
2302 * + * File: New tools: getenv(), PIDFile class, guessConfFile.
2303
2304 2006-01-26 12:04 daniel
2305
2306 * no message
2307
2308 2006-01-26 12:03 daniel
2309
2310 * stdlib.h has a #define max, so we need to undefine it first.
2311
2312 2006-01-26 12:02 daniel
2313
2314 * Added PATH_MAX support for Win32 build.
2315
2316 2006-01-25 18:16 suerken
2317
2318 * [sp-auto-release (1.1.12) run by absurd@manwe.use.schlund.de]:
2319 Automatically updated from vc.
2320
2321 2006-01-25 18:15 suerken
2322
2323 * [sp-auto-release (1.1.12) run by absurd@manwe.use.schlund.de].
2324
2325 2006-01-25 18:15 suerken
2326
2327 * Prepare 1.12.
2328
2329 2006-01-25 18:14 suerken
2330
2331 * Fix ignore.
2332
2333 2006-01-25 18:14 suerken
2334
2335 * * Text: strerror(int) now defaults to strerror(int=error).
2336 * Text: Separate "PosixRegex" into own header to avoid include
2337 wars.
2338
2339 2006-01-20 15:32 suerken
2340
2341 * Follow suite: Header/Impl listing.
2342
2343 2006-01-19 10:14 daniel
2344
2345 * We don't have support for SHAxxx in CommonC++.
2346
2347 2006-01-19 10:13 daniel
2348
2349 * Small fix for WIN32 build.
2350
2351 2006-01-18 14:05 suerken
2352
2353 * "Errno" static constatnt should be named "Errno_".
2354
2355 2006-01-17 16:42 suerken
2356
2357 * Fix: Missing include.
2358
2359 2006-01-11 16:46 suerken
2360
2361 * * _More_ socket id fixes:
2362 - Fix possible random c-string w/ getPeerId/UnixSockets.
2363 - Enable ids when not connected/bound.
2364 - Remove obsolete UnixSocket::getPath().
2365
2366 2006-01-11 14:10 suerken
2367
2368 * - Renicing getsockname helper.
2369 - Adding memset/0.
2370
2371 2006-01-11 09:55 suerken
2372
2373 * Fix stupid mistakes.
2374
2375 2006-01-10 15:23 suerken
2376
2377 * New NEWS skelton; Text: New tool strVec2Str.
2378
2379 2006-01-05 17:08 suerken
2380
2381 * [sp-auto-release (1.1.11) run by absurd@manwe.use.schlund.de]:
2382 Automatically updated from vc.
2383
2384 2006-01-05 17:08 suerken
2385
2386 * [sp-auto-release (1.1.11) run by absurd@manwe.use.schlund.de].
2387
2388 2006-01-05 17:08 suerken
2389
2390 * 1.1.11.
2391
2392 2006-01-05 16:21 suerken
2393
2394 * * Sockets::getId() should now finally work reliably. Honest.
2395
2396 2006-01-05 16:20 suerken
2397
2398 * Yet more fixes to finally get getId(9 reliably work. sigh.
2399
2400 2006-01-05 16:19 suerken
2401
2402 * - Fixing stream order for connect() (right-to-left!)
2403 - Rm some obsolete code.
2404
2405 2006-01-05 14:58 suerken
2406
2407 * - Sockets:bind/connect/listen: Now all return *this for
2408 convenience.
2409 - New NEWS skeleton.
2410
2411 2006-01-05 14:39 suerken
2412
2413 * Use all names fq.
2414
2415 2006-01-05 14:35 suerken
2416
2417 * Make this work for both: inet and unix sockets.
2418
2419 2006-01-05 14:32 suerken
2420
2421 * - Fix: Socket::bind() virtual (like connect()).
2422 - UnixSocket::bind/unixBind(): Default for silentUnlink now
2423 "true".
2424
2425 2006-01-05 14:08 hund
2426
2427 * Added missing #include
2428
2429 2006-01-04 15:50 suerken
2430
2431 * Return of Socket::sockaddr2id nonvirtual, to allow
2432 Socket::getId().
2433
2434 2006-01-04 15:27 suerken
2435
2436 * [sp-auto-release (1.1.10) run by absurd@manwe.use.schlund.de]:
2437 Automatically updated from vc.
2438
2439 2006-01-04 15:27 suerken
2440
2441 * [sp-auto-release (1.1.10) run by absurd@manwe.use.schlund.de].
2442
2443 2006-01-04 15:27 suerken
2444
2445 * Preparing 1.1.10.
2446
2447 2006-01-04 15:23 suerken
2448
2449 * Renicing.
2450
2451 2006-01-04 14:49 suerken
2452
2453 * Inet id: Fix forgotten "ntoh" macron on port.
2454
2455 2006-01-04 12:56 suerken
2456
2457 * Fix: Use virtual sockaddr2id rather that switch. Reorder
2458 socklen/sockkadr2id (Socket,UnixSocket/INetSocjet).
2459
2460 2006-01-03 15:43 suerken
2461
2462 * * Sockets: Fixing wrong socklen usage for getId()/getPeerId().
2463
2464 2006-01-03 14:23 suerken
2465
2466 * UnixSocket: Silent unlink support for destructor.
2467
2468 2005-12-30 15:22 suerken
2469
2470 * [sp-auto-release (1.1.9) run by absurd@manwe.use.schlund.de]:
2471 Automatically updated from vc.
2472
2473 2005-12-30 15:22 suerken
2474
2475 * [sp-auto-release (1.1.9) run by absurd@manwe.use.schlund.de].
2476
2477 2005-12-30 15:21 suerken
2478
2479 * Preparing 1.1.9.
2480
2481 2005-12-29 16:54 suerken
2482
2483 * * SetCookie/SetCookies: Const/add(key) -> Const/add(key,
2484 value="") for convenience.
2485
2486 2005-12-29 14:51 suerken
2487
2488 * - SetCookie: Support for defaults on composition (expires, path,
2489 domain).
2490 - Other fixes cnd changes.
2491
2492 2005-12-29 11:47 suerken
2493
2494 * update build system to
2495 use CommonCPP "--stdlibs" (includes ccext2 w/ digests).
2496
2497 2005-12-28 16:40 suerken
2498
2499 * * Text: New tool functions md5sum, sha1sum.
2500
2501 2005-12-27 11:03 suerken
2502
2503 * typo fix.
2504
2505 2005-12-23 16:47 suerken
2506
2507 * Text fix.
2508
2509 2005-12-23 16:45 suerken
2510
2511 * Text fis.
2512
2513 2005-12-23 16:39 suerken
2514
2515 * * Text: Replacing some strange/posiible danferous usage of string
2516 constructor w/ explicit resize().
2517
2518 2005-12-23 16:22 suerken
2519
2520 * Cosmetic fix.
2521
2522 2005-12-23 15:45 suerken
2523
2524 * Style fixes, rm obsolete note.
2525
2526 2005-12-22 18:31 suerken
2527
2528 * prefix support fer SetCookies::getHeader().
2529
2530 2005-12-22 18:07 suerken
2531
2532 * SetCookie prefix support for getLine().
2533
2534 2005-12-22 18:02 suerken
2535
2536 * - new skeletin.
2537 - Cookie: Add prefix support for cookie names
2538
2539 2005-12-22 18:02 suerken
2540
2541 * Cookie: Add prefix support for cookie names: Unit Tests.
2542
2543 2005-12-22 18:00 suerken
2544
2545 * Cookie: Add prefix support for cookie names.
2546
2547 2005-12-20 17:19 suerken
2548
2549 * [sp-auto-release (1.1.8) run by absurd@manwe.use.schlund.de]:
2550 Automatically updated from vc.
2551
2552 2005-12-20 17:18 suerken
2553
2554 * [sp-auto-release (1.1.8) run by absurd@manwe.use.schlund.de].
2555
2556 2005-12-20 17:18 suerken
2557
2558 * Preparing 1.1.8.
2559
2560 2005-12-20 16:09 suerken
2561
2562 * * Add --disable-strerror (to fix known strange segfaults on
2563 static
2564 compilations running under wrong libc).
2565
2566 2005-12-20 15:54 suerken
2567
2568 * * Add Util::strerror (wrapper for ::strerror(3)); replacing all
2569 calls.
2570
2571 2005-12-19 13:15 suerken
2572
2573 * [sp-auto-release (1.1.7) run by absurd@manwe.use.schlund.de]:
2574 Automatically updated from vc.
2575
2576 2005-12-19 13:15 suerken
2577
2578 * [sp-auto-release (1.1.7) run by absurd@manwe.use.schlund.de].
2579
2580 2005-12-19 13:14 suerken
2581
2582 * Preparing 1.1.7.
2583
2584 2005-12-19 13:14 suerken
2585
2586 * Fix: Use big letters.
2587
2588 2005-12-19 12:55 suerken
2589
2590 * Fix SetCookie parsing problem (Heiko).
2591
2592 2005-12-19 12:14 suerken
2593
2594 * urlencode fix: Encode non-ASCII bytes.
2595
2596 2005-12-19 12:07 suerken
2597
2598 * urlencode/decode: Some _even more_ notation fixes befroe upcoming
2599 bug fix.
2600
2601 2005-12-19 12:02 suerken
2602
2603 * urlencode/decode: Some _more_ notation fixes befroe upcoming bug
2604 fix.
2605
2606 2005-12-19 12:00 suerken
2607
2608 * urlencode/decode: Some notation fixes befroe upcoming bug fix.
2609
2610 2005-12-19 11:53 suerken
2611
2612 * Adding test for urldecode/ascii bug.
2613
2614 2005-12-16 10:10 suerken
2615
2616 * Add one SetCookie test (simple parsing fails).
2617
2618 2005-12-15 15:18 suerken
2619
2620 * win32 fix: Adding a note so no one is tempted to change the code
2621 back.
2622
2623 2005-12-15 14:51 daniel
2624
2625 * Fixing Win32 exceptions.
2626
2627 2005-12-15 12:50 suerken
2628
2629 * Adding bug note for url converter(instead of fixing it ;)
2630
2631 2005-12-12 14:54 daniel
2632
2633 * I've defined a gmtime_r function also for Windows build.
2634
2635 2005-12-12 14:08 daniel
2636
2637 * no message
2638
2639 2005-12-07 14:42 suerken
2640
2641 * * Text.hpp: Add StrVec, StrList, StrMap convenience shortcuts.
2642
2643 2005-12-05 09:44 suerken
2644
2645 * Update (pthread).
2646
2647 2005-12-05 09:43 suerken
2648
2649 * Fix: pthread dependency.
2650
2651 2005-12-05 09:36 suerken
2652
2653 * New skeleton, update.
2654
2655 2005-12-05 09:21 suerken
2656
2657 * Fix: Use _LIBADD, not _LIB (ccgnu2 library dependency).
2658
2659 2005-12-02 16:40 suerken
2660
2661 * [sp-auto-release (1.1.6) run by absurd@manwe.use.schlund.de]:
2662 Automatically updated from vc.
2663
2664 2005-12-02 16:39 suerken
2665
2666 * [sp-auto-release (1.1.6) run by absurd@manwe.use.schlund.de].
2667
2668 2005-12-02 16:39 suerken
2669
2670 * Preparing 1.1.6.
2671
2672 2005-12-02 16:37 suerken
2673
2674 * SetCookie/SetCookies:
2675 - rm check().
2676 - chekcs must be done by individual setVALUE methods.
2677 - Fixing setLine to reset all values (this is what one would
2678 expect).
2679 - Many doxygen doc fixes.
2680
2681 2005-12-02 15:08 suerken
2682
2683 * SetCookies:
2684 - parse -> setLine(), public.
2685 - Add setName().
2686 - Fix doxygen docs.
2687
2688 2005-12-02 14:49 suerken
2689
2690 * Cookies:
2691 - parse -> add, public.
2692 - Fix doxygen docs.
2693
2694 2005-12-02 13:58 suerken
2695
2696 * Making gmtime ifdef fix s/w nicer.
2697
2698 2005-12-02 13:54 suerken
2699
2700 * Fix: Use non-thread-save-guaranteed gmtime() for win32 only.
2701
2702 2005-11-29 11:18 daniel
2703
2704 * gmtime_r call was replaced with gmtim call because there's no
2705 gmtime_r on Windows build.
2706
2707 2005-11-28 15:46 suerken
2708
2709 * Fixing CXX2 check (workaround).
2710
2711 2005-11-28 15:45 suerken
2712
2713 * Fixing xfs include.
2714
2715 2005-11-18 16:18 suerken
2716
2717 * "%T" not ISO C++ (-pedantic warning).
2718
2719 2005-11-18 12:20 hund
2720
2721 * * fixed some bugs in cookie code
2722 * overloaded SetCookie::setExpire() to also take a unix timestamp
2723 * set up a couple more unittests
2724
2725 2005-11-07 12:38 suerken
2726
2727 * Cosmetics.
2728
2729 2005-11-07 09:36 suerken
2730
2731 * Fixing some extra ";".
2732
2733 2005-11-04 18:04 suerken
2734
2735 * Fixing forgotten Cookie header (install).
2736
2737 2005-11-04 16:24 suerken
2738
2739 * Updates...
2740
2741 2005-11-04 15:03 suerken
2742
2743 * Moving code from .hpp -> .cpp: Fixing includes.
2744
2745 2005-11-04 14:53 suerken
2746
2747 * Moving code from .hpp -> .cpp: Cookies.
2748
2749 2005-11-04 14:35 suerken
2750
2751 * Moving code from .hpp -> .cpp: Connection.
2752
2753 2005-11-04 14:16 suerken
2754
2755 * Moving code from .hpp -> .cpp: Header.
2756
2757 2005-11-04 13:49 suerken
2758
2759 * Moving code from .hpp -> .cpp: StatusLine.
2760
2761 2005-11-04 13:43 suerken
2762
2763 * Moving code from .hpp -> .cpp: Exceptions, RequestLine.
2764
2765 2005-10-26 17:24 suerken
2766
2767 * - All Connection::write* now return *this.
2768 - Header::getDebug() -> Header::get() (composition) real method.
2769 - Header::get(): Using Connection/strstream, removing redundant
2770 code from Header.
2771
2772 2005-10-26 17:01 suerken
2773
2774 * UPDATE for:
2775
2776 - Shortcut utilities to write StatusLine/RequestLine.
2777 - Some osmetics/dox updates.
2778
2779 2005-10-26 16:51 suerken
2780
2781 * - Shortcut utilities to write StatusLine/RequestLine.
2782 - Some osmetics/dox updates.
2783
2784 2005-10-26 16:37 suerken
2785
2786 * UPDATES for:
2787
2788 - Reordering and doc updates for utility functions.
2789 - Just use "write" (inst. of writeHeader, writeHeaderField etc..)
2790 as method name wherever possible (let arguments determine
2791 semantics).
2792 - rm now obsolete readBlock(char *, size).
2793
2794 2005-10-26 16:37 suerken
2795
2796 * - Reordering and doc updates for utility functions.
2797 - Just use "write" (inst. of writeHeader, writeHeaderField etc..)
2798 as method name wherever possible (let arguments determine
2799 semantics).
2800 - rm now obsolete readBlock(char *, size).
2801
2802 2005-10-26 16:15 suerken
2803
2804 * - verifyVersion method to cpp.
2805 - RequestLine: Make str2Method public.
2806 - StatusLine: setCode(string) helper.
2807
2808 2005-10-26 16:12 suerken
2809
2810 * Fixing http helper lib addition.
2811
2812 2005-10-26 14:08 suerken
2813
2814 * - Removing redundancies in http version verification
2815 (request/status line).
2816 - Some doc updates.
2817
2818 2005-10-26 13:52 suerken
2819
2820 * Some doc updates.
2821
2822 2005-10-26 13:49 suerken
2823
2824 * Some cosmetics and doc updatzes.
2825
2826 2005-10-26 13:26 suerken
2827
2828 * Abbr. getLine() to more appr. get().
2829
2830 2005-10-26 13:22 suerken
2831
2832 * UPDATES FOR:
2833
2834 - Properly(*) impl. request line.
2835
2836 (*): Code is int, setCOMPONENT methods w/ validation, default
2837 constr/assignment, no redundancies.
2838
2839 - Many doxygen fixes.
2840 - number of various fixes and updates.
2841
2842 2005-10-26 13:21 suerken
2843
2844 * - Properly(*) impl. request line.
2845
2846 (*): Code is int, setCOMPONENT methods w/ validation, default
2847 constr/assignment, no redundancies.
2848
2849 - Many doxygen fixes.
2850 - number of various fixes and updates.
2851
2852 2005-10-26 12:03 suerken
2853
2854 * - fis status code 100->200 in http test.
2855 - Updates for: Properly(*) impl. status line.
2856
2857 (*): Code is int, setCOMPONENT methods w/ validation, default
2858 constr/assignment, no redundancies.
2859
2860 2005-10-26 12:00 suerken
2861
2862 * Properly(*) impl. status line.
2863
2864 (*): Code is int, setCOMPONENT methods w/ validation, default
2865 constr/assignment, no redundancies.
2866
2867 2005-10-24 16:14 suerken
2868
2869 * - Connection: Adding const s()
2870 - Exceptions: Dropping IO errors -- we only throw HTTP errors.
2871 Fixing redundant HTTP text in all error texts.
2872
2873 2005-10-24 15:08 suerken
2874
2875 * using flush method driectly.
2876
2877 2005-10-24 14:31 suerken
2878
2879 * Some cosmetics.
2880
2881 2005-10-24 14:22 suerken
2882
2883 * - Using s() to get stream.
2884 - Removing non-http stream fucntions.
2885 - Removing all (logocally wrong) const on read/write methods.
2886
2887 2005-10-24 14:20 suerken
2888
2889 * Update for new Connection code.
2890
2891 2005-10-17 11:28 daniel
2892
2893 * no message
2894
2895 2005-10-17 11:28 daniel
2896
2897 * Small WIN32 fixes.
2898
2899 2005-10-12 15:18 suerken
2900
2901 * Show connection peer address
2902
2903 2005-10-12 15:15 suerken
2904
2905 * Add getId() and getPeerId() from Socket.
2906
2907 2005-10-12 15:15 suerken
2908
2909 * Update (socket ids).
2910
2911 2005-10-12 15:15 suerken
2912
2913 * Exception:getErrno(): Doping that to take errno parameter
2914 (defaults to global errno).
2915
2916 2005-10-12 15:13 suerken
2917
2918 * * File: Socket implementation: Fix up getId() to generically use
2919 getsockname(); Add getPeerId() using getpeername().
2920
2921 2005-10-11 09:42 suerken
2922
2923 * - Add Exception (code exception, HttpErr, IOErr) for namespace.
2924 - "Normalize" all error descriptions.
2925
2926 2005-10-10 13:47 suerken
2927
2928 * NEWS update.
2929
2930 2005-10-10 13:47 suerken
2931
2932 * Updates for new cookie code.
2933
2934 2005-10-10 13:45 suerken
2935
2936 * Many changes. Initial check in of (hopefully) all features + some
2937 testing.
2938
2939 2005-10-10 13:45 suerken
2940
2941 * Using "EmptyString" helper; thus get() may deliver const ref.
2942
2943 2005-10-10 13:43 suerken
2944
2945 * Adding "empty string" static helper.
2946
2947 2005-10-06 15:19 suerken
2948
2949 * - Switch I|OHeader* to one unified Header*
2950 Rationale: Code should use "const" wisely later; saves overhead.
2951
2952 2005-10-06 15:18 suerken
2953
2954 * - Switch I|OHeader* to one unified Header*
2955 Rationale: Code should use "const" wisely later; saves overhead.
2956 - Fix: Remove erratic empty c'tor for RequestLine.
2957
2958 2005-10-06 15:16 suerken
2959
2960 * todo/reminder update.
2961
2962 2005-10-06 15:16 suerken
2963
2964 * Add some reminders for http.
2965
2966 2005-10-06 13:50 suerken
2967
2968 * - Initial file skeleton for cookie support.
2969 - Initial "request cookie" support (parser only).
2970 - Initial "request cookie" unit tests.
2971
2972 2005-10-06 13:29 suerken
2973
2974 * Disable verbatim headers.
2975
2976 2005-10-06 09:20 suerken
2977
2978 * Proper doxygen des for getDebug.
2979
2980 2005-10-05 12:40 suerken
2981
2982 * Some cosmetic enhances for debug code.
2983
2984 2005-10-05 11:42 suerken
2985
2986 * Fix: getDebug() -> IHeader.
2987
2988 2005-10-04 17:29 suerken
2989
2990 * - Add "debug" support for headers.
2991 - get<template>: Add "doThrow"-support.
2992
2993 2005-09-30 16:08 suerken
2994
2995 * Support prefixes for header[field] writes.
2996
2997 2005-09-30 16:02 suerken
2998
2999 * Change some std::string returns to const ref for efficiency.
3000
3001 2005-09-30 15:57 suerken
3002
3003 * - Add initial unit test for Http::Header.
3004
3005 2005-09-30 15:56 suerken
3006
3007 * - IHeaderField: Add c'tor from name,value (w/o parsing).
3008 - IHeader: Add "add()" for name,value (see above)
3009 - Header: Allow at() from vector.
3010 - IHeader: getMulti && getPrefix helper methods.
3011
3012 2005-09-30 15:53 suerken
3013
3014 * C'tor from iostream: Rather use reference (indicate existance,
3015 skip nil-assser check).
3016
3017 2005-09-26 16:01 suerken
3018
3019 * Fix: Dont free externally provided stream, make constr. for ext
3020 stream public.
3021
3022 2005-09-23 12:17 suerken
3023
3024 * - readBody -> readBlock.
3025
3026 2005-09-23 12:17 suerken
3027
3028 * - readBody -> readBlock.
3029 - readBlock: More versatile for (block read) error handling.
3030
3031 2005-09-23 11:23 suerken
3032
3033 * Update to new Http:: code.
3034
3035 2005-09-23 11:23 suerken
3036
3037 * Adding "writeHeaderField" tool function.
3038
3039 2005-09-22 12:28 suerken
3040
3041 * - Using nocer scheme to configure sockets.
3042
3043 2005-09-22 12:27 suerken
3044
3045 * - Socket::setUnblock: Use noblock bool for convenience.
3046
3047 2005-09-22 12:17 suerken
3048
3049 * - Lots of fixes.
3050 - Removing INet/Unix/FDConnection classes, using dedicated
3051 consructors instead.
3052
3053 2005-09-22 12:14 suerken
3054
3055 * - Lots of fixes.
3056 - Adding some convenience methods to header class.
3057
3058 2005-09-22 12:13 suerken
3059
3060 * - Fix: Socket::connect should be a virtual.
3061 - Socket::unblock -> setUnblock.
3062 - Socket::set*: Make them all return Socket &.
3063
3064 2005-09-20 11:16 suerken
3065
3066 * Don't use version info for convenience lib.
3067
3068 2005-09-20 09:01 suerken
3069
3070 * sp-auto move is done, removing todo.
3071
3072 2005-09-13 08:59 daniel
3073
3074 * New files added to the project.
3075
3076 2005-09-13 08:50 daniel
3077
3078 * We don't have UnixSocket on Windows so there's also no connection
3079 classes based on UnixSocket.
3080
3081 2005-09-05 15:23 suerken
3082
3083 * Adding "ato" templates for header.get, status.getCode.
3084
3085 2005-09-05 15:06 suerken
3086
3087 * Do not add a trailing "\0" in readBody.
3088
3089 2005-09-05 15:05 suerken
3090
3091 * Fixing IHeaderfield parsing: Skip leading spaces for value.
3092
3093 2005-09-05 15:04 suerken
3094
3095 * Adding simple client/server test for "Http" based on a unix
3096 socket pair.
3097
3098 2005-09-05 13:25 suerken
3099
3100 * - Initial INet/Unix/FD connections.
3101 - Some obsolete code removed.
3102
3103 2005-09-02 17:10 suerken
3104
3105 * Fixing unsign/signed warning.
3106
3107 2005-09-02 17:09 suerken
3108
3109 * - Fixing StatusLine::getReason().
3110 - Fixing StatusLine parsing.
3111 - Fixing StatusLine line debuging.
3112
3113 2005-09-02 15:48 suerken
3114
3115 * Milestone checkin:
3116 - StatusLine, RequestLine, [IO]Header[field], Connection
3117 prototype classes ready.
3118 - HTTP GET connection already works fine.
3119
3120 2005-09-02 15:20 suerken
3121
3122 * Adding unit tests for strtok and strtoks.
3123
3124 2005-09-02 15:19 suerken
3125
3126 * strtoks: Changing default for delims to "spaces": " \n\r\t".
3127
3128 2005-09-02 14:18 suerken
3129
3130 * * Text: New tool function "strtoks" (like strtok, but allowing
3131 multiple one-char delims).
3132
3133 2005-09-02 14:03 suerken
3134
3135 * Adding getlineCRLF tool function.
3136
3137 2005-09-01 14:38 suerken
3138
3139 * strtok: adding psotfix/prefix _after_ comparing if empty.
3140
3141 2005-09-01 13:57 suerken
3142
3143 * Makefile.am mega renicing.
3144
3145 2005-09-01 13:40 suerken
3146
3147 * Proper .cvsignore.
3148
3149 2005-09-01 13:39 suerken
3150
3151 * Reverting automake part of
3152
3153 * New schema for bigger library subsets (i.e., those w/ an own
3154 namespace an more than one source files): Use subir
3155 "lowercase(namespace)" and the now possible "dir/file.?pp" syntax
3156 in Makefile.am (see src/sp-utilcpp/Makefile.am, http).
3157
3158 Now using proper SUBDIR. This makes more trouble than it saves
3159 work ;(.
3160
3161 2005-09-01 13:11 suerken
3162
3163 * * Partly RFC 2616 (HTTP 1.1) implementation [01-Sep-2005: Initial
3164 checkin, not ready yet]
3165 * New schema for bigger library subsets (i.e., those w/ an own
3166 namespace an more than one source files): Use subir
3167 "lowercase(namespace)" and the now possible "dir/file.?pp" syntax
3168 in Makefile.am (see src/sp-utilcpp/Makefile.am, http).
3169
3170 2005-07-07 14:15 suerken
3171
3172 * Fixing variable wording.
3173
3174 2005-07-06 15:32 suerken
3175
3176 * - const fixes.
3177 - add percentBug test.
3178
3179 2005-07-06 14:08 suerken
3180
3181 * Recoder: ad test for url<->data.
3182
3183 2005-06-17 15:19 suerken
3184
3185 * [sp-auto-release (1.1.5) run by absurd@manwe.use.schlund.de]:
3186 Automatically updated from vc.
3187
3188 2005-06-17 15:19 suerken
3189
3190 * [sp-auto-release (1.1.5) run by absurd@manwe.use.schlund.de].
3191
3192 2005-06-17 15:17 suerken
3193
3194 * preparing 1.1.5.
3195
3196 2005-06-17 15:17 suerken
3197
3198 * update to sp-auto >= 0.1.1.
3199
3200 2005-06-17 15:17 suerken
3201
3202 * Ignoring tarballs.
3203
3204 2005-06-17 13:46 suerken
3205
3206 * Using only swab.h file to avoid CVS being copied into dist.
3207
3208 2005-06-17 12:07 suerken
3209
3210 * [sp-auto-release (1.1.4) run by absurd@manwe.use.schlund.de]:
3211 Automatically updated from vc.
3212
3213 2005-06-17 12:07 suerken
3214
3215 * [sp-auto-release (1.1.4) run by absurd@manwe.use.schlund.de].
3216
3217 2005-06-17 12:01 suerken
3218
3219 * Not notifying "abteilung".
3220
3221 2005-06-17 12:00 suerken
3222
3223 * - Prepare versions for release 1.1.4.
3224 - Move arg below SO_VESION.
3225
3226 2005-06-17 09:29 suerken
3227
3228 * - Cosmetic: Synchronizing changelog format.
3229 - Removing "sp-utilc++" news.
3230
3231 2005-06-16 12:42 suerken
3232
3233 * +.sp-auto.conf in dist.
3234
3235 2005-06-15 14:28 suerken
3236
3237 * Using mark "UNRELEASED"
3238
3239 2005-06-15 14:14 suerken
3240
3241 * Moving "1.2 todo list" to README, where it belongs.
3242
3243 2005-06-15 14:07 suerken
3244
3245 * fix download url.
3246
3247 2005-06-15 14:05 suerken
3248
3249 * Small update for sp-auto.
3250
3251 2005-06-15 14:04 suerken
3252
3253 * Fixing wrong snapshot version being checked in (from sp-auto
3254 testing).
3255
3256 2005-06-15 10:32 suerken
3257
3258 * Update to sp-auto.
3259
3260 2005-04-21 16:20 suerken
3261
3262 * Removing commented debug code in (obsolete) b64 converter ;).
3263
3264 2005-04-21 16:18 suerken
3265
3266 * Doxygen docs update, most warnings fixed.
3267
3268 2005-04-14 15:24 suerken
3269
3270 * include cleanups and other cosmetics.
3271
3272 2005-04-14 15:16 suerken
3273
3274 * - Improving recoder test tool: Input charset guessing, sloppy
3275 support.
3276 - Implementing proper converter exception handling; exception
3277 error
3278 texts much improved; errno support where applicable.
3279 - Move more control up to Converter father class.
3280 - Fixing all todos/bugs notes.
3281
3282 2005-04-14 13:56 suerken
3283
3284 * cosmetics.
3285
3286 2005-04-14 13:56 suerken
3287
3288 * Adding b64 conversion checks.
3289
3290 2005-04-14 13:38 suerken
3291
3292 * - Recoder updates:
3293 - librecode converter: Using task level to allow sloppy
3294 converting.
3295 - Add general "sloppy" tag for Recoder objects (active for
3296 converters
3297 that support it - i.e., currently librecode only).
3298 - Adding first unit test to test some recoders.
3299 - Improving recoder test tool: Input charset guessing, sloppy
3300 support.
3301
3302 2005-04-07 16:34 suerken
3303
3304 * Fix one-line scope.
3305
3306 2005-04-06 13:50 suerken
3307
3308 * Boost unittests skeleton.
3309
3310 2005-04-06 13:48 suerken
3311
3312 * Fix chronical order of NEWS.
3313
3314 2005-04-05 14:23 suerken
3315
3316 * cleanup: Remove obsolete/old "excpetion" example code, some
3317 Makefile.am cleanups.
3318
3319 2005-04-05 14:15 suerken
3320
3321 * - Clean up usage: data [outEnc [inEnc]], with default for outEnc
3322 (UTF-8), and charset magic guessing for inEnc when not given.
3323 - Remove some obsolete code.
3324
3325 2005-04-04 13:48 suerken
3326
3327 * allow empty data.
3328
3329 2005-04-04 10:18 hund
3330
3331 * Added memleak in recoder
3332
3333 2005-04-01 12:03 daniel
3334
3335 * Removing memory leak.
3336
3337 2005-03-14 12:35 daniel
3338
3339 * no message
3340
3341 2005-03-14 12:13 daniel
3342
3343 * Fix WIN32 uid include.
3344
3345 2005-03-09 14:42 suerken
3346
3347 * Uopdate news.
3348
3349 2005-03-09 14:30 suerken
3350
3351 * Moving
3352
3353 MutexLock, EUIDSwap, RealPath
3354
3355 to Misc.?pp to avoid circular include dependencies (seems
3356 unfixable with g++-3.4).
3357
3358 2005-03-08 08:21 daniel
3359
3360 * Add CharsetMagic to the project.
3361
3362 2005-02-28 09:38 suerken
3363
3364 * Fix: Adding ascmagic.c to dist.
3365
3366 2005-02-25 10:35 suerken
3367
3368 * - Returning empty string if none found, not "data".
3369
3370 2005-02-25 10:27 suerken
3371
3372 * New 1.1.4 skeleton, add ing charset magi news.
3373
3374 2005-02-25 10:25 suerken
3375
3376 * Adding code to guess charset, and output that.
3377
3378 2005-02-25 10:24 suerken
3379
3380 * - Fixing some typos.
3381 - Moving latin test after utf 16 tests (see comments).
3382
3383 2005-02-25 09:57 suerken
3384
3385 * Removing obsolete files "Recode" from CVS.
3386
3387 2005-02-25 09:46 suerken
3388
3389 * Adding "charset magic" guess functions.
3390
3391 2005-02-24 17:42 suerken
3392
3393 * Fix: should catch std::exception.
3394
3395 2005-02-23 13:36 suerken
3396
3397 * Fix ansicheader nightly test warning: time.h -> ctime.
3398
3399 2005-02-22 13:24 suerken
3400
3401 * Fix snapshot version: Not using "-" in version string.
3402
3403 2005-02-15 15:36 suerken
3404
3405 * Syncing compile todo.
3406
3407 2005-02-15 15:19 suerken
3408
3409 * Update to ChangeLog for 1.1.3.
3410
3411 2005-02-15 15:19 suerken
3412
3413 * Updates to NEWS and README for 1.1.3.
3414
3415 2005-02-15 15:17 suerken
3416
3417 * Preparig for unstable release 1.1.3.
3418
3419 2005-02-14 16:22 suerken
3420
3421 * Document the "release hook".
3422
3423 2005-02-14 16:19 suerken
3424
3425 * Adding support for a "release hook".
3426
3427 2005-02-14 16:17 suerken
3428
3429 * Update to ChangeLog for 1.1.2.
3430
3431 2005-02-14 16:16 suerken
3432
3433 * Update to ChangeLog for 1.1.2.
3434
3435 2005-02-14 16:12 suerken
3436
3437 * Update to ChangeLog for 1.1.2.
3438
3439 2005-02-07 12:41 suerken
3440
3441 * - Re-adding Thread.hpp include (forward decl. is not enough as
3442 MutexLock is used in template).
3443
3444 ( still need to find out why g++-3.4 pukes on it)
3445
3446 2005-02-07 11:37 daniel
3447
3448 * Remove 4290 compiler warning from WIN32 build.
3449
3450 2005-02-07 11:23 daniel
3451
3452 * Just to build on Windows.
3453
3454 2005-02-06 02:59 suerken
3455
3456 * Many fine improvements.
3457
3458 2005-02-06 02:30 suerken
3459
3460 * - Some code improvements using recommended streambuf style.
3461 - This also fixes wrong casting of char -> int (EOF).
3462
3463 2005-02-05 16:55 suerken
3464
3465 * STDC++ (g++-3.4) fixes: Explicit template calls.
3466 STDC++ (g++-3.4) fixes: Remove some extra ";".
3467
3468 2005-02-05 16:55 suerken
3469
3470 * STDC++ (g++-3.4) fixes: Remove some extra ";".
3471
3472 2005-02-05 16:54 suerken
3473
3474 * Removing obsolete trouble-maker include.
3475
3476 2005-02-05 16:53 suerken
3477
3478 * STDC++ (g++-3.4) fixes: Explicit template calls.
3479
3480 2005-02-05 16:18 suerken
3481
3482 * Missing include cerrno.
3483
3484 2005-02-05 16:17 suerken
3485
3486 * Fixes for g++-3.4.
3487
3488 2005-02-05 15:57 suerken
3489
3490 * - Fixing all stdRead/Write methods for proper error handling via
3491 exceptions (with errno support).
3492 - Fixing recv/send to use the correct declaration with ssize_t
3493 instead of "int".
3494 - Fixing one doc typo.
3495
3496 2005-02-05 13:16 suerken
3497
3498 * - Not using "<<" for cout output for binary save.
3499
3500 2005-02-05 12:45 suerken
3501
3502 * - Fixing program's error result.
3503
3504 2005-02-05 12:31 suerken
3505
3506 * - Re-enabling timeouts.
3507 - Not wrrintg response to stderr.
3508
3509 2005-02-04 13:05 daniel
3510
3511 * Replace ::stat call with PathFileExists WinAPI.
3512
3513 2005-02-02 18:33 suerken
3514
3515 * Cosmetic: On doc type and one one-line scope fixed.
3516
3517 2005-02-02 15:46 suerken
3518
3519 * Disabling timeout, better error text.
3520
3521 2005-02-02 15:14 suerken
3522
3523 * Adding wget-like test tool.
3524
3525 2005-02-01 15:07 suerken
3526
3527 * - Fix: Remove obsolete debug line.
3528
3529 2005-02-01 14:46 suerken
3530
3531 * - Fix: Using proper STRERR autotools test to select what
3532 strerror_r to use (instead of testing for __GNU).
3533 - Removing bug with long description. Add hint to look at the
3534 description of the autotool macro instead.
3535
3536 2005-02-01 14:30 suerken
3537
3538 * Fixing static constant: Should be upper case.
3539
3540 2005-02-01 14:27 suerken
3541
3542 * Adding sp-common to dist and installation.
3543
3544 2005-02-01 14:20 suerken
3545
3546 * Adding STRERROR_R functional test.
3547
3548 2005-02-01 14:19 suerken
3549
3550 * - Updating doxygen rule to use path found with prog test.
3551
3552 2005-02-01 14:18 suerken
3553
3554 * - Removing obsolete test for SED.
3555 - Updating prog tests to use SP_PATH_PROG.
3556
3557 2005-02-01 14:17 suerken
3558
3559 * - Add sp-common: Place for common-purpose SP utility macros.
3560 - Add utility macros: SP_MSG_MISSING and SP_PATH_PROG.
3561
3562 2005-01-31 13:52 suerken
3563
3564 * Fixing CStrArray::CStrArray typo (gcc obvioulsy doesn't bother).
3565 Removing obsolete WIN32 ifdef.
3566
3567 2005-01-31 12:02 daniel
3568
3569 * Make it build on Windows.
3570
3571 2005-01-25 12:20 suerken
3572
3573 * New little helpers: freeAnySeqContainer, strdup, CStrArray.
3574
3575 2005-01-25 12:20 suerken
3576
3577 * Adding strdup and CStrArray helpers.
3578
3579 2005-01-25 12:18 suerken
3580
3581 * Adding freeAnySeqContainer tool, updating doxygen docs.
3582
3583 2005-01-20 09:20 daniel
3584
3585 * no message
3586
3587 2005-01-19 13:24 suerken
3588
3589 * Setting recursive on.
3590
3591 2005-01-19 13:23 suerken
3592
3593 * Some docs updates.
3594
3595 2005-01-19 13:10 suerken
3596
3597 * - QuotaInfo: Support for kernel 2.6 interface (version 1 and
3598 version 2).
3599
3600 2005-01-19 13:09 suerken
3601
3602 * - Using HAVE_ defines for std and xfs (instead of __linux__).
3603 - Add "linux 26" quota support.
3604 - Streamlining use of const.
3605
3606 2005-01-19 12:48 suerken
3607
3608 * - Adding check for sys/quota.h.
3609 - All quota header checks now define in config.h.
3610 - Warnings (not errors) if unavailable.
3611
3612 2005-01-19 10:49 suerken
3613
3614 * Using vector (not map) to preserve try order.
3615
3616 2005-01-05 10:45 daniel
3617
3618 * Fix the url encoding bug (Eg. %5c and %5C had different results).
3619
3620 2005-01-03 13:37 suerken
3621
3622 * More notes for strerror_r.
3623
3624 2004-12-23 09:29 hund
3625
3626 * Renamed mtime function to sound sexier
3627
3628 2004-12-21 16:46 hund
3629
3630 * Added global function to get a file modification time
3631
3632 2004-12-09 12:45 daniel
3633
3634 * We don't use the recode library on Windows.
3635
3636 2004-12-08 17:09 suerken
3637
3638 * Renicing URLConverter::run().
3639
3640 2004-12-08 17:01 suerken
3641
3642 * remove obsolete todo.
3643
3644 2004-12-08 17:01 suerken
3645
3646 * Add deprecated note for XConversion.
3647
3648 2004-12-08 16:52 suerken
3649
3650 * Moving "URL" class (verbatim, with some cosmetic changes) into
3651 URLConverter.
3652
3653 2004-12-08 15:58 suerken
3654
3655 * Note for: "Clean-up of Makefile.am. Drop diversification of
3656 libraries."
3657
3658 2004-12-08 14:08 suerken
3659
3660 * - Fixes for: "Drop diversification of libraries."
3661
3662 2004-12-08 14:07 suerken
3663
3664 * - Removing obsolete Recode.?pp
3665 - Clean-up of Makefile.am. Drop diversification of libraries.
3666
3667 2004-12-08 13:11 suerken
3668
3669 * Note: no longer diversified.
3670
3671 2004-12-08 13:08 suerken
3672
3673 * Simplify: doc/autoadd -> doc, adapt doxygen paths.
3674
3675 2004-12-08 12:44 hund
3676
3677 * Added way to specify width and fill character for tos
3678
3679 2004-12-07 23:19 suerken
3680
3681 * old tarball check: maxdepth 1.
3682
3683 2004-12-07 19:52 suerken
3684
3685 * update for recoder.
3686
3687 2004-12-07 17:49 suerken
3688
3689 * Using a temporary.
3690
3691 2004-12-07 17:43 suerken
3692
3693 * Adding example for the top level "Recoder" class.
3694
3695 2004-12-07 17:23 suerken
3696
3697 * Improving isToken text utility, using isToken in
3698 Recoder::isEnc().
3699
3700 2004-12-07 17:16 suerken
3701
3702 * Add isToken text utility.
3703
3704 2004-12-07 17:00 suerken
3705
3706 * Fixing the existing throws, i.e., let the at least throw
3707 SP::Util::Exception.
3708
3709 2004-12-07 16:47 suerken
3710
3711 * Complete rewrite of Recoder, new Converter+Conversions setup.
3712
3713 2004-12-07 15:59 suerken
3714
3715 * - Adding "asciiCAPS" tool function.
3716
3717 2004-12-07 15:58 suerken
3718
3719 * - Adding "asciiCAPS" tool function.
3720 - Rebameing "Conversion" class to "XConversion" (will soon be
3721 obsolete, clasehs with the new Conversion class).
3722
3723 2004-12-06 18:00 suerken
3724
3725 * - Re-instating the original Recode class (WIN32: If you can't
3726 compile this, discard it as a whole).
3727
3728 2004-12-01 13:04 daniel
3729
3730 * Costin: Fixed again the Exception issue. :-)
3731
3732 2004-12-01 12:30 daniel
3733
3734 * Costin: Fixed Exception compiling error (Socket is not derived
3735 from FileDescriptor in the Windows version).
3736
3737 2004-11-29 16:54 suerken
3738
3739 * Fixing some non-const-ref strings, some cosmetics.
3740
3741 2004-11-29 16:50 suerken
3742
3743 * Style:
3744
3745 - Not using "_varName" for class variables (this should be
3746 reserved for implementation).
3747 - Not using "_" in parameter names.
3748
3749 2004-11-29 15:14 daniel
3750
3751 * Costin: Fixed the Exception issues.
3752
3753 2004-11-29 14:42 suerken
3754
3755 * Using "b" even for unix. man fopen:
3756
3757 The mode string can also include the letter ``b'' either as a
3758 last character or as a character between the characters in any of
3759 the two-character strings described above. This is
3760 strictly for compatibility with ANSI X3.159-1989 (``ANSI C'') and
3761 has no effect; the ``b'' is ignored on all POSIX conforming
3762 systems, including Linux. (Other systems may treat text
3763 files and binary files differently, and adding the ``b'' may be a
3764 good idea if you do I/O to a binary file and expect that your
3765 program may be ported to non-Unix environments.)
3766
3767 2004-11-29 12:57 hund
3768
3769 * Added separate call to iconv(3) for linux since prototypes differ
3770
3771 2004-11-29 10:56 daniel
3772
3773 * Costin: Fixed Windows compilation.
3774
3775 2004-11-29 10:27 daniel
3776
3777 * Costin: Fixed tabs.
3778
3779 2004-11-26 15:15 hund
3780
3781 * Made it compile under linux
3782
3783 2004-11-26 13:54 daniel
3784
3785 * Costin:
3786 * added the new Recoder class
3787 * files are opened as binary
3788
3789 2004-11-24 17:56 suerken
3790
3791 * Adding some remarks and a bug sign for win32.
3792
3793 2004-11-24 17:45 suerken
3794
3795 * Fix: Using dedicated "Type" enum (not int) in constructor.
3796
3797 2004-11-24 17:43 suerken
3798
3799 * - Filling "noQuota" method with reasonable values.
3800 - Making noQuota method non-win32 specific (other archs might
3801 want to use it too).
3802
3803 2004-11-24 17:27 suerken
3804
3805 * Some cosmetic changes.
3806
3807 2004-11-24 17:19 suerken
3808
3809 * Some cosmetic changes.
3810
3811 2004-11-24 12:01 daniel
3812
3813 * Added Windows compatibility
3814
3815 2004-11-24 11:16 daniel
3816
3817 * Added Windows compatibility
3818
3819 2004-11-23 12:32 suerken
3820
3821 * Fixing all buggy win32 "config.h" includes.
3822
3823 2004-11-22 12:12 suerken
3824
3825 * etos, eato: doxygen docu fixes.
3826
3827 2004-11-22 12:01 suerken
3828
3829 * - Adding etos.
3830 - Some cosmetics, cleanups.
3831
3832 2004-11-18 12:33 suerken
3833
3834 * - eato: Converter with error handling.
3835
3836 2004-11-10 10:24 suerken
3837
3838 * add fileCopy helper, NEWS updated.
3839
3840 2004-11-08 14:47 suerken
3841
3842 * - Adding CFileStream class abstarction
3843
3844 2004-11-05 17:41 suerken
3845
3846 * Adding support for snapshot prefix.
3847
3848 2004-11-05 17:25 suerken
3849
3850 * * Fixed snapshot version:
3851 - Using version number 4. This does not lose information,
3852 avoids problems with "snapshot version not an int" type
3853 problems.
3854
3855 * Adding "settings" action.
3856 * Internal cleanups.
3857
3858 2004-11-05 17:23 suerken
3859
3860 * Replacing complicated, not working "seds" by simple, working
3861 "cuts".
3862
3863 2004-10-21 09:09 suerken
3864
3865 * Fixing missu'ing ".
3866
3867 2004-10-20 14:51 daniel
3868
3869 * no message
3870
3871 2004-10-19 12:03 claus
3872
3873 * allowing libtool >= allowing 1.5.10
3874
3875 2004-09-29 13:58 suerken
3876
3877 * REVERSING TERRORISTIC ATTACK ON CVS HEAD.
3878
3879 2004-09-29 10:50 daniel
3880
3881 * Added support for MSVC compilers
3882
3883 2004-09-28 12:23 suerken
3884
3885 * Cosmetic: Use "ntc", not "not" to avoid confusion.
3886
3887 2004-09-23 16:30 suerken
3888
3889 * Giving severity levels as human readable
3890 3-char-prefix. Making LOG_ADD postfix.
3891
3892 2004-09-21 15:02 hund
3893
3894 * merged changes needed for wintinc into trunk
3895
3896 2004-09-15 15:27 suerken
3897
3898 * Not throwing for recode error (temporary hack).
3899
3900 2004-09-10 10:16 suerken
3901
3902 * - move SPRelease readme into sprelease usage.
3903 - todo/news/chek updates.
3904
3905 2004-09-07 13:27 suerken
3906
3907 * Add b64 problem.
3908
3909 2004-09-06 12:15 suerken
3910
3911 * Support 4 more debug levels.
3912
3913 2004-09-01 13:23 suerken
3914
3915 * - Text, File: Much better exception error descriptions.
3916 - tos,ato: Add support for arbitrary stream modifier (converting
3917 from/to std::hex etc). Removing explicit str2str converter.
3918
3919 2004-09-01 09:30 suerken
3920
3921 * - Fix: Using correct exception code for reset error.
3922 - Better error texts.
3923
3924 2004-08-31 15:20 suerken
3925
3926 * Use scope {} to protect against them filthly one-line scopes.
3927
3928 2004-08-31 10:38 suerken
3929
3930 * - SMLog[Mono]: Support for logging to clog.
3931
3932 2004-08-31 09:45 suerken
3933
3934 * superflous newline ;).
3935
3936 2004-08-30 12:33 suerken
3937
3938 * Update to ChangeLog for 1.1.2.
3939
3940 2004-08-30 12:33 suerken
3941
3942 * Updates to NEWS and README for 1.1.2.
3943
3944 2004-08-30 12:31 suerken
3945
3946 * 1.1.2
3947
3948 2004-08-30 10:19 suerken
3949
3950 * - Back: unsigned char -> char
3951 - Add get(cstring) method.
3952 - Improve error strings.
3953
3954 2004-08-30 09:07 suerken
3955
3956 * Fix: No ":" at end of exception text.
3957
3958 2004-08-30 09:00 suerken
3959
3960 * Forcing unsigned char.
3961
3962 2004-08-26 14:17 suerken
3963
3964 * Fix: get(): char should be const.
3965
3966 2004-08-26 11:24 suerken
3967
3968 * Ignoring tarballs && sigs.
3969
3970 2004-08-26 11:09 suerken
3971
3972 * Proper fix for the chmod *-version hack.
3973
3974 2004-08-25 17:40 suerken
3975
3976 * Removing unused static var.
3977
3978 2004-08-23 17:34 suerken
3979
3980 * - Fix: auto_base: adding set() method.
3981
3982 2004-08-23 14:58 suerken
3983
3984 * - Fix: auto_abstract -> auto_base, removing abstract destructor.
3985 - Adding some upgrade notes to README.
3986
3987 2004-08-20 10:48 suerken
3988
3989 * - Merging .strap_run/.strap_dev into ".strap_dev
3990 [runonly|ggcenv]".
3991 - Use ./configure to produce that file. It can now be sourced
3992 properly (no need for backticks).
3993 - Default bevaviour now is to taint autotool-supported variables
3994 only. This should always work if your project using this library
3995 alos uses autotools.
3996 - "gccenv" sets the gcc environment variables as before.
3997 autotools
3998 test may fail unexpectedly.
3999
4000 2004-08-19 11:31 suerken
4001
4002 * Some cleanups.
4003
4004 2004-08-19 11:18 suerken
4005
4006 * Fix: Adding UPGRADE to extra dist.
4007
4008 2004-08-19 10:42 suerken
4009
4010 * - Protecting all enum values from preprocessor by naming
4011 convention
4012 ("CatDog_" like for constant class variables).
4013
4014 2004-08-18 16:24 suerken
4015
4016 * Adding missing Thread.hpp include.
4017
4018 2004-08-18 16:24 suerken
4019
4020 * Fixing auto_ptr_set: Must not be const.
4021
4022 2004-08-18 16:23 suerken
4023
4024 * Adding upgrade hints.
4025
4026 2004-08-18 12:40 suerken
4027
4028 * - Makefile.am : Make automake 1.9 mandatory.
4029 - configure.ac: Generating tar-ustar. Fail for file length >255.
4030 - .strap_auto : Warn if libtool < 1.5.7 (.lib/.lib link bug).
4031
4032 2004-08-18 10:29 suerken
4033
4034 * Dox updates.
4035
4036 2004-08-18 10:27 suerken
4037
4038 * Adding runonly option.
4039
4040 2004-08-18 09:43 suerken
4041
4042 * Merging strap_run/strap_dev into strap_dev. Newer libtool's can
4043 cope with that.
4044
4045 2004-08-18 09:33 suerken
4046
4047 * Moving SPRelease, SPUpload to sr/tools.
4048
4049 2004-08-18 09:17 suerken
4050
4051 * Moving SPRelease, SPUpload to sr/tools.
4052
4053 2004-08-13 13:59 suerken
4054
4055 * todo update.
4056
4057 2004-08-13 13:31 suerken
4058
4059 * Update to ChangeLog for 1.1.1.
4060
4061 2004-08-13 13:31 suerken
4062
4063 * Updates to NEWS and README for 1.1.1.
4064
4065 2004-08-13 13:31 suerken
4066
4067 * Updated example for SPRelease.
4068
4069 2004-08-13 13:26 suerken
4070
4071 * Removing obsolete package check function.
4072
4073 2004-08-11 12:34 suerken
4074
4075 * Adopt "snapshot" versioning so that it works with new library
4076 version check setup.
4077
4078 2004-08-10 15:15 suerken
4079
4080 * make PACKAGE-version script executable even in source tree.
4081
4082 2004-08-10 14:48 suerken
4083
4084 * Remove obsolet "NUMBER" parts.
4085
4086 2004-08-10 14:44 suerken
4087
4088 * More generalized success output.
4089
4090 2004-08-10 14:24 suerken
4091
4092 * Summary of chages for library versions &6 checking.
4093
4094 2004-08-10 14:02 suerken
4095
4096 * S+P !
4097
4098 2004-08-10 12:06 suerken
4099
4100 * Moving examples -> tools.
4101
4102 2004-08-10 12:06 suerken
4103
4104 * - Replacing old package info, using package info macro.
4105 - Version update.
4106
4107 2004-08-10 12:05 suerken
4108
4109 * - Adding package info macro.
4110 - Removing obsolete comments.
4111
4112 2004-08-10 11:30 suerken
4113
4114 * Moving sp-utilcpp-version script to tools.
4115
4116 2004-08-10 11:28 suerken
4117
4118 * Moving examples -> tools.
4119
4120 2004-08-10 11:22 suerken
4121
4122 * Moving sp-utilcpp-version script to tools.
4123
4124 2004-08-10 11:17 suerken
4125
4126 * Moving examples -> tools.
4127
4128 2004-08-10 11:09 suerken
4129
4130 * Moving examples -> tools.
4131
4132 2004-08-10 11:04 suerken
4133
4134 * - Ignore version.lo
4135
4136 2004-08-10 11:04 suerken
4137
4138 * - Remove wrong comment.
4139 - Remove trailing ;.
4140
4141 2004-08-10 10:59 suerken
4142
4143 * - Skipping number generation values.
4144 - Add separate minor/major/patch functions.
4145 - Add defines for compile time evaluation.
4146 - Add check macro against header/library incompat.
4147
4148 2004-08-10 10:57 suerken
4149
4150 * - Skipping number generation.
4151 - Many minor/bigger syntax changes.
4152 - Removing obsolete sp-utilcpp.m4.
4153
4154 2004-08-09 17:24 suerken
4155
4156 * Adding version script.
4157
4158 2004-08-09 17:24 suerken
4159
4160 * - Recalculating MAJ.MIN.PAT from libtools IF:REV:AGE for library
4161 version.
4162 - Substituting new MAJ.MIN.PAT for lihb version, too
4163 - Updating check script to use MAJ.MIN.PAT scheme, not libtool's
4164
4165 2004-08-09 15:52 suerken
4166
4167 * Remove debug lines.
4168
4169 2004-08-09 15:51 suerken
4170
4171 * - Fixing SO_VERSIOn number to 2:0:0.
4172 - Adding SED test so that SP_LIB_MAKE_VERSIONS works.
4173
4174 2004-08-09 15:33 suerken
4175
4176 * Protecting header.
4177
4178 2004-08-09 15:09 suerken
4179
4180 * Correct quoting.
4181
4182 2004-08-09 14:30 suerken
4183
4184 * Adding initial setup of Dominik's version checking (some problems
4185 still).
4186
4187 2004-08-09 14:20 suerken
4188
4189 * Addin proper include of m4/ for aclocal. This will work with
4190 autoreconf now.
4191
4192 2004-08-09 14:19 suerken
4193
4194 * Dont use --include m4 here. This is for libraries.
4195
4196 2004-08-06 16:50 suerken
4197
4198 * Some cosmetic updates.
4199
4200 2004-08-06 16:38 suerken
4201
4202 * Updating to autoreconf.
4203
4204 2004-08-06 16:19 suerken
4205
4206 * - Adding m4 directory for aclocal macros, adding include in
4207 .strap_auto.
4208 - Putting "m4" into build run (SUBDIR).
4209 - Adding skeleton sp-utilcpp macro, adding to dist and install.
4210
4211 2004-07-28 08:58 suerken
4212
4213 * Standardize header protection.
4214
4215 2004-07-23 12:00 suerken
4216
4217 * Style fixes.
4218
4219 2004-07-22 12:12 suerken
4220
4221 * Style fixes.
4222
4223 2004-07-22 09:35 suerken
4224
4225 * Update ignores.
4226
4227 2004-07-22 09:34 suerken
4228
4229 * Trailing whitespace.
4230
4231 2004-07-12 15:06 suerken
4232
4233 * strrpl: using std::string::size_type ans npos.
4234
4235 2004-07-12 15:02 suerken
4236
4237 * Adding mass str replace utility functions "strrpl".
4238
4239 2004-07-09 10:27 suerken
4240
4241 * # OST_CCXX2_VERSION extends CXXFLAGS. This is pathetic, and does
4242 not work, for example,
4243 # with 'make CXXFLAGS="-g -O0 -pedantic -Wall'.
4244
4245 => Substitute our own variables, adding them to appropriate
4246 places.
4247
4248 2004-07-09 09:34 suerken
4249
4250 * stat types again. We need this in the header.
4251
4252 2004-07-08 10:50 suerken
4253
4254 * - sys/stat.h include missing (with gcc-3.3 dev env. this wouldnt
4255 harm).
4256
4257 2004-07-07 09:42 suerken
4258
4259 * autotool fixes:
4260 - Adding xfs header check.
4261
4262 2004-07-07 09:14 suerken
4263
4264 * autotool fixes:
4265 - Adding check for doxygen.
4266
4267 2004-07-07 09:10 suerken
4268
4269 * autotool fixes:
4270 - need automake 1.8, autoconf 2.58
4271 - Add check for librecode.
4272 - remove not working so version decode funtion.
4273 - Some cosmetics.
4274
4275 2004-06-11 14:05 suerken
4276
4277 * DESTDIR support for local installs.
4278
4279 2004-06-01 09:31 suerken
4280
4281 * Add note about writing the exception faq.
4282
4283 2004-05-24 13:44 suerken
4284
4285 * Update to ChangeLog for 1.1.0.
4286
4287 2004-05-24 13:44 suerken
4288
4289 * Updates to NEWS and README for 1.1.0.
4290
4291 2004-05-24 13:40 suerken
4292
4293 * Adding tinc-devel-announce.
4294
4295 2004-05-24 13:35 suerken
4296
4297 * Some cosmetic changes.
4298
4299 2004-05-24 13:23 suerken
4300
4301 * Dont include Thread.hpp. That is what the forward is for.
4302
4303 2004-05-24 12:32 suerken
4304
4305 * Doxygen fixes.
4306
4307 2004-05-24 12:26 suerken
4308
4309 * Some include fixes for gcc-2.95.
4310
4311 2004-05-24 12:16 suerken
4312
4313 * Adding "Misc" program.
4314
4315 2004-05-24 12:16 suerken
4316
4317 * Adding Text.hpp include for Thread.hpp, and forward declaration
4318 in Text.hpp against inclusion wars.
4319
4320 2004-05-24 12:01 suerken
4321
4322 * Keep up with changes.
4323
4324 2004-05-24 11:46 suerken
4325
4326 * - General throw macro support in Exceptions.hpp.
4327 - Updating all throws to use this macros.
4328
4329 => All throws now support file name and line no debugging.
4330
4331 2004-05-24 11:45 suerken
4332
4333 * Fix: SP_UTIL, not SP_DVDB.
4334
4335 2004-05-24 10:59 suerken
4336
4337 * Exceptions: Add LINE and FILE debug information.
4338
4339 2004-05-24 10:40 suerken
4340
4341 * Yet another version for Exception handling (method chaini'ng does
4342 not work).
4343
4344 2004-05-21 11:33 suerken
4345
4346 * Keep up with changes.
4347
4348 2004-05-21 11:18 suerken
4349
4350 * Adding auto_abstract,cvev,free.
4351
4352 2004-05-21 10:42 suerken
4353
4354 * Keep up with changes.
4355
4356 2004-05-21 10:41 suerken
4357
4358 * Some doc fixes.
4359
4360 2004-05-21 10:03 suerken
4361
4362 * strtok update to support string delimiters.
4363
4364 2004-05-19 17:41 suerken
4365
4366 * Some doxygen updates.
4367
4368 2004-05-19 17:29 suerken
4369
4370 * Some doxygen updates.
4371
4372 2004-05-19 17:15 suerken
4373
4374 * Some doxygen updates.
4375
4376 2004-05-19 17:07 suerken
4377
4378 * Some doxygen updates.
4379
4380 2004-05-19 16:48 suerken
4381
4382 * Complete doxygen docs.
4383
4384 2004-05-19 16:40 suerken
4385
4386 * Complete doxygen docs.
4387
4388 2004-05-19 16:26 suerken
4389
4390 * Some const correctness updates.
4391
4392 2004-05-19 16:20 suerken
4393
4394 * Poromoting some "long" to the more appropriate "long int".
4395
4396 2004-05-19 16:18 suerken
4397
4398 * Removing all one-line scopes.
4399
4400 2004-05-19 16:15 suerken
4401
4402 * Unifying class variable names.
4403
4404 2004-05-19 15:49 suerken
4405
4406 * Complete doxygen docs.
4407
4408 2004-05-19 15:30 suerken
4409
4410 * spaces->tabs.
4411
4412 2004-05-19 15:28 suerken
4413
4414 * Removing all one-line scopes.
4415
4416 2004-05-19 15:25 suerken
4417
4418 * Some const correctness updates.
4419
4420 2004-05-19 15:21 suerken
4421
4422 * Unifying class variable names.
4423
4424 2004-05-19 15:19 suerken
4425
4426 * Some doxygen updates.
4427
4428 2004-05-19 15:14 suerken
4429
4430 * Some const correctness updates.
4431
4432 2004-05-19 15:11 suerken
4433
4434 * Unifying class variable names.
4435
4436 2004-05-19 15:07 suerken
4437
4438 * Complete doxygen docs.
4439
4440 2004-05-19 14:39 suerken
4441
4442 * Documeneting many new updates.
4443
4444 2004-05-19 14:38 suerken
4445
4446 * Adding recode example utility.
4447
4448 2004-05-19 14:38 suerken
4449
4450 * Using new methid chaining.
4451
4452 2004-05-19 14:38 suerken
4453
4454 * Updates for new naming scheme ;(.
4455
4456 2004-05-19 14:37 suerken
4457
4458 * libcmdline must depend on libcppsys.
4459
4460 2004-05-19 14:36 suerken
4461
4462 * librecode must depend on libxppsys.
4463
4464 2004-05-19 14:35 suerken
4465
4466 * Adding utility class template auto_free.
4467
4468 2004-05-19 14:34 suerken
4469
4470 * - Updates to support any conversion in a efficient fashion, not
4471 just
4472 string->string via copy.
4473 - Imporved error/exception handling.
4474
4475 2004-05-19 14:29 suerken
4476
4477 * Adding missing cassert include.
4478
4479 2004-05-19 14:25 suerken
4480
4481 * - Fixing SP::Util::CodeException: Must be derived from
4482 SP::Util::Exception.
4483 - Removing SP::CodeException.
4484
4485 2004-05-19 11:22 suerken
4486
4487 * Complete doxygen docs.
4488
4489 2004-05-19 11:16 suerken
4490
4491 * Some doxygen updates.
4492
4493 2004-05-19 11:09 suerken
4494
4495 * Some cosmetic changes.
4496
4497 2004-05-19 10:59 suerken
4498
4499 * Removing all one-line scopes.
4500
4501 2004-05-19 10:56 suerken
4502
4503 * Some const correctness updates.
4504
4505 2004-05-19 09:46 suerken
4506
4507 * Unifying class variable names.
4508
4509 2004-05-19 09:39 suerken
4510
4511 * Complete doxygen docs.
4512
4513 2004-05-18 15:34 suerken
4514
4515 * Poromoting some "long" to the more appropriate "long int".
4516
4517 2004-05-18 15:33 suerken
4518
4519 * Removing all one-line scopes.
4520
4521 2004-05-18 15:31 suerken
4522
4523 * Some const correctness updates.
4524
4525 2004-05-18 15:23 suerken
4526
4527 * Unifying class variable names.
4528
4529 2004-05-18 15:14 suerken
4530
4531 * Complete doxygen docs.
4532
4533 2004-05-18 14:57 suerken
4534
4535 * Removing all one-line scopes.
4536
4537 2004-05-18 14:53 suerken
4538
4539 * Some const correctness updates.
4540
4541 2004-05-18 14:48 suerken
4542
4543 * Unifying class variable names.
4544
4545 2004-05-18 14:36 suerken
4546
4547 * All doxygen warnings eliminated.
4548
4549 2004-05-18 14:28 suerken
4550
4551 * - warnings.
4552 - update dibersion docs.
4553
4554 2004-05-18 14:04 suerken
4555
4556 * %
4557
4558 2004-05-18 14:04 suerken
4559
4560 * - Update to doxygen 1.3.7
4561 - Some fixes and updates.
4562
4563 2004-05-18 12:57 suerken
4564
4565 * - Doxygen updates.
4566 - const streamline.
4567
4568 2004-05-18 12:18 suerken
4569
4570 * More Updates: New Exception scheme.
4571
4572 2004-05-18 12:11 suerken
4573
4574 * - Adding master exception classes for namesapce SP::Util.
4575 - Updaing QuotaInfo.
4576
4577 => Everything in SP::Util will now throw SP::Util::Exception
4578 only.
4579
4580 2004-05-18 11:55 suerken
4581
4582 * Updates to make it compile with new exception scheme (bit not
4583 sematically checked everywhere).
4584
4585 2004-05-18 11:40 suerken
4586
4587 * Update: New Exception scheme.
4588
4589 2004-05-18 11:30 suerken
4590
4591 * Adding own exception class.
4592
4593 2004-05-18 11:30 suerken
4594
4595 * Remove wrong docs.
4596
4597 2004-05-18 11:24 suerken
4598
4599 * - Last uncompliant throw fixed.
4600 - mutex pointer can be const.
4601
4602 2004-05-18 11:15 suerken
4603
4604 * Update to CodeException.
4605
4606 2004-05-18 11:02 suerken
4607
4608 * Update to CodeException.
4609
4610 2004-05-18 09:27 suerken
4611
4612 * Removing obsolete qualification.
4613
4614 2004-05-18 09:25 suerken
4615
4616 * - Even Better Exception
4617 - adding CodeException template
4618 - Support for setting error text from errno via method chaining.
4619 - Update of File to new exception theme.
4620
4621 2004-05-17 16:25 suerken
4622
4623 * Update to CodeException.
4624
4625 2004-05-17 16:25 suerken
4626
4627 * Invention fo CodeException.
4628
4629 2004-05-17 15:53 suerken
4630
4631 * Update to new exception scheme.
4632
4633 2004-05-17 15:01 suerken
4634
4635 * catch up with new updates.
4636
4637 2004-05-17 14:08 suerken
4638
4639 * Imported strtok, istrem2Vector, RealPath.
4640
4641 2004-05-17 13:28 suerken
4642
4643 * Including xfs to dist.
4644
4645 2004-05-17 13:23 suerken
4646
4647 * more docs of updates.
4648
4649 2004-05-17 13:18 suerken
4650
4651 * fixed usage.
4652
4653 2004-05-17 13:10 suerken
4654
4655 * Removed wrong old includes.
4656
4657 2004-05-17 13:08 suerken
4658
4659 * Adding missing includes (gcc-2.95).
4660
4661 2004-05-17 13:04 suerken
4662
4663 * Removed wrong old includes.
4664
4665 2004-05-17 13:04 suerken
4666
4667 * Fixed wrong old includes.
4668
4669 2004-05-17 12:45 suerken
4670
4671 * Adding quota test tool.
4672
4673 2004-05-17 12:33 suerken
4674
4675 * Some more Makefile fixes.
4676
4677 2004-05-17 12:06 suerken
4678
4679 * - Patch for buggy XFS header file, make -pedantic work again.
4680
4681 2004-05-17 12:04 suerken
4682
4683 * - Fixing include.
4684 - Importing QuotaInfo from tincas.
4685
4686 2004-05-17 09:47 suerken
4687
4688 * Adding Recode class from tincas.
4689
4690 2004-05-17 09:36 suerken
4691
4692 * Misc was missing.
4693
4694 2004-05-17 09:35 suerken
4695
4696 * Add CmdLine.
4697
4698 2004-05-17 09:35 suerken
4699
4700 * New header && library scheme.
4701
4702 2004-05-17 09:23 suerken
4703
4704 * Updates to new lib/include scheme.
4705
4706 2004-05-17 09:15 suerken
4707
4708 * Typo fixes.
4709
4710 2004-05-17 09:02 suerken
4711
4712 * initial cvsignore.
4713
4714 2004-05-17 09:02 suerken
4715
4716 * New test SRCDIR.
4717
4718 2004-05-17 09:01 suerken
4719
4720 * Ignore selected libraries.
4721
4722 2004-05-17 08:58 suerken
4723
4724 * Update to new library scheme.
4725
4726 2004-05-17 08:58 suerken
4727
4728 * Missing include sstream.
4729
4730 2004-05-17 08:58 suerken
4731
4732 * +throws(), some const updates.
4733
4734 2004-05-17 08:57 suerken
4735
4736 * more clean up.
4737
4738 2004-05-17 08:56 suerken
4739
4740 * clean up.
4741
4742 2004-05-14 17:36 suerken
4743
4744 * Toolboxsys completely converted.
4745
4746 2004-05-14 17:33 suerken
4747
4748 * - Last templates moved to misc.
4749 - More syntax fixes.
4750
4751 2004-05-14 17:30 suerken
4752
4753 * Last templates moved to misc.
4754
4755 2004-05-14 17:23 suerken
4756
4757 * Removed: NullOStream.
4758
4759 2004-05-14 17:22 suerken
4760
4761 * Removed: ArrDelAdapter.
4762
4763 2004-05-14 17:19 suerken
4764
4765 * MutexLock->Thread.
4766 string conversions->text.
4767
4768 2004-05-14 17:17 suerken
4769
4770 * Empty ToolboxSTL.cpp removed.
4771
4772 2004-05-14 17:15 suerken
4773
4774 * Syntax fic for istream2string.
4775
4776 2004-05-14 17:15 suerken
4777
4778 * ToolboxCPP completely converted. Deleting.
4779
4780 2004-05-14 17:11 suerken
4781
4782 * - Removing Random class.
4783 - Add istream2striung impl.
4784
4785 2004-05-14 17:09 suerken
4786
4787 * Text: Importing all from ToolboxSys and Cpp.
4788
4789 2004-05-14 16:38 suerken
4790
4791 * Thread: Importing all from ToolboxSys.
4792
4793 2004-05-14 16:26 suerken
4794
4795 * File: fileExist() imported.
4796
4797 2004-05-14 16:22 suerken
4798
4799 * imported all file releated thisbg fro ToolboxSys.
4800
4801 2004-05-14 16:08 suerken
4802
4803 * imported all time releated thisbg fro ToolboxSys.
4804
4805 2004-05-14 15:34 suerken
4806
4807 * Exceptions imported from tincas.
4808
4809 2004-05-14 14:44 suerken
4810
4811 * Removing empty *.cpp files.
4812
4813 2004-05-14 13:57 suerken
4814
4815 * Fixes/uodates on doxygen docs creation. Should make distcheck
4816 work with newer automakes.
4817
4818 2004-05-14 12:24 suerken
4819
4820 * Fixing doxygen search path.
4821
4822 2004-05-14 12:21 suerken
4823
4824 * - More fixes for the new directory layout.
4825 - Make it work with "g++-3.3 -pedantic" again.
4826
4827 2004-05-14 12:00 suerken
4828
4829 * Directory layout update: All C++ source -> src/.
4830
4831 2004-05-14 11:42 suerken
4832
4833 * - Explicit declaration or stdRead/stdWrite for template
4834 (g++-3.4/STDC++)
4835 - Removing GCCFDSteam.
4836
4837 2004-05-14 11:14 suerken
4838
4839 * Lots of extra ";" removed that g++-3.4 is sp picky about.
4840
4841 2004-05-14 11:07 suerken
4842
4843 * Update to CommonCPP2.
4844
4845 2004-05-14 08:56 suerken
4846
4847 * _More_ Todo list updates.
4848
4849 2004-05-14 08:48 suerken
4850
4851 * Todo list completions.
4852
4853 2004-05-13 17:28 suerken
4854
4855 * Cleanups and completions.
4856
4857 2004-05-13 17:27 suerken
4858
4859 * Removing all release tarballs from CVS HEAD.
4860
4861 2004-05-13 17:23 suerken
4862
4863 * - Removing obsoelet compat SPUtil.hpp.
4864
4865 2004-05-13 17:19 suerken
4866
4867 * - Obsoletes removed: Regex, CSLog.
4868
4869 - GetOpt fixed to use std::vector.
4870
4871 2004-05-13 17:18 suerken
4872
4873 * Moving TODO to NEWS.
4874
4875 2004-04-30 09:22 suerken
4876
4877 * - Removing CVector.
4878
4879 2004-04-26 12:33 mark13
4880
4881 * * Adaption to ppc compatbility
4882
4883 2004-04-02 11:53 suerken
4884
4885 * stream2string: Replacing CVector->std::vector.
4886
4887 2004-04-02 10:40 suerken
4888
4889 * Adding blockSize arg to istream2String (using CVector instead of
4890 char[n])
4891
4892 2004-03-22 11:59 suerken
4893
4894 * const correctness fix for auto_ptr_set.
4895
4896 2004-01-30 18:03 suerken
4897
4898 * dumped from local/twiki.
4899
4900 2003-09-10 12:52 mark13
4901
4902 * Extended Conversion::base64Encode
4903 Conversion::base64Decode
4904 Conversion::xorEncrypt
4905 Conversion::xorDecrypt
4906
4907 2003-08-27 11:28 suerken
4908
4909 * Fixing short usage.
4910
4911 2003-08-22 12:53 suerken
4912
4913 * Fix: Using %H, not %k for date.
4914
4915 2003-08-21 11:02 suerken
4916
4917 * o Adding support for updating configure.ac to snapshot version
4918 alone
4919
4920 2003-08-12 15:24 suerken
4921
4922 * Fixing buggy genAlphaNumericKey.
4923
4924 2003-08-12 13:00 suerken
4925
4926 * Adding "tarball" line.
4927
4928 2003-08-12 11:39 suerken
4929
4930 * * Making changes to CVS non-lethal for snapshot.
4931
4932 2003-08-12 11:38 suerken
4933
4934 * * Using CVector instead of std::vector for long opts.
4935
4936 2003-08-12 11:36 suerken
4937
4938 * * Making const key variable static (compiler should optimize this
4939 anyway).
4940
4941 * Some cosmetics.
4942
4943 2003-08-12 11:24 suerken
4944
4945 * Adding CVector, class to safely replace variable length c arrays.
4946
4947 2003-08-12 08:41 suerken
4948
4949 * Using libtool-style LD_ADDs for local libraries (will produce
4950 locally runnable libtool script binaries).
4951
4952 2003-08-11 12:17 suerken
4953
4954 * Fixing nonrefconst rc test.
4955
4956 2003-08-11 12:13 suerken
4957
4958 * Removing -Werror.
4959
4960 2003-08-11 12:13 suerken
4961
4962 * change to let it pass rc test.
4963
4964 2003-08-08 14:29 suerken
4965
4966 * Changes to make it compile with -pedantic (untested).
4967
4968 2003-08-08 08:50 luthien
4969
4970 * * Fixed -Wall -pedantic -std=c99 warnings.
4971
4972 2003-07-28 17:15 suerken
4973
4974 * Cosmetics: Add line betwwen cvs check and info.
4975
4976 2003-07-28 17:15 suerken
4977
4978 * Moving cvs check _before_ any variable computation ;)...
4979
4980 2003-07-28 17:14 suerken
4981
4982 * Moving cvs check _before_ tarballs check.
4983
4984 2003-07-28 14:38 suerken
4985
4986 * * snapshot: Check cvs.
4987
4988 2003-07-28 14:34 suerken
4989
4990 * * release: Prechecking cvs and old tarballs before any
4991 interaction.
4992
4993 * Some cosmetics.
4994
4995 2003-07-28 14:20 suerken
4996
4997 * Some cosmetics to usage.
4998
4999 2003-07-28 14:17 suerken
5000
5001 * Changing version to 1.1.0 (the next version to-be released).
5002
5003 2003-07-28 14:16 suerken
5004
5005 * Changing version to 1.1.development.
5006
5007 2003-07-28 14:15 suerken
5008
5009 * * Big code cleanup.
5010
5011 * Using two big functions: do_release() and do_snapshot.
5012
5013 * No longer changing configure.ac at all -- only shapshot
5014 temporarily changes this file.
5015
5016 * Removing all support for the release directory.
5017
5018 * Removing gpg signing support (its in SPUpload).
5019
5020 * Making local changes lethal, obsoleting a number of later
5021 checks.
5022
5023 * Many more obsolete code removed.
5024
5025 2003-07-28 13:23 suerken
5026
5027 * * Newer libtool (?) somehow needs to give pthread as "-l" option.
5028
5029 2003-07-28 11:51 suerken
5030
5031 * * New syntax of calling SPRelease introduced
5032
5033 2003-07-28 11:48 suerken
5034
5035 * * Removing redundant build-in autoClean and autoUpdate
5036
5037 * relying on "./.strap_auto" completely
5038
5039 * Removing options to run above with SPRelease
5040
5041 2003-07-28 10:43 suerken
5042
5043 * Changing snapshot version.
5044
5045 2003-07-15 12:14 suerken
5046
5047 * Changes to make it compile with g++ 3.3 (cassert, two casts ;()
5048
5049 2003-07-15 12:09 suerken
5050
5051 * Fixing ifdef syntax to if defined (for extended bool expressions)
5052
5053 2003-07-15 12:01 suerken
5054
5055 * * RealTimeStamp bugfix: ifdef __GNUC__ wrong semantic, ends up
5056 producing no code for gcc >=3.
5057
5058 2003-07-03 12:30 mark13
5059
5060 * Removed 1.19 changes
5061
5062 2003-07-03 11:20 mark13
5063
5064 * Fixed a typo in URL::urlEncode and extented encoding for non
5065 ASCII charactes
5066
5067 2003-06-03 12:24 suerken
5068
5069 * * libtool_decode_so_version; added, does not seem to work yet.
5070
5071 2003-03-31 08:44 suerken
5072
5073 * * Doxygen: Extra documentation gets postfix ".doc" (not ".txt").
5074
5075 2003-03-31 08:31 suerken
5076
5077 * Reverting to old (working) auto bootstrap.
5078
5079 2003-03-27 15:12 suerken
5080
5081 * Reverting default auto strap (does not seem to work on all
5082 platforms.. ;(
5083
5084 2003-03-27 15:08 suerken
5085
5086 * Signature postfix changes from .asc -> .sig
5087
5088 2003-03-27 14:59 suerken
5089
5090 * default email notify -> abteilung
5091
5092 2003-03-25 14:03 suerken
5093
5094 * Fix: Correct version for doxygen docs in distribution tarball.
5095
5096 2003-03-25 13:10 suerken
5097
5098 * Default auto-update: Using autoreconf --force, removing
5099 autoheader.
5100
5101 2003-03-25 12:34 suerken
5102
5103 * * Removing call to autoheader.
5104
5105 * Using autoreconf --force
5106
5107 2003-03-18 16:26 suerken
5108
5109 * Updating to new developemnt branch 1.1.
5110
5111 2003-03-18 16:25 suerken
5112
5113 * 1st stable release.
5114
5115 2003-03-18 16:21 suerken
5116
5117 * SPRelease: Check in of invalid configure.ac for clarity.
5118
5119 2003-03-18 16:19 suerken
5120
5121 * SPRelease: ChangeLog update. Final change for Release
5122 1.0.20030318.
5123
5124 2003-03-18 16:19 suerken
5125
5126 * SPRelease: 1.0.20030318 (CVS tag: SP_UTILCPP_1_0_20030318)
5127 released.
5128
5129 2003-03-18 15:52 suerken
5130
5131 * * Email notify set to abteilung@vlovic...
5132
5133 2003-03-18 15:48 suerken
5134
5135 * * Updates for 1.0 stable release.
5136
5137 2003-03-18 15:47 suerken
5138
5139 * * Hurray: Updating version to 1.0.
5140
5141 2003-03-18 15:34 suerken
5142
5143 * * Last updates for 1st stable release.
5144
5145 2003-03-18 15:34 suerken
5146
5147 * * Updates/fixes to doxygen docu.
5148
5149 2003-03-18 15:21 suerken
5150
5151 * * Removing FileDescriptorStream, FileDescriptorBuf.
5152
5153 * Adding FDTypeStream, FDTypeBuf templates.
5154
5155 * Updates in examples for new templates.
5156
5157 2003-03-18 11:23 suerken
5158
5159 * * Adding package name and version to doxygen configuration.
5160
5161 2003-03-18 10:37 suerken
5162
5163 * * Making this tool work as server and client per argument.
5164
5165 2003-03-18 10:03 suerken
5166
5167 * * FileDescriptor: Adding virtual methods stdWrite(), stdRead().
5168 Standard is to use read(2), write(2).
5169
5170 * Socket: Overwriting stdWrite, stdRead: These methods use
5171 send(2)/recv(2).
5172
5173 * FileDescriptorBuf: Using stdWrite, stdRead.
5174
5175 2003-03-17 13:02 suerken
5176
5177 * * Adding virtual stdRead and stdWrite to FileDescriptor.
5178
5179 * Overwriting stdRead && stdWrite using socket send/recv for
5180 class Socket.
5181
5182 2003-03-17 12:01 suerken
5183
5184 * Undefining GCC_EXT again ...
5185
5186 2003-03-17 12:00 suerken
5187
5188 * Fix: If GCC_EXT is defined, make it work for gcc-2.95 ;)
5189
5190 2003-03-10 15:13 suerken
5191
5192 * * README: Adding a short "what is it" summary ;)
5193
5194 2003-03-10 14:31 suerken
5195
5196 * * Fix: Adding SPUpload to dist.
5197
5198 2003-03-10 14:08 suerken
5199
5200 * * Adding SPUpload.
5201
5202 * Makefile support for SPUpload.
5203
5204 2003-03-10 11:57 suerken
5205
5206 * Updating README to new so-versoning scheme
5207
5208 2003-03-10 11:49 suerken
5209
5210 * Changing library so-name revision 5 (new so-versioning scheme).
5211
5212 2003-02-21 14:55 suerken
5213
5214 * std, std, std ....
5215
5216 2003-02-21 14:46 suerken
5217
5218 * * INetSocket, UnixSocket: Seperating "bind" into a dedicated
5219 method.
5220
5221 * INetSocket, UnixSocket: Adding connect() method.
5222
5223 * => INetSocket, UnixSocket can now also be used as connection
5224 sockets.
5225
5226 2003-02-21 14:34 mark13
5227
5228 * Added new Methods Conversion::base64Encode and
5229 Conversion::base64Decode
5230
5231 2003-02-21 12:32 suerken
5232
5233 * std !!!
5234
5235 2003-02-20 17:05 mark13
5236
5237 * Added new methods Conversion::xorEncrypt and
5238 Conversion::xorDecrypt
5239
5240 2003-02-12 12:46 suerken
5241
5242 * INetSocket: Adding support for setting SO_REUSEADDR.
5243
5244 2003-02-10 17:58 suerken
5245
5246 * * Some cosmetic changes
5247
5248 2003-02-10 17:44 suerken
5249
5250 * Fix: Compilation with g++ 2.95 (GCCFDStream)
5251
5252 2003-02-10 17:38 suerken
5253
5254 * * New Example: Echo Server.
5255
5256 * Fix: Adding File Lock example to docs.
5257
5258 2003-02-10 17:37 suerken
5259
5260 * * New classes: FileDescriptorBuf, FileDescriptorStream.
5261 POSIX-portable.
5262
5263 * New class: GCCFDStream: "Portable" between g++ <3 && g++ >=3.
5264 Should not be used.
5265
5266 2003-02-10 10:07 suerken
5267
5268 * * Some fixes to doxygen docs (those that currently are not
5269 produced ;(
5270
5271 * Moving atomic include to top, where it belongs.
5272
5273 2003-02-07 17:09 suerken
5274
5275 * * Docu updates (no warnings again, but new classes not really
5276 documented)
5277
5278 2003-02-07 17:00 suerken
5279
5280 * * Cosmetic fixes
5281
5282 2003-02-07 16:52 suerken
5283
5284 * * return(x) -> return x
5285
5286 * throw(x) -> throw x
5287
5288 2003-02-07 16:29 suerken
5289
5290 * * New include strategy: Including implementation header directly
5291 after local configuration.
5292 This assures formally that dependencies of Header Files are fully
5293 satisfied. (->Thorsten ;)
5294
5295 * This actually fixes a dependency bug on ToolboxCPP.hpp.
5296
5297 2003-02-07 16:08 suerken
5298
5299 * Reorder and other cleanup.
5300
5301 2003-02-07 13:03 suerken
5302
5303 * * Making Sockets FileDescriptors
5304
5305 * Socket: phasing out all redundancy with FileDescriptor
5306
5307 * Socket::Exceptions integrated into FileDescriptor::Exceptions
5308
5309 2003-02-07 12:56 suerken
5310
5311 * * Fix: Exceptions removed from BSDFileMutex
5312
5313 * Made Exceptions non classified everywhere
5314
5315 2003-02-07 12:53 suerken
5316
5317 * * Adding class "File"
5318
5319 * All exceptions now in super class FileDescriptor
5320
5321 * Update BSD|PosixFileLock
5322
5323 * Removed double include of atomic
5324
5325 2003-02-07 12:10 suerken
5326
5327 * * FileDescriptor: Adding "read" and "write" methods
5328
5329 2003-02-07 10:49 suerken
5330
5331 * * FileDescriptor: Making "closeFd"-Flag explicit with
5332 constructor.
5333
5334 * FileDescriptor: Renaming method "get" to "getFd".
5335
5336 2003-02-07 10:44 suerken
5337
5338 * * Adding "silentUnlink"-Fals to UnixSocket.
5339
5340 * Adding recv/send methods to Socket class.
5341
5342 2003-02-06 18:11 suerken
5343
5344 * * UnixSocket: Added method "getHost()".
5345
5346 * InetSocket: Renaming argument names...
5347
5348 2003-02-06 17:30 suerken
5349
5350 * Socket, INetSocket, UnixSocket: Making "closeFd"-Flag explicit.
5351
5352 2003-02-06 17:03 suerken
5353
5354 * Include fixes.
5355
5356 2003-02-06 16:51 suerken
5357
5358 * * New classes Socket, INetSocket, UnixSocket (abstracted from
5359 tincas)
5360
5361 2003-02-05 14:13 suerken
5362
5363 * * FIX: no ":" at beginnning or end of CPLUS_INCLUDE_PATH (gcc32
5364 thinks this is ".", and WARNS)
5365
5366 2003-02-05 13:37 suerken
5367
5368 * * Removing wrong comments about old configure.ac taht will be
5369 saved, as it wont be saved any longer...
5370
5371 2003-01-31 13:26 suerken
5372
5373 * Removing creation of BAK configure.ac-Files. This feature sucks
5374 more than it does good.
5375
5376 2003-01-30 13:47 suerken
5377
5378 * Some cosmetic changes ;)
5379
5380 2003-01-27 13:40 suerken
5381
5382 * Adding .strap_auto to dist.
5383
5384 2003-01-27 13:33 suerken
5385
5386 * * Adding .strap_auto
5387
5388 * Moving autoUpdate from SPRelease.package to .strap_auto
5389
5390 2003-01-24 11:56 suerken
5391
5392 * Adding support for ".auto_strap".
5393
5394 2003-01-22 17:22 suerken
5395
5396 * Fixing invalid snapshot vesion to match new style.
5397
5398 2003-01-21 12:17 mark13
5399
5400 * Moved PAGE_SIZE definition out of the
5401 "SP_UTILCPP_DISABLE_LINUX_ATOMIC" define block
5402
5403 2003-01-17 10:32 suerken
5404
5405 * +sp-util-filelock, -sp-util-posixfilelock
5406
5407 2003-01-17 10:31 suerken
5408
5409 * Darn, somehow "test" was fixed as filename.
5410
5411 2003-01-16 18:03 suerken
5412
5413 * PosixFileLock -> FileLock with both BSD and POSIX file locking.
5414
5415 2003-01-16 12:57 suerken
5416
5417 * Documentation fixed.
5418
5419 2003-01-15 17:29 suerken
5420
5421 * Removing debug output.
5422
5423 2003-01-15 14:43 suerken
5424
5425 * Removing pause() -- waiting for some input now.
5426
5427 2003-01-15 14:39 suerken
5428
5429 * * Update for new File Lock setup.
5430
5431 2003-01-14 16:45 suerken
5432
5433 * * New Classes: FileDescriptor, BSDFileMutex, PosixFileMutex.
5434
5435 * Removed classes: FileLock, BSDFileLock, PosixFileLock.
5436
5437 * New Mutexe now work with MutexLock template.
5438
5439 * Some Cosmetic changes.
5440
5441 2003-01-14 12:28 suerken
5442
5443 * Cosmetic change
5444
5445 2003-01-14 12:25 suerken
5446
5447 * * Adding MutexLock class, moved from ToolboxSys.
5448
5449 * MutexLock class: Support for no wait locks.
5450
5451 2003-01-14 12:20 suerken
5452
5453 * * SPACES -> TABS for class URL.
5454
5455 2003-01-08 17:14 suerken
5456
5457 * * PosixFileLock: Adding example.
5458
5459 2003-01-08 17:12 suerken
5460
5461 * * PosixFileLock: Fix: Using open(2), not creat(2) to open
5462 PosixFileLock files; this files do not get truncated.
5463
5464 * PosixFileLock: Fix: CREAT_ERR to OPEN_ERR.
5465
5466 * PosixFileLock: Doc: Added example.
5467
5468 2003-01-08 15:33 suerken
5469
5470 * * Doc: Adding diversity table to mainpage.
5471
5472 2003-01-08 15:30 suerken
5473
5474 * * Doc: Adding file info for SysLogMono.hpp
5475
5476 * Doc: Adding brief description for CmdLine.hpp
5477
5478 2003-01-08 15:22 suerken
5479
5480 * Fixed doxygen doc warning.
5481
5482 2003-01-08 15:18 suerken
5483
5484 * Order: CmdLine before Regex
5485
5486 2003-01-08 14:12 suerken
5487
5488 * Adding class PosixFileLock.
5489
5490 2003-01-07 14:41 suerken
5491
5492 * * NaiveCloneThread: Constructor now takes amount of PAGES, not
5493 stack size itself
5494
5495 * NaiveCloneThread: Default stack size increased to 4 * PAGES
5496 (was: 1 * PAGES).
5497 Most applications (e.g. DB4) definetly need more stack than just
5498 one PAGE...
5499
5500 * Some more trailing whitespace removed!
5501
5502 2002-12-23 10:18 suerken
5503
5504 * Default autoClean: Removing "configure" && "config.h", no longer
5505 removing "config.h.in"
5506
5507 2002-12-23 10:13 suerken
5508
5509 * Adding stamp-h1 to files to remove with default autoClean.
5510
5511 2002-12-23 10:09 suerken
5512
5513 * Now using default autoClean from SPRelease.
5514
5515 2002-12-23 10:08 suerken
5516
5517 * Adding defaults for autoClean and autoUpdate.
5518
5519 2002-12-23 09:48 suerken
5520
5521 * * SPRelease: Fix: Now sourcing ./SPRelease.package -- otherwise,
5522 if some
5523 SPRelease.package is in $PATH, that would have been used.
5524
5525 * SPRelease.package: No longer doeiung "distclean" un update.
5526
5527 2002-12-19 15:18 suerken
5528
5529 * _H -> _HPP
5530
5531 2002-12-19 11:59 suerken
5532
5533 * Added two missing "std::".
5534
5535 2002-12-17 13:53 suerken
5536
5537 * * Updates to produce no more warnings with g++-3.2 (c++'s slog.h
5538 still does one).
5539
5540 2002-12-17 13:52 suerken
5541
5542 * * Removing "eMailIsValid" -- deprecated && no longer used in
5543 tincas 1.2.x.
5544
5545 2002-12-17 13:51 suerken
5546
5547 * * Removing "genKey" -- deprecated && no longer used in tincas
5548 1.2.x.
5549
5550 2002-12-17 13:48 suerken
5551
5552 * Update.
5553
5554 2002-12-13 10:27 suerken
5555
5556 * No longer generating rtf -- html only currently.
5557
5558 2002-12-13 10:17 suerken
5559
5560 * * SPUtil.hpp added: Including the full treat.
5561
5562 * Updating Makefile to .hpp only.
5563
5564 2002-12-13 10:06 suerken
5565
5566 * Removing compatibility header.
5567
5568 2002-12-13 10:05 suerken
5569
5570 * Removing ".h" compatibility headers.
5571
5572 2002-12-12 15:08 suerken
5573
5574 * Cosmetics: Making all local includes in *.cpp local indeed.
5575
5576 2002-12-10 11:15 suerken
5577
5578 * Cleaner, improved autodoc rules from dvdb.
5579
5580 2002-12-10 10:57 suerken
5581
5582 * Adding "nanosleep" master function.
5583
5584 2002-12-10 10:04 suerken
5585
5586 * nsnsleep: FIX: Computing nanoseconds value down to
5587 seconds+nanoseconds (nanosleep only accepts 0 =< nanoseconds <
5588 10^9)
5589
5590 2002-12-09 13:12 suerken
5591
5592 * Adding .strap_* to dist -- they can be of use even there.
5593
5594 2002-12-09 11:38 suerken
5595
5596 * Preliminra changes for the upcoming release.
5597
5598 2002-12-09 11:37 suerken
5599
5600 * << for RealTimeStamp: moved from debug to normal presentation.
5601
5602 2002-12-05 13:44 suerken
5603
5604 * Renaming these files to something more behaving...
5605
5606 2002-12-05 12:07 suerken
5607
5608 * We keep on fixing ;).
5609
5610 2002-12-05 12:03 suerken
5611
5612 * Fix unset.
5613
5614 2002-12-05 11:53 suerken
5615
5616 * Diversing these two.
5617
5618 2002-12-05 10:45 suerken
5619
5620 * New utility functions for in-CVS-use of the libraries.
5621 Usage: `<PATH>/DEVSTRAP` in any shell; in the same shell, you can
5622 use
5623 the library now as if it was installed.
5624
5625 2002-12-05 09:46 suerken
5626
5627 * Fix: Usage program name.
5628
5629 2002-12-04 15:39 suerken
5630
5631 * FIX: cout -> std::cout.
5632
5633 2002-12-04 15:35 suerken
5634
5635 * FIX: <iostream> in header (g++-3.0 showed).
5636
5637 2002-12-04 15:29 suerken
5638
5639 * Removing silly emacs mark.
5640
5641 2002-12-04 15:28 suerken
5642
5643 * Adding some more docs to make doxygen happy.
5644
5645 2002-12-04 15:25 suerken
5646
5647 * Adding threads test example binary.
5648
5649 2002-12-04 15:23 suerken
5650
5651 * Adding RealTimeStamp.
5652
5653 2002-12-04 13:48 suerken
5654
5655 * added missing :
5656
5657 2002-12-04 13:43 suerken
5658
5659 * Removing asm.
5660
5661 2002-12-04 10:40 suerken
5662
5663 * Adding namespace SP::Util::CmdLine.
5664
5665 2002-12-04 10:36 suerken
5666
5667 * Some non-released updates.
5668
5669 2002-12-04 09:29 suerken
5670
5671 * Docu: Adding all new examples, some minor fixes.
5672
5673 2002-12-04 09:18 suerken
5674
5675 * Fix: Adding all new examples to doc installation.
5676
5677 2002-12-03 18:24 suerken
5678
5679 * Adding "--disable-linux-atomic" to configure script.
5680
5681 2002-12-03 17:35 suerken
5682
5683 * Some additions about SPRelease.
5684
5685 2002-12-03 17:34 suerken
5686
5687 * Adding basic library versioning doc back in.
5688
5689 2002-12-03 17:27 suerken
5690
5691 * Adding ProcessThread as parent class; modeling ForkThread and
5692 NaiveCloneThread after this. isRunning et al is now done via
5693 waitpid.
5694
5695 2002-12-03 17:24 suerken
5696
5697 * Adding example program for threads.
5698
5699 2002-12-02 17:51 suerken
5700
5701 * NaiveCloneThread: Adding wait() method; some internal changes to
5702 make it work better.
5703
5704 2002-12-02 17:46 suerken
5705
5706 * Removing static "-O" flag from cmdline compile -- bug fully
5707 fixed.
5708
5709 2002-11-29 11:40 suerken
5710
5711 * * Adding "atomic.h" into the project to fix a bug an RH 7.3
5712 (where no full linux header is available)
5713
5714 * Patching atomic.h to always behave as if on an SMP machine.
5715
5716 2002-11-29 10:37 suerken
5717
5718 * Checking for readline with ncurses, add some more explanatory
5719 text.
5720
5721 2002-11-29 10:10 suerken
5722
5723 * Bug Fix: Moving "AtomicMutex" into "#ifdef __linux__" on
5724 implementation
5725
5726 2002-11-29 10:04 suerken
5727
5728 * Adding <cstdio> to includes (at least RH 7.3 needs this).
5729
5730 2002-11-29 09:43 suerken
5731
5732 * REMOVING section with checks for stdc++ (no sense in that)
5733
5734 2002-11-29 09:40 suerken
5735
5736 * Added check for libncurses (needed by libreadline).
5737
5738 2002-11-20 14:55 suerken
5739
5740 * Adding new release tarball+sig.
5741
5742 2002-11-20 13:39 suerken
5743
5744 * SPRelease: Check in of invalid configure.ac for clarity.
5745
5746 2002-11-20 13:36 suerken
5747
5748 * SPRelease: ChangeLog update. Final change for Release
5749 0.1.20021120.
5750
5751 2002-11-20 13:36 suerken
5752
5753 * SPRelease: 0.1.20021120 (CVS tag: SP_UTILCPP_0_1_20021120)
5754 released.
5755
5756 2002-11-20 12:46 suerken
5757
5758 * Fixing garbage produced ;(...
5759
5760 2002-11-20 12:45 suerken
5761
5762 * Adding Gerd+Sham to notify list.
5763
5764 2002-11-20 12:34 suerken
5765
5766 * Fixed some declarations of std::string.
5767
5768 2002-11-20 12:31 suerken
5769
5770 * Hoisting all CmdLine stuff into namespace CmdLine to not risk to
5771 run into "local class linking" problem for local standard command
5772 classes.
5773
5774 2002-11-20 12:29 suerken
5775
5776 * Moved SO_VERSION back to 5:0:0 (url*, some parameters made
5777 const).
5778
5779 2002-11-19 13:08 suerken
5780
5781 * * Added some more documentation to satisfy doxygen...
5782
5783 * Cmdline: CmsLine pointer is now set when doeing add().
5784
5785 * SysLogMono: overflow now private.
5786
5787 2002-11-19 10:43 suerken
5788
5789 * Changed SO_VERSION; assuming "interfaces added only".
5790
5791 2002-11-19 10:42 suerken
5792
5793 * Fixing CmdLine + gcc 2.95 optimizing problem for good ;)
5794
5795 2002-11-19 10:42 suerken
5796
5797 * New example for Cmdline.
5798
5799 2002-11-19 10:13 suerken
5800
5801 * Removing note about creating ChangeLogs (this is a CVS log based
5802 project)
5803
5804 2002-11-18 15:02 suerken
5805
5806 * * Adding UNFINISHED DRAFT IMPLEMENTATION (commented out) for
5807 common exception class
5808
5809 2002-11-18 11:18 suerken
5810
5811 * Removin <ostream> include - gcc-2.95 does not have it, and it is
5812 redundant when <iostream> is included.
5813
5814 2002-11-18 10:30 suerken
5815
5816 * * Making everything compilable under gcc 3.0
5817
5818 * Small leak bugfix in CmdLine
5819
5820 2002-11-15 16:52 suerken
5821
5822 * Removing all "using ..." lines.
5823
5824 2002-11-15 16:40 suerken
5825
5826 * Calling ::regfree before throw in constructor.
5827
5828 2002-11-15 16:36 suerken
5829
5830 * Finishing Regex grep-like test program (+random test).
5831
5832 2002-11-15 16:32 suerken
5833
5834 * Syncing log prefix with SMLogMono.
5835
5836 2002-11-15 16:32 suerken
5837
5838 * Adding PosixRegex.
5839
5840 2002-11-14 18:38 suerken
5841
5842 * Synced default output, as far as possible.
5843
5844 2002-11-14 18:26 suerken
5845
5846 * * Fix: Include <string>.
5847
5848 2002-11-14 18:25 suerken
5849
5850 * * Fix: Make logger object non-temporary in docs.
5851
5852 * Fix: Include SysLogMono.hpp.
5853
5854 2002-11-14 18:25 suerken
5855
5856 * Fix: Make logger object non-temporary.
5857
5858 2002-11-14 18:20 suerken
5859
5860 * Adding new binaries.
5861
5862 2002-11-14 18:18 suerken
5863
5864 * Adding Regex, SMLogMono test programs.
5865
5866 2002-11-14 18:17 suerken
5867
5868 * Added include on config.h back in.
5869
5870 2002-11-14 17:46 suerken
5871
5872 * Adding "cvs edit" for editing NEWS, README, configure.ac - people
5873 using cvs's watch mechanism need this.
5874
5875 2002-11-14 14:59 suerken
5876
5877 * Update to new reversed dependency rules
5878
5879 2002-11-14 14:49 suerken
5880
5881 * Adding NullOStream.
5882
5883 2002-11-14 14:39 suerken
5884
5885 * Some cosmetic changes to daemonize.
5886
5887 2002-11-14 14:25 suerken
5888
5889 * Adding SysLogMono/SMLogMono: Lightweight drop-in replacement for
5890 SMLog for mono-threaded environmnents.
5891
5892 2002-11-14 13:49 suerken
5893
5894 * No longer checking in release tarballs+sigs.
5895
5896 2002-11-14 13:19 suerken
5897
5898 * * Adding check for libreadline
5899
5900 * Cosmetic: Removing quotes from MSG_* macros.
5901
5902 2002-11-14 12:04 suerken
5903
5904 * Added some note about (the lack of ...) portability
5905
5906 2002-11-14 12:03 suerken
5907
5908 * Added CmdLine + own library and needed modifications in build
5909 process.
5910
5911 2002-11-14 10:13 suerken
5912
5913 * Adding: ns[n]sleep, AtomicMutex, MutexLock, NaiveCloneThread.
5914
5915 2002-11-13 18:16 suerken
5916
5917 * Include file dependencies reverted (i.e., minimal dependencies
5918 are back in header files).
5919
5920 2002-11-13 16:05 suerken
5921
5922 * Fixed dynamic library dependencies (unclear how this did break
5923 again...). Add NOTE in configure.ac.
5924
5925 2002-11-13 14:40 suerken
5926
5927 * Fix: Not removing "autodoc" on distclean -- would delete this dir
5928 even in tarball, where you cannot rebuild it.
5929
5930 2002-10-09 09:58 suerken
5931
5932 * "Attention not a thread" entry added to ForkThread docs.
5933
5934 2002-10-09 09:16 suerken
5935
5936 * Adding class "ForkThread".
5937
5938 2002-10-04 16:37 suerken
5939
5940 * Updating ANSIC functions srand and rand with prefix "std::".
5941
5942 2002-10-02 15:21 suerken
5943
5944 * Added "daemonize" function.
5945
5946 2002-10-02 13:45 mark13
5947
5948 * Added new class "Conversion" which is intended for changing the
5949 representation of numbers, alphanumeric strings etc.
5950 Also added new methods to this calls : "dec2Base" and "base2dec"
5951
5952 2002-09-30 15:45 mark13
5953
5954 * changed signature of URLDecode/URLEncode parameter string is now
5955 const
5956
5957 2002-09-20 12:48 suerken
5958
5959 * No need for Konfituere.
5960
5961 2002-09-20 12:47 suerken
5962
5963 * Update to newer include labels..
5964
5965 2002-09-19 12:52 suerken
5966
5967 * Portability: Update using std:: as prefix for STDC names (here
5968 std::rand).
5969
5970 2002-09-17 09:09 suerken
5971
5972 * Adding function "updateConfigureAc", avoiding redundancy; In a
5973 successful
5974 release, SPRelease does now updating configure.ac (to invalid)
5975 and checks
5976 it into CVS directly _after_ tagging the CVS.
5977
5978 2002-09-17 08:14 suerken
5979
5980 * Update for new libraries.
5981
5982 2002-09-17 08:11 suerken
5983
5984 * Obsolete. Removed all "smr"-macros (the only one used did not
5985 work as expected).
5986
5987 2002-09-16 15:34 suerken
5988
5989 * Simplified configure.ac. Remove some obsolete references to
5990 $ccgnu*.
5991
5992 2002-09-16 15:20 suerken
5993
5994 * Replaced smr_CHECK_LIB with AC_CHECK_LIB. smr_CHECK_LIB did not
5995 stop on failes ccgnu test.
5996
5997 2002-09-16 14:31 suerken
5998
5999 * Fixing bug in mail sending when ~/.signature ist not there.
6000
6001 2002-09-16 14:23 suerken
6002
6003 * For some reason (???) "./configure && make distcheck" would not
6004 exit
6005 SPRelease, while
6006 ./configure
6007 make distcheck
6008 works fine. Changed.
6009
6010 2002-09-16 14:03 suerken
6011
6012 * Fixed format of this check ;).
6013
6014 2002-09-16 14:02 suerken
6015
6016 * Moved check against existing release tarballs wone to moire
6017 correct place.
6018
6019 2002-09-16 13:55 suerken
6020
6021 * Updating email address of sham...
6022
6023 2002-09-16 11:28 suerken
6024
6025 * Removed Pacal, added sham to notify list.
6026
6027 2002-09-16 10:32 suerken
6028
6029 * SPRelease: Tarballs for 0.1.20020916.
6030
6031 2002-09-16 09:58 suerken
6032
6033 * SPRelease: ChangeLog update. Final change for Release
6034 0.1.20020916.
6035
6036 2002-09-16 09:58 suerken
6037
6038 * SPRelease: 0.1.20020916 (CVS tag: SP_UTILCPP_0_1_20020916)
6039 released.
6040
6041 2002-09-16 09:32 suerken
6042
6043 * Added check for "cvs2cl" for non-maknaul ChangeLog projects.
6044
6045 2002-09-16 09:26 suerken
6046
6047 * Adding some automated help for NEWS file editing.
6048
6049 2002-09-16 09:05 suerken
6050
6051 * Updated SO_VERSION. Deciding this is new, incompatible with all
6052 former
6053 versions (4.0.0).
6054
6055 2002-09-13 16:24 suerken
6056
6057 * * Makefile.am: Updated/corrected library dependencies.
6058
6059 * GetOpt.cpp: Some cosmetic changes.
6060
6061 2002-09-13 16:16 suerken
6062
6063 * Diversified Library. Updating/correcting dependencies. Complete
6064 library is
6065 still being build, but imho obsolete.
6066
6067 2002-09-13 15:09 suerken
6068
6069 * Adding thsi file for completeness (shows dependency information).
6070
6071 2002-09-13 14:31 suerken
6072
6073 * Correcting example file name.
6074
6075 2002-09-13 14:31 suerken
6076
6077 * Adding "emailIsValid()" here.
6078
6079 2002-09-13 14:26 suerken
6080
6081 * * Removing -Wno-reorder
6082
6083 * Updating GetOpt.cpp (printUsage, wrongUsage).
6084
6085 2002-09-13 13:22 suerken
6086
6087 * Updated include dependencies.
6088
6089 2002-09-13 13:20 suerken
6090
6091 * Updated all include dependencies + synopsis.
6092
6093 2002-09-13 12:33 suerken
6094
6095 * * Compatibility Toolbox.hpp (includes all Toolbox*.hpp files)
6096
6097 * Temporary update for Makefile.am
6098
6099 * Toolbox.cpp is now obsolete.
6100
6101 2002-09-13 12:17 suerken
6102
6103 * Diverting Toolbox.* into ToolboxCPP.*, ToolboxSTL.* and
6104 ToolboxSys.*.
6105
6106 2002-09-13 09:22 suerken
6107
6108 * Update to new *.hpp Header files.
6109
6110 2002-09-13 09:21 suerken
6111
6112 * Update to new *.hpp header files.
6113
6114 2002-09-13 09:08 suerken
6115
6116 * Adding include file patterns. Thus, doc/autoadd/*.txt are finally
6117 included.
6118
6119 2002-09-13 09:01 suerken
6120
6121 * Updating header file define from *_H to *_HPP.
6122
6123 2002-09-13 08:58 suerken
6124
6125 * Making compatibility include files out of these.
6126
6127 2002-09-13 08:41 suerken
6128
6129 * Fixing all includes to *.hpp.
6130
6131 2002-09-13 08:38 suerken
6132
6133 * Fixing documentation/include synopsis to *.hpp.
6134
6135 2002-09-13 08:31 suerken
6136
6137 * * Copying *.h -> *.hpp, adding all *.hpp files to CVS.
6138
6139 2002-09-12 10:57 suerken
6140
6141 * Adding doc/autoadd to input files ;(.
6142
6143 2002-09-12 10:03 suerken
6144
6145 * SPRelease: Tarballs for 0.1.20020912.
6146
6147 2002-09-12 10:00 suerken
6148
6149 * SPRelease: ChangeLog update. Final change for Release
6150 0.1.20020912.
6151
6152 2002-09-12 10:00 suerken
6153
6154 * SPRelease: 0.1.20020912 (CVS tag: SP_UTILCPP_0_1_20020912)
6155 released.
6156
6157 2002-09-12 09:41 suerken
6158
6159 * * Optionally calling local editor to change README, NEWS.
6160
6161 2002-09-12 09:41 suerken
6162
6163 * * Typo.
6164
6165 2002-09-12 09:13 suerken
6166
6167 * * Local Editor: Now using (in this order): $EDITOR, $VISUAL, vi.
6168
6169 2002-09-12 08:59 suerken
6170
6171 * * Cosmetic: Adding ~/.signature to mail body.
6172
6173 2002-09-12 08:55 suerken
6174
6175 * * Reformatting (sh-mode, tabs).
6176
6177 2002-09-11 17:45 suerken
6178
6179 * * Using AC_INIT.
6180
6181 2002-09-11 17:44 suerken
6182
6183 * * Removing regexx.h includes.
6184
6185 2002-09-11 17:41 suerken
6186
6187 * * Using newer AC_INIT method of package/version.
6188
6189 * This implies using automake 1.6 (PACKAGE, VERSION).
6190
6191 2002-09-11 17:23 suerken
6192
6193 * * Some include file cleanup
6194
6195 2002-09-11 17:15 suerken
6196
6197 * * Adding helper method "wrongUsage".
6198
6199 * Updating method printUsage with optional title argument.
6200
6201 2002-09-11 16:31 suerken
6202
6203 * * Chages for the better.
6204
6205 2002-09-11 16:30 suerken
6206
6207 * * Moving all includes from *.h-files, updating all *.cpp files.
6208
6209 * Updating Synopsis documentation.
6210
6211 * Toolbox.h: Only using functions using regexx.hh if it's
6212 included before (i.e., no need to use -Wno-reorder).
6213
6214 2002-09-11 15:50 luthien
6215
6216 * * Documentation distribution fixes.
6217
6218 2002-09-11 15:00 suerken
6219
6220 * Added support for name and version in AC_INIT ("modern version").
6221
6222 2002-09-11 14:56 suerken
6223
6224 * Cosmetic changes.
6225
6226 2002-09-11 14:55 suerken
6227
6228 * Update example dir.
6229
6230 2002-09-11 14:55 suerken
6231
6232 * Update of autodoc/doxygen rules.
6233
6234 2002-09-11 13:58 luthien
6235
6236 * * More doc distribution fixes.
6237
6238 2002-09-11 13:47 luthien
6239
6240 * Makefile.am (dist-hook): fixed make distcheck problem
6241 (EXTRA_DIST): include documentation in tarball.
6242
6243 2002-09-11 13:39 suerken
6244
6245 * Adding support for manual changelogs.
6246
6247 2002-09-11 13:03 luthien
6248
6249 * * Removed Doxyfile.
6250
6251 2002-09-11 13:03 luthien
6252
6253 * * Removed some lines from .cvsignore.
6254
6255 2002-09-04 14:05 luthien
6256
6257 * * Added ANNOUNCE and DEVELOPERS files.
6258
6259 2002-09-04 14:01 luthien
6260
6261 * * Restored old Doxygen rules.
6262
6263 2002-09-02 15:22 suerken
6264
6265 * SPRelease: Tarballs for 0.1.20020902.
6266
6267 2002-09-02 15:18 suerken
6268
6269 * SPRelease: ChangeLog update. Final change for Release
6270 0.1.20020902.
6271
6272 2002-09-02 15:18 suerken
6273
6274 * SPRelease: 0.1.20020902 (CVS tag: SP_UTILCPP_0_1_20020902)
6275 released.
6276
6277 2002-09-02 15:17 suerken
6278
6279 * * Removing acinclude.m4, better check in configure.ac.
6280
6281 * Examples: Removed _ in binary names.
6282
6283 * Removing CSLog from library proper -- it contains global
6284 variables.
6285
6286 * Making sp-utilcpp-global -- exchange sp-util library for
6287 "buggy" CSLog.
6288
6289 * Removed all library dependencies for sp-utilcpp.
6290
6291 * Let sp-utilcpp-global depend on ccgnu.
6292
6293 2002-08-30 14:27 suerken
6294
6295 * @var@ -> $(var)
6296
6297 2002-08-30 10:00 suerken
6298
6299 * SPRelease: Tarballs for 0.1.20020830.
6300
6301 2002-08-30 09:58 suerken
6302
6303 * SPRelease: ChangeLog update. Final change for Release
6304 0.1.20020830.
6305
6306 2002-08-30 09:58 suerken
6307
6308 * SPRelease: 0.1.20020830 (CVS tag: SP_UTILCPP_0_1_20020830)
6309 released.
6310
6311 2002-08-29 15:36 suerken
6312
6313 * Adding cvsignore.
6314
6315 2002-08-29 15:35 suerken
6316
6317 * Removing Doxyfile, which is now source.
6318
6319 2002-08-29 15:34 suerken
6320
6321 * Fixed snapshot version DATE from snapshotDATETIME to
6322 DATETIMEsnapshot. This will cooperate better with Release Dates.
6323
6324 2002-08-29 15:28 suerken
6325
6326 * Obsolete.
6327
6328 2002-08-29 15:27 suerken
6329
6330 * Unnumbered updates ;).
6331
6332 2002-08-29 14:50 suerken
6333
6334 * In place for Doxyfile.in.
6335
6336 2002-08-29 13:00 suerken
6337
6338 * Smal change that makes it much nicer: The version for the
6339 preliminary
6340 checks will be computed too, as "MAJOR.MINOR.snapshotDATETIME".
6341 Time goes
6342 down to seconds. This way, the preliminary check taraballs can be
6343 used
6344 directly as unofficial snapshots.
6345
6346 2002-08-29 09:33 suerken
6347
6348 * Adding versioning information.
6349
6350 2002-08-28 16:49 suerken
6351
6352 * Removing these releases. They should not be used.
6353
6354 2002-08-28 10:41 luthien
6355
6356 * * Removed a stray echo command.
6357
6358 2002-08-28 10:36 luthien
6359
6360 * * Set _GNU_SOURCE via configure.ac.
6361
6362 2002-08-28 10:19 luthien
6363
6364 * * Portability fix for ccgnu library check.
6365
6366 2002-08-28 10:04 mark13
6367
6368 * changed test for ccgnu (old dosn't work on Redhat)
6369
6370 2002-08-27 16:15 suerken
6371
6372 * {} -> ()
6373
6374 2002-08-27 16:10 suerken
6375
6376 * package -> PACKAGE
6377
6378 2002-08-27 15:50 suerken
6379
6380 * Creating config.h. Removing manual PACKAGE, VERSION vars.
6381
6382 2002-08-27 15:49 suerken
6383
6384 * Simplified. INCLUDE -> AM_CFLAGS.
6385
6386 2002-08-27 15:48 suerken
6387
6388 * Including "config.h" in all *.cpp-Files.
6389
6390 2002-08-27 15:02 suerken
6391
6392 * Compiling with -D_REENTRANT.
6393
6394 2002-08-27 13:06 luthien
6395
6396 * * Use AM_CPPFLAGS.
6397
6398 2002-08-27 09:04 suerken
6399
6400 * Resetting to non-release state (should have been !??).
6401
6402 2002-08-27 09:02 suerken
6403
6404 * Changing AM_CXXFLAGS --> target_CXXFLAGS, adding -D_REENTRANT.
6405
6406 2002-08-23 15:16 suerken
6407
6408 * Fix: $srcdir to top_builddir.
6409
6410 2002-08-22 13:20 luthien
6411
6412 * *configure.ac:
6413 used templates for library checks
6414
6415 * .cvsignore:
6416 added Doxyfile
6417
6418 2002-08-22 12:07 mark13
6419
6420 * SPRelease: Tarballs for 0.1.20020822.
6421
6422 2002-08-22 12:05 mark13
6423
6424 * SPRelease: ChangeLog update. Final change for Release
6425 0.1.20020822.
6426
6427 2002-08-22 12:04 mark13
6428
6429 * SPRelease: 0.1.20020822 (CVS tag: SP_UTILCPP_0_1_20020822)
6430 released.
6431
6432 2002-08-22 10:50 suerken
6433
6434 * Some last fixes.
6435
6436 2002-08-22 09:52 suerken
6437
6438 * Updates to new name (sp-utilcpp).
6439
6440 2002-08-21 17:49 luthien
6441
6442 * * Makefile.am:
6443 * Doxyfile.in:
6444 * configure.ac:
6445 cleaned up "make distcheck"
6446
6447 2002-08-21 16:26 luthien
6448
6449 * * Updated installation rules.
6450
6451 2002-08-21 15:57 mark13
6452
6453 * Initial checkin
6454
6455 2002-08-21 15:57 mark13
6456
6457 * Added an new class "url". This class is related to url specific
6458 functionality.
6459
6460 2002-08-21 15:55 mark13
6461
6462 * Added Toolbox.cpp
6463
6464 2002-08-21 12:19 suerken
6465
6466 * New generated.
6467
6468 2002-08-21 12:00 suerken
6469
6470 * Fix: Absolute pathnames.
6471
6472 2002-08-21 09:21 suerken
6473
6474 * cvsignore!
6475
6476 2002-08-21 09:19 suerken
6477
6478 * Reverted to snapshot.
6479
6480 2002-08-21 09:11 suerken
6481
6482 * Some nicer automated cvs log release messages.
6483
6484 2002-08-19 14:29 luthien
6485
6486 * * Re-added .cvsignore.
6487
6488 2002-08-19 13:47 suerken
6489
6490 * SPRelease: Tarballs for 0.1.20020819.
6491
6492 2002-08-19 13:46 suerken
6493
6494 * SPRelease: ChangeLog update. Final change for Release
6495 0.1.20020819.
6496
6497 2002-08-19 13:45 suerken
6498
6499 * SPRelease: Automated checkin for 0.1.20020819
6500
6501 2002-08-19 13:45 suerken
6502
6503 * Adding SPRelease to EXTRA_DIST.
6504
6505 2002-08-19 13:38 suerken
6506
6507 * Adding all local addresses to notify.
6508
6509 2002-08-19 13:34 suerken
6510
6511 * Adding editing mode for mail to be sent.
6512
6513 2002-08-19 13:27 suerken
6514
6515 * Increasing library release.
6516
6517 2002-08-19 13:26 suerken
6518
6519 * Minor update.
6520
6521 2002-08-19 13:26 suerken
6522
6523 * Adding news for both the old and the new release.
6524
6525 2002-08-19 13:15 suerken
6526
6527 * Regenerated.
6528
6529 2002-08-19 13:13 suerken
6530
6531 * Adding initial text about SPRelease.
6532
6533 2002-08-19 12:50 suerken
6534
6535 * SPRelease: from tincas. WE are now the source code for SPRelease.
6536
6537 Makefile.am: Added script line to install SPRelease.
6538
6539 Doxyfile: No longer generating man, xml, def.
6540
6541 2002-08-15 17:01 suerken
6542
6543 * Adding release signature.
6544
6545 2002-08-15 16:59 suerken
6546
6547 * Automatically regenerated ChangeLog.
6548
6549 2002-08-15 16:59 suerken
6550
6551 * SPRelease syncing for release 0.1.20020815.
6552
6553 2002-08-15 16:43 suerken
6554
6555 * Regex added. Some minor changes.
6556
6557 2002-08-15 14:04 luthien
6558
6559 * * Added files.
6560
6561 2002-08-15 13:14 suerken
6562
6563 * All new sp-util++ project.
6564
6565 2002-08-15 13:07 suerken
6566
6567 * Removing src/.
6568
6569 2002-08-07 10:45 luthien
6570
6571 * Initial revision
6572
0 # Doxyfile 1.8.7
1
2 # This file describes the settings to be used by the documentation system
3 # doxygen (www.doxygen.org) for a project.
4 #
5 # All text after a double hash (##) is considered a comment and is placed in
6 # front of the TAG it is preceding.
7 #
8 # All text after a single hash (#) is considered a comment and will be ignored.
9 # The format is:
10 # TAG = value [value, ...]
11 # For lists, items can also be appended using:
12 # TAG += value [value, ...]
13 # Values that contain spaces should be placed between quotes (\" \").
14
15 #---------------------------------------------------------------------------
16 # Project related configuration options
17 #---------------------------------------------------------------------------
18
19 # This tag specifies the encoding used for all characters in the config file
20 # that follow. The default is UTF-8 which is also the encoding used for all text
21 # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
22 # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
23 # for the list of possible encodings.
24 # The default value is: UTF-8.
25
26 DOXYFILE_ENCODING = UTF-8
27
28 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
29 # double-quotes, unless you are using Doxywizard) that should identify the
30 # project for which the documentation is generated. This name is used in the
31 # title of most generated pages and in a few other places.
32 # The default value is: My Project.
33
34 PROJECT_NAME = @PACKAGE_NAME@
35
36 # The PROJECT_NUMBER tag can be used to enter a project or revision number. This
37 # could be handy for archiving the generated documentation or if some version
38 # control system is used.
39
40 PROJECT_NUMBER = @PACKAGE_VERSION@
41
42 # Using the PROJECT_BRIEF tag one can provide an optional one line description
43 # for a project that appears at the top of each page and should give viewer a
44 # quick idea about the purpose of the project. Keep the description short.
45
46 PROJECT_BRIEF =
47
48 # With the PROJECT_LOGO tag one can specify an logo or icon that is included in
49 # the documentation. The maximum height of the logo should not exceed 55 pixels
50 # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
51 # to the output directory.
52
53 PROJECT_LOGO =
54
55 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
56 # into which the generated documentation will be written. If a relative path is
57 # entered, it will be relative to the location where doxygen was started. If
58 # left blank the current directory will be used.
59
60 OUTPUT_DIRECTORY = autodoc
61
62 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
63 # directories (in 2 levels) under the output directory of each output format and
64 # will distribute the generated files over these directories. Enabling this
65 # option can be useful when feeding doxygen a huge amount of source files, where
66 # putting all generated files in the same directory would otherwise causes
67 # performance problems for the file system.
68 # The default value is: NO.
69
70 CREATE_SUBDIRS = NO
71
72 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
73 # characters to appear in the names of generated files. If set to NO, non-ASCII
74 # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
75 # U+3044.
76 # The default value is: NO.
77
78 ALLOW_UNICODE_NAMES = NO
79
80 # The OUTPUT_LANGUAGE tag is used to specify the language in which all
81 # documentation generated by doxygen is written. Doxygen will use this
82 # information to generate all constant output in the proper language.
83 # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
84 # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
85 # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
86 # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
87 # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
88 # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
89 # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
90 # Ukrainian and Vietnamese.
91 # The default value is: English.
92
93 OUTPUT_LANGUAGE = English
94
95 # If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
96 # descriptions after the members that are listed in the file and class
97 # documentation (similar to Javadoc). Set to NO to disable this.
98 # The default value is: YES.
99
100 BRIEF_MEMBER_DESC = YES
101
102 # If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
103 # description of a member or function before the detailed description
104 #
105 # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
106 # brief descriptions will be completely suppressed.
107 # The default value is: YES.
108
109 REPEAT_BRIEF = YES
110
111 # This tag implements a quasi-intelligent brief description abbreviator that is
112 # used to form the text in various listings. Each string in this list, if found
113 # as the leading text of the brief description, will be stripped from the text
114 # and the result, after processing the whole list, is used as the annotated
115 # text. Otherwise, the brief description is used as-is. If left blank, the
116 # following values are used ($name is automatically replaced with the name of
117 # the entity):The $name class, The $name widget, The $name file, is, provides,
118 # specifies, contains, represents, a, an and the.
119
120 ABBREVIATE_BRIEF =
121
122 # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
123 # doxygen will generate a detailed section even if there is only a brief
124 # description.
125 # The default value is: NO.
126
127 ALWAYS_DETAILED_SEC = NO
128
129 # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
130 # inherited members of a class in the documentation of that class as if those
131 # members were ordinary class members. Constructors, destructors and assignment
132 # operators of the base classes will not be shown.
133 # The default value is: NO.
134
135 INLINE_INHERITED_MEMB = NO
136
137 # If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
138 # before files name in the file list and in the header files. If set to NO the
139 # shortest path that makes the file name unique will be used
140 # The default value is: YES.
141
142 FULL_PATH_NAMES = NO
143
144 # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
145 # Stripping is only done if one of the specified strings matches the left-hand
146 # part of the path. The tag can be used to show relative paths in the file list.
147 # If left blank the directory from which doxygen is run is used as the path to
148 # strip.
149 #
150 # Note that you can specify absolute paths here, but also relative paths, which
151 # will be relative from the directory where doxygen is started.
152 # This tag requires that the tag FULL_PATH_NAMES is set to YES.
153
154 STRIP_FROM_PATH =
155
156 # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
157 # path mentioned in the documentation of a class, which tells the reader which
158 # header file to include in order to use a class. If left blank only the name of
159 # the header file containing the class definition is used. Otherwise one should
160 # specify the list of include paths that are normally passed to the compiler
161 # using the -I flag.
162
163 STRIP_FROM_INC_PATH =
164
165 # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
166 # less readable) file names. This can be useful is your file systems doesn't
167 # support long names like on DOS, Mac, or CD-ROM.
168 # The default value is: NO.
169
170 SHORT_NAMES = NO
171
172 # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
173 # first line (until the first dot) of a Javadoc-style comment as the brief
174 # description. If set to NO, the Javadoc-style will behave just like regular Qt-
175 # style comments (thus requiring an explicit @brief command for a brief
176 # description.)
177 # The default value is: NO.
178
179 JAVADOC_AUTOBRIEF = NO
180
181 # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
182 # line (until the first dot) of a Qt-style comment as the brief description. If
183 # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
184 # requiring an explicit \brief command for a brief description.)
185 # The default value is: NO.
186
187 QT_AUTOBRIEF = NO
188
189 # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
190 # multi-line C++ special comment block (i.e. a block of //! or /// comments) as
191 # a brief description. This used to be the default behavior. The new default is
192 # to treat a multi-line C++ comment block as a detailed description. Set this
193 # tag to YES if you prefer the old behavior instead.
194 #
195 # Note that setting this tag to YES also means that rational rose comments are
196 # not recognized any more.
197 # The default value is: NO.
198
199 MULTILINE_CPP_IS_BRIEF = NO
200
201 # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
202 # documentation from any documented member that it re-implements.
203 # The default value is: YES.
204
205 INHERIT_DOCS = YES
206
207 # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
208 # new page for each member. If set to NO, the documentation of a member will be
209 # part of the file/class/namespace that contains it.
210 # The default value is: NO.
211
212 SEPARATE_MEMBER_PAGES = NO
213
214 # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
215 # uses this value to replace tabs by spaces in code fragments.
216 # Minimum value: 1, maximum value: 16, default value: 4.
217
218 TAB_SIZE = 8
219
220 # This tag can be used to specify a number of aliases that act as commands in
221 # the documentation. An alias has the form:
222 # name=value
223 # For example adding
224 # "sideeffect=@par Side Effects:\n"
225 # will allow you to put the command \sideeffect (or @sideeffect) in the
226 # documentation, which will result in a user-defined paragraph with heading
227 # "Side Effects:". You can put \n's in the value part of an alias to insert
228 # newlines.
229
230 ALIASES =
231
232 # This tag can be used to specify a number of word-keyword mappings (TCL only).
233 # A mapping has the form "name=value". For example adding "class=itcl::class"
234 # will allow you to use the command class in the itcl::class meaning.
235
236 TCL_SUBST =
237
238 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
239 # only. Doxygen will then generate output that is more tailored for C. For
240 # instance, some of the names that are used will be different. The list of all
241 # members will be omitted, etc.
242 # The default value is: NO.
243
244 OPTIMIZE_OUTPUT_FOR_C = YES
245
246 # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
247 # Python sources only. Doxygen will then generate output that is more tailored
248 # for that language. For instance, namespaces will be presented as packages,
249 # qualified scopes will look different, etc.
250 # The default value is: NO.
251
252 OPTIMIZE_OUTPUT_JAVA = NO
253
254 # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
255 # sources. Doxygen will then generate output that is tailored for Fortran.
256 # The default value is: NO.
257
258 OPTIMIZE_FOR_FORTRAN = NO
259
260 # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
261 # sources. Doxygen will then generate output that is tailored for VHDL.
262 # The default value is: NO.
263
264 OPTIMIZE_OUTPUT_VHDL = NO
265
266 # Doxygen selects the parser to use depending on the extension of the files it
267 # parses. With this tag you can assign which parser to use for a given
268 # extension. Doxygen has a built-in mapping, but you can override or extend it
269 # using this tag. The format is ext=language, where ext is a file extension, and
270 # language is one of the parsers supported by doxygen: IDL, Java, Javascript,
271 # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
272 # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
273 # Fortran. In the later case the parser tries to guess whether the code is fixed
274 # or free formatted code, this is the default for Fortran type files), VHDL. For
275 # instance to make doxygen treat .inc files as Fortran files (default is PHP),
276 # and .f files as C (default is Fortran), use: inc=Fortran f=C.
277 #
278 # Note For files without extension you can use no_extension as a placeholder.
279 #
280 # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
281 # the files are not read by doxygen.
282
283 EXTENSION_MAPPING =
284
285 # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
286 # according to the Markdown format, which allows for more readable
287 # documentation. See http://daringfireball.net/projects/markdown/ for details.
288 # The output of markdown processing is further processed by doxygen, so you can
289 # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
290 # case of backward compatibilities issues.
291 # The default value is: YES.
292
293 MARKDOWN_SUPPORT = YES
294
295 # When enabled doxygen tries to link words that correspond to documented
296 # classes, or namespaces to their corresponding documentation. Such a link can
297 # be prevented in individual cases by by putting a % sign in front of the word
298 # or globally by setting AUTOLINK_SUPPORT to NO.
299 # The default value is: YES.
300
301 AUTOLINK_SUPPORT = YES
302
303 # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
304 # to include (a tag file for) the STL sources as input, then you should set this
305 # tag to YES in order to let doxygen match functions declarations and
306 # definitions whose arguments contain STL classes (e.g. func(std::string);
307 # versus func(std::string) {}). This also make the inheritance and collaboration
308 # diagrams that involve STL classes more complete and accurate.
309 # The default value is: NO.
310
311 BUILTIN_STL_SUPPORT = NO
312
313 # If you use Microsoft's C++/CLI language, you should set this option to YES to
314 # enable parsing support.
315 # The default value is: NO.
316
317 CPP_CLI_SUPPORT = NO
318
319 # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
320 # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
321 # will parse them like normal C++ but will assume all classes use public instead
322 # of private inheritance when no explicit protection keyword is present.
323 # The default value is: NO.
324
325 SIP_SUPPORT = NO
326
327 # For Microsoft's IDL there are propget and propput attributes to indicate
328 # getter and setter methods for a property. Setting this option to YES will make
329 # doxygen to replace the get and set methods by a property in the documentation.
330 # This will only work if the methods are indeed getting or setting a simple
331 # type. If this is not the case, or you want to show the methods anyway, you
332 # should set this option to NO.
333 # The default value is: YES.
334
335 IDL_PROPERTY_SUPPORT = YES
336
337 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
338 # tag is set to YES, then doxygen will reuse the documentation of the first
339 # member in the group (if any) for the other members of the group. By default
340 # all members of a group must be documented explicitly.
341 # The default value is: NO.
342
343 DISTRIBUTE_GROUP_DOC = NO
344
345 # Set the SUBGROUPING tag to YES to allow class member groups of the same type
346 # (for instance a group of public functions) to be put as a subgroup of that
347 # type (e.g. under the Public Functions section). Set it to NO to prevent
348 # subgrouping. Alternatively, this can be done per class using the
349 # \nosubgrouping command.
350 # The default value is: YES.
351
352 SUBGROUPING = YES
353
354 # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
355 # are shown inside the group in which they are included (e.g. using \ingroup)
356 # instead of on a separate page (for HTML and Man pages) or section (for LaTeX
357 # and RTF).
358 #
359 # Note that this feature does not work in combination with
360 # SEPARATE_MEMBER_PAGES.
361 # The default value is: NO.
362
363 INLINE_GROUPED_CLASSES = NO
364
365 # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
366 # with only public data fields or simple typedef fields will be shown inline in
367 # the documentation of the scope in which they are defined (i.e. file,
368 # namespace, or group documentation), provided this scope is documented. If set
369 # to NO, structs, classes, and unions are shown on a separate page (for HTML and
370 # Man pages) or section (for LaTeX and RTF).
371 # The default value is: NO.
372
373 INLINE_SIMPLE_STRUCTS = NO
374
375 # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
376 # enum is documented as struct, union, or enum with the name of the typedef. So
377 # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
378 # with name TypeT. When disabled the typedef will appear as a member of a file,
379 # namespace, or class. And the struct will be named TypeS. This can typically be
380 # useful for C code in case the coding convention dictates that all compound
381 # types are typedef'ed and only the typedef is referenced, never the tag name.
382 # The default value is: NO.
383
384 TYPEDEF_HIDES_STRUCT = NO
385
386 # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
387 # cache is used to resolve symbols given their name and scope. Since this can be
388 # an expensive process and often the same symbol appears multiple times in the
389 # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
390 # doxygen will become slower. If the cache is too large, memory is wasted. The
391 # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
392 # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
393 # symbols. At the end of a run doxygen will report the cache usage and suggest
394 # the optimal cache size from a speed point of view.
395 # Minimum value: 0, maximum value: 9, default value: 0.
396
397 LOOKUP_CACHE_SIZE = 0
398
399 #---------------------------------------------------------------------------
400 # Build related configuration options
401 #---------------------------------------------------------------------------
402
403 # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
404 # documentation are documented, even if no documentation was available. Private
405 # class members and static file members will be hidden unless the
406 # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
407 # Note: This will also disable the warnings about undocumented members that are
408 # normally produced when WARNINGS is set to YES.
409 # The default value is: NO.
410
411 EXTRACT_ALL = NO
412
413 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
414 # be included in the documentation.
415 # The default value is: NO.
416
417 EXTRACT_PRIVATE = NO
418
419 # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
420 # scope will be included in the documentation.
421 # The default value is: NO.
422
423 EXTRACT_PACKAGE = NO
424
425 # If the EXTRACT_STATIC tag is set to YES all static members of a file will be
426 # included in the documentation.
427 # The default value is: NO.
428
429 EXTRACT_STATIC = NO
430
431 # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
432 # locally in source files will be included in the documentation. If set to NO
433 # only classes defined in header files are included. Does not have any effect
434 # for Java sources.
435 # The default value is: YES.
436
437 EXTRACT_LOCAL_CLASSES = YES
438
439 # This flag is only useful for Objective-C code. When set to YES local methods,
440 # which are defined in the implementation section but not in the interface are
441 # included in the documentation. If set to NO only methods in the interface are
442 # included.
443 # The default value is: NO.
444
445 EXTRACT_LOCAL_METHODS = NO
446
447 # If this flag is set to YES, the members of anonymous namespaces will be
448 # extracted and appear in the documentation as a namespace called
449 # 'anonymous_namespace{file}', where file will be replaced with the base name of
450 # the file that contains the anonymous namespace. By default anonymous namespace
451 # are hidden.
452 # The default value is: NO.
453
454 EXTRACT_ANON_NSPACES = NO
455
456 # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
457 # undocumented members inside documented classes or files. If set to NO these
458 # members will be included in the various overviews, but no documentation
459 # section is generated. This option has no effect if EXTRACT_ALL is enabled.
460 # The default value is: NO.
461
462 HIDE_UNDOC_MEMBERS = NO
463
464 # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
465 # undocumented classes that are normally visible in the class hierarchy. If set
466 # to NO these classes will be included in the various overviews. This option has
467 # no effect if EXTRACT_ALL is enabled.
468 # The default value is: NO.
469
470 HIDE_UNDOC_CLASSES = NO
471
472 # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
473 # (class|struct|union) declarations. If set to NO these declarations will be
474 # included in the documentation.
475 # The default value is: NO.
476
477 HIDE_FRIEND_COMPOUNDS = NO
478
479 # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
480 # documentation blocks found inside the body of a function. If set to NO these
481 # blocks will be appended to the function's detailed documentation block.
482 # The default value is: NO.
483
484 HIDE_IN_BODY_DOCS = NO
485
486 # The INTERNAL_DOCS tag determines if documentation that is typed after a
487 # \internal command is included. If the tag is set to NO then the documentation
488 # will be excluded. Set it to YES to include the internal documentation.
489 # The default value is: NO.
490
491 INTERNAL_DOCS = NO
492
493 # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
494 # names in lower-case letters. If set to YES upper-case letters are also
495 # allowed. This is useful if you have classes or files whose names only differ
496 # in case and if your file system supports case sensitive file names. Windows
497 # and Mac users are advised to set this option to NO.
498 # The default value is: system dependent.
499
500 CASE_SENSE_NAMES = YES
501
502 # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
503 # their full class and namespace scopes in the documentation. If set to YES the
504 # scope will be hidden.
505 # The default value is: NO.
506
507 HIDE_SCOPE_NAMES = NO
508
509 # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
510 # the files that are included by a file in the documentation of that file.
511 # The default value is: YES.
512
513 SHOW_INCLUDE_FILES = YES
514
515 # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
516 # grouped member an include statement to the documentation, telling the reader
517 # which file to include in order to use the member.
518 # The default value is: NO.
519
520 SHOW_GROUPED_MEMB_INC = NO
521
522 # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
523 # files with double quotes in the documentation rather than with sharp brackets.
524 # The default value is: NO.
525
526 FORCE_LOCAL_INCLUDES = NO
527
528 # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
529 # documentation for inline members.
530 # The default value is: YES.
531
532 INLINE_INFO = YES
533
534 # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
535 # (detailed) documentation of file and class members alphabetically by member
536 # name. If set to NO the members will appear in declaration order.
537 # The default value is: YES.
538
539 SORT_MEMBER_DOCS = YES
540
541 # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
542 # descriptions of file, namespace and class members alphabetically by member
543 # name. If set to NO the members will appear in declaration order. Note that
544 # this will also influence the order of the classes in the class list.
545 # The default value is: NO.
546
547 SORT_BRIEF_DOCS = NO
548
549 # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
550 # (brief and detailed) documentation of class members so that constructors and
551 # destructors are listed first. If set to NO the constructors will appear in the
552 # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
553 # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
554 # member documentation.
555 # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
556 # detailed member documentation.
557 # The default value is: NO.
558
559 SORT_MEMBERS_CTORS_1ST = NO
560
561 # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
562 # of group names into alphabetical order. If set to NO the group names will
563 # appear in their defined order.
564 # The default value is: NO.
565
566 SORT_GROUP_NAMES = NO
567
568 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
569 # fully-qualified names, including namespaces. If set to NO, the class list will
570 # be sorted only by class name, not including the namespace part.
571 # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
572 # Note: This option applies only to the class list, not to the alphabetical
573 # list.
574 # The default value is: NO.
575
576 SORT_BY_SCOPE_NAME = NO
577
578 # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
579 # type resolution of all parameters of a function it will reject a match between
580 # the prototype and the implementation of a member function even if there is
581 # only one candidate or it is obvious which candidate to choose by doing a
582 # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
583 # accept a match between prototype and implementation in such cases.
584 # The default value is: NO.
585
586 STRICT_PROTO_MATCHING = NO
587
588 # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
589 # todo list. This list is created by putting \todo commands in the
590 # documentation.
591 # The default value is: YES.
592
593 GENERATE_TODOLIST = YES
594
595 # The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
596 # test list. This list is created by putting \test commands in the
597 # documentation.
598 # The default value is: YES.
599
600 GENERATE_TESTLIST = YES
601
602 # The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
603 # list. This list is created by putting \bug commands in the documentation.
604 # The default value is: YES.
605
606 GENERATE_BUGLIST = YES
607
608 # The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
609 # the deprecated list. This list is created by putting \deprecated commands in
610 # the documentation.
611 # The default value is: YES.
612
613 GENERATE_DEPRECATEDLIST= YES
614
615 # The ENABLED_SECTIONS tag can be used to enable conditional documentation
616 # sections, marked by \if <section_label> ... \endif and \cond <section_label>
617 # ... \endcond blocks.
618
619 ENABLED_SECTIONS =
620
621 # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
622 # initial value of a variable or macro / define can have for it to appear in the
623 # documentation. If the initializer consists of more lines than specified here
624 # it will be hidden. Use a value of 0 to hide initializers completely. The
625 # appearance of the value of individual variables and macros / defines can be
626 # controlled using \showinitializer or \hideinitializer command in the
627 # documentation regardless of this setting.
628 # Minimum value: 0, maximum value: 10000, default value: 30.
629
630 MAX_INITIALIZER_LINES = 30
631
632 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
633 # the bottom of the documentation of classes and structs. If set to YES the list
634 # will mention the files that were used to generate the documentation.
635 # The default value is: YES.
636
637 SHOW_USED_FILES = YES
638
639 # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
640 # will remove the Files entry from the Quick Index and from the Folder Tree View
641 # (if specified).
642 # The default value is: YES.
643
644 SHOW_FILES = YES
645
646 # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
647 # page. This will remove the Namespaces entry from the Quick Index and from the
648 # Folder Tree View (if specified).
649 # The default value is: YES.
650
651 SHOW_NAMESPACES = YES
652
653 # The FILE_VERSION_FILTER tag can be used to specify a program or script that
654 # doxygen should invoke to get the current version for each file (typically from
655 # the version control system). Doxygen will invoke the program by executing (via
656 # popen()) the command command input-file, where command is the value of the
657 # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
658 # by doxygen. Whatever the program writes to standard output is used as the file
659 # version. For an example see the documentation.
660
661 FILE_VERSION_FILTER =
662
663 # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
664 # by doxygen. The layout file controls the global structure of the generated
665 # output files in an output format independent way. To create the layout file
666 # that represents doxygen's defaults, run doxygen with the -l option. You can
667 # optionally specify a file name after the option, if omitted DoxygenLayout.xml
668 # will be used as the name of the layout file.
669 #
670 # Note that if you run doxygen from a directory containing a file called
671 # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
672 # tag is left empty.
673
674 LAYOUT_FILE =
675
676 # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
677 # the reference definitions. This must be a list of .bib files. The .bib
678 # extension is automatically appended if omitted. This requires the bibtex tool
679 # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
680 # For LaTeX the style of the bibliography can be controlled using
681 # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
682 # search path. Do not use file names with spaces, bibtex cannot handle them. See
683 # also \cite for info how to create references.
684
685 CITE_BIB_FILES =
686
687 #---------------------------------------------------------------------------
688 # Configuration options related to warning and progress messages
689 #---------------------------------------------------------------------------
690
691 # The QUIET tag can be used to turn on/off the messages that are generated to
692 # standard output by doxygen. If QUIET is set to YES this implies that the
693 # messages are off.
694 # The default value is: NO.
695
696 QUIET = YES
697
698 # The WARNINGS tag can be used to turn on/off the warning messages that are
699 # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
700 # this implies that the warnings are on.
701 #
702 # Tip: Turn warnings on while writing the documentation.
703 # The default value is: YES.
704
705 WARNINGS = YES
706
707 # If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
708 # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
709 # will automatically be disabled.
710 # The default value is: YES.
711
712 WARN_IF_UNDOCUMENTED = NO
713
714 # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
715 # potential errors in the documentation, such as not documenting some parameters
716 # in a documented function, or documenting parameters that don't exist or using
717 # markup commands wrongly.
718 # The default value is: YES.
719
720 WARN_IF_DOC_ERROR = YES
721
722 # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
723 # are documented, but have no documentation for their parameters or return
724 # value. If set to NO doxygen will only warn about wrong or incomplete parameter
725 # documentation, but not about the absence of documentation.
726 # The default value is: NO.
727
728 WARN_NO_PARAMDOC = NO
729
730 # The WARN_FORMAT tag determines the format of the warning messages that doxygen
731 # can produce. The string should contain the $file, $line, and $text tags, which
732 # will be replaced by the file and line number from which the warning originated
733 # and the warning text. Optionally the format may contain $version, which will
734 # be replaced by the version of the file (if it could be obtained via
735 # FILE_VERSION_FILTER)
736 # The default value is: $file:$line: $text.
737
738 WARN_FORMAT = "$file:$line: $text"
739
740 # The WARN_LOGFILE tag can be used to specify a file to which warning and error
741 # messages should be written. If left blank the output is written to standard
742 # error (stderr).
743
744 WARN_LOGFILE =
745
746 #---------------------------------------------------------------------------
747 # Configuration options related to the input files
748 #---------------------------------------------------------------------------
749
750 # The INPUT tag is used to specify the files and/or directories that contain
751 # documented source files. You may enter file names like myfile.cpp or
752 # directories like /usr/src/myproject. Separate the files or directories with
753 # spaces.
754 # Note: If this tag is empty the current directory is searched.
755
756 INPUT = @top_srcdir@/src/ui-utilcpp \
757 @top_srcdir@/doc/
758
759 # This tag can be used to specify the character encoding of the source files
760 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
761 # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
762 # documentation (see: http://www.gnu.org/software/libiconv) for the list of
763 # possible encodings.
764 # The default value is: UTF-8.
765
766 INPUT_ENCODING = UTF-8
767
768 # If the value of the INPUT tag contains directories, you can use the
769 # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
770 # *.h) to filter out the source-files in the directories. If left blank the
771 # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
772 # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
773 # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
774 # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
775 # *.qsf, *.as and *.js.
776
777 FILE_PATTERNS = *.hpp \
778 *.cpp \
779 *.doc
780
781 # The RECURSIVE tag can be used to specify whether or not subdirectories should
782 # be searched for input files as well.
783 # The default value is: NO.
784
785 RECURSIVE = YES
786
787 # The EXCLUDE tag can be used to specify files and/or directories that should be
788 # excluded from the INPUT source files. This way you can easily exclude a
789 # subdirectory from a directory tree whose root is specified with the INPUT tag.
790 #
791 # Note that relative paths are relative to the directory from which doxygen is
792 # run.
793
794 EXCLUDE =
795
796 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
797 # directories that are symbolic links (a Unix file system feature) are excluded
798 # from the input.
799 # The default value is: NO.
800
801 EXCLUDE_SYMLINKS = NO
802
803 # If the value of the INPUT tag contains directories, you can use the
804 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
805 # certain files from those directories.
806 #
807 # Note that the wildcards are matched against the file with absolute path, so to
808 # exclude all test directories for example use the pattern */test/*
809
810 EXCLUDE_PATTERNS =
811
812 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
813 # (namespaces, classes, functions, etc.) that should be excluded from the
814 # output. The symbol name can be a fully qualified name, a word, or if the
815 # wildcard * is used, a substring. Examples: ANamespace, AClass,
816 # AClass::ANamespace, ANamespace::*Test
817 #
818 # Note that the wildcards are matched against the file with absolute path, so to
819 # exclude all test directories use the pattern */test/*
820
821 EXCLUDE_SYMBOLS =
822
823 # The EXAMPLE_PATH tag can be used to specify one or more files or directories
824 # that contain example code fragments that are included (see the \include
825 # command).
826
827 EXAMPLE_PATH = @top_srcdir@/src/tools/
828
829 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
830 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
831 # *.h) to filter out the source-files in the directories. If left blank all
832 # files are included.
833
834 EXAMPLE_PATTERNS =
835
836 # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
837 # searched for input files to be used with the \include or \dontinclude commands
838 # irrespective of the value of the RECURSIVE tag.
839 # The default value is: NO.
840
841 EXAMPLE_RECURSIVE = NO
842
843 # The IMAGE_PATH tag can be used to specify one or more files or directories
844 # that contain images that are to be included in the documentation (see the
845 # \image command).
846
847 IMAGE_PATH =
848
849 # The INPUT_FILTER tag can be used to specify a program that doxygen should
850 # invoke to filter for each input file. Doxygen will invoke the filter program
851 # by executing (via popen()) the command:
852 #
853 # <filter> <input-file>
854 #
855 # where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
856 # name of an input file. Doxygen will then use the output that the filter
857 # program writes to standard output. If FILTER_PATTERNS is specified, this tag
858 # will be ignored.
859 #
860 # Note that the filter must not add or remove lines; it is applied before the
861 # code is scanned, but not when the output code is generated. If lines are added
862 # or removed, the anchors will not be placed correctly.
863
864 INPUT_FILTER =
865
866 # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
867 # basis. Doxygen will compare the file name with each pattern and apply the
868 # filter if there is a match. The filters are a list of the form: pattern=filter
869 # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
870 # filters are used. If the FILTER_PATTERNS tag is empty or if none of the
871 # patterns match the file name, INPUT_FILTER is applied.
872
873 FILTER_PATTERNS =
874
875 # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
876 # INPUT_FILTER ) will also be used to filter the input files that are used for
877 # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
878 # The default value is: NO.
879
880 FILTER_SOURCE_FILES = NO
881
882 # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
883 # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
884 # it is also possible to disable source filtering for a specific pattern using
885 # *.ext= (so without naming a filter).
886 # This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
887
888 FILTER_SOURCE_PATTERNS =
889
890 # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
891 # is part of the input, its contents will be placed on the main page
892 # (index.html). This can be useful if you have a project on for instance GitHub
893 # and want to reuse the introduction page also for the doxygen output.
894
895 USE_MDFILE_AS_MAINPAGE =
896
897 #---------------------------------------------------------------------------
898 # Configuration options related to source browsing
899 #---------------------------------------------------------------------------
900
901 # If the SOURCE_BROWSER tag is set to YES then a list of source files will be
902 # generated. Documented entities will be cross-referenced with these sources.
903 #
904 # Note: To get rid of all source code in the generated output, make sure that
905 # also VERBATIM_HEADERS is set to NO.
906 # The default value is: NO.
907
908 SOURCE_BROWSER = NO
909
910 # Setting the INLINE_SOURCES tag to YES will include the body of functions,
911 # classes and enums directly into the documentation.
912 # The default value is: NO.
913
914 INLINE_SOURCES = NO
915
916 # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
917 # special comment blocks from generated source code fragments. Normal C, C++ and
918 # Fortran comments will always remain visible.
919 # The default value is: YES.
920
921 STRIP_CODE_COMMENTS = YES
922
923 # If the REFERENCED_BY_RELATION tag is set to YES then for each documented
924 # function all documented functions referencing it will be listed.
925 # The default value is: NO.
926
927 REFERENCED_BY_RELATION = YES
928
929 # If the REFERENCES_RELATION tag is set to YES then for each documented function
930 # all documented entities called/used by that function will be listed.
931 # The default value is: NO.
932
933 REFERENCES_RELATION = YES
934
935 # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
936 # to YES, then the hyperlinks from functions in REFERENCES_RELATION and
937 # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
938 # link to the documentation.
939 # The default value is: YES.
940
941 REFERENCES_LINK_SOURCE = YES
942
943 # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
944 # source code will show a tooltip with additional information such as prototype,
945 # brief description and links to the definition and documentation. Since this
946 # will make the HTML file larger and loading of large files a bit slower, you
947 # can opt to disable this feature.
948 # The default value is: YES.
949 # This tag requires that the tag SOURCE_BROWSER is set to YES.
950
951 SOURCE_TOOLTIPS = YES
952
953 # If the USE_HTAGS tag is set to YES then the references to source code will
954 # point to the HTML generated by the htags(1) tool instead of doxygen built-in
955 # source browser. The htags tool is part of GNU's global source tagging system
956 # (see http://www.gnu.org/software/global/global.html). You will need version
957 # 4.8.6 or higher.
958 #
959 # To use it do the following:
960 # - Install the latest version of global
961 # - Enable SOURCE_BROWSER and USE_HTAGS in the config file
962 # - Make sure the INPUT points to the root of the source tree
963 # - Run doxygen as normal
964 #
965 # Doxygen will invoke htags (and that will in turn invoke gtags), so these
966 # tools must be available from the command line (i.e. in the search path).
967 #
968 # The result: instead of the source browser generated by doxygen, the links to
969 # source code will now point to the output of htags.
970 # The default value is: NO.
971 # This tag requires that the tag SOURCE_BROWSER is set to YES.
972
973 USE_HTAGS = NO
974
975 # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
976 # verbatim copy of the header file for each class for which an include is
977 # specified. Set to NO to disable this.
978 # See also: Section \class.
979 # The default value is: YES.
980
981 VERBATIM_HEADERS = NO
982
983 #---------------------------------------------------------------------------
984 # Configuration options related to the alphabetical class index
985 #---------------------------------------------------------------------------
986
987 # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
988 # compounds will be generated. Enable this if the project contains a lot of
989 # classes, structs, unions or interfaces.
990 # The default value is: YES.
991
992 ALPHABETICAL_INDEX = YES
993
994 # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
995 # which the alphabetical index list will be split.
996 # Minimum value: 1, maximum value: 20, default value: 5.
997 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
998
999 COLS_IN_ALPHA_INDEX = 5
1000
1001 # In case all classes in a project start with a common prefix, all classes will
1002 # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
1003 # can be used to specify a prefix (or a list of prefixes) that should be ignored
1004 # while generating the index headers.
1005 # This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
1006
1007 IGNORE_PREFIX =
1008
1009 #---------------------------------------------------------------------------
1010 # Configuration options related to the HTML output
1011 #---------------------------------------------------------------------------
1012
1013 # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
1014 # The default value is: YES.
1015
1016 GENERATE_HTML = YES
1017
1018 # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
1019 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1020 # it.
1021 # The default directory is: html.
1022 # This tag requires that the tag GENERATE_HTML is set to YES.
1023
1024 HTML_OUTPUT = html
1025
1026 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
1027 # generated HTML page (for example: .htm, .php, .asp).
1028 # The default value is: .html.
1029 # This tag requires that the tag GENERATE_HTML is set to YES.
1030
1031 HTML_FILE_EXTENSION = .html
1032
1033 # The HTML_HEADER tag can be used to specify a user-defined HTML header file for
1034 # each generated HTML page. If the tag is left blank doxygen will generate a
1035 # standard header.
1036 #
1037 # To get valid HTML the header file that includes any scripts and style sheets
1038 # that doxygen needs, which is dependent on the configuration options used (e.g.
1039 # the setting GENERATE_TREEVIEW). It is highly recommended to start with a
1040 # default header using
1041 # doxygen -w html new_header.html new_footer.html new_stylesheet.css
1042 # YourConfigFile
1043 # and then modify the file new_header.html. See also section "Doxygen usage"
1044 # for information on how to generate the default header that doxygen normally
1045 # uses.
1046 # Note: The header is subject to change so you typically have to regenerate the
1047 # default header when upgrading to a newer version of doxygen. For a description
1048 # of the possible markers and block names see the documentation.
1049 # This tag requires that the tag GENERATE_HTML is set to YES.
1050
1051 HTML_HEADER =
1052
1053 # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
1054 # generated HTML page. If the tag is left blank doxygen will generate a standard
1055 # footer. See HTML_HEADER for more information on how to generate a default
1056 # footer and what special commands can be used inside the footer. See also
1057 # section "Doxygen usage" for information on how to generate the default footer
1058 # that doxygen normally uses.
1059 # This tag requires that the tag GENERATE_HTML is set to YES.
1060
1061 HTML_FOOTER =
1062
1063 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
1064 # sheet that is used by each HTML page. It can be used to fine-tune the look of
1065 # the HTML output. If left blank doxygen will generate a default style sheet.
1066 # See also section "Doxygen usage" for information on how to generate the style
1067 # sheet that doxygen normally uses.
1068 # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
1069 # it is more robust and this tag (HTML_STYLESHEET) will in the future become
1070 # obsolete.
1071 # This tag requires that the tag GENERATE_HTML is set to YES.
1072
1073 HTML_STYLESHEET =
1074
1075 # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
1076 # defined cascading style sheet that is included after the standard style sheets
1077 # created by doxygen. Using this option one can overrule certain style aspects.
1078 # This is preferred over using HTML_STYLESHEET since it does not replace the
1079 # standard style sheet and is therefor more robust against future updates.
1080 # Doxygen will copy the style sheet file to the output directory. For an example
1081 # see the documentation.
1082 # This tag requires that the tag GENERATE_HTML is set to YES.
1083
1084 HTML_EXTRA_STYLESHEET =
1085
1086 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
1087 # other source files which should be copied to the HTML output directory. Note
1088 # that these files will be copied to the base HTML output directory. Use the
1089 # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
1090 # files. In the HTML_STYLESHEET file, use the file name only. Also note that the
1091 # files will be copied as-is; there are no commands or markers available.
1092 # This tag requires that the tag GENERATE_HTML is set to YES.
1093
1094 HTML_EXTRA_FILES =
1095
1096 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
1097 # will adjust the colors in the stylesheet and background images according to
1098 # this color. Hue is specified as an angle on a colorwheel, see
1099 # http://en.wikipedia.org/wiki/Hue for more information. For instance the value
1100 # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
1101 # purple, and 360 is red again.
1102 # Minimum value: 0, maximum value: 359, default value: 220.
1103 # This tag requires that the tag GENERATE_HTML is set to YES.
1104
1105 HTML_COLORSTYLE_HUE = 220
1106
1107 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
1108 # in the HTML output. For a value of 0 the output will use grayscales only. A
1109 # value of 255 will produce the most vivid colors.
1110 # Minimum value: 0, maximum value: 255, default value: 100.
1111 # This tag requires that the tag GENERATE_HTML is set to YES.
1112
1113 HTML_COLORSTYLE_SAT = 100
1114
1115 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
1116 # luminance component of the colors in the HTML output. Values below 100
1117 # gradually make the output lighter, whereas values above 100 make the output
1118 # darker. The value divided by 100 is the actual gamma applied, so 80 represents
1119 # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
1120 # change the gamma.
1121 # Minimum value: 40, maximum value: 240, default value: 80.
1122 # This tag requires that the tag GENERATE_HTML is set to YES.
1123
1124 HTML_COLORSTYLE_GAMMA = 80
1125
1126 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1127 # page will contain the date and time when the page was generated. Setting this
1128 # to NO can help when comparing the output of multiple runs.
1129 # The default value is: YES.
1130 # This tag requires that the tag GENERATE_HTML is set to YES.
1131
1132 HTML_TIMESTAMP = YES
1133
1134 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
1135 # documentation will contain sections that can be hidden and shown after the
1136 # page has loaded.
1137 # The default value is: NO.
1138 # This tag requires that the tag GENERATE_HTML is set to YES.
1139
1140 HTML_DYNAMIC_SECTIONS = NO
1141
1142 # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
1143 # shown in the various tree structured indices initially; the user can expand
1144 # and collapse entries dynamically later on. Doxygen will expand the tree to
1145 # such a level that at most the specified number of entries are visible (unless
1146 # a fully collapsed tree already exceeds this amount). So setting the number of
1147 # entries 1 will produce a full collapsed tree by default. 0 is a special value
1148 # representing an infinite number of entries and will result in a full expanded
1149 # tree by default.
1150 # Minimum value: 0, maximum value: 9999, default value: 100.
1151 # This tag requires that the tag GENERATE_HTML is set to YES.
1152
1153 HTML_INDEX_NUM_ENTRIES = 100
1154
1155 # If the GENERATE_DOCSET tag is set to YES, additional index files will be
1156 # generated that can be used as input for Apple's Xcode 3 integrated development
1157 # environment (see: http://developer.apple.com/tools/xcode/), introduced with
1158 # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
1159 # Makefile in the HTML output directory. Running make will produce the docset in
1160 # that directory and running make install will install the docset in
1161 # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
1162 # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
1163 # for more information.
1164 # The default value is: NO.
1165 # This tag requires that the tag GENERATE_HTML is set to YES.
1166
1167 GENERATE_DOCSET = NO
1168
1169 # This tag determines the name of the docset feed. A documentation feed provides
1170 # an umbrella under which multiple documentation sets from a single provider
1171 # (such as a company or product suite) can be grouped.
1172 # The default value is: Doxygen generated docs.
1173 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1174
1175 DOCSET_FEEDNAME = "Doxygen generated docs"
1176
1177 # This tag specifies a string that should uniquely identify the documentation
1178 # set bundle. This should be a reverse domain-name style string, e.g.
1179 # com.mycompany.MyDocSet. Doxygen will append .docset to the name.
1180 # The default value is: org.doxygen.Project.
1181 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1182
1183 DOCSET_BUNDLE_ID = org.doxygen.Project
1184
1185 # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
1186 # the documentation publisher. This should be a reverse domain-name style
1187 # string, e.g. com.mycompany.MyDocSet.documentation.
1188 # The default value is: org.doxygen.Publisher.
1189 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1190
1191 DOCSET_PUBLISHER_ID = org.doxygen.Publisher
1192
1193 # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
1194 # The default value is: Publisher.
1195 # This tag requires that the tag GENERATE_DOCSET is set to YES.
1196
1197 DOCSET_PUBLISHER_NAME = Publisher
1198
1199 # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
1200 # additional HTML index files: index.hhp, index.hhc, and index.hhk. The
1201 # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
1202 # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
1203 # Windows.
1204 #
1205 # The HTML Help Workshop contains a compiler that can convert all HTML output
1206 # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
1207 # files are now used as the Windows 98 help format, and will replace the old
1208 # Windows help format (.hlp) on all Windows platforms in the future. Compressed
1209 # HTML files also contain an index, a table of contents, and you can search for
1210 # words in the documentation. The HTML workshop also contains a viewer for
1211 # compressed HTML files.
1212 # The default value is: NO.
1213 # This tag requires that the tag GENERATE_HTML is set to YES.
1214
1215 GENERATE_HTMLHELP = NO
1216
1217 # The CHM_FILE tag can be used to specify the file name of the resulting .chm
1218 # file. You can add a path in front of the file if the result should not be
1219 # written to the html output directory.
1220 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1221
1222 CHM_FILE =
1223
1224 # The HHC_LOCATION tag can be used to specify the location (absolute path
1225 # including file name) of the HTML help compiler ( hhc.exe). If non-empty
1226 # doxygen will try to run the HTML help compiler on the generated index.hhp.
1227 # The file has to be specified with full path.
1228 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1229
1230 HHC_LOCATION =
1231
1232 # The GENERATE_CHI flag controls if a separate .chi index file is generated (
1233 # YES) or that it should be included in the master .chm file ( NO).
1234 # The default value is: NO.
1235 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1236
1237 GENERATE_CHI = NO
1238
1239 # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
1240 # and project file content.
1241 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1242
1243 CHM_INDEX_ENCODING =
1244
1245 # The BINARY_TOC flag controls whether a binary table of contents is generated (
1246 # YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
1247 # enables the Previous and Next buttons.
1248 # The default value is: NO.
1249 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1250
1251 BINARY_TOC = NO
1252
1253 # The TOC_EXPAND flag can be set to YES to add extra items for group members to
1254 # the table of contents of the HTML help documentation and to the tree view.
1255 # The default value is: NO.
1256 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
1257
1258 TOC_EXPAND = NO
1259
1260 # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1261 # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
1262 # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
1263 # (.qch) of the generated HTML documentation.
1264 # The default value is: NO.
1265 # This tag requires that the tag GENERATE_HTML is set to YES.
1266
1267 GENERATE_QHP = NO
1268
1269 # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
1270 # the file name of the resulting .qch file. The path specified is relative to
1271 # the HTML output folder.
1272 # This tag requires that the tag GENERATE_QHP is set to YES.
1273
1274 QCH_FILE =
1275
1276 # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
1277 # Project output. For more information please see Qt Help Project / Namespace
1278 # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
1279 # The default value is: org.doxygen.Project.
1280 # This tag requires that the tag GENERATE_QHP is set to YES.
1281
1282 QHP_NAMESPACE = org.doxygen.Project
1283
1284 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
1285 # Help Project output. For more information please see Qt Help Project / Virtual
1286 # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
1287 # folders).
1288 # The default value is: doc.
1289 # This tag requires that the tag GENERATE_QHP is set to YES.
1290
1291 QHP_VIRTUAL_FOLDER = doc
1292
1293 # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
1294 # filter to add. For more information please see Qt Help Project / Custom
1295 # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1296 # filters).
1297 # This tag requires that the tag GENERATE_QHP is set to YES.
1298
1299 QHP_CUST_FILTER_NAME =
1300
1301 # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
1302 # custom filter to add. For more information please see Qt Help Project / Custom
1303 # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
1304 # filters).
1305 # This tag requires that the tag GENERATE_QHP is set to YES.
1306
1307 QHP_CUST_FILTER_ATTRS =
1308
1309 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1310 # project's filter section matches. Qt Help Project / Filter Attributes (see:
1311 # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
1312 # This tag requires that the tag GENERATE_QHP is set to YES.
1313
1314 QHP_SECT_FILTER_ATTRS =
1315
1316 # The QHG_LOCATION tag can be used to specify the location of Qt's
1317 # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
1318 # generated .qhp file.
1319 # This tag requires that the tag GENERATE_QHP is set to YES.
1320
1321 QHG_LOCATION =
1322
1323 # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
1324 # generated, together with the HTML files, they form an Eclipse help plugin. To
1325 # install this plugin and make it available under the help contents menu in
1326 # Eclipse, the contents of the directory containing the HTML and XML files needs
1327 # to be copied into the plugins directory of eclipse. The name of the directory
1328 # within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
1329 # After copying Eclipse needs to be restarted before the help appears.
1330 # The default value is: NO.
1331 # This tag requires that the tag GENERATE_HTML is set to YES.
1332
1333 GENERATE_ECLIPSEHELP = NO
1334
1335 # A unique identifier for the Eclipse help plugin. When installing the plugin
1336 # the directory name containing the HTML and XML files should also have this
1337 # name. Each documentation set should have its own identifier.
1338 # The default value is: org.doxygen.Project.
1339 # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
1340
1341 ECLIPSE_DOC_ID = org.doxygen.Project
1342
1343 # If you want full control over the layout of the generated HTML pages it might
1344 # be necessary to disable the index and replace it with your own. The
1345 # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
1346 # of each HTML page. A value of NO enables the index and the value YES disables
1347 # it. Since the tabs in the index contain the same information as the navigation
1348 # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
1349 # The default value is: NO.
1350 # This tag requires that the tag GENERATE_HTML is set to YES.
1351
1352 DISABLE_INDEX = NO
1353
1354 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1355 # structure should be generated to display hierarchical information. If the tag
1356 # value is set to YES, a side panel will be generated containing a tree-like
1357 # index structure (just like the one that is generated for HTML Help). For this
1358 # to work a browser that supports JavaScript, DHTML, CSS and frames is required
1359 # (i.e. any modern browser). Windows users are probably better off using the
1360 # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
1361 # further fine-tune the look of the index. As an example, the default style
1362 # sheet generated by doxygen has an example that shows how to put an image at
1363 # the root of the tree instead of the PROJECT_NAME. Since the tree basically has
1364 # the same information as the tab index, you could consider setting
1365 # DISABLE_INDEX to YES when enabling this option.
1366 # The default value is: NO.
1367 # This tag requires that the tag GENERATE_HTML is set to YES.
1368
1369 GENERATE_TREEVIEW = NO
1370
1371 # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
1372 # doxygen will group on one line in the generated HTML documentation.
1373 #
1374 # Note that a value of 0 will completely suppress the enum values from appearing
1375 # in the overview section.
1376 # Minimum value: 0, maximum value: 20, default value: 4.
1377 # This tag requires that the tag GENERATE_HTML is set to YES.
1378
1379 ENUM_VALUES_PER_LINE = 4
1380
1381 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
1382 # to set the initial width (in pixels) of the frame in which the tree is shown.
1383 # Minimum value: 0, maximum value: 1500, default value: 250.
1384 # This tag requires that the tag GENERATE_HTML is set to YES.
1385
1386 TREEVIEW_WIDTH = 250
1387
1388 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
1389 # external symbols imported via tag files in a separate window.
1390 # The default value is: NO.
1391 # This tag requires that the tag GENERATE_HTML is set to YES.
1392
1393 EXT_LINKS_IN_WINDOW = NO
1394
1395 # Use this tag to change the font size of LaTeX formulas included as images in
1396 # the HTML documentation. When you change the font size after a successful
1397 # doxygen run you need to manually remove any form_*.png images from the HTML
1398 # output directory to force them to be regenerated.
1399 # Minimum value: 8, maximum value: 50, default value: 10.
1400 # This tag requires that the tag GENERATE_HTML is set to YES.
1401
1402 FORMULA_FONTSIZE = 10
1403
1404 # Use the FORMULA_TRANPARENT tag to determine whether or not the images
1405 # generated for formulas are transparent PNGs. Transparent PNGs are not
1406 # supported properly for IE 6.0, but are supported on all modern browsers.
1407 #
1408 # Note that when changing this option you need to delete any form_*.png files in
1409 # the HTML output directory before the changes have effect.
1410 # The default value is: YES.
1411 # This tag requires that the tag GENERATE_HTML is set to YES.
1412
1413 FORMULA_TRANSPARENT = YES
1414
1415 # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
1416 # http://www.mathjax.org) which uses client side Javascript for the rendering
1417 # instead of using prerendered bitmaps. Use this if you do not have LaTeX
1418 # installed or if you want to formulas look prettier in the HTML output. When
1419 # enabled you may also need to install MathJax separately and configure the path
1420 # to it using the MATHJAX_RELPATH option.
1421 # The default value is: NO.
1422 # This tag requires that the tag GENERATE_HTML is set to YES.
1423
1424 USE_MATHJAX = NO
1425
1426 # When MathJax is enabled you can set the default output format to be used for
1427 # the MathJax output. See the MathJax site (see:
1428 # http://docs.mathjax.org/en/latest/output.html) for more details.
1429 # Possible values are: HTML-CSS (which is slower, but has the best
1430 # compatibility), NativeMML (i.e. MathML) and SVG.
1431 # The default value is: HTML-CSS.
1432 # This tag requires that the tag USE_MATHJAX is set to YES.
1433
1434 MATHJAX_FORMAT = HTML-CSS
1435
1436 # When MathJax is enabled you need to specify the location relative to the HTML
1437 # output directory using the MATHJAX_RELPATH option. The destination directory
1438 # should contain the MathJax.js script. For instance, if the mathjax directory
1439 # is located at the same level as the HTML output directory, then
1440 # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
1441 # Content Delivery Network so you can quickly see the result without installing
1442 # MathJax. However, it is strongly recommended to install a local copy of
1443 # MathJax from http://www.mathjax.org before deployment.
1444 # The default value is: http://cdn.mathjax.org/mathjax/latest.
1445 # This tag requires that the tag USE_MATHJAX is set to YES.
1446
1447 MATHJAX_RELPATH = http://www.mathjax.org/mathjax
1448
1449 # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
1450 # extension names that should be enabled during MathJax rendering. For example
1451 # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
1452 # This tag requires that the tag USE_MATHJAX is set to YES.
1453
1454 MATHJAX_EXTENSIONS =
1455
1456 # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
1457 # of code that will be used on startup of the MathJax code. See the MathJax site
1458 # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
1459 # example see the documentation.
1460 # This tag requires that the tag USE_MATHJAX is set to YES.
1461
1462 MATHJAX_CODEFILE =
1463
1464 # When the SEARCHENGINE tag is enabled doxygen will generate a search box for
1465 # the HTML output. The underlying search engine uses javascript and DHTML and
1466 # should work on any modern browser. Note that when using HTML help
1467 # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
1468 # there is already a search function so this one should typically be disabled.
1469 # For large projects the javascript based search engine can be slow, then
1470 # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
1471 # search using the keyboard; to jump to the search box use <access key> + S
1472 # (what the <access key> is depends on the OS and browser, but it is typically
1473 # <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
1474 # key> to jump into the search results window, the results can be navigated
1475 # using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
1476 # the search. The filter options can be selected when the cursor is inside the
1477 # search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
1478 # to select a filter and <Enter> or <escape> to activate or cancel the filter
1479 # option.
1480 # The default value is: YES.
1481 # This tag requires that the tag GENERATE_HTML is set to YES.
1482
1483 SEARCHENGINE = NO
1484
1485 # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1486 # implemented using a web server instead of a web client using Javascript. There
1487 # are two flavors of web server based searching depending on the EXTERNAL_SEARCH
1488 # setting. When disabled, doxygen will generate a PHP script for searching and
1489 # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
1490 # and searching needs to be provided by external tools. See the section
1491 # "External Indexing and Searching" for details.
1492 # The default value is: NO.
1493 # This tag requires that the tag SEARCHENGINE is set to YES.
1494
1495 SERVER_BASED_SEARCH = NO
1496
1497 # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
1498 # script for searching. Instead the search results are written to an XML file
1499 # which needs to be processed by an external indexer. Doxygen will invoke an
1500 # external search engine pointed to by the SEARCHENGINE_URL option to obtain the
1501 # search results.
1502 #
1503 # Doxygen ships with an example indexer ( doxyindexer) and search engine
1504 # (doxysearch.cgi) which are based on the open source search engine library
1505 # Xapian (see: http://xapian.org/).
1506 #
1507 # See the section "External Indexing and Searching" for details.
1508 # The default value is: NO.
1509 # This tag requires that the tag SEARCHENGINE is set to YES.
1510
1511 EXTERNAL_SEARCH = NO
1512
1513 # The SEARCHENGINE_URL should point to a search engine hosted by a web server
1514 # which will return the search results when EXTERNAL_SEARCH is enabled.
1515 #
1516 # Doxygen ships with an example indexer ( doxyindexer) and search engine
1517 # (doxysearch.cgi) which are based on the open source search engine library
1518 # Xapian (see: http://xapian.org/). See the section "External Indexing and
1519 # Searching" for details.
1520 # This tag requires that the tag SEARCHENGINE is set to YES.
1521
1522 SEARCHENGINE_URL =
1523
1524 # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
1525 # search data is written to a file for indexing by an external tool. With the
1526 # SEARCHDATA_FILE tag the name of this file can be specified.
1527 # The default file is: searchdata.xml.
1528 # This tag requires that the tag SEARCHENGINE is set to YES.
1529
1530 SEARCHDATA_FILE = searchdata.xml
1531
1532 # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
1533 # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
1534 # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
1535 # projects and redirect the results back to the right project.
1536 # This tag requires that the tag SEARCHENGINE is set to YES.
1537
1538 EXTERNAL_SEARCH_ID =
1539
1540 # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
1541 # projects other than the one defined by this configuration file, but that are
1542 # all added to the same external search index. Each project needs to have a
1543 # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
1544 # to a relative location where the documentation can be found. The format is:
1545 # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
1546 # This tag requires that the tag SEARCHENGINE is set to YES.
1547
1548 EXTRA_SEARCH_MAPPINGS =
1549
1550 #---------------------------------------------------------------------------
1551 # Configuration options related to the LaTeX output
1552 #---------------------------------------------------------------------------
1553
1554 # If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
1555 # The default value is: YES.
1556
1557 GENERATE_LATEX = NO
1558
1559 # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
1560 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1561 # it.
1562 # The default directory is: latex.
1563 # This tag requires that the tag GENERATE_LATEX is set to YES.
1564
1565 LATEX_OUTPUT = latex
1566
1567 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1568 # invoked.
1569 #
1570 # Note that when enabling USE_PDFLATEX this option is only used for generating
1571 # bitmaps for formulas in the HTML output, but not in the Makefile that is
1572 # written to the output directory.
1573 # The default file is: latex.
1574 # This tag requires that the tag GENERATE_LATEX is set to YES.
1575
1576 LATEX_CMD_NAME = latex
1577
1578 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
1579 # index for LaTeX.
1580 # The default file is: makeindex.
1581 # This tag requires that the tag GENERATE_LATEX is set to YES.
1582
1583 MAKEINDEX_CMD_NAME = makeindex
1584
1585 # If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
1586 # documents. This may be useful for small projects and may help to save some
1587 # trees in general.
1588 # The default value is: NO.
1589 # This tag requires that the tag GENERATE_LATEX is set to YES.
1590
1591 COMPACT_LATEX = NO
1592
1593 # The PAPER_TYPE tag can be used to set the paper type that is used by the
1594 # printer.
1595 # Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
1596 # 14 inches) and executive (7.25 x 10.5 inches).
1597 # The default value is: a4.
1598 # This tag requires that the tag GENERATE_LATEX is set to YES.
1599
1600 PAPER_TYPE = a4wide
1601
1602 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
1603 # that should be included in the LaTeX output. To get the times font for
1604 # instance you can specify
1605 # EXTRA_PACKAGES=times
1606 # If left blank no extra packages will be included.
1607 # This tag requires that the tag GENERATE_LATEX is set to YES.
1608
1609 EXTRA_PACKAGES =
1610
1611 # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
1612 # generated LaTeX document. The header should contain everything until the first
1613 # chapter. If it is left blank doxygen will generate a standard header. See
1614 # section "Doxygen usage" for information on how to let doxygen write the
1615 # default header to a separate file.
1616 #
1617 # Note: Only use a user-defined header if you know what you are doing! The
1618 # following commands have a special meaning inside the header: $title,
1619 # $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
1620 # replace them by respectively the title of the page, the current date and time,
1621 # only the current date, the version number of doxygen, the project name (see
1622 # PROJECT_NAME), or the project number (see PROJECT_NUMBER).
1623 # This tag requires that the tag GENERATE_LATEX is set to YES.
1624
1625 LATEX_HEADER =
1626
1627 # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
1628 # generated LaTeX document. The footer should contain everything after the last
1629 # chapter. If it is left blank doxygen will generate a standard footer.
1630 #
1631 # Note: Only use a user-defined footer if you know what you are doing!
1632 # This tag requires that the tag GENERATE_LATEX is set to YES.
1633
1634 LATEX_FOOTER =
1635
1636 # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
1637 # other source files which should be copied to the LATEX_OUTPUT output
1638 # directory. Note that the files will be copied as-is; there are no commands or
1639 # markers available.
1640 # This tag requires that the tag GENERATE_LATEX is set to YES.
1641
1642 LATEX_EXTRA_FILES =
1643
1644 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
1645 # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
1646 # contain links (just like the HTML output) instead of page references. This
1647 # makes the output suitable for online browsing using a PDF viewer.
1648 # The default value is: YES.
1649 # This tag requires that the tag GENERATE_LATEX is set to YES.
1650
1651 PDF_HYPERLINKS = NO
1652
1653 # If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
1654 # the PDF file directly from the LaTeX files. Set this option to YES to get a
1655 # higher quality PDF documentation.
1656 # The default value is: YES.
1657 # This tag requires that the tag GENERATE_LATEX is set to YES.
1658
1659 USE_PDFLATEX = NO
1660
1661 # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
1662 # command to the generated LaTeX files. This will instruct LaTeX to keep running
1663 # if errors occur, instead of asking the user for help. This option is also used
1664 # when generating formulas in HTML.
1665 # The default value is: NO.
1666 # This tag requires that the tag GENERATE_LATEX is set to YES.
1667
1668 LATEX_BATCHMODE = NO
1669
1670 # If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
1671 # index chapters (such as File Index, Compound Index, etc.) in the output.
1672 # The default value is: NO.
1673 # This tag requires that the tag GENERATE_LATEX is set to YES.
1674
1675 LATEX_HIDE_INDICES = NO
1676
1677 # If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
1678 # code with syntax highlighting in the LaTeX output.
1679 #
1680 # Note that which sources are shown also depends on other settings such as
1681 # SOURCE_BROWSER.
1682 # The default value is: NO.
1683 # This tag requires that the tag GENERATE_LATEX is set to YES.
1684
1685 LATEX_SOURCE_CODE = NO
1686
1687 # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1688 # bibliography, e.g. plainnat, or ieeetr. See
1689 # http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
1690 # The default value is: plain.
1691 # This tag requires that the tag GENERATE_LATEX is set to YES.
1692
1693 LATEX_BIB_STYLE = plain
1694
1695 #---------------------------------------------------------------------------
1696 # Configuration options related to the RTF output
1697 #---------------------------------------------------------------------------
1698
1699 # If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
1700 # RTF output is optimized for Word 97 and may not look too pretty with other RTF
1701 # readers/editors.
1702 # The default value is: NO.
1703
1704 GENERATE_RTF = NO
1705
1706 # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
1707 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1708 # it.
1709 # The default directory is: rtf.
1710 # This tag requires that the tag GENERATE_RTF is set to YES.
1711
1712 RTF_OUTPUT = rtf
1713
1714 # If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
1715 # documents. This may be useful for small projects and may help to save some
1716 # trees in general.
1717 # The default value is: NO.
1718 # This tag requires that the tag GENERATE_RTF is set to YES.
1719
1720 COMPACT_RTF = NO
1721
1722 # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
1723 # contain hyperlink fields. The RTF file will contain links (just like the HTML
1724 # output) instead of page references. This makes the output suitable for online
1725 # browsing using Word or some other Word compatible readers that support those
1726 # fields.
1727 #
1728 # Note: WordPad (write) and others do not support links.
1729 # The default value is: NO.
1730 # This tag requires that the tag GENERATE_RTF is set to YES.
1731
1732 RTF_HYPERLINKS = NO
1733
1734 # Load stylesheet definitions from file. Syntax is similar to doxygen's config
1735 # file, i.e. a series of assignments. You only have to provide replacements,
1736 # missing definitions are set to their default value.
1737 #
1738 # See also section "Doxygen usage" for information on how to generate the
1739 # default style sheet that doxygen normally uses.
1740 # This tag requires that the tag GENERATE_RTF is set to YES.
1741
1742 RTF_STYLESHEET_FILE =
1743
1744 # Set optional variables used in the generation of an RTF document. Syntax is
1745 # similar to doxygen's config file. A template extensions file can be generated
1746 # using doxygen -e rtf extensionFile.
1747 # This tag requires that the tag GENERATE_RTF is set to YES.
1748
1749 RTF_EXTENSIONS_FILE =
1750
1751 #---------------------------------------------------------------------------
1752 # Configuration options related to the man page output
1753 #---------------------------------------------------------------------------
1754
1755 # If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
1756 # classes and files.
1757 # The default value is: NO.
1758
1759 GENERATE_MAN = NO
1760
1761 # The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
1762 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1763 # it. A directory man3 will be created inside the directory specified by
1764 # MAN_OUTPUT.
1765 # The default directory is: man.
1766 # This tag requires that the tag GENERATE_MAN is set to YES.
1767
1768 MAN_OUTPUT = man
1769
1770 # The MAN_EXTENSION tag determines the extension that is added to the generated
1771 # man pages. In case the manual section does not start with a number, the number
1772 # 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
1773 # optional.
1774 # The default value is: .3.
1775 # This tag requires that the tag GENERATE_MAN is set to YES.
1776
1777 MAN_EXTENSION = .3
1778
1779 # The MAN_SUBDIR tag determines the name of the directory created within
1780 # MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
1781 # MAN_EXTENSION with the initial . removed.
1782 # This tag requires that the tag GENERATE_MAN is set to YES.
1783
1784 MAN_SUBDIR =
1785
1786 # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
1787 # will generate one additional man file for each entity documented in the real
1788 # man page(s). These additional files only source the real man page, but without
1789 # them the man command would be unable to find the correct page.
1790 # The default value is: NO.
1791 # This tag requires that the tag GENERATE_MAN is set to YES.
1792
1793 MAN_LINKS = YES
1794
1795 #---------------------------------------------------------------------------
1796 # Configuration options related to the XML output
1797 #---------------------------------------------------------------------------
1798
1799 # If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
1800 # captures the structure of the code including all documentation.
1801 # The default value is: NO.
1802
1803 GENERATE_XML = NO
1804
1805 # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
1806 # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
1807 # it.
1808 # The default directory is: xml.
1809 # This tag requires that the tag GENERATE_XML is set to YES.
1810
1811 XML_OUTPUT = xml
1812
1813 # If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
1814 # listings (including syntax highlighting and cross-referencing information) to
1815 # the XML output. Note that enabling this will significantly increase the size
1816 # of the XML output.
1817 # The default value is: YES.
1818 # This tag requires that the tag GENERATE_XML is set to YES.
1819
1820 XML_PROGRAMLISTING = YES
1821
1822 #---------------------------------------------------------------------------
1823 # Configuration options related to the DOCBOOK output
1824 #---------------------------------------------------------------------------
1825
1826 # If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
1827 # that can be used to generate PDF.
1828 # The default value is: NO.
1829
1830 GENERATE_DOCBOOK = NO
1831
1832 # The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
1833 # If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
1834 # front of it.
1835 # The default directory is: docbook.
1836 # This tag requires that the tag GENERATE_DOCBOOK is set to YES.
1837
1838 DOCBOOK_OUTPUT = docbook
1839
1840 #---------------------------------------------------------------------------
1841 # Configuration options for the AutoGen Definitions output
1842 #---------------------------------------------------------------------------
1843
1844 # If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
1845 # Definitions (see http://autogen.sf.net) file that captures the structure of
1846 # the code including all documentation. Note that this feature is still
1847 # experimental and incomplete at the moment.
1848 # The default value is: NO.
1849
1850 GENERATE_AUTOGEN_DEF = NO
1851
1852 #---------------------------------------------------------------------------
1853 # Configuration options related to the Perl module output
1854 #---------------------------------------------------------------------------
1855
1856 # If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
1857 # file that captures the structure of the code including all documentation.
1858 #
1859 # Note that this feature is still experimental and incomplete at the moment.
1860 # The default value is: NO.
1861
1862 GENERATE_PERLMOD = NO
1863
1864 # If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
1865 # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
1866 # output from the Perl module output.
1867 # The default value is: NO.
1868 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1869
1870 PERLMOD_LATEX = NO
1871
1872 # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
1873 # formatted so it can be parsed by a human reader. This is useful if you want to
1874 # understand what is going on. On the other hand, if this tag is set to NO the
1875 # size of the Perl module output will be much smaller and Perl will parse it
1876 # just the same.
1877 # The default value is: YES.
1878 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1879
1880 PERLMOD_PRETTY = YES
1881
1882 # The names of the make variables in the generated doxyrules.make file are
1883 # prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
1884 # so different doxyrules.make files included by the same Makefile don't
1885 # overwrite each other's variables.
1886 # This tag requires that the tag GENERATE_PERLMOD is set to YES.
1887
1888 PERLMOD_MAKEVAR_PREFIX =
1889
1890 #---------------------------------------------------------------------------
1891 # Configuration options related to the preprocessor
1892 #---------------------------------------------------------------------------
1893
1894 # If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
1895 # C-preprocessor directives found in the sources and include files.
1896 # The default value is: YES.
1897
1898 ENABLE_PREPROCESSING = YES
1899
1900 # If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
1901 # in the source code. If set to NO only conditional compilation will be
1902 # performed. Macro expansion can be done in a controlled way by setting
1903 # EXPAND_ONLY_PREDEF to YES.
1904 # The default value is: NO.
1905 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1906
1907 MACRO_EXPANSION = NO
1908
1909 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
1910 # the macro expansion is limited to the macros specified with the PREDEFINED and
1911 # EXPAND_AS_DEFINED tags.
1912 # The default value is: NO.
1913 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1914
1915 EXPAND_ONLY_PREDEF = NO
1916
1917 # If the SEARCH_INCLUDES tag is set to YES the includes files in the
1918 # INCLUDE_PATH will be searched if a #include is found.
1919 # The default value is: YES.
1920 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1921
1922 SEARCH_INCLUDES = YES
1923
1924 # The INCLUDE_PATH tag can be used to specify one or more directories that
1925 # contain include files that are not input files but should be processed by the
1926 # preprocessor.
1927 # This tag requires that the tag SEARCH_INCLUDES is set to YES.
1928
1929 INCLUDE_PATH =
1930
1931 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1932 # patterns (like *.h and *.hpp) to filter out the header-files in the
1933 # directories. If left blank, the patterns specified with FILE_PATTERNS will be
1934 # used.
1935 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1936
1937 INCLUDE_FILE_PATTERNS =
1938
1939 # The PREDEFINED tag can be used to specify one or more macro names that are
1940 # defined before the preprocessor is started (similar to the -D option of e.g.
1941 # gcc). The argument of the tag is a list of macros of the form: name or
1942 # name=definition (no spaces). If the definition and the "=" are omitted, "=1"
1943 # is assumed. To prevent a macro definition from being undefined via #undef or
1944 # recursively expanded use the := operator instead of the = operator.
1945 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1946
1947 PREDEFINED = HAVE_SYS_QUOTA_H \
1948 HAVE_XFS_XQM_H \
1949 HAVE_CAP_COMPARE
1950
1951 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
1952 # tag can be used to specify a list of macro names that should be expanded. The
1953 # macro definition that is found in the sources will be used. Use the PREDEFINED
1954 # tag if you want to use a different macro definition that overrules the
1955 # definition found in the source code.
1956 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1957
1958 EXPAND_AS_DEFINED =
1959
1960 # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
1961 # remove all references to function-like macros that are alone on a line, have
1962 # an all uppercase name, and do not end with a semicolon. Such function macros
1963 # are typically used for boiler-plate code, and will confuse the parser if not
1964 # removed.
1965 # The default value is: YES.
1966 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
1967
1968 SKIP_FUNCTION_MACROS = YES
1969
1970 #---------------------------------------------------------------------------
1971 # Configuration options related to external references
1972 #---------------------------------------------------------------------------
1973
1974 # The TAGFILES tag can be used to specify one or more tag files. For each tag
1975 # file the location of the external documentation should be added. The format of
1976 # a tag file without this location is as follows:
1977 # TAGFILES = file1 file2 ...
1978 # Adding location for the tag files is done as follows:
1979 # TAGFILES = file1=loc1 "file2 = loc2" ...
1980 # where loc1 and loc2 can be relative or absolute paths or URLs. See the
1981 # section "Linking to external documentation" for more information about the use
1982 # of tag files.
1983 # Note: Each tag file must have a unique name (where the name does NOT include
1984 # the path). If a tag file is not located in the directory in which doxygen is
1985 # run, you must also specify the path to the tagfile here.
1986
1987 TAGFILES =
1988
1989 # When a file name is specified after GENERATE_TAGFILE, doxygen will create a
1990 # tag file that is based on the input files it reads. See section "Linking to
1991 # external documentation" for more information about the usage of tag files.
1992
1993 GENERATE_TAGFILE =
1994
1995 # If the ALLEXTERNALS tag is set to YES all external class will be listed in the
1996 # class index. If set to NO only the inherited external classes will be listed.
1997 # The default value is: NO.
1998
1999 ALLEXTERNALS = NO
2000
2001 # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
2002 # the modules index. If set to NO, only the current project's groups will be
2003 # listed.
2004 # The default value is: YES.
2005
2006 EXTERNAL_GROUPS = YES
2007
2008 # If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
2009 # the related pages index. If set to NO, only the current project's pages will
2010 # be listed.
2011 # The default value is: YES.
2012
2013 EXTERNAL_PAGES = YES
2014
2015 # The PERL_PATH should be the absolute path and name of the perl script
2016 # interpreter (i.e. the result of 'which perl').
2017 # The default file (with absolute path) is: /usr/bin/perl.
2018
2019 PERL_PATH = @PERL@
2020
2021 #---------------------------------------------------------------------------
2022 # Configuration options related to the dot tool
2023 #---------------------------------------------------------------------------
2024
2025 # If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
2026 # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
2027 # NO turns the diagrams off. Note that this option also works with HAVE_DOT
2028 # disabled, but it is recommended to install and use dot, since it yields more
2029 # powerful graphs.
2030 # The default value is: YES.
2031
2032 CLASS_DIAGRAMS = YES
2033
2034 # You can define message sequence charts within doxygen comments using the \msc
2035 # command. Doxygen will then run the mscgen tool (see:
2036 # http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
2037 # documentation. The MSCGEN_PATH tag allows you to specify the directory where
2038 # the mscgen tool resides. If left empty the tool is assumed to be found in the
2039 # default search path.
2040
2041 MSCGEN_PATH =
2042
2043 # You can include diagrams made with dia in doxygen documentation. Doxygen will
2044 # then run dia to produce the diagram and insert it in the documentation. The
2045 # DIA_PATH tag allows you to specify the directory where the dia binary resides.
2046 # If left empty dia is assumed to be found in the default search path.
2047
2048 DIA_PATH =
2049
2050 # If set to YES, the inheritance and collaboration graphs will hide inheritance
2051 # and usage relations if the target is undocumented or is not a class.
2052 # The default value is: YES.
2053
2054 HIDE_UNDOC_RELATIONS = YES
2055
2056 # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
2057 # available from the path. This tool is part of Graphviz (see:
2058 # http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
2059 # Bell Labs. The other options in this section have no effect if this option is
2060 # set to NO
2061 # The default value is: YES.
2062
2063 HAVE_DOT = YES
2064
2065 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
2066 # to run in parallel. When set to 0 doxygen will base this on the number of
2067 # processors available in the system. You can set it explicitly to a value
2068 # larger than 0 to get control over the balance between CPU load and processing
2069 # speed.
2070 # Minimum value: 0, maximum value: 32, default value: 0.
2071 # This tag requires that the tag HAVE_DOT is set to YES.
2072
2073 DOT_NUM_THREADS = 0
2074
2075 # When you want a differently looking font n the dot files that doxygen
2076 # generates you can specify the font name using DOT_FONTNAME. You need to make
2077 # sure dot is able to find the font, which can be done by putting it in a
2078 # standard location or by setting the DOTFONTPATH environment variable or by
2079 # setting DOT_FONTPATH to the directory containing the font.
2080 # The default value is: Helvetica.
2081 # This tag requires that the tag HAVE_DOT is set to YES.
2082
2083 DOT_FONTNAME = Helvetica
2084
2085 # The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
2086 # dot graphs.
2087 # Minimum value: 4, maximum value: 24, default value: 10.
2088 # This tag requires that the tag HAVE_DOT is set to YES.
2089
2090 DOT_FONTSIZE = 10
2091
2092 # By default doxygen will tell dot to use the default font as specified with
2093 # DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
2094 # the path where dot can find it using this tag.
2095 # This tag requires that the tag HAVE_DOT is set to YES.
2096
2097 DOT_FONTPATH =
2098
2099 # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
2100 # each documented class showing the direct and indirect inheritance relations.
2101 # Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
2102 # The default value is: YES.
2103 # This tag requires that the tag HAVE_DOT is set to YES.
2104
2105 CLASS_GRAPH = YES
2106
2107 # If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
2108 # graph for each documented class showing the direct and indirect implementation
2109 # dependencies (inheritance, containment, and class references variables) of the
2110 # class with other documented classes.
2111 # The default value is: YES.
2112 # This tag requires that the tag HAVE_DOT is set to YES.
2113
2114 COLLABORATION_GRAPH = YES
2115
2116 # If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
2117 # groups, showing the direct groups dependencies.
2118 # The default value is: YES.
2119 # This tag requires that the tag HAVE_DOT is set to YES.
2120
2121 GROUP_GRAPHS = YES
2122
2123 # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
2124 # collaboration diagrams in a style similar to the OMG's Unified Modeling
2125 # Language.
2126 # The default value is: NO.
2127 # This tag requires that the tag HAVE_DOT is set to YES.
2128
2129 UML_LOOK = YES
2130
2131 # If the UML_LOOK tag is enabled, the fields and methods are shown inside the
2132 # class node. If there are many fields or methods and many nodes the graph may
2133 # become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
2134 # number of items for each type to make the size more manageable. Set this to 0
2135 # for no limit. Note that the threshold may be exceeded by 50% before the limit
2136 # is enforced. So when you set the threshold to 10, up to 15 fields may appear,
2137 # but if the number exceeds 15, the total amount of fields shown is limited to
2138 # 10.
2139 # Minimum value: 0, maximum value: 100, default value: 10.
2140 # This tag requires that the tag HAVE_DOT is set to YES.
2141
2142 UML_LIMIT_NUM_FIELDS = 10
2143
2144 # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
2145 # collaboration graphs will show the relations between templates and their
2146 # instances.
2147 # The default value is: NO.
2148 # This tag requires that the tag HAVE_DOT is set to YES.
2149
2150 TEMPLATE_RELATIONS = YES
2151
2152 # If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
2153 # YES then doxygen will generate a graph for each documented file showing the
2154 # direct and indirect include dependencies of the file with other documented
2155 # files.
2156 # The default value is: YES.
2157 # This tag requires that the tag HAVE_DOT is set to YES.
2158
2159 INCLUDE_GRAPH = YES
2160
2161 # If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
2162 # set to YES then doxygen will generate a graph for each documented file showing
2163 # the direct and indirect include dependencies of the file with other documented
2164 # files.
2165 # The default value is: YES.
2166 # This tag requires that the tag HAVE_DOT is set to YES.
2167
2168 INCLUDED_BY_GRAPH = YES
2169
2170 # If the CALL_GRAPH tag is set to YES then doxygen will generate a call
2171 # dependency graph for every global function or class method.
2172 #
2173 # Note that enabling this option will significantly increase the time of a run.
2174 # So in most cases it will be better to enable call graphs for selected
2175 # functions only using the \callgraph command.
2176 # The default value is: NO.
2177 # This tag requires that the tag HAVE_DOT is set to YES.
2178
2179 CALL_GRAPH = NO
2180
2181 # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
2182 # dependency graph for every global function or class method.
2183 #
2184 # Note that enabling this option will significantly increase the time of a run.
2185 # So in most cases it will be better to enable caller graphs for selected
2186 # functions only using the \callergraph command.
2187 # The default value is: NO.
2188 # This tag requires that the tag HAVE_DOT is set to YES.
2189
2190 CALLER_GRAPH = NO
2191
2192 # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
2193 # hierarchy of all classes instead of a textual one.
2194 # The default value is: YES.
2195 # This tag requires that the tag HAVE_DOT is set to YES.
2196
2197 GRAPHICAL_HIERARCHY = YES
2198
2199 # If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
2200 # dependencies a directory has on other directories in a graphical way. The
2201 # dependency relations are determined by the #include relations between the
2202 # files in the directories.
2203 # The default value is: YES.
2204 # This tag requires that the tag HAVE_DOT is set to YES.
2205
2206 DIRECTORY_GRAPH = YES
2207
2208 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
2209 # generated by dot.
2210 # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
2211 # to make the SVG files visible in IE 9+ (other browsers do not have this
2212 # requirement).
2213 # Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
2214 # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
2215 # gif:cairo:gd, gif:gd, gif:gd:gd and svg.
2216 # The default value is: png.
2217 # This tag requires that the tag HAVE_DOT is set to YES.
2218
2219 DOT_IMAGE_FORMAT = png
2220
2221 # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
2222 # enable generation of interactive SVG images that allow zooming and panning.
2223 #
2224 # Note that this requires a modern browser other than Internet Explorer. Tested
2225 # and working are Firefox, Chrome, Safari, and Opera.
2226 # Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
2227 # the SVG files visible. Older versions of IE do not have SVG support.
2228 # The default value is: NO.
2229 # This tag requires that the tag HAVE_DOT is set to YES.
2230
2231 INTERACTIVE_SVG = NO
2232
2233 # The DOT_PATH tag can be used to specify the path where the dot tool can be
2234 # found. If left blank, it is assumed the dot tool can be found in the path.
2235 # This tag requires that the tag HAVE_DOT is set to YES.
2236
2237 DOT_PATH =
2238
2239 # The DOTFILE_DIRS tag can be used to specify one or more directories that
2240 # contain dot files that are included in the documentation (see the \dotfile
2241 # command).
2242 # This tag requires that the tag HAVE_DOT is set to YES.
2243
2244 DOTFILE_DIRS =
2245
2246 # The MSCFILE_DIRS tag can be used to specify one or more directories that
2247 # contain msc files that are included in the documentation (see the \mscfile
2248 # command).
2249
2250 MSCFILE_DIRS =
2251
2252 # The DIAFILE_DIRS tag can be used to specify one or more directories that
2253 # contain dia files that are included in the documentation (see the \diafile
2254 # command).
2255
2256 DIAFILE_DIRS =
2257
2258 # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
2259 # that will be shown in the graph. If the number of nodes in a graph becomes
2260 # larger than this value, doxygen will truncate the graph, which is visualized
2261 # by representing a node as a red box. Note that doxygen if the number of direct
2262 # children of the root node in a graph is already larger than
2263 # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
2264 # the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
2265 # Minimum value: 0, maximum value: 10000, default value: 50.
2266 # This tag requires that the tag HAVE_DOT is set to YES.
2267
2268 DOT_GRAPH_MAX_NODES = 50
2269
2270 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
2271 # generated by dot. A depth value of 3 means that only nodes reachable from the
2272 # root by following a path via at most 3 edges will be shown. Nodes that lay
2273 # further from the root node will be omitted. Note that setting this option to 1
2274 # or 2 may greatly reduce the computation time needed for large code bases. Also
2275 # note that the size of a graph can be further restricted by
2276 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
2277 # Minimum value: 0, maximum value: 1000, default value: 0.
2278 # This tag requires that the tag HAVE_DOT is set to YES.
2279
2280 MAX_DOT_GRAPH_DEPTH = 0
2281
2282 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
2283 # background. This is disabled by default, because dot on Windows does not seem
2284 # to support this out of the box.
2285 #
2286 # Warning: Depending on the platform used, enabling this option may lead to
2287 # badly anti-aliased labels on the edges of a graph (i.e. they become hard to
2288 # read).
2289 # The default value is: NO.
2290 # This tag requires that the tag HAVE_DOT is set to YES.
2291
2292 DOT_TRANSPARENT = YES
2293
2294 # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
2295 # files in one run (i.e. multiple -o and -T options on the command line). This
2296 # makes dot run faster, but since only newer versions of dot (>1.8.10) support
2297 # this, this feature is disabled by default.
2298 # The default value is: NO.
2299 # This tag requires that the tag HAVE_DOT is set to YES.
2300
2301 DOT_MULTI_TARGETS = NO
2302
2303 # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
2304 # explaining the meaning of the various boxes and arrows in the dot generated
2305 # graphs.
2306 # The default value is: YES.
2307 # This tag requires that the tag HAVE_DOT is set to YES.
2308
2309 GENERATE_LEGEND = YES
2310
2311 # If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
2312 # files that are used to generate the various graphs.
2313 # The default value is: YES.
2314 # This tag requires that the tag HAVE_DOT is set to YES.
2315
2316 DOT_CLEANUP = YES
0 Installation Instructions
1 *************************
2
3 Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
4 Inc.
5
6 Copying and distribution of this file, with or without modification,
7 are permitted in any medium without royalty provided the copyright
8 notice and this notice are preserved. This file is offered as-is,
9 without warranty of any kind.
10
11 Basic Installation
12 ==================
13
14 Briefly, the shell command `./configure && make && make install'
15 should configure, build, and install this package. The following
16 more-detailed instructions are generic; see the `README' file for
17 instructions specific to this package. Some packages provide this
18 `INSTALL' file but do not implement all of the features documented
19 below. The lack of an optional feature in a given package is not
20 necessarily a bug. More recommendations for GNU packages can be found
21 in *note Makefile Conventions: (standards)Makefile Conventions.
22
23 The `configure' shell script attempts to guess correct values for
24 various system-dependent variables used during compilation. It uses
25 those values to create a `Makefile' in each directory of the package.
26 It may also create one or more `.h' files containing system-dependent
27 definitions. Finally, it creates a shell script `config.status' that
28 you can run in the future to recreate the current configuration, and a
29 file `config.log' containing compiler output (useful mainly for
30 debugging `configure').
31
32 It can also use an optional file (typically called `config.cache'
33 and enabled with `--cache-file=config.cache' or simply `-C') that saves
34 the results of its tests to speed up reconfiguring. Caching is
35 disabled by default to prevent problems with accidental use of stale
36 cache files.
37
38 If you need to do unusual things to compile the package, please try
39 to figure out how `configure' could check whether to do them, and mail
40 diffs or instructions to the address given in the `README' so they can
41 be considered for the next release. If you are using the cache, and at
42 some point `config.cache' contains results you don't want to keep, you
43 may remove or edit it.
44
45 The file `configure.ac' (or `configure.in') is used to create
46 `configure' by a program called `autoconf'. You need `configure.ac' if
47 you want to change it or regenerate `configure' using a newer version
48 of `autoconf'.
49
50 The simplest way to compile this package is:
51
52 1. `cd' to the directory containing the package's source code and type
53 `./configure' to configure the package for your system.
54
55 Running `configure' might take a while. While running, it prints
56 some messages telling which features it is checking for.
57
58 2. Type `make' to compile the package.
59
60 3. Optionally, type `make check' to run any self-tests that come with
61 the package, generally using the just-built uninstalled binaries.
62
63 4. Type `make install' to install the programs and any data files and
64 documentation. When installing into a prefix owned by root, it is
65 recommended that the package be configured and built as a regular
66 user, and only the `make install' phase executed with root
67 privileges.
68
69 5. Optionally, type `make installcheck' to repeat any self-tests, but
70 this time using the binaries in their final installed location.
71 This target does not install anything. Running this target as a
72 regular user, particularly if the prior `make install' required
73 root privileges, verifies that the installation completed
74 correctly.
75
76 6. You can remove the program binaries and object files from the
77 source code directory by typing `make clean'. To also remove the
78 files that `configure' created (so you can compile the package for
79 a different kind of computer), type `make distclean'. There is
80 also a `make maintainer-clean' target, but that is intended mainly
81 for the package's developers. If you use it, you may have to get
82 all sorts of other programs in order to regenerate files that came
83 with the distribution.
84
85 7. Often, you can also type `make uninstall' to remove the installed
86 files again. In practice, not all packages have tested that
87 uninstallation works correctly, even though it is required by the
88 GNU Coding Standards.
89
90 8. Some packages, particularly those that use Automake, provide `make
91 distcheck', which can by used by developers to test that all other
92 targets like `make install' and `make uninstall' work correctly.
93 This target is generally not run by end users.
94
95 Compilers and Options
96 =====================
97
98 Some systems require unusual options for compilation or linking that
99 the `configure' script does not know about. Run `./configure --help'
100 for details on some of the pertinent environment variables.
101
102 You can give `configure' initial values for configuration parameters
103 by setting variables in the command line or in the environment. Here
104 is an example:
105
106 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
107
108 *Note Defining Variables::, for more details.
109
110 Compiling For Multiple Architectures
111 ====================================
112
113 You can compile the package for more than one kind of computer at the
114 same time, by placing the object files for each architecture in their
115 own directory. To do this, you can use GNU `make'. `cd' to the
116 directory where you want the object files and executables to go and run
117 the `configure' script. `configure' automatically checks for the
118 source code in the directory that `configure' is in and in `..'. This
119 is known as a "VPATH" build.
120
121 With a non-GNU `make', it is safer to compile the package for one
122 architecture at a time in the source code directory. After you have
123 installed the package for one architecture, use `make distclean' before
124 reconfiguring for another architecture.
125
126 On MacOS X 10.5 and later systems, you can create libraries and
127 executables that work on multiple system types--known as "fat" or
128 "universal" binaries--by specifying multiple `-arch' options to the
129 compiler but only a single `-arch' option to the preprocessor. Like
130 this:
131
132 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
133 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134 CPP="gcc -E" CXXCPP="g++ -E"
135
136 This is not guaranteed to produce working output in all cases, you
137 may have to build one architecture at a time and combine the results
138 using the `lipo' tool if you have problems.
139
140 Installation Names
141 ==================
142
143 By default, `make install' installs the package's commands under
144 `/usr/local/bin', include files under `/usr/local/include', etc. You
145 can specify an installation prefix other than `/usr/local' by giving
146 `configure' the option `--prefix=PREFIX', where PREFIX must be an
147 absolute file name.
148
149 You can specify separate installation prefixes for
150 architecture-specific files and architecture-independent files. If you
151 pass the option `--exec-prefix=PREFIX' to `configure', the package uses
152 PREFIX as the prefix for installing programs and libraries.
153 Documentation and other data files still use the regular prefix.
154
155 In addition, if you use an unusual directory layout you can give
156 options like `--bindir=DIR' to specify different values for particular
157 kinds of files. Run `configure --help' for a list of the directories
158 you can set and what kinds of files go in them. In general, the
159 default for these options is expressed in terms of `${prefix}', so that
160 specifying just `--prefix' will affect all of the other directory
161 specifications that were not explicitly provided.
162
163 The most portable way to affect installation locations is to pass the
164 correct locations to `configure'; however, many packages provide one or
165 both of the following shortcuts of passing variable assignments to the
166 `make install' command line to change installation locations without
167 having to reconfigure or recompile.
168
169 The first method involves providing an override variable for each
170 affected directory. For example, `make install
171 prefix=/alternate/directory' will choose an alternate location for all
172 directory configuration variables that were expressed in terms of
173 `${prefix}'. Any directories that were specified during `configure',
174 but not in terms of `${prefix}', must each be overridden at install
175 time for the entire installation to be relocated. The approach of
176 makefile variable overrides for each directory variable is required by
177 the GNU Coding Standards, and ideally causes no recompilation.
178 However, some platforms have known limitations with the semantics of
179 shared libraries that end up requiring recompilation when using this
180 method, particularly noticeable in packages that use GNU Libtool.
181
182 The second method involves providing the `DESTDIR' variable. For
183 example, `make install DESTDIR=/alternate/directory' will prepend
184 `/alternate/directory' before all installation names. The approach of
185 `DESTDIR' overrides is not required by the GNU Coding Standards, and
186 does not work on platforms that have drive letters. On the other hand,
187 it does better at avoiding recompilation issues, and works well even
188 when some directory options were not specified in terms of `${prefix}'
189 at `configure' time.
190
191 Optional Features
192 =================
193
194 If the package supports it, you can cause programs to be installed
195 with an extra prefix or suffix on their names by giving `configure' the
196 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
197
198 Some packages pay attention to `--enable-FEATURE' options to
199 `configure', where FEATURE indicates an optional part of the package.
200 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
201 is something like `gnu-as' or `x' (for the X Window System). The
202 `README' should mention any `--enable-' and `--with-' options that the
203 package recognizes.
204
205 For packages that use the X Window System, `configure' can usually
206 find the X include and library files automatically, but if it doesn't,
207 you can use the `configure' options `--x-includes=DIR' and
208 `--x-libraries=DIR' to specify their locations.
209
210 Some packages offer the ability to configure how verbose the
211 execution of `make' will be. For these packages, running `./configure
212 --enable-silent-rules' sets the default to minimal output, which can be
213 overridden with `make V=1'; while running `./configure
214 --disable-silent-rules' sets the default to verbose, which can be
215 overridden with `make V=0'.
216
217 Particular systems
218 ==================
219
220 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
221 CC is not installed, it is recommended to use the following options in
222 order to use an ANSI C compiler:
223
224 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
225
226 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
227
228 HP-UX `make' updates targets which have the same time stamps as
229 their prerequisites, which makes it generally unusable when shipped
230 generated files such as `configure' are involved. Use GNU `make'
231 instead.
232
233 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
234 parse its `<wchar.h>' header file. The option `-nodtk' can be used as
235 a workaround. If GNU CC is not installed, it is therefore recommended
236 to try
237
238 ./configure CC="cc"
239
240 and if that doesn't work, try
241
242 ./configure CC="cc -nodtk"
243
244 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
245 directory contains several dysfunctional programs; working variants of
246 these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
247 in your `PATH', put it _after_ `/usr/bin'.
248
249 On Haiku, software installed for all users goes in `/boot/common',
250 not `/usr/local'. It is recommended to use the following options:
251
252 ./configure --prefix=/boot/common
253
254 Specifying the System Type
255 ==========================
256
257 There may be some features `configure' cannot figure out
258 automatically, but needs to determine by the type of machine the package
259 will run on. Usually, assuming the package is built to be run on the
260 _same_ architectures, `configure' can figure that out, but if it prints
261 a message saying it cannot guess the machine type, give it the
262 `--build=TYPE' option. TYPE can either be a short name for the system
263 type, such as `sun4', or a canonical name which has the form:
264
265 CPU-COMPANY-SYSTEM
266
267 where SYSTEM can have one of these forms:
268
269 OS
270 KERNEL-OS
271
272 See the file `config.sub' for the possible values of each field. If
273 `config.sub' isn't included in this package, then this package doesn't
274 need to know the machine type.
275
276 If you are _building_ compiler tools for cross-compiling, you should
277 use the option `--target=TYPE' to select the type of system they will
278 produce code for.
279
280 If you want to _use_ a cross compiler, that generates code for a
281 platform different from the build platform, you should specify the
282 "host" platform (i.e., that on which the generated programs will
283 eventually be run) with `--host=TYPE'.
284
285 Sharing Defaults
286 ================
287
288 If you want to set default values for `configure' scripts to share,
289 you can create a site shell script called `config.site' that gives
290 default values for variables like `CC', `cache_file', and `prefix'.
291 `configure' looks for `PREFIX/share/config.site' if it exists, then
292 `PREFIX/etc/config.site' if it exists. Or, you can set the
293 `CONFIG_SITE' environment variable to the location of the site script.
294 A warning: not all `configure' scripts look for a site script.
295
296 Defining Variables
297 ==================
298
299 Variables not defined in a site shell script can be set in the
300 environment passed to `configure'. However, some packages may run
301 configure again during the build, and the customized values of these
302 variables may be lost. In order to avoid this problem, you should set
303 them in the `configure' command line, using `VAR=value'. For example:
304
305 ./configure CC=/usr/local2/bin/gcc
306
307 causes the specified `gcc' to be used as the C compiler (unless it is
308 overridden in the site shell script).
309
310 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
311 an Autoconf limitation. Until the limitation is lifted, you can use
312 this workaround:
313
314 CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
315
316 `configure' Invocation
317 ======================
318
319 `configure' recognizes the following options to control how it
320 operates.
321
322 `--help'
323 `-h'
324 Print a summary of all of the options to `configure', and exit.
325
326 `--help=short'
327 `--help=recursive'
328 Print a summary of the options unique to this package's
329 `configure', and exit. The `short' variant lists options used
330 only in the top level, while the `recursive' variant lists options
331 also present in any nested packages.
332
333 `--version'
334 `-V'
335 Print the version of Autoconf used to generate the `configure'
336 script, and exit.
337
338 `--cache-file=FILE'
339 Enable the cache: use and save the results of the tests in FILE,
340 traditionally `config.cache'. FILE defaults to `/dev/null' to
341 disable caching.
342
343 `--config-cache'
344 `-C'
345 Alias for `--cache-file=config.cache'.
346
347 `--quiet'
348 `--silent'
349 `-q'
350 Do not print messages saying which checks are being made. To
351 suppress all normal output, redirect it to `/dev/null' (any error
352 messages will still be shown).
353
354 `--srcdir=DIR'
355 Look for the package's source code in directory DIR. Usually
356 `configure' can determine that directory automatically.
357
358 `--prefix=DIR'
359 Use DIR as the installation prefix. *note Installation Names::
360 for more details, including other options available for fine-tuning
361 the installation locations.
362
363 `--no-create'
364 `-n'
365 Run the configure checks, but stop before creating any output
366 files.
367
368 `configure' also accepts some other, not widely useful, options. Run
369 `configure --help' for more details.
0 AUTOMAKE_OPTIONS = 1.9
1 ACLOCAL_AMFLAGS =
2
3 SUBDIRS = src doc
4 docdir = $(datadir)/doc/$(PACKAGE)
5 doc_DATA = README NEWS AUTHORS ChangeLog COPYING
6 EXTRA_DIST=.ui-auto.conf
7
8 incdir = $(includedir)/$(PACKAGE)
9
10 @UI_AUTO_AM@
11
12 all-local: ui-auto-all
13 clean-local: ui-auto-clean
14 distclean-local: ui-auto-distclean
15 install-data-local: ui-auto-install-data
16 install-exec-local: ui-auto-install-exec
17 uninstall-local: ui-auto-uninstall
18 dist-hook: ui-auto-dist
19
20 # "Source lines of code" estimation
21 x-sloc:
22 find src/ \( -name "*.[ch]pp" -o -name "*.[ch]" \) -a ! -wholename "*.svn/*" | xargs wc -l
0 # Makefile.in generated by automake 1.14.1 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 VPATH = @srcdir@
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
30 case $$MAKEFLAGS in \
31 *\\[\ \ ]*) \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
35 esac; \
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
62 pkgdatadir = $(datadir)/@PACKAGE@
63 pkgincludedir = $(includedir)/@PACKAGE@
64 pkglibdir = $(libdir)/@PACKAGE@
65 pkglibexecdir = $(libexecdir)/@PACKAGE@
66 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
67 install_sh_DATA = $(install_sh) -c -m 644
68 install_sh_PROGRAM = $(install_sh) -c
69 install_sh_SCRIPT = $(install_sh) -c
70 INSTALL_HEADER = $(INSTALL_DATA)
71 transform = $(program_transform_name)
72 NORMAL_INSTALL = :
73 PRE_INSTALL = :
74 POST_INSTALL = :
75 NORMAL_UNINSTALL = :
76 PRE_UNINSTALL = :
77 POST_UNINSTALL = :
78 build_triplet = @build@
79 host_triplet = @host@
80 subdir = .
81 DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
82 $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/configure $(am__configure_deps) \
84 $(srcdir)/config.h.in $(srcdir)/Doxyfile.in COPYING compile \
85 config.guess config.sub install-sh missing ltmain.sh
86 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
87 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
88 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 $(ACLOCAL_M4)
90 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
91 configure.lineno config.status.lineno
92 mkinstalldirs = $(install_sh) -d
93 CONFIG_HEADER = config.h
94 CONFIG_CLEAN_FILES = Doxyfile
95 CONFIG_CLEAN_VPATH_FILES =
96 AM_V_P = $(am__v_P_@AM_V@)
97 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
98 am__v_P_0 = false
99 am__v_P_1 = :
100 AM_V_GEN = $(am__v_GEN_@AM_V@)
101 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
102 am__v_GEN_0 = @echo " GEN " $@;
103 am__v_GEN_1 =
104 AM_V_at = $(am__v_at_@AM_V@)
105 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
106 am__v_at_0 = @
107 am__v_at_1 =
108 SOURCES =
109 DIST_SOURCES =
110 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
111 ctags-recursive dvi-recursive html-recursive info-recursive \
112 install-data-recursive install-dvi-recursive \
113 install-exec-recursive install-html-recursive \
114 install-info-recursive install-pdf-recursive \
115 install-ps-recursive install-recursive installcheck-recursive \
116 installdirs-recursive pdf-recursive ps-recursive \
117 tags-recursive uninstall-recursive
118 am__can_run_installinfo = \
119 case $$AM_UPDATE_INFO_DIR in \
120 n|no|NO) false;; \
121 *) (install-info --version) >/dev/null 2>&1;; \
122 esac
123 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
124 am__vpath_adj = case $$p in \
125 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
126 *) f=$$p;; \
127 esac;
128 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
129 am__install_max = 40
130 am__nobase_strip_setup = \
131 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
132 am__nobase_strip = \
133 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
134 am__nobase_list = $(am__nobase_strip_setup); \
135 for p in $$list; do echo "$$p $$p"; done | \
136 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
137 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
138 if (++n[$$2] == $(am__install_max)) \
139 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
140 END { for (dir in files) print dir, files[dir] }'
141 am__base_list = \
142 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
143 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
144 am__uninstall_files_from_dir = { \
145 test -z "$$files" \
146 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
147 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
148 $(am__cd) "$$dir" && rm -f $$files; }; \
149 }
150 am__installdirs = "$(DESTDIR)$(docdir)"
151 DATA = $(doc_DATA)
152 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
153 distclean-recursive maintainer-clean-recursive
154 am__recursive_targets = \
155 $(RECURSIVE_TARGETS) \
156 $(RECURSIVE_CLEAN_TARGETS) \
157 $(am__extra_recursive_targets)
158 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
159 cscope distdir dist dist-all distcheck
160 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
161 $(LISP)config.h.in
162 # Read a list of newline-separated strings from the standard input,
163 # and print each of them once, without duplicates. Input order is
164 # *not* preserved.
165 am__uniquify_input = $(AWK) '\
166 BEGIN { nonempty = 0; } \
167 { items[$$0] = 1; nonempty = 1; } \
168 END { if (nonempty) { for (i in items) print i; }; } \
169 '
170 # Make sure the list of sources is unique. This is necessary because,
171 # e.g., the same source file might be shared among _SOURCES variables
172 # for different programs/libraries.
173 am__define_uniq_tagged_files = \
174 list='$(am__tagged_files)'; \
175 unique=`for i in $$list; do \
176 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
177 done | $(am__uniquify_input)`
178 ETAGS = etags
179 CTAGS = ctags
180 CSCOPE = cscope
181 DIST_SUBDIRS = $(SUBDIRS)
182 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
183 distdir = $(PACKAGE)-$(VERSION)
184 top_distdir = $(distdir)
185 am__remove_distdir = \
186 if test -d "$(distdir)"; then \
187 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
188 && rm -rf "$(distdir)" \
189 || { sleep 5 && rm -rf "$(distdir)"; }; \
190 else :; fi
191 am__post_remove_distdir = $(am__remove_distdir)
192 am__relativize = \
193 dir0=`pwd`; \
194 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
195 sed_rest='s,^[^/]*/*,,'; \
196 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
197 sed_butlast='s,/*[^/]*$$,,'; \
198 while test -n "$$dir1"; do \
199 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
200 if test "$$first" != "."; then \
201 if test "$$first" = ".."; then \
202 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
203 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
204 else \
205 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
206 if test "$$first2" = "$$first"; then \
207 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
208 else \
209 dir2="../$$dir2"; \
210 fi; \
211 dir0="$$dir0"/"$$first"; \
212 fi; \
213 fi; \
214 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
215 done; \
216 reldir="$$dir2"
217 DIST_ARCHIVES = $(distdir).tar.gz
218 GZIP_ENV = --best
219 DIST_TARGETS = dist-gzip
220 distuninstallcheck_listfiles = find . -type f -print
221 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
222 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
223 distcleancheck_listfiles = find . -type f -print
224 ACLOCAL = @ACLOCAL@
225 AMTAR = @AMTAR@
226 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
227 AR = @AR@
228 AUTOCONF = @AUTOCONF@
229 AUTOHEADER = @AUTOHEADER@
230 AUTOMAKE = @AUTOMAKE@
231 AWK = @AWK@
232 CC = @CC@
233 CCDEPMODE = @CCDEPMODE@
234 CCGNU2_CONFIG = @CCGNU2_CONFIG@
235 CFLAGS = @CFLAGS@
236 CPP = @CPP@
237 CPPFLAGS = @CPPFLAGS@
238 CXX = @CXX@
239 CXXCPP = @CXXCPP@
240 CXXDEPMODE = @CXXDEPMODE@
241 CXXFLAGS = @CXXFLAGS@
242 CYGPATH_W = @CYGPATH_W@
243 DEFS = @DEFS@
244 DEPDIR = @DEPDIR@
245 DLLTOOL = @DLLTOOL@
246 DOXYGEN = @DOXYGEN@
247 DSYMUTIL = @DSYMUTIL@
248 DUMPBIN = @DUMPBIN@
249 ECHO_C = @ECHO_C@
250 ECHO_N = @ECHO_N@
251 ECHO_T = @ECHO_T@
252 EGREP = @EGREP@
253 EXEEXT = @EXEEXT@
254 EXTLIBS = @EXTLIBS@
255 FGREP = @FGREP@
256 GNULIBS = @GNULIBS@
257 GREP = @GREP@
258 INSTALL = @INSTALL@
259 INSTALL_DATA = @INSTALL_DATA@
260 INSTALL_PROGRAM = @INSTALL_PROGRAM@
261 INSTALL_SCRIPT = @INSTALL_SCRIPT@
262 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
263 LD = @LD@
264 LDFLAGS = @LDFLAGS@
265 LIBOBJS = @LIBOBJS@
266 LIBS = @LIBS@
267 LIBTOOL = @LIBTOOL@
268 LIPO = @LIPO@
269 LN_S = @LN_S@
270 LTLIBOBJS = @LTLIBOBJS@
271 MAKEINFO = @MAKEINFO@
272 MANIFEST_TOOL = @MANIFEST_TOOL@
273 MKDIR_P = @MKDIR_P@
274 NM = @NM@
275 NMEDIT = @NMEDIT@
276 OBJDUMP = @OBJDUMP@
277 OBJEXT = @OBJEXT@
278 OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@
279 OST_CXXX2_LIBS = @OST_CXXX2_LIBS@
280 OTOOL = @OTOOL@
281 OTOOL64 = @OTOOL64@
282 PACKAGE = @PACKAGE@
283 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
284 PACKAGE_NAME = @PACKAGE_NAME@
285 PACKAGE_STRING = @PACKAGE_STRING@
286 PACKAGE_TARNAME = @PACKAGE_TARNAME@
287 PACKAGE_URL = @PACKAGE_URL@
288 PACKAGE_VERSION = @PACKAGE_VERSION@
289 PATH_SEPARATOR = @PATH_SEPARATOR@
290 PERL = @PERL@
291 RANLIB = @RANLIB@
292 SED = @SED@
293 SET_MAKE = @SET_MAKE@
294 SHELL = @SHELL@
295 SINGLE_FLAGS = @SINGLE_FLAGS@
296 SINGLE_LIBS = @SINGLE_LIBS@
297 SO_VERSION = @SO_VERSION@
298 STRIP = @STRIP@
299 UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@
300 VERSION = @VERSION@
301 abs_builddir = @abs_builddir@
302 abs_srcdir = @abs_srcdir@
303 abs_top_builddir = @abs_top_builddir@
304 abs_top_srcdir = @abs_top_srcdir@
305 ac_ct_AR = @ac_ct_AR@
306 ac_ct_CC = @ac_ct_CC@
307 ac_ct_CXX = @ac_ct_CXX@
308 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
309 am__include = @am__include@
310 am__leading_dot = @am__leading_dot@
311 am__quote = @am__quote@
312 am__tar = @am__tar@
313 am__untar = @am__untar@
314 bindir = @bindir@
315 build = @build@
316 build_alias = @build_alias@
317 build_cpu = @build_cpu@
318 build_os = @build_os@
319 build_vendor = @build_vendor@
320 builddir = @builddir@
321 datadir = @datadir@
322 datarootdir = @datarootdir@
323 docdir = $(datadir)/doc/$(PACKAGE)
324 dvidir = @dvidir@
325 exec_prefix = @exec_prefix@
326 host = @host@
327 host_alias = @host_alias@
328 host_cpu = @host_cpu@
329 host_os = @host_os@
330 host_vendor = @host_vendor@
331 htmldir = @htmldir@
332 includedir = @includedir@
333 infodir = @infodir@
334 install_sh = @install_sh@
335 libdir = @libdir@
336 libexecdir = @libexecdir@
337 localedir = @localedir@
338 localstatedir = @localstatedir@
339 mandir = @mandir@
340 mkdir_p = @mkdir_p@
341 oldincludedir = @oldincludedir@
342 pdfdir = @pdfdir@
343 prefix = @prefix@
344 program_transform_name = @program_transform_name@
345 psdir = @psdir@
346 sbindir = @sbindir@
347 sharedstatedir = @sharedstatedir@
348 srcdir = @srcdir@
349 sysconfdir = @sysconfdir@
350 target_alias = @target_alias@
351 top_build_prefix = @top_build_prefix@
352 top_builddir = @top_builddir@
353 top_srcdir = @top_srcdir@
354 AUTOMAKE_OPTIONS = 1.9
355 ACLOCAL_AMFLAGS =
356 SUBDIRS = src doc
357 doc_DATA = README NEWS AUTHORS ChangeLog COPYING
358 EXTRA_DIST = .ui-auto.conf
359 incdir = $(includedir)/$(PACKAGE)
360 all: config.h
361 $(MAKE) $(AM_MAKEFLAGS) all-recursive
362
363 .SUFFIXES:
364 am--refresh: Makefile
365 @:
366 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
367 @for dep in $?; do \
368 case '$(am__configure_deps)' in \
369 *$$dep*) \
370 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
371 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
372 && exit 0; \
373 exit 1;; \
374 esac; \
375 done; \
376 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
377 $(am__cd) $(top_srcdir) && \
378 $(AUTOMAKE) --gnu Makefile
379 .PRECIOUS: Makefile
380 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
381 @case '$?' in \
382 *config.status*) \
383 echo ' $(SHELL) ./config.status'; \
384 $(SHELL) ./config.status;; \
385 *) \
386 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
387 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
388 esac;
389
390 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
391 $(SHELL) ./config.status --recheck
392
393 $(top_srcdir)/configure: $(am__configure_deps)
394 $(am__cd) $(srcdir) && $(AUTOCONF)
395 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
396 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
397 $(am__aclocal_m4_deps):
398
399 config.h: stamp-h1
400 @test -f $@ || rm -f stamp-h1
401 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
402
403 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
404 @rm -f stamp-h1
405 cd $(top_builddir) && $(SHELL) ./config.status config.h
406 $(srcdir)/config.h.in: $(am__configure_deps)
407 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
408 rm -f stamp-h1
409 touch $@
410
411 distclean-hdr:
412 -rm -f config.h stamp-h1
413 Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in
414 cd $(top_builddir) && $(SHELL) ./config.status $@
415
416 mostlyclean-libtool:
417 -rm -f *.lo
418
419 clean-libtool:
420 -rm -rf .libs _libs
421
422 distclean-libtool:
423 -rm -f libtool config.lt
424 install-docDATA: $(doc_DATA)
425 @$(NORMAL_INSTALL)
426 @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
427 if test -n "$$list"; then \
428 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
429 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
430 fi; \
431 for p in $$list; do \
432 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
433 echo "$$d$$p"; \
434 done | $(am__base_list) | \
435 while read files; do \
436 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
437 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
438 done
439
440 uninstall-docDATA:
441 @$(NORMAL_UNINSTALL)
442 @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
443 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
444 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
445
446 # This directory's subdirectories are mostly independent; you can cd
447 # into them and run 'make' without going through this Makefile.
448 # To change the values of 'make' variables: instead of editing Makefiles,
449 # (1) if the variable is set in 'config.status', edit 'config.status'
450 # (which will cause the Makefiles to be regenerated when you run 'make');
451 # (2) otherwise, pass the desired values on the 'make' command line.
452 $(am__recursive_targets):
453 @fail=; \
454 if $(am__make_keepgoing); then \
455 failcom='fail=yes'; \
456 else \
457 failcom='exit 1'; \
458 fi; \
459 dot_seen=no; \
460 target=`echo $@ | sed s/-recursive//`; \
461 case "$@" in \
462 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
463 *) list='$(SUBDIRS)' ;; \
464 esac; \
465 for subdir in $$list; do \
466 echo "Making $$target in $$subdir"; \
467 if test "$$subdir" = "."; then \
468 dot_seen=yes; \
469 local_target="$$target-am"; \
470 else \
471 local_target="$$target"; \
472 fi; \
473 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
474 || eval $$failcom; \
475 done; \
476 if test "$$dot_seen" = "no"; then \
477 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
478 fi; test -z "$$fail"
479
480 ID: $(am__tagged_files)
481 $(am__define_uniq_tagged_files); mkid -fID $$unique
482 tags: tags-recursive
483 TAGS: tags
484
485 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
486 set x; \
487 here=`pwd`; \
488 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
489 include_option=--etags-include; \
490 empty_fix=.; \
491 else \
492 include_option=--include; \
493 empty_fix=; \
494 fi; \
495 list='$(SUBDIRS)'; for subdir in $$list; do \
496 if test "$$subdir" = .; then :; else \
497 test ! -f $$subdir/TAGS || \
498 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
499 fi; \
500 done; \
501 $(am__define_uniq_tagged_files); \
502 shift; \
503 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
504 test -n "$$unique" || unique=$$empty_fix; \
505 if test $$# -gt 0; then \
506 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
507 "$$@" $$unique; \
508 else \
509 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
510 $$unique; \
511 fi; \
512 fi
513 ctags: ctags-recursive
514
515 CTAGS: ctags
516 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
517 $(am__define_uniq_tagged_files); \
518 test -z "$(CTAGS_ARGS)$$unique" \
519 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
520 $$unique
521
522 GTAGS:
523 here=`$(am__cd) $(top_builddir) && pwd` \
524 && $(am__cd) $(top_srcdir) \
525 && gtags -i $(GTAGS_ARGS) "$$here"
526 cscope: cscope.files
527 test ! -s cscope.files \
528 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
529 clean-cscope:
530 -rm -f cscope.files
531 cscope.files: clean-cscope cscopelist
532 cscopelist: cscopelist-recursive
533
534 cscopelist-am: $(am__tagged_files)
535 list='$(am__tagged_files)'; \
536 case "$(srcdir)" in \
537 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
538 *) sdir=$(subdir)/$(srcdir) ;; \
539 esac; \
540 for i in $$list; do \
541 if test -f "$$i"; then \
542 echo "$(subdir)/$$i"; \
543 else \
544 echo "$$sdir/$$i"; \
545 fi; \
546 done >> $(top_builddir)/cscope.files
547
548 distclean-tags:
549 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
550 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
551
552 distdir: $(DISTFILES)
553 $(am__remove_distdir)
554 test -d "$(distdir)" || mkdir "$(distdir)"
555 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
556 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
557 list='$(DISTFILES)'; \
558 dist_files=`for file in $$list; do echo $$file; done | \
559 sed -e "s|^$$srcdirstrip/||;t" \
560 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
561 case $$dist_files in \
562 */*) $(MKDIR_P) `echo "$$dist_files" | \
563 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
564 sort -u` ;; \
565 esac; \
566 for file in $$dist_files; do \
567 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
568 if test -d $$d/$$file; then \
569 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
570 if test -d "$(distdir)/$$file"; then \
571 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
572 fi; \
573 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
574 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
575 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
576 fi; \
577 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
578 else \
579 test -f "$(distdir)/$$file" \
580 || cp -p $$d/$$file "$(distdir)/$$file" \
581 || exit 1; \
582 fi; \
583 done
584 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
585 if test "$$subdir" = .; then :; else \
586 $(am__make_dryrun) \
587 || test -d "$(distdir)/$$subdir" \
588 || $(MKDIR_P) "$(distdir)/$$subdir" \
589 || exit 1; \
590 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
591 $(am__relativize); \
592 new_distdir=$$reldir; \
593 dir1=$$subdir; dir2="$(top_distdir)"; \
594 $(am__relativize); \
595 new_top_distdir=$$reldir; \
596 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
597 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
598 ($(am__cd) $$subdir && \
599 $(MAKE) $(AM_MAKEFLAGS) \
600 top_distdir="$$new_top_distdir" \
601 distdir="$$new_distdir" \
602 am__remove_distdir=: \
603 am__skip_length_check=: \
604 am__skip_mode_fix=: \
605 distdir) \
606 || exit 1; \
607 fi; \
608 done
609 $(MAKE) $(AM_MAKEFLAGS) \
610 top_distdir="$(top_distdir)" distdir="$(distdir)" \
611 dist-hook
612 -test -n "$(am__skip_mode_fix)" \
613 || find "$(distdir)" -type d ! -perm -755 \
614 -exec chmod u+rwx,go+rx {} \; -o \
615 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
616 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
617 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
618 || chmod -R a+r "$(distdir)"
619 dist-gzip: distdir
620 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
621 $(am__post_remove_distdir)
622
623 dist-bzip2: distdir
624 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
625 $(am__post_remove_distdir)
626
627 dist-lzip: distdir
628 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
629 $(am__post_remove_distdir)
630
631 dist-xz: distdir
632 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
633 $(am__post_remove_distdir)
634
635 dist-tarZ: distdir
636 @echo WARNING: "Support for shar distribution archives is" \
637 "deprecated." >&2
638 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
639 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
640 $(am__post_remove_distdir)
641
642 dist-shar: distdir
643 @echo WARNING: "Support for distribution archives compressed with" \
644 "legacy program 'compress' is deprecated." >&2
645 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
646 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
647 $(am__post_remove_distdir)
648
649 dist-zip: distdir
650 -rm -f $(distdir).zip
651 zip -rq $(distdir).zip $(distdir)
652 $(am__post_remove_distdir)
653
654 dist dist-all:
655 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
656 $(am__post_remove_distdir)
657
658 # This target untars the dist file and tries a VPATH configuration. Then
659 # it guarantees that the distribution is self-contained by making another
660 # tarfile.
661 distcheck: dist
662 case '$(DIST_ARCHIVES)' in \
663 *.tar.gz*) \
664 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
665 *.tar.bz2*) \
666 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
667 *.tar.lz*) \
668 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
669 *.tar.xz*) \
670 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
671 *.tar.Z*) \
672 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
673 *.shar.gz*) \
674 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
675 *.zip*) \
676 unzip $(distdir).zip ;;\
677 esac
678 chmod -R a-w $(distdir)
679 chmod u+w $(distdir)
680 mkdir $(distdir)/_build $(distdir)/_inst
681 chmod a-w $(distdir)
682 test -d $(distdir)/_build || exit 0; \
683 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
684 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
685 && am__cwd=`pwd` \
686 && $(am__cd) $(distdir)/_build \
687 && ../configure \
688 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
689 $(DISTCHECK_CONFIGURE_FLAGS) \
690 --srcdir=.. --prefix="$$dc_install_base" \
691 && $(MAKE) $(AM_MAKEFLAGS) \
692 && $(MAKE) $(AM_MAKEFLAGS) dvi \
693 && $(MAKE) $(AM_MAKEFLAGS) check \
694 && $(MAKE) $(AM_MAKEFLAGS) install \
695 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
696 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
697 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
698 distuninstallcheck \
699 && chmod -R a-w "$$dc_install_base" \
700 && ({ \
701 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
702 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
703 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
704 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
705 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
706 } || { rm -rf "$$dc_destdir"; exit 1; }) \
707 && rm -rf "$$dc_destdir" \
708 && $(MAKE) $(AM_MAKEFLAGS) dist \
709 && rm -rf $(DIST_ARCHIVES) \
710 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
711 && cd "$$am__cwd" \
712 || exit 1
713 $(am__post_remove_distdir)
714 @(echo "$(distdir) archives ready for distribution: "; \
715 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
716 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
717 distuninstallcheck:
718 @test -n '$(distuninstallcheck_dir)' || { \
719 echo 'ERROR: trying to run $@ with an empty' \
720 '$$(distuninstallcheck_dir)' >&2; \
721 exit 1; \
722 }; \
723 $(am__cd) '$(distuninstallcheck_dir)' || { \
724 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
725 exit 1; \
726 }; \
727 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
728 || { echo "ERROR: files left after uninstall:" ; \
729 if test -n "$(DESTDIR)"; then \
730 echo " (check DESTDIR support)"; \
731 fi ; \
732 $(distuninstallcheck_listfiles) ; \
733 exit 1; } >&2
734 distcleancheck: distclean
735 @if test '$(srcdir)' = . ; then \
736 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
737 exit 1 ; \
738 fi
739 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
740 || { echo "ERROR: files left in build directory after distclean:" ; \
741 $(distcleancheck_listfiles) ; \
742 exit 1; } >&2
743 check-am: all-am
744 check: check-recursive
745 all-am: Makefile $(DATA) config.h all-local
746 installdirs: installdirs-recursive
747 installdirs-am:
748 for dir in "$(DESTDIR)$(docdir)"; do \
749 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
750 done
751 install: install-recursive
752 install-exec: install-exec-recursive
753 install-data: install-data-recursive
754 uninstall: uninstall-recursive
755
756 install-am: all-am
757 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
758
759 installcheck: installcheck-recursive
760 install-strip:
761 if test -z '$(STRIP)'; then \
762 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
763 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
764 install; \
765 else \
766 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
767 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
768 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
769 fi
770 mostlyclean-generic:
771
772 clean-generic:
773
774 distclean-generic:
775 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
776 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
777
778 maintainer-clean-generic:
779 @echo "This command is intended for maintainers to use"
780 @echo "it deletes files that may require special tools to rebuild."
781 clean: clean-recursive
782
783 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
784
785 distclean: distclean-recursive
786 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
787 -rm -f Makefile
788 distclean-am: clean-am distclean-generic distclean-hdr \
789 distclean-libtool distclean-local distclean-tags
790
791 dvi: dvi-recursive
792
793 dvi-am:
794
795 html: html-recursive
796
797 html-am:
798
799 info: info-recursive
800
801 info-am:
802
803 install-data-am: install-data-local install-docDATA
804
805 install-dvi: install-dvi-recursive
806
807 install-dvi-am:
808
809 install-exec-am: install-exec-local
810
811 install-html: install-html-recursive
812
813 install-html-am:
814
815 install-info: install-info-recursive
816
817 install-info-am:
818
819 install-man:
820
821 install-pdf: install-pdf-recursive
822
823 install-pdf-am:
824
825 install-ps: install-ps-recursive
826
827 install-ps-am:
828
829 installcheck-am:
830
831 maintainer-clean: maintainer-clean-recursive
832 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
833 -rm -rf $(top_srcdir)/autom4te.cache
834 -rm -f Makefile
835 maintainer-clean-am: distclean-am maintainer-clean-generic
836
837 mostlyclean: mostlyclean-recursive
838
839 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
840
841 pdf: pdf-recursive
842
843 pdf-am:
844
845 ps: ps-recursive
846
847 ps-am:
848
849 uninstall-am: uninstall-docDATA uninstall-local
850
851 .MAKE: $(am__recursive_targets) all install-am install-strip
852
853 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
854 am--refresh check check-am clean clean-cscope clean-generic \
855 clean-libtool clean-local cscope cscopelist-am ctags ctags-am \
856 dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
857 dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
858 distclean-generic distclean-hdr distclean-libtool \
859 distclean-local distclean-tags distcleancheck distdir \
860 distuninstallcheck dvi dvi-am html html-am info info-am \
861 install install-am install-data install-data-am \
862 install-data-local install-docDATA install-dvi install-dvi-am \
863 install-exec install-exec-am install-exec-local install-html \
864 install-html-am install-info install-info-am install-man \
865 install-pdf install-pdf-am install-ps install-ps-am \
866 install-strip installcheck installcheck-am installdirs \
867 installdirs-am maintainer-clean maintainer-clean-generic \
868 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
869 ps ps-am tags tags-am uninstall uninstall-am uninstall-docDATA \
870 uninstall-local
871
872
873 @UI_AUTO_AM@
874
875 all-local: ui-auto-all
876 clean-local: ui-auto-clean
877 distclean-local: ui-auto-distclean
878 install-data-local: ui-auto-install-data
879 install-exec-local: ui-auto-install-exec
880 uninstall-local: ui-auto-uninstall
881 dist-hook: ui-auto-dist
882
883 # "Source lines of code" estimation
884 x-sloc:
885 find src/ \( -name "*.[ch]pp" -o -name "*.[ch]" \) -a ! -wholename "*.svn/*" | xargs wc -l
886
887 # Tell versions [3.59,3.63) of GNU make to not export all variables.
888 # Otherwise a system limit (for SysV at least) may be exceeded.
889 .NOEXPORT:
+811
-0
NEWS less more
0 Summaries of important changes how ui-utilcpp is used or behaves.
1 See ChangeLog for more details.
2
3 Downloads:
4 o Generic: http://volvic.schlund.de/~tarball/ui-utilcpp
5 o Current: http://volvic.schlund.de/~tarball/ui-utilcpp/stable/ui-utilcpp-1.8.1.tar.gz
6 ================================================================
7 ui-utilcpp-1.8.1 (stable) (Tue May 7 12:33:00 UTC 2013):
8
9 Bugfix release. Fixes Socket::getId() to be more failsafe.
10
11 srken (4):
12 * [cec83b3] argl: Never commit release tarballs.
13 * [95ee948] .ui-auto.conf: Update stable branch to new stable
14 Debian branch.
15 * [d9ac711] Socket::getId: Catch std::exception, not
16 Exception (this method should never fail/raise Exception).
17 (cherry picked from commit
18 6267022c2165bb5fe9c0b2f914617a044d5bf7d6)
19 * [45f2d7e] * configure.ac: Prepare 1.8.1
20 ----------------------------------------------------------------
21 ui-utilcpp-1.8.0 (stable) (Mon May 7 16:35:09 UTC 2012):
22
23 New major stable release; this main changes are support for IPv6
24 for the socket library and the "cache code" removal (which has
25 travelled to ui-apache-support).
26
27 Note: The socket library changes inflicted library ABI-Changes
28 so that a backport to the stable branch was not feasable. The
29 new library main version is "9".
30
31 It also includes some other minor cumulated and windows related
32 changes:
33
34 ewetzel (1):
35 * [9d6d48b] WSAStartup and WSACleanup added
36
37 slinder (2):
38 * [0a9408e] fixed: yet another quota issue; forgot to divide
39 by blocksize, so the value was to big for unsigned long
40 * [6e64072] fixed: removed exceptions that were thrown in
41 Windows build; that led to unsalvagable db files
42
43 srken (21):
44 * [282988a] .ui-auto.conf: Update to build for sid/squeeze by
45 default.
46 * [f7af1ed] configure.ac: Update to a new developemnt version
47 to avoid confusion.
48 * [b1e6a30] Move docroot cache helpers to apache2 common
49 code.
50 * [2c2be8d] Move docroot cache helpers to apache2 common
51 code.
52 * [90bbd0e] Removing helper and container ("Nico Cache") from
53 build system (now in apache 2 common code).
54 * [bb1ea3e] Add source lines of code estimation.
55 * [062d74d] Sys: Add system wrappers for ::getaddrinfo and
56 ::getnameinfo.
57 * [2ac2ff7] Sockets: Support IPv6 for class INetSocket.
58 * [2cab04d] svn-ignore: Add *-cap tool utility.
59 * [43a897d] INetSocket: Disable default copy constructor.
60 * [2874025] c++: Fix last three compiler warnings.
61 * [bc9341f] Remove helper tools for already removed code:
62 ContainerUnitTests, HelperUnitTests.
63 * [7a11ec4] Doxygen: Update config to 1.7.6.1.
64 * [2a38892] Doxygen: Eliminate new warning with Caps.?pp.
65 * [144022e] Remove all vc-proprietary $Id$ tags from source.
66 * [37c898e] ui-auto: Add Eduard && Patrick to release notify
67 (for the Win port).
68 * [9cc86a9] Prepare stable release 1.8.0 (library main
69 version 9).
70 * [3d3f8d4] Prepare release notes for 1.8.0
71 * [b648f02] .ui-auto.conf: Update to new svn URL (TECITO
72 1544i).
73 * [793cf6c] .ui-auto.conf: Only build for squeeze.
74 * [031f6e6] Revert ".ui-auto.conf: Only build for squeeze."
75 ----------------------------------------------------------------
76 ui-utilcpp-1.6.0 (stable) (Fri Sep 17 14:07:36 UTC 2010):
77
78 New major release; this mainly adds support for linux
79 capabilities and windows quota.
80
81 Simon Linder (7):
82 fixed: make compilable for Win32 removed: some compiler warnings
83 Lots of clean up.
84 Disabled another warning.
85 fixed: Win2k8 support
86 SL added: Quota for W2k8
87 SL: fixed: Quota/W2k8
88 fixed: quota
89 fixed: UID was 1000 which it cannot be (always 0 for Windows)
90
91 Stephan Sürken (37):
92 RealTime: When normalizing negative values, silently set to 0 instead of throwing exception
93 Code cleanup: Fix possible warnings (envp not used).
94 Changing prefix "_" for POSIX calls back to non-prefixed.
95 Half reverting/fixing change for a a VC++ warning
96 Sys: Add getgrnam(3) c++ wrapper.
97 QuotaInfo: Fix class variable order which leads to gcc compile errors with -pedantic.
98 Fix ignore (used old "sp" prefix).
99 Sys: Add wrapper support for prctl (linux only).
100 Sys: Add C++ system wrappers for (nearly) all libcap library calls (linux only)
101 Add new header/class "Cap": Abstraction class for posix capabilities.
102 Capabilities: Add scope capabilities helper class CapScope.
103 Capabilities: Compatibility for libcap1 (Debian etch).
104 Capabilties: Add example program.
105 typo fix in dox docs.
106 docs: Fix some doxygen warnings.
107 * Socket: Add shutdown() method.
108 * Connection: Add simpleHttpRequest method.
109 src/ui-utilcpp/Sys.cpp: Add support for setfsuid and setfsgid linux calls.
110 src/ui-utilcpp/GetOpt: Add support for default argument values.
111 * src/ui-utilcpp/Sys: Fix three exception error strings.
112 * src/ui-utilcpp/GetOpt: Doxygen fix.
113 * src/ui-utilcpp/Sys.hpp: chown: default 2nd arg to -1.
114 * src/ui-utilcpp/Sys.cpp: Add support for "pseudo" calls getfsuid() and getfsgid().
115 * src/ui-utilcpp/Sys: getfsuid(): Workaround: Unlike described in the man page, result may be -1 sometimes; use geteuid() then.
116 * configure.ac: Add --enable-libproc: Optionally use libproc.
117 * src/ui-utilcpp/Sys: getfsuid must be implemented the hard way, parsing procfs.
118 * src/ui-utilcpp/Sys: getfsgid must be implemented the hard way, parsing procfs.
119 * src/ui-utilcpp/Sys.cpp: Cosmetic: Adapt exception texts for ui-utilcpp wording.
120 * src/ui-utilcpp/Sys.cpp: setfsuid: Fix check for error using new getfsuid|gid methods.
121 * src/ui-utilcpp/Sys: Fix throws to use ui-utilcpp convention.
122 * src/ui-utilcpp/Sys.cpp: Fix: Should not use ERRNO here.
123 * src/ui-utilcpp/Sys: Add support for linux' gettid(), and use that as default for 'fsuid' calls.
124 * src/ui-utilcpp/Sys: getenv(3): Fix: On error, throw (don't return null pointer).
125 fix revapx.
126 add NEWS entry for Simon's uid bug fix.
127 ----------------------------------------------------------------
128 ui-utilcpp-1.5.0 (unstable) (UNRELEASED):
129
130 Bug fixes:
131 * Windows: UID was 1000 which it cannot be (always 0 for
132 Windows) (Simon).
133 ----------------------------------------------------------------------
134 ui-utilcpp-1.4.0 (stable) (Fri Mar 27 10:36:04 UTC 2009):
135
136 This is a new stable version, updating to boost1.35 and some new
137 features. Old code is compatible, but needs to be recompiled; SO
138 main version dumped to 5 (stable).
139
140 Changes since 1.3.3:
141
142 * QuotaInfo:
143 - Add method for quota via rpc (for nfs).
144 - Add new class FS (dev+fstype instead of dev only) to
145 construct QuotaInfo (API extension, old code using
146 QuotaInfo is compatible but need to be recompiled).
147 - Add helper function file2fs to generate an FS (dev+fstype)
148 from any file on that fs.
149 - New class FQuotaInfo that uses the above tool
150 automatically.
151 - Change internal code so that methods tried depend on fs
152 type.
153 * Update tar format to tar-pax.
154 ----------------------------------------------------------------------
155 ui-utilcpp-1.3.3 (unstable) (Mon Jan 19 15:09:34 UTC 2009):
156
157 * Release with ui-auto from svn (adds man page for ui-utilcpp-version).
158 * Fix some g++ warnings only showing when compiling with -O2:
159 - PosixRegexx: Subclass not initialized.
160 - ContainerUnitTests: Uninitialized variable.
161 ----------------------------------------------------------------------
162 ui-utilcpp-1.3.2 (unstable) (Mon Dec 1 16:36:08 UTC 2008):
163
164 * Added documentation for cache_map and the functions in Helper namespace
165 * Added a unit test for the functions in Helper namespace
166 * modified Helper::to_time_t to return 0 if its given ptime value is special
167 * CmdLine: Fix a g++ warning (use std::string::size_type).
168 * Update doxygen config for doxygen 1.5.6 (fixing some warnings).
169 ----------------------------------------------------------------------
170 ui-utilcpp-1.3.1 (unstable) (Do 25. Sep 11:43:12 UTC 2008):
171
172 * Fixed atime setting with calls using iterator ranges
173 * Set library version to 4:0:0
174 ----------------------------------------------------------------------
175 ui-utilcpp-1.3.0 (unstable) (Di 23. Sep 16:11:00 UTC 2008):
176
177 * Introduced namespaces "Container" and "Helper"
178 * Added hash container Container::cache_map which is particular useful for cache entries
179 * Added several boost-related helper hunctions in helper/Boost.hpp
180 * Bug fix: Http::Connection: Protect constructors against exceptions
181 (potential missing data/fd removal on failing connects).
182 ----------------------------------------------------------------------
183 ui-utilcpp-1.2.0 (stable) (Thu Jun 19 10:38:02 UTC 2008):
184
185 Stable release 1.2; library main version dumped to 3 (stable).
186
187 * sp2ui: Fix: Also update macros SP_THROW to UI_THROW.
188 ----------------------------------------------------------------------
189 ui-utilcpp-1.1.40 (unstable) (Tue Jan 8 16:36:22 UTC 2008):
190
191 * boost test: Boost 34 deprecated some parts of API; updated to
192 a variant that works for both, 33 and 34.
193 * Tested against upcoming g++-3.4 and fixed all compile errors and
194 warnings.
195 * README/AUTHORS updates:
196 - SP->UI fixes.
197 - Temp. 1.2 todo section: remove hints to very old (fixed) bugs
198 - mv old SPRelease explanation to ui-auto.
199 ----------------------------------------------------------------------
200 ui-utilcpp-1.1.39 (unstable) (Mon Jan 7 16:48:56 UTC 2008):
201
202 Initial "ui" release:
203 * Update to ui-auto.
204 * Update _all_ "sp" prefixes to "ui" (macro names, file names, C++ namespaces).
205 * Add tool ui-utilcpp-sp2ui to automatically update projects using us.
206
207 Other changes:
208 * iconvctl() support (sloppy) for non-linux systems (using GNU libiconv).
209 ----------------------------------------------------------------------
210 sp-utilcpp-1.1.38 (unstable) (Fri Oct 19 13:01:20 UTC 2007):
211
212 * Http::HeaderField: Bugfix: Allow empty header field values when parsing line.
213 ----------------------------------------------------------------------
214 sp-utilcpp-1.1.37 (unstable) (Thu Aug 23 16:40:11 UTC 2007):
215
216 * Recoder: rfc2047 encoder: Fix possible segfaults due to typo; add
217 unit test for the segfault case.
218 ----------------------------------------------------------------------
219 sp-utilcpp-1.1.36 (unstable) (Wed Jul 11 15:28:12 UTC 2007):
220
221 * Recoder: Add "idn-email" (any-string w/ emails to string w/
222 IDN-encoded EMail domains) converter.
223 ----------------------------------------------------------------------
224 sp-utilcpp-1.1.35 (unstable) (Mon Jul 9 15:41:11 UTC 2007):
225
226 * Recoder: Add rfc2047 (Q-MIME) converter.
227 * Add dependency to "libidn" (for IDNA recode facility).
228 * Recoder: Add rfc3490 (International Domain Names, IDN) converter.
229 ----------------------------------------------------------------------
230 sp-utilcpp-1.1.34 (unstable) (Mon Mar 12 13:52:30 UTC 2007):
231
232 * Initial etch-based release (automake 1.10, sp-auto 103).
233 * New Sys-Macros: getpwnam.
234 * New Sys-Macros: confstr,getconf (POSIX system configuration variables).
235 * CmdLine.cpp: Using 320 chars (was 160) to read lines from scripts;
236 this should be enough for any decent script.
237 ----------------------------------------------------------------------
238 sp-utilcpp-1.1.33 (unstable) (Wed Jan 31 15:33:59 UTC 2007):
239
240 * Text.?pp: Switch to use boost's random to produce pseudo random
241 alpha-numeric keys.
242 * [win32] Remove "DiskInfo as quota method" hack from QuotaInfo.
243 * New "FsInfo" class (fs usage).
244 * New Sys-Macro: statvfs.
245 * Having the SP_PROG_CXX c++ checker (rules out g++-2.95): Removed
246 all gcc 2.95 compat code.
247 ----------------------------------------------------------------------
248 sp-utilcpp-1.1.32 (unstable) (Fri Nov 3 13:40:56 UTC 2006):
249
250 This release contains updates for sp-auto 0.2 only.
251 ----------------------------------------------------------------------
252 sp-utilcpp-1.1.31 (unstable) (Wed Sep 6 12:45:30 UTC 2006):
253
254 * Text: Some convenience stream operators.
255 ----------------------------------------------------------------------
256 sp-utilcpp-1.1.30 (unstable) (Fri Aug 18 14:10:16 UTC 2006):
257
258 * Add Http::Connection::getConnId() convenience method.
259 ----------------------------------------------------------------------
260 sp-utilcpp-1.1.29 (unstable) (Thu Aug 17 08:43:42 UTC 2006):
261
262 * Add "isToken()" for already existing StrVecs (speedup).
263 * Fix: Use "const ref" for join() method.
264 ----------------------------------------------------------------------
265 sp-utilcpp-1.1.28 (unstable) (Fri Jul 21 08:49:20 UTC 2006):
266
267 I did it again release
268
269 * added a perl like join method for strings
270 ----------------------------------------------------------------------
271 sp-utilcpp-1.1.27 (unstable) (Tue Jul 4 11:04:47 UTC 2006):
272
273 * New text tool: str2ascii.
274 * Http fix: Force pure ASCII values for any Headerfield.
275 ----------------------------------------------------------------------
276 sp-utilcpp-1.1.26 (unstable) (Wed Jun 7 17:05:12 UTC 2006):
277
278 "Jaber Al-Ahmad Al-Jaber Al-Sabah" weird Lama release.
279
280 * Obsolete tool "misc" removed.
281 * Bugfix File: Remove a number of now-obsolete exception specifications.
282 * New Sys-Macros: mkdir,rmdir.
283 * A number of cleanups && stabilisation in exception support code:
284 - Remove unused macros: SP_THROW_SP, SP_THROW_ERRNO_E.
285 - Sys::Exception: Making it non "Code" exception again (getErrNo() is
286 already available in all exceptions were aplicable).
287 - Set default errNo to 0=Success (was global errno); this means
288 exceptions not dealing w/ "errnos" always have getErrNo()==Success
289 instead of "random", which is more reasonable.
290 - SP_THROW_ERRNO, SP_THROW_CODE_ERRNO: Catching global errno early
291 in these two macros to avoid the possibility that code in
292 argument evaluation tampers w/ the value.
293 - Adding initial exception unit tests.
294 - Doc: Little exception HOWTO.
295 * "Shortcuts.hpp" fix: Make sure all namespaces are defined.
296 * PIDFile fix: Use chmod on file, defaults to "rw-r--r--".
297 ----------------------------------------------------------------------
298 sp-utilcpp-1.1.25 (unstable) (Thu May 18 16:05:12 UTC 2006):
299
300 Sam Peckinpah's Flue Season release.
301
302 * QuotaInfo: Adapt method order to real world: "linux v2", "linux xfs", "linux v1".
303 * QuotaInfo: Fix bug due to wrong struct comment in "linux version 2".
304 * QuotaInfo: Clean up quota methods "linux version 1" and "linux version 2".
305 * QuotaInfo: Use "effective uid" as default (was: real uid).
306 * Remove support for non-standard g++-2.95 code. Mark g++-2.95
307 compatibilty helper functions deprecated.
308 * Replace Sys:Exception by a CodeException (thus having errno
309 transported up in exception object).
310 * Add "Shortcuts.hpp" helper include.
311 * Doc updates:
312 - Obsolete && unmaintained docs removed: doc/ANNOUNCE+DEVELOPERS+MainPage.doc.
313 - Sys docs and other doxygen docs updates.
314 ----------------------------------------------------------------------
315 sp-utilcpp-1.1.24 (unstable) (Wed May 10 12:21:51 UTC 2006):
316
317 The Haunted World of Edward D. Wood, Jrelease.
318
319 * Bugfix: UnixSocket: Protect sun_path C-string from being undefined
320 when constructed via fd -- as it might be used in getId().
321 * Fix all doxygen warnings (needs doxygen >= 1.4.6 [in bpo for debian sarge]).
322 ----------------------------------------------------------------------
323 sp-utilcpp-1.1.23 (unstable) (Wed May 10 06:44:05 UTC 2006):
324
325 Dharmsamrat Paramhans Swami Madhavananda's atomic Reissack release.
326
327 * Sys-macros support for resource limits.
328 ----------------------------------------------------------------------
329 sp-utilcpp-1.1.22 (unstable) (Fri Apr 7 15:24:25 UTC 2006):
330
331 "Mad Jens" race car simulation release.
332
333 * More Sys-macros around uid.
334 ----------------------------------------------------------------------
335 sp-utilcpp-1.1.21 (unstable) (Thu Apr 6 12:11:00 UTC 2006):
336
337 Maria Gorokhovskaya's "moistured barrel" release.
338
339 * Two more unrecommended cerr uses fixed (from nightly tests).
340 * RealTimeScope: No default stream on destructor (fixes cerr usage).
341 * Recoder: Also add run(char,size) convenience method.
342 ----------------------------------------------------------------------
343 sp-utilcpp-1.1.20 (unstable) (Wed Apr 5 14:12:15 UTC 2006):
344
345 Sun Myung Moon's "world's largest point release".
346
347 * Recoder changes && fixes:
348 - Renaming all factory calls from "run" to "make", so nobody has
349 excuses any more ;).
350 - librecode: Fix deletion order.
351 - librecode: Fix: Move "task" into the factory level
352 (i.e. Converter::make()) as this obviously can't be thread-safe.
353 - Adding Recoder::run(char const *) for convenience.
354 * "Sys::"-Update completed.
355 - System/library calls added to Sys:
356 sleep(3), realpath(3), seteuid(2), setegid(2), quotactl(2),
357 malloc(2), calloc(2), free(2), [fl]stat(2), getenv(2),
358 open[m](2), read(2), write(2), fcntl(2), flock(2), getpguid(2),
359 chown(2), fcntl(2), socket(2), getpeername(2), getsockname(2),
360 setsockopt(2), recv(2), send(2), listen(2), bind(2), connect(2),
361 select(2), socketpair(2), iconv_open(3), iconv_close(3),
362 gettimeofday(2), settimeofday(2).
363 - This triggered a bunch of updates (mostly less code) throughout
364 the code. Some user-visible changes:
365 - Rm obsolete FileDescriptor::read/write wrappers (now in Sys).
366 - Renaming FileDescriptor::stdRead/stdWrite virtuals to read/write.
367 - Exception: Rm SP_THROW_CODE_ERRNO_E macro: No longer needed w/ Sys.
368 - File/Socket: Code cleanup; now-obsolete (by Sys::, we now catch
369 down to throw matching the abstraction) exception codes removed:
370 CloseErr_, SocketErr_, HostnameErr_, PathErr_, ReuseaddrErr_,
371 SetuidErr_, PermErr_.
372 - This also brings down the number of WIN32 ifdefs (from about 59
373 to 35 in non-Sys code); more is possible, only obvious "should work"
374 cases updated.
375 ----------------------------------------------------------------------
376 sp-utilcpp-1.1.19 (unstable) (Thu Mar 30 15:13:51 UTC 2006):
377
378 "Hector Abhayavardhana"'s librecode sucks release.
379
380 * New RecoderCache singleton to cache recoders (speed improvments &&
381 workaround against librecode memory leaks).
382 * REMOVING PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread (also
383 purges --enable-linux-atomic configure option).
384 ----------------------------------------------------------------------
385 sp-utilcpp-1.1.18 (unstable) (Thu Mar 23 17:34:03 UTC 2006):
386
387 Sys-omat, cleanup && bugfixing "Stirling Silliphant" release.
388
389 * New Sys.?pp: Long-due "errno exception" drop-in replacements for
390 system(2) and library(3) calls.
391 * Partial updates for the above in Thread, File (not finished).
392 * Thread: New fd2DevNull() helper tool.
393 * Thread: Harden "daemonize" to reopen std fd's 0,1,2 to protect
394 against library xyz reading from/writing to fds.
395 * PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread. Will
396 be removed on next release unless there are vetos.
397 ----------------------------------------------------------------------
398 sp-utilcpp-1.1.17 (unstable) (Wed Mar 22 14:01:42 UTC 2006):
399
400 Sid-able "Zsa Zsa Gabor" release.
401
402 * File: New little helper class "AutoRemoveFile".
403 * Separate File.?pp into File.?pp + Socket.?pp (confusing, too much code).
404 * Text: Remove tool function "sha1sum" as this is not used, unavaible
405 for win32 and code is missing in newer libcommoncpp2 upstreams
406 (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352122).
407 * --disable-linux-atomic -> --enable-linux-atomic: Opt-in, as this
408 is non-standard.
409 ----------------------------------------------------------------------
410 sp-utilcpp-1.1.16 (unstable) (Tue Feb 28 13:35:04 UTC 2006):
411
412 * QuotaInfo: Fix compile for newer systems (e.g. Debian Etch) using
413 _LINUX_QUOTA_VERSION = 2 for 2.6 style quota in quota.h.
414 * File: New "SocketPair" abstraction (helps writing tests for
415 protocols).
416 * File: PIDFile: Check for pid file existence. Default is now to
417 throw if found (was: overwrite silently).
418 ----------------------------------------------------------------------
419 sp-utilcpp-1.1.15 (unstable) (Fri Feb 17 09:49:10 UTC 2006):
420
421 * Time: Add ScopeRealTime class (easy latency logging for scopes).
422 * Http::URL: addParam() support; generate URL().
423 ----------------------------------------------------------------------
424 sp-utilcpp-1.1.14 (unstable) (Thu Feb 9 21:18:01 UTC 2006):
425
426 * Http: Update Exception for debug support; use SP_THROW for all
427 exceptions.
428 * Http: Add Http.hpp for convenience: Include all http headers.
429 * Http: New class URL: Parse HTTP URLs (rfc 2616, 3.2.2).
430 * Http: New class URLGet: Simple HTTP GET impl. based on given HTTP
431 URL.
432 * Http: StatusLine: Allow status lines w/o "reason" text.
433 * Bugfix strerror(errNum): Actually use errNum arg, not errno.
434 * Exception: Updated Exception base class internals; new errno
435 macros "*_E" to give errNo explicitely.
436 * Bugfix File: Fixes w/ new *_E macros where appropriate (fixes
437 wrong errno messages in some circumstances).
438 ----------------------------------------------------------------------
439 sp-utilcpp-1.1.13 (unstable) (Tue Jan 31 18:00:47 UTC 2006):
440
441 * File: New tools: getenv(), PIDFile class, guessConfFile.
442 ----------------------------------------------------------------------
443 sp-utilcpp-1.1.12 (unstable) (Wed Jan 25 18:15:36 UTC 2006):
444
445 * Text: strerror(int) now defaults to strerror(int=error).
446 * Text: Separate "PosixRegex" into own header to avoid include wars.
447 * Text: New tool strVec2Str.
448 * _More_ socket id fixes:
449 - Fix possible random c-string w/ getPeerId/UnixSockets.
450 - Enable ids when not connected/bound.
451 - Remove obsolete UnixSocket::getPath().
452 ----------------------------------------------------------------------
453 sp-utilcpp-1.1.11 (unstable) (Thu Jan 5 17:08:26 UTC 2006):
454
455 * Sockets::getId() should now finally work reliably. Honest.
456 * Sockets:bind/connect/listen: Now all return *this for convenience.
457 * Sockets:bind(): Now virtual like connect() for convenience.
458 * UnixSocket:unixBind/bind(): Default for "silent unlink" now "true".
459 ----------------------------------------------------------------------
460 sp-utilcpp-1.1.10 (unstable) (Wed Jan 4 15:27:32 UTC 2006):
461
462 * UnixSocket:bind(): Silent unlink support for destructor.
463 * UnixSockets: getId(): Fix broken unix path (socklen).
464 * INetSockets: getId(): Fix broken port (ntoh).
465 ----------------------------------------------------------------------
466 sp-utilcpp-1.1.9 (unstable) (Fri Dec 30 15:22:31 UTC 2005):
467
468 * SetCookie/SetCookies: Const/add(key) -> Const/add(key, value="") for convenience.
469 * SetCookie: Support for defaults on composition (expires, path, domain).
470 * Text: New tool functions md5sum, sha1sum; update build system to
471 use CommonCPP "--stdlibs" (includes ccext2 w/ digests).
472 * Cookie/SetCookie: Add prefix support for cookie names.
473 * Text: Replacing some strange/possibly dangerous usage of string
474 constructor w/ explicit resize().
475 ----------------------------------------------------------------------
476 sp-utilcpp-1.1.8 (unstable) (Tue Dec 20 17:18:51 UTC 2005):
477
478 * Add Util::strerror (wrapper for ::strerror(3)); replacing all calls.
479 * Add --disable-strerror (to fix known strange segfaults on static
480 compilations running under wrong libc).
481 ----------------------------------------------------------------------
482 sp-utilcpp-1.1.7 (unstable) (Mon Dec 19 13:15:17 UTC 2005):
483
484 * Bugfix: SetCookie value parsing.
485 * Bugfix: URLEncode: Encode non-ASCII characters.
486 * Text.hpp: Add StrVec, StrList, StrMap convenience shortcuts.
487 * Fixing ccgnu2/pthread library dependency.
488 ----------------------------------------------------------------------
489 sp-utilcpp-1.1.6 (unstable) (Fri Dec 2 16:39:31 UTC 2005):
490
491 * Cookies/SetCookies: Good (tm) interface updates/enhancements (required for shop).
492 * Partly RFC 2616 (HTTP 1.1) implementation: header, cookie, connection.
493 * Text: New tool function "getlineCRLF" (std::getline trashing trailing CR).
494 * Text: New tool function "strtoks" (like strtok, but allowing multiple one-char delims).
495 * Text: "EmptyString_" static helper.
496 * File: Socket implementation: Fix up getId() to generically use
497 getsockname(); Add getPeerId() using getpeername().
498 ----------------------------------------------------------------------
499 sp-utilcpp-1.1.5 (unstable) (Fri Jun 17 15:18:03 UTC 2005):
500
501 * Update to sp-auto >= 0.1.1 (fixes cruft-leftover-bug in tarball).
502 ----------------------------------------------------------------------
503 sp-utilcpp-1.1.4 (unstable) (Fri Jun 17 12:04:01 UTC 2005):
504
505 - First release using "sp-auto" as meta-maintainer tool.
506 - Doxygen docs update, most warnings fixed.
507 - Recoder updates:
508 - librecode converter: Using task level to allow sloppy converting.
509 - Add general "sloppy" tag for Recoder objects (active for converters
510 that support it - i.e., currently librecode only).
511 - Adding first unit test to test (some) convertions.
512 - Improving recoder test tool: Input charset guessing, sloppy support.
513 - Implementing proper converter exception handling; exception error
514 texts much improved; errno support where applicable.
515 - Move more control up to Converter father class.
516 - Fixing all todos/bugs notes.
517 - Adding libboost unit test skeleton.
518 - Fixed memory leak in Recoder.[ch]pp
519 - "g++-3.4 -pedantic"able (nightly test now lethal).
520 - Add CharsetMagic: Heuristics to guess char encodings (from file).
521 ----------------------------------------------------------------------
522 sp-utilcpp-1.1.3 (Tue Feb 15 15:17:14 UTC 2005):
523
524 This is the unstable relase series 1.1.x. DON'T USE THIS for any
525 PRODUCTION code. Purpose of this release is to provide an easy way to
526 TEST it and ideally report bugs.
527
528 - Corrections so it (mostly) works with "g++-3.4 -pedantic".
529 - streambuf binary data bug fixed.
530 - File.cpp: Added proper error handling for stdRead/stdWrite.
531 - New little helpers: freeAnySeqContainer, strdup, CStrArray.
532 - QuotaInfo: Support for kernel 2.6 interface (version 1 and version 2).
533 - Dropping library diversification. Simplify autotools.
534 - Complete rewrite of Recoder, new Converter+Conversions setup.
535 - +asciiCAPS +isToken text utilities.
536 - +eato,etos: Converter tools with error handling.
537 - Helper class CFileStream, helper method copyFile.
538 - SMLog[Mono]: Support for logging to clog. Support for 4 extra
539 debug levels. Giving severity levels as human readable
540 3-char-prefix. Making LOG_ADD postfix.
541 - Text, File: Much better exception error descriptions.
542 - tos,ato: Add support for arbitrary stream modifier (converting
543 from/to std::hex etc). Removing explicit str2str converter.
544 ----------------------------------------------------------------------
545 sp-utilcpp-1.1.2 (Mon Aug 30 12:31:33 UTC 2004):
546
547 This is the unstable relase series 1.1.x. DON'T USE THIS for any
548 PRODUCTION code. Purpose of this release is to provide an easy way to
549 TEST it and ideally report bugs.
550
551 - Fix: auto_abstract -> auto_base, removing abstract destructor,
552 adding set() method.
553 - Adding some upgrade notes to README.
554 - Merging .strap_run/.strap_dev into ".strap_dev [runonly|ggcenv]".
555 - Use ./configure to produce that file. It can now be sourced
556 properly (no need for backticks).
557 - Default bevaviour now is to taint autotool-supported variables
558 only. This should always work if your project using this library
559 alos uses autotools.
560 - "gccenv" sets the gcc environment variables as before. autotools
561 test may fail unexpectedly.
562 - Protecting all enum values from preprocessor by naming convention
563 ("CatDog_" like for constant class variables).
564 - Update to automake 1.9, using "tar-ustar < 155" as archive
565 format. This fixes both, the "filename too long" and the "make dist
566 keeps silent" bug. Warn about libtool <1.5.8 in strap_auto.
567 - Moving SPRelease/SPUpload to src/tools.
568 ----------------------------------------------------------------------
569 sp-utilcpp-1.1.1 (Fri Aug 13 13:14:32 UTC 2004):
570
571 This is the unstable relase series 1.1.x. DON'T USE THIS for any
572 PRODUCTION code. Purpose of this release is to provide an easy way to
573 TEST it and ideally report bugs.
574
575 * Added Dominik's proposed setup for library checking (in templates
576 see http://volvic.schlund.de/pipermail/abteilung/2003-July/000315.html ),
577 albeit with these signifcant changes:
578 - Don't use a unsigned int as assembled version number. It's not
579 portable (to M$ compilers, for example), as STDC does not guarantee
580 unsigned int to be 4 bytes. Instead, seperate functions/variables/defines
581 for each version part (major,minor,patch) are provided.
582 - Don't use libtools (IF:REV:AGE) version schema for checking. Instead, this
583 is recomputed to the real (system) version numbers. This also fixes an order
584 error that is still in templates.
585 - A check macro is added to protect against header/library implementation
586 mismatch at run time.
587 - Not using acinclude.m4 (not recommended), using recommende m4 directory setup
588 instead (see automake docs).
589 - The needed library macros are "extending aclocal" as recommended in the automake
590 docs. I.e., you don't use the macros by copying to your project, but by installing
591 sp-utilcpp, which will automatically (depending on how you install it, you might
592 still need to extend the global aclocal dirlist) extend the sclocal macro path.
593 Libraries that don't need sp-utilcpp otherwise should still copy these macros,
594 though. The macros are in "m4/sp-lib.m4".
595 For the time being, I recommend to copy the setup from sp-utilcpp, not templates.
596 * src/examples renamed to src/tools.
597 * DESTDIR support for local install targets.
598 * Adding checks for librecode, doxygen, xfs headers.
599 * Adding mass string replace utility functions "strrpl".
600 ----------------------------------------------------------------------
601 sp-utilcpp-1.1.0 (Mon May 24 13:40:55 UTC 2004):
602
603 This is the unstable relase series 1.1.x. DON'T USE THIS for any
604 PRODUCTION code. Purpose of this release is to provide an easy way to
605 TEST it and ideally report bugs.
606
607 * Removed class CVector. STDC++-2003 defines std::vector to have
608 memory in one chunk.
609 * Removed file CSLog. Obsolete.
610 * Removed file Regexx. Obsolete. Never worked.
611 * Removed file SPUtil.hpp. This was compat for unstable versions < 1.0.
612 * Removed class GCCFDStream (class using gcc extensions). With 3.4,
613 new changes. Too silly to maintain this with even more ifdefs.
614 * Removed class Random: Seemed strange enough to me.
615 * New template classes: auto_abstract
616 auto_cvec auto_free
617 Handle (memory pointers) and freeing of memory that does not work
618 with standard delete (auto_ptr).
619 * Removed class ArrDelAdapter: Use auto_cvec.
620 * Removed class NullOStream: I don't think we need this.
621 * Update to CommonCPP2 (SMLog macros only).
622 * Some updates for "g++-3.4 -pedantic" (one internal and some external
623 problems left).
624 * More straighforward directory layout, putting all C++-Source under
625 src/: sp-utilcpp (the library) and examples (Example applications).
626 * New Header & libary Layout:
627
628 Exception
629 Time
630 Text libsp-utilcpp-cppsys
631 File Run time dependencies on
632 Thread STDC, STDC++ and system only.
633 GetOpt
634 Misc
635 ...
636
637 CmdLine Specials
638 Recode Extra run time dependencies, header
639 SMLog* only, etc..
640 ...
641 * Imported from tincas: Recode, C++ wrapper for GNU librecode
642 (class, file, special library).
643 - Updates to support any conversion in a efficient fashion, not just
644 string->string via copy.
645 - Imporved error/exception handling.
646 * Imported from tincas: QuotaInfo (class, file, cppsys).
647 * Imported from tincas: strtok, RealPath, istream2Vector (Text, cppsys).
648 - strtok: Update to support string delimiters (Thorsten).
649 * Update to new exception scheme:
650 - SP::Exception: S+P father exception class (at least when u use us).
651 In short: std::exception interface, handling for an error
652 description and a debug information string. Special support for
653 errno handling provided.
654 - SP:.Util::Excpetion derived from SP::Exception.
655 - SP::Util::CodeException: SP::Util::Exception template adding the simple facility to add an
656 (arbitrary) error code to SP::Util::Exception.
657 => Anything in namespace SP::Util does
658 now throw SP::Util::Exception only (usual exceptions apply for
659 indirect throws; ideally, these are catched down internally and
660 encapsulated).
661 - Updated all classes to have a subclass "Exception". Classes that used to throw
662 enums are now throwing "CodeException<ErrorCode>", with ErrorCode being the old
663 enum-type exceptions, and the subclass "Exception" being a typedef to that.
664 - 4 basic macros provided to provide for automatic file name and line no debugging.
665
666 => An "Exception" for every context, enabling diversed or generic
667 catches, automatic errno errors and file name/line no debugging.
668
669 Read more about that in the doxygen docs.
670
671 * Code/style review of all files:
672 - Generic class variable naming convention ("_myName").
673 - Some const correctness correctiotions (note: correct last word).
674 - Removing all "one line scopes".
675 - Complete doxygen documentation, no warnings with 1.3.7.
676 ----------------------------------------------------------------------
677 sp-utilcpp-1.0.20040430 (Fri Apr 30 12:18:24 UTC 2004):
678
679 Patch release:
680
681 * Bugfix for GetOpt(Markus): Buggy use of char instead of int. This
682 produced problems on a (at least) powerpc arch.
683 ----------------------------------------------------------------------
684 sp-utilcpp-1.0.20030812:
685
686 Convenience fix release:
687 - Removing hardcoded "-Werror" from Makefile.ams.
688 - Fixes to make it compile with gcc's "-pedantic-error".
689 Note0: The "default value" template for "long long" (there is no "long long") is removed.
690 Note1: Variable length c-arrays replaced by std::string resp. std::vector; this should work
691 fine on almost all implementations, but STDC++ does not ensure memory management is in one
692 chunk. In unstable, there is now "CVector" as replacement to safely and portably replace
693 variable length arrays where the data must be guaranteed to be in one chunk.
694 - Changes to make it pass rc tests "cppstyle_nonrefconst.log", "cppstyle_namespace_none.log".
695 ----------------------------------------------------------------------
696 sp-utilcpp-1.0.20030807:
697
698 Bugfix release. Braindead linking problem occuring with
699 libtool-1.4.3 only (needs extra -lpthread) fixed.
700 ----------------------------------------------------------------------
701 sp-utilcpp-1.0.20030801:
702
703 Bugfix release: Make it work with g++-3.3.
704 ----------------------------------------------------------------------
705 sp-utilcpp-1.0.20030318:
706
707 This is the very first stable release of sp-utilcpp.
708
709 There has been busy development from the last (unstable)
710 release. Some important new features:
711
712 * A number of small tools/utilities for every day use (URL, daemonize, ...)
713 * A (complete, yet very simple) alternate framework for Linux multithreading.
714 * A alternate framework for file descriptor handling, POSIX and BSD file locking,
715 TCP and Unix sockets, and a general stream[buf] template for all file descriptor
716 based classes.
717 * RealTimeStamp: Encapsulation of BSD's gettimeofday(2); can be used to
718 measure latency in realtime (precision of 10^-6 seconds).
719 ----------------------------------------------------------------------
720 sp-utilcpp-0.1.20021120: unstable
721
722 * Significant Source Code updates:
723 - Header file dependencies moved back to the header files directly.
724 - Completely compilable with GCC 3.X.
725 - Completely documented (i.e., doxygen does no longer produce warnings).
726
727 * New:
728 - PosixRegex: Wrapper class for POSIX.2 regex functions. Allows s.th.
729 like "if (PosixRegex("ABC.*").run("ABC-Pflaster")) ...". I never could
730 make proper use of the old "Regex" class, hence this rewrite.
731
732 * New from "dvdb" project:
733 - "SMLogMono": Analogous to "SMLog", this provides a infrastructure for
734 logging in a non-multithreaded environment (not using Common C++).
735 - "NaiveCloneThread": Simple ("naive") thread implementation based
736 on Linux clone(2); also added a mutex class (AtomicMutex), a guard class
737 (MutexLock) and a pseudo thread class using fork(2) (ForkThread).
738 Motivation: "NaiveCloneThread" under Linux can be useful if you need real
739 multithreading, but for some reason you cannot use "pthreads".
740 - "CmdLine": Simple command line abstraction; automatically shows help
741 on commands, handles errors, can set variables, does simple variable
742 expansion. This was created for use in "dvdb-tool", but may be of
743 more common use.
744
745 * New from "tincas" project:
746 - "Conversion": New class "Conversion" added, with currently
747 two tool function to convert from decimal to any base.
748 - "SP::Util::daemonize(...)": Should be used whenever a program needs to
749 go into background.
750
751 * SPRelease: now uses "cvs edit" before trying to edit files for those
752 who use that cvs feature; does no longer add release tarballs into CVS
753 (this should be done manually if needed).
754 ----------------------------------------------------------------------
755 sp-utilcpp-0.1.20020916: unstable
756
757 * Now completely diversified: "Toolbox" is seperated into "ToolboxCPP" (code
758 depends on STDC++ only, without templates), "ToolboxSTL" (code depends on STDC++
759 only, with templates) and "ToolboxSys" (code may depend on STDC++ plus system
760 code (POSIX, Linux, BSD, ...). This thoroughly solves the compile time (header
761 includes) dependency problems.
762 A compatability header "Toolbox" ist still provided, but should not be used.
763 * Libraries are build for all segments of the library, where each library now
764 has its real and exact dependencies. This thoroughly solves the run time
765 dependency problems.
766 A compatability library containing all code is still provided, but should not
767 be used.
768 * Header includes are now suffixed "hpp", as required by "templates".
769 Compatability headers are included for all former (not new) header files.
770 * Includes a number of small fixes in documentation, examples, and SPRelease.
771 ----------------------------------------------------------------------
772 sp-utilcpp-0.1.20020912:
773
774 * The "SPRelease" script now supports "AC_INIT"-based ("modern", automake1.6)
775 "configure.ac"s and projects that use manual "ChangeLog"s.
776 * Using Include-Scheme as indicated in "templates" - i.e., all includes from
777 header files are removed, and the synopsis for these files is updated in the
778 documentation. NOTE: This moves responsibility for including all neccessary
779 files completely to the *.cpp files, so existing source might need some update.
780 * GetOpt convenience imrovements: new method wrongUsage(), method printUsage()
781 now has an optional title argument.
782 ----------------------------------------------------------------------
783 sp-utilcpp-0.1.20020902: unstable
784
785 * Following improved Styleguides for shared libraries (cmp. http://manwe.schlund.de/~absurd/spprojects/).
786 I.e. all unneeded library dependencies are removed, CSLog support is removed from proper library and added
787 into an alternative library with postfix "-global".
788 This enables us to use sp-utilcpp without having dependencies on all libraries sp-utilcpp itself
789 uses. Thus, for example, sp-utilcpp can now be used directly together with dvdb/libpth.
790 ["libccgnu" itself has global variables, and, as sideeffect, always needs pthread, which means that the
791 binary will execute pthread initializations, which will conflict with (at least) "libpth") ].
792 ----------------------------------------------------------------------
793 sp-utilcpp-0.1.20020830: unstable
794
795 * Now compiling with "-pthread", which make this library compatible for use in
796 program using pthreads (i.e. tincas).
797 * SPRelease slightly improved -- it now automates snapshot tarball versions.
798 * More general cleanup and improvements in documentation/automake/autoconf/libtool.
799 ----------------------------------------------------------------------
800 sp-utilcpp-0.1.20020822: unstable
801
802 * Changed name; this effects the include path, the library and the
803 project name. The change was necessary because of some part of
804 CVS doesn't work whith paths including "+". So, explicitly:
805 Project name = "sp-utilcpp"
806 include synopsis = "#include <sp-utilcpp/*.h>"
807 library name = "libsp-utilcpp"
808 * Added new class "URL" which is related to URL specific
809 functionality.
810 ----------------------------------------------------------------------
0 README for ui-utilcpp
1 =====================
2
3 C++ utility library. This library should provide some common
4 code base for C++ programming.
5
6 Copyright (c) 2001-2014 United Internet AG, under LGPLv3.
7
8
9 Upgrading from 1.0
10 ------------------
11
12 -> Includes:
13
14 Old New
15
16 ToolboxSys Some of File, Thread, Time, Text.
17 ToolboxCPP Some of Text, Time, File.
18 ToolboxSTL Some of Text, Time, File, Misc.
19
20 -> Interface changes:
21
22 strtok: Separator must be changed from char ('.') to std::string
23 (",").
24
25 -> Exceptions:
26
27 All catch() blocks must be updated. In the simplest case, the old
28 exception handler can be replaced by
29
30 catch (UI::Util::Exception const & e)
31 {
32 std::cerr << e.what() << std::endl; // or whatever
33 }
34
35 For diversed error handling, use the respective exception classes if
36 needed.
0 # generated automatically by aclocal 1.14.1 -*- 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 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23 #
24 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
26 # Foundation, Inc.
27 # Written by Gordon Matzigkeit, 1996
28 #
29 # This file is free software; the Free Software Foundation gives
30 # unlimited permission to copy and/or distribute it, with or without
31 # modifications, as long as this notice is preserved.
32
33 m4_define([_LT_COPYING], [dnl
34 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
35 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
36 # Foundation, Inc.
37 # Written by Gordon Matzigkeit, 1996
38 #
39 # This file is part of GNU Libtool.
40 #
41 # GNU Libtool is free software; you can redistribute it and/or
42 # modify it under the terms of the GNU General Public License as
43 # published by the Free Software Foundation; either version 2 of
44 # the License, or (at your option) any later version.
45 #
46 # As a special exception to the GNU General Public License,
47 # if you distribute this file as part of a program or library that
48 # is built using GNU Libtool, you may include this file under the
49 # same distribution terms that you use for the rest of that program.
50 #
51 # GNU Libtool is distributed in the hope that it will be useful,
52 # but WITHOUT ANY WARRANTY; without even the implied warranty of
53 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54 # GNU General Public License for more details.
55 #
56 # You should have received a copy of the GNU General Public License
57 # along with GNU Libtool; see the file COPYING. If not, a copy
58 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
59 # obtained by writing to the Free Software Foundation, Inc.,
60 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
61 ])
62
63 # serial 57 LT_INIT
64
65
66 # LT_PREREQ(VERSION)
67 # ------------------
68 # Complain and exit if this libtool version is less that VERSION.
69 m4_defun([LT_PREREQ],
70 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
71 [m4_default([$3],
72 [m4_fatal([Libtool version $1 or higher is required],
73 63)])],
74 [$2])])
75
76
77 # _LT_CHECK_BUILDDIR
78 # ------------------
79 # Complain if the absolute build directory name contains unusual characters
80 m4_defun([_LT_CHECK_BUILDDIR],
81 [case `pwd` in
82 *\ * | *\ *)
83 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
84 esac
85 ])
86
87
88 # LT_INIT([OPTIONS])
89 # ------------------
90 AC_DEFUN([LT_INIT],
91 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
92 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
93 AC_BEFORE([$0], [LT_LANG])dnl
94 AC_BEFORE([$0], [LT_OUTPUT])dnl
95 AC_BEFORE([$0], [LTDL_INIT])dnl
96 m4_require([_LT_CHECK_BUILDDIR])dnl
97
98 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
99 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
100 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
101 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
102 dnl unless we require an AC_DEFUNed macro:
103 AC_REQUIRE([LTOPTIONS_VERSION])dnl
104 AC_REQUIRE([LTSUGAR_VERSION])dnl
105 AC_REQUIRE([LTVERSION_VERSION])dnl
106 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
107 m4_require([_LT_PROG_LTMAIN])dnl
108
109 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
110
111 dnl Parse OPTIONS
112 _LT_SET_OPTIONS([$0], [$1])
113
114 # This can be used to rebuild libtool when needed
115 LIBTOOL_DEPS="$ltmain"
116
117 # Always use our own libtool.
118 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
119 AC_SUBST(LIBTOOL)dnl
120
121 _LT_SETUP
122
123 # Only expand once:
124 m4_define([LT_INIT])
125 ])# LT_INIT
126
127 # Old names:
128 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
129 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
130 dnl aclocal-1.4 backwards compatibility:
131 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
132 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
133
134
135 # _LT_CC_BASENAME(CC)
136 # -------------------
137 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
138 m4_defun([_LT_CC_BASENAME],
139 [for cc_temp in $1""; do
140 case $cc_temp in
141 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
142 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
143 \-*) ;;
144 *) break;;
145 esac
146 done
147 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
148 ])
149
150
151 # _LT_FILEUTILS_DEFAULTS
152 # ----------------------
153 # It is okay to use these file commands and assume they have been set
154 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
155 m4_defun([_LT_FILEUTILS_DEFAULTS],
156 [: ${CP="cp -f"}
157 : ${MV="mv -f"}
158 : ${RM="rm -f"}
159 ])# _LT_FILEUTILS_DEFAULTS
160
161
162 # _LT_SETUP
163 # ---------
164 m4_defun([_LT_SETUP],
165 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
166 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
167 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
168 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
169
170 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
171 dnl
172 _LT_DECL([], [host_alias], [0], [The host system])dnl
173 _LT_DECL([], [host], [0])dnl
174 _LT_DECL([], [host_os], [0])dnl
175 dnl
176 _LT_DECL([], [build_alias], [0], [The build system])dnl
177 _LT_DECL([], [build], [0])dnl
178 _LT_DECL([], [build_os], [0])dnl
179 dnl
180 AC_REQUIRE([AC_PROG_CC])dnl
181 AC_REQUIRE([LT_PATH_LD])dnl
182 AC_REQUIRE([LT_PATH_NM])dnl
183 dnl
184 AC_REQUIRE([AC_PROG_LN_S])dnl
185 test -z "$LN_S" && LN_S="ln -s"
186 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
187 dnl
188 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
189 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
190 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
191 dnl
192 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
193 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
194 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
195 m4_require([_LT_CMD_RELOAD])dnl
196 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
197 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
198 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
199 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
200 m4_require([_LT_WITH_SYSROOT])dnl
201
202 _LT_CONFIG_LIBTOOL_INIT([
203 # See if we are running on zsh, and set the options which allow our
204 # commands through without removal of \ escapes INIT.
205 if test -n "\${ZSH_VERSION+set}" ; then
206 setopt NO_GLOB_SUBST
207 fi
208 ])
209 if test -n "${ZSH_VERSION+set}" ; then
210 setopt NO_GLOB_SUBST
211 fi
212
213 _LT_CHECK_OBJDIR
214
215 m4_require([_LT_TAG_COMPILER])dnl
216
217 case $host_os in
218 aix3*)
219 # AIX sometimes has problems with the GCC collect2 program. For some
220 # reason, if we set the COLLECT_NAMES environment variable, the problems
221 # vanish in a puff of smoke.
222 if test "X${COLLECT_NAMES+set}" != Xset; then
223 COLLECT_NAMES=
224 export COLLECT_NAMES
225 fi
226 ;;
227 esac
228
229 # Global variables:
230 ofile=libtool
231 can_build_shared=yes
232
233 # All known linkers require a `.a' archive for static linking (except MSVC,
234 # which needs '.lib').
235 libext=a
236
237 with_gnu_ld="$lt_cv_prog_gnu_ld"
238
239 old_CC="$CC"
240 old_CFLAGS="$CFLAGS"
241
242 # Set sane defaults for various variables
243 test -z "$CC" && CC=cc
244 test -z "$LTCC" && LTCC=$CC
245 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
246 test -z "$LD" && LD=ld
247 test -z "$ac_objext" && ac_objext=o
248
249 _LT_CC_BASENAME([$compiler])
250
251 # Only perform the check for file, if the check method requires it
252 test -z "$MAGIC_CMD" && MAGIC_CMD=file
253 case $deplibs_check_method in
254 file_magic*)
255 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
256 _LT_PATH_MAGIC
257 fi
258 ;;
259 esac
260
261 # Use C for the default configuration in the libtool script
262 LT_SUPPORTED_TAG([CC])
263 _LT_LANG_C_CONFIG
264 _LT_LANG_DEFAULT_CONFIG
265 _LT_CONFIG_COMMANDS
266 ])# _LT_SETUP
267
268
269 # _LT_PREPARE_SED_QUOTE_VARS
270 # --------------------------
271 # Define a few sed substitution that help us do robust quoting.
272 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
273 [# Backslashify metacharacters that are still active within
274 # double-quoted strings.
275 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
276
277 # Same as above, but do not quote variable references.
278 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
279
280 # Sed substitution to delay expansion of an escaped shell variable in a
281 # double_quote_subst'ed string.
282 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
283
284 # Sed substitution to delay expansion of an escaped single quote.
285 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
286
287 # Sed substitution to avoid accidental globbing in evaled expressions
288 no_glob_subst='s/\*/\\\*/g'
289 ])
290
291 # _LT_PROG_LTMAIN
292 # ---------------
293 # Note that this code is called both from `configure', and `config.status'
294 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
295 # `config.status' has no value for ac_aux_dir unless we are using Automake,
296 # so we pass a copy along to make sure it has a sensible value anyway.
297 m4_defun([_LT_PROG_LTMAIN],
298 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
299 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
300 ltmain="$ac_aux_dir/ltmain.sh"
301 ])# _LT_PROG_LTMAIN
302
303
304
305 # So that we can recreate a full libtool script including additional
306 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
307 # in macros and then make a single call at the end using the `libtool'
308 # label.
309
310
311 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
312 # ----------------------------------------
313 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
314 m4_define([_LT_CONFIG_LIBTOOL_INIT],
315 [m4_ifval([$1],
316 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
317 [$1
318 ])])])
319
320 # Initialize.
321 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
322
323
324 # _LT_CONFIG_LIBTOOL([COMMANDS])
325 # ------------------------------
326 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
327 m4_define([_LT_CONFIG_LIBTOOL],
328 [m4_ifval([$1],
329 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
330 [$1
331 ])])])
332
333 # Initialize.
334 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
335
336
337 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
338 # -----------------------------------------------------
339 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
340 [_LT_CONFIG_LIBTOOL([$1])
341 _LT_CONFIG_LIBTOOL_INIT([$2])
342 ])
343
344
345 # _LT_FORMAT_COMMENT([COMMENT])
346 # -----------------------------
347 # Add leading comment marks to the start of each line, and a trailing
348 # full-stop to the whole comment if one is not present already.
349 m4_define([_LT_FORMAT_COMMENT],
350 [m4_ifval([$1], [
351 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
352 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
353 )])
354
355
356
357
358
359 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
360 # -------------------------------------------------------------------
361 # CONFIGNAME is the name given to the value in the libtool script.
362 # VARNAME is the (base) name used in the configure script.
363 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
364 # VARNAME. Any other value will be used directly.
365 m4_define([_LT_DECL],
366 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
367 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
368 [m4_ifval([$1], [$1], [$2])])
369 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
370 m4_ifval([$4],
371 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
372 lt_dict_add_subkey([lt_decl_dict], [$2],
373 [tagged?], [m4_ifval([$5], [yes], [no])])])
374 ])
375
376
377 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
378 # --------------------------------------------------------
379 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
380
381
382 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
383 # ------------------------------------------------
384 m4_define([lt_decl_tag_varnames],
385 [_lt_decl_filter([tagged?], [yes], $@)])
386
387
388 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
389 # ---------------------------------------------------------
390 m4_define([_lt_decl_filter],
391 [m4_case([$#],
392 [0], [m4_fatal([$0: too few arguments: $#])],
393 [1], [m4_fatal([$0: too few arguments: $#: $1])],
394 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
395 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
396 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
397 ])
398
399
400 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
401 # --------------------------------------------------
402 m4_define([lt_decl_quote_varnames],
403 [_lt_decl_filter([value], [1], $@)])
404
405
406 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
407 # ---------------------------------------------------
408 m4_define([lt_decl_dquote_varnames],
409 [_lt_decl_filter([value], [2], $@)])
410
411
412 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
413 # ---------------------------------------------------
414 m4_define([lt_decl_varnames_tagged],
415 [m4_assert([$# <= 2])dnl
416 _$0(m4_quote(m4_default([$1], [[, ]])),
417 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
418 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
419 m4_define([_lt_decl_varnames_tagged],
420 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
421
422
423 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
424 # ------------------------------------------------
425 m4_define([lt_decl_all_varnames],
426 [_$0(m4_quote(m4_default([$1], [[, ]])),
427 m4_if([$2], [],
428 m4_quote(lt_decl_varnames),
429 m4_quote(m4_shift($@))))[]dnl
430 ])
431 m4_define([_lt_decl_all_varnames],
432 [lt_join($@, lt_decl_varnames_tagged([$1],
433 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
434 ])
435
436
437 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
438 # ------------------------------------
439 # Quote a variable value, and forward it to `config.status' so that its
440 # declaration there will have the same value as in `configure'. VARNAME
441 # must have a single quote delimited value for this to work.
442 m4_define([_LT_CONFIG_STATUS_DECLARE],
443 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
444
445
446 # _LT_CONFIG_STATUS_DECLARATIONS
447 # ------------------------------
448 # We delimit libtool config variables with single quotes, so when
449 # we write them to config.status, we have to be sure to quote all
450 # embedded single quotes properly. In configure, this macro expands
451 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
452 #
453 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
454 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
455 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
456 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
457
458
459 # _LT_LIBTOOL_TAGS
460 # ----------------
461 # Output comment and list of tags supported by the script
462 m4_defun([_LT_LIBTOOL_TAGS],
463 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
464 available_tags="_LT_TAGS"dnl
465 ])
466
467
468 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
469 # -----------------------------------
470 # Extract the dictionary values for VARNAME (optionally with TAG) and
471 # expand to a commented shell variable setting:
472 #
473 # # Some comment about what VAR is for.
474 # visible_name=$lt_internal_name
475 m4_define([_LT_LIBTOOL_DECLARE],
476 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
477 [description])))[]dnl
478 m4_pushdef([_libtool_name],
479 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
480 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
481 [0], [_libtool_name=[$]$1],
482 [1], [_libtool_name=$lt_[]$1],
483 [2], [_libtool_name=$lt_[]$1],
484 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
485 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
486 ])
487
488
489 # _LT_LIBTOOL_CONFIG_VARS
490 # -----------------------
491 # Produce commented declarations of non-tagged libtool config variables
492 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
493 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
494 # section) are produced by _LT_LIBTOOL_TAG_VARS.
495 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
496 [m4_foreach([_lt_var],
497 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
498 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
499
500
501 # _LT_LIBTOOL_TAG_VARS(TAG)
502 # -------------------------
503 m4_define([_LT_LIBTOOL_TAG_VARS],
504 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
505 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
506
507
508 # _LT_TAGVAR(VARNAME, [TAGNAME])
509 # ------------------------------
510 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
511
512
513 # _LT_CONFIG_COMMANDS
514 # -------------------
515 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
516 # variables for single and double quote escaping we saved from calls
517 # to _LT_DECL, we can put quote escaped variables declarations
518 # into `config.status', and then the shell code to quote escape them in
519 # for loops in `config.status'. Finally, any additional code accumulated
520 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
521 m4_defun([_LT_CONFIG_COMMANDS],
522 [AC_PROVIDE_IFELSE([LT_OUTPUT],
523 dnl If the libtool generation code has been placed in $CONFIG_LT,
524 dnl instead of duplicating it all over again into config.status,
525 dnl then we will have config.status run $CONFIG_LT later, so it
526 dnl needs to know what name is stored there:
527 [AC_CONFIG_COMMANDS([libtool],
528 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
529 dnl If the libtool generation code is destined for config.status,
530 dnl expand the accumulated commands and init code now:
531 [AC_CONFIG_COMMANDS([libtool],
532 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
533 ])#_LT_CONFIG_COMMANDS
534
535
536 # Initialize.
537 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
538 [
539
540 # The HP-UX ksh and POSIX shell print the target directory to stdout
541 # if CDPATH is set.
542 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
543
544 sed_quote_subst='$sed_quote_subst'
545 double_quote_subst='$double_quote_subst'
546 delay_variable_subst='$delay_variable_subst'
547 _LT_CONFIG_STATUS_DECLARATIONS
548 LTCC='$LTCC'
549 LTCFLAGS='$LTCFLAGS'
550 compiler='$compiler_DEFAULT'
551
552 # A function that is used when there is no print builtin or printf.
553 func_fallback_echo ()
554 {
555 eval 'cat <<_LTECHO_EOF
556 \$[]1
557 _LTECHO_EOF'
558 }
559
560 # Quote evaled strings.
561 for var in lt_decl_all_varnames([[ \
562 ]], lt_decl_quote_varnames); do
563 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
564 *[[\\\\\\\`\\"\\\$]]*)
565 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
566 ;;
567 *)
568 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
569 ;;
570 esac
571 done
572
573 # Double-quote double-evaled strings.
574 for var in lt_decl_all_varnames([[ \
575 ]], lt_decl_dquote_varnames); do
576 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
577 *[[\\\\\\\`\\"\\\$]]*)
578 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
579 ;;
580 *)
581 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
582 ;;
583 esac
584 done
585
586 _LT_OUTPUT_LIBTOOL_INIT
587 ])
588
589 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
590 # ------------------------------------
591 # Generate a child script FILE with all initialization necessary to
592 # reuse the environment learned by the parent script, and make the
593 # file executable. If COMMENT is supplied, it is inserted after the
594 # `#!' sequence but before initialization text begins. After this
595 # macro, additional text can be appended to FILE to form the body of
596 # the child script. The macro ends with non-zero status if the
597 # file could not be fully written (such as if the disk is full).
598 m4_ifdef([AS_INIT_GENERATED],
599 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
600 [m4_defun([_LT_GENERATED_FILE_INIT],
601 [m4_require([AS_PREPARE])]dnl
602 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
603 [lt_write_fail=0
604 cat >$1 <<_ASEOF || lt_write_fail=1
605 #! $SHELL
606 # Generated by $as_me.
607 $2
608 SHELL=\${CONFIG_SHELL-$SHELL}
609 export SHELL
610 _ASEOF
611 cat >>$1 <<\_ASEOF || lt_write_fail=1
612 AS_SHELL_SANITIZE
613 _AS_PREPARE
614 exec AS_MESSAGE_FD>&1
615 _ASEOF
616 test $lt_write_fail = 0 && chmod +x $1[]dnl
617 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
618
619 # LT_OUTPUT
620 # ---------
621 # This macro allows early generation of the libtool script (before
622 # AC_OUTPUT is called), incase it is used in configure for compilation
623 # tests.
624 AC_DEFUN([LT_OUTPUT],
625 [: ${CONFIG_LT=./config.lt}
626 AC_MSG_NOTICE([creating $CONFIG_LT])
627 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
628 [# Run this file to recreate a libtool stub with the current configuration.])
629
630 cat >>"$CONFIG_LT" <<\_LTEOF
631 lt_cl_silent=false
632 exec AS_MESSAGE_LOG_FD>>config.log
633 {
634 echo
635 AS_BOX([Running $as_me.])
636 } >&AS_MESSAGE_LOG_FD
637
638 lt_cl_help="\
639 \`$as_me' creates a local libtool stub from the current configuration,
640 for use in further configure time tests before the real libtool is
641 generated.
642
643 Usage: $[0] [[OPTIONS]]
644
645 -h, --help print this help, then exit
646 -V, --version print version number, then exit
647 -q, --quiet do not print progress messages
648 -d, --debug don't remove temporary files
649
650 Report bugs to <bug-libtool@gnu.org>."
651
652 lt_cl_version="\
653 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
654 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
655 configured by $[0], generated by m4_PACKAGE_STRING.
656
657 Copyright (C) 2011 Free Software Foundation, Inc.
658 This config.lt script is free software; the Free Software Foundation
659 gives unlimited permision to copy, distribute and modify it."
660
661 while test $[#] != 0
662 do
663 case $[1] in
664 --version | --v* | -V )
665 echo "$lt_cl_version"; exit 0 ;;
666 --help | --h* | -h )
667 echo "$lt_cl_help"; exit 0 ;;
668 --debug | --d* | -d )
669 debug=: ;;
670 --quiet | --q* | --silent | --s* | -q )
671 lt_cl_silent=: ;;
672
673 -*) AC_MSG_ERROR([unrecognized option: $[1]
674 Try \`$[0] --help' for more information.]) ;;
675
676 *) AC_MSG_ERROR([unrecognized argument: $[1]
677 Try \`$[0] --help' for more information.]) ;;
678 esac
679 shift
680 done
681
682 if $lt_cl_silent; then
683 exec AS_MESSAGE_FD>/dev/null
684 fi
685 _LTEOF
686
687 cat >>"$CONFIG_LT" <<_LTEOF
688 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
689 _LTEOF
690
691 cat >>"$CONFIG_LT" <<\_LTEOF
692 AC_MSG_NOTICE([creating $ofile])
693 _LT_OUTPUT_LIBTOOL_COMMANDS
694 AS_EXIT(0)
695 _LTEOF
696 chmod +x "$CONFIG_LT"
697
698 # configure is writing to config.log, but config.lt does its own redirection,
699 # appending to config.log, which fails on DOS, as config.log is still kept
700 # open by configure. Here we exec the FD to /dev/null, effectively closing
701 # config.log, so it can be properly (re)opened and appended to by config.lt.
702 lt_cl_success=:
703 test "$silent" = yes &&
704 lt_config_lt_args="$lt_config_lt_args --quiet"
705 exec AS_MESSAGE_LOG_FD>/dev/null
706 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
707 exec AS_MESSAGE_LOG_FD>>config.log
708 $lt_cl_success || AS_EXIT(1)
709 ])# LT_OUTPUT
710
711
712 # _LT_CONFIG(TAG)
713 # ---------------
714 # If TAG is the built-in tag, create an initial libtool script with a
715 # default configuration from the untagged config vars. Otherwise add code
716 # to config.status for appending the configuration named by TAG from the
717 # matching tagged config vars.
718 m4_defun([_LT_CONFIG],
719 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
720 _LT_CONFIG_SAVE_COMMANDS([
721 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
722 m4_if(_LT_TAG, [C], [
723 # See if we are running on zsh, and set the options which allow our
724 # commands through without removal of \ escapes.
725 if test -n "${ZSH_VERSION+set}" ; then
726 setopt NO_GLOB_SUBST
727 fi
728
729 cfgfile="${ofile}T"
730 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
731 $RM "$cfgfile"
732
733 cat <<_LT_EOF >> "$cfgfile"
734 #! $SHELL
735
736 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
737 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
738 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
739 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
740 #
741 _LT_COPYING
742 _LT_LIBTOOL_TAGS
743
744 # ### BEGIN LIBTOOL CONFIG
745 _LT_LIBTOOL_CONFIG_VARS
746 _LT_LIBTOOL_TAG_VARS
747 # ### END LIBTOOL CONFIG
748
749 _LT_EOF
750
751 case $host_os in
752 aix3*)
753 cat <<\_LT_EOF >> "$cfgfile"
754 # AIX sometimes has problems with the GCC collect2 program. For some
755 # reason, if we set the COLLECT_NAMES environment variable, the problems
756 # vanish in a puff of smoke.
757 if test "X${COLLECT_NAMES+set}" != Xset; then
758 COLLECT_NAMES=
759 export COLLECT_NAMES
760 fi
761 _LT_EOF
762 ;;
763 esac
764
765 _LT_PROG_LTMAIN
766
767 # We use sed instead of cat because bash on DJGPP gets confused if
768 # if finds mixed CR/LF and LF-only lines. Since sed operates in
769 # text mode, it properly converts lines to CR/LF. This bash problem
770 # is reportedly fixed, but why not run on old versions too?
771 sed '$q' "$ltmain" >> "$cfgfile" \
772 || (rm -f "$cfgfile"; exit 1)
773
774 _LT_PROG_REPLACE_SHELLFNS
775
776 mv -f "$cfgfile" "$ofile" ||
777 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
778 chmod +x "$ofile"
779 ],
780 [cat <<_LT_EOF >> "$ofile"
781
782 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
783 dnl in a comment (ie after a #).
784 # ### BEGIN LIBTOOL TAG CONFIG: $1
785 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
786 # ### END LIBTOOL TAG CONFIG: $1
787 _LT_EOF
788 ])dnl /m4_if
789 ],
790 [m4_if([$1], [], [
791 PACKAGE='$PACKAGE'
792 VERSION='$VERSION'
793 TIMESTAMP='$TIMESTAMP'
794 RM='$RM'
795 ofile='$ofile'], [])
796 ])dnl /_LT_CONFIG_SAVE_COMMANDS
797 ])# _LT_CONFIG
798
799
800 # LT_SUPPORTED_TAG(TAG)
801 # ---------------------
802 # Trace this macro to discover what tags are supported by the libtool
803 # --tag option, using:
804 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
805 AC_DEFUN([LT_SUPPORTED_TAG], [])
806
807
808 # C support is built-in for now
809 m4_define([_LT_LANG_C_enabled], [])
810 m4_define([_LT_TAGS], [])
811
812
813 # LT_LANG(LANG)
814 # -------------
815 # Enable libtool support for the given language if not already enabled.
816 AC_DEFUN([LT_LANG],
817 [AC_BEFORE([$0], [LT_OUTPUT])dnl
818 m4_case([$1],
819 [C], [_LT_LANG(C)],
820 [C++], [_LT_LANG(CXX)],
821 [Go], [_LT_LANG(GO)],
822 [Java], [_LT_LANG(GCJ)],
823 [Fortran 77], [_LT_LANG(F77)],
824 [Fortran], [_LT_LANG(FC)],
825 [Windows Resource], [_LT_LANG(RC)],
826 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
827 [_LT_LANG($1)],
828 [m4_fatal([$0: unsupported language: "$1"])])])dnl
829 ])# LT_LANG
830
831
832 # _LT_LANG(LANGNAME)
833 # ------------------
834 m4_defun([_LT_LANG],
835 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
836 [LT_SUPPORTED_TAG([$1])dnl
837 m4_append([_LT_TAGS], [$1 ])dnl
838 m4_define([_LT_LANG_]$1[_enabled], [])dnl
839 _LT_LANG_$1_CONFIG($1)])dnl
840 ])# _LT_LANG
841
842
843 m4_ifndef([AC_PROG_GO], [
844 # NOTE: This macro has been submitted for inclusion into #
845 # GNU Autoconf as AC_PROG_GO. When it is available in #
846 # a released version of Autoconf we should remove this #
847 # macro and use it instead. #
848 m4_defun([AC_PROG_GO],
849 [AC_LANG_PUSH(Go)dnl
850 AC_ARG_VAR([GOC], [Go compiler command])dnl
851 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
852 _AC_ARG_VAR_LDFLAGS()dnl
853 AC_CHECK_TOOL(GOC, gccgo)
854 if test -z "$GOC"; then
855 if test -n "$ac_tool_prefix"; then
856 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
857 fi
858 fi
859 if test -z "$GOC"; then
860 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
861 fi
862 ])#m4_defun
863 ])#m4_ifndef
864
865
866 # _LT_LANG_DEFAULT_CONFIG
867 # -----------------------
868 m4_defun([_LT_LANG_DEFAULT_CONFIG],
869 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
870 [LT_LANG(CXX)],
871 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
872
873 AC_PROVIDE_IFELSE([AC_PROG_F77],
874 [LT_LANG(F77)],
875 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
876
877 AC_PROVIDE_IFELSE([AC_PROG_FC],
878 [LT_LANG(FC)],
879 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
880
881 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
882 dnl pulling things in needlessly.
883 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
884 [LT_LANG(GCJ)],
885 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
886 [LT_LANG(GCJ)],
887 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
888 [LT_LANG(GCJ)],
889 [m4_ifdef([AC_PROG_GCJ],
890 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
891 m4_ifdef([A][M_PROG_GCJ],
892 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
893 m4_ifdef([LT_PROG_GCJ],
894 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
895
896 AC_PROVIDE_IFELSE([AC_PROG_GO],
897 [LT_LANG(GO)],
898 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
899
900 AC_PROVIDE_IFELSE([LT_PROG_RC],
901 [LT_LANG(RC)],
902 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
903 ])# _LT_LANG_DEFAULT_CONFIG
904
905 # Obsolete macros:
906 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
907 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
908 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
909 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
910 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
911 dnl aclocal-1.4 backwards compatibility:
912 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
913 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
914 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
915 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
916 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
917
918
919 # _LT_TAG_COMPILER
920 # ----------------
921 m4_defun([_LT_TAG_COMPILER],
922 [AC_REQUIRE([AC_PROG_CC])dnl
923
924 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
925 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
926 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
927 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
928
929 # If no C compiler was specified, use CC.
930 LTCC=${LTCC-"$CC"}
931
932 # If no C compiler flags were specified, use CFLAGS.
933 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
934
935 # Allow CC to be a program name with arguments.
936 compiler=$CC
937 ])# _LT_TAG_COMPILER
938
939
940 # _LT_COMPILER_BOILERPLATE
941 # ------------------------
942 # Check for compiler boilerplate output or warnings with
943 # the simple compiler test code.
944 m4_defun([_LT_COMPILER_BOILERPLATE],
945 [m4_require([_LT_DECL_SED])dnl
946 ac_outfile=conftest.$ac_objext
947 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
948 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
949 _lt_compiler_boilerplate=`cat conftest.err`
950 $RM conftest*
951 ])# _LT_COMPILER_BOILERPLATE
952
953
954 # _LT_LINKER_BOILERPLATE
955 # ----------------------
956 # Check for linker boilerplate output or warnings with
957 # the simple link test code.
958 m4_defun([_LT_LINKER_BOILERPLATE],
959 [m4_require([_LT_DECL_SED])dnl
960 ac_outfile=conftest.$ac_objext
961 echo "$lt_simple_link_test_code" >conftest.$ac_ext
962 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
963 _lt_linker_boilerplate=`cat conftest.err`
964 $RM -r conftest*
965 ])# _LT_LINKER_BOILERPLATE
966
967 # _LT_REQUIRED_DARWIN_CHECKS
968 # -------------------------
969 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
970 case $host_os in
971 rhapsody* | darwin*)
972 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
973 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
974 AC_CHECK_TOOL([LIPO], [lipo], [:])
975 AC_CHECK_TOOL([OTOOL], [otool], [:])
976 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
977 _LT_DECL([], [DSYMUTIL], [1],
978 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
979 _LT_DECL([], [NMEDIT], [1],
980 [Tool to change global to local symbols on Mac OS X])
981 _LT_DECL([], [LIPO], [1],
982 [Tool to manipulate fat objects and archives on Mac OS X])
983 _LT_DECL([], [OTOOL], [1],
984 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
985 _LT_DECL([], [OTOOL64], [1],
986 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
987
988 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
989 [lt_cv_apple_cc_single_mod=no
990 if test -z "${LT_MULTI_MODULE}"; then
991 # By default we will add the -single_module flag. You can override
992 # by either setting the environment variable LT_MULTI_MODULE
993 # non-empty at configure time, or by adding -multi_module to the
994 # link flags.
995 rm -rf libconftest.dylib*
996 echo "int foo(void){return 1;}" > conftest.c
997 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
998 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
999 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1000 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1001 _lt_result=$?
1002 # If there is a non-empty error log, and "single_module"
1003 # appears in it, assume the flag caused a linker warning
1004 if test -s conftest.err && $GREP single_module conftest.err; then
1005 cat conftest.err >&AS_MESSAGE_LOG_FD
1006 # Otherwise, if the output was created with a 0 exit code from
1007 # the compiler, it worked.
1008 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1009 lt_cv_apple_cc_single_mod=yes
1010 else
1011 cat conftest.err >&AS_MESSAGE_LOG_FD
1012 fi
1013 rm -rf libconftest.dylib*
1014 rm -f conftest.*
1015 fi])
1016
1017 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1018 [lt_cv_ld_exported_symbols_list],
1019 [lt_cv_ld_exported_symbols_list=no
1020 save_LDFLAGS=$LDFLAGS
1021 echo "_main" > conftest.sym
1022 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1023 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1024 [lt_cv_ld_exported_symbols_list=yes],
1025 [lt_cv_ld_exported_symbols_list=no])
1026 LDFLAGS="$save_LDFLAGS"
1027 ])
1028
1029 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1030 [lt_cv_ld_force_load=no
1031 cat > conftest.c << _LT_EOF
1032 int forced_loaded() { return 2;}
1033 _LT_EOF
1034 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1035 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1036 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1037 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1038 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1039 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1040 cat > conftest.c << _LT_EOF
1041 int main() { return 0;}
1042 _LT_EOF
1043 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1044 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1045 _lt_result=$?
1046 if test -s conftest.err && $GREP force_load conftest.err; then
1047 cat conftest.err >&AS_MESSAGE_LOG_FD
1048 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1049 lt_cv_ld_force_load=yes
1050 else
1051 cat conftest.err >&AS_MESSAGE_LOG_FD
1052 fi
1053 rm -f conftest.err libconftest.a conftest conftest.c
1054 rm -rf conftest.dSYM
1055 ])
1056 case $host_os in
1057 rhapsody* | darwin1.[[012]])
1058 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1059 darwin1.*)
1060 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1061 darwin*) # darwin 5.x on
1062 # if running on 10.5 or later, the deployment target defaults
1063 # to the OS version, if on x86, and 10.4, the deployment
1064 # target defaults to 10.4. Don't you love it?
1065 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1066 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1067 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1068 10.[[012]]*)
1069 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1070 10.*)
1071 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1072 esac
1073 ;;
1074 esac
1075 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1076 _lt_dar_single_mod='$single_module'
1077 fi
1078 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1079 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1080 else
1081 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1082 fi
1083 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1084 _lt_dsymutil='~$DSYMUTIL $lib || :'
1085 else
1086 _lt_dsymutil=
1087 fi
1088 ;;
1089 esac
1090 ])
1091
1092
1093 # _LT_DARWIN_LINKER_FEATURES([TAG])
1094 # ---------------------------------
1095 # Checks for linker and compiler features on darwin
1096 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1097 [
1098 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1099 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1100 _LT_TAGVAR(hardcode_direct, $1)=no
1101 _LT_TAGVAR(hardcode_automatic, $1)=yes
1102 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1103 if test "$lt_cv_ld_force_load" = "yes"; then
1104 _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\"`'
1105 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1106 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1107 else
1108 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1109 fi
1110 _LT_TAGVAR(link_all_deplibs, $1)=yes
1111 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1112 case $cc_basename in
1113 ifort*) _lt_dar_can_shared=yes ;;
1114 *) _lt_dar_can_shared=$GCC ;;
1115 esac
1116 if test "$_lt_dar_can_shared" = "yes"; then
1117 output_verbose_link_cmd=func_echo_all
1118 _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}"
1119 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1120 _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}"
1121 _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}"
1122 m4_if([$1], [CXX],
1123 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1124 _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}"
1125 _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}"
1126 fi
1127 ],[])
1128 else
1129 _LT_TAGVAR(ld_shlibs, $1)=no
1130 fi
1131 ])
1132
1133 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1134 # ----------------------------------
1135 # Links a minimal program and checks the executable
1136 # for the system default hardcoded library path. In most cases,
1137 # this is /usr/lib:/lib, but when the MPI compilers are used
1138 # the location of the communication and MPI libs are included too.
1139 # If we don't find anything, use the default library path according
1140 # to the aix ld manual.
1141 # Store the results from the different compilers for each TAGNAME.
1142 # Allow to override them for all tags through lt_cv_aix_libpath.
1143 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1144 [m4_require([_LT_DECL_SED])dnl
1145 if test "${lt_cv_aix_libpath+set}" = set; then
1146 aix_libpath=$lt_cv_aix_libpath
1147 else
1148 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1149 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1150 lt_aix_libpath_sed='[
1151 /Import File Strings/,/^$/ {
1152 /^0/ {
1153 s/^0 *\([^ ]*\) *$/\1/
1154 p
1155 }
1156 }]'
1157 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1158 # Check for a 64-bit object if we didn't find anything.
1159 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1160 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1161 fi],[])
1162 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1163 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1164 fi
1165 ])
1166 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1167 fi
1168 ])# _LT_SYS_MODULE_PATH_AIX
1169
1170
1171 # _LT_SHELL_INIT(ARG)
1172 # -------------------
1173 m4_define([_LT_SHELL_INIT],
1174 [m4_divert_text([M4SH-INIT], [$1
1175 ])])# _LT_SHELL_INIT
1176
1177
1178
1179 # _LT_PROG_ECHO_BACKSLASH
1180 # -----------------------
1181 # Find how we can fake an echo command that does not interpret backslash.
1182 # In particular, with Autoconf 2.60 or later we add some code to the start
1183 # of the generated configure script which will find a shell with a builtin
1184 # printf (which we can use as an echo command).
1185 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1186 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1187 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1188 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1189
1190 AC_MSG_CHECKING([how to print strings])
1191 # Test print first, because it will be a builtin if present.
1192 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1193 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1194 ECHO='print -r --'
1195 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1196 ECHO='printf %s\n'
1197 else
1198 # Use this function as a fallback that always works.
1199 func_fallback_echo ()
1200 {
1201 eval 'cat <<_LTECHO_EOF
1202 $[]1
1203 _LTECHO_EOF'
1204 }
1205 ECHO='func_fallback_echo'
1206 fi
1207
1208 # func_echo_all arg...
1209 # Invoke $ECHO with all args, space-separated.
1210 func_echo_all ()
1211 {
1212 $ECHO "$*"
1213 }
1214
1215 case "$ECHO" in
1216 printf*) AC_MSG_RESULT([printf]) ;;
1217 print*) AC_MSG_RESULT([print -r]) ;;
1218 *) AC_MSG_RESULT([cat]) ;;
1219 esac
1220
1221 m4_ifdef([_AS_DETECT_SUGGESTED],
1222 [_AS_DETECT_SUGGESTED([
1223 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1224 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1225 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1226 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1227 PATH=/empty FPATH=/empty; export PATH FPATH
1228 test "X`printf %s $ECHO`" = "X$ECHO" \
1229 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1230
1231 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1232 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1233 ])# _LT_PROG_ECHO_BACKSLASH
1234
1235
1236 # _LT_WITH_SYSROOT
1237 # ----------------
1238 AC_DEFUN([_LT_WITH_SYSROOT],
1239 [AC_MSG_CHECKING([for sysroot])
1240 AC_ARG_WITH([sysroot],
1241 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1242 (or the compiler's sysroot if not specified).],
1243 [], [with_sysroot=no])
1244
1245 dnl lt_sysroot will always be passed unquoted. We quote it here
1246 dnl in case the user passed a directory name.
1247 lt_sysroot=
1248 case ${with_sysroot} in #(
1249 yes)
1250 if test "$GCC" = yes; then
1251 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1252 fi
1253 ;; #(
1254 /*)
1255 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1256 ;; #(
1257 no|'')
1258 ;; #(
1259 *)
1260 AC_MSG_RESULT([${with_sysroot}])
1261 AC_MSG_ERROR([The sysroot must be an absolute path.])
1262 ;;
1263 esac
1264
1265 AC_MSG_RESULT([${lt_sysroot:-no}])
1266 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1267 [dependent libraries, and in which our libraries should be installed.])])
1268
1269 # _LT_ENABLE_LOCK
1270 # ---------------
1271 m4_defun([_LT_ENABLE_LOCK],
1272 [AC_ARG_ENABLE([libtool-lock],
1273 [AS_HELP_STRING([--disable-libtool-lock],
1274 [avoid locking (might break parallel builds)])])
1275 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1276
1277 # Some flags need to be propagated to the compiler or linker for good
1278 # libtool support.
1279 case $host in
1280 ia64-*-hpux*)
1281 # Find out which ABI we are using.
1282 echo 'int i;' > conftest.$ac_ext
1283 if AC_TRY_EVAL(ac_compile); then
1284 case `/usr/bin/file conftest.$ac_objext` in
1285 *ELF-32*)
1286 HPUX_IA64_MODE="32"
1287 ;;
1288 *ELF-64*)
1289 HPUX_IA64_MODE="64"
1290 ;;
1291 esac
1292 fi
1293 rm -rf conftest*
1294 ;;
1295 *-*-irix6*)
1296 # Find out which ABI we are using.
1297 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1298 if AC_TRY_EVAL(ac_compile); then
1299 if test "$lt_cv_prog_gnu_ld" = yes; then
1300 case `/usr/bin/file conftest.$ac_objext` in
1301 *32-bit*)
1302 LD="${LD-ld} -melf32bsmip"
1303 ;;
1304 *N32*)
1305 LD="${LD-ld} -melf32bmipn32"
1306 ;;
1307 *64-bit*)
1308 LD="${LD-ld} -melf64bmip"
1309 ;;
1310 esac
1311 else
1312 case `/usr/bin/file conftest.$ac_objext` in
1313 *32-bit*)
1314 LD="${LD-ld} -32"
1315 ;;
1316 *N32*)
1317 LD="${LD-ld} -n32"
1318 ;;
1319 *64-bit*)
1320 LD="${LD-ld} -64"
1321 ;;
1322 esac
1323 fi
1324 fi
1325 rm -rf conftest*
1326 ;;
1327
1328 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1329 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1330 # Find out which ABI we are using.
1331 echo 'int i;' > conftest.$ac_ext
1332 if AC_TRY_EVAL(ac_compile); then
1333 case `/usr/bin/file conftest.o` in
1334 *32-bit*)
1335 case $host in
1336 x86_64-*kfreebsd*-gnu)
1337 LD="${LD-ld} -m elf_i386_fbsd"
1338 ;;
1339 x86_64-*linux*)
1340 case `/usr/bin/file conftest.o` in
1341 *x86-64*)
1342 LD="${LD-ld} -m elf32_x86_64"
1343 ;;
1344 *)
1345 LD="${LD-ld} -m elf_i386"
1346 ;;
1347 esac
1348 ;;
1349 powerpc64le-*)
1350 LD="${LD-ld} -m elf32lppclinux"
1351 ;;
1352 powerpc64-*)
1353 LD="${LD-ld} -m elf32ppclinux"
1354 ;;
1355 s390x-*linux*)
1356 LD="${LD-ld} -m elf_s390"
1357 ;;
1358 sparc64-*linux*)
1359 LD="${LD-ld} -m elf32_sparc"
1360 ;;
1361 esac
1362 ;;
1363 *64-bit*)
1364 case $host in
1365 x86_64-*kfreebsd*-gnu)
1366 LD="${LD-ld} -m elf_x86_64_fbsd"
1367 ;;
1368 x86_64-*linux*)
1369 LD="${LD-ld} -m elf_x86_64"
1370 ;;
1371 powerpcle-*)
1372 LD="${LD-ld} -m elf64lppc"
1373 ;;
1374 powerpc-*)
1375 LD="${LD-ld} -m elf64ppc"
1376 ;;
1377 s390*-*linux*|s390*-*tpf*)
1378 LD="${LD-ld} -m elf64_s390"
1379 ;;
1380 sparc*-*linux*)
1381 LD="${LD-ld} -m elf64_sparc"
1382 ;;
1383 esac
1384 ;;
1385 esac
1386 fi
1387 rm -rf conftest*
1388 ;;
1389
1390 *-*-sco3.2v5*)
1391 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1392 SAVE_CFLAGS="$CFLAGS"
1393 CFLAGS="$CFLAGS -belf"
1394 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1395 [AC_LANG_PUSH(C)
1396 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1397 AC_LANG_POP])
1398 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1399 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1400 CFLAGS="$SAVE_CFLAGS"
1401 fi
1402 ;;
1403 *-*solaris*)
1404 # Find out which ABI we are using.
1405 echo 'int i;' > conftest.$ac_ext
1406 if AC_TRY_EVAL(ac_compile); then
1407 case `/usr/bin/file conftest.o` in
1408 *64-bit*)
1409 case $lt_cv_prog_gnu_ld in
1410 yes*)
1411 case $host in
1412 i?86-*-solaris*)
1413 LD="${LD-ld} -m elf_x86_64"
1414 ;;
1415 sparc*-*-solaris*)
1416 LD="${LD-ld} -m elf64_sparc"
1417 ;;
1418 esac
1419 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1420 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1421 LD="${LD-ld}_sol2"
1422 fi
1423 ;;
1424 *)
1425 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1426 LD="${LD-ld} -64"
1427 fi
1428 ;;
1429 esac
1430 ;;
1431 esac
1432 fi
1433 rm -rf conftest*
1434 ;;
1435 esac
1436
1437 need_locks="$enable_libtool_lock"
1438 ])# _LT_ENABLE_LOCK
1439
1440
1441 # _LT_PROG_AR
1442 # -----------
1443 m4_defun([_LT_PROG_AR],
1444 [AC_CHECK_TOOLS(AR, [ar], false)
1445 : ${AR=ar}
1446 : ${AR_FLAGS=cru}
1447 _LT_DECL([], [AR], [1], [The archiver])
1448 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1449
1450 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1451 [lt_cv_ar_at_file=no
1452 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1453 [echo conftest.$ac_objext > conftest.lst
1454 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1455 AC_TRY_EVAL([lt_ar_try])
1456 if test "$ac_status" -eq 0; then
1457 # Ensure the archiver fails upon bogus file names.
1458 rm -f conftest.$ac_objext libconftest.a
1459 AC_TRY_EVAL([lt_ar_try])
1460 if test "$ac_status" -ne 0; then
1461 lt_cv_ar_at_file=@
1462 fi
1463 fi
1464 rm -f conftest.* libconftest.a
1465 ])
1466 ])
1467
1468 if test "x$lt_cv_ar_at_file" = xno; then
1469 archiver_list_spec=
1470 else
1471 archiver_list_spec=$lt_cv_ar_at_file
1472 fi
1473 _LT_DECL([], [archiver_list_spec], [1],
1474 [How to feed a file listing to the archiver])
1475 ])# _LT_PROG_AR
1476
1477
1478 # _LT_CMD_OLD_ARCHIVE
1479 # -------------------
1480 m4_defun([_LT_CMD_OLD_ARCHIVE],
1481 [_LT_PROG_AR
1482
1483 AC_CHECK_TOOL(STRIP, strip, :)
1484 test -z "$STRIP" && STRIP=:
1485 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1486
1487 AC_CHECK_TOOL(RANLIB, ranlib, :)
1488 test -z "$RANLIB" && RANLIB=:
1489 _LT_DECL([], [RANLIB], [1],
1490 [Commands used to install an old-style archive])
1491
1492 # Determine commands to create old-style static archives.
1493 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1494 old_postinstall_cmds='chmod 644 $oldlib'
1495 old_postuninstall_cmds=
1496
1497 if test -n "$RANLIB"; then
1498 case $host_os in
1499 openbsd*)
1500 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1501 ;;
1502 *)
1503 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1504 ;;
1505 esac
1506 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1507 fi
1508
1509 case $host_os in
1510 darwin*)
1511 lock_old_archive_extraction=yes ;;
1512 *)
1513 lock_old_archive_extraction=no ;;
1514 esac
1515 _LT_DECL([], [old_postinstall_cmds], [2])
1516 _LT_DECL([], [old_postuninstall_cmds], [2])
1517 _LT_TAGDECL([], [old_archive_cmds], [2],
1518 [Commands used to build an old-style archive])
1519 _LT_DECL([], [lock_old_archive_extraction], [0],
1520 [Whether to use a lock for old archive extraction])
1521 ])# _LT_CMD_OLD_ARCHIVE
1522
1523
1524 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1525 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1526 # ----------------------------------------------------------------
1527 # Check whether the given compiler option works
1528 AC_DEFUN([_LT_COMPILER_OPTION],
1529 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1530 m4_require([_LT_DECL_SED])dnl
1531 AC_CACHE_CHECK([$1], [$2],
1532 [$2=no
1533 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1534 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1535 lt_compiler_flag="$3"
1536 # Insert the option either (1) after the last *FLAGS variable, or
1537 # (2) before a word containing "conftest.", or (3) at the end.
1538 # Note that $ac_compile itself does not contain backslashes and begins
1539 # with a dollar sign (not a hyphen), so the echo should work correctly.
1540 # The option is referenced via a variable to avoid confusing sed.
1541 lt_compile=`echo "$ac_compile" | $SED \
1542 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1543 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1544 -e 's:$: $lt_compiler_flag:'`
1545 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1546 (eval "$lt_compile" 2>conftest.err)
1547 ac_status=$?
1548 cat conftest.err >&AS_MESSAGE_LOG_FD
1549 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1550 if (exit $ac_status) && test -s "$ac_outfile"; then
1551 # The compiler can only warn and ignore the option if not recognized
1552 # So say no if there are warnings other than the usual output.
1553 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1554 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1555 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1556 $2=yes
1557 fi
1558 fi
1559 $RM conftest*
1560 ])
1561
1562 if test x"[$]$2" = xyes; then
1563 m4_if([$5], , :, [$5])
1564 else
1565 m4_if([$6], , :, [$6])
1566 fi
1567 ])# _LT_COMPILER_OPTION
1568
1569 # Old name:
1570 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1571 dnl aclocal-1.4 backwards compatibility:
1572 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1573
1574
1575 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1576 # [ACTION-SUCCESS], [ACTION-FAILURE])
1577 # ----------------------------------------------------
1578 # Check whether the given linker option works
1579 AC_DEFUN([_LT_LINKER_OPTION],
1580 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1581 m4_require([_LT_DECL_SED])dnl
1582 AC_CACHE_CHECK([$1], [$2],
1583 [$2=no
1584 save_LDFLAGS="$LDFLAGS"
1585 LDFLAGS="$LDFLAGS $3"
1586 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1587 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1588 # The linker can only warn and ignore the option if not recognized
1589 # So say no if there are warnings
1590 if test -s conftest.err; then
1591 # Append any errors to the config.log.
1592 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1593 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1594 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1595 if diff conftest.exp conftest.er2 >/dev/null; then
1596 $2=yes
1597 fi
1598 else
1599 $2=yes
1600 fi
1601 fi
1602 $RM -r conftest*
1603 LDFLAGS="$save_LDFLAGS"
1604 ])
1605
1606 if test x"[$]$2" = xyes; then
1607 m4_if([$4], , :, [$4])
1608 else
1609 m4_if([$5], , :, [$5])
1610 fi
1611 ])# _LT_LINKER_OPTION
1612
1613 # Old name:
1614 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1615 dnl aclocal-1.4 backwards compatibility:
1616 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1617
1618
1619 # LT_CMD_MAX_LEN
1620 #---------------
1621 AC_DEFUN([LT_CMD_MAX_LEN],
1622 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1623 # find the maximum length of command line arguments
1624 AC_MSG_CHECKING([the maximum length of command line arguments])
1625 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1626 i=0
1627 teststring="ABCD"
1628
1629 case $build_os in
1630 msdosdjgpp*)
1631 # On DJGPP, this test can blow up pretty badly due to problems in libc
1632 # (any single argument exceeding 2000 bytes causes a buffer overrun
1633 # during glob expansion). Even if it were fixed, the result of this
1634 # check would be larger than it should be.
1635 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1636 ;;
1637
1638 gnu*)
1639 # Under GNU Hurd, this test is not required because there is
1640 # no limit to the length of command line arguments.
1641 # Libtool will interpret -1 as no limit whatsoever
1642 lt_cv_sys_max_cmd_len=-1;
1643 ;;
1644
1645 cygwin* | mingw* | cegcc*)
1646 # On Win9x/ME, this test blows up -- it succeeds, but takes
1647 # about 5 minutes as the teststring grows exponentially.
1648 # Worse, since 9x/ME are not pre-emptively multitasking,
1649 # you end up with a "frozen" computer, even though with patience
1650 # the test eventually succeeds (with a max line length of 256k).
1651 # Instead, let's just punt: use the minimum linelength reported by
1652 # all of the supported platforms: 8192 (on NT/2K/XP).
1653 lt_cv_sys_max_cmd_len=8192;
1654 ;;
1655
1656 mint*)
1657 # On MiNT this can take a long time and run out of memory.
1658 lt_cv_sys_max_cmd_len=8192;
1659 ;;
1660
1661 amigaos*)
1662 # On AmigaOS with pdksh, this test takes hours, literally.
1663 # So we just punt and use a minimum line length of 8192.
1664 lt_cv_sys_max_cmd_len=8192;
1665 ;;
1666
1667 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1668 # This has been around since 386BSD, at least. Likely further.
1669 if test -x /sbin/sysctl; then
1670 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1671 elif test -x /usr/sbin/sysctl; then
1672 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1673 else
1674 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1675 fi
1676 # And add a safety zone
1677 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1678 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1679 ;;
1680
1681 interix*)
1682 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1683 lt_cv_sys_max_cmd_len=196608
1684 ;;
1685
1686 os2*)
1687 # The test takes a long time on OS/2.
1688 lt_cv_sys_max_cmd_len=8192
1689 ;;
1690
1691 osf*)
1692 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1693 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1694 # nice to cause kernel panics so lets avoid the loop below.
1695 # First set a reasonable default.
1696 lt_cv_sys_max_cmd_len=16384
1697 #
1698 if test -x /sbin/sysconfig; then
1699 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1700 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1701 esac
1702 fi
1703 ;;
1704 sco3.2v5*)
1705 lt_cv_sys_max_cmd_len=102400
1706 ;;
1707 sysv5* | sco5v6* | sysv4.2uw2*)
1708 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1709 if test -n "$kargmax"; then
1710 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1711 else
1712 lt_cv_sys_max_cmd_len=32768
1713 fi
1714 ;;
1715 *)
1716 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1717 if test -n "$lt_cv_sys_max_cmd_len" && \
1718 test undefined != "$lt_cv_sys_max_cmd_len"; then
1719 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1720 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1721 else
1722 # Make teststring a little bigger before we do anything with it.
1723 # a 1K string should be a reasonable start.
1724 for i in 1 2 3 4 5 6 7 8 ; do
1725 teststring=$teststring$teststring
1726 done
1727 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1728 # If test is not a shell built-in, we'll probably end up computing a
1729 # maximum length that is only half of the actual maximum length, but
1730 # we can't tell.
1731 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1732 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1733 test $i != 17 # 1/2 MB should be enough
1734 do
1735 i=`expr $i + 1`
1736 teststring=$teststring$teststring
1737 done
1738 # Only check the string length outside the loop.
1739 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1740 teststring=
1741 # Add a significant safety factor because C++ compilers can tack on
1742 # massive amounts of additional arguments before passing them to the
1743 # linker. It appears as though 1/2 is a usable value.
1744 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1745 fi
1746 ;;
1747 esac
1748 ])
1749 if test -n $lt_cv_sys_max_cmd_len ; then
1750 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1751 else
1752 AC_MSG_RESULT(none)
1753 fi
1754 max_cmd_len=$lt_cv_sys_max_cmd_len
1755 _LT_DECL([], [max_cmd_len], [0],
1756 [What is the maximum length of a command?])
1757 ])# LT_CMD_MAX_LEN
1758
1759 # Old name:
1760 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1761 dnl aclocal-1.4 backwards compatibility:
1762 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1763
1764
1765 # _LT_HEADER_DLFCN
1766 # ----------------
1767 m4_defun([_LT_HEADER_DLFCN],
1768 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1769 ])# _LT_HEADER_DLFCN
1770
1771
1772 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1773 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1774 # ----------------------------------------------------------------
1775 m4_defun([_LT_TRY_DLOPEN_SELF],
1776 [m4_require([_LT_HEADER_DLFCN])dnl
1777 if test "$cross_compiling" = yes; then :
1778 [$4]
1779 else
1780 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1781 lt_status=$lt_dlunknown
1782 cat > conftest.$ac_ext <<_LT_EOF
1783 [#line $LINENO "configure"
1784 #include "confdefs.h"
1785
1786 #if HAVE_DLFCN_H
1787 #include <dlfcn.h>
1788 #endif
1789
1790 #include <stdio.h>
1791
1792 #ifdef RTLD_GLOBAL
1793 # define LT_DLGLOBAL RTLD_GLOBAL
1794 #else
1795 # ifdef DL_GLOBAL
1796 # define LT_DLGLOBAL DL_GLOBAL
1797 # else
1798 # define LT_DLGLOBAL 0
1799 # endif
1800 #endif
1801
1802 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1803 find out it does not work in some platform. */
1804 #ifndef LT_DLLAZY_OR_NOW
1805 # ifdef RTLD_LAZY
1806 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1807 # else
1808 # ifdef DL_LAZY
1809 # define LT_DLLAZY_OR_NOW DL_LAZY
1810 # else
1811 # ifdef RTLD_NOW
1812 # define LT_DLLAZY_OR_NOW RTLD_NOW
1813 # else
1814 # ifdef DL_NOW
1815 # define LT_DLLAZY_OR_NOW DL_NOW
1816 # else
1817 # define LT_DLLAZY_OR_NOW 0
1818 # endif
1819 # endif
1820 # endif
1821 # endif
1822 #endif
1823
1824 /* When -fvisbility=hidden is used, assume the code has been annotated
1825 correspondingly for the symbols needed. */
1826 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1827 int fnord () __attribute__((visibility("default")));
1828 #endif
1829
1830 int fnord () { return 42; }
1831 int main ()
1832 {
1833 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1834 int status = $lt_dlunknown;
1835
1836 if (self)
1837 {
1838 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1839 else
1840 {
1841 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1842 else puts (dlerror ());
1843 }
1844 /* dlclose (self); */
1845 }
1846 else
1847 puts (dlerror ());
1848
1849 return status;
1850 }]
1851 _LT_EOF
1852 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1853 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1854 lt_status=$?
1855 case x$lt_status in
1856 x$lt_dlno_uscore) $1 ;;
1857 x$lt_dlneed_uscore) $2 ;;
1858 x$lt_dlunknown|x*) $3 ;;
1859 esac
1860 else :
1861 # compilation failed
1862 $3
1863 fi
1864 fi
1865 rm -fr conftest*
1866 ])# _LT_TRY_DLOPEN_SELF
1867
1868
1869 # LT_SYS_DLOPEN_SELF
1870 # ------------------
1871 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1872 [m4_require([_LT_HEADER_DLFCN])dnl
1873 if test "x$enable_dlopen" != xyes; then
1874 enable_dlopen=unknown
1875 enable_dlopen_self=unknown
1876 enable_dlopen_self_static=unknown
1877 else
1878 lt_cv_dlopen=no
1879 lt_cv_dlopen_libs=
1880
1881 case $host_os in
1882 beos*)
1883 lt_cv_dlopen="load_add_on"
1884 lt_cv_dlopen_libs=
1885 lt_cv_dlopen_self=yes
1886 ;;
1887
1888 mingw* | pw32* | cegcc*)
1889 lt_cv_dlopen="LoadLibrary"
1890 lt_cv_dlopen_libs=
1891 ;;
1892
1893 cygwin*)
1894 lt_cv_dlopen="dlopen"
1895 lt_cv_dlopen_libs=
1896 ;;
1897
1898 darwin*)
1899 # if libdl is installed we need to link against it
1900 AC_CHECK_LIB([dl], [dlopen],
1901 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1902 lt_cv_dlopen="dyld"
1903 lt_cv_dlopen_libs=
1904 lt_cv_dlopen_self=yes
1905 ])
1906 ;;
1907
1908 *)
1909 AC_CHECK_FUNC([shl_load],
1910 [lt_cv_dlopen="shl_load"],
1911 [AC_CHECK_LIB([dld], [shl_load],
1912 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1913 [AC_CHECK_FUNC([dlopen],
1914 [lt_cv_dlopen="dlopen"],
1915 [AC_CHECK_LIB([dl], [dlopen],
1916 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1917 [AC_CHECK_LIB([svld], [dlopen],
1918 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1919 [AC_CHECK_LIB([dld], [dld_link],
1920 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1921 ])
1922 ])
1923 ])
1924 ])
1925 ])
1926 ;;
1927 esac
1928
1929 if test "x$lt_cv_dlopen" != xno; then
1930 enable_dlopen=yes
1931 else
1932 enable_dlopen=no
1933 fi
1934
1935 case $lt_cv_dlopen in
1936 dlopen)
1937 save_CPPFLAGS="$CPPFLAGS"
1938 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1939
1940 save_LDFLAGS="$LDFLAGS"
1941 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1942
1943 save_LIBS="$LIBS"
1944 LIBS="$lt_cv_dlopen_libs $LIBS"
1945
1946 AC_CACHE_CHECK([whether a program can dlopen itself],
1947 lt_cv_dlopen_self, [dnl
1948 _LT_TRY_DLOPEN_SELF(
1949 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1950 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1951 ])
1952
1953 if test "x$lt_cv_dlopen_self" = xyes; then
1954 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1955 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1956 lt_cv_dlopen_self_static, [dnl
1957 _LT_TRY_DLOPEN_SELF(
1958 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1959 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1960 ])
1961 fi
1962
1963 CPPFLAGS="$save_CPPFLAGS"
1964 LDFLAGS="$save_LDFLAGS"
1965 LIBS="$save_LIBS"
1966 ;;
1967 esac
1968
1969 case $lt_cv_dlopen_self in
1970 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1971 *) enable_dlopen_self=unknown ;;
1972 esac
1973
1974 case $lt_cv_dlopen_self_static in
1975 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1976 *) enable_dlopen_self_static=unknown ;;
1977 esac
1978 fi
1979 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1980 [Whether dlopen is supported])
1981 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1982 [Whether dlopen of programs is supported])
1983 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1984 [Whether dlopen of statically linked programs is supported])
1985 ])# LT_SYS_DLOPEN_SELF
1986
1987 # Old name:
1988 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1989 dnl aclocal-1.4 backwards compatibility:
1990 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1991
1992
1993 # _LT_COMPILER_C_O([TAGNAME])
1994 # ---------------------------
1995 # Check to see if options -c and -o are simultaneously supported by compiler.
1996 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1997 m4_defun([_LT_COMPILER_C_O],
1998 [m4_require([_LT_DECL_SED])dnl
1999 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2000 m4_require([_LT_TAG_COMPILER])dnl
2001 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2002 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2003 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2004 $RM -r conftest 2>/dev/null
2005 mkdir conftest
2006 cd conftest
2007 mkdir out
2008 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2009
2010 lt_compiler_flag="-o out/conftest2.$ac_objext"
2011 # Insert the option either (1) after the last *FLAGS variable, or
2012 # (2) before a word containing "conftest.", or (3) at the end.
2013 # Note that $ac_compile itself does not contain backslashes and begins
2014 # with a dollar sign (not a hyphen), so the echo should work correctly.
2015 lt_compile=`echo "$ac_compile" | $SED \
2016 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2017 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2018 -e 's:$: $lt_compiler_flag:'`
2019 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2020 (eval "$lt_compile" 2>out/conftest.err)
2021 ac_status=$?
2022 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2023 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2024 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2025 then
2026 # The compiler can only warn and ignore the option if not recognized
2027 # So say no if there are warnings
2028 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2029 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2030 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2031 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2032 fi
2033 fi
2034 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2035 $RM conftest*
2036 # SGI C++ compiler will create directory out/ii_files/ for
2037 # template instantiation
2038 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2039 $RM out/* && rmdir out
2040 cd ..
2041 $RM -r conftest
2042 $RM conftest*
2043 ])
2044 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2045 [Does compiler simultaneously support -c and -o options?])
2046 ])# _LT_COMPILER_C_O
2047
2048
2049 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2050 # ----------------------------------
2051 # Check to see if we can do hard links to lock some files if needed
2052 m4_defun([_LT_COMPILER_FILE_LOCKS],
2053 [m4_require([_LT_ENABLE_LOCK])dnl
2054 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2055 _LT_COMPILER_C_O([$1])
2056
2057 hard_links="nottested"
2058 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2059 # do not overwrite the value of need_locks provided by the user
2060 AC_MSG_CHECKING([if we can lock with hard links])
2061 hard_links=yes
2062 $RM conftest*
2063 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2064 touch conftest.a
2065 ln conftest.a conftest.b 2>&5 || hard_links=no
2066 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2067 AC_MSG_RESULT([$hard_links])
2068 if test "$hard_links" = no; then
2069 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2070 need_locks=warn
2071 fi
2072 else
2073 need_locks=no
2074 fi
2075 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2076 ])# _LT_COMPILER_FILE_LOCKS
2077
2078
2079 # _LT_CHECK_OBJDIR
2080 # ----------------
2081 m4_defun([_LT_CHECK_OBJDIR],
2082 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2083 [rm -f .libs 2>/dev/null
2084 mkdir .libs 2>/dev/null
2085 if test -d .libs; then
2086 lt_cv_objdir=.libs
2087 else
2088 # MS-DOS does not allow filenames that begin with a dot.
2089 lt_cv_objdir=_libs
2090 fi
2091 rmdir .libs 2>/dev/null])
2092 objdir=$lt_cv_objdir
2093 _LT_DECL([], [objdir], [0],
2094 [The name of the directory that contains temporary libtool files])dnl
2095 m4_pattern_allow([LT_OBJDIR])dnl
2096 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2097 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2098 ])# _LT_CHECK_OBJDIR
2099
2100
2101 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2102 # --------------------------------------
2103 # Check hardcoding attributes.
2104 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2105 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2106 _LT_TAGVAR(hardcode_action, $1)=
2107 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2108 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2109 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2110
2111 # We can hardcode non-existent directories.
2112 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2113 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2114 # have to relink, otherwise we might link with an installed library
2115 # when we should be linking with a yet-to-be-installed one
2116 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2117 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2118 # Linking always hardcodes the temporary library directory.
2119 _LT_TAGVAR(hardcode_action, $1)=relink
2120 else
2121 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2122 _LT_TAGVAR(hardcode_action, $1)=immediate
2123 fi
2124 else
2125 # We cannot hardcode anything, or else we can only hardcode existing
2126 # directories.
2127 _LT_TAGVAR(hardcode_action, $1)=unsupported
2128 fi
2129 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2130
2131 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2132 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2133 # Fast installation is not supported
2134 enable_fast_install=no
2135 elif test "$shlibpath_overrides_runpath" = yes ||
2136 test "$enable_shared" = no; then
2137 # Fast installation is not necessary
2138 enable_fast_install=needless
2139 fi
2140 _LT_TAGDECL([], [hardcode_action], [0],
2141 [How to hardcode a shared library path into an executable])
2142 ])# _LT_LINKER_HARDCODE_LIBPATH
2143
2144
2145 # _LT_CMD_STRIPLIB
2146 # ----------------
2147 m4_defun([_LT_CMD_STRIPLIB],
2148 [m4_require([_LT_DECL_EGREP])
2149 striplib=
2150 old_striplib=
2151 AC_MSG_CHECKING([whether stripping libraries is possible])
2152 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2153 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2154 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2155 AC_MSG_RESULT([yes])
2156 else
2157 # FIXME - insert some real tests, host_os isn't really good enough
2158 case $host_os in
2159 darwin*)
2160 if test -n "$STRIP" ; then
2161 striplib="$STRIP -x"
2162 old_striplib="$STRIP -S"
2163 AC_MSG_RESULT([yes])
2164 else
2165 AC_MSG_RESULT([no])
2166 fi
2167 ;;
2168 *)
2169 AC_MSG_RESULT([no])
2170 ;;
2171 esac
2172 fi
2173 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2174 _LT_DECL([], [striplib], [1])
2175 ])# _LT_CMD_STRIPLIB
2176
2177
2178 # _LT_SYS_DYNAMIC_LINKER([TAG])
2179 # -----------------------------
2180 # PORTME Fill in your ld.so characteristics
2181 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2182 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2183 m4_require([_LT_DECL_EGREP])dnl
2184 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2185 m4_require([_LT_DECL_OBJDUMP])dnl
2186 m4_require([_LT_DECL_SED])dnl
2187 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2188 AC_MSG_CHECKING([dynamic linker characteristics])
2189 m4_if([$1],
2190 [], [
2191 if test "$GCC" = yes; then
2192 case $host_os in
2193 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2194 *) lt_awk_arg="/^libraries:/" ;;
2195 esac
2196 case $host_os in
2197 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2198 *) lt_sed_strip_eq="s,=/,/,g" ;;
2199 esac
2200 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2201 case $lt_search_path_spec in
2202 *\;*)
2203 # if the path contains ";" then we assume it to be the separator
2204 # otherwise default to the standard path separator (i.e. ":") - it is
2205 # assumed that no part of a normal pathname contains ";" but that should
2206 # okay in the real world where ";" in dirpaths is itself problematic.
2207 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2208 ;;
2209 *)
2210 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2211 ;;
2212 esac
2213 # Ok, now we have the path, separated by spaces, we can step through it
2214 # and add multilib dir if necessary.
2215 lt_tmp_lt_search_path_spec=
2216 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2217 for lt_sys_path in $lt_search_path_spec; do
2218 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2219 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2220 else
2221 test -d "$lt_sys_path" && \
2222 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2223 fi
2224 done
2225 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2226 BEGIN {RS=" "; FS="/|\n";} {
2227 lt_foo="";
2228 lt_count=0;
2229 for (lt_i = NF; lt_i > 0; lt_i--) {
2230 if ($lt_i != "" && $lt_i != ".") {
2231 if ($lt_i == "..") {
2232 lt_count++;
2233 } else {
2234 if (lt_count == 0) {
2235 lt_foo="/" $lt_i lt_foo;
2236 } else {
2237 lt_count--;
2238 }
2239 }
2240 }
2241 }
2242 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2243 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2244 }'`
2245 # AWK program above erroneously prepends '/' to C:/dos/paths
2246 # for these hosts.
2247 case $host_os in
2248 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2249 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2250 esac
2251 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2252 else
2253 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2254 fi])
2255 library_names_spec=
2256 libname_spec='lib$name'
2257 soname_spec=
2258 shrext_cmds=".so"
2259 postinstall_cmds=
2260 postuninstall_cmds=
2261 finish_cmds=
2262 finish_eval=
2263 shlibpath_var=
2264 shlibpath_overrides_runpath=unknown
2265 version_type=none
2266 dynamic_linker="$host_os ld.so"
2267 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2268 need_lib_prefix=unknown
2269 hardcode_into_libs=no
2270
2271 # when you set need_version to no, make sure it does not cause -set_version
2272 # flags to be left without arguments
2273 need_version=unknown
2274
2275 case $host_os in
2276 aix3*)
2277 version_type=linux # correct to gnu/linux during the next big refactor
2278 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2279 shlibpath_var=LIBPATH
2280
2281 # AIX 3 has no versioning support, so we append a major version to the name.
2282 soname_spec='${libname}${release}${shared_ext}$major'
2283 ;;
2284
2285 aix[[4-9]]*)
2286 version_type=linux # correct to gnu/linux during the next big refactor
2287 need_lib_prefix=no
2288 need_version=no
2289 hardcode_into_libs=yes
2290 if test "$host_cpu" = ia64; then
2291 # AIX 5 supports IA64
2292 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2293 shlibpath_var=LD_LIBRARY_PATH
2294 else
2295 # With GCC up to 2.95.x, collect2 would create an import file
2296 # for dependence libraries. The import file would start with
2297 # the line `#! .'. This would cause the generated library to
2298 # depend on `.', always an invalid library. This was fixed in
2299 # development snapshots of GCC prior to 3.0.
2300 case $host_os in
2301 aix4 | aix4.[[01]] | aix4.[[01]].*)
2302 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2303 echo ' yes '
2304 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2305 :
2306 else
2307 can_build_shared=no
2308 fi
2309 ;;
2310 esac
2311 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2312 # soname into executable. Probably we can add versioning support to
2313 # collect2, so additional links can be useful in future.
2314 if test "$aix_use_runtimelinking" = yes; then
2315 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2316 # instead of lib<name>.a to let people know that these are not
2317 # typical AIX shared libraries.
2318 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2319 else
2320 # We preserve .a as extension for shared libraries through AIX4.2
2321 # and later when we are not doing run time linking.
2322 library_names_spec='${libname}${release}.a $libname.a'
2323 soname_spec='${libname}${release}${shared_ext}$major'
2324 fi
2325 shlibpath_var=LIBPATH
2326 fi
2327 ;;
2328
2329 amigaos*)
2330 case $host_cpu in
2331 powerpc)
2332 # Since July 2007 AmigaOS4 officially supports .so libraries.
2333 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2334 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2335 ;;
2336 m68k)
2337 library_names_spec='$libname.ixlibrary $libname.a'
2338 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2339 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'
2340 ;;
2341 esac
2342 ;;
2343
2344 beos*)
2345 library_names_spec='${libname}${shared_ext}'
2346 dynamic_linker="$host_os ld.so"
2347 shlibpath_var=LIBRARY_PATH
2348 ;;
2349
2350 bsdi[[45]]*)
2351 version_type=linux # correct to gnu/linux during the next big refactor
2352 need_version=no
2353 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2354 soname_spec='${libname}${release}${shared_ext}$major'
2355 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2356 shlibpath_var=LD_LIBRARY_PATH
2357 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2358 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2359 # the default ld.so.conf also contains /usr/contrib/lib and
2360 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2361 # libtool to hard-code these into programs
2362 ;;
2363
2364 cygwin* | mingw* | pw32* | cegcc*)
2365 version_type=windows
2366 shrext_cmds=".dll"
2367 need_version=no
2368 need_lib_prefix=no
2369
2370 case $GCC,$cc_basename in
2371 yes,*)
2372 # gcc
2373 library_names_spec='$libname.dll.a'
2374 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2375 postinstall_cmds='base_file=`basename \${file}`~
2376 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2377 dldir=$destdir/`dirname \$dlpath`~
2378 test -d \$dldir || mkdir -p \$dldir~
2379 $install_prog $dir/$dlname \$dldir/$dlname~
2380 chmod a+x \$dldir/$dlname~
2381 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2382 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2383 fi'
2384 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2385 dlpath=$dir/\$dldll~
2386 $RM \$dlpath'
2387 shlibpath_overrides_runpath=yes
2388
2389 case $host_os in
2390 cygwin*)
2391 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2392 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2393 m4_if([$1], [],[
2394 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2395 ;;
2396 mingw* | cegcc*)
2397 # MinGW DLLs use traditional 'lib' prefix
2398 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2399 ;;
2400 pw32*)
2401 # pw32 DLLs use 'pw' prefix rather than 'lib'
2402 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2403 ;;
2404 esac
2405 dynamic_linker='Win32 ld.exe'
2406 ;;
2407
2408 *,cl*)
2409 # Native MSVC
2410 libname_spec='$name'
2411 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2412 library_names_spec='${libname}.dll.lib'
2413
2414 case $build_os in
2415 mingw*)
2416 sys_lib_search_path_spec=
2417 lt_save_ifs=$IFS
2418 IFS=';'
2419 for lt_path in $LIB
2420 do
2421 IFS=$lt_save_ifs
2422 # Let DOS variable expansion print the short 8.3 style file name.
2423 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2424 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2425 done
2426 IFS=$lt_save_ifs
2427 # Convert to MSYS style.
2428 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2429 ;;
2430 cygwin*)
2431 # Convert to unix form, then to dos form, then back to unix form
2432 # but this time dos style (no spaces!) so that the unix form looks
2433 # like /cygdrive/c/PROGRA~1:/cygdr...
2434 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2435 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2436 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2437 ;;
2438 *)
2439 sys_lib_search_path_spec="$LIB"
2440 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2441 # It is most probably a Windows format PATH.
2442 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2443 else
2444 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2445 fi
2446 # FIXME: find the short name or the path components, as spaces are
2447 # common. (e.g. "Program Files" -> "PROGRA~1")
2448 ;;
2449 esac
2450
2451 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2452 postinstall_cmds='base_file=`basename \${file}`~
2453 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2454 dldir=$destdir/`dirname \$dlpath`~
2455 test -d \$dldir || mkdir -p \$dldir~
2456 $install_prog $dir/$dlname \$dldir/$dlname'
2457 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2458 dlpath=$dir/\$dldll~
2459 $RM \$dlpath'
2460 shlibpath_overrides_runpath=yes
2461 dynamic_linker='Win32 link.exe'
2462 ;;
2463
2464 *)
2465 # Assume MSVC wrapper
2466 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2467 dynamic_linker='Win32 ld.exe'
2468 ;;
2469 esac
2470 # FIXME: first we should search . and the directory the executable is in
2471 shlibpath_var=PATH
2472 ;;
2473
2474 darwin* | rhapsody*)
2475 dynamic_linker="$host_os dyld"
2476 version_type=darwin
2477 need_lib_prefix=no
2478 need_version=no
2479 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2480 soname_spec='${libname}${release}${major}$shared_ext'
2481 shlibpath_overrides_runpath=yes
2482 shlibpath_var=DYLD_LIBRARY_PATH
2483 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2484 m4_if([$1], [],[
2485 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2486 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2487 ;;
2488
2489 dgux*)
2490 version_type=linux # correct to gnu/linux during the next big refactor
2491 need_lib_prefix=no
2492 need_version=no
2493 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2494 soname_spec='${libname}${release}${shared_ext}$major'
2495 shlibpath_var=LD_LIBRARY_PATH
2496 ;;
2497
2498 freebsd* | dragonfly*)
2499 # DragonFly does not have aout. When/if they implement a new
2500 # versioning mechanism, adjust this.
2501 if test -x /usr/bin/objformat; then
2502 objformat=`/usr/bin/objformat`
2503 else
2504 case $host_os in
2505 freebsd[[23]].*) objformat=aout ;;
2506 *) objformat=elf ;;
2507 esac
2508 fi
2509 version_type=freebsd-$objformat
2510 case $version_type in
2511 freebsd-elf*)
2512 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2513 need_version=no
2514 need_lib_prefix=no
2515 ;;
2516 freebsd-*)
2517 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2518 need_version=yes
2519 ;;
2520 esac
2521 shlibpath_var=LD_LIBRARY_PATH
2522 case $host_os in
2523 freebsd2.*)
2524 shlibpath_overrides_runpath=yes
2525 ;;
2526 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2527 shlibpath_overrides_runpath=yes
2528 hardcode_into_libs=yes
2529 ;;
2530 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2531 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2532 shlibpath_overrides_runpath=no
2533 hardcode_into_libs=yes
2534 ;;
2535 *) # from 4.6 on, and DragonFly
2536 shlibpath_overrides_runpath=yes
2537 hardcode_into_libs=yes
2538 ;;
2539 esac
2540 ;;
2541
2542 haiku*)
2543 version_type=linux # correct to gnu/linux during the next big refactor
2544 need_lib_prefix=no
2545 need_version=no
2546 dynamic_linker="$host_os runtime_loader"
2547 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2548 soname_spec='${libname}${release}${shared_ext}$major'
2549 shlibpath_var=LIBRARY_PATH
2550 shlibpath_overrides_runpath=yes
2551 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2552 hardcode_into_libs=yes
2553 ;;
2554
2555 hpux9* | hpux10* | hpux11*)
2556 # Give a soname corresponding to the major version so that dld.sl refuses to
2557 # link against other versions.
2558 version_type=sunos
2559 need_lib_prefix=no
2560 need_version=no
2561 case $host_cpu in
2562 ia64*)
2563 shrext_cmds='.so'
2564 hardcode_into_libs=yes
2565 dynamic_linker="$host_os dld.so"
2566 shlibpath_var=LD_LIBRARY_PATH
2567 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2568 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2569 soname_spec='${libname}${release}${shared_ext}$major'
2570 if test "X$HPUX_IA64_MODE" = X32; then
2571 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2572 else
2573 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2574 fi
2575 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2576 ;;
2577 hppa*64*)
2578 shrext_cmds='.sl'
2579 hardcode_into_libs=yes
2580 dynamic_linker="$host_os dld.sl"
2581 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2582 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584 soname_spec='${libname}${release}${shared_ext}$major'
2585 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2586 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2587 ;;
2588 *)
2589 shrext_cmds='.sl'
2590 dynamic_linker="$host_os dld.sl"
2591 shlibpath_var=SHLIB_PATH
2592 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2594 soname_spec='${libname}${release}${shared_ext}$major'
2595 ;;
2596 esac
2597 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2598 postinstall_cmds='chmod 555 $lib'
2599 # or fails outright, so override atomically:
2600 install_override_mode=555
2601 ;;
2602
2603 interix[[3-9]]*)
2604 version_type=linux # correct to gnu/linux during the next big refactor
2605 need_lib_prefix=no
2606 need_version=no
2607 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2608 soname_spec='${libname}${release}${shared_ext}$major'
2609 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2610 shlibpath_var=LD_LIBRARY_PATH
2611 shlibpath_overrides_runpath=no
2612 hardcode_into_libs=yes
2613 ;;
2614
2615 irix5* | irix6* | nonstopux*)
2616 case $host_os in
2617 nonstopux*) version_type=nonstopux ;;
2618 *)
2619 if test "$lt_cv_prog_gnu_ld" = yes; then
2620 version_type=linux # correct to gnu/linux during the next big refactor
2621 else
2622 version_type=irix
2623 fi ;;
2624 esac
2625 need_lib_prefix=no
2626 need_version=no
2627 soname_spec='${libname}${release}${shared_ext}$major'
2628 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2629 case $host_os in
2630 irix5* | nonstopux*)
2631 libsuff= shlibsuff=
2632 ;;
2633 *)
2634 case $LD in # libtool.m4 will add one of these switches to LD
2635 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2636 libsuff= shlibsuff= libmagic=32-bit;;
2637 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2638 libsuff=32 shlibsuff=N32 libmagic=N32;;
2639 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2640 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2641 *) libsuff= shlibsuff= libmagic=never-match;;
2642 esac
2643 ;;
2644 esac
2645 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2646 shlibpath_overrides_runpath=no
2647 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2648 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2649 hardcode_into_libs=yes
2650 ;;
2651
2652 # No shared lib support for Linux oldld, aout, or coff.
2653 linux*oldld* | linux*aout* | linux*coff*)
2654 dynamic_linker=no
2655 ;;
2656
2657 # This must be glibc/ELF.
2658 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2659 version_type=linux # correct to gnu/linux during the next big refactor
2660 need_lib_prefix=no
2661 need_version=no
2662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2663 soname_spec='${libname}${release}${shared_ext}$major'
2664 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2665 shlibpath_var=LD_LIBRARY_PATH
2666 shlibpath_overrides_runpath=no
2667
2668 # Some binutils ld are patched to set DT_RUNPATH
2669 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2670 [lt_cv_shlibpath_overrides_runpath=no
2671 save_LDFLAGS=$LDFLAGS
2672 save_libdir=$libdir
2673 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2674 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2675 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2676 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2677 [lt_cv_shlibpath_overrides_runpath=yes])])
2678 LDFLAGS=$save_LDFLAGS
2679 libdir=$save_libdir
2680 ])
2681 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2682
2683 # This implies no fast_install, which is unacceptable.
2684 # Some rework will be needed to allow for fast_install
2685 # before this can be enabled.
2686 hardcode_into_libs=yes
2687
2688 # Append ld.so.conf contents to the search path
2689 if test -f /etc/ld.so.conf; then
2690 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' ' '`
2691 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2692 fi
2693
2694 # We used to test for /lib/ld.so.1 and disable shared libraries on
2695 # powerpc, because MkLinux only supported shared libraries with the
2696 # GNU dynamic linker. Since this was broken with cross compilers,
2697 # most powerpc-linux boxes support dynamic linking these days and
2698 # people can always --disable-shared, the test was removed, and we
2699 # assume the GNU/Linux dynamic linker is in use.
2700 dynamic_linker='GNU/Linux ld.so'
2701 ;;
2702
2703 netbsdelf*-gnu)
2704 version_type=linux
2705 need_lib_prefix=no
2706 need_version=no
2707 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2708 soname_spec='${libname}${release}${shared_ext}$major'
2709 shlibpath_var=LD_LIBRARY_PATH
2710 shlibpath_overrides_runpath=no
2711 hardcode_into_libs=yes
2712 dynamic_linker='NetBSD ld.elf_so'
2713 ;;
2714
2715 netbsd*)
2716 version_type=sunos
2717 need_lib_prefix=no
2718 need_version=no
2719 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2720 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2721 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2722 dynamic_linker='NetBSD (a.out) ld.so'
2723 else
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 dynamic_linker='NetBSD ld.elf_so'
2727 fi
2728 shlibpath_var=LD_LIBRARY_PATH
2729 shlibpath_overrides_runpath=yes
2730 hardcode_into_libs=yes
2731 ;;
2732
2733 newsos6)
2734 version_type=linux # correct to gnu/linux during the next big refactor
2735 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2736 shlibpath_var=LD_LIBRARY_PATH
2737 shlibpath_overrides_runpath=yes
2738 ;;
2739
2740 *nto* | *qnx*)
2741 version_type=qnx
2742 need_lib_prefix=no
2743 need_version=no
2744 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2745 soname_spec='${libname}${release}${shared_ext}$major'
2746 shlibpath_var=LD_LIBRARY_PATH
2747 shlibpath_overrides_runpath=no
2748 hardcode_into_libs=yes
2749 dynamic_linker='ldqnx.so'
2750 ;;
2751
2752 openbsd*)
2753 version_type=sunos
2754 sys_lib_dlsearch_path_spec="/usr/lib"
2755 need_lib_prefix=no
2756 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2757 case $host_os in
2758 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2759 *) need_version=no ;;
2760 esac
2761 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2762 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2763 shlibpath_var=LD_LIBRARY_PATH
2764 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2765 case $host_os in
2766 openbsd2.[[89]] | openbsd2.[[89]].*)
2767 shlibpath_overrides_runpath=no
2768 ;;
2769 *)
2770 shlibpath_overrides_runpath=yes
2771 ;;
2772 esac
2773 else
2774 shlibpath_overrides_runpath=yes
2775 fi
2776 ;;
2777
2778 os2*)
2779 libname_spec='$name'
2780 shrext_cmds=".dll"
2781 need_lib_prefix=no
2782 library_names_spec='$libname${shared_ext} $libname.a'
2783 dynamic_linker='OS/2 ld.exe'
2784 shlibpath_var=LIBPATH
2785 ;;
2786
2787 osf3* | osf4* | osf5*)
2788 version_type=osf
2789 need_lib_prefix=no
2790 need_version=no
2791 soname_spec='${libname}${release}${shared_ext}$major'
2792 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2793 shlibpath_var=LD_LIBRARY_PATH
2794 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2795 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2796 ;;
2797
2798 rdos*)
2799 dynamic_linker=no
2800 ;;
2801
2802 solaris*)
2803 version_type=linux # correct to gnu/linux during the next big refactor
2804 need_lib_prefix=no
2805 need_version=no
2806 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2807 soname_spec='${libname}${release}${shared_ext}$major'
2808 shlibpath_var=LD_LIBRARY_PATH
2809 shlibpath_overrides_runpath=yes
2810 hardcode_into_libs=yes
2811 # ldd complains unless libraries are executable
2812 postinstall_cmds='chmod +x $lib'
2813 ;;
2814
2815 sunos4*)
2816 version_type=sunos
2817 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2818 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2819 shlibpath_var=LD_LIBRARY_PATH
2820 shlibpath_overrides_runpath=yes
2821 if test "$with_gnu_ld" = yes; then
2822 need_lib_prefix=no
2823 fi
2824 need_version=yes
2825 ;;
2826
2827 sysv4 | sysv4.3*)
2828 version_type=linux # correct to gnu/linux during the next big refactor
2829 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2830 soname_spec='${libname}${release}${shared_ext}$major'
2831 shlibpath_var=LD_LIBRARY_PATH
2832 case $host_vendor in
2833 sni)
2834 shlibpath_overrides_runpath=no
2835 need_lib_prefix=no
2836 runpath_var=LD_RUN_PATH
2837 ;;
2838 siemens)
2839 need_lib_prefix=no
2840 ;;
2841 motorola)
2842 need_lib_prefix=no
2843 need_version=no
2844 shlibpath_overrides_runpath=no
2845 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2846 ;;
2847 esac
2848 ;;
2849
2850 sysv4*MP*)
2851 if test -d /usr/nec ;then
2852 version_type=linux # correct to gnu/linux during the next big refactor
2853 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2854 soname_spec='$libname${shared_ext}.$major'
2855 shlibpath_var=LD_LIBRARY_PATH
2856 fi
2857 ;;
2858
2859 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2860 version_type=freebsd-elf
2861 need_lib_prefix=no
2862 need_version=no
2863 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2864 soname_spec='${libname}${release}${shared_ext}$major'
2865 shlibpath_var=LD_LIBRARY_PATH
2866 shlibpath_overrides_runpath=yes
2867 hardcode_into_libs=yes
2868 if test "$with_gnu_ld" = yes; then
2869 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2870 else
2871 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2872 case $host_os in
2873 sco3.2v5*)
2874 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2875 ;;
2876 esac
2877 fi
2878 sys_lib_dlsearch_path_spec='/usr/lib'
2879 ;;
2880
2881 tpf*)
2882 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2883 version_type=linux # correct to gnu/linux during the next big refactor
2884 need_lib_prefix=no
2885 need_version=no
2886 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2887 shlibpath_var=LD_LIBRARY_PATH
2888 shlibpath_overrides_runpath=no
2889 hardcode_into_libs=yes
2890 ;;
2891
2892 uts4*)
2893 version_type=linux # correct to gnu/linux during the next big refactor
2894 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2895 soname_spec='${libname}${release}${shared_ext}$major'
2896 shlibpath_var=LD_LIBRARY_PATH
2897 ;;
2898
2899 *)
2900 dynamic_linker=no
2901 ;;
2902 esac
2903 AC_MSG_RESULT([$dynamic_linker])
2904 test "$dynamic_linker" = no && can_build_shared=no
2905
2906 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2907 if test "$GCC" = yes; then
2908 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2909 fi
2910
2911 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2912 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2913 fi
2914 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2915 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2916 fi
2917
2918 _LT_DECL([], [variables_saved_for_relink], [1],
2919 [Variables whose values should be saved in libtool wrapper scripts and
2920 restored at link time])
2921 _LT_DECL([], [need_lib_prefix], [0],
2922 [Do we need the "lib" prefix for modules?])
2923 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2924 _LT_DECL([], [version_type], [0], [Library versioning type])
2925 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2926 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2927 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2928 [Is shlibpath searched before the hard-coded library search path?])
2929 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2930 _LT_DECL([], [library_names_spec], [1],
2931 [[List of archive names. First name is the real one, the rest are links.
2932 The last name is the one that the linker finds with -lNAME]])
2933 _LT_DECL([], [soname_spec], [1],
2934 [[The coded name of the library, if different from the real name]])
2935 _LT_DECL([], [install_override_mode], [1],
2936 [Permission mode override for installation of shared libraries])
2937 _LT_DECL([], [postinstall_cmds], [2],
2938 [Command to use after installation of a shared archive])
2939 _LT_DECL([], [postuninstall_cmds], [2],
2940 [Command to use after uninstallation of a shared archive])
2941 _LT_DECL([], [finish_cmds], [2],
2942 [Commands used to finish a libtool library installation in a directory])
2943 _LT_DECL([], [finish_eval], [1],
2944 [[As "finish_cmds", except a single script fragment to be evaled but
2945 not shown]])
2946 _LT_DECL([], [hardcode_into_libs], [0],
2947 [Whether we should hardcode library paths into libraries])
2948 _LT_DECL([], [sys_lib_search_path_spec], [2],
2949 [Compile-time system search path for libraries])
2950 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2951 [Run-time system search path for libraries])
2952 ])# _LT_SYS_DYNAMIC_LINKER
2953
2954
2955 # _LT_PATH_TOOL_PREFIX(TOOL)
2956 # --------------------------
2957 # find a file program which can recognize shared library
2958 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2959 [m4_require([_LT_DECL_EGREP])dnl
2960 AC_MSG_CHECKING([for $1])
2961 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2962 [case $MAGIC_CMD in
2963 [[\\/*] | ?:[\\/]*])
2964 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2965 ;;
2966 *)
2967 lt_save_MAGIC_CMD="$MAGIC_CMD"
2968 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2969 dnl $ac_dummy forces splitting on constant user-supplied paths.
2970 dnl POSIX.2 word splitting is done only on the output of word expansions,
2971 dnl not every word. This closes a longstanding sh security hole.
2972 ac_dummy="m4_if([$2], , $PATH, [$2])"
2973 for ac_dir in $ac_dummy; do
2974 IFS="$lt_save_ifs"
2975 test -z "$ac_dir" && ac_dir=.
2976 if test -f $ac_dir/$1; then
2977 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2978 if test -n "$file_magic_test_file"; then
2979 case $deplibs_check_method in
2980 "file_magic "*)
2981 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2982 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2983 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2984 $EGREP "$file_magic_regex" > /dev/null; then
2985 :
2986 else
2987 cat <<_LT_EOF 1>&2
2988
2989 *** Warning: the command libtool uses to detect shared libraries,
2990 *** $file_magic_cmd, produces output that libtool cannot recognize.
2991 *** The result is that libtool may fail to recognize shared libraries
2992 *** as such. This will affect the creation of libtool libraries that
2993 *** depend on shared libraries, but programs linked with such libtool
2994 *** libraries will work regardless of this problem. Nevertheless, you
2995 *** may want to report the problem to your system manager and/or to
2996 *** bug-libtool@gnu.org
2997
2998 _LT_EOF
2999 fi ;;
3000 esac
3001 fi
3002 break
3003 fi
3004 done
3005 IFS="$lt_save_ifs"
3006 MAGIC_CMD="$lt_save_MAGIC_CMD"
3007 ;;
3008 esac])
3009 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3010 if test -n "$MAGIC_CMD"; then
3011 AC_MSG_RESULT($MAGIC_CMD)
3012 else
3013 AC_MSG_RESULT(no)
3014 fi
3015 _LT_DECL([], [MAGIC_CMD], [0],
3016 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3017 ])# _LT_PATH_TOOL_PREFIX
3018
3019 # Old name:
3020 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3021 dnl aclocal-1.4 backwards compatibility:
3022 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3023
3024
3025 # _LT_PATH_MAGIC
3026 # --------------
3027 # find a file program which can recognize a shared library
3028 m4_defun([_LT_PATH_MAGIC],
3029 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3030 if test -z "$lt_cv_path_MAGIC_CMD"; then
3031 if test -n "$ac_tool_prefix"; then
3032 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3033 else
3034 MAGIC_CMD=:
3035 fi
3036 fi
3037 ])# _LT_PATH_MAGIC
3038
3039
3040 # LT_PATH_LD
3041 # ----------
3042 # find the pathname to the GNU or non-GNU linker
3043 AC_DEFUN([LT_PATH_LD],
3044 [AC_REQUIRE([AC_PROG_CC])dnl
3045 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3046 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3047 m4_require([_LT_DECL_SED])dnl
3048 m4_require([_LT_DECL_EGREP])dnl
3049 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3050
3051 AC_ARG_WITH([gnu-ld],
3052 [AS_HELP_STRING([--with-gnu-ld],
3053 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3054 [test "$withval" = no || with_gnu_ld=yes],
3055 [with_gnu_ld=no])dnl
3056
3057 ac_prog=ld
3058 if test "$GCC" = yes; then
3059 # Check if gcc -print-prog-name=ld gives a path.
3060 AC_MSG_CHECKING([for ld used by $CC])
3061 case $host in
3062 *-*-mingw*)
3063 # gcc leaves a trailing carriage return which upsets mingw
3064 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3065 *)
3066 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3067 esac
3068 case $ac_prog in
3069 # Accept absolute paths.
3070 [[\\/]]* | ?:[[\\/]]*)
3071 re_direlt='/[[^/]][[^/]]*/\.\./'
3072 # Canonicalize the pathname of ld
3073 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3074 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3075 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3076 done
3077 test -z "$LD" && LD="$ac_prog"
3078 ;;
3079 "")
3080 # If it fails, then pretend we aren't using GCC.
3081 ac_prog=ld
3082 ;;
3083 *)
3084 # If it is relative, then search for the first ld in PATH.
3085 with_gnu_ld=unknown
3086 ;;
3087 esac
3088 elif test "$with_gnu_ld" = yes; then
3089 AC_MSG_CHECKING([for GNU ld])
3090 else
3091 AC_MSG_CHECKING([for non-GNU ld])
3092 fi
3093 AC_CACHE_VAL(lt_cv_path_LD,
3094 [if test -z "$LD"; then
3095 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3096 for ac_dir in $PATH; do
3097 IFS="$lt_save_ifs"
3098 test -z "$ac_dir" && ac_dir=.
3099 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3100 lt_cv_path_LD="$ac_dir/$ac_prog"
3101 # Check to see if the program is GNU ld. I'd rather use --version,
3102 # but apparently some variants of GNU ld only accept -v.
3103 # Break only if it was the GNU/non-GNU ld that we prefer.
3104 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3105 *GNU* | *'with BFD'*)
3106 test "$with_gnu_ld" != no && break
3107 ;;
3108 *)
3109 test "$with_gnu_ld" != yes && break
3110 ;;
3111 esac
3112 fi
3113 done
3114 IFS="$lt_save_ifs"
3115 else
3116 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3117 fi])
3118 LD="$lt_cv_path_LD"
3119 if test -n "$LD"; then
3120 AC_MSG_RESULT($LD)
3121 else
3122 AC_MSG_RESULT(no)
3123 fi
3124 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3125 _LT_PATH_LD_GNU
3126 AC_SUBST([LD])
3127
3128 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3129 ])# LT_PATH_LD
3130
3131 # Old names:
3132 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3133 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3134 dnl aclocal-1.4 backwards compatibility:
3135 dnl AC_DEFUN([AM_PROG_LD], [])
3136 dnl AC_DEFUN([AC_PROG_LD], [])
3137
3138
3139 # _LT_PATH_LD_GNU
3140 #- --------------
3141 m4_defun([_LT_PATH_LD_GNU],
3142 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3143 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3144 case `$LD -v 2>&1 </dev/null` in
3145 *GNU* | *'with BFD'*)
3146 lt_cv_prog_gnu_ld=yes
3147 ;;
3148 *)
3149 lt_cv_prog_gnu_ld=no
3150 ;;
3151 esac])
3152 with_gnu_ld=$lt_cv_prog_gnu_ld
3153 ])# _LT_PATH_LD_GNU
3154
3155
3156 # _LT_CMD_RELOAD
3157 # --------------
3158 # find reload flag for linker
3159 # -- PORTME Some linkers may need a different reload flag.
3160 m4_defun([_LT_CMD_RELOAD],
3161 [AC_CACHE_CHECK([for $LD option to reload object files],
3162 lt_cv_ld_reload_flag,
3163 [lt_cv_ld_reload_flag='-r'])
3164 reload_flag=$lt_cv_ld_reload_flag
3165 case $reload_flag in
3166 "" | " "*) ;;
3167 *) reload_flag=" $reload_flag" ;;
3168 esac
3169 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3170 case $host_os in
3171 cygwin* | mingw* | pw32* | cegcc*)
3172 if test "$GCC" != yes; then
3173 reload_cmds=false
3174 fi
3175 ;;
3176 darwin*)
3177 if test "$GCC" = yes; then
3178 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3179 else
3180 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3181 fi
3182 ;;
3183 esac
3184 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3185 _LT_TAGDECL([], [reload_cmds], [2])dnl
3186 ])# _LT_CMD_RELOAD
3187
3188
3189 # _LT_CHECK_MAGIC_METHOD
3190 # ----------------------
3191 # how to check for library dependencies
3192 # -- PORTME fill in with the dynamic library characteristics
3193 m4_defun([_LT_CHECK_MAGIC_METHOD],
3194 [m4_require([_LT_DECL_EGREP])
3195 m4_require([_LT_DECL_OBJDUMP])
3196 AC_CACHE_CHECK([how to recognize dependent libraries],
3197 lt_cv_deplibs_check_method,
3198 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3199 lt_cv_file_magic_test_file=
3200 lt_cv_deplibs_check_method='unknown'
3201 # Need to set the preceding variable on all platforms that support
3202 # interlibrary dependencies.
3203 # 'none' -- dependencies not supported.
3204 # `unknown' -- same as none, but documents that we really don't know.
3205 # 'pass_all' -- all dependencies passed with no checks.
3206 # 'test_compile' -- check by making test program.
3207 # 'file_magic [[regex]]' -- check by looking for files in library path
3208 # which responds to the $file_magic_cmd with a given extended regex.
3209 # If you have `file' or equivalent on your system and you're not sure
3210 # whether `pass_all' will *always* work, you probably want this one.
3211
3212 case $host_os in
3213 aix[[4-9]]*)
3214 lt_cv_deplibs_check_method=pass_all
3215 ;;
3216
3217 beos*)
3218 lt_cv_deplibs_check_method=pass_all
3219 ;;
3220
3221 bsdi[[45]]*)
3222 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3223 lt_cv_file_magic_cmd='/usr/bin/file -L'
3224 lt_cv_file_magic_test_file=/shlib/libc.so
3225 ;;
3226
3227 cygwin*)
3228 # func_win32_libid is a shell function defined in ltmain.sh
3229 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3230 lt_cv_file_magic_cmd='func_win32_libid'
3231 ;;
3232
3233 mingw* | pw32*)
3234 # Base MSYS/MinGW do not provide the 'file' command needed by
3235 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3236 # unless we find 'file', for example because we are cross-compiling.
3237 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3238 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3239 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3240 lt_cv_file_magic_cmd='func_win32_libid'
3241 else
3242 # Keep this pattern in sync with the one in func_win32_libid.
3243 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3244 lt_cv_file_magic_cmd='$OBJDUMP -f'
3245 fi
3246 ;;
3247
3248 cegcc*)
3249 # use the weaker test based on 'objdump'. See mingw*.
3250 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3251 lt_cv_file_magic_cmd='$OBJDUMP -f'
3252 ;;
3253
3254 darwin* | rhapsody*)
3255 lt_cv_deplibs_check_method=pass_all
3256 ;;
3257
3258 freebsd* | dragonfly*)
3259 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3260 case $host_cpu in
3261 i*86 )
3262 # Not sure whether the presence of OpenBSD here was a mistake.
3263 # Let's accept both of them until this is cleared up.
3264 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3265 lt_cv_file_magic_cmd=/usr/bin/file
3266 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3267 ;;
3268 esac
3269 else
3270 lt_cv_deplibs_check_method=pass_all
3271 fi
3272 ;;
3273
3274 haiku*)
3275 lt_cv_deplibs_check_method=pass_all
3276 ;;
3277
3278 hpux10.20* | hpux11*)
3279 lt_cv_file_magic_cmd=/usr/bin/file
3280 case $host_cpu in
3281 ia64*)
3282 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3283 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3284 ;;
3285 hppa*64*)
3286 [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]']
3287 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3288 ;;
3289 *)
3290 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3291 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3292 ;;
3293 esac
3294 ;;
3295
3296 interix[[3-9]]*)
3297 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3298 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3299 ;;
3300
3301 irix5* | irix6* | nonstopux*)
3302 case $LD in
3303 *-32|*"-32 ") libmagic=32-bit;;
3304 *-n32|*"-n32 ") libmagic=N32;;
3305 *-64|*"-64 ") libmagic=64-bit;;
3306 *) libmagic=never-match;;
3307 esac
3308 lt_cv_deplibs_check_method=pass_all
3309 ;;
3310
3311 # This must be glibc/ELF.
3312 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3313 lt_cv_deplibs_check_method=pass_all
3314 ;;
3315
3316 netbsd* | netbsdelf*-gnu)
3317 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3318 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3319 else
3320 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3321 fi
3322 ;;
3323
3324 newos6*)
3325 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3326 lt_cv_file_magic_cmd=/usr/bin/file
3327 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3328 ;;
3329
3330 *nto* | *qnx*)
3331 lt_cv_deplibs_check_method=pass_all
3332 ;;
3333
3334 openbsd*)
3335 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3336 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3337 else
3338 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3339 fi
3340 ;;
3341
3342 osf3* | osf4* | osf5*)
3343 lt_cv_deplibs_check_method=pass_all
3344 ;;
3345
3346 rdos*)
3347 lt_cv_deplibs_check_method=pass_all
3348 ;;
3349
3350 solaris*)
3351 lt_cv_deplibs_check_method=pass_all
3352 ;;
3353
3354 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3355 lt_cv_deplibs_check_method=pass_all
3356 ;;
3357
3358 sysv4 | sysv4.3*)
3359 case $host_vendor in
3360 motorola)
3361 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]]'
3362 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3363 ;;
3364 ncr)
3365 lt_cv_deplibs_check_method=pass_all
3366 ;;
3367 sequent)
3368 lt_cv_file_magic_cmd='/bin/file'
3369 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3370 ;;
3371 sni)
3372 lt_cv_file_magic_cmd='/bin/file'
3373 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3374 lt_cv_file_magic_test_file=/lib/libc.so
3375 ;;
3376 siemens)
3377 lt_cv_deplibs_check_method=pass_all
3378 ;;
3379 pc)
3380 lt_cv_deplibs_check_method=pass_all
3381 ;;
3382 esac
3383 ;;
3384
3385 tpf*)
3386 lt_cv_deplibs_check_method=pass_all
3387 ;;
3388 esac
3389 ])
3390
3391 file_magic_glob=
3392 want_nocaseglob=no
3393 if test "$build" = "$host"; then
3394 case $host_os in
3395 mingw* | pw32*)
3396 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3397 want_nocaseglob=yes
3398 else
3399 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3400 fi
3401 ;;
3402 esac
3403 fi
3404
3405 file_magic_cmd=$lt_cv_file_magic_cmd
3406 deplibs_check_method=$lt_cv_deplibs_check_method
3407 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3408
3409 _LT_DECL([], [deplibs_check_method], [1],
3410 [Method to check whether dependent libraries are shared objects])
3411 _LT_DECL([], [file_magic_cmd], [1],
3412 [Command to use when deplibs_check_method = "file_magic"])
3413 _LT_DECL([], [file_magic_glob], [1],
3414 [How to find potential files when deplibs_check_method = "file_magic"])
3415 _LT_DECL([], [want_nocaseglob], [1],
3416 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3417 ])# _LT_CHECK_MAGIC_METHOD
3418
3419
3420 # LT_PATH_NM
3421 # ----------
3422 # find the pathname to a BSD- or MS-compatible name lister
3423 AC_DEFUN([LT_PATH_NM],
3424 [AC_REQUIRE([AC_PROG_CC])dnl
3425 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3426 [if test -n "$NM"; then
3427 # Let the user override the test.
3428 lt_cv_path_NM="$NM"
3429 else
3430 lt_nm_to_check="${ac_tool_prefix}nm"
3431 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3432 lt_nm_to_check="$lt_nm_to_check nm"
3433 fi
3434 for lt_tmp_nm in $lt_nm_to_check; do
3435 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3436 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3437 IFS="$lt_save_ifs"
3438 test -z "$ac_dir" && ac_dir=.
3439 tmp_nm="$ac_dir/$lt_tmp_nm"
3440 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3441 # Check to see if the nm accepts a BSD-compat flag.
3442 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3443 # nm: unknown option "B" ignored
3444 # Tru64's nm complains that /dev/null is an invalid object file
3445 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3446 */dev/null* | *'Invalid file or object type'*)
3447 lt_cv_path_NM="$tmp_nm -B"
3448 break
3449 ;;
3450 *)
3451 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3452 */dev/null*)
3453 lt_cv_path_NM="$tmp_nm -p"
3454 break
3455 ;;
3456 *)
3457 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3458 continue # so that we can try to find one that supports BSD flags
3459 ;;
3460 esac
3461 ;;
3462 esac
3463 fi
3464 done
3465 IFS="$lt_save_ifs"
3466 done
3467 : ${lt_cv_path_NM=no}
3468 fi])
3469 if test "$lt_cv_path_NM" != "no"; then
3470 NM="$lt_cv_path_NM"
3471 else
3472 # Didn't find any BSD compatible name lister, look for dumpbin.
3473 if test -n "$DUMPBIN"; then :
3474 # Let the user override the test.
3475 else
3476 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3477 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3478 *COFF*)
3479 DUMPBIN="$DUMPBIN -symbols"
3480 ;;
3481 *)
3482 DUMPBIN=:
3483 ;;
3484 esac
3485 fi
3486 AC_SUBST([DUMPBIN])
3487 if test "$DUMPBIN" != ":"; then
3488 NM="$DUMPBIN"
3489 fi
3490 fi
3491 test -z "$NM" && NM=nm
3492 AC_SUBST([NM])
3493 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3494
3495 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3496 [lt_cv_nm_interface="BSD nm"
3497 echo "int some_variable = 0;" > conftest.$ac_ext
3498 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3499 (eval "$ac_compile" 2>conftest.err)
3500 cat conftest.err >&AS_MESSAGE_LOG_FD
3501 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3502 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3503 cat conftest.err >&AS_MESSAGE_LOG_FD
3504 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3505 cat conftest.out >&AS_MESSAGE_LOG_FD
3506 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3507 lt_cv_nm_interface="MS dumpbin"
3508 fi
3509 rm -f conftest*])
3510 ])# LT_PATH_NM
3511
3512 # Old names:
3513 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3514 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3515 dnl aclocal-1.4 backwards compatibility:
3516 dnl AC_DEFUN([AM_PROG_NM], [])
3517 dnl AC_DEFUN([AC_PROG_NM], [])
3518
3519 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3520 # --------------------------------
3521 # how to determine the name of the shared library
3522 # associated with a specific link library.
3523 # -- PORTME fill in with the dynamic library characteristics
3524 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3525 [m4_require([_LT_DECL_EGREP])
3526 m4_require([_LT_DECL_OBJDUMP])
3527 m4_require([_LT_DECL_DLLTOOL])
3528 AC_CACHE_CHECK([how to associate runtime and link libraries],
3529 lt_cv_sharedlib_from_linklib_cmd,
3530 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3531
3532 case $host_os in
3533 cygwin* | mingw* | pw32* | cegcc*)
3534 # two different shell functions defined in ltmain.sh
3535 # decide which to use based on capabilities of $DLLTOOL
3536 case `$DLLTOOL --help 2>&1` in
3537 *--identify-strict*)
3538 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3539 ;;
3540 *)
3541 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3542 ;;
3543 esac
3544 ;;
3545 *)
3546 # fallback: assume linklib IS sharedlib
3547 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3548 ;;
3549 esac
3550 ])
3551 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3552 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3553
3554 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3555 [Command to associate shared and link libraries])
3556 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3557
3558
3559 # _LT_PATH_MANIFEST_TOOL
3560 # ----------------------
3561 # locate the manifest tool
3562 m4_defun([_LT_PATH_MANIFEST_TOOL],
3563 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3564 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3565 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3566 [lt_cv_path_mainfest_tool=no
3567 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3568 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3569 cat conftest.err >&AS_MESSAGE_LOG_FD
3570 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3571 lt_cv_path_mainfest_tool=yes
3572 fi
3573 rm -f conftest*])
3574 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3575 MANIFEST_TOOL=:
3576 fi
3577 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3578 ])# _LT_PATH_MANIFEST_TOOL
3579
3580
3581 # LT_LIB_M
3582 # --------
3583 # check for math library
3584 AC_DEFUN([LT_LIB_M],
3585 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3586 LIBM=
3587 case $host in
3588 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3589 # These system don't have libm, or don't need it
3590 ;;
3591 *-ncr-sysv4.3*)
3592 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3593 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3594 ;;
3595 *)
3596 AC_CHECK_LIB(m, cos, LIBM="-lm")
3597 ;;
3598 esac
3599 AC_SUBST([LIBM])
3600 ])# LT_LIB_M
3601
3602 # Old name:
3603 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3604 dnl aclocal-1.4 backwards compatibility:
3605 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3606
3607
3608 # _LT_COMPILER_NO_RTTI([TAGNAME])
3609 # -------------------------------
3610 m4_defun([_LT_COMPILER_NO_RTTI],
3611 [m4_require([_LT_TAG_COMPILER])dnl
3612
3613 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3614
3615 if test "$GCC" = yes; then
3616 case $cc_basename in
3617 nvcc*)
3618 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3619 *)
3620 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3621 esac
3622
3623 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3624 lt_cv_prog_compiler_rtti_exceptions,
3625 [-fno-rtti -fno-exceptions], [],
3626 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3627 fi
3628 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3629 [Compiler flag to turn off builtin functions])
3630 ])# _LT_COMPILER_NO_RTTI
3631
3632
3633 # _LT_CMD_GLOBAL_SYMBOLS
3634 # ----------------------
3635 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3636 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3637 AC_REQUIRE([AC_PROG_CC])dnl
3638 AC_REQUIRE([AC_PROG_AWK])dnl
3639 AC_REQUIRE([LT_PATH_NM])dnl
3640 AC_REQUIRE([LT_PATH_LD])dnl
3641 m4_require([_LT_DECL_SED])dnl
3642 m4_require([_LT_DECL_EGREP])dnl
3643 m4_require([_LT_TAG_COMPILER])dnl
3644
3645 # Check for command to grab the raw symbol name followed by C symbol from nm.
3646 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3647 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3648 [
3649 # These are sane defaults that work on at least a few old systems.
3650 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3651
3652 # Character class describing NM global symbol codes.
3653 symcode='[[BCDEGRST]]'
3654
3655 # Regexp to match symbols that can be accessed directly from C.
3656 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3657
3658 # Define system-specific variables.
3659 case $host_os in
3660 aix*)
3661 symcode='[[BCDT]]'
3662 ;;
3663 cygwin* | mingw* | pw32* | cegcc*)
3664 symcode='[[ABCDGISTW]]'
3665 ;;
3666 hpux*)
3667 if test "$host_cpu" = ia64; then
3668 symcode='[[ABCDEGRST]]'
3669 fi
3670 ;;
3671 irix* | nonstopux*)
3672 symcode='[[BCDEGRST]]'
3673 ;;
3674 osf*)
3675 symcode='[[BCDEGQRST]]'
3676 ;;
3677 solaris*)
3678 symcode='[[BDRT]]'
3679 ;;
3680 sco3.2v5*)
3681 symcode='[[DT]]'
3682 ;;
3683 sysv4.2uw2*)
3684 symcode='[[DT]]'
3685 ;;
3686 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3687 symcode='[[ABDT]]'
3688 ;;
3689 sysv4)
3690 symcode='[[DFNSTU]]'
3691 ;;
3692 esac
3693
3694 # If we're using GNU nm, then use its standard symbol codes.
3695 case `$NM -V 2>&1` in
3696 *GNU* | *'with BFD'*)
3697 symcode='[[ABCDGIRSTW]]' ;;
3698 esac
3699
3700 # Transform an extracted symbol line into a proper C declaration.
3701 # Some systems (esp. on ia64) link data and code symbols differently,
3702 # so use this general approach.
3703 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3704
3705 # Transform an extracted symbol line into symbol name and symbol address
3706 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3707 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'"
3708
3709 # Handle CRLF in mingw tool chain
3710 opt_cr=
3711 case $build_os in
3712 mingw*)
3713 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3714 ;;
3715 esac
3716
3717 # Try without a prefix underscore, then with it.
3718 for ac_symprfx in "" "_"; do
3719
3720 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3721 symxfrm="\\1 $ac_symprfx\\2 \\2"
3722
3723 # Write the raw and C identifiers.
3724 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3725 # Fake it for dumpbin and say T for any non-static function
3726 # and D for any global variable.
3727 # Also find C++ and __fastcall symbols from MSVC++,
3728 # which start with @ or ?.
3729 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3730 " {last_section=section; section=\$ 3};"\
3731 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3732 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3733 " \$ 0!~/External *\|/{next};"\
3734 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3735 " {if(hide[section]) next};"\
3736 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3737 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3738 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3739 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3740 " ' prfx=^$ac_symprfx]"
3741 else
3742 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3743 fi
3744 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3745
3746 # Check to see that the pipe works correctly.
3747 pipe_works=no
3748
3749 rm -f conftest*
3750 cat > conftest.$ac_ext <<_LT_EOF
3751 #ifdef __cplusplus
3752 extern "C" {
3753 #endif
3754 char nm_test_var;
3755 void nm_test_func(void);
3756 void nm_test_func(void){}
3757 #ifdef __cplusplus
3758 }
3759 #endif
3760 int main(){nm_test_var='a';nm_test_func();return(0);}
3761 _LT_EOF
3762
3763 if AC_TRY_EVAL(ac_compile); then
3764 # Now try to grab the symbols.
3765 nlist=conftest.nm
3766 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3767 # Try sorting and uniquifying the output.
3768 if sort "$nlist" | uniq > "$nlist"T; then
3769 mv -f "$nlist"T "$nlist"
3770 else
3771 rm -f "$nlist"T
3772 fi
3773
3774 # Make sure that we snagged all the symbols we need.
3775 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3776 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3777 cat <<_LT_EOF > conftest.$ac_ext
3778 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3779 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3780 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3781 relocations are performed -- see ld's documentation on pseudo-relocs. */
3782 # define LT@&t@_DLSYM_CONST
3783 #elif defined(__osf__)
3784 /* This system does not cope well with relocations in const data. */
3785 # define LT@&t@_DLSYM_CONST
3786 #else
3787 # define LT@&t@_DLSYM_CONST const
3788 #endif
3789
3790 #ifdef __cplusplus
3791 extern "C" {
3792 #endif
3793
3794 _LT_EOF
3795 # Now generate the symbol file.
3796 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3797
3798 cat <<_LT_EOF >> conftest.$ac_ext
3799
3800 /* The mapping between symbol names and symbols. */
3801 LT@&t@_DLSYM_CONST struct {
3802 const char *name;
3803 void *address;
3804 }
3805 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3806 {
3807 { "@PROGRAM@", (void *) 0 },
3808 _LT_EOF
3809 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3810 cat <<\_LT_EOF >> conftest.$ac_ext
3811 {0, (void *) 0}
3812 };
3813
3814 /* This works around a problem in FreeBSD linker */
3815 #ifdef FREEBSD_WORKAROUND
3816 static const void *lt_preloaded_setup() {
3817 return lt__PROGRAM__LTX_preloaded_symbols;
3818 }
3819 #endif
3820
3821 #ifdef __cplusplus
3822 }
3823 #endif
3824 _LT_EOF
3825 # Now try linking the two files.
3826 mv conftest.$ac_objext conftstm.$ac_objext
3827 lt_globsym_save_LIBS=$LIBS
3828 lt_globsym_save_CFLAGS=$CFLAGS
3829 LIBS="conftstm.$ac_objext"
3830 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3831 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3832 pipe_works=yes
3833 fi
3834 LIBS=$lt_globsym_save_LIBS
3835 CFLAGS=$lt_globsym_save_CFLAGS
3836 else
3837 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3838 fi
3839 else
3840 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3841 fi
3842 else
3843 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3844 fi
3845 else
3846 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3847 cat conftest.$ac_ext >&5
3848 fi
3849 rm -rf conftest* conftst*
3850
3851 # Do not use the global_symbol_pipe unless it works.
3852 if test "$pipe_works" = yes; then
3853 break
3854 else
3855 lt_cv_sys_global_symbol_pipe=
3856 fi
3857 done
3858 ])
3859 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3860 lt_cv_sys_global_symbol_to_cdecl=
3861 fi
3862 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3863 AC_MSG_RESULT(failed)
3864 else
3865 AC_MSG_RESULT(ok)
3866 fi
3867
3868 # Response file support.
3869 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3870 nm_file_list_spec='@'
3871 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3872 nm_file_list_spec='@'
3873 fi
3874
3875 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3876 [Take the output of nm and produce a listing of raw symbols and C names])
3877 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3878 [Transform the output of nm in a proper C declaration])
3879 _LT_DECL([global_symbol_to_c_name_address],
3880 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3881 [Transform the output of nm in a C name address pair])
3882 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3883 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3884 [Transform the output of nm in a C name address pair when lib prefix is needed])
3885 _LT_DECL([], [nm_file_list_spec], [1],
3886 [Specify filename containing input files for $NM])
3887 ]) # _LT_CMD_GLOBAL_SYMBOLS
3888
3889
3890 # _LT_COMPILER_PIC([TAGNAME])
3891 # ---------------------------
3892 m4_defun([_LT_COMPILER_PIC],
3893 [m4_require([_LT_TAG_COMPILER])dnl
3894 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3895 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3896 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3897
3898 m4_if([$1], [CXX], [
3899 # C++ specific cases for pic, static, wl, etc.
3900 if test "$GXX" = yes; then
3901 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3902 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3903
3904 case $host_os in
3905 aix*)
3906 # All AIX code is PIC.
3907 if test "$host_cpu" = ia64; then
3908 # AIX 5 now supports IA64 processor
3909 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3910 fi
3911 ;;
3912
3913 amigaos*)
3914 case $host_cpu in
3915 powerpc)
3916 # see comment about AmigaOS4 .so support
3917 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3918 ;;
3919 m68k)
3920 # FIXME: we need at least 68020 code to build shared libraries, but
3921 # adding the `-m68020' flag to GCC prevents building anything better,
3922 # like `-m68040'.
3923 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3924 ;;
3925 esac
3926 ;;
3927
3928 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3929 # PIC is the default for these OSes.
3930 ;;
3931 mingw* | cygwin* | os2* | pw32* | cegcc*)
3932 # This hack is so that the source file can tell whether it is being
3933 # built for inclusion in a dll (and should export symbols for example).
3934 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3935 # (--disable-auto-import) libraries
3936 m4_if([$1], [GCJ], [],
3937 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3938 ;;
3939 darwin* | rhapsody*)
3940 # PIC is the default on this platform
3941 # Common symbols not allowed in MH_DYLIB files
3942 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3943 ;;
3944 *djgpp*)
3945 # DJGPP does not support shared libraries at all
3946 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3947 ;;
3948 haiku*)
3949 # PIC is the default for Haiku.
3950 # The "-static" flag exists, but is broken.
3951 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3952 ;;
3953 interix[[3-9]]*)
3954 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3955 # Instead, we relocate shared libraries at runtime.
3956 ;;
3957 sysv4*MP*)
3958 if test -d /usr/nec; then
3959 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3960 fi
3961 ;;
3962 hpux*)
3963 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3964 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3965 # sets the default TLS model and affects inlining.
3966 case $host_cpu in
3967 hppa*64*)
3968 ;;
3969 *)
3970 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3971 ;;
3972 esac
3973 ;;
3974 *qnx* | *nto*)
3975 # QNX uses GNU C++, but need to define -shared option too, otherwise
3976 # it will coredump.
3977 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3978 ;;
3979 *)
3980 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3981 ;;
3982 esac
3983 else
3984 case $host_os in
3985 aix[[4-9]]*)
3986 # All AIX code is PIC.
3987 if test "$host_cpu" = ia64; then
3988 # AIX 5 now supports IA64 processor
3989 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3990 else
3991 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3992 fi
3993 ;;
3994 chorus*)
3995 case $cc_basename in
3996 cxch68*)
3997 # Green Hills C++ Compiler
3998 # _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"
3999 ;;
4000 esac
4001 ;;
4002 mingw* | cygwin* | os2* | pw32* | cegcc*)
4003 # This hack is so that the source file can tell whether it is being
4004 # built for inclusion in a dll (and should export symbols for example).
4005 m4_if([$1], [GCJ], [],
4006 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4007 ;;
4008 dgux*)
4009 case $cc_basename in
4010 ec++*)
4011 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4012 ;;
4013 ghcx*)
4014 # Green Hills C++ Compiler
4015 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4016 ;;
4017 *)
4018 ;;
4019 esac
4020 ;;
4021 freebsd* | dragonfly*)
4022 # FreeBSD uses GNU C++
4023 ;;
4024 hpux9* | hpux10* | hpux11*)
4025 case $cc_basename in
4026 CC*)
4027 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4029 if test "$host_cpu" != ia64; then
4030 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4031 fi
4032 ;;
4033 aCC*)
4034 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4035 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4036 case $host_cpu in
4037 hppa*64*|ia64*)
4038 # +Z the default
4039 ;;
4040 *)
4041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4042 ;;
4043 esac
4044 ;;
4045 *)
4046 ;;
4047 esac
4048 ;;
4049 interix*)
4050 # This is c89, which is MS Visual C++ (no shared libs)
4051 # Anyone wants to do a port?
4052 ;;
4053 irix5* | irix6* | nonstopux*)
4054 case $cc_basename in
4055 CC*)
4056 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4057 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4058 # CC pic flag -KPIC is the default.
4059 ;;
4060 *)
4061 ;;
4062 esac
4063 ;;
4064 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4065 case $cc_basename in
4066 KCC*)
4067 # KAI C++ Compiler
4068 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4069 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4070 ;;
4071 ecpc* )
4072 # old Intel C++ for x86_64 which still supported -KPIC.
4073 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4074 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4075 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4076 ;;
4077 icpc* )
4078 # Intel C++, used to be incompatible with GCC.
4079 # ICC 10 doesn't accept -KPIC any more.
4080 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4081 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4083 ;;
4084 pgCC* | pgcpp*)
4085 # Portland Group C++ compiler
4086 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4088 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4089 ;;
4090 cxx*)
4091 # Compaq C++
4092 # Make sure the PIC flag is empty. It appears that all Alpha
4093 # Linux and Compaq Tru64 Unix objects are PIC.
4094 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4095 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4096 ;;
4097 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4098 # IBM XL 8.0, 9.0 on PPC and BlueGene
4099 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4100 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4101 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4102 ;;
4103 *)
4104 case `$CC -V 2>&1 | sed 5q` in
4105 *Sun\ C*)
4106 # Sun C++ 5.9
4107 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4108 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4109 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4110 ;;
4111 esac
4112 ;;
4113 esac
4114 ;;
4115 lynxos*)
4116 ;;
4117 m88k*)
4118 ;;
4119 mvs*)
4120 case $cc_basename in
4121 cxx*)
4122 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4123 ;;
4124 *)
4125 ;;
4126 esac
4127 ;;
4128 netbsd* | netbsdelf*-gnu)
4129 ;;
4130 *qnx* | *nto*)
4131 # QNX uses GNU C++, but need to define -shared option too, otherwise
4132 # it will coredump.
4133 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4134 ;;
4135 osf3* | osf4* | osf5*)
4136 case $cc_basename in
4137 KCC*)
4138 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4139 ;;
4140 RCC*)
4141 # Rational C++ 2.4.1
4142 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4143 ;;
4144 cxx*)
4145 # Digital/Compaq C++
4146 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4147 # Make sure the PIC flag is empty. It appears that all Alpha
4148 # Linux and Compaq Tru64 Unix objects are PIC.
4149 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4150 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4151 ;;
4152 *)
4153 ;;
4154 esac
4155 ;;
4156 psos*)
4157 ;;
4158 solaris*)
4159 case $cc_basename in
4160 CC* | sunCC*)
4161 # Sun C++ 4.2, 5.x and Centerline C++
4162 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4163 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4164 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4165 ;;
4166 gcx*)
4167 # Green Hills C++ Compiler
4168 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4169 ;;
4170 *)
4171 ;;
4172 esac
4173 ;;
4174 sunos4*)
4175 case $cc_basename in
4176 CC*)
4177 # Sun C++ 4.x
4178 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4179 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4180 ;;
4181 lcc*)
4182 # Lucid
4183 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4184 ;;
4185 *)
4186 ;;
4187 esac
4188 ;;
4189 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4190 case $cc_basename in
4191 CC*)
4192 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4193 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4194 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4195 ;;
4196 esac
4197 ;;
4198 tandem*)
4199 case $cc_basename in
4200 NCC*)
4201 # NonStop-UX NCC 3.20
4202 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4203 ;;
4204 *)
4205 ;;
4206 esac
4207 ;;
4208 vxworks*)
4209 ;;
4210 *)
4211 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4212 ;;
4213 esac
4214 fi
4215 ],
4216 [
4217 if test "$GCC" = yes; then
4218 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4219 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4220
4221 case $host_os in
4222 aix*)
4223 # All AIX code is PIC.
4224 if test "$host_cpu" = ia64; then
4225 # AIX 5 now supports IA64 processor
4226 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4227 fi
4228 ;;
4229
4230 amigaos*)
4231 case $host_cpu in
4232 powerpc)
4233 # see comment about AmigaOS4 .so support
4234 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4235 ;;
4236 m68k)
4237 # FIXME: we need at least 68020 code to build shared libraries, but
4238 # adding the `-m68020' flag to GCC prevents building anything better,
4239 # like `-m68040'.
4240 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4241 ;;
4242 esac
4243 ;;
4244
4245 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4246 # PIC is the default for these OSes.
4247 ;;
4248
4249 mingw* | cygwin* | pw32* | os2* | cegcc*)
4250 # This hack is so that the source file can tell whether it is being
4251 # built for inclusion in a dll (and should export symbols for example).
4252 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4253 # (--disable-auto-import) libraries
4254 m4_if([$1], [GCJ], [],
4255 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4256 ;;
4257
4258 darwin* | rhapsody*)
4259 # PIC is the default on this platform
4260 # Common symbols not allowed in MH_DYLIB files
4261 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4262 ;;
4263
4264 haiku*)
4265 # PIC is the default for Haiku.
4266 # The "-static" flag exists, but is broken.
4267 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4268 ;;
4269
4270 hpux*)
4271 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4272 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4273 # sets the default TLS model and affects inlining.
4274 case $host_cpu in
4275 hppa*64*)
4276 # +Z the default
4277 ;;
4278 *)
4279 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4280 ;;
4281 esac
4282 ;;
4283
4284 interix[[3-9]]*)
4285 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4286 # Instead, we relocate shared libraries at runtime.
4287 ;;
4288
4289 msdosdjgpp*)
4290 # Just because we use GCC doesn't mean we suddenly get shared libraries
4291 # on systems that don't support them.
4292 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4293 enable_shared=no
4294 ;;
4295
4296 *nto* | *qnx*)
4297 # QNX uses GNU C++, but need to define -shared option too, otherwise
4298 # it will coredump.
4299 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4300 ;;
4301
4302 sysv4*MP*)
4303 if test -d /usr/nec; then
4304 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4305 fi
4306 ;;
4307
4308 *)
4309 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4310 ;;
4311 esac
4312
4313 case $cc_basename in
4314 nvcc*) # Cuda Compiler Driver 2.2
4315 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4316 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4317 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4318 fi
4319 ;;
4320 esac
4321 else
4322 # PORTME Check for flag to pass linker flags through the system compiler.
4323 case $host_os in
4324 aix*)
4325 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4326 if test "$host_cpu" = ia64; then
4327 # AIX 5 now supports IA64 processor
4328 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4329 else
4330 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4331 fi
4332 ;;
4333
4334 mingw* | cygwin* | pw32* | os2* | cegcc*)
4335 # This hack is so that the source file can tell whether it is being
4336 # built for inclusion in a dll (and should export symbols for example).
4337 m4_if([$1], [GCJ], [],
4338 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4339 ;;
4340
4341 hpux9* | hpux10* | hpux11*)
4342 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4343 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4344 # not for PA HP-UX.
4345 case $host_cpu in
4346 hppa*64*|ia64*)
4347 # +Z the default
4348 ;;
4349 *)
4350 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4351 ;;
4352 esac
4353 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4354 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4355 ;;
4356
4357 irix5* | irix6* | nonstopux*)
4358 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4359 # PIC (with -KPIC) is the default.
4360 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4361 ;;
4362
4363 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4364 case $cc_basename in
4365 # old Intel for x86_64 which still supported -KPIC.
4366 ecc*)
4367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4368 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4369 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4370 ;;
4371 # icc used to be incompatible with GCC.
4372 # ICC 10 doesn't accept -KPIC any more.
4373 icc* | ifort*)
4374 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4375 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4376 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4377 ;;
4378 # Lahey Fortran 8.1.
4379 lf95*)
4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4382 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4383 ;;
4384 nagfor*)
4385 # NAG Fortran compiler
4386 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4387 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4388 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4389 ;;
4390 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4391 # Portland Group compilers (*not* the Pentium gcc compiler,
4392 # which looks to be a dead project)
4393 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4394 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4395 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4396 ;;
4397 ccc*)
4398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4399 # All Alpha code is PIC.
4400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4401 ;;
4402 xl* | bgxl* | bgf* | mpixl*)
4403 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4407 ;;
4408 *)
4409 case `$CC -V 2>&1 | sed 5q` in
4410 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4411 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4413 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4414 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4415 ;;
4416 *Sun\ F* | *Sun*Fortran*)
4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4420 ;;
4421 *Sun\ C*)
4422 # Sun C 5.9
4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4425 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4426 ;;
4427 *Intel*\ [[CF]]*Compiler*)
4428 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4429 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4430 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4431 ;;
4432 *Portland\ Group*)
4433 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4434 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4435 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4436 ;;
4437 esac
4438 ;;
4439 esac
4440 ;;
4441
4442 newsos6)
4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4444 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4445 ;;
4446
4447 *nto* | *qnx*)
4448 # QNX uses GNU C++, but need to define -shared option too, otherwise
4449 # it will coredump.
4450 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4451 ;;
4452
4453 osf3* | osf4* | osf5*)
4454 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4455 # All OSF/1 code is PIC.
4456 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4457 ;;
4458
4459 rdos*)
4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4461 ;;
4462
4463 solaris*)
4464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4465 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4466 case $cc_basename in
4467 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4468 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4469 *)
4470 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4471 esac
4472 ;;
4473
4474 sunos4*)
4475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4476 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4477 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4478 ;;
4479
4480 sysv4 | sysv4.2uw2* | sysv4.3*)
4481 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4482 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4484 ;;
4485
4486 sysv4*MP*)
4487 if test -d /usr/nec ;then
4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4490 fi
4491 ;;
4492
4493 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4494 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4495 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4496 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4497 ;;
4498
4499 unicos*)
4500 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4501 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4502 ;;
4503
4504 uts4*)
4505 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4506 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4507 ;;
4508
4509 *)
4510 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4511 ;;
4512 esac
4513 fi
4514 ])
4515 case $host_os in
4516 # For platforms which do not support PIC, -DPIC is meaningless:
4517 *djgpp*)
4518 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4519 ;;
4520 *)
4521 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4522 ;;
4523 esac
4524
4525 AC_CACHE_CHECK([for $compiler option to produce PIC],
4526 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4527 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4528 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4529
4530 #
4531 # Check to make sure the PIC flag actually works.
4532 #
4533 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4534 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4535 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4536 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4537 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4538 "" | " "*) ;;
4539 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4540 esac],
4541 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4542 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4543 fi
4544 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4545 [Additional compiler flags for building library objects])
4546
4547 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4548 [How to pass a linker flag through the compiler])
4549 #
4550 # Check to make sure the static flag actually works.
4551 #
4552 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4553 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4554 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4555 $lt_tmp_static_flag,
4556 [],
4557 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4558 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4559 [Compiler flag to prevent dynamic linking])
4560 ])# _LT_COMPILER_PIC
4561
4562
4563 # _LT_LINKER_SHLIBS([TAGNAME])
4564 # ----------------------------
4565 # See if the linker supports building shared libraries.
4566 m4_defun([_LT_LINKER_SHLIBS],
4567 [AC_REQUIRE([LT_PATH_LD])dnl
4568 AC_REQUIRE([LT_PATH_NM])dnl
4569 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4570 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4571 m4_require([_LT_DECL_EGREP])dnl
4572 m4_require([_LT_DECL_SED])dnl
4573 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4574 m4_require([_LT_TAG_COMPILER])dnl
4575 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4576 m4_if([$1], [CXX], [
4577 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4578 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4579 case $host_os in
4580 aix[[4-9]]*)
4581 # If we're using GNU nm, then we don't want the "-C" option.
4582 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4583 # Also, AIX nm treats weak defined symbols like other global defined
4584 # symbols, whereas GNU nm marks them as "W".
4585 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4586 _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'
4587 else
4588 _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'
4589 fi
4590 ;;
4591 pw32*)
4592 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4593 ;;
4594 cygwin* | mingw* | cegcc*)
4595 case $cc_basename in
4596 cl*)
4597 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4598 ;;
4599 *)
4600 _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'
4601 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4602 ;;
4603 esac
4604 ;;
4605 linux* | k*bsd*-gnu | gnu*)
4606 _LT_TAGVAR(link_all_deplibs, $1)=no
4607 ;;
4608 *)
4609 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4610 ;;
4611 esac
4612 ], [
4613 runpath_var=
4614 _LT_TAGVAR(allow_undefined_flag, $1)=
4615 _LT_TAGVAR(always_export_symbols, $1)=no
4616 _LT_TAGVAR(archive_cmds, $1)=
4617 _LT_TAGVAR(archive_expsym_cmds, $1)=
4618 _LT_TAGVAR(compiler_needs_object, $1)=no
4619 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4620 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4621 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4622 _LT_TAGVAR(hardcode_automatic, $1)=no
4623 _LT_TAGVAR(hardcode_direct, $1)=no
4624 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4625 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4626 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4627 _LT_TAGVAR(hardcode_minus_L, $1)=no
4628 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4629 _LT_TAGVAR(inherit_rpath, $1)=no
4630 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4631 _LT_TAGVAR(module_cmds, $1)=
4632 _LT_TAGVAR(module_expsym_cmds, $1)=
4633 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4634 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4635 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4636 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4637 # include_expsyms should be a list of space-separated symbols to be *always*
4638 # included in the symbol list
4639 _LT_TAGVAR(include_expsyms, $1)=
4640 # exclude_expsyms can be an extended regexp of symbols to exclude
4641 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4642 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4643 # as well as any symbol that contains `d'.
4644 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4645 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4646 # platforms (ab)use it in PIC code, but their linkers get confused if
4647 # the symbol is explicitly referenced. Since portable code cannot
4648 # rely on this symbol name, it's probably fine to never include it in
4649 # preloaded symbol tables.
4650 # Exclude shared library initialization/finalization symbols.
4651 dnl Note also adjust exclude_expsyms for C++ above.
4652 extract_expsyms_cmds=
4653
4654 case $host_os in
4655 cygwin* | mingw* | pw32* | cegcc*)
4656 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4657 # When not using gcc, we currently assume that we are using
4658 # Microsoft Visual C++.
4659 if test "$GCC" != yes; then
4660 with_gnu_ld=no
4661 fi
4662 ;;
4663 interix*)
4664 # we just hope/assume this is gcc and not c89 (= MSVC++)
4665 with_gnu_ld=yes
4666 ;;
4667 openbsd*)
4668 with_gnu_ld=no
4669 ;;
4670 linux* | k*bsd*-gnu | gnu*)
4671 _LT_TAGVAR(link_all_deplibs, $1)=no
4672 ;;
4673 esac
4674
4675 _LT_TAGVAR(ld_shlibs, $1)=yes
4676
4677 # On some targets, GNU ld is compatible enough with the native linker
4678 # that we're better off using the native interface for both.
4679 lt_use_gnu_ld_interface=no
4680 if test "$with_gnu_ld" = yes; then
4681 case $host_os in
4682 aix*)
4683 # The AIX port of GNU ld has always aspired to compatibility
4684 # with the native linker. However, as the warning in the GNU ld
4685 # block says, versions before 2.19.5* couldn't really create working
4686 # shared libraries, regardless of the interface used.
4687 case `$LD -v 2>&1` in
4688 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4689 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4690 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4691 *)
4692 lt_use_gnu_ld_interface=yes
4693 ;;
4694 esac
4695 ;;
4696 *)
4697 lt_use_gnu_ld_interface=yes
4698 ;;
4699 esac
4700 fi
4701
4702 if test "$lt_use_gnu_ld_interface" = yes; then
4703 # If archive_cmds runs LD, not CC, wlarc should be empty
4704 wlarc='${wl}'
4705
4706 # Set some defaults for GNU ld with shared library support. These
4707 # are reset later if shared libraries are not supported. Putting them
4708 # here allows them to be overridden if necessary.
4709 runpath_var=LD_RUN_PATH
4710 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4711 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4712 # ancient GNU ld didn't support --whole-archive et. al.
4713 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4714 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4715 else
4716 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4717 fi
4718 supports_anon_versioning=no
4719 case `$LD -v 2>&1` in
4720 *GNU\ gold*) supports_anon_versioning=yes ;;
4721 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4722 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4723 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4724 *\ 2.11.*) ;; # other 2.11 versions
4725 *) supports_anon_versioning=yes ;;
4726 esac
4727
4728 # See if GNU ld supports shared libraries.
4729 case $host_os in
4730 aix[[3-9]]*)
4731 # On AIX/PPC, the GNU linker is very broken
4732 if test "$host_cpu" != ia64; then
4733 _LT_TAGVAR(ld_shlibs, $1)=no
4734 cat <<_LT_EOF 1>&2
4735
4736 *** Warning: the GNU linker, at least up to release 2.19, is reported
4737 *** to be unable to reliably create shared libraries on AIX.
4738 *** Therefore, libtool is disabling shared libraries support. If you
4739 *** really care for shared libraries, you may want to install binutils
4740 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4741 *** You will then need to restart the configuration process.
4742
4743 _LT_EOF
4744 fi
4745 ;;
4746
4747 amigaos*)
4748 case $host_cpu in
4749 powerpc)
4750 # see comment about AmigaOS4 .so support
4751 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4752 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4753 ;;
4754 m68k)
4755 _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)'
4756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4757 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4758 ;;
4759 esac
4760 ;;
4761
4762 beos*)
4763 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4764 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4765 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4766 # support --undefined. This deserves some investigation. FIXME
4767 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4768 else
4769 _LT_TAGVAR(ld_shlibs, $1)=no
4770 fi
4771 ;;
4772
4773 cygwin* | mingw* | pw32* | cegcc*)
4774 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4775 # as there is no search path for DLLs.
4776 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4777 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4778 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4779 _LT_TAGVAR(always_export_symbols, $1)=no
4780 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4781 _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'
4782 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4783
4784 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4785 _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'
4786 # If the export-symbols file already is a .def file (1st line
4787 # is EXPORTS), use it as is; otherwise, prepend...
4788 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4789 cp $export_symbols $output_objdir/$soname.def;
4790 else
4791 echo EXPORTS > $output_objdir/$soname.def;
4792 cat $export_symbols >> $output_objdir/$soname.def;
4793 fi~
4794 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4795 else
4796 _LT_TAGVAR(ld_shlibs, $1)=no
4797 fi
4798 ;;
4799
4800 haiku*)
4801 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4802 _LT_TAGVAR(link_all_deplibs, $1)=yes
4803 ;;
4804
4805 interix[[3-9]]*)
4806 _LT_TAGVAR(hardcode_direct, $1)=no
4807 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4808 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4809 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4810 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4811 # Instead, shared libraries are loaded at an image base (0x10000000 by
4812 # default) and relocated if they conflict, which is a slow very memory
4813 # consuming and fragmenting process. To avoid this, we pick a random,
4814 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4815 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4816 _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'
4817 _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'
4818 ;;
4819
4820 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4821 tmp_diet=no
4822 if test "$host_os" = linux-dietlibc; then
4823 case $cc_basename in
4824 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4825 esac
4826 fi
4827 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4828 && test "$tmp_diet" = no
4829 then
4830 tmp_addflag=' $pic_flag'
4831 tmp_sharedflag='-shared'
4832 case $cc_basename,$host_cpu in
4833 pgcc*) # Portland Group C compiler
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 tmp_addflag=' $pic_flag'
4836 ;;
4837 pgf77* | pgf90* | pgf95* | pgfortran*)
4838 # Portland Group f77 and f90 compilers
4839 _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'
4840 tmp_addflag=' $pic_flag -Mnomain' ;;
4841 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4842 tmp_addflag=' -i_dynamic' ;;
4843 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4844 tmp_addflag=' -i_dynamic -nofor_main' ;;
4845 ifc* | ifort*) # Intel Fortran compiler
4846 tmp_addflag=' -nofor_main' ;;
4847 lf95*) # Lahey Fortran 8.1
4848 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4849 tmp_sharedflag='--shared' ;;
4850 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4851 tmp_sharedflag='-qmkshrobj'
4852 tmp_addflag= ;;
4853 nvcc*) # Cuda Compiler Driver 2.2
4854 _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'
4855 _LT_TAGVAR(compiler_needs_object, $1)=yes
4856 ;;
4857 esac
4858 case `$CC -V 2>&1 | sed 5q` in
4859 *Sun\ C*) # Sun C 5.9
4860 _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'
4861 _LT_TAGVAR(compiler_needs_object, $1)=yes
4862 tmp_sharedflag='-G' ;;
4863 *Sun\ F*) # Sun Fortran 8.3
4864 tmp_sharedflag='-G' ;;
4865 esac
4866 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4867
4868 if test "x$supports_anon_versioning" = xyes; then
4869 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4870 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4871 echo "local: *; };" >> $output_objdir/$libname.ver~
4872 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4873 fi
4874
4875 case $cc_basename in
4876 xlf* | bgf* | bgxlf* | mpixlf*)
4877 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4878 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4879 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4880 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4881 if test "x$supports_anon_versioning" = xyes; then
4882 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4883 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4884 echo "local: *; };" >> $output_objdir/$libname.ver~
4885 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4886 fi
4887 ;;
4888 esac
4889 else
4890 _LT_TAGVAR(ld_shlibs, $1)=no
4891 fi
4892 ;;
4893
4894 netbsd* | netbsdelf*-gnu)
4895 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4896 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4897 wlarc=
4898 else
4899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4900 _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'
4901 fi
4902 ;;
4903
4904 solaris*)
4905 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4906 _LT_TAGVAR(ld_shlibs, $1)=no
4907 cat <<_LT_EOF 1>&2
4908
4909 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4910 *** create shared libraries on Solaris systems. Therefore, libtool
4911 *** is disabling shared libraries support. We urge you to upgrade GNU
4912 *** binutils to release 2.9.1 or newer. Another option is to modify
4913 *** your PATH or compiler configuration so that the native linker is
4914 *** used, and then restart.
4915
4916 _LT_EOF
4917 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4918 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4919 _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'
4920 else
4921 _LT_TAGVAR(ld_shlibs, $1)=no
4922 fi
4923 ;;
4924
4925 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4926 case `$LD -v 2>&1` in
4927 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4928 _LT_TAGVAR(ld_shlibs, $1)=no
4929 cat <<_LT_EOF 1>&2
4930
4931 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4932 *** reliably create shared libraries on SCO systems. Therefore, libtool
4933 *** is disabling shared libraries support. We urge you to upgrade GNU
4934 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4935 *** your PATH or compiler configuration so that the native linker is
4936 *** used, and then restart.
4937
4938 _LT_EOF
4939 ;;
4940 *)
4941 # For security reasons, it is highly recommended that you always
4942 # use absolute paths for naming shared libraries, and exclude the
4943 # DT_RUNPATH tag from executables and libraries. But doing so
4944 # requires that you compile everything twice, which is a pain.
4945 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4947 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4948 _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'
4949 else
4950 _LT_TAGVAR(ld_shlibs, $1)=no
4951 fi
4952 ;;
4953 esac
4954 ;;
4955
4956 sunos4*)
4957 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4958 wlarc=
4959 _LT_TAGVAR(hardcode_direct, $1)=yes
4960 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4961 ;;
4962
4963 *)
4964 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4965 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4966 _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'
4967 else
4968 _LT_TAGVAR(ld_shlibs, $1)=no
4969 fi
4970 ;;
4971 esac
4972
4973 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4974 runpath_var=
4975 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4976 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4977 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4978 fi
4979 else
4980 # PORTME fill in a description of your system's linker (not GNU ld)
4981 case $host_os in
4982 aix3*)
4983 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4984 _LT_TAGVAR(always_export_symbols, $1)=yes
4985 _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'
4986 # Note: this linker hardcodes the directories in LIBPATH if there
4987 # are no directories specified by -L.
4988 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4989 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4990 # Neither direct hardcoding nor static linking is supported with a
4991 # broken collect2.
4992 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4993 fi
4994 ;;
4995
4996 aix[[4-9]]*)
4997 if test "$host_cpu" = ia64; then
4998 # On IA64, the linker does run time linking by default, so we don't
4999 # have to do anything special.
5000 aix_use_runtimelinking=no
5001 exp_sym_flag='-Bexport'
5002 no_entry_flag=""
5003 else
5004 # If we're using GNU nm, then we don't want the "-C" option.
5005 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5006 # Also, AIX nm treats weak defined symbols like other global
5007 # defined symbols, whereas GNU nm marks them as "W".
5008 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5009 _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'
5010 else
5011 _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'
5012 fi
5013 aix_use_runtimelinking=no
5014
5015 # Test if we are trying to use run time linking or normal
5016 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5017 # need to do runtime linking.
5018 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5019 for ld_flag in $LDFLAGS; do
5020 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5021 aix_use_runtimelinking=yes
5022 break
5023 fi
5024 done
5025 ;;
5026 esac
5027
5028 exp_sym_flag='-bexport'
5029 no_entry_flag='-bnoentry'
5030 fi
5031
5032 # When large executables or shared objects are built, AIX ld can
5033 # have problems creating the table of contents. If linking a library
5034 # or program results in "error TOC overflow" add -mminimal-toc to
5035 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5036 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5037
5038 _LT_TAGVAR(archive_cmds, $1)=''
5039 _LT_TAGVAR(hardcode_direct, $1)=yes
5040 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5041 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5042 _LT_TAGVAR(link_all_deplibs, $1)=yes
5043 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5044
5045 if test "$GCC" = yes; then
5046 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5047 # We only want to do this on AIX 4.2 and lower, the check
5048 # below for broken collect2 doesn't work under 4.3+
5049 collect2name=`${CC} -print-prog-name=collect2`
5050 if test -f "$collect2name" &&
5051 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5052 then
5053 # We have reworked collect2
5054 :
5055 else
5056 # We have old collect2
5057 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5058 # It fails to find uninstalled libraries when the uninstalled
5059 # path is not listed in the libpath. Setting hardcode_minus_L
5060 # to unsupported forces relinking
5061 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5062 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5063 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5064 fi
5065 ;;
5066 esac
5067 shared_flag='-shared'
5068 if test "$aix_use_runtimelinking" = yes; then
5069 shared_flag="$shared_flag "'${wl}-G'
5070 fi
5071 _LT_TAGVAR(link_all_deplibs, $1)=no
5072 else
5073 # not using gcc
5074 if test "$host_cpu" = ia64; then
5075 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5076 # chokes on -Wl,-G. The following line is correct:
5077 shared_flag='-G'
5078 else
5079 if test "$aix_use_runtimelinking" = yes; then
5080 shared_flag='${wl}-G'
5081 else
5082 shared_flag='${wl}-bM:SRE'
5083 fi
5084 fi
5085 fi
5086
5087 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5088 # It seems that -bexpall does not export symbols beginning with
5089 # underscore (_), so it is better to generate a list of symbols to export.
5090 _LT_TAGVAR(always_export_symbols, $1)=yes
5091 if test "$aix_use_runtimelinking" = yes; then
5092 # Warning - without using the other runtime loading flags (-brtl),
5093 # -berok will link without error, but may produce a broken library.
5094 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5095 # Determine the default libpath from the value encoded in an
5096 # empty executable.
5097 _LT_SYS_MODULE_PATH_AIX([$1])
5098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5099 _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"
5100 else
5101 if test "$host_cpu" = ia64; then
5102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5103 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5104 _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"
5105 else
5106 # Determine the default libpath from the value encoded in an
5107 # empty executable.
5108 _LT_SYS_MODULE_PATH_AIX([$1])
5109 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5110 # Warning - without using the other run time loading flags,
5111 # -berok will link without error, but may produce a broken library.
5112 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5113 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5114 if test "$with_gnu_ld" = yes; then
5115 # We only use this code for GNU lds that support --whole-archive.
5116 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5117 else
5118 # Exported symbols can be pulled into shared objects from archives
5119 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5120 fi
5121 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5122 # This is similar to how AIX traditionally builds its shared libraries.
5123 _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'
5124 fi
5125 fi
5126 ;;
5127
5128 amigaos*)
5129 case $host_cpu in
5130 powerpc)
5131 # see comment about AmigaOS4 .so support
5132 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5133 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5134 ;;
5135 m68k)
5136 _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)'
5137 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5138 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5139 ;;
5140 esac
5141 ;;
5142
5143 bsdi[[45]]*)
5144 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5145 ;;
5146
5147 cygwin* | mingw* | pw32* | cegcc*)
5148 # When not using gcc, we currently assume that we are using
5149 # Microsoft Visual C++.
5150 # hardcode_libdir_flag_spec is actually meaningless, as there is
5151 # no search path for DLLs.
5152 case $cc_basename in
5153 cl*)
5154 # Native MSVC
5155 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5156 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5157 _LT_TAGVAR(always_export_symbols, $1)=yes
5158 _LT_TAGVAR(file_list_spec, $1)='@'
5159 # Tell ltmain to make .lib files, not .a files.
5160 libext=lib
5161 # Tell ltmain to make .dll files, not .so files.
5162 shrext_cmds=".dll"
5163 # FIXME: Setting linknames here is a bad hack.
5164 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5165 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5166 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5167 else
5168 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5169 fi~
5170 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5171 linknames='
5172 # The linker will not automatically build a static lib if we build a DLL.
5173 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5174 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5175 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5176 _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'
5177 # Don't use ranlib
5178 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5179 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5180 lt_tool_outputfile="@TOOL_OUTPUT@"~
5181 case $lt_outputfile in
5182 *.exe|*.EXE) ;;
5183 *)
5184 lt_outputfile="$lt_outputfile.exe"
5185 lt_tool_outputfile="$lt_tool_outputfile.exe"
5186 ;;
5187 esac~
5188 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5189 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5190 $RM "$lt_outputfile.manifest";
5191 fi'
5192 ;;
5193 *)
5194 # Assume MSVC wrapper
5195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5196 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5197 # Tell ltmain to make .lib files, not .a files.
5198 libext=lib
5199 # Tell ltmain to make .dll files, not .so files.
5200 shrext_cmds=".dll"
5201 # FIXME: Setting linknames here is a bad hack.
5202 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5203 # The linker will automatically build a .lib file if we build a DLL.
5204 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5205 # FIXME: Should let the user specify the lib program.
5206 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5207 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5208 ;;
5209 esac
5210 ;;
5211
5212 darwin* | rhapsody*)
5213 _LT_DARWIN_LINKER_FEATURES($1)
5214 ;;
5215
5216 dgux*)
5217 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5219 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5220 ;;
5221
5222 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5223 # support. Future versions do this automatically, but an explicit c++rt0.o
5224 # does not break anything, and helps significantly (at the cost of a little
5225 # extra space).
5226 freebsd2.2*)
5227 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5229 _LT_TAGVAR(hardcode_direct, $1)=yes
5230 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5231 ;;
5232
5233 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5234 freebsd2.*)
5235 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5236 _LT_TAGVAR(hardcode_direct, $1)=yes
5237 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5238 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5239 ;;
5240
5241 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5242 freebsd* | dragonfly*)
5243 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5244 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5245 _LT_TAGVAR(hardcode_direct, $1)=yes
5246 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5247 ;;
5248
5249 hpux9*)
5250 if test "$GCC" = yes; then
5251 _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'
5252 else
5253 _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'
5254 fi
5255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5256 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5257 _LT_TAGVAR(hardcode_direct, $1)=yes
5258
5259 # hardcode_minus_L: Not really in the search PATH,
5260 # but as the default location of the library.
5261 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5262 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5263 ;;
5264
5265 hpux10*)
5266 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5267 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5268 else
5269 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5270 fi
5271 if test "$with_gnu_ld" = no; then
5272 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5273 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5274 _LT_TAGVAR(hardcode_direct, $1)=yes
5275 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5276 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5277 # hardcode_minus_L: Not really in the search PATH,
5278 # but as the default location of the library.
5279 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5280 fi
5281 ;;
5282
5283 hpux11*)
5284 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5285 case $host_cpu in
5286 hppa*64*)
5287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5288 ;;
5289 ia64*)
5290 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5291 ;;
5292 *)
5293 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5294 ;;
5295 esac
5296 else
5297 case $host_cpu in
5298 hppa*64*)
5299 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5300 ;;
5301 ia64*)
5302 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5303 ;;
5304 *)
5305 m4_if($1, [], [
5306 # Older versions of the 11.00 compiler do not understand -b yet
5307 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5308 _LT_LINKER_OPTION([if $CC understands -b],
5309 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5310 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5311 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5312 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5313 ;;
5314 esac
5315 fi
5316 if test "$with_gnu_ld" = no; then
5317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5318 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5319
5320 case $host_cpu in
5321 hppa*64*|ia64*)
5322 _LT_TAGVAR(hardcode_direct, $1)=no
5323 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5324 ;;
5325 *)
5326 _LT_TAGVAR(hardcode_direct, $1)=yes
5327 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5328 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5329
5330 # hardcode_minus_L: Not really in the search PATH,
5331 # but as the default location of the library.
5332 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5333 ;;
5334 esac
5335 fi
5336 ;;
5337
5338 irix5* | irix6* | nonstopux*)
5339 if test "$GCC" = yes; then
5340 _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'
5341 # Try to use the -exported_symbol ld option, if it does not
5342 # work, assume that -exports_file does not work either and
5343 # implicitly export all symbols.
5344 # This should be the same for all languages, so no per-tag cache variable.
5345 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5346 [lt_cv_irix_exported_symbol],
5347 [save_LDFLAGS="$LDFLAGS"
5348 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5349 AC_LINK_IFELSE(
5350 [AC_LANG_SOURCE(
5351 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5352 [C++], [[int foo (void) { return 0; }]],
5353 [Fortran 77], [[
5354 subroutine foo
5355 end]],
5356 [Fortran], [[
5357 subroutine foo
5358 end]])])],
5359 [lt_cv_irix_exported_symbol=yes],
5360 [lt_cv_irix_exported_symbol=no])
5361 LDFLAGS="$save_LDFLAGS"])
5362 if test "$lt_cv_irix_exported_symbol" = yes; then
5363 _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'
5364 fi
5365 else
5366 _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'
5367 _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'
5368 fi
5369 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5370 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5371 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5372 _LT_TAGVAR(inherit_rpath, $1)=yes
5373 _LT_TAGVAR(link_all_deplibs, $1)=yes
5374 ;;
5375
5376 netbsd* | netbsdelf*-gnu)
5377 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5378 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5379 else
5380 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5381 fi
5382 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5383 _LT_TAGVAR(hardcode_direct, $1)=yes
5384 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5385 ;;
5386
5387 newsos6)
5388 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5389 _LT_TAGVAR(hardcode_direct, $1)=yes
5390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5391 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5392 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5393 ;;
5394
5395 *nto* | *qnx*)
5396 ;;
5397
5398 openbsd*)
5399 if test -f /usr/libexec/ld.so; then
5400 _LT_TAGVAR(hardcode_direct, $1)=yes
5401 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5402 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5403 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5404 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5405 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5406 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5407 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5408 else
5409 case $host_os in
5410 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5411 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5413 ;;
5414 *)
5415 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5416 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5417 ;;
5418 esac
5419 fi
5420 else
5421 _LT_TAGVAR(ld_shlibs, $1)=no
5422 fi
5423 ;;
5424
5425 os2*)
5426 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5427 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5428 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5429 _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'
5430 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5431 ;;
5432
5433 osf3*)
5434 if test "$GCC" = yes; then
5435 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5436 _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'
5437 else
5438 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5439 _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'
5440 fi
5441 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5442 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5443 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5444 ;;
5445
5446 osf4* | osf5*) # as osf3* with the addition of -msym flag
5447 if test "$GCC" = yes; then
5448 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5449 _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'
5450 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5451 else
5452 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5453 _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'
5454 _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~
5455 $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'
5456
5457 # Both c and cxx compiler support -rpath directly
5458 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5459 fi
5460 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5461 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5462 ;;
5463
5464 solaris*)
5465 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5466 if test "$GCC" = yes; then
5467 wlarc='${wl}'
5468 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5469 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5470 $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'
5471 else
5472 case `$CC -V 2>&1` in
5473 *"Compilers 5.0"*)
5474 wlarc=''
5475 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5476 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5477 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5478 ;;
5479 *)
5480 wlarc='${wl}'
5481 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5482 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5483 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5484 ;;
5485 esac
5486 fi
5487 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5488 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5489 case $host_os in
5490 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5491 *)
5492 # The compiler driver will combine and reorder linker options,
5493 # but understands `-z linker_flag'. GCC discards it without `$wl',
5494 # but is careful enough not to reorder.
5495 # Supported since Solaris 2.6 (maybe 2.5.1?)
5496 if test "$GCC" = yes; then
5497 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5498 else
5499 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5500 fi
5501 ;;
5502 esac
5503 _LT_TAGVAR(link_all_deplibs, $1)=yes
5504 ;;
5505
5506 sunos4*)
5507 if test "x$host_vendor" = xsequent; then
5508 # Use $CC to link under sequent, because it throws in some extra .o
5509 # files that make .init and .fini sections work.
5510 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5511 else
5512 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5513 fi
5514 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5515 _LT_TAGVAR(hardcode_direct, $1)=yes
5516 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5517 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5518 ;;
5519
5520 sysv4)
5521 case $host_vendor in
5522 sni)
5523 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5524 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5525 ;;
5526 siemens)
5527 ## LD is ld it makes a PLAMLIB
5528 ## CC just makes a GrossModule.
5529 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5530 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5531 _LT_TAGVAR(hardcode_direct, $1)=no
5532 ;;
5533 motorola)
5534 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5535 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5536 ;;
5537 esac
5538 runpath_var='LD_RUN_PATH'
5539 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5540 ;;
5541
5542 sysv4.3*)
5543 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5544 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5545 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5546 ;;
5547
5548 sysv4*MP*)
5549 if test -d /usr/nec; then
5550 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5551 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5552 runpath_var=LD_RUN_PATH
5553 hardcode_runpath_var=yes
5554 _LT_TAGVAR(ld_shlibs, $1)=yes
5555 fi
5556 ;;
5557
5558 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5559 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5560 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5561 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5562 runpath_var='LD_RUN_PATH'
5563
5564 if test "$GCC" = yes; then
5565 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5566 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5567 else
5568 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5569 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5570 fi
5571 ;;
5572
5573 sysv5* | sco3.2v5* | sco5v6*)
5574 # Note: We can NOT use -z defs as we might desire, because we do not
5575 # link with -lc, and that would cause any symbols used from libc to
5576 # always be unresolved, which means just about no library would
5577 # ever link correctly. If we're not using GNU ld we use -z text
5578 # though, which does catch some bad symbols but isn't as heavy-handed
5579 # as -z defs.
5580 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5581 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5582 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5583 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5584 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5585 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5586 _LT_TAGVAR(link_all_deplibs, $1)=yes
5587 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5588 runpath_var='LD_RUN_PATH'
5589
5590 if test "$GCC" = yes; then
5591 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5592 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5593 else
5594 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5595 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5596 fi
5597 ;;
5598
5599 uts4*)
5600 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5601 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5602 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5603 ;;
5604
5605 *)
5606 _LT_TAGVAR(ld_shlibs, $1)=no
5607 ;;
5608 esac
5609
5610 if test x$host_vendor = xsni; then
5611 case $host in
5612 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5613 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5614 ;;
5615 esac
5616 fi
5617 fi
5618 ])
5619 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5620 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5621
5622 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5623
5624 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5625 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5626 _LT_DECL([], [extract_expsyms_cmds], [2],
5627 [The commands to extract the exported symbol list from a shared archive])
5628
5629 #
5630 # Do we need to explicitly link libc?
5631 #
5632 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5633 x|xyes)
5634 # Assume -lc should be added
5635 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5636
5637 if test "$enable_shared" = yes && test "$GCC" = yes; then
5638 case $_LT_TAGVAR(archive_cmds, $1) in
5639 *'~'*)
5640 # FIXME: we may have to deal with multi-command sequences.
5641 ;;
5642 '$CC '*)
5643 # Test whether the compiler implicitly links with -lc since on some
5644 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5645 # to ld, don't add -lc before -lgcc.
5646 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5647 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5648 [$RM conftest*
5649 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5650
5651 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5652 soname=conftest
5653 lib=conftest
5654 libobjs=conftest.$ac_objext
5655 deplibs=
5656 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5657 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5658 compiler_flags=-v
5659 linker_flags=-v
5660 verstring=
5661 output_objdir=.
5662 libname=conftest
5663 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5664 _LT_TAGVAR(allow_undefined_flag, $1)=
5665 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5666 then
5667 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5668 else
5669 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5670 fi
5671 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5672 else
5673 cat conftest.err 1>&5
5674 fi
5675 $RM conftest*
5676 ])
5677 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5678 ;;
5679 esac
5680 fi
5681 ;;
5682 esac
5683
5684 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5685 [Whether or not to add -lc for building shared libraries])
5686 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5687 [enable_shared_with_static_runtimes], [0],
5688 [Whether or not to disallow shared libs when runtime libs are static])
5689 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5690 [Compiler flag to allow reflexive dlopens])
5691 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5692 [Compiler flag to generate shared objects directly from archives])
5693 _LT_TAGDECL([], [compiler_needs_object], [1],
5694 [Whether the compiler copes with passing no objects directly])
5695 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5696 [Create an old-style archive from a shared archive])
5697 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5698 [Create a temporary old-style archive to link instead of a shared archive])
5699 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5700 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5701 _LT_TAGDECL([], [module_cmds], [2],
5702 [Commands used to build a loadable module if different from building
5703 a shared archive.])
5704 _LT_TAGDECL([], [module_expsym_cmds], [2])
5705 _LT_TAGDECL([], [with_gnu_ld], [1],
5706 [Whether we are building with GNU ld or not])
5707 _LT_TAGDECL([], [allow_undefined_flag], [1],
5708 [Flag that allows shared libraries with undefined symbols to be built])
5709 _LT_TAGDECL([], [no_undefined_flag], [1],
5710 [Flag that enforces no undefined symbols])
5711 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5712 [Flag to hardcode $libdir into a binary during linking.
5713 This must work even if $libdir does not exist])
5714 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5715 [Whether we need a single "-rpath" flag with a separated argument])
5716 _LT_TAGDECL([], [hardcode_direct], [0],
5717 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5718 DIR into the resulting binary])
5719 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5720 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5721 DIR into the resulting binary and the resulting library dependency is
5722 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5723 library is relocated])
5724 _LT_TAGDECL([], [hardcode_minus_L], [0],
5725 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5726 into the resulting binary])
5727 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5728 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5729 into the resulting binary])
5730 _LT_TAGDECL([], [hardcode_automatic], [0],
5731 [Set to "yes" if building a shared library automatically hardcodes DIR
5732 into the library and all subsequent libraries and executables linked
5733 against it])
5734 _LT_TAGDECL([], [inherit_rpath], [0],
5735 [Set to yes if linker adds runtime paths of dependent libraries
5736 to runtime path list])
5737 _LT_TAGDECL([], [link_all_deplibs], [0],
5738 [Whether libtool must link a program against all its dependency libraries])
5739 _LT_TAGDECL([], [always_export_symbols], [0],
5740 [Set to "yes" if exported symbols are required])
5741 _LT_TAGDECL([], [export_symbols_cmds], [2],
5742 [The commands to list exported symbols])
5743 _LT_TAGDECL([], [exclude_expsyms], [1],
5744 [Symbols that should not be listed in the preloaded symbols])
5745 _LT_TAGDECL([], [include_expsyms], [1],
5746 [Symbols that must always be exported])
5747 _LT_TAGDECL([], [prelink_cmds], [2],
5748 [Commands necessary for linking programs (against libraries) with templates])
5749 _LT_TAGDECL([], [postlink_cmds], [2],
5750 [Commands necessary for finishing linking programs])
5751 _LT_TAGDECL([], [file_list_spec], [1],
5752 [Specify filename containing input files])
5753 dnl FIXME: Not yet implemented
5754 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5755 dnl [Compiler flag to generate thread safe objects])
5756 ])# _LT_LINKER_SHLIBS
5757
5758
5759 # _LT_LANG_C_CONFIG([TAG])
5760 # ------------------------
5761 # Ensure that the configuration variables for a C compiler are suitably
5762 # defined. These variables are subsequently used by _LT_CONFIG to write
5763 # the compiler configuration to `libtool'.
5764 m4_defun([_LT_LANG_C_CONFIG],
5765 [m4_require([_LT_DECL_EGREP])dnl
5766 lt_save_CC="$CC"
5767 AC_LANG_PUSH(C)
5768
5769 # Source file extension for C test sources.
5770 ac_ext=c
5771
5772 # Object file extension for compiled C test sources.
5773 objext=o
5774 _LT_TAGVAR(objext, $1)=$objext
5775
5776 # Code to be used in simple compile tests
5777 lt_simple_compile_test_code="int some_variable = 0;"
5778
5779 # Code to be used in simple link tests
5780 lt_simple_link_test_code='int main(){return(0);}'
5781
5782 _LT_TAG_COMPILER
5783 # Save the default compiler, since it gets overwritten when the other
5784 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5785 compiler_DEFAULT=$CC
5786
5787 # save warnings/boilerplate of simple test code
5788 _LT_COMPILER_BOILERPLATE
5789 _LT_LINKER_BOILERPLATE
5790
5791 if test -n "$compiler"; then
5792 _LT_COMPILER_NO_RTTI($1)
5793 _LT_COMPILER_PIC($1)
5794 _LT_COMPILER_C_O($1)
5795 _LT_COMPILER_FILE_LOCKS($1)
5796 _LT_LINKER_SHLIBS($1)
5797 _LT_SYS_DYNAMIC_LINKER($1)
5798 _LT_LINKER_HARDCODE_LIBPATH($1)
5799 LT_SYS_DLOPEN_SELF
5800 _LT_CMD_STRIPLIB
5801
5802 # Report which library types will actually be built
5803 AC_MSG_CHECKING([if libtool supports shared libraries])
5804 AC_MSG_RESULT([$can_build_shared])
5805
5806 AC_MSG_CHECKING([whether to build shared libraries])
5807 test "$can_build_shared" = "no" && enable_shared=no
5808
5809 # On AIX, shared libraries and static libraries use the same namespace, and
5810 # are all built from PIC.
5811 case $host_os in
5812 aix3*)
5813 test "$enable_shared" = yes && enable_static=no
5814 if test -n "$RANLIB"; then
5815 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5816 postinstall_cmds='$RANLIB $lib'
5817 fi
5818 ;;
5819
5820 aix[[4-9]]*)
5821 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5822 test "$enable_shared" = yes && enable_static=no
5823 fi
5824 ;;
5825 esac
5826 AC_MSG_RESULT([$enable_shared])
5827
5828 AC_MSG_CHECKING([whether to build static libraries])
5829 # Make sure either enable_shared or enable_static is yes.
5830 test "$enable_shared" = yes || enable_static=yes
5831 AC_MSG_RESULT([$enable_static])
5832
5833 _LT_CONFIG($1)
5834 fi
5835 AC_LANG_POP
5836 CC="$lt_save_CC"
5837 ])# _LT_LANG_C_CONFIG
5838
5839
5840 # _LT_LANG_CXX_CONFIG([TAG])
5841 # --------------------------
5842 # Ensure that the configuration variables for a C++ compiler are suitably
5843 # defined. These variables are subsequently used by _LT_CONFIG to write
5844 # the compiler configuration to `libtool'.
5845 m4_defun([_LT_LANG_CXX_CONFIG],
5846 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5847 m4_require([_LT_DECL_EGREP])dnl
5848 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5849 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5850 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5851 (test "X$CXX" != "Xg++"))) ; then
5852 AC_PROG_CXXCPP
5853 else
5854 _lt_caught_CXX_error=yes
5855 fi
5856
5857 AC_LANG_PUSH(C++)
5858 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5859 _LT_TAGVAR(allow_undefined_flag, $1)=
5860 _LT_TAGVAR(always_export_symbols, $1)=no
5861 _LT_TAGVAR(archive_expsym_cmds, $1)=
5862 _LT_TAGVAR(compiler_needs_object, $1)=no
5863 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5864 _LT_TAGVAR(hardcode_direct, $1)=no
5865 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5867 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5868 _LT_TAGVAR(hardcode_minus_L, $1)=no
5869 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5870 _LT_TAGVAR(hardcode_automatic, $1)=no
5871 _LT_TAGVAR(inherit_rpath, $1)=no
5872 _LT_TAGVAR(module_cmds, $1)=
5873 _LT_TAGVAR(module_expsym_cmds, $1)=
5874 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5875 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5876 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5877 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5878 _LT_TAGVAR(no_undefined_flag, $1)=
5879 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5880 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5881
5882 # Source file extension for C++ test sources.
5883 ac_ext=cpp
5884
5885 # Object file extension for compiled C++ test sources.
5886 objext=o
5887 _LT_TAGVAR(objext, $1)=$objext
5888
5889 # No sense in running all these tests if we already determined that
5890 # the CXX compiler isn't working. Some variables (like enable_shared)
5891 # are currently assumed to apply to all compilers on this platform,
5892 # and will be corrupted by setting them based on a non-working compiler.
5893 if test "$_lt_caught_CXX_error" != yes; then
5894 # Code to be used in simple compile tests
5895 lt_simple_compile_test_code="int some_variable = 0;"
5896
5897 # Code to be used in simple link tests
5898 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5899
5900 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5901 _LT_TAG_COMPILER
5902
5903 # save warnings/boilerplate of simple test code
5904 _LT_COMPILER_BOILERPLATE
5905 _LT_LINKER_BOILERPLATE
5906
5907 # Allow CC to be a program name with arguments.
5908 lt_save_CC=$CC
5909 lt_save_CFLAGS=$CFLAGS
5910 lt_save_LD=$LD
5911 lt_save_GCC=$GCC
5912 GCC=$GXX
5913 lt_save_with_gnu_ld=$with_gnu_ld
5914 lt_save_path_LD=$lt_cv_path_LD
5915 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5916 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5917 else
5918 $as_unset lt_cv_prog_gnu_ld
5919 fi
5920 if test -n "${lt_cv_path_LDCXX+set}"; then
5921 lt_cv_path_LD=$lt_cv_path_LDCXX
5922 else
5923 $as_unset lt_cv_path_LD
5924 fi
5925 test -z "${LDCXX+set}" || LD=$LDCXX
5926 CC=${CXX-"c++"}
5927 CFLAGS=$CXXFLAGS
5928 compiler=$CC
5929 _LT_TAGVAR(compiler, $1)=$CC
5930 _LT_CC_BASENAME([$compiler])
5931
5932 if test -n "$compiler"; then
5933 # We don't want -fno-exception when compiling C++ code, so set the
5934 # no_builtin_flag separately
5935 if test "$GXX" = yes; then
5936 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5937 else
5938 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5939 fi
5940
5941 if test "$GXX" = yes; then
5942 # Set up default GNU C++ configuration
5943
5944 LT_PATH_LD
5945
5946 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5947 # archiving commands below assume that GNU ld is being used.
5948 if test "$with_gnu_ld" = yes; then
5949 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5950 _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'
5951
5952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5953 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5954
5955 # If archive_cmds runs LD, not CC, wlarc should be empty
5956 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5957 # investigate it a little bit more. (MM)
5958 wlarc='${wl}'
5959
5960 # ancient GNU ld didn't support --whole-archive et. al.
5961 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5962 $GREP 'no-whole-archive' > /dev/null; then
5963 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5964 else
5965 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5966 fi
5967 else
5968 with_gnu_ld=no
5969 wlarc=
5970
5971 # A generic and very simple default shared library creation
5972 # command for GNU C++ for the case where it uses the native
5973 # linker, instead of GNU ld. If possible, this setting should
5974 # overridden to take advantage of the native linker features on
5975 # the platform it is being used on.
5976 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5977 fi
5978
5979 # Commands to make compiler produce verbose output that lists
5980 # what "hidden" libraries, object files and flags are used when
5981 # linking a shared library.
5982 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5983
5984 else
5985 GXX=no
5986 with_gnu_ld=no
5987 wlarc=
5988 fi
5989
5990 # PORTME: fill in a description of your system's C++ link characteristics
5991 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5992 _LT_TAGVAR(ld_shlibs, $1)=yes
5993 case $host_os in
5994 aix3*)
5995 # FIXME: insert proper C++ library support
5996 _LT_TAGVAR(ld_shlibs, $1)=no
5997 ;;
5998 aix[[4-9]]*)
5999 if test "$host_cpu" = ia64; then
6000 # On IA64, the linker does run time linking by default, so we don't
6001 # have to do anything special.
6002 aix_use_runtimelinking=no
6003 exp_sym_flag='-Bexport'
6004 no_entry_flag=""
6005 else
6006 aix_use_runtimelinking=no
6007
6008 # Test if we are trying to use run time linking or normal
6009 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6010 # need to do runtime linking.
6011 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6012 for ld_flag in $LDFLAGS; do
6013 case $ld_flag in
6014 *-brtl*)
6015 aix_use_runtimelinking=yes
6016 break
6017 ;;
6018 esac
6019 done
6020 ;;
6021 esac
6022
6023 exp_sym_flag='-bexport'
6024 no_entry_flag='-bnoentry'
6025 fi
6026
6027 # When large executables or shared objects are built, AIX ld can
6028 # have problems creating the table of contents. If linking a library
6029 # or program results in "error TOC overflow" add -mminimal-toc to
6030 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6031 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6032
6033 _LT_TAGVAR(archive_cmds, $1)=''
6034 _LT_TAGVAR(hardcode_direct, $1)=yes
6035 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6037 _LT_TAGVAR(link_all_deplibs, $1)=yes
6038 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6039
6040 if test "$GXX" = yes; then
6041 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6042 # We only want to do this on AIX 4.2 and lower, the check
6043 # below for broken collect2 doesn't work under 4.3+
6044 collect2name=`${CC} -print-prog-name=collect2`
6045 if test -f "$collect2name" &&
6046 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6047 then
6048 # We have reworked collect2
6049 :
6050 else
6051 # We have old collect2
6052 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6053 # It fails to find uninstalled libraries when the uninstalled
6054 # path is not listed in the libpath. Setting hardcode_minus_L
6055 # to unsupported forces relinking
6056 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6057 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6058 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6059 fi
6060 esac
6061 shared_flag='-shared'
6062 if test "$aix_use_runtimelinking" = yes; then
6063 shared_flag="$shared_flag "'${wl}-G'
6064 fi
6065 else
6066 # not using gcc
6067 if test "$host_cpu" = ia64; then
6068 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6069 # chokes on -Wl,-G. The following line is correct:
6070 shared_flag='-G'
6071 else
6072 if test "$aix_use_runtimelinking" = yes; then
6073 shared_flag='${wl}-G'
6074 else
6075 shared_flag='${wl}-bM:SRE'
6076 fi
6077 fi
6078 fi
6079
6080 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6081 # It seems that -bexpall does not export symbols beginning with
6082 # underscore (_), so it is better to generate a list of symbols to
6083 # export.
6084 _LT_TAGVAR(always_export_symbols, $1)=yes
6085 if test "$aix_use_runtimelinking" = yes; then
6086 # Warning - without using the other runtime loading flags (-brtl),
6087 # -berok will link without error, but may produce a broken library.
6088 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6089 # Determine the default libpath from the value encoded in an empty
6090 # executable.
6091 _LT_SYS_MODULE_PATH_AIX([$1])
6092 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6093
6094 _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"
6095 else
6096 if test "$host_cpu" = ia64; then
6097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6098 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6099 _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"
6100 else
6101 # Determine the default libpath from the value encoded in an
6102 # empty executable.
6103 _LT_SYS_MODULE_PATH_AIX([$1])
6104 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6105 # Warning - without using the other run time loading flags,
6106 # -berok will link without error, but may produce a broken library.
6107 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6108 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6109 if test "$with_gnu_ld" = yes; then
6110 # We only use this code for GNU lds that support --whole-archive.
6111 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6112 else
6113 # Exported symbols can be pulled into shared objects from archives
6114 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6115 fi
6116 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6117 # This is similar to how AIX traditionally builds its shared
6118 # libraries.
6119 _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'
6120 fi
6121 fi
6122 ;;
6123
6124 beos*)
6125 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6126 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6127 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6128 # support --undefined. This deserves some investigation. FIXME
6129 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6130 else
6131 _LT_TAGVAR(ld_shlibs, $1)=no
6132 fi
6133 ;;
6134
6135 chorus*)
6136 case $cc_basename in
6137 *)
6138 # FIXME: insert proper C++ library support
6139 _LT_TAGVAR(ld_shlibs, $1)=no
6140 ;;
6141 esac
6142 ;;
6143
6144 cygwin* | mingw* | pw32* | cegcc*)
6145 case $GXX,$cc_basename in
6146 ,cl* | no,cl*)
6147 # Native MSVC
6148 # hardcode_libdir_flag_spec is actually meaningless, as there is
6149 # no search path for DLLs.
6150 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6151 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6152 _LT_TAGVAR(always_export_symbols, $1)=yes
6153 _LT_TAGVAR(file_list_spec, $1)='@'
6154 # Tell ltmain to make .lib files, not .a files.
6155 libext=lib
6156 # Tell ltmain to make .dll files, not .so files.
6157 shrext_cmds=".dll"
6158 # FIXME: Setting linknames here is a bad hack.
6159 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6160 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6161 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6162 else
6163 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6164 fi~
6165 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6166 linknames='
6167 # The linker will not automatically build a static lib if we build a DLL.
6168 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6169 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6170 # Don't use ranlib
6171 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6172 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6173 lt_tool_outputfile="@TOOL_OUTPUT@"~
6174 case $lt_outputfile in
6175 *.exe|*.EXE) ;;
6176 *)
6177 lt_outputfile="$lt_outputfile.exe"
6178 lt_tool_outputfile="$lt_tool_outputfile.exe"
6179 ;;
6180 esac~
6181 func_to_tool_file "$lt_outputfile"~
6182 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6183 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6184 $RM "$lt_outputfile.manifest";
6185 fi'
6186 ;;
6187 *)
6188 # g++
6189 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6190 # as there is no search path for DLLs.
6191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6192 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6193 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6194 _LT_TAGVAR(always_export_symbols, $1)=no
6195 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6196
6197 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6198 _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'
6199 # If the export-symbols file already is a .def file (1st line
6200 # is EXPORTS), use it as is; otherwise, prepend...
6201 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6202 cp $export_symbols $output_objdir/$soname.def;
6203 else
6204 echo EXPORTS > $output_objdir/$soname.def;
6205 cat $export_symbols >> $output_objdir/$soname.def;
6206 fi~
6207 $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'
6208 else
6209 _LT_TAGVAR(ld_shlibs, $1)=no
6210 fi
6211 ;;
6212 esac
6213 ;;
6214 darwin* | rhapsody*)
6215 _LT_DARWIN_LINKER_FEATURES($1)
6216 ;;
6217
6218 dgux*)
6219 case $cc_basename in
6220 ec++*)
6221 # FIXME: insert proper C++ library support
6222 _LT_TAGVAR(ld_shlibs, $1)=no
6223 ;;
6224 ghcx*)
6225 # Green Hills C++ Compiler
6226 # FIXME: insert proper C++ library support
6227 _LT_TAGVAR(ld_shlibs, $1)=no
6228 ;;
6229 *)
6230 # FIXME: insert proper C++ library support
6231 _LT_TAGVAR(ld_shlibs, $1)=no
6232 ;;
6233 esac
6234 ;;
6235
6236 freebsd2.*)
6237 # C++ shared libraries reported to be fairly broken before
6238 # switch to ELF
6239 _LT_TAGVAR(ld_shlibs, $1)=no
6240 ;;
6241
6242 freebsd-elf*)
6243 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6244 ;;
6245
6246 freebsd* | dragonfly*)
6247 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6248 # conventions
6249 _LT_TAGVAR(ld_shlibs, $1)=yes
6250 ;;
6251
6252 haiku*)
6253 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6254 _LT_TAGVAR(link_all_deplibs, $1)=yes
6255 ;;
6256
6257 hpux9*)
6258 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6259 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6260 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6261 _LT_TAGVAR(hardcode_direct, $1)=yes
6262 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6263 # but as the default
6264 # location of the library.
6265
6266 case $cc_basename in
6267 CC*)
6268 # FIXME: insert proper C++ library support
6269 _LT_TAGVAR(ld_shlibs, $1)=no
6270 ;;
6271 aCC*)
6272 _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'
6273 # Commands to make compiler produce verbose output that lists
6274 # what "hidden" libraries, object files and flags are used when
6275 # linking a shared library.
6276 #
6277 # There doesn't appear to be a way to prevent this compiler from
6278 # explicitly linking system object files so we need to strip them
6279 # from the output so that they don't get included in the library
6280 # dependencies.
6281 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"'
6282 ;;
6283 *)
6284 if test "$GXX" = yes; then
6285 _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'
6286 else
6287 # FIXME: insert proper C++ library support
6288 _LT_TAGVAR(ld_shlibs, $1)=no
6289 fi
6290 ;;
6291 esac
6292 ;;
6293
6294 hpux10*|hpux11*)
6295 if test $with_gnu_ld = no; then
6296 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6297 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6298
6299 case $host_cpu in
6300 hppa*64*|ia64*)
6301 ;;
6302 *)
6303 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6304 ;;
6305 esac
6306 fi
6307 case $host_cpu in
6308 hppa*64*|ia64*)
6309 _LT_TAGVAR(hardcode_direct, $1)=no
6310 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6311 ;;
6312 *)
6313 _LT_TAGVAR(hardcode_direct, $1)=yes
6314 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6315 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6316 # but as the default
6317 # location of the library.
6318 ;;
6319 esac
6320
6321 case $cc_basename in
6322 CC*)
6323 # FIXME: insert proper C++ library support
6324 _LT_TAGVAR(ld_shlibs, $1)=no
6325 ;;
6326 aCC*)
6327 case $host_cpu in
6328 hppa*64*)
6329 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6330 ;;
6331 ia64*)
6332 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6333 ;;
6334 *)
6335 _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'
6336 ;;
6337 esac
6338 # Commands to make compiler produce verbose output that lists
6339 # what "hidden" libraries, object files and flags are used when
6340 # linking a shared library.
6341 #
6342 # There doesn't appear to be a way to prevent this compiler from
6343 # explicitly linking system object files so we need to strip them
6344 # from the output so that they don't get included in the library
6345 # dependencies.
6346 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"'
6347 ;;
6348 *)
6349 if test "$GXX" = yes; then
6350 if test $with_gnu_ld = no; then
6351 case $host_cpu in
6352 hppa*64*)
6353 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6354 ;;
6355 ia64*)
6356 _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'
6357 ;;
6358 *)
6359 _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'
6360 ;;
6361 esac
6362 fi
6363 else
6364 # FIXME: insert proper C++ library support
6365 _LT_TAGVAR(ld_shlibs, $1)=no
6366 fi
6367 ;;
6368 esac
6369 ;;
6370
6371 interix[[3-9]]*)
6372 _LT_TAGVAR(hardcode_direct, $1)=no
6373 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6375 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6376 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6377 # Instead, shared libraries are loaded at an image base (0x10000000 by
6378 # default) and relocated if they conflict, which is a slow very memory
6379 # consuming and fragmenting process. To avoid this, we pick a random,
6380 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6381 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6382 _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'
6383 _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'
6384 ;;
6385 irix5* | irix6*)
6386 case $cc_basename in
6387 CC*)
6388 # SGI C++
6389 _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'
6390
6391 # Archives containing C++ object files must be created using
6392 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6393 # necessary to make sure instantiated templates are included
6394 # in the archive.
6395 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6396 ;;
6397 *)
6398 if test "$GXX" = yes; then
6399 if test "$with_gnu_ld" = no; then
6400 _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'
6401 else
6402 _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'
6403 fi
6404 fi
6405 _LT_TAGVAR(link_all_deplibs, $1)=yes
6406 ;;
6407 esac
6408 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6409 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6410 _LT_TAGVAR(inherit_rpath, $1)=yes
6411 ;;
6412
6413 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6414 case $cc_basename in
6415 KCC*)
6416 # Kuck and Associates, Inc. (KAI) C++ Compiler
6417
6418 # KCC will only create a shared library if the output file
6419 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6420 # to its proper name (with version) after linking.
6421 _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'
6422 _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'
6423 # Commands to make compiler produce verbose output that lists
6424 # what "hidden" libraries, object files and flags are used when
6425 # linking a shared library.
6426 #
6427 # There doesn't appear to be a way to prevent this compiler from
6428 # explicitly linking system object files so we need to strip them
6429 # from the output so that they don't get included in the library
6430 # dependencies.
6431 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"'
6432
6433 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6434 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6435
6436 # Archives containing C++ object files must be created using
6437 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6438 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6439 ;;
6440 icpc* | ecpc* )
6441 # Intel C++
6442 with_gnu_ld=yes
6443 # version 8.0 and above of icpc choke on multiply defined symbols
6444 # if we add $predep_objects and $postdep_objects, however 7.1 and
6445 # earlier do not add the objects themselves.
6446 case `$CC -V 2>&1` in
6447 *"Version 7."*)
6448 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6449 _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'
6450 ;;
6451 *) # Version 8.0 or newer
6452 tmp_idyn=
6453 case $host_cpu in
6454 ia64*) tmp_idyn=' -i_dynamic';;
6455 esac
6456 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6457 _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'
6458 ;;
6459 esac
6460 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6461 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6462 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6463 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6464 ;;
6465 pgCC* | pgcpp*)
6466 # Portland Group C++ compiler
6467 case `$CC -V` in
6468 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6469 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6470 rm -rf $tpldir~
6471 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6472 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6473 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6474 rm -rf $tpldir~
6475 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6476 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6477 $RANLIB $oldlib'
6478 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6479 rm -rf $tpldir~
6480 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6481 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6482 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6483 rm -rf $tpldir~
6484 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6485 $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'
6486 ;;
6487 *) # Version 6 and above use weak symbols
6488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6489 _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'
6490 ;;
6491 esac
6492
6493 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6494 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6495 _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'
6496 ;;
6497 cxx*)
6498 # Compaq C++
6499 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6500 _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'
6501
6502 runpath_var=LD_RUN_PATH
6503 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6504 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6505
6506 # Commands to make compiler produce verbose output that lists
6507 # what "hidden" libraries, object files and flags are used when
6508 # linking a shared library.
6509 #
6510 # There doesn't appear to be a way to prevent this compiler from
6511 # explicitly linking system object files so we need to strip them
6512 # from the output so that they don't get included in the library
6513 # dependencies.
6514 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'
6515 ;;
6516 xl* | mpixl* | bgxl*)
6517 # IBM XL 8.0 on PPC, with GNU ld
6518 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6519 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6520 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6521 if test "x$supports_anon_versioning" = xyes; then
6522 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6523 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6524 echo "local: *; };" >> $output_objdir/$libname.ver~
6525 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6526 fi
6527 ;;
6528 *)
6529 case `$CC -V 2>&1 | sed 5q` in
6530 *Sun\ C*)
6531 # Sun C++ 5.9
6532 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6533 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6534 _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'
6535 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6536 _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'
6537 _LT_TAGVAR(compiler_needs_object, $1)=yes
6538
6539 # Not sure whether something based on
6540 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6541 # would be better.
6542 output_verbose_link_cmd='func_echo_all'
6543
6544 # Archives containing C++ object files must be created using
6545 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6546 # necessary to make sure instantiated templates are included
6547 # in the archive.
6548 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6549 ;;
6550 esac
6551 ;;
6552 esac
6553 ;;
6554
6555 lynxos*)
6556 # FIXME: insert proper C++ library support
6557 _LT_TAGVAR(ld_shlibs, $1)=no
6558 ;;
6559
6560 m88k*)
6561 # FIXME: insert proper C++ library support
6562 _LT_TAGVAR(ld_shlibs, $1)=no
6563 ;;
6564
6565 mvs*)
6566 case $cc_basename in
6567 cxx*)
6568 # FIXME: insert proper C++ library support
6569 _LT_TAGVAR(ld_shlibs, $1)=no
6570 ;;
6571 *)
6572 # FIXME: insert proper C++ library support
6573 _LT_TAGVAR(ld_shlibs, $1)=no
6574 ;;
6575 esac
6576 ;;
6577
6578 netbsd*)
6579 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6580 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6581 wlarc=
6582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6583 _LT_TAGVAR(hardcode_direct, $1)=yes
6584 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6585 fi
6586 # Workaround some broken pre-1.5 toolchains
6587 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6588 ;;
6589
6590 *nto* | *qnx*)
6591 _LT_TAGVAR(ld_shlibs, $1)=yes
6592 ;;
6593
6594 openbsd2*)
6595 # C++ shared libraries are fairly broken
6596 _LT_TAGVAR(ld_shlibs, $1)=no
6597 ;;
6598
6599 openbsd*)
6600 if test -f /usr/libexec/ld.so; then
6601 _LT_TAGVAR(hardcode_direct, $1)=yes
6602 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6603 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6604 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6605 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6606 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6607 _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'
6608 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6609 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6610 fi
6611 output_verbose_link_cmd=func_echo_all
6612 else
6613 _LT_TAGVAR(ld_shlibs, $1)=no
6614 fi
6615 ;;
6616
6617 osf3* | osf4* | osf5*)
6618 case $cc_basename in
6619 KCC*)
6620 # Kuck and Associates, Inc. (KAI) C++ Compiler
6621
6622 # KCC will only create a shared library if the output file
6623 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6624 # to its proper name (with version) after linking.
6625 _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'
6626
6627 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6628 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6629
6630 # Archives containing C++ object files must be created using
6631 # the KAI C++ compiler.
6632 case $host in
6633 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6634 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6635 esac
6636 ;;
6637 RCC*)
6638 # Rational C++ 2.4.1
6639 # FIXME: insert proper C++ library support
6640 _LT_TAGVAR(ld_shlibs, $1)=no
6641 ;;
6642 cxx*)
6643 case $host in
6644 osf3*)
6645 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6646 _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'
6647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6648 ;;
6649 *)
6650 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6651 _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'
6652 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6653 echo "-hidden">> $lib.exp~
6654 $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~
6655 $RM $lib.exp'
6656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6657 ;;
6658 esac
6659
6660 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6661
6662 # Commands to make compiler produce verbose output that lists
6663 # what "hidden" libraries, object files and flags are used when
6664 # linking a shared library.
6665 #
6666 # There doesn't appear to be a way to prevent this compiler from
6667 # explicitly linking system object files so we need to strip them
6668 # from the output so that they don't get included in the library
6669 # dependencies.
6670 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"'
6671 ;;
6672 *)
6673 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6674 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6675 case $host in
6676 osf3*)
6677 _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'
6678 ;;
6679 *)
6680 _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'
6681 ;;
6682 esac
6683
6684 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6685 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6686
6687 # Commands to make compiler produce verbose output that lists
6688 # what "hidden" libraries, object files and flags are used when
6689 # linking a shared library.
6690 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6691
6692 else
6693 # FIXME: insert proper C++ library support
6694 _LT_TAGVAR(ld_shlibs, $1)=no
6695 fi
6696 ;;
6697 esac
6698 ;;
6699
6700 psos*)
6701 # FIXME: insert proper C++ library support
6702 _LT_TAGVAR(ld_shlibs, $1)=no
6703 ;;
6704
6705 sunos4*)
6706 case $cc_basename in
6707 CC*)
6708 # Sun C++ 4.x
6709 # FIXME: insert proper C++ library support
6710 _LT_TAGVAR(ld_shlibs, $1)=no
6711 ;;
6712 lcc*)
6713 # Lucid
6714 # FIXME: insert proper C++ library support
6715 _LT_TAGVAR(ld_shlibs, $1)=no
6716 ;;
6717 *)
6718 # FIXME: insert proper C++ library support
6719 _LT_TAGVAR(ld_shlibs, $1)=no
6720 ;;
6721 esac
6722 ;;
6723
6724 solaris*)
6725 case $cc_basename in
6726 CC* | sunCC*)
6727 # Sun C++ 4.2, 5.x and Centerline C++
6728 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6729 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6730 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6731 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6732 $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'
6733
6734 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6735 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6736 case $host_os in
6737 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6738 *)
6739 # The compiler driver will combine and reorder linker options,
6740 # but understands `-z linker_flag'.
6741 # Supported since Solaris 2.6 (maybe 2.5.1?)
6742 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6743 ;;
6744 esac
6745 _LT_TAGVAR(link_all_deplibs, $1)=yes
6746
6747 output_verbose_link_cmd='func_echo_all'
6748
6749 # Archives containing C++ object files must be created using
6750 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6751 # necessary to make sure instantiated templates are included
6752 # in the archive.
6753 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6754 ;;
6755 gcx*)
6756 # Green Hills C++ Compiler
6757 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6758
6759 # The C++ compiler must be used to create the archive.
6760 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6761 ;;
6762 *)
6763 # GNU C++ compiler with Solaris linker
6764 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6765 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6766 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6767 _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'
6768 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6769 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6770
6771 # Commands to make compiler produce verbose output that lists
6772 # what "hidden" libraries, object files and flags are used when
6773 # linking a shared library.
6774 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6775 else
6776 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6777 # platform.
6778 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6779 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6780 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6781
6782 # Commands to make compiler produce verbose output that lists
6783 # what "hidden" libraries, object files and flags are used when
6784 # linking a shared library.
6785 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6786 fi
6787
6788 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6789 case $host_os in
6790 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6791 *)
6792 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6793 ;;
6794 esac
6795 fi
6796 ;;
6797 esac
6798 ;;
6799
6800 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6801 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6802 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6803 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6804 runpath_var='LD_RUN_PATH'
6805
6806 case $cc_basename in
6807 CC*)
6808 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6809 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6810 ;;
6811 *)
6812 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6813 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6814 ;;
6815 esac
6816 ;;
6817
6818 sysv5* | sco3.2v5* | sco5v6*)
6819 # Note: We can NOT use -z defs as we might desire, because we do not
6820 # link with -lc, and that would cause any symbols used from libc to
6821 # always be unresolved, which means just about no library would
6822 # ever link correctly. If we're not using GNU ld we use -z text
6823 # though, which does catch some bad symbols but isn't as heavy-handed
6824 # as -z defs.
6825 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6826 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6827 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6828 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6830 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6831 _LT_TAGVAR(link_all_deplibs, $1)=yes
6832 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6833 runpath_var='LD_RUN_PATH'
6834
6835 case $cc_basename in
6836 CC*)
6837 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6838 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6839 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6840 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6841 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6842 '"$_LT_TAGVAR(reload_cmds, $1)"
6843 ;;
6844 *)
6845 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6846 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6847 ;;
6848 esac
6849 ;;
6850
6851 tandem*)
6852 case $cc_basename in
6853 NCC*)
6854 # NonStop-UX NCC 3.20
6855 # FIXME: insert proper C++ library support
6856 _LT_TAGVAR(ld_shlibs, $1)=no
6857 ;;
6858 *)
6859 # FIXME: insert proper C++ library support
6860 _LT_TAGVAR(ld_shlibs, $1)=no
6861 ;;
6862 esac
6863 ;;
6864
6865 vxworks*)
6866 # FIXME: insert proper C++ library support
6867 _LT_TAGVAR(ld_shlibs, $1)=no
6868 ;;
6869
6870 *)
6871 # FIXME: insert proper C++ library support
6872 _LT_TAGVAR(ld_shlibs, $1)=no
6873 ;;
6874 esac
6875
6876 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6877 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6878
6879 _LT_TAGVAR(GCC, $1)="$GXX"
6880 _LT_TAGVAR(LD, $1)="$LD"
6881
6882 ## CAVEAT EMPTOR:
6883 ## There is no encapsulation within the following macros, do not change
6884 ## the running order or otherwise move them around unless you know exactly
6885 ## what you are doing...
6886 _LT_SYS_HIDDEN_LIBDEPS($1)
6887 _LT_COMPILER_PIC($1)
6888 _LT_COMPILER_C_O($1)
6889 _LT_COMPILER_FILE_LOCKS($1)
6890 _LT_LINKER_SHLIBS($1)
6891 _LT_SYS_DYNAMIC_LINKER($1)
6892 _LT_LINKER_HARDCODE_LIBPATH($1)
6893
6894 _LT_CONFIG($1)
6895 fi # test -n "$compiler"
6896
6897 CC=$lt_save_CC
6898 CFLAGS=$lt_save_CFLAGS
6899 LDCXX=$LD
6900 LD=$lt_save_LD
6901 GCC=$lt_save_GCC
6902 with_gnu_ld=$lt_save_with_gnu_ld
6903 lt_cv_path_LDCXX=$lt_cv_path_LD
6904 lt_cv_path_LD=$lt_save_path_LD
6905 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6906 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6907 fi # test "$_lt_caught_CXX_error" != yes
6908
6909 AC_LANG_POP
6910 ])# _LT_LANG_CXX_CONFIG
6911
6912
6913 # _LT_FUNC_STRIPNAME_CNF
6914 # ----------------------
6915 # func_stripname_cnf prefix suffix name
6916 # strip PREFIX and SUFFIX off of NAME.
6917 # PREFIX and SUFFIX must not contain globbing or regex special
6918 # characters, hashes, percent signs, but SUFFIX may contain a leading
6919 # dot (in which case that matches only a dot).
6920 #
6921 # This function is identical to the (non-XSI) version of func_stripname,
6922 # except this one can be used by m4 code that may be executed by configure,
6923 # rather than the libtool script.
6924 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6925 AC_REQUIRE([_LT_DECL_SED])
6926 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6927 func_stripname_cnf ()
6928 {
6929 case ${2} in
6930 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6931 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6932 esac
6933 } # func_stripname_cnf
6934 ])# _LT_FUNC_STRIPNAME_CNF
6935
6936 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6937 # ---------------------------------
6938 # Figure out "hidden" library dependencies from verbose
6939 # compiler output when linking a shared library.
6940 # Parse the compiler output and extract the necessary
6941 # objects, libraries and library flags.
6942 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6943 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6944 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6945 # Dependencies to place before and after the object being linked:
6946 _LT_TAGVAR(predep_objects, $1)=
6947 _LT_TAGVAR(postdep_objects, $1)=
6948 _LT_TAGVAR(predeps, $1)=
6949 _LT_TAGVAR(postdeps, $1)=
6950 _LT_TAGVAR(compiler_lib_search_path, $1)=
6951
6952 dnl we can't use the lt_simple_compile_test_code here,
6953 dnl because it contains code intended for an executable,
6954 dnl not a library. It's possible we should let each
6955 dnl tag define a new lt_????_link_test_code variable,
6956 dnl but it's only used here...
6957 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6958 int a;
6959 void foo (void) { a = 0; }
6960 _LT_EOF
6961 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6962 class Foo
6963 {
6964 public:
6965 Foo (void) { a = 0; }
6966 private:
6967 int a;
6968 };
6969 _LT_EOF
6970 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6971 subroutine foo
6972 implicit none
6973 integer*4 a
6974 a=0
6975 return
6976 end
6977 _LT_EOF
6978 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6979 subroutine foo
6980 implicit none
6981 integer a
6982 a=0
6983 return
6984 end
6985 _LT_EOF
6986 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6987 public class foo {
6988 private int a;
6989 public void bar (void) {
6990 a = 0;
6991 }
6992 };
6993 _LT_EOF
6994 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6995 package foo
6996 func foo() {
6997 }
6998 _LT_EOF
6999 ])
7000
7001 _lt_libdeps_save_CFLAGS=$CFLAGS
7002 case "$CC $CFLAGS " in #(
7003 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7004 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7005 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7006 esac
7007
7008 dnl Parse the compiler output and extract the necessary
7009 dnl objects, libraries and library flags.
7010 if AC_TRY_EVAL(ac_compile); then
7011 # Parse the compiler output and extract the necessary
7012 # objects, libraries and library flags.
7013
7014 # Sentinel used to keep track of whether or not we are before
7015 # the conftest object file.
7016 pre_test_object_deps_done=no
7017
7018 for p in `eval "$output_verbose_link_cmd"`; do
7019 case ${prev}${p} in
7020
7021 -L* | -R* | -l*)
7022 # Some compilers place space between "-{L,R}" and the path.
7023 # Remove the space.
7024 if test $p = "-L" ||
7025 test $p = "-R"; then
7026 prev=$p
7027 continue
7028 fi
7029
7030 # Expand the sysroot to ease extracting the directories later.
7031 if test -z "$prev"; then
7032 case $p in
7033 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7034 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7035 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7036 esac
7037 fi
7038 case $p in
7039 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7040 esac
7041 if test "$pre_test_object_deps_done" = no; then
7042 case ${prev} in
7043 -L | -R)
7044 # Internal compiler library paths should come after those
7045 # provided the user. The postdeps already come after the
7046 # user supplied libs so there is no need to process them.
7047 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7048 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7049 else
7050 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7051 fi
7052 ;;
7053 # The "-l" case would never come before the object being
7054 # linked, so don't bother handling this case.
7055 esac
7056 else
7057 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7058 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7059 else
7060 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7061 fi
7062 fi
7063 prev=
7064 ;;
7065
7066 *.lto.$objext) ;; # Ignore GCC LTO objects
7067 *.$objext)
7068 # This assumes that the test object file only shows up
7069 # once in the compiler output.
7070 if test "$p" = "conftest.$objext"; then
7071 pre_test_object_deps_done=yes
7072 continue
7073 fi
7074
7075 if test "$pre_test_object_deps_done" = no; then
7076 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7077 _LT_TAGVAR(predep_objects, $1)="$p"
7078 else
7079 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7080 fi
7081 else
7082 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7083 _LT_TAGVAR(postdep_objects, $1)="$p"
7084 else
7085 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7086 fi
7087 fi
7088 ;;
7089
7090 *) ;; # Ignore the rest.
7091
7092 esac
7093 done
7094
7095 # Clean up.
7096 rm -f a.out a.exe
7097 else
7098 echo "libtool.m4: error: problem compiling $1 test program"
7099 fi
7100
7101 $RM -f confest.$objext
7102 CFLAGS=$_lt_libdeps_save_CFLAGS
7103
7104 # PORTME: override above test on systems where it is broken
7105 m4_if([$1], [CXX],
7106 [case $host_os in
7107 interix[[3-9]]*)
7108 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7109 # hack all around it, let's just trust "g++" to DTRT.
7110 _LT_TAGVAR(predep_objects,$1)=
7111 _LT_TAGVAR(postdep_objects,$1)=
7112 _LT_TAGVAR(postdeps,$1)=
7113 ;;
7114
7115 linux*)
7116 case `$CC -V 2>&1 | sed 5q` in
7117 *Sun\ C*)
7118 # Sun C++ 5.9
7119
7120 # The more standards-conforming stlport4 library is
7121 # incompatible with the Cstd library. Avoid specifying
7122 # it if it's in CXXFLAGS. Ignore libCrun as
7123 # -library=stlport4 depends on it.
7124 case " $CXX $CXXFLAGS " in
7125 *" -library=stlport4 "*)
7126 solaris_use_stlport4=yes
7127 ;;
7128 esac
7129
7130 if test "$solaris_use_stlport4" != yes; then
7131 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7132 fi
7133 ;;
7134 esac
7135 ;;
7136
7137 solaris*)
7138 case $cc_basename in
7139 CC* | sunCC*)
7140 # The more standards-conforming stlport4 library is
7141 # incompatible with the Cstd library. Avoid specifying
7142 # it if it's in CXXFLAGS. Ignore libCrun as
7143 # -library=stlport4 depends on it.
7144 case " $CXX $CXXFLAGS " in
7145 *" -library=stlport4 "*)
7146 solaris_use_stlport4=yes
7147 ;;
7148 esac
7149
7150 # Adding this requires a known-good setup of shared libraries for
7151 # Sun compiler versions before 5.6, else PIC objects from an old
7152 # archive will be linked into the output, leading to subtle bugs.
7153 if test "$solaris_use_stlport4" != yes; then
7154 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7155 fi
7156 ;;
7157 esac
7158 ;;
7159 esac
7160 ])
7161
7162 case " $_LT_TAGVAR(postdeps, $1) " in
7163 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7164 esac
7165 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7166 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7167 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7168 fi
7169 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7170 [The directories searched by this compiler when creating a shared library])
7171 _LT_TAGDECL([], [predep_objects], [1],
7172 [Dependencies to place before and after the objects being linked to
7173 create a shared library])
7174 _LT_TAGDECL([], [postdep_objects], [1])
7175 _LT_TAGDECL([], [predeps], [1])
7176 _LT_TAGDECL([], [postdeps], [1])
7177 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7178 [The library search path used internally by the compiler when linking
7179 a shared library])
7180 ])# _LT_SYS_HIDDEN_LIBDEPS
7181
7182
7183 # _LT_LANG_F77_CONFIG([TAG])
7184 # --------------------------
7185 # Ensure that the configuration variables for a Fortran 77 compiler are
7186 # suitably defined. These variables are subsequently used by _LT_CONFIG
7187 # to write the compiler configuration to `libtool'.
7188 m4_defun([_LT_LANG_F77_CONFIG],
7189 [AC_LANG_PUSH(Fortran 77)
7190 if test -z "$F77" || test "X$F77" = "Xno"; then
7191 _lt_disable_F77=yes
7192 fi
7193
7194 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7195 _LT_TAGVAR(allow_undefined_flag, $1)=
7196 _LT_TAGVAR(always_export_symbols, $1)=no
7197 _LT_TAGVAR(archive_expsym_cmds, $1)=
7198 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7199 _LT_TAGVAR(hardcode_direct, $1)=no
7200 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7201 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7202 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7203 _LT_TAGVAR(hardcode_minus_L, $1)=no
7204 _LT_TAGVAR(hardcode_automatic, $1)=no
7205 _LT_TAGVAR(inherit_rpath, $1)=no
7206 _LT_TAGVAR(module_cmds, $1)=
7207 _LT_TAGVAR(module_expsym_cmds, $1)=
7208 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7209 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7210 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7211 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7212 _LT_TAGVAR(no_undefined_flag, $1)=
7213 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7214 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7215
7216 # Source file extension for f77 test sources.
7217 ac_ext=f
7218
7219 # Object file extension for compiled f77 test sources.
7220 objext=o
7221 _LT_TAGVAR(objext, $1)=$objext
7222
7223 # No sense in running all these tests if we already determined that
7224 # the F77 compiler isn't working. Some variables (like enable_shared)
7225 # are currently assumed to apply to all compilers on this platform,
7226 # and will be corrupted by setting them based on a non-working compiler.
7227 if test "$_lt_disable_F77" != yes; then
7228 # Code to be used in simple compile tests
7229 lt_simple_compile_test_code="\
7230 subroutine t
7231 return
7232 end
7233 "
7234
7235 # Code to be used in simple link tests
7236 lt_simple_link_test_code="\
7237 program t
7238 end
7239 "
7240
7241 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7242 _LT_TAG_COMPILER
7243
7244 # save warnings/boilerplate of simple test code
7245 _LT_COMPILER_BOILERPLATE
7246 _LT_LINKER_BOILERPLATE
7247
7248 # Allow CC to be a program name with arguments.
7249 lt_save_CC="$CC"
7250 lt_save_GCC=$GCC
7251 lt_save_CFLAGS=$CFLAGS
7252 CC=${F77-"f77"}
7253 CFLAGS=$FFLAGS
7254 compiler=$CC
7255 _LT_TAGVAR(compiler, $1)=$CC
7256 _LT_CC_BASENAME([$compiler])
7257 GCC=$G77
7258 if test -n "$compiler"; then
7259 AC_MSG_CHECKING([if libtool supports shared libraries])
7260 AC_MSG_RESULT([$can_build_shared])
7261
7262 AC_MSG_CHECKING([whether to build shared libraries])
7263 test "$can_build_shared" = "no" && enable_shared=no
7264
7265 # On AIX, shared libraries and static libraries use the same namespace, and
7266 # are all built from PIC.
7267 case $host_os in
7268 aix3*)
7269 test "$enable_shared" = yes && enable_static=no
7270 if test -n "$RANLIB"; then
7271 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7272 postinstall_cmds='$RANLIB $lib'
7273 fi
7274 ;;
7275 aix[[4-9]]*)
7276 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7277 test "$enable_shared" = yes && enable_static=no
7278 fi
7279 ;;
7280 esac
7281 AC_MSG_RESULT([$enable_shared])
7282
7283 AC_MSG_CHECKING([whether to build static libraries])
7284 # Make sure either enable_shared or enable_static is yes.
7285 test "$enable_shared" = yes || enable_static=yes
7286 AC_MSG_RESULT([$enable_static])
7287
7288 _LT_TAGVAR(GCC, $1)="$G77"
7289 _LT_TAGVAR(LD, $1)="$LD"
7290
7291 ## CAVEAT EMPTOR:
7292 ## There is no encapsulation within the following macros, do not change
7293 ## the running order or otherwise move them around unless you know exactly
7294 ## what you are doing...
7295 _LT_COMPILER_PIC($1)
7296 _LT_COMPILER_C_O($1)
7297 _LT_COMPILER_FILE_LOCKS($1)
7298 _LT_LINKER_SHLIBS($1)
7299 _LT_SYS_DYNAMIC_LINKER($1)
7300 _LT_LINKER_HARDCODE_LIBPATH($1)
7301
7302 _LT_CONFIG($1)
7303 fi # test -n "$compiler"
7304
7305 GCC=$lt_save_GCC
7306 CC="$lt_save_CC"
7307 CFLAGS="$lt_save_CFLAGS"
7308 fi # test "$_lt_disable_F77" != yes
7309
7310 AC_LANG_POP
7311 ])# _LT_LANG_F77_CONFIG
7312
7313
7314 # _LT_LANG_FC_CONFIG([TAG])
7315 # -------------------------
7316 # Ensure that the configuration variables for a Fortran compiler are
7317 # suitably defined. These variables are subsequently used by _LT_CONFIG
7318 # to write the compiler configuration to `libtool'.
7319 m4_defun([_LT_LANG_FC_CONFIG],
7320 [AC_LANG_PUSH(Fortran)
7321
7322 if test -z "$FC" || test "X$FC" = "Xno"; then
7323 _lt_disable_FC=yes
7324 fi
7325
7326 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7327 _LT_TAGVAR(allow_undefined_flag, $1)=
7328 _LT_TAGVAR(always_export_symbols, $1)=no
7329 _LT_TAGVAR(archive_expsym_cmds, $1)=
7330 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7331 _LT_TAGVAR(hardcode_direct, $1)=no
7332 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7333 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7334 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7335 _LT_TAGVAR(hardcode_minus_L, $1)=no
7336 _LT_TAGVAR(hardcode_automatic, $1)=no
7337 _LT_TAGVAR(inherit_rpath, $1)=no
7338 _LT_TAGVAR(module_cmds, $1)=
7339 _LT_TAGVAR(module_expsym_cmds, $1)=
7340 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7341 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7342 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7343 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7344 _LT_TAGVAR(no_undefined_flag, $1)=
7345 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7346 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7347
7348 # Source file extension for fc test sources.
7349 ac_ext=${ac_fc_srcext-f}
7350
7351 # Object file extension for compiled fc test sources.
7352 objext=o
7353 _LT_TAGVAR(objext, $1)=$objext
7354
7355 # No sense in running all these tests if we already determined that
7356 # the FC compiler isn't working. Some variables (like enable_shared)
7357 # are currently assumed to apply to all compilers on this platform,
7358 # and will be corrupted by setting them based on a non-working compiler.
7359 if test "$_lt_disable_FC" != yes; then
7360 # Code to be used in simple compile tests
7361 lt_simple_compile_test_code="\
7362 subroutine t
7363 return
7364 end
7365 "
7366
7367 # Code to be used in simple link tests
7368 lt_simple_link_test_code="\
7369 program t
7370 end
7371 "
7372
7373 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7374 _LT_TAG_COMPILER
7375
7376 # save warnings/boilerplate of simple test code
7377 _LT_COMPILER_BOILERPLATE
7378 _LT_LINKER_BOILERPLATE
7379
7380 # Allow CC to be a program name with arguments.
7381 lt_save_CC="$CC"
7382 lt_save_GCC=$GCC
7383 lt_save_CFLAGS=$CFLAGS
7384 CC=${FC-"f95"}
7385 CFLAGS=$FCFLAGS
7386 compiler=$CC
7387 GCC=$ac_cv_fc_compiler_gnu
7388
7389 _LT_TAGVAR(compiler, $1)=$CC
7390 _LT_CC_BASENAME([$compiler])
7391
7392 if test -n "$compiler"; then
7393 AC_MSG_CHECKING([if libtool supports shared libraries])
7394 AC_MSG_RESULT([$can_build_shared])
7395
7396 AC_MSG_CHECKING([whether to build shared libraries])
7397 test "$can_build_shared" = "no" && enable_shared=no
7398
7399 # On AIX, shared libraries and static libraries use the same namespace, and
7400 # are all built from PIC.
7401 case $host_os in
7402 aix3*)
7403 test "$enable_shared" = yes && enable_static=no
7404 if test -n "$RANLIB"; then
7405 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7406 postinstall_cmds='$RANLIB $lib'
7407 fi
7408 ;;
7409 aix[[4-9]]*)
7410 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7411 test "$enable_shared" = yes && enable_static=no
7412 fi
7413 ;;
7414 esac
7415 AC_MSG_RESULT([$enable_shared])
7416
7417 AC_MSG_CHECKING([whether to build static libraries])
7418 # Make sure either enable_shared or enable_static is yes.
7419 test "$enable_shared" = yes || enable_static=yes
7420 AC_MSG_RESULT([$enable_static])
7421
7422 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7423 _LT_TAGVAR(LD, $1)="$LD"
7424
7425 ## CAVEAT EMPTOR:
7426 ## There is no encapsulation within the following macros, do not change
7427 ## the running order or otherwise move them around unless you know exactly
7428 ## what you are doing...
7429 _LT_SYS_HIDDEN_LIBDEPS($1)
7430 _LT_COMPILER_PIC($1)
7431 _LT_COMPILER_C_O($1)
7432 _LT_COMPILER_FILE_LOCKS($1)
7433 _LT_LINKER_SHLIBS($1)
7434 _LT_SYS_DYNAMIC_LINKER($1)
7435 _LT_LINKER_HARDCODE_LIBPATH($1)
7436
7437 _LT_CONFIG($1)
7438 fi # test -n "$compiler"
7439
7440 GCC=$lt_save_GCC
7441 CC=$lt_save_CC
7442 CFLAGS=$lt_save_CFLAGS
7443 fi # test "$_lt_disable_FC" != yes
7444
7445 AC_LANG_POP
7446 ])# _LT_LANG_FC_CONFIG
7447
7448
7449 # _LT_LANG_GCJ_CONFIG([TAG])
7450 # --------------------------
7451 # Ensure that the configuration variables for the GNU Java Compiler compiler
7452 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7453 # to write the compiler configuration to `libtool'.
7454 m4_defun([_LT_LANG_GCJ_CONFIG],
7455 [AC_REQUIRE([LT_PROG_GCJ])dnl
7456 AC_LANG_SAVE
7457
7458 # Source file extension for Java test sources.
7459 ac_ext=java
7460
7461 # Object file extension for compiled Java test sources.
7462 objext=o
7463 _LT_TAGVAR(objext, $1)=$objext
7464
7465 # Code to be used in simple compile tests
7466 lt_simple_compile_test_code="class foo {}"
7467
7468 # Code to be used in simple link tests
7469 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7470
7471 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7472 _LT_TAG_COMPILER
7473
7474 # save warnings/boilerplate of simple test code
7475 _LT_COMPILER_BOILERPLATE
7476 _LT_LINKER_BOILERPLATE
7477
7478 # Allow CC to be a program name with arguments.
7479 lt_save_CC=$CC
7480 lt_save_CFLAGS=$CFLAGS
7481 lt_save_GCC=$GCC
7482 GCC=yes
7483 CC=${GCJ-"gcj"}
7484 CFLAGS=$GCJFLAGS
7485 compiler=$CC
7486 _LT_TAGVAR(compiler, $1)=$CC
7487 _LT_TAGVAR(LD, $1)="$LD"
7488 _LT_CC_BASENAME([$compiler])
7489
7490 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7491 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7492
7493 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7494 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7495 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7496
7497 if test -n "$compiler"; then
7498 _LT_COMPILER_NO_RTTI($1)
7499 _LT_COMPILER_PIC($1)
7500 _LT_COMPILER_C_O($1)
7501 _LT_COMPILER_FILE_LOCKS($1)
7502 _LT_LINKER_SHLIBS($1)
7503 _LT_LINKER_HARDCODE_LIBPATH($1)
7504
7505 _LT_CONFIG($1)
7506 fi
7507
7508 AC_LANG_RESTORE
7509
7510 GCC=$lt_save_GCC
7511 CC=$lt_save_CC
7512 CFLAGS=$lt_save_CFLAGS
7513 ])# _LT_LANG_GCJ_CONFIG
7514
7515
7516 # _LT_LANG_GO_CONFIG([TAG])
7517 # --------------------------
7518 # Ensure that the configuration variables for the GNU Go compiler
7519 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7520 # to write the compiler configuration to `libtool'.
7521 m4_defun([_LT_LANG_GO_CONFIG],
7522 [AC_REQUIRE([LT_PROG_GO])dnl
7523 AC_LANG_SAVE
7524
7525 # Source file extension for Go test sources.
7526 ac_ext=go
7527
7528 # Object file extension for compiled Go test sources.
7529 objext=o
7530 _LT_TAGVAR(objext, $1)=$objext
7531
7532 # Code to be used in simple compile tests
7533 lt_simple_compile_test_code="package main; func main() { }"
7534
7535 # Code to be used in simple link tests
7536 lt_simple_link_test_code='package main; func main() { }'
7537
7538 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7539 _LT_TAG_COMPILER
7540
7541 # save warnings/boilerplate of simple test code
7542 _LT_COMPILER_BOILERPLATE
7543 _LT_LINKER_BOILERPLATE
7544
7545 # Allow CC to be a program name with arguments.
7546 lt_save_CC=$CC
7547 lt_save_CFLAGS=$CFLAGS
7548 lt_save_GCC=$GCC
7549 GCC=yes
7550 CC=${GOC-"gccgo"}
7551 CFLAGS=$GOFLAGS
7552 compiler=$CC
7553 _LT_TAGVAR(compiler, $1)=$CC
7554 _LT_TAGVAR(LD, $1)="$LD"
7555 _LT_CC_BASENAME([$compiler])
7556
7557 # Go did not exist at the time GCC didn't implicitly link libc in.
7558 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7559
7560 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7561 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7562 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7563
7564 if test -n "$compiler"; then
7565 _LT_COMPILER_NO_RTTI($1)
7566 _LT_COMPILER_PIC($1)
7567 _LT_COMPILER_C_O($1)
7568 _LT_COMPILER_FILE_LOCKS($1)
7569 _LT_LINKER_SHLIBS($1)
7570 _LT_LINKER_HARDCODE_LIBPATH($1)
7571
7572 _LT_CONFIG($1)
7573 fi
7574
7575 AC_LANG_RESTORE
7576
7577 GCC=$lt_save_GCC
7578 CC=$lt_save_CC
7579 CFLAGS=$lt_save_CFLAGS
7580 ])# _LT_LANG_GO_CONFIG
7581
7582
7583 # _LT_LANG_RC_CONFIG([TAG])
7584 # -------------------------
7585 # Ensure that the configuration variables for the Windows resource compiler
7586 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7587 # to write the compiler configuration to `libtool'.
7588 m4_defun([_LT_LANG_RC_CONFIG],
7589 [AC_REQUIRE([LT_PROG_RC])dnl
7590 AC_LANG_SAVE
7591
7592 # Source file extension for RC test sources.
7593 ac_ext=rc
7594
7595 # Object file extension for compiled RC test sources.
7596 objext=o
7597 _LT_TAGVAR(objext, $1)=$objext
7598
7599 # Code to be used in simple compile tests
7600 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7601
7602 # Code to be used in simple link tests
7603 lt_simple_link_test_code="$lt_simple_compile_test_code"
7604
7605 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7606 _LT_TAG_COMPILER
7607
7608 # save warnings/boilerplate of simple test code
7609 _LT_COMPILER_BOILERPLATE
7610 _LT_LINKER_BOILERPLATE
7611
7612 # Allow CC to be a program name with arguments.
7613 lt_save_CC="$CC"
7614 lt_save_CFLAGS=$CFLAGS
7615 lt_save_GCC=$GCC
7616 GCC=
7617 CC=${RC-"windres"}
7618 CFLAGS=
7619 compiler=$CC
7620 _LT_TAGVAR(compiler, $1)=$CC
7621 _LT_CC_BASENAME([$compiler])
7622 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7623
7624 if test -n "$compiler"; then
7625 :
7626 _LT_CONFIG($1)
7627 fi
7628
7629 GCC=$lt_save_GCC
7630 AC_LANG_RESTORE
7631 CC=$lt_save_CC
7632 CFLAGS=$lt_save_CFLAGS
7633 ])# _LT_LANG_RC_CONFIG
7634
7635
7636 # LT_PROG_GCJ
7637 # -----------
7638 AC_DEFUN([LT_PROG_GCJ],
7639 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7640 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7641 [AC_CHECK_TOOL(GCJ, gcj,)
7642 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7643 AC_SUBST(GCJFLAGS)])])[]dnl
7644 ])
7645
7646 # Old name:
7647 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7648 dnl aclocal-1.4 backwards compatibility:
7649 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7650
7651
7652 # LT_PROG_GO
7653 # ----------
7654 AC_DEFUN([LT_PROG_GO],
7655 [AC_CHECK_TOOL(GOC, gccgo,)
7656 ])
7657
7658
7659 # LT_PROG_RC
7660 # ----------
7661 AC_DEFUN([LT_PROG_RC],
7662 [AC_CHECK_TOOL(RC, windres,)
7663 ])
7664
7665 # Old name:
7666 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7667 dnl aclocal-1.4 backwards compatibility:
7668 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7669
7670
7671 # _LT_DECL_EGREP
7672 # --------------
7673 # If we don't have a new enough Autoconf to choose the best grep
7674 # available, choose the one first in the user's PATH.
7675 m4_defun([_LT_DECL_EGREP],
7676 [AC_REQUIRE([AC_PROG_EGREP])dnl
7677 AC_REQUIRE([AC_PROG_FGREP])dnl
7678 test -z "$GREP" && GREP=grep
7679 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7680 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7681 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7682 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7683 AC_SUBST([GREP])
7684 ])
7685
7686
7687 # _LT_DECL_OBJDUMP
7688 # --------------
7689 # If we don't have a new enough Autoconf to choose the best objdump
7690 # available, choose the one first in the user's PATH.
7691 m4_defun([_LT_DECL_OBJDUMP],
7692 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7693 test -z "$OBJDUMP" && OBJDUMP=objdump
7694 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7695 AC_SUBST([OBJDUMP])
7696 ])
7697
7698 # _LT_DECL_DLLTOOL
7699 # ----------------
7700 # Ensure DLLTOOL variable is set.
7701 m4_defun([_LT_DECL_DLLTOOL],
7702 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7703 test -z "$DLLTOOL" && DLLTOOL=dlltool
7704 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7705 AC_SUBST([DLLTOOL])
7706 ])
7707
7708 # _LT_DECL_SED
7709 # ------------
7710 # Check for a fully-functional sed program, that truncates
7711 # as few characters as possible. Prefer GNU sed if found.
7712 m4_defun([_LT_DECL_SED],
7713 [AC_PROG_SED
7714 test -z "$SED" && SED=sed
7715 Xsed="$SED -e 1s/^X//"
7716 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7717 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7718 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7719 ])# _LT_DECL_SED
7720
7721 m4_ifndef([AC_PROG_SED], [
7722 # NOTE: This macro has been submitted for inclusion into #
7723 # GNU Autoconf as AC_PROG_SED. When it is available in #
7724 # a released version of Autoconf we should remove this #
7725 # macro and use it instead. #
7726
7727 m4_defun([AC_PROG_SED],
7728 [AC_MSG_CHECKING([for a sed that does not truncate output])
7729 AC_CACHE_VAL(lt_cv_path_SED,
7730 [# Loop through the user's path and test for sed and gsed.
7731 # Then use that list of sed's as ones to test for truncation.
7732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7733 for as_dir in $PATH
7734 do
7735 IFS=$as_save_IFS
7736 test -z "$as_dir" && as_dir=.
7737 for lt_ac_prog in sed gsed; do
7738 for ac_exec_ext in '' $ac_executable_extensions; do
7739 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7740 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7741 fi
7742 done
7743 done
7744 done
7745 IFS=$as_save_IFS
7746 lt_ac_max=0
7747 lt_ac_count=0
7748 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7749 # along with /bin/sed that truncates output.
7750 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7751 test ! -f $lt_ac_sed && continue
7752 cat /dev/null > conftest.in
7753 lt_ac_count=0
7754 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7755 # Check for GNU sed and select it if it is found.
7756 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7757 lt_cv_path_SED=$lt_ac_sed
7758 break
7759 fi
7760 while true; do
7761 cat conftest.in conftest.in >conftest.tmp
7762 mv conftest.tmp conftest.in
7763 cp conftest.in conftest.nl
7764 echo >>conftest.nl
7765 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7766 cmp -s conftest.out conftest.nl || break
7767 # 10000 chars as input seems more than enough
7768 test $lt_ac_count -gt 10 && break
7769 lt_ac_count=`expr $lt_ac_count + 1`
7770 if test $lt_ac_count -gt $lt_ac_max; then
7771 lt_ac_max=$lt_ac_count
7772 lt_cv_path_SED=$lt_ac_sed
7773 fi
7774 done
7775 done
7776 ])
7777 SED=$lt_cv_path_SED
7778 AC_SUBST([SED])
7779 AC_MSG_RESULT([$SED])
7780 ])#AC_PROG_SED
7781 ])#m4_ifndef
7782
7783 # Old name:
7784 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7785 dnl aclocal-1.4 backwards compatibility:
7786 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7787
7788
7789 # _LT_CHECK_SHELL_FEATURES
7790 # ------------------------
7791 # Find out whether the shell is Bourne or XSI compatible,
7792 # or has some other useful features.
7793 m4_defun([_LT_CHECK_SHELL_FEATURES],
7794 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7795 # Try some XSI features
7796 xsi_shell=no
7797 ( _lt_dummy="a/b/c"
7798 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7799 = c,a/b,b/c, \
7800 && eval 'test $(( 1 + 1 )) -eq 2 \
7801 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7802 && xsi_shell=yes
7803 AC_MSG_RESULT([$xsi_shell])
7804 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7805
7806 AC_MSG_CHECKING([whether the shell understands "+="])
7807 lt_shell_append=no
7808 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7809 >/dev/null 2>&1 \
7810 && lt_shell_append=yes
7811 AC_MSG_RESULT([$lt_shell_append])
7812 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7813
7814 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7815 lt_unset=unset
7816 else
7817 lt_unset=false
7818 fi
7819 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7820
7821 # test EBCDIC or ASCII
7822 case `echo X|tr X '\101'` in
7823 A) # ASCII based system
7824 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7825 lt_SP2NL='tr \040 \012'
7826 lt_NL2SP='tr \015\012 \040\040'
7827 ;;
7828 *) # EBCDIC based system
7829 lt_SP2NL='tr \100 \n'
7830 lt_NL2SP='tr \r\n \100\100'
7831 ;;
7832 esac
7833 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7834 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7835 ])# _LT_CHECK_SHELL_FEATURES
7836
7837
7838 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7839 # ------------------------------------------------------
7840 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7841 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7842 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7843 [dnl {
7844 sed -e '/^$1 ()$/,/^} # $1 /c\
7845 $1 ()\
7846 {\
7847 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7848 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7849 && mv -f "$cfgfile.tmp" "$cfgfile" \
7850 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7851 test 0 -eq $? || _lt_function_replace_fail=:
7852 ])
7853
7854
7855 # _LT_PROG_REPLACE_SHELLFNS
7856 # -------------------------
7857 # Replace existing portable implementations of several shell functions with
7858 # equivalent extended shell implementations where those features are available..
7859 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7860 [if test x"$xsi_shell" = xyes; then
7861 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7862 case ${1} in
7863 */*) func_dirname_result="${1%/*}${2}" ;;
7864 * ) func_dirname_result="${3}" ;;
7865 esac])
7866
7867 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7868 func_basename_result="${1##*/}"])
7869
7870 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7871 case ${1} in
7872 */*) func_dirname_result="${1%/*}${2}" ;;
7873 * ) func_dirname_result="${3}" ;;
7874 esac
7875 func_basename_result="${1##*/}"])
7876
7877 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7878 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7879 # positional parameters, so assign one to ordinary parameter first.
7880 func_stripname_result=${3}
7881 func_stripname_result=${func_stripname_result#"${1}"}
7882 func_stripname_result=${func_stripname_result%"${2}"}])
7883
7884 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7885 func_split_long_opt_name=${1%%=*}
7886 func_split_long_opt_arg=${1#*=}])
7887
7888 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7889 func_split_short_opt_arg=${1#??}
7890 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7891
7892 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7893 case ${1} in
7894 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7895 *) func_lo2o_result=${1} ;;
7896 esac])
7897
7898 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7899
7900 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7901
7902 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7903 fi
7904
7905 if test x"$lt_shell_append" = xyes; then
7906 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7907
7908 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7909 func_quote_for_eval "${2}"
7910 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7911 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7912
7913 # Save a `func_append' function call where possible by direct use of '+='
7914 sed -e 's%func_append \([[a-zA-Z_]]\{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 else
7919 # Save a `func_append' function call even when '+=' is not available
7920 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7921 && mv -f "$cfgfile.tmp" "$cfgfile" \
7922 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7923 test 0 -eq $? || _lt_function_replace_fail=:
7924 fi
7925
7926 if test x"$_lt_function_replace_fail" = x":"; then
7927 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7928 fi
7929 ])
7930
7931 # _LT_PATH_CONVERSION_FUNCTIONS
7932 # -----------------------------
7933 # Determine which file name conversion functions should be used by
7934 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7935 # for certain cross-compile configurations and native mingw.
7936 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7937 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7938 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7939 AC_MSG_CHECKING([how to convert $build file names to $host format])
7940 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7941 [case $host in
7942 *-*-mingw* )
7943 case $build in
7944 *-*-mingw* ) # actually msys
7945 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7946 ;;
7947 *-*-cygwin* )
7948 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7949 ;;
7950 * ) # otherwise, assume *nix
7951 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7952 ;;
7953 esac
7954 ;;
7955 *-*-cygwin* )
7956 case $build in
7957 *-*-mingw* ) # actually msys
7958 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7959 ;;
7960 *-*-cygwin* )
7961 lt_cv_to_host_file_cmd=func_convert_file_noop
7962 ;;
7963 * ) # otherwise, assume *nix
7964 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7965 ;;
7966 esac
7967 ;;
7968 * ) # unhandled hosts (and "normal" native builds)
7969 lt_cv_to_host_file_cmd=func_convert_file_noop
7970 ;;
7971 esac
7972 ])
7973 to_host_file_cmd=$lt_cv_to_host_file_cmd
7974 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7975 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7976 [0], [convert $build file names to $host format])dnl
7977
7978 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7979 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7980 [#assume ordinary cross tools, or native build.
7981 lt_cv_to_tool_file_cmd=func_convert_file_noop
7982 case $host in
7983 *-*-mingw* )
7984 case $build in
7985 *-*-mingw* ) # actually msys
7986 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7987 ;;
7988 esac
7989 ;;
7990 esac
7991 ])
7992 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7993 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7994 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7995 [0], [convert $build files to toolchain format])dnl
7996 ])# _LT_PATH_CONVERSION_FUNCTIONS
7997
7998 # Helper functions for option handling. -*- Autoconf -*-
7999 #
8000 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8001 # Inc.
8002 # Written by Gary V. Vaughan, 2004
8003 #
8004 # This file is free software; the Free Software Foundation gives
8005 # unlimited permission to copy and/or distribute it, with or without
8006 # modifications, as long as this notice is preserved.
8007
8008 # serial 7 ltoptions.m4
8009
8010 # This is to help aclocal find these macros, as it can't see m4_define.
8011 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8012
8013
8014 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8015 # ------------------------------------------
8016 m4_define([_LT_MANGLE_OPTION],
8017 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8018
8019
8020 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8021 # ---------------------------------------
8022 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8023 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8024 # saved as a flag.
8025 m4_define([_LT_SET_OPTION],
8026 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8027 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8028 _LT_MANGLE_DEFUN([$1], [$2]),
8029 [m4_warning([Unknown $1 option `$2'])])[]dnl
8030 ])
8031
8032
8033 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8034 # ------------------------------------------------------------
8035 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8036 m4_define([_LT_IF_OPTION],
8037 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8038
8039
8040 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8041 # -------------------------------------------------------
8042 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8043 # are set.
8044 m4_define([_LT_UNLESS_OPTIONS],
8045 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8046 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8047 [m4_define([$0_found])])])[]dnl
8048 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8049 ])[]dnl
8050 ])
8051
8052
8053 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8054 # ----------------------------------------
8055 # OPTION-LIST is a space-separated list of Libtool options associated
8056 # with MACRO-NAME. If any OPTION has a matching handler declared with
8057 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8058 # the unknown option and exit.
8059 m4_defun([_LT_SET_OPTIONS],
8060 [# Set options
8061 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8062 [_LT_SET_OPTION([$1], _LT_Option)])
8063
8064 m4_if([$1],[LT_INIT],[
8065 dnl
8066 dnl Simply set some default values (i.e off) if boolean options were not
8067 dnl specified:
8068 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8069 ])
8070 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8071 ])
8072 dnl
8073 dnl If no reference was made to various pairs of opposing options, then
8074 dnl we run the default mode handler for the pair. For example, if neither
8075 dnl `shared' nor `disable-shared' was passed, we enable building of shared
8076 dnl archives by default:
8077 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8078 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8079 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8080 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8081 [_LT_ENABLE_FAST_INSTALL])
8082 ])
8083 ])# _LT_SET_OPTIONS
8084
8085
8086
8087 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8088 # -----------------------------------------
8089 m4_define([_LT_MANGLE_DEFUN],
8090 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8091
8092
8093 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8094 # -----------------------------------------------
8095 m4_define([LT_OPTION_DEFINE],
8096 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8097 ])# LT_OPTION_DEFINE
8098
8099
8100 # dlopen
8101 # ------
8102 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8103 ])
8104
8105 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8106 [_LT_SET_OPTION([LT_INIT], [dlopen])
8107 AC_DIAGNOSE([obsolete],
8108 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8109 put the `dlopen' option into LT_INIT's first parameter.])
8110 ])
8111
8112 dnl aclocal-1.4 backwards compatibility:
8113 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8114
8115
8116 # win32-dll
8117 # ---------
8118 # Declare package support for building win32 dll's.
8119 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8120 [enable_win32_dll=yes
8121
8122 case $host in
8123 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8124 AC_CHECK_TOOL(AS, as, false)
8125 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8126 AC_CHECK_TOOL(OBJDUMP, objdump, false)
8127 ;;
8128 esac
8129
8130 test -z "$AS" && AS=as
8131 _LT_DECL([], [AS], [1], [Assembler program])dnl
8132
8133 test -z "$DLLTOOL" && DLLTOOL=dlltool
8134 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8135
8136 test -z "$OBJDUMP" && OBJDUMP=objdump
8137 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8138 ])# win32-dll
8139
8140 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8141 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8142 _LT_SET_OPTION([LT_INIT], [win32-dll])
8143 AC_DIAGNOSE([obsolete],
8144 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8145 put the `win32-dll' option into LT_INIT's first parameter.])
8146 ])
8147
8148 dnl aclocal-1.4 backwards compatibility:
8149 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8150
8151
8152 # _LT_ENABLE_SHARED([DEFAULT])
8153 # ----------------------------
8154 # implement the --enable-shared flag, and supports the `shared' and
8155 # `disable-shared' LT_INIT options.
8156 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8157 m4_define([_LT_ENABLE_SHARED],
8158 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8159 AC_ARG_ENABLE([shared],
8160 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8161 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8162 [p=${PACKAGE-default}
8163 case $enableval in
8164 yes) enable_shared=yes ;;
8165 no) enable_shared=no ;;
8166 *)
8167 enable_shared=no
8168 # Look at the argument we got. We use all the common list separators.
8169 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8170 for pkg in $enableval; do
8171 IFS="$lt_save_ifs"
8172 if test "X$pkg" = "X$p"; then
8173 enable_shared=yes
8174 fi
8175 done
8176 IFS="$lt_save_ifs"
8177 ;;
8178 esac],
8179 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8180
8181 _LT_DECL([build_libtool_libs], [enable_shared], [0],
8182 [Whether or not to build shared libraries])
8183 ])# _LT_ENABLE_SHARED
8184
8185 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8186 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8187
8188 # Old names:
8189 AC_DEFUN([AC_ENABLE_SHARED],
8190 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8191 ])
8192
8193 AC_DEFUN([AC_DISABLE_SHARED],
8194 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8195 ])
8196
8197 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8198 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8199
8200 dnl aclocal-1.4 backwards compatibility:
8201 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8202 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8203
8204
8205
8206 # _LT_ENABLE_STATIC([DEFAULT])
8207 # ----------------------------
8208 # implement the --enable-static flag, and support the `static' and
8209 # `disable-static' LT_INIT options.
8210 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8211 m4_define([_LT_ENABLE_STATIC],
8212 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8213 AC_ARG_ENABLE([static],
8214 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8215 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8216 [p=${PACKAGE-default}
8217 case $enableval in
8218 yes) enable_static=yes ;;
8219 no) enable_static=no ;;
8220 *)
8221 enable_static=no
8222 # Look at the argument we got. We use all the common list separators.
8223 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8224 for pkg in $enableval; do
8225 IFS="$lt_save_ifs"
8226 if test "X$pkg" = "X$p"; then
8227 enable_static=yes
8228 fi
8229 done
8230 IFS="$lt_save_ifs"
8231 ;;
8232 esac],
8233 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8234
8235 _LT_DECL([build_old_libs], [enable_static], [0],
8236 [Whether or not to build static libraries])
8237 ])# _LT_ENABLE_STATIC
8238
8239 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8240 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8241
8242 # Old names:
8243 AC_DEFUN([AC_ENABLE_STATIC],
8244 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8245 ])
8246
8247 AC_DEFUN([AC_DISABLE_STATIC],
8248 [_LT_SET_OPTION([LT_INIT], [disable-static])
8249 ])
8250
8251 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8252 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8253
8254 dnl aclocal-1.4 backwards compatibility:
8255 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8256 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8257
8258
8259
8260 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8261 # ----------------------------------
8262 # implement the --enable-fast-install flag, and support the `fast-install'
8263 # and `disable-fast-install' LT_INIT options.
8264 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8265 m4_define([_LT_ENABLE_FAST_INSTALL],
8266 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8267 AC_ARG_ENABLE([fast-install],
8268 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8269 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8270 [p=${PACKAGE-default}
8271 case $enableval in
8272 yes) enable_fast_install=yes ;;
8273 no) enable_fast_install=no ;;
8274 *)
8275 enable_fast_install=no
8276 # Look at the argument we got. We use all the common list separators.
8277 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8278 for pkg in $enableval; do
8279 IFS="$lt_save_ifs"
8280 if test "X$pkg" = "X$p"; then
8281 enable_fast_install=yes
8282 fi
8283 done
8284 IFS="$lt_save_ifs"
8285 ;;
8286 esac],
8287 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8288
8289 _LT_DECL([fast_install], [enable_fast_install], [0],
8290 [Whether or not to optimize for fast installation])dnl
8291 ])# _LT_ENABLE_FAST_INSTALL
8292
8293 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8294 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8295
8296 # Old names:
8297 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8298 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8299 AC_DIAGNOSE([obsolete],
8300 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8301 the `fast-install' option into LT_INIT's first parameter.])
8302 ])
8303
8304 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8305 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8306 AC_DIAGNOSE([obsolete],
8307 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8308 the `disable-fast-install' option into LT_INIT's first parameter.])
8309 ])
8310
8311 dnl aclocal-1.4 backwards compatibility:
8312 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8313 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8314
8315
8316 # _LT_WITH_PIC([MODE])
8317 # --------------------
8318 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
8319 # LT_INIT options.
8320 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8321 m4_define([_LT_WITH_PIC],
8322 [AC_ARG_WITH([pic],
8323 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8324 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8325 [lt_p=${PACKAGE-default}
8326 case $withval in
8327 yes|no) pic_mode=$withval ;;
8328 *)
8329 pic_mode=default
8330 # Look at the argument we got. We use all the common list separators.
8331 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8332 for lt_pkg in $withval; do
8333 IFS="$lt_save_ifs"
8334 if test "X$lt_pkg" = "X$lt_p"; then
8335 pic_mode=yes
8336 fi
8337 done
8338 IFS="$lt_save_ifs"
8339 ;;
8340 esac],
8341 [pic_mode=default])
8342
8343 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8344
8345 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8346 ])# _LT_WITH_PIC
8347
8348 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8349 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8350
8351 # Old name:
8352 AU_DEFUN([AC_LIBTOOL_PICMODE],
8353 [_LT_SET_OPTION([LT_INIT], [pic-only])
8354 AC_DIAGNOSE([obsolete],
8355 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8356 put the `pic-only' option into LT_INIT's first parameter.])
8357 ])
8358
8359 dnl aclocal-1.4 backwards compatibility:
8360 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8361
8362
8363 m4_define([_LTDL_MODE], [])
8364 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8365 [m4_define([_LTDL_MODE], [nonrecursive])])
8366 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8367 [m4_define([_LTDL_MODE], [recursive])])
8368 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8369 [m4_define([_LTDL_MODE], [subproject])])
8370
8371 m4_define([_LTDL_TYPE], [])
8372 LT_OPTION_DEFINE([LTDL_INIT], [installable],
8373 [m4_define([_LTDL_TYPE], [installable])])
8374 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8375 [m4_define([_LTDL_TYPE], [convenience])])
8376
8377 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8378 #
8379 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8380 # Written by Gary V. Vaughan, 2004
8381 #
8382 # This file is free software; the Free Software Foundation gives
8383 # unlimited permission to copy and/or distribute it, with or without
8384 # modifications, as long as this notice is preserved.
8385
8386 # serial 6 ltsugar.m4
8387
8388 # This is to help aclocal find these macros, as it can't see m4_define.
8389 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8390
8391
8392 # lt_join(SEP, ARG1, [ARG2...])
8393 # -----------------------------
8394 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8395 # associated separator.
8396 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8397 # versions in m4sugar had bugs.
8398 m4_define([lt_join],
8399 [m4_if([$#], [1], [],
8400 [$#], [2], [[$2]],
8401 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8402 m4_define([_lt_join],
8403 [m4_if([$#$2], [2], [],
8404 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8405
8406
8407 # lt_car(LIST)
8408 # lt_cdr(LIST)
8409 # ------------
8410 # Manipulate m4 lists.
8411 # These macros are necessary as long as will still need to support
8412 # Autoconf-2.59 which quotes differently.
8413 m4_define([lt_car], [[$1]])
8414 m4_define([lt_cdr],
8415 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8416 [$#], 1, [],
8417 [m4_dquote(m4_shift($@))])])
8418 m4_define([lt_unquote], $1)
8419
8420
8421 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
8422 # ------------------------------------------
8423 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8424 # Note that neither SEPARATOR nor STRING are expanded; they are appended
8425 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8426 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
8427 # than defined and empty).
8428 #
8429 # This macro is needed until we can rely on Autoconf 2.62, since earlier
8430 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8431 m4_define([lt_append],
8432 [m4_define([$1],
8433 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8434
8435
8436
8437 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8438 # ----------------------------------------------------------
8439 # Produce a SEP delimited list of all paired combinations of elements of
8440 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8441 # has the form PREFIXmINFIXSUFFIXn.
8442 # Needed until we can rely on m4_combine added in Autoconf 2.62.
8443 m4_define([lt_combine],
8444 [m4_if(m4_eval([$# > 3]), [1],
8445 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8446 [[m4_foreach([_Lt_prefix], [$2],
8447 [m4_foreach([_Lt_suffix],
8448 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8449 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8450
8451
8452 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8453 # -----------------------------------------------------------------------
8454 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8455 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8456 m4_define([lt_if_append_uniq],
8457 [m4_ifdef([$1],
8458 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8459 [lt_append([$1], [$2], [$3])$4],
8460 [$5])],
8461 [lt_append([$1], [$2], [$3])$4])])
8462
8463
8464 # lt_dict_add(DICT, KEY, VALUE)
8465 # -----------------------------
8466 m4_define([lt_dict_add],
8467 [m4_define([$1($2)], [$3])])
8468
8469
8470 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8471 # --------------------------------------------
8472 m4_define([lt_dict_add_subkey],
8473 [m4_define([$1($2:$3)], [$4])])
8474
8475
8476 # lt_dict_fetch(DICT, KEY, [SUBKEY])
8477 # ----------------------------------
8478 m4_define([lt_dict_fetch],
8479 [m4_ifval([$3],
8480 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8481 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8482
8483
8484 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8485 # -----------------------------------------------------------------
8486 m4_define([lt_if_dict_fetch],
8487 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8488 [$5],
8489 [$6])])
8490
8491
8492 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8493 # --------------------------------------------------------------
8494 m4_define([lt_dict_filter],
8495 [m4_if([$5], [], [],
8496 [lt_join(m4_quote(m4_default([$4], [[, ]])),
8497 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8498 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8499 ])
8500
8501 # ltversion.m4 -- version numbers -*- Autoconf -*-
8502 #
8503 # Copyright (C) 2004 Free Software Foundation, Inc.
8504 # Written by Scott James Remnant, 2004
8505 #
8506 # This file is free software; the Free Software Foundation gives
8507 # unlimited permission to copy and/or distribute it, with or without
8508 # modifications, as long as this notice is preserved.
8509
8510 # @configure_input@
8511
8512 # serial 3337 ltversion.m4
8513 # This file is part of GNU Libtool
8514
8515 m4_define([LT_PACKAGE_VERSION], [2.4.2])
8516 m4_define([LT_PACKAGE_REVISION], [1.3337])
8517
8518 AC_DEFUN([LTVERSION_VERSION],
8519 [macro_version='2.4.2'
8520 macro_revision='1.3337'
8521 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8522 _LT_DECL(, macro_revision, 0)
8523 ])
8524
8525 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8526 #
8527 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
8528 # Written by Scott James Remnant, 2004.
8529 #
8530 # This file is free software; the Free Software Foundation gives
8531 # unlimited permission to copy and/or distribute it, with or without
8532 # modifications, as long as this notice is preserved.
8533
8534 # serial 5 lt~obsolete.m4
8535
8536 # These exist entirely to fool aclocal when bootstrapping libtool.
8537 #
8538 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8539 # which have later been changed to m4_define as they aren't part of the
8540 # exported API, or moved to Autoconf or Automake where they belong.
8541 #
8542 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8543 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8544 # using a macro with the same name in our local m4/libtool.m4 it'll
8545 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8546 # and doesn't know about Autoconf macros at all.)
8547 #
8548 # So we provide this file, which has a silly filename so it's always
8549 # included after everything else. This provides aclocal with the
8550 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8551 # because those macros already exist, or will be overwritten later.
8552 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8553 #
8554 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8555 # Yes, that means every name once taken will need to remain here until
8556 # we give up compatibility with versions before 1.7, at which point
8557 # we need to keep only those names which we still refer to.
8558
8559 # This is to help aclocal find these macros, as it can't see m4_define.
8560 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8561
8562 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8563 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8564 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8565 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8566 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8567 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8568 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8569 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8570 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8571 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8572 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8573 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8574 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8575 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8576 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8577 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8578 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8579 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8580 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8581 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8582 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8583 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8584 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8585 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8586 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8587 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8588 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8589 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8590 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8591 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8592 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8593 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8594 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8595 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8596 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8597 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8598 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8599 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8600 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8601 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8602 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8603 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8604 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8605 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8606 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8607 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8608 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8609 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8610 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8611 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8612 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8613 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8614 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8615 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8616 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
8617 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
8618 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
8619 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
8620 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
8621 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
8622 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
8623
8624 dnl Copyright (C) 2000-2003 Open Source Telecom Corporation.
8625 dnl
8626 dnl This program is free software; you can redistribute it and/or modify
8627 dnl it under the terms of the GNU General Public License as published by
8628 dnl the Free Software Foundation; either version 2 of the License, or
8629 dnl (at your option) any later version.
8630 dnl
8631 dnl This program is distributed in the hope that it will be useful,
8632 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
8633 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8634 dnl GNU General Public License for more details.
8635 dnl
8636 dnl You should have received a copy of the GNU General Public License
8637 dnl along with this program; if not, write to the Free Software
8638 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8639 dnl
8640 dnl As a special exception to the GNU General Public License, if you
8641 dnl distribute this file as part of a program that contains a configuration
8642 dnl script generated by Autoconf, you may include it under the same
8643 dnl distribution terms that you use for the rest of that program.
8644
8645 dnl OST_CCXX2_VERSION([MINIMUM-VERSION[,ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]])
8646 dnl Test for usable version of CommonC++
8647
8648 AC_DEFUN([OST_CCXX2_DYNLOADER],[
8649 ost_cv_dynloader=`$CCGNU2_CONFIG --dso`
8650 if test "$ost_cv_dynloader" = "yes" ; then
8651 MODULE_FLAGS=`$CCGNU2_CONFIG --module`
8652 AC_SUBST(MODULE_FLAGS)
8653 fi
8654 ])
8655
8656 AC_DEFUN([OST_CCXX2_LD_THREADING],[
8657 LD_THREADING=`$CCGNU2_CONFIG --cclibs`
8658 AC_SUBST(LD_THREADING)
8659 ])
8660
8661 AC_DEFUN([OST_CCXX2_VERSION],
8662 [
8663 if test -d ${exec_prefix}/bin ; then
8664 PATH=${exec_prefix}/bin:$PATH
8665 elif test -d ${prefix}/bin ; then
8666 PATH=${prefix}/bin:$PATH ; fi
8667
8668 AC_PATH_PROG(CCGNU2_CONFIG, ccgnu2-config, no)
8669 ccgnu2_version=ifelse([$1], ,0.99.0,$1)
8670 AC_MSG_CHECKING(for commoncpp2 version >= $ccgnu2_version)
8671 if test "$CCGNU2_CONFIG" = "no" ; then
8672 AC_MSG_RESULT(not found)
8673 echo "*** The ccgnu2-config script installed by commoncpp2 0.99"
8674 echo "*** or later could not be found."
8675 echo "*** You need to install GNU Common C++ 2, whose later releases are"
8676 echo "*** available from http://www.gnu.org/software/commoncpp/ and any"
8677 echo "*** GNU mirror."
8678 ifelse([$3], , :, [$3])
8679 exit -1
8680 else
8681 config_version=`$CCGNU2_CONFIG --version`
8682 ccgnu2_config_major_version=`echo $config_version | \
8683 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8684 ccgnu2_config_minor_version=`echo $config_version | \
8685 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8686 ccgnu2_config_micro_version=`echo $config_version | \
8687 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8688
8689 ccgnu2_check_major_version=`echo "$ccgnu2_version" | \
8690 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8691 ccgnu2_check_minor_version=`echo "$ccgnu2_version" | \
8692 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8693 ccgnu2_check_micro_version=`echo "$ccgnu2_version" | \
8694 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8695
8696 version_ok=no
8697 if test $ccgnu2_config_major_version -gt $ccgnu2_check_major_version ; then
8698 version_ok=yes
8699 elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \
8700 && test $ccgnu2_config_minor_version -gt $ccgnu2_check_minor_version ; then
8701 version_ok=yes
8702 elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \
8703 && test $ccgnu2_config_minor_version -eq $ccgnu2_check_minor_version \
8704 && test $ccgnu2_config_micro_version -ge $ccgnu2_check_micro_version; then
8705
8706 version_ok=yes
8707 fi
8708
8709 if test "$version_ok" = "no"; then
8710 AC_MSG_RESULT(no)
8711 ost_cv_ccxx_config=false
8712 echo "*** An old version of CommonC++ of $config_version was found."
8713 echo "*** You need a version of commoncpp2 newer than $ccgnu2_version. The latest version of"
8714 echo "*** CommonC++ is always available from ftp://ftp.gnu.org/gnu/commonc++/."
8715 ifelse([$3], , :, [$3])
8716 else
8717 AC_MSG_RESULT(yes)
8718 ost_cv_ccxx_config=true
8719 SINGLE_FLAGS="$CXXFLAGS"
8720 SINGLE_LIBS="$LIBS"
8721 AC_SUBST(SINGLE_LIBS)
8722 AC_SUBST(SINGLE_FLAGS)
8723 CXXFLAGS="$CXXFLAGS "`$CCGNU2_CONFIG --flags`
8724 GNULIBS="$LIBS "`$CCGNU2_CONFIG --gnulibs`
8725 EXTLIBS=`$CCGNU2_CONFIG --extlibs`
8726 LIBS="$LIBS `$CCGNU2_CONFIG --stdlibs`"
8727 AC_SUBST(GNULIBS)
8728 AC_SUBST(EXTLIBS)
8729 fi
8730 fi
8731 ])
8732
8733 AC_DEFUN([OST_CCXX2_CHECK],
8734 [
8735 if test -d ${exec_prefix}/bin ; then
8736 PATH=${exec_prefix}/bin:$PATH
8737 elif test -d ${prefix}/bin ; then
8738 PATH=${prefix}/bin:$PATH ; fi
8739
8740 AC_PATH_PROG(CCGNU2_CONFIG, ccgnu2-config, no)
8741 ccgnu2_version=ifelse([$1], ,0.99.0,$1)
8742 AC_MSG_CHECKING(for commoncpp2 version >= $ccgnu2_version)
8743 if test "$CCGNU2_CONFIG" = "no" ; then
8744 AC_MSG_RESULT(not found)
8745 echo "*** The ccgnu2-config script installed by commoncpp2 0.99"
8746 echo "*** or later could not be found."
8747 echo "*** You need to install GNU Common C++ 2, whose later releases are"
8748 echo "*** available from http://www.gnu.org/software/commoncpp/ and any"
8749 echo "*** GNU mirror."
8750 ifelse([$3], , :, [$3])
8751 exit -1
8752 else
8753 config_version=`$CCGNU2_CONFIG --version`
8754 ccgnu2_config_major_version=`echo $config_version | \
8755 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8756 ccgnu2_config_minor_version=`echo $config_version | \
8757 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8758 ccgnu2_config_micro_version=`echo $config_version | \
8759 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8760
8761 ccgnu2_check_major_version=`echo "$ccgnu2_version" | \
8762 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
8763 ccgnu2_check_minor_version=`echo "$ccgnu2_version" | \
8764 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
8765 ccgnu2_check_micro_version=`echo "$ccgnu2_version" | \
8766 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
8767
8768 version_ok=no
8769 if test $ccgnu2_config_major_version -gt $ccgnu2_check_major_version ; then
8770 version_ok=yes
8771 elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \
8772 && test $ccgnu2_config_minor_version -gt $ccgnu2_check_minor_version ; then
8773 version_ok=yes
8774 elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \
8775 && test $ccgnu2_config_minor_version -eq $ccgnu2_check_minor_version \
8776 && test $ccgnu2_config_micro_version -ge $ccgnu2_check_micro_version; then
8777
8778 version_ok=yes
8779 fi
8780
8781 if test "$version_ok" = "no"; then
8782 AC_MSG_RESULT(no)
8783 ost_cv_ccxx_config=false
8784 echo "*** An old version of CommonC++ of $config_version was found."
8785 echo "*** You need a version of commoncpp2 newer than $ccgnu2_version. The latest version of"
8786 echo "*** CommonC++ is always available from ftp://ftp.gnu.org/gnu/commonc++/."
8787 ifelse([$3], , :, [$3])
8788 else
8789 AC_MSG_RESULT(yes)
8790 ost_cv_ccxx_config=true
8791 CCFLAGS2=`$CCGNU2_CONFIG --flags`
8792 LDCCGNU2=`$CCGNU2_CONFIG --gnulibs`
8793 LDCCEXT2=`$CCGNU2_CONFIG --stdlibs`
8794 AC_SUBST(LDCCGNU2)
8795 AC_SUBST(LDCCEXT2)
8796 AC_SUBST(CCFLAGS2)
8797 fi
8798 fi
8799 ])
8800
8801 AC_DEFUN([OST_CCXX2_FOX],[
8802 AC_LANG_SAVE
8803 AC_LANG_CPLUSPLUS
8804 ost_cv_lib_fox=false
8805 AC_CHECK_HEADERS(fox/fx.h,[
8806 AC_DEFINE(HAVE_FOX_FX_H)
8807 ost_cv_lib_fox=true])
8808 AC_LANG_RESTORE
8809 ])
8810
8811 dnl OST_CCXX2_XML([ACTION-IF-TRUE[,ACTION-IF-FALSE]])
8812 AC_DEFUN([OST_CCXX2_HOARD],[
8813 AC_ARG_ENABLE(hoard, [--disable-hoard Disable hoard support])
8814 AC_ARG_ENABLE(mpatrol, [--enable-mpatrol Enable mpatrol debugging])
8815 if test "$enable_mpatrol" = "yes" ; then
8816 LIBS="$LIBS -lmpatrolmt -lbfd -liberty"
8817 elif test "$enable_hoard" != "no" ; then
8818 AC_CHECK_LIB(hoard, free, [LIBS="$LIBS -lhoard"])
8819 fi
8820 ])
8821
8822 AC_DEFUN([OST_CCXX2_XML],
8823 [
8824 AC_MSG_CHECKING(for commoncpp2 xml parsing)
8825 AC_LANG_PUSH(C++)
8826 AC_REQUIRE_CPP
8827 AC_TRY_RUN([
8828 #include <cc++/config.h>
8829 #ifndef COMMON_XML_PARSING
8830 #error ""
8831 #endif
8832 int main() {
8833 return 0;
8834 }
8835 ], ost_cv_ccxx_xml=yes, ost_cv_ccxx_xml=no)
8836 AC_LANG_POP(C++)
8837 if test "x$ost_cv_ccxx_xml" = "xyes" ; then
8838 AC_MSG_RESULT(yes)
8839 AC_DEFINE(HAVE_OST_CCXX2_XML_PARSING, 1, [Define this if the CommonC++ library was compiled with XML parsing support])
8840 ifelse([$1], , :, [$1])
8841 else
8842 AC_MSG_RESULT(no)
8843 ifelse([$2], , :, [$2])
8844 fi
8845 ])
8846
8847 dnl ACCONFIG TEMPLATE
8848 dnl #undef CCXX_CONFIG_H_
8849 dnl #undef HAVE_FOX_FX_H
8850 dnl END ACCONFIG
8851
8852 dnl Initialize an ui-auto project
8853 dnl
8854 dnl Usage:
8855 dnl UI_INIT(SOURCE_FILE, [SO_VERSION=], [TOOLDIR=src/tools], [INCDIR=src/PACKAGE], [AUTOMAKE_OPTS=])
8856 dnl
8857 dnl SOURCE_FILE (mandatory) See AC_CONFIG_SRCDIR.
8858 dnl SO_VERSION (optional) Give SO version (libtool style: e.g. 2:4:0) if needed.
8859 dnl TOOLDIR (sane default) UI-automagic script PACKAGE-version will be created in that directory.
8860 dnl INCDIR (sane default) UI-automagic header version.h will be created in that directory.
8861 dnl AUTOMAKE_OPTS (optional) Options to AM_INIT_AUTOMAKE.
8862 dnl
8863 AC_DEFUN([UI_INIT], [
8864 dnl
8865 dnl Generic autoconf/automake stuff
8866 dnl
8867 AC_PREREQ(2.58)
8868 AC_CONFIG_SRCDIR($1)
8869 AM_INIT_AUTOMAKE($5)
8870
8871 dnl
8872 dnl Basic initializations
8873 dnl
8874 if test -z "${PACKAGE_VERSION}"; then
8875 AC_MSG_ERROR([[Cant continue: PACKAGE_VERSION missing.]])
8876 fi
8877 SO_VERSION=$2
8878 AC_SUBST(SO_VERSION)
8879
8880 TOOLDIR=$3
8881 if test -z "${TOOLDIR}"; then
8882 TOOLDIR="src/tools"
8883 fi
8884
8885 INCDIR=$4
8886 if test -z "${INCDIR}"; then
8887 INCDIR="src/${PACKAGE_NAME}"
8888 fi
8889
8890 dnl
8891 dnl Initialize ui-auto.am
8892 dnl
8893 UI_AUTO_AM="ui-auto.am"
8894 rm -v -f "${UI_AUTO_AM}"
8895 AC_SUBST_FILE(UI_AUTO_AM)
8896
8897 UI_ADD_AM([
8898 # These are the generic ui-auto rules rules (add these to your Makefile.am appropriately to *-local targets).
8899 .PHONY: ui-auto-all ui-auto-clean ui-auto-dist ui-auto-distclean ui-auto-install-data ui-auto-install-exec ui-auto-uninstall
8900
8901 ui-auto-am-clean:
8902 rm -f "${UI_AUTO_AM}"
8903
8904 .PHONY: ui-auto-am-clean
8905
8906 # Set dependencies for generic rules
8907 ui-auto-distclean: ui-auto-am-clean
8908 ])
8909
8910 dnl
8911 dnl PACKAGE-version script (mandatory)
8912 dnl
8913 S_NAME="${PACKAGE_NAME}-version"
8914 S_PATH="${TOOLDIR}/${S_NAME}"
8915 V_MAJOR=`echo ${PACKAGE_VERSION} | cut -d'.' -f1`
8916 V_MINOR=`echo ${PACKAGE_VERSION} | cut -d'.' -f2`
8917 V_PATCH=`echo ${PACKAGE_VERSION} | cut -d'.' -f3`
8918
8919 mkdir -p `dirname "${S_PATH}"`
8920 cat <<EOF >"${S_PATH}"
8921 #!/bin/sh -e
8922 echo "UI_PACKAGE=\"${PACKAGE_NAME}\""
8923 echo "UI_VERSION=\"${PACKAGE_VERSION}\""
8924 echo "UI_VERSION_MAJOR=\"${V_MAJOR}\""
8925 echo "UI_VERSION_MINOR=\"${V_MINOR}\""
8926 echo "UI_VERSION_PATCH=\"${V_PATCH}\""
8927 EOF
8928
8929 if test -n "${SO_VERSION}"; then
8930 LV_IF=`echo ${SO_VERSION} | cut -d':' -f1`
8931 LV_REV=`echo ${SO_VERSION} | cut -d':' -f2`
8932 LV_AGE=`echo ${SO_VERSION} | cut -d':' -f3`
8933 LV_MAJOR=$[[LV_IF - LV_AGE]]
8934 LV_MINOR=${LV_AGE}
8935 LV_PATCH=${LV_REV}
8936 SO_VERSION_SYS="${LV_MAJOR}.${LV_MINOR}.${LV_PATCH}"
8937
8938 cat <<EOF >>"${S_PATH}"
8939 echo "UI_SO_VERSION=\"${SO_VERSION_SYS}\""
8940 echo "UI_SO_VERSION_MAJOR=\"${LV_MAJOR}\""
8941 echo "UI_SO_VERSION_MINOR=\"${LV_MINOR}\""
8942 echo "UI_SO_VERSION_PATCH=\"${LV_PATCH}\""
8943 EOF
8944 fi
8945 chmod +x "${S_PATH}"
8946
8947 dnl Man page for version script
8948 S_NAME_CAP=`echo "${S_NAME}" | tr "[[:lower:]]" "[[:upper:]]"`
8949 cat <<EOF >"${S_PATH}.1"
8950 .TH ${S_NAME_CAP} "1"
8951 .SH NAME
8952 ${S_NAME} \- Print parsable version information for development package ${PACKAGE_NAME}.
8953 .SH SYNOPSIS
8954 .PP
8955 .B ${S_NAME}
8956 .SH DESCRIPTION
8957 .PP
8958 Prints version information for installed development package
8959 ${PACKAGE_NAME} in a parsable way.
8960
8961 This is intended to be used by automatic version checks of build systems.
8962 .SH AUTHOR
8963 Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`.
8964 EOF
8965
8966 dnl Automake rules for installation && distclean
8967 UI_ADD_AM([
8968 ui-version-script-install:
8969 install -d -m755 \"\$(DESTDIR)\$(bindir)\"
8970 install -m755 \"${S_PATH}\" \"\$(DESTDIR)\$(bindir)\"
8971 install -d -m755 \"\$(DESTDIR)\$(mandir)/man1\"
8972 install -m644 \"${S_PATH}.1\" \"\$(DESTDIR)\$(mandir)/man1\"
8973
8974 ui-version-script-uninstall:
8975 rm -f \"\$(DESTDIR)\$(bindir)/${S_NAME}\" \"\$(DESTDIR)\$(mandir)/man1/${S_NAME}.1\"
8976
8977 ui-version-script-clean:
8978 rm -f "${S_PATH}" "${S_PATH}.1"
8979
8980 .PHONY: ui-version-script-install ui-version-script-uninstall ui-version-script-clean
8981
8982 # Set dependencies for generic rules
8983 ui-auto-distclean: ui-version-script-clean
8984 ui-auto-install-exec: ui-version-script-install
8985 ui-auto-uninstall: ui-version-script-uninstall
8986 ])
8987
8988 dnl
8989 dnl version.h include (only when lib)
8990 dnl
8991 if test -n "${SO_VERSION}"; then
8992 I_NAME="version.h"
8993 I_PATH="${INCDIR}/${I_NAME}"
8994 HEADER_NAME=`echo "${PACKAGE_NAME}" | tr - _ | tr [a-z] [A-Z]`
8995 mkdir -p `dirname "${I_PATH}"`
8996 cat <<EOF >"${I_PATH}"
8997 #ifndef ${HEADER_NAME}_VERSION_H
8998 #define ${HEADER_NAME}_VERSION_H
8999
9000 /** @{ @brief ui-auto'mated version macros. */
9001 #define ${HEADER_NAME}_VERSION "${PACKAGE_VERSION}"
9002 #define ${HEADER_NAME}_VERSION_MAJOR ${V_MAJOR}
9003 #define ${HEADER_NAME}_VERSION_MINOR ${V_MINOR}
9004 #define ${HEADER_NAME}_VERSION_PATCH ${V_PATCH}
9005 /** @} */
9006 /** @{ @brief ui-auto'mated library version support. */
9007 #define ${HEADER_NAME}_LIBVERSION "${SO_VERSION_SYS}"
9008 #define ${HEADER_NAME}_LIBVERSION_MAJOR ${LV_MAJOR}
9009 #define ${HEADER_NAME}_LIBVERSION_MINOR ${LV_MINOR}
9010 #define ${HEADER_NAME}_LIBVERSION_PATCH ${LV_PATCH}
9011 /** @} */
9012 #endif
9013 EOF
9014 dnl Automake rules for installation && distclean
9015 UI_ADD_AM([
9016 ui-version-header-install:
9017 install -d -m755 \"\$(DESTDIR)\$(incdir)\"
9018 install -m644 \"${I_PATH}\" \"\$(DESTDIR)\$(incdir)\"
9019
9020 ui-version-header-uninstall:
9021 rm -f \"\$(DESTDIR)\$(incdir)/${I_NAME}\"
9022
9023 ui-version-header-clean:
9024 rm -f "${I_PATH}"
9025
9026 .PHONY: ui-version-header-install ui-version-header-uninstall ui-version-header-clean
9027
9028 # Set dependencies for generic rules
9029 ui-auto-distclean: ui-version-header-clean
9030 ui-auto-install-exec: ui-version-header-install
9031 ui-auto-uninstall: ui-version-header-uninstall
9032 ])
9033 fi
9034 ])
9035
9036 dnl Check for ui-auto enabled project.
9037 dnl
9038 dnl Usage:
9039 dnl UI_CHECK(key, package, MAJOR,MINOR,PATCH, LMAJOR,LMINOR,LPATCH)
9040 dnl
9041 dnl key unique key for this test
9042 dnl package package name (script name searched for is PACKAGE-version)
9043 dnl MAJOR (optional) required major version number of library
9044 dnl MINOR (optional) required minor version number of library
9045 dnl PATCH (optional) required patchlevel of library
9046 dnl LMAJOR (optional) required major version number of library interface
9047 dnl LMINOR (optional) required minor version number of library interface
9048 dnl LPATCH (optional) required patchlevel of library interface
9049 dnl
9050 dnl All version numbers default to 0 if not specified.
9051 dnl
9052 AC_DEFUN([UI_CHECK], [
9053 ifelse($3, , MAJOR=0, MAJOR=$3)
9054 ifelse($4, , MINOR=0, MINOR=$4)
9055 ifelse($5, , PATCH=0, PATCH=$5)
9056 ifelse($6, , LMAJOR=0, LMAJOR=$6)
9057 ifelse($7, , LMINOR=0, LMINOR=$7)
9058 ifelse($8, , LPATCH=0, LPATCH=$8)
9059
9060 dnl Check and evaluate version script
9061 AC_PATH_PROG([$1], [$2-version])
9062 test x"$[$1]" = x && AC_MSG_ERROR([$2-version not found in PATH])
9063
9064 dnl Reset variables
9065 UI_PACKAGE=""
9066 UI_VERSION=""
9067 UI_VERSION_MAJOR=""
9068 UI_VERSION_MINOR=""
9069 UI_VERSION_PATCH=""
9070 UI_SO_VERSION=""
9071 UI_SO_VERSION_MAJOR=""
9072 UI_SO_VERSION_MINOR=""
9073 UI_SO_VERSION_PATCH=""
9074
9075 dnl Set variables from PACKAGE-version script
9076 eval `[$2-version]`
9077 dnl Sanity check
9078 test x"${UI_PACKAGE}" = x[$2] || AC_MSG_ERROR([$2-version found in PATH seems corrupt; from old unstable ui-auto version? ])
9079
9080 dnl Check package version
9081 AC_MSG_CHECKING([package $2, version ${MAJOR}.${MINOR}.${PATCH} or later])
9082
9083 for TYPE in MAJOR MINOR PATCH; do
9084 INSTALLED_VERSION="UI_VERSION_${TYPE}"
9085 NEEDED_VERSION="${TYPE}"
9086 if test ${!INSTALLED_VERSION} -lt ${!NEEDED_VERSION}; then
9087 AC_MSG_ERROR([${UI_VERSION} is too old.])
9088 elif test ${!INSTALLED_VERSION} -gt ${!NEEDED_VERSION}; then
9089 break
9090 fi
9091 done
9092 AC_MSG_RESULT([yes (version ${UI_VERSION})])
9093
9094 dnl Check library version
9095 if test -n "${UI_SO_VERSION}"; then
9096 AC_MSG_CHECKING([library from ${UI_PACKAGE}, version ${LMAJOR}.${LMINOR}.${LPATCH} or later])
9097 for TYPE in MAJOR MINOR PATCH; do
9098 INSTALLED_VERSION="UI_SO_VERSION_${TYPE}"
9099 NEEDED_VERSION="L${TYPE}"
9100 if test ${!INSTALLED_VERSION} -lt ${!NEEDED_VERSION}; then
9101 AC_MSG_ERROR([${UI_SO_VERSION} is too old.])
9102 elif test ${!INSTALLED_VERSION} -gt ${!NEEDED_VERSION}; then
9103 break
9104 fi
9105 done
9106 AC_MSG_RESULT([yes (lib version ${UI_SO_VERSION})])
9107 fi
9108 ])
9109
9110 dnl UI common autotools helper macros
9111
9112 dnl UI_MSG_MISSING(VALUE, WHAT [,"warn"])
9113 dnl
9114 dnl If VALUE is empty or "no, exit with error message that suport
9115 dnl for WHAT is missing, or continue with a warning if "warn" is given.
9116 AC_DEFUN([UI_MSG_MISSING],
9117 [
9118 if test x"[$1]" = "x" -o x"[$1]" = "xno"; then
9119 if test x"[$3]" = "xwarn"; then
9120 AC_MSG_WARN([Missing support for: $2.])
9121 else
9122 AC_MSG_ERROR([Missing support for: $2.])
9123 fi
9124 fi
9125 ])
9126
9127 dnl Simplified and enhanced version of AC_PATH_PROG
9128 dnl
9129 dnl UI_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, "warn"])
9130 dnl
9131 dnl Check for program with AC_PATH_PROG. If program is not found, exit with
9132 dnl error unless "warn" option is given.
9133 dnl
9134 AC_DEFUN([UI_PATH_PROG],
9135 [
9136 AC_PATH_PROG([$1], [$2])
9137 UI_MSG_MISSING([$$1], [Program $2], [$3])
9138 ])
9139
9140 dnl Echo to file
9141 dnl
9142 dnl UI_PRINT_FILE(FILENAME, TEXT)
9143 AC_DEFUN([UI_PRINT_FILE],
9144 [
9145 echo -n "$2" >"$1"
9146 ])
9147
9148 dnl Add automake source
9149 dnl
9150 dnl UI_ADD_AM(makefile code)
9151 AC_DEFUN([UI_ADD_AM],
9152 [
9153 echo -n "$1" >>"ui-auto.am"
9154 ])
9155
9156 dnl ui-auto check for C++ compilers
9157 dnl
9158 dnl Calls AC_PROG_CXX, and then checks for some compilers/versions we must not use.
9159 dnl
9160 dnl UI_ADD_AM(makefile code)
9161 AC_DEFUN([UI_PROG_CXX],
9162 [
9163 AC_PROG_CXX
9164 if test "x$GXX" = "xyes"; then
9165 if ${CXX} --version | grep "2\.9[[]0123456789[]]\..*"; then
9166 AC_MSG_ERROR([We cannot use g++-2.9*; pls use at least g++-3.0.])
9167 fi
9168 fi
9169 ])
9170
9171 # Clean distribution dir from "well-known" cruft.
9172 #
9173 # Usage configure.ac: UI_DISTDIR_CRUFT
9174 # Usage Makefile.am : dist-hook: ui-auto-dist
9175 AC_DEFUN([UI_DISTDIR_CRUFT],
9176 [
9177 UI_ADD_AM([
9178 ui-distdir-cruft:
9179 test ! -z \$(distdir)
9180 rm -rf \`find \$(distdir) -type d -name "CVS" -o -name ".svn" -o -name ".git"\`
9181 rm -f \`find \$(distdir) -type f -name ".cvsignore" -or -name CVSDUMMY -or -name '*~' -or -name '#*#' -or -name '.#*'\`
9182
9183 .PHONY: ui-distdir-cruft
9184
9185 # Set dependencies for generic rules
9186 ui-auto-dist: ui-distdir-cruft
9187 ])
9188 ])
9189
9190 AC_DEFUN([UI_DOXYGEN],
9191 [
9192 AC_ARG_ENABLE(ui-doxygen,[
9193 --disable-ui-doxygen Disable generation of doxygen documentation.],
9194 [
9195 UI_DOXYGEN_ENABLED="${enableval}"
9196 ])
9197
9198 UI_DOXYGEN_TARGETS='def html latex man rtf xml'
9199 if test "$UI_DOXYGEN_ENABLED" = "no"; then
9200 UI_DOXYGEN_MAKE="mkdir autodoc && for d in ${UI_DOXYGEN_TARGETS}; do echo 'Doxygen documentation was disabled by configure option.' >autodoc/\$\${d}; done"
9201 else
9202 UI_PATH_PROG(DOXYGEN, doxygen)
9203 UI_PATH_PROG(PERL, perl)
9204 UI_DOXYGEN_MAKE='$(DOXYGEN) Doxyfile'
9205 fi
9206
9207 UI_ADD_AM([
9208
9209 ui-doxygen:
9210 rm -rf autodoc && ${UI_DOXYGEN_MAKE}
9211 touch ui-doxygen
9212
9213 ui-doxygen-clean:
9214 rm -rf autodoc ui-doxygen
9215
9216 ui-doxygen-install: ui-doxygen
9217 install -d \$(DESTDIR)\$(docdir) && \
9218 chmod -R u=rwx,g=rx,o=rx \$(DESTDIR)\$(docdir) && \
9219 cp -a autodoc/* \$(DESTDIR)\$(docdir)
9220
9221 ui-doxygen-uninstall:
9222 for d in ${UI_DOXYGEN_TARGETS}; do \
9223 chmod -R u+wx \$(DESTDIR)\$(docdir)/\$\${d} 2>/dev/null || true ; \
9224 rm -rf \$(DESTDIR)\$(docdir)/\$\${d}; \
9225 done
9226
9227 .PHONY: ui-doxygen-clean ui-doxygen-install ui-doxygen-uninstall
9228
9229 ui-auto-all: ui-doxygen
9230 ui-auto-clean: ui-doxygen-clean
9231 ui-auto-install-data: ui-doxygen-install
9232 ui-auto-uninstall: ui-doxygen-uninstall
9233
9234 ])
9235 ])
9236
9237 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
9238 #
9239 # This file is free software; the Free Software Foundation
9240 # gives unlimited permission to copy and/or distribute it,
9241 # with or without modifications, as long as this notice is preserved.
9242
9243 # AM_AUTOMAKE_VERSION(VERSION)
9244 # ----------------------------
9245 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9246 # generated from the m4 files accompanying Automake X.Y.
9247 # (This private macro should not be called outside this file.)
9248 AC_DEFUN([AM_AUTOMAKE_VERSION],
9249 [am__api_version='1.14'
9250 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9251 dnl require some minimum version. Point them to the right macro.
9252 m4_if([$1], [1.14.1], [],
9253 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9254 ])
9255
9256 # _AM_AUTOCONF_VERSION(VERSION)
9257 # -----------------------------
9258 # aclocal traces this macro to find the Autoconf version.
9259 # This is a private macro too. Using m4_define simplifies
9260 # the logic in aclocal, which can simply ignore this definition.
9261 m4_define([_AM_AUTOCONF_VERSION], [])
9262
9263 # AM_SET_CURRENT_AUTOMAKE_VERSION
9264 # -------------------------------
9265 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9266 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9267 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9268 [AM_AUTOMAKE_VERSION([1.14.1])dnl
9269 m4_ifndef([AC_AUTOCONF_VERSION],
9270 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9271 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9272
9273 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
9274
9275 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
9276 #
9277 # This file is free software; the Free Software Foundation
9278 # gives unlimited permission to copy and/or distribute it,
9279 # with or without modifications, as long as this notice is preserved.
9280
9281 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9282 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
9283 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
9284 #
9285 # Of course, Automake must honor this variable whenever it calls a
9286 # tool from the auxiliary directory. The problem is that $srcdir (and
9287 # therefore $ac_aux_dir as well) can be either absolute or relative,
9288 # depending on how configure is run. This is pretty annoying, since
9289 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9290 # source directory, any form will work fine, but in subdirectories a
9291 # relative path needs to be adjusted first.
9292 #
9293 # $ac_aux_dir/missing
9294 # fails when called from a subdirectory if $ac_aux_dir is relative
9295 # $top_srcdir/$ac_aux_dir/missing
9296 # fails if $ac_aux_dir is absolute,
9297 # fails when called from a subdirectory in a VPATH build with
9298 # a relative $ac_aux_dir
9299 #
9300 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9301 # are both prefixed by $srcdir. In an in-source build this is usually
9302 # harmless because $srcdir is '.', but things will broke when you
9303 # start a VPATH build or use an absolute $srcdir.
9304 #
9305 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9306 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9307 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9308 # and then we would define $MISSING as
9309 # MISSING="\${SHELL} $am_aux_dir/missing"
9310 # This will work as long as MISSING is not called from configure, because
9311 # unfortunately $(top_srcdir) has no meaning in configure.
9312 # However there are other variables, like CC, which are often used in
9313 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9314 #
9315 # Another solution, used here, is to always expand $ac_aux_dir to an
9316 # absolute PATH. The drawback is that using absolute paths prevent a
9317 # configured tree to be moved without reconfiguration.
9318
9319 AC_DEFUN([AM_AUX_DIR_EXPAND],
9320 [dnl Rely on autoconf to set up CDPATH properly.
9321 AC_PREREQ([2.50])dnl
9322 # expand $ac_aux_dir to an absolute path
9323 am_aux_dir=`cd $ac_aux_dir && pwd`
9324 ])
9325
9326 # AM_CONDITIONAL -*- Autoconf -*-
9327
9328 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
9329 #
9330 # This file is free software; the Free Software Foundation
9331 # gives unlimited permission to copy and/or distribute it,
9332 # with or without modifications, as long as this notice is preserved.
9333
9334 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9335 # -------------------------------------
9336 # Define a conditional.
9337 AC_DEFUN([AM_CONDITIONAL],
9338 [AC_PREREQ([2.52])dnl
9339 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9340 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9341 AC_SUBST([$1_TRUE])dnl
9342 AC_SUBST([$1_FALSE])dnl
9343 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9344 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9345 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9346 if $2; then
9347 $1_TRUE=
9348 $1_FALSE='#'
9349 else
9350 $1_TRUE='#'
9351 $1_FALSE=
9352 fi
9353 AC_CONFIG_COMMANDS_PRE(
9354 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9355 AC_MSG_ERROR([[conditional "$1" was never defined.
9356 Usually this means the macro was only invoked conditionally.]])
9357 fi])])
9358
9359 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
9360 #
9361 # This file is free software; the Free Software Foundation
9362 # gives unlimited permission to copy and/or distribute it,
9363 # with or without modifications, as long as this notice is preserved.
9364
9365
9366 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
9367 # written in clear, in which case automake, when reading aclocal.m4,
9368 # will think it sees a *use*, and therefore will trigger all it's
9369 # C support machinery. Also note that it means that autoscan, seeing
9370 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9371
9372
9373 # _AM_DEPENDENCIES(NAME)
9374 # ----------------------
9375 # See how the compiler implements dependency checking.
9376 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
9377 # We try a few techniques and use that to set a single cache variable.
9378 #
9379 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9380 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9381 # dependency, and given that the user is not expected to run this macro,
9382 # just rely on AC_PROG_CC.
9383 AC_DEFUN([_AM_DEPENDENCIES],
9384 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9385 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9386 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9387 AC_REQUIRE([AM_DEP_TRACK])dnl
9388
9389 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
9390 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
9391 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9392 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
9393 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
9394 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9395 [depcc="$$1" am_compiler_list=])
9396
9397 AC_CACHE_CHECK([dependency style of $depcc],
9398 [am_cv_$1_dependencies_compiler_type],
9399 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9400 # We make a subdir and do the tests there. Otherwise we can end up
9401 # making bogus files that we don't know about and never remove. For
9402 # instance it was reported that on HP-UX the gcc test will end up
9403 # making a dummy file named 'D' -- because '-MD' means "put the output
9404 # in D".
9405 rm -rf conftest.dir
9406 mkdir conftest.dir
9407 # Copy depcomp to subdir because otherwise we won't find it if we're
9408 # using a relative directory.
9409 cp "$am_depcomp" conftest.dir
9410 cd conftest.dir
9411 # We will build objects and dependencies in a subdirectory because
9412 # it helps to detect inapplicable dependency modes. For instance
9413 # both Tru64's cc and ICC support -MD to output dependencies as a
9414 # side effect of compilation, but ICC will put the dependencies in
9415 # the current directory while Tru64 will put them in the object
9416 # directory.
9417 mkdir sub
9418
9419 am_cv_$1_dependencies_compiler_type=none
9420 if test "$am_compiler_list" = ""; then
9421 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9422 fi
9423 am__universal=false
9424 m4_case([$1], [CC],
9425 [case " $depcc " in #(
9426 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9427 esac],
9428 [CXX],
9429 [case " $depcc " in #(
9430 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9431 esac])
9432
9433 for depmode in $am_compiler_list; do
9434 # Setup a source with many dependencies, because some compilers
9435 # like to wrap large dependency lists on column 80 (with \), and
9436 # we should not choose a depcomp mode which is confused by this.
9437 #
9438 # We need to recreate these files for each test, as the compiler may
9439 # overwrite some of them when testing with obscure command lines.
9440 # This happens at least with the AIX C compiler.
9441 : > sub/conftest.c
9442 for i in 1 2 3 4 5 6; do
9443 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9444 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9445 # Solaris 10 /bin/sh.
9446 echo '/* dummy */' > sub/conftst$i.h
9447 done
9448 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9449
9450 # We check with '-c' and '-o' for the sake of the "dashmstdout"
9451 # mode. It turns out that the SunPro C++ compiler does not properly
9452 # handle '-M -o', and we need to detect this. Also, some Intel
9453 # versions had trouble with output in subdirs.
9454 am__obj=sub/conftest.${OBJEXT-o}
9455 am__minus_obj="-o $am__obj"
9456 case $depmode in
9457 gcc)
9458 # This depmode causes a compiler race in universal mode.
9459 test "$am__universal" = false || continue
9460 ;;
9461 nosideeffect)
9462 # After this tag, mechanisms are not by side-effect, so they'll
9463 # only be used when explicitly requested.
9464 if test "x$enable_dependency_tracking" = xyes; then
9465 continue
9466 else
9467 break
9468 fi
9469 ;;
9470 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9471 # This compiler won't grok '-c -o', but also, the minuso test has
9472 # not run yet. These depmodes are late enough in the game, and
9473 # so weak that their functioning should not be impacted.
9474 am__obj=conftest.${OBJEXT-o}
9475 am__minus_obj=
9476 ;;
9477 none) break ;;
9478 esac
9479 if depmode=$depmode \
9480 source=sub/conftest.c object=$am__obj \
9481 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9482 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9483 >/dev/null 2>conftest.err &&
9484 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9485 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9486 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9487 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9488 # icc doesn't choke on unknown options, it will just issue warnings
9489 # or remarks (even with -Werror). So we grep stderr for any message
9490 # that says an option was ignored or not supported.
9491 # When given -MP, icc 7.0 and 7.1 complain thusly:
9492 # icc: Command line warning: ignoring option '-M'; no argument required
9493 # The diagnosis changed in icc 8.0:
9494 # icc: Command line remark: option '-MP' not supported
9495 if (grep 'ignoring option' conftest.err ||
9496 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9497 am_cv_$1_dependencies_compiler_type=$depmode
9498 break
9499 fi
9500 fi
9501 done
9502
9503 cd ..
9504 rm -rf conftest.dir
9505 else
9506 am_cv_$1_dependencies_compiler_type=none
9507 fi
9508 ])
9509 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9510 AM_CONDITIONAL([am__fastdep$1], [
9511 test "x$enable_dependency_tracking" != xno \
9512 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9513 ])
9514
9515
9516 # AM_SET_DEPDIR
9517 # -------------
9518 # Choose a directory name for dependency files.
9519 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
9520 AC_DEFUN([AM_SET_DEPDIR],
9521 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9522 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9523 ])
9524
9525
9526 # AM_DEP_TRACK
9527 # ------------
9528 AC_DEFUN([AM_DEP_TRACK],
9529 [AC_ARG_ENABLE([dependency-tracking], [dnl
9530 AS_HELP_STRING(
9531 [--enable-dependency-tracking],
9532 [do not reject slow dependency extractors])
9533 AS_HELP_STRING(
9534 [--disable-dependency-tracking],
9535 [speeds up one-time build])])
9536 if test "x$enable_dependency_tracking" != xno; then
9537 am_depcomp="$ac_aux_dir/depcomp"
9538 AMDEPBACKSLASH='\'
9539 am__nodep='_no'
9540 fi
9541 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9542 AC_SUBST([AMDEPBACKSLASH])dnl
9543 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9544 AC_SUBST([am__nodep])dnl
9545 _AM_SUBST_NOTMAKE([am__nodep])dnl
9546 ])
9547
9548 # Generate code to set up dependency tracking. -*- Autoconf -*-
9549
9550 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
9551 #
9552 # This file is free software; the Free Software Foundation
9553 # gives unlimited permission to copy and/or distribute it,
9554 # with or without modifications, as long as this notice is preserved.
9555
9556
9557 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9558 # ------------------------------
9559 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9560 [{
9561 # Older Autoconf quotes --file arguments for eval, but not when files
9562 # are listed without --file. Let's play safe and only enable the eval
9563 # if we detect the quoting.
9564 case $CONFIG_FILES in
9565 *\'*) eval set x "$CONFIG_FILES" ;;
9566 *) set x $CONFIG_FILES ;;
9567 esac
9568 shift
9569 for mf
9570 do
9571 # Strip MF so we end up with the name of the file.
9572 mf=`echo "$mf" | sed -e 's/:.*$//'`
9573 # Check whether this is an Automake generated Makefile or not.
9574 # We used to match only the files named 'Makefile.in', but
9575 # some people rename them; so instead we look at the file content.
9576 # Grep'ing the first line is not enough: some people post-process
9577 # each Makefile.in and add a new line on top of each file to say so.
9578 # Grep'ing the whole file is not good either: AIX grep has a line
9579 # limit of 2048, but all sed's we know have understand at least 4000.
9580 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9581 dirpart=`AS_DIRNAME("$mf")`
9582 else
9583 continue
9584 fi
9585 # Extract the definition of DEPDIR, am__include, and am__quote
9586 # from the Makefile without running 'make'.
9587 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9588 test -z "$DEPDIR" && continue
9589 am__include=`sed -n 's/^am__include = //p' < "$mf"`
9590 test -z "$am__include" && continue
9591 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9592 # Find all dependency output files, they are included files with
9593 # $(DEPDIR) in their names. We invoke sed twice because it is the
9594 # simplest approach to changing $(DEPDIR) to its actual value in the
9595 # expansion.
9596 for file in `sed -n "
9597 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9598 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9599 # Make sure the directory exists.
9600 test -f "$dirpart/$file" && continue
9601 fdir=`AS_DIRNAME(["$file"])`
9602 AS_MKDIR_P([$dirpart/$fdir])
9603 # echo "creating $dirpart/$file"
9604 echo '# dummy' > "$dirpart/$file"
9605 done
9606 done
9607 }
9608 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9609
9610
9611 # AM_OUTPUT_DEPENDENCY_COMMANDS
9612 # -----------------------------
9613 # This macro should only be invoked once -- use via AC_REQUIRE.
9614 #
9615 # This code is only required when automatic dependency tracking
9616 # is enabled. FIXME. This creates each '.P' file that we will
9617 # need in order to bootstrap the dependency handling code.
9618 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9619 [AC_CONFIG_COMMANDS([depfiles],
9620 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9621 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9622 ])
9623
9624 # Do all the work for Automake. -*- Autoconf -*-
9625
9626 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
9627 #
9628 # This file is free software; the Free Software Foundation
9629 # gives unlimited permission to copy and/or distribute it,
9630 # with or without modifications, as long as this notice is preserved.
9631
9632 # This macro actually does too much. Some checks are only needed if
9633 # your package does certain things. But this isn't really a big deal.
9634
9635 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
9636 m4_define([AC_PROG_CC],
9637 m4_defn([AC_PROG_CC])
9638 [_AM_PROG_CC_C_O
9639 ])
9640
9641 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9642 # AM_INIT_AUTOMAKE([OPTIONS])
9643 # -----------------------------------------------
9644 # The call with PACKAGE and VERSION arguments is the old style
9645 # call (pre autoconf-2.50), which is being phased out. PACKAGE
9646 # and VERSION should now be passed to AC_INIT and removed from
9647 # the call to AM_INIT_AUTOMAKE.
9648 # We support both call styles for the transition. After
9649 # the next Automake release, Autoconf can make the AC_INIT
9650 # arguments mandatory, and then we can depend on a new Autoconf
9651 # release and drop the old call support.
9652 AC_DEFUN([AM_INIT_AUTOMAKE],
9653 [AC_PREREQ([2.65])dnl
9654 dnl Autoconf wants to disallow AM_ names. We explicitly allow
9655 dnl the ones we care about.
9656 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9657 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9658 AC_REQUIRE([AC_PROG_INSTALL])dnl
9659 if test "`cd $srcdir && pwd`" != "`pwd`"; then
9660 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9661 # is not polluted with repeated "-I."
9662 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9663 # test to see if srcdir already configured
9664 if test -f $srcdir/config.status; then
9665 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9666 fi
9667 fi
9668
9669 # test whether we have cygpath
9670 if test -z "$CYGPATH_W"; then
9671 if (cygpath --version) >/dev/null 2>/dev/null; then
9672 CYGPATH_W='cygpath -w'
9673 else
9674 CYGPATH_W=echo
9675 fi
9676 fi
9677 AC_SUBST([CYGPATH_W])
9678
9679 # Define the identity of the package.
9680 dnl Distinguish between old-style and new-style calls.
9681 m4_ifval([$2],
9682 [AC_DIAGNOSE([obsolete],
9683 [$0: two- and three-arguments forms are deprecated.])
9684 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9685 AC_SUBST([PACKAGE], [$1])dnl
9686 AC_SUBST([VERSION], [$2])],
9687 [_AM_SET_OPTIONS([$1])dnl
9688 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9689 m4_if(
9690 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
9691 [ok:ok],,
9692 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9693 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9694 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9695
9696 _AM_IF_OPTION([no-define],,
9697 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
9698 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
9699
9700 # Some tools Automake needs.
9701 AC_REQUIRE([AM_SANITY_CHECK])dnl
9702 AC_REQUIRE([AC_ARG_PROGRAM])dnl
9703 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
9704 AM_MISSING_PROG([AUTOCONF], [autoconf])
9705 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
9706 AM_MISSING_PROG([AUTOHEADER], [autoheader])
9707 AM_MISSING_PROG([MAKEINFO], [makeinfo])
9708 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9709 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9710 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9711 # For better backward compatibility. To be removed once Automake 1.9.x
9712 # dies out for good. For more background, see:
9713 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
9714 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
9715 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
9716 # We need awk for the "check" target. The system "awk" is bad on
9717 # some platforms.
9718 AC_REQUIRE([AC_PROG_AWK])dnl
9719 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9720 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9721 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9722 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9723 [_AM_PROG_TAR([v7])])])
9724 _AM_IF_OPTION([no-dependencies],,
9725 [AC_PROVIDE_IFELSE([AC_PROG_CC],
9726 [_AM_DEPENDENCIES([CC])],
9727 [m4_define([AC_PROG_CC],
9728 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
9729 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9730 [_AM_DEPENDENCIES([CXX])],
9731 [m4_define([AC_PROG_CXX],
9732 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
9733 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9734 [_AM_DEPENDENCIES([OBJC])],
9735 [m4_define([AC_PROG_OBJC],
9736 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
9737 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
9738 [_AM_DEPENDENCIES([OBJCXX])],
9739 [m4_define([AC_PROG_OBJCXX],
9740 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
9741 ])
9742 AC_REQUIRE([AM_SILENT_RULES])dnl
9743 dnl The testsuite driver may need to know about EXEEXT, so add the
9744 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
9745 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
9746 AC_CONFIG_COMMANDS_PRE(dnl
9747 [m4_provide_if([_AM_COMPILER_EXEEXT],
9748 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9749
9750 # POSIX will say in a future version that running "rm -f" with no argument
9751 # is OK; and we want to be able to make that assumption in our Makefile
9752 # recipes. So use an aggressive probe to check that the usage we want is
9753 # actually supported "in the wild" to an acceptable degree.
9754 # See automake bug#10828.
9755 # To make any issue more visible, cause the running configure to be aborted
9756 # by default if the 'rm' program in use doesn't match our expectations; the
9757 # user can still override this though.
9758 if rm -f && rm -fr && rm -rf; then : OK; else
9759 cat >&2 <<'END'
9760 Oops!
9761
9762 Your 'rm' program seems unable to run without file operands specified
9763 on the command line, even when the '-f' option is present. This is contrary
9764 to the behaviour of most rm programs out there, and not conforming with
9765 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
9766
9767 Please tell bug-automake@gnu.org about your system, including the value
9768 of your $PATH and any error possibly output before this message. This
9769 can help us improve future automake versions.
9770
9771 END
9772 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
9773 echo 'Configuration will proceed anyway, since you have set the' >&2
9774 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
9775 echo >&2
9776 else
9777 cat >&2 <<'END'
9778 Aborting the configuration process, to ensure you take notice of the issue.
9779
9780 You can download and install GNU coreutils to get an 'rm' implementation
9781 that behaves properly: <http://www.gnu.org/software/coreutils/>.
9782
9783 If you want to complete the configuration process using your problematic
9784 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
9785 to "yes", and re-run configure.
9786
9787 END
9788 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
9789 fi
9790 fi
9791 ])
9792
9793 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9794 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9795 dnl mangled by Autoconf and run in a shell conditional statement.
9796 m4_define([_AC_COMPILER_EXEEXT],
9797 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9798
9799 # When config.status generates a header, we must update the stamp-h file.
9800 # This file resides in the same directory as the config header
9801 # that is generated. The stamp files are numbered to have different names.
9802
9803 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9804 # loop where config.status creates the headers, so we can generate
9805 # our stamp files there.
9806 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9807 [# Compute $1's index in $config_headers.
9808 _am_arg=$1
9809 _am_stamp_count=1
9810 for _am_header in $config_headers :; do
9811 case $_am_header in
9812 $_am_arg | $_am_arg:* )
9813 break ;;
9814 * )
9815 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9816 esac
9817 done
9818 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9819
9820 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
9821 #
9822 # This file is free software; the Free Software Foundation
9823 # gives unlimited permission to copy and/or distribute it,
9824 # with or without modifications, as long as this notice is preserved.
9825
9826 # AM_PROG_INSTALL_SH
9827 # ------------------
9828 # Define $install_sh.
9829 AC_DEFUN([AM_PROG_INSTALL_SH],
9830 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9831 if test x"${install_sh}" != xset; then
9832 case $am_aux_dir in
9833 *\ * | *\ *)
9834 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9835 *)
9836 install_sh="\${SHELL} $am_aux_dir/install-sh"
9837 esac
9838 fi
9839 AC_SUBST([install_sh])])
9840
9841 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
9842 #
9843 # This file is free software; the Free Software Foundation
9844 # gives unlimited permission to copy and/or distribute it,
9845 # with or without modifications, as long as this notice is preserved.
9846
9847 # Check whether the underlying file-system supports filenames
9848 # with a leading dot. For instance MS-DOS doesn't.
9849 AC_DEFUN([AM_SET_LEADING_DOT],
9850 [rm -rf .tst 2>/dev/null
9851 mkdir .tst 2>/dev/null
9852 if test -d .tst; then
9853 am__leading_dot=.
9854 else
9855 am__leading_dot=_
9856 fi
9857 rmdir .tst 2>/dev/null
9858 AC_SUBST([am__leading_dot])])
9859
9860 # Check to see how 'make' treats includes. -*- Autoconf -*-
9861
9862 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
9863 #
9864 # This file is free software; the Free Software Foundation
9865 # gives unlimited permission to copy and/or distribute it,
9866 # with or without modifications, as long as this notice is preserved.
9867
9868 # AM_MAKE_INCLUDE()
9869 # -----------------
9870 # Check to see how make treats includes.
9871 AC_DEFUN([AM_MAKE_INCLUDE],
9872 [am_make=${MAKE-make}
9873 cat > confinc << 'END'
9874 am__doit:
9875 @echo this is the am__doit target
9876 .PHONY: am__doit
9877 END
9878 # If we don't find an include directive, just comment out the code.
9879 AC_MSG_CHECKING([for style of include used by $am_make])
9880 am__include="#"
9881 am__quote=
9882 _am_result=none
9883 # First try GNU make style include.
9884 echo "include confinc" > confmf
9885 # Ignore all kinds of additional output from 'make'.
9886 case `$am_make -s -f confmf 2> /dev/null` in #(
9887 *the\ am__doit\ target*)
9888 am__include=include
9889 am__quote=
9890 _am_result=GNU
9891 ;;
9892 esac
9893 # Now try BSD make style include.
9894 if test "$am__include" = "#"; then
9895 echo '.include "confinc"' > confmf
9896 case `$am_make -s -f confmf 2> /dev/null` in #(
9897 *the\ am__doit\ target*)
9898 am__include=.include
9899 am__quote="\""
9900 _am_result=BSD
9901 ;;
9902 esac
9903 fi
9904 AC_SUBST([am__include])
9905 AC_SUBST([am__quote])
9906 AC_MSG_RESULT([$_am_result])
9907 rm -f confinc confmf
9908 ])
9909
9910 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9911
9912 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
9913 #
9914 # This file is free software; the Free Software Foundation
9915 # gives unlimited permission to copy and/or distribute it,
9916 # with or without modifications, as long as this notice is preserved.
9917
9918 # AM_MISSING_PROG(NAME, PROGRAM)
9919 # ------------------------------
9920 AC_DEFUN([AM_MISSING_PROG],
9921 [AC_REQUIRE([AM_MISSING_HAS_RUN])
9922 $1=${$1-"${am_missing_run}$2"}
9923 AC_SUBST($1)])
9924
9925 # AM_MISSING_HAS_RUN
9926 # ------------------
9927 # Define MISSING if not defined so far and test if it is modern enough.
9928 # If it is, set am_missing_run to use it, otherwise, to nothing.
9929 AC_DEFUN([AM_MISSING_HAS_RUN],
9930 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9931 AC_REQUIRE_AUX_FILE([missing])dnl
9932 if test x"${MISSING+set}" != xset; then
9933 case $am_aux_dir in
9934 *\ * | *\ *)
9935 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9936 *)
9937 MISSING="\${SHELL} $am_aux_dir/missing" ;;
9938 esac
9939 fi
9940 # Use eval to expand $SHELL
9941 if eval "$MISSING --is-lightweight"; then
9942 am_missing_run="$MISSING "
9943 else
9944 am_missing_run=
9945 AC_MSG_WARN(['missing' script is too old or missing])
9946 fi
9947 ])
9948
9949 # Helper functions for option handling. -*- Autoconf -*-
9950
9951 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
9952 #
9953 # This file is free software; the Free Software Foundation
9954 # gives unlimited permission to copy and/or distribute it,
9955 # with or without modifications, as long as this notice is preserved.
9956
9957 # _AM_MANGLE_OPTION(NAME)
9958 # -----------------------
9959 AC_DEFUN([_AM_MANGLE_OPTION],
9960 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9961
9962 # _AM_SET_OPTION(NAME)
9963 # --------------------
9964 # Set option NAME. Presently that only means defining a flag for this option.
9965 AC_DEFUN([_AM_SET_OPTION],
9966 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
9967
9968 # _AM_SET_OPTIONS(OPTIONS)
9969 # ------------------------
9970 # OPTIONS is a space-separated list of Automake options.
9971 AC_DEFUN([_AM_SET_OPTIONS],
9972 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9973
9974 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9975 # -------------------------------------------
9976 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9977 AC_DEFUN([_AM_IF_OPTION],
9978 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9979
9980 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
9981 #
9982 # This file is free software; the Free Software Foundation
9983 # gives unlimited permission to copy and/or distribute it,
9984 # with or without modifications, as long as this notice is preserved.
9985
9986 # _AM_PROG_CC_C_O
9987 # ---------------
9988 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
9989 # to automatically call this.
9990 AC_DEFUN([_AM_PROG_CC_C_O],
9991 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9992 AC_REQUIRE_AUX_FILE([compile])dnl
9993 AC_LANG_PUSH([C])dnl
9994 AC_CACHE_CHECK(
9995 [whether $CC understands -c and -o together],
9996 [am_cv_prog_cc_c_o],
9997 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
9998 # Make sure it works both with $CC and with simple cc.
9999 # Following AC_PROG_CC_C_O, we do the test twice because some
10000 # compilers refuse to overwrite an existing .o file with -o,
10001 # though they will create one.
10002 am_cv_prog_cc_c_o=yes
10003 for am_i in 1 2; do
10004 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10005 && test -f conftest2.$ac_objext; then
10006 : OK
10007 else
10008 am_cv_prog_cc_c_o=no
10009 break
10010 fi
10011 done
10012 rm -f core conftest*
10013 unset am_i])
10014 if test "$am_cv_prog_cc_c_o" != yes; then
10015 # Losing compiler, so override with the script.
10016 # FIXME: It is wrong to rewrite CC.
10017 # But if we don't then we get into trouble of one sort or another.
10018 # A longer-term fix would be to have automake use am__CC in this case,
10019 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10020 CC="$am_aux_dir/compile $CC"
10021 fi
10022 AC_LANG_POP([C])])
10023
10024 # For backward compatibility.
10025 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10026
10027 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10028 #
10029 # This file is free software; the Free Software Foundation
10030 # gives unlimited permission to copy and/or distribute it,
10031 # with or without modifications, as long as this notice is preserved.
10032
10033 # AM_RUN_LOG(COMMAND)
10034 # -------------------
10035 # Run COMMAND, save the exit status in ac_status, and log it.
10036 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10037 AC_DEFUN([AM_RUN_LOG],
10038 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10039 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10040 ac_status=$?
10041 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10042 (exit $ac_status); }])
10043
10044 # Check to make sure that the build environment is sane. -*- Autoconf -*-
10045
10046 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10047 #
10048 # This file is free software; the Free Software Foundation
10049 # gives unlimited permission to copy and/or distribute it,
10050 # with or without modifications, as long as this notice is preserved.
10051
10052 # AM_SANITY_CHECK
10053 # ---------------
10054 AC_DEFUN([AM_SANITY_CHECK],
10055 [AC_MSG_CHECKING([whether build environment is sane])
10056 # Reject unsafe characters in $srcdir or the absolute working directory
10057 # name. Accept space and tab only in the latter.
10058 am_lf='
10059 '
10060 case `pwd` in
10061 *[[\\\"\#\$\&\'\`$am_lf]]*)
10062 AC_MSG_ERROR([unsafe absolute working directory name]);;
10063 esac
10064 case $srcdir in
10065 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10066 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10067 esac
10068
10069 # Do 'set' in a subshell so we don't clobber the current shell's
10070 # arguments. Must try -L first in case configure is actually a
10071 # symlink; some systems play weird games with the mod time of symlinks
10072 # (eg FreeBSD returns the mod time of the symlink's containing
10073 # directory).
10074 if (
10075 am_has_slept=no
10076 for am_try in 1 2; do
10077 echo "timestamp, slept: $am_has_slept" > conftest.file
10078 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10079 if test "$[*]" = "X"; then
10080 # -L didn't work.
10081 set X `ls -t "$srcdir/configure" conftest.file`
10082 fi
10083 if test "$[*]" != "X $srcdir/configure conftest.file" \
10084 && test "$[*]" != "X conftest.file $srcdir/configure"; then
10085
10086 # If neither matched, then we have a broken ls. This can happen
10087 # if, for instance, CONFIG_SHELL is bash and it inherits a
10088 # broken ls alias from the environment. This has actually
10089 # happened. Such a system could not be considered "sane".
10090 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10091 alias in your environment])
10092 fi
10093 if test "$[2]" = conftest.file || test $am_try -eq 2; then
10094 break
10095 fi
10096 # Just in case.
10097 sleep 1
10098 am_has_slept=yes
10099 done
10100 test "$[2]" = conftest.file
10101 )
10102 then
10103 # Ok.
10104 :
10105 else
10106 AC_MSG_ERROR([newly created file is older than distributed files!
10107 Check your system clock])
10108 fi
10109 AC_MSG_RESULT([yes])
10110 # If we didn't sleep, we still need to ensure time stamps of config.status and
10111 # generated files are strictly newer.
10112 am_sleep_pid=
10113 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10114 ( sleep 1 ) &
10115 am_sleep_pid=$!
10116 fi
10117 AC_CONFIG_COMMANDS_PRE(
10118 [AC_MSG_CHECKING([that generated files are newer than configure])
10119 if test -n "$am_sleep_pid"; then
10120 # Hide warnings about reused PIDs.
10121 wait $am_sleep_pid 2>/dev/null
10122 fi
10123 AC_MSG_RESULT([done])])
10124 rm -f conftest.file
10125 ])
10126
10127 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
10128 #
10129 # This file is free software; the Free Software Foundation
10130 # gives unlimited permission to copy and/or distribute it,
10131 # with or without modifications, as long as this notice is preserved.
10132
10133 # AM_SILENT_RULES([DEFAULT])
10134 # --------------------------
10135 # Enable less verbose build rules; with the default set to DEFAULT
10136 # ("yes" being less verbose, "no" or empty being verbose).
10137 AC_DEFUN([AM_SILENT_RULES],
10138 [AC_ARG_ENABLE([silent-rules], [dnl
10139 AS_HELP_STRING(
10140 [--enable-silent-rules],
10141 [less verbose build output (undo: "make V=1")])
10142 AS_HELP_STRING(
10143 [--disable-silent-rules],
10144 [verbose build output (undo: "make V=0")])dnl
10145 ])
10146 case $enable_silent_rules in @%:@ (((
10147 yes) AM_DEFAULT_VERBOSITY=0;;
10148 no) AM_DEFAULT_VERBOSITY=1;;
10149 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10150 esac
10151 dnl
10152 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10153 dnl do not support nested variable expansions.
10154 dnl See automake bug#9928 and bug#10237.
10155 am_make=${MAKE-make}
10156 AC_CACHE_CHECK([whether $am_make supports nested variables],
10157 [am_cv_make_support_nested_variables],
10158 [if AS_ECHO([['TRUE=$(BAR$(V))
10159 BAR0=false
10160 BAR1=true
10161 V=1
10162 am__doit:
10163 @$(TRUE)
10164 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10165 am_cv_make_support_nested_variables=yes
10166 else
10167 am_cv_make_support_nested_variables=no
10168 fi])
10169 if test $am_cv_make_support_nested_variables = yes; then
10170 dnl Using '$V' instead of '$(V)' breaks IRIX make.
10171 AM_V='$(V)'
10172 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10173 else
10174 AM_V=$AM_DEFAULT_VERBOSITY
10175 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10176 fi
10177 AC_SUBST([AM_V])dnl
10178 AM_SUBST_NOTMAKE([AM_V])dnl
10179 AC_SUBST([AM_DEFAULT_V])dnl
10180 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10181 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10182 AM_BACKSLASH='\'
10183 AC_SUBST([AM_BACKSLASH])dnl
10184 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10185 ])
10186
10187 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10188 #
10189 # This file is free software; the Free Software Foundation
10190 # gives unlimited permission to copy and/or distribute it,
10191 # with or without modifications, as long as this notice is preserved.
10192
10193 # AM_PROG_INSTALL_STRIP
10194 # ---------------------
10195 # One issue with vendor 'install' (even GNU) is that you can't
10196 # specify the program used to strip binaries. This is especially
10197 # annoying in cross-compiling environments, where the build's strip
10198 # is unlikely to handle the host's binaries.
10199 # Fortunately install-sh will honor a STRIPPROG variable, so we
10200 # always use install-sh in "make install-strip", and initialize
10201 # STRIPPROG with the value of the STRIP variable (set by the user).
10202 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10203 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10204 # Installed binaries are usually stripped using 'strip' when the user
10205 # run "make install-strip". However 'strip' might not be the right
10206 # tool to use in cross-compilation environments, therefore Automake
10207 # will honor the 'STRIP' environment variable to overrule this program.
10208 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10209 if test "$cross_compiling" != no; then
10210 AC_CHECK_TOOL([STRIP], [strip], :)
10211 fi
10212 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10213 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10214
10215 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
10216 #
10217 # This file is free software; the Free Software Foundation
10218 # gives unlimited permission to copy and/or distribute it,
10219 # with or without modifications, as long as this notice is preserved.
10220
10221 # _AM_SUBST_NOTMAKE(VARIABLE)
10222 # ---------------------------
10223 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10224 # This macro is traced by Automake.
10225 AC_DEFUN([_AM_SUBST_NOTMAKE])
10226
10227 # AM_SUBST_NOTMAKE(VARIABLE)
10228 # --------------------------
10229 # Public sister of _AM_SUBST_NOTMAKE.
10230 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10231
10232 # Check how to create a tarball. -*- Autoconf -*-
10233
10234 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
10235 #
10236 # This file is free software; the Free Software Foundation
10237 # gives unlimited permission to copy and/or distribute it,
10238 # with or without modifications, as long as this notice is preserved.
10239
10240 # _AM_PROG_TAR(FORMAT)
10241 # --------------------
10242 # Check how to create a tarball in format FORMAT.
10243 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
10244 #
10245 # Substitute a variable $(am__tar) that is a command
10246 # writing to stdout a FORMAT-tarball containing the directory
10247 # $tardir.
10248 # tardir=directory && $(am__tar) > result.tar
10249 #
10250 # Substitute a variable $(am__untar) that extract such
10251 # a tarball read from stdin.
10252 # $(am__untar) < result.tar
10253 #
10254 AC_DEFUN([_AM_PROG_TAR],
10255 [# Always define AMTAR for backward compatibility. Yes, it's still used
10256 # in the wild :-( We should find a proper way to deprecate it ...
10257 AC_SUBST([AMTAR], ['$${TAR-tar}'])
10258
10259 # We'll loop over all known methods to create a tar archive until one works.
10260 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10261
10262 m4_if([$1], [v7],
10263 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10264
10265 [m4_case([$1],
10266 [ustar],
10267 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10268 # There is notably a 21 bits limit for the UID and the GID. In fact,
10269 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10270 # and bug#13588).
10271 am_max_uid=2097151 # 2^21 - 1
10272 am_max_gid=$am_max_uid
10273 # The $UID and $GID variables are not portable, so we need to resort
10274 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
10275 # below are definitely unexpected, so allow the users to see them
10276 # (that is, avoid stderr redirection).
10277 am_uid=`id -u || echo unknown`
10278 am_gid=`id -g || echo unknown`
10279 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10280 if test $am_uid -le $am_max_uid; then
10281 AC_MSG_RESULT([yes])
10282 else
10283 AC_MSG_RESULT([no])
10284 _am_tools=none
10285 fi
10286 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10287 if test $am_gid -le $am_max_gid; then
10288 AC_MSG_RESULT([yes])
10289 else
10290 AC_MSG_RESULT([no])
10291 _am_tools=none
10292 fi],
10293
10294 [pax],
10295 [],
10296
10297 [m4_fatal([Unknown tar format])])
10298
10299 AC_MSG_CHECKING([how to create a $1 tar archive])
10300
10301 # Go ahead even if we have the value already cached. We do so because we
10302 # need to set the values for the 'am__tar' and 'am__untar' variables.
10303 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10304
10305 for _am_tool in $_am_tools; do
10306 case $_am_tool in
10307 gnutar)
10308 for _am_tar in tar gnutar gtar; do
10309 AM_RUN_LOG([$_am_tar --version]) && break
10310 done
10311 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10312 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10313 am__untar="$_am_tar -xf -"
10314 ;;
10315 plaintar)
10316 # Must skip GNU tar: if it does not support --format= it doesn't create
10317 # ustar tarball either.
10318 (tar --version) >/dev/null 2>&1 && continue
10319 am__tar='tar chf - "$$tardir"'
10320 am__tar_='tar chf - "$tardir"'
10321 am__untar='tar xf -'
10322 ;;
10323 pax)
10324 am__tar='pax -L -x $1 -w "$$tardir"'
10325 am__tar_='pax -L -x $1 -w "$tardir"'
10326 am__untar='pax -r'
10327 ;;
10328 cpio)
10329 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10330 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10331 am__untar='cpio -i -H $1 -d'
10332 ;;
10333 none)
10334 am__tar=false
10335 am__tar_=false
10336 am__untar=false
10337 ;;
10338 esac
10339
10340 # If the value was cached, stop now. We just wanted to have am__tar
10341 # and am__untar set.
10342 test -n "${am_cv_prog_tar_$1}" && break
10343
10344 # tar/untar a dummy directory, and stop if the command works.
10345 rm -rf conftest.dir
10346 mkdir conftest.dir
10347 echo GrepMe > conftest.dir/file
10348 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10349 rm -rf conftest.dir
10350 if test -s conftest.tar; then
10351 AM_RUN_LOG([$am__untar <conftest.tar])
10352 AM_RUN_LOG([cat conftest.dir/file])
10353 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10354 fi
10355 done
10356 rm -rf conftest.dir
10357
10358 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10359 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10360
10361 AC_SUBST([am__tar])
10362 AC_SUBST([am__untar])
10363 ]) # _AM_PROG_TAR
10364
0 #! /bin/sh
1 # Wrapper for compilers which do not understand '-c -o'.
2
3 scriptversion=2012-10-14.11; # UTC
4
5 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
6 # Written by Tom Tromey <tromey@cygnus.com>.
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 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 nl='
31 '
32
33 # We need space, tab and new line, in precisely that order. Quoting is
34 # there to prevent tools from complaining about whitespace usage.
35 IFS=" "" $nl"
36
37 file_conv=
38
39 # func_file_conv build_file lazy
40 # Convert a $build file to $host form and store it in $file
41 # Currently only supports Windows hosts. If the determined conversion
42 # type is listed in (the comma separated) LAZY, no conversion will
43 # take place.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv/,$2, in
64 *,$file_conv,*)
65 ;;
66 mingw/*)
67 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
68 ;;
69 cygwin/*)
70 file=`cygpath -m "$file" || echo "$file"`
71 ;;
72 wine/*)
73 file=`winepath -w "$file" || echo "$file"`
74 ;;
75 esac
76 ;;
77 esac
78 }
79
80 # func_cl_dashL linkdir
81 # Make cl look for libraries in LINKDIR
82 func_cl_dashL ()
83 {
84 func_file_conv "$1"
85 if test -z "$lib_path"; then
86 lib_path=$file
87 else
88 lib_path="$lib_path;$file"
89 fi
90 linker_opts="$linker_opts -LIBPATH:$file"
91 }
92
93 # func_cl_dashl library
94 # Do a library search-path lookup for cl
95 func_cl_dashl ()
96 {
97 lib=$1
98 found=no
99 save_IFS=$IFS
100 IFS=';'
101 for dir in $lib_path $LIB
102 do
103 IFS=$save_IFS
104 if $shared && test -f "$dir/$lib.dll.lib"; then
105 found=yes
106 lib=$dir/$lib.dll.lib
107 break
108 fi
109 if test -f "$dir/$lib.lib"; then
110 found=yes
111 lib=$dir/$lib.lib
112 break
113 fi
114 if test -f "$dir/lib$lib.a"; then
115 found=yes
116 lib=$dir/lib$lib.a
117 break
118 fi
119 done
120 IFS=$save_IFS
121
122 if test "$found" != yes; then
123 lib=$lib.lib
124 fi
125 }
126
127 # func_cl_wrapper cl arg...
128 # Adjust compile command to suit cl
129 func_cl_wrapper ()
130 {
131 # Assume a capable shell
132 lib_path=
133 shared=:
134 linker_opts=
135 for arg
136 do
137 if test -n "$eat"; then
138 eat=
139 else
140 case $1 in
141 -o)
142 # configure might choose to run compile as 'compile cc -o foo foo.c'.
143 eat=1
144 case $2 in
145 *.o | *.[oO][bB][jJ])
146 func_file_conv "$2"
147 set x "$@" -Fo"$file"
148 shift
149 ;;
150 *)
151 func_file_conv "$2"
152 set x "$@" -Fe"$file"
153 shift
154 ;;
155 esac
156 ;;
157 -I)
158 eat=1
159 func_file_conv "$2" mingw
160 set x "$@" -I"$file"
161 shift
162 ;;
163 -I*)
164 func_file_conv "${1#-I}" mingw
165 set x "$@" -I"$file"
166 shift
167 ;;
168 -l)
169 eat=1
170 func_cl_dashl "$2"
171 set x "$@" "$lib"
172 shift
173 ;;
174 -l*)
175 func_cl_dashl "${1#-l}"
176 set x "$@" "$lib"
177 shift
178 ;;
179 -L)
180 eat=1
181 func_cl_dashL "$2"
182 ;;
183 -L*)
184 func_cl_dashL "${1#-L}"
185 ;;
186 -static)
187 shared=false
188 ;;
189 -Wl,*)
190 arg=${1#-Wl,}
191 save_ifs="$IFS"; IFS=','
192 for flag in $arg; do
193 IFS="$save_ifs"
194 linker_opts="$linker_opts $flag"
195 done
196 IFS="$save_ifs"
197 ;;
198 -Xlinker)
199 eat=1
200 linker_opts="$linker_opts $2"
201 ;;
202 -*)
203 set x "$@" "$1"
204 shift
205 ;;
206 *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
207 func_file_conv "$1"
208 set x "$@" -Tp"$file"
209 shift
210 ;;
211 *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
212 func_file_conv "$1" mingw
213 set x "$@" "$file"
214 shift
215 ;;
216 *)
217 set x "$@" "$1"
218 shift
219 ;;
220 esac
221 fi
222 shift
223 done
224 if test -n "$linker_opts"; then
225 linker_opts="-link$linker_opts"
226 fi
227 exec "$@" $linker_opts
228 exit 1
229 }
230
231 eat=
232
233 case $1 in
234 '')
235 echo "$0: No command. Try '$0 --help' for more information." 1>&2
236 exit 1;
237 ;;
238 -h | --h*)
239 cat <<\EOF
240 Usage: compile [--help] [--version] PROGRAM [ARGS]
241
242 Wrapper for compilers which do not understand '-c -o'.
243 Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
244 arguments, and rename the output as expected.
245
246 If you are trying to build a whole package this is not the
247 right script to run: please start by reading the file 'INSTALL'.
248
249 Report bugs to <bug-automake@gnu.org>.
250 EOF
251 exit $?
252 ;;
253 -v | --v*)
254 echo "compile $scriptversion"
255 exit $?
256 ;;
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
258 func_cl_wrapper "$@" # Doesn't return...
259 ;;
260 esac
261
262 ofile=
263 cfile=
264
265 for arg
266 do
267 if test -n "$eat"; then
268 eat=
269 else
270 case $1 in
271 -o)
272 # configure might choose to run compile as 'compile cc -o foo foo.c'.
273 # So we strip '-o arg' only if arg is an object.
274 eat=1
275 case $2 in
276 *.o | *.obj)
277 ofile=$2
278 ;;
279 *)
280 set x "$@" -o "$2"
281 shift
282 ;;
283 esac
284 ;;
285 *.c)
286 cfile=$1
287 set x "$@" "$1"
288 shift
289 ;;
290 *)
291 set x "$@" "$1"
292 shift
293 ;;
294 esac
295 fi
296 shift
297 done
298
299 if test -z "$ofile" || test -z "$cfile"; then
300 # If no '-o' option was seen then we might have been invoked from a
301 # pattern rule where we don't need one. That is ok -- this is a
302 # normal compilation that the losing compiler can handle. If no
303 # '.c' file was seen then we are probably linking. That is also
304 # ok.
305 exec "$@"
306 fi
307
308 # Name of file we expect compiler to create.
309 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
310
311 # Create the lock directory.
312 # Note: use '[/\\:.-]' here to ensure that we don't use the same name
313 # that we are using for the .o file. Also, base the name on the expected
314 # object file name, since that is what matters with a parallel build.
315 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
316 while true; do
317 if mkdir "$lockdir" >/dev/null 2>&1; then
318 break
319 fi
320 sleep 1
321 done
322 # FIXME: race condition here if user kills between mkdir and trap.
323 trap "rmdir '$lockdir'; exit 1" 1 2 15
324
325 # Run the compile.
326 "$@"
327 ret=$?
328
329 if test -f "$cofile"; then
330 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
331 elif test -f "${cofile}bj"; then
332 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
333 fi
334
335 rmdir "$lockdir"
336 exit $ret
337
338 # Local Variables:
339 # mode: shell-script
340 # sh-indentation: 2
341 # eval: (add-hook 'write-file-hooks 'time-stamp)
342 # time-stamp-start: "scriptversion="
343 # time-stamp-format: "%:y-%02m-%02d.%02H"
344 # time-stamp-time-zone: "UTC"
345 # time-stamp-end: "; # UTC"
346 # End:
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2014 Free Software Foundation, Inc.
3
4 timestamp='2014-03-23'
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-2014 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' | sed 's, ,,g'`
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 *: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 openrisc*:Linux:*:*)
972 echo or1k-unknown-linux-${LIBC}
973 exit ;;
974 or32:Linux:*:* | or1k*: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 test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1263 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1264 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1265 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1266 grep IS_64BIT_ARCH >/dev/null
1267 then
1268 case $UNAME_PROCESSOR in
1269 i386) UNAME_PROCESSOR=x86_64 ;;
1270 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1271 esac
1272 fi
1273 fi
1274 elif test "$UNAME_PROCESSOR" = i386 ; then
1275 # Avoid executing cc on OS X 10.9, as it ships with a stub
1276 # that puts up a graphical alert prompting to install
1277 # developer tools. Any system running Mac OS X 10.7 or
1278 # later (Darwin 11 and later) is required to have a 64-bit
1279 # processor. This is not true of the ARM version of Darwin
1280 # that Apple uses in portable devices.
1281 UNAME_PROCESSOR=x86_64
1282 fi
1283 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1284 exit ;;
1285 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1286 UNAME_PROCESSOR=`uname -p`
1287 if test "$UNAME_PROCESSOR" = "x86"; then
1288 UNAME_PROCESSOR=i386
1289 UNAME_MACHINE=pc
1290 fi
1291 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1292 exit ;;
1293 *:QNX:*:4*)
1294 echo i386-pc-qnx
1295 exit ;;
1296 NEO-?:NONSTOP_KERNEL:*:*)
1297 echo neo-tandem-nsk${UNAME_RELEASE}
1298 exit ;;
1299 NSE-*:NONSTOP_KERNEL:*:*)
1300 echo nse-tandem-nsk${UNAME_RELEASE}
1301 exit ;;
1302 NSR-?:NONSTOP_KERNEL:*:*)
1303 echo nsr-tandem-nsk${UNAME_RELEASE}
1304 exit ;;
1305 *:NonStop-UX:*:*)
1306 echo mips-compaq-nonstopux
1307 exit ;;
1308 BS2000:POSIX*:*:*)
1309 echo bs2000-siemens-sysv
1310 exit ;;
1311 DS/*:UNIX_System_V:*:*)
1312 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1313 exit ;;
1314 *:Plan9:*:*)
1315 # "uname -m" is not consistent, so use $cputype instead. 386
1316 # is converted to i386 for consistency with other x86
1317 # operating systems.
1318 if test "$cputype" = "386"; then
1319 UNAME_MACHINE=i386
1320 else
1321 UNAME_MACHINE="$cputype"
1322 fi
1323 echo ${UNAME_MACHINE}-unknown-plan9
1324 exit ;;
1325 *:TOPS-10:*:*)
1326 echo pdp10-unknown-tops10
1327 exit ;;
1328 *:TENEX:*:*)
1329 echo pdp10-unknown-tenex
1330 exit ;;
1331 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1332 echo pdp10-dec-tops20
1333 exit ;;
1334 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1335 echo pdp10-xkl-tops20
1336 exit ;;
1337 *:TOPS-20:*:*)
1338 echo pdp10-unknown-tops20
1339 exit ;;
1340 *:ITS:*:*)
1341 echo pdp10-unknown-its
1342 exit ;;
1343 SEI:*:*:SEIUX)
1344 echo mips-sei-seiux${UNAME_RELEASE}
1345 exit ;;
1346 *:DragonFly:*:*)
1347 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1348 exit ;;
1349 *:*VMS:*:*)
1350 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1351 case "${UNAME_MACHINE}" in
1352 A*) echo alpha-dec-vms ; exit ;;
1353 I*) echo ia64-dec-vms ; exit ;;
1354 V*) echo vax-dec-vms ; exit ;;
1355 esac ;;
1356 *:XENIX:*:SysV)
1357 echo i386-pc-xenix
1358 exit ;;
1359 i*86:skyos:*:*)
1360 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1361 exit ;;
1362 i*86:rdos:*:*)
1363 echo ${UNAME_MACHINE}-pc-rdos
1364 exit ;;
1365 i*86:AROS:*:*)
1366 echo ${UNAME_MACHINE}-pc-aros
1367 exit ;;
1368 x86_64:VMkernel:*:*)
1369 echo ${UNAME_MACHINE}-unknown-esx
1370 exit ;;
1371 esac
1372
1373 cat >&2 <<EOF
1374 $0: unable to guess system type
1375
1376 This script, last modified $timestamp, has failed to recognize
1377 the operating system you are using. It is advised that you
1378 download the most up to date version of the config scripts from
1379
1380 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1381 and
1382 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1383
1384 If the version you run ($0) is already up to date, please
1385 send the following data and any information you think might be
1386 pertinent to <config-patches@gnu.org> in order to provide the needed
1387 information to handle your system.
1388
1389 config.guess timestamp = $timestamp
1390
1391 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1392 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1393 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1394 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1395
1396 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1397 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1398
1399 hostinfo = `(hostinfo) 2>/dev/null`
1400 /bin/universe = `(/bin/universe) 2>/dev/null`
1401 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1402 /bin/arch = `(/bin/arch) 2>/dev/null`
1403 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1404 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1405
1406 UNAME_MACHINE = ${UNAME_MACHINE}
1407 UNAME_RELEASE = ${UNAME_RELEASE}
1408 UNAME_SYSTEM = ${UNAME_SYSTEM}
1409 UNAME_VERSION = ${UNAME_VERSION}
1410 EOF
1411
1412 exit 1
1413
1414 # Local variables:
1415 # eval: (add-hook 'write-file-hooks 'time-stamp)
1416 # time-stamp-start: "timestamp='"
1417 # time-stamp-format: "%:y-%02m-%02d"
1418 # time-stamp-end: "'"
1419 # End:
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if you have the `cap_clear_flag' function. */
3 #undef HAVE_CAP_CLEAR_FLAG
4
5 /* Define to 1 if you have the `cap_compare' function. */
6 #undef HAVE_CAP_COMPARE
7
8 /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
9 don't. */
10 #undef HAVE_DECL_STRERROR_R
11
12 /* Define to 1 if you have the <dlfcn.h> header file. */
13 #undef HAVE_DLFCN_H
14
15 /* Define to 1 if you have the <inttypes.h> header file. */
16 #undef HAVE_INTTYPES_H
17
18 /* Define to 1 if you have the `cap' library (-lcap). */
19 #undef HAVE_LIBCAP
20
21 /* Define to 1 if you have the `dl' library (-ldl). */
22 #undef HAVE_LIBDL
23
24 /* Define to 1 if you have the `idn' library (-lidn). */
25 #undef HAVE_LIBIDN
26
27 /* Define to 1 if you have the `ncurses' library (-lncurses). */
28 #undef HAVE_LIBNCURSES
29
30 /* Define to 1 if you have the `proc' library (-lproc). */
31 #undef HAVE_LIBPROC
32
33 /* Define to 1 if you have the `readline' library (-lreadline). */
34 #undef HAVE_LIBREADLINE
35
36 /* Define to 1 if you have the `recode' library (-lrecode). */
37 #undef HAVE_LIBRECODE
38
39 /* Define to 1 if you have the <memory.h> header file. */
40 #undef HAVE_MEMORY_H
41
42 /* Define to 1 if you have the <stdint.h> header file. */
43 #undef HAVE_STDINT_H
44
45 /* Define to 1 if you have the <stdlib.h> header file. */
46 #undef HAVE_STDLIB_H
47
48 /* Define to 1 if you have the `strerror_r' function. */
49 #undef HAVE_STRERROR_R
50
51 /* Define to 1 if you have the <strings.h> header file. */
52 #undef HAVE_STRINGS_H
53
54 /* Define to 1 if you have the <string.h> header file. */
55 #undef HAVE_STRING_H
56
57 /* Define to 1 if you have the <sys/quota.h> header file. */
58 #undef HAVE_SYS_QUOTA_H
59
60 /* Define to 1 if you have the <sys/stat.h> header file. */
61 #undef HAVE_SYS_STAT_H
62
63 /* Define to 1 if you have the <sys/types.h> header file. */
64 #undef HAVE_SYS_TYPES_H
65
66 /* Define to 1 if you have the <unistd.h> header file. */
67 #undef HAVE_UNISTD_H
68
69 /* Define to 1 if you have the <xfs/xqm.h> header file. */
70 #undef HAVE_XFS_XQM_H
71
72 /* Define to the sub-directory in which libtool stores uninstalled libraries.
73 */
74 #undef LT_OBJDIR
75
76 /* Name of package */
77 #undef PACKAGE
78
79 /* Define to the address where bug reports for this package should be sent. */
80 #undef PACKAGE_BUGREPORT
81
82 /* Define to the full name of this package. */
83 #undef PACKAGE_NAME
84
85 /* Define to the full name and version of this package. */
86 #undef PACKAGE_STRING
87
88 /* Define to the one symbol short name of this package. */
89 #undef PACKAGE_TARNAME
90
91 /* Define to the home page for this package. */
92 #undef PACKAGE_URL
93
94 /* Define to the version of this package. */
95 #undef PACKAGE_VERSION
96
97 /* Define to 1 if you have the ANSI C header files. */
98 #undef STDC_HEADERS
99
100 /* Define to 1 if strerror_r returns char *. */
101 #undef STRERROR_R_CHAR_P
102
103 /* Version number of package */
104 #undef VERSION
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2014 Free Software Foundation, Inc.
3
4 timestamp='2014-05-01'
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-2014 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 | k1om \
268 | le32 | le64 \
269 | lm32 \
270 | m32c | m32r | m32rle | m68000 | m68k | m88k \
271 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
272 | mips | mipsbe | mipseb | mipsel | mipsle \
273 | mips16 \
274 | mips64 | mips64el \
275 | mips64octeon | mips64octeonel \
276 | mips64orion | mips64orionel \
277 | mips64r5900 | mips64r5900el \
278 | mips64vr | mips64vrel \
279 | mips64vr4100 | mips64vr4100el \
280 | mips64vr4300 | mips64vr4300el \
281 | mips64vr5000 | mips64vr5000el \
282 | mips64vr5900 | mips64vr5900el \
283 | mipsisa32 | mipsisa32el \
284 | mipsisa32r2 | mipsisa32r2el \
285 | mipsisa32r6 | mipsisa32r6el \
286 | mipsisa64 | mipsisa64el \
287 | mipsisa64r2 | mipsisa64r2el \
288 | mipsisa64r6 | mipsisa64r6el \
289 | mipsisa64sb1 | mipsisa64sb1el \
290 | mipsisa64sr71k | mipsisa64sr71kel \
291 | mipsr5900 | mipsr5900el \
292 | mipstx39 | mipstx39el \
293 | mn10200 | mn10300 \
294 | moxie \
295 | mt \
296 | msp430 \
297 | nds32 | nds32le | nds32be \
298 | nios | nios2 | nios2eb | nios2el \
299 | ns16k | ns32k \
300 | open8 | or1k | or1knd | or32 \
301 | pdp10 | pdp11 | pj | pjl \
302 | powerpc | powerpc64 | powerpc64le | powerpcle \
303 | pyramid \
304 | rl78 | rx \
305 | score \
306 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
307 | sh64 | sh64le \
308 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
309 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
310 | spu \
311 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
312 | ubicom32 \
313 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
314 | we32k \
315 | x86 | xc16x | xstormy16 | xtensa \
316 | z8k | z80)
317 basic_machine=$basic_machine-unknown
318 ;;
319 c54x)
320 basic_machine=tic54x-unknown
321 ;;
322 c55x)
323 basic_machine=tic55x-unknown
324 ;;
325 c6x)
326 basic_machine=tic6x-unknown
327 ;;
328 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
329 basic_machine=$basic_machine-unknown
330 os=-none
331 ;;
332 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
333 ;;
334 ms1)
335 basic_machine=mt-unknown
336 ;;
337
338 strongarm | thumb | xscale)
339 basic_machine=arm-unknown
340 ;;
341 xgate)
342 basic_machine=$basic_machine-unknown
343 os=-none
344 ;;
345 xscaleeb)
346 basic_machine=armeb-unknown
347 ;;
348
349 xscaleel)
350 basic_machine=armel-unknown
351 ;;
352
353 # We use `pc' rather than `unknown'
354 # because (1) that's what they normally are, and
355 # (2) the word "unknown" tends to confuse beginning users.
356 i*86 | x86_64)
357 basic_machine=$basic_machine-pc
358 ;;
359 # Object if more than one company name word.
360 *-*-*)
361 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
362 exit 1
363 ;;
364 # Recognize the basic CPU types with company name.
365 580-* \
366 | a29k-* \
367 | aarch64-* | aarch64_be-* \
368 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
369 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
370 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
371 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
372 | avr-* | avr32-* \
373 | be32-* | be64-* \
374 | bfin-* | bs2000-* \
375 | c[123]* | c30-* | [cjt]90-* | c4x-* \
376 | c8051-* | clipper-* | craynv-* | cydra-* \
377 | d10v-* | d30v-* | dlx-* \
378 | elxsi-* \
379 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
380 | h8300-* | h8500-* \
381 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
382 | hexagon-* \
383 | i*86-* | i860-* | i960-* | ia64-* \
384 | ip2k-* | iq2000-* \
385 | k1om-* \
386 | le32-* | le64-* \
387 | lm32-* \
388 | m32c-* | m32r-* | m32rle-* \
389 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
390 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
391 | microblaze-* | microblazeel-* \
392 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
393 | mips16-* \
394 | mips64-* | mips64el-* \
395 | mips64octeon-* | mips64octeonel-* \
396 | mips64orion-* | mips64orionel-* \
397 | mips64r5900-* | mips64r5900el-* \
398 | mips64vr-* | mips64vrel-* \
399 | mips64vr4100-* | mips64vr4100el-* \
400 | mips64vr4300-* | mips64vr4300el-* \
401 | mips64vr5000-* | mips64vr5000el-* \
402 | mips64vr5900-* | mips64vr5900el-* \
403 | mipsisa32-* | mipsisa32el-* \
404 | mipsisa32r2-* | mipsisa32r2el-* \
405 | mipsisa32r6-* | mipsisa32r6el-* \
406 | mipsisa64-* | mipsisa64el-* \
407 | mipsisa64r2-* | mipsisa64r2el-* \
408 | mipsisa64r6-* | mipsisa64r6el-* \
409 | mipsisa64sb1-* | mipsisa64sb1el-* \
410 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
411 | mipsr5900-* | mipsr5900el-* \
412 | mipstx39-* | mipstx39el-* \
413 | mmix-* \
414 | mt-* \
415 | msp430-* \
416 | nds32-* | nds32le-* | nds32be-* \
417 | nios-* | nios2-* | nios2eb-* | nios2el-* \
418 | none-* | np1-* | ns16k-* | ns32k-* \
419 | open8-* \
420 | or1k*-* \
421 | orion-* \
422 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
423 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
424 | pyramid-* \
425 | rl78-* | romp-* | rs6000-* | rx-* \
426 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
427 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
428 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
429 | sparclite-* \
430 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
431 | tahoe-* \
432 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
433 | tile*-* \
434 | tron-* \
435 | ubicom32-* \
436 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
437 | vax-* \
438 | we32k-* \
439 | x86-* | x86_64-* | xc16x-* | xps100-* \
440 | xstormy16-* | xtensa*-* \
441 | ymp-* \
442 | z8k-* | z80-*)
443 ;;
444 # Recognize the basic CPU types without company name, with glob match.
445 xtensa*)
446 basic_machine=$basic_machine-unknown
447 ;;
448 # Recognize the various machine names and aliases which stand
449 # for a CPU type and a company and sometimes even an OS.
450 386bsd)
451 basic_machine=i386-unknown
452 os=-bsd
453 ;;
454 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
455 basic_machine=m68000-att
456 ;;
457 3b*)
458 basic_machine=we32k-att
459 ;;
460 a29khif)
461 basic_machine=a29k-amd
462 os=-udi
463 ;;
464 abacus)
465 basic_machine=abacus-unknown
466 ;;
467 adobe68k)
468 basic_machine=m68010-adobe
469 os=-scout
470 ;;
471 alliant | fx80)
472 basic_machine=fx80-alliant
473 ;;
474 altos | altos3068)
475 basic_machine=m68k-altos
476 ;;
477 am29k)
478 basic_machine=a29k-none
479 os=-bsd
480 ;;
481 amd64)
482 basic_machine=x86_64-pc
483 ;;
484 amd64-*)
485 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
486 ;;
487 amdahl)
488 basic_machine=580-amdahl
489 os=-sysv
490 ;;
491 amiga | amiga-*)
492 basic_machine=m68k-unknown
493 ;;
494 amigaos | amigados)
495 basic_machine=m68k-unknown
496 os=-amigaos
497 ;;
498 amigaunix | amix)
499 basic_machine=m68k-unknown
500 os=-sysv4
501 ;;
502 apollo68)
503 basic_machine=m68k-apollo
504 os=-sysv
505 ;;
506 apollo68bsd)
507 basic_machine=m68k-apollo
508 os=-bsd
509 ;;
510 aros)
511 basic_machine=i386-pc
512 os=-aros
513 ;;
514 aux)
515 basic_machine=m68k-apple
516 os=-aux
517 ;;
518 balance)
519 basic_machine=ns32k-sequent
520 os=-dynix
521 ;;
522 blackfin)
523 basic_machine=bfin-unknown
524 os=-linux
525 ;;
526 blackfin-*)
527 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
528 os=-linux
529 ;;
530 bluegene*)
531 basic_machine=powerpc-ibm
532 os=-cnk
533 ;;
534 c54x-*)
535 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
536 ;;
537 c55x-*)
538 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
539 ;;
540 c6x-*)
541 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
542 ;;
543 c90)
544 basic_machine=c90-cray
545 os=-unicos
546 ;;
547 cegcc)
548 basic_machine=arm-unknown
549 os=-cegcc
550 ;;
551 convex-c1)
552 basic_machine=c1-convex
553 os=-bsd
554 ;;
555 convex-c2)
556 basic_machine=c2-convex
557 os=-bsd
558 ;;
559 convex-c32)
560 basic_machine=c32-convex
561 os=-bsd
562 ;;
563 convex-c34)
564 basic_machine=c34-convex
565 os=-bsd
566 ;;
567 convex-c38)
568 basic_machine=c38-convex
569 os=-bsd
570 ;;
571 cray | j90)
572 basic_machine=j90-cray
573 os=-unicos
574 ;;
575 craynv)
576 basic_machine=craynv-cray
577 os=-unicosmp
578 ;;
579 cr16 | cr16-*)
580 basic_machine=cr16-unknown
581 os=-elf
582 ;;
583 crds | unos)
584 basic_machine=m68k-crds
585 ;;
586 crisv32 | crisv32-* | etraxfs*)
587 basic_machine=crisv32-axis
588 ;;
589 cris | cris-* | etrax*)
590 basic_machine=cris-axis
591 ;;
592 crx)
593 basic_machine=crx-unknown
594 os=-elf
595 ;;
596 da30 | da30-*)
597 basic_machine=m68k-da30
598 ;;
599 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
600 basic_machine=mips-dec
601 ;;
602 decsystem10* | dec10*)
603 basic_machine=pdp10-dec
604 os=-tops10
605 ;;
606 decsystem20* | dec20*)
607 basic_machine=pdp10-dec
608 os=-tops20
609 ;;
610 delta | 3300 | motorola-3300 | motorola-delta \
611 | 3300-motorola | delta-motorola)
612 basic_machine=m68k-motorola
613 ;;
614 delta88)
615 basic_machine=m88k-motorola
616 os=-sysv3
617 ;;
618 dicos)
619 basic_machine=i686-pc
620 os=-dicos
621 ;;
622 djgpp)
623 basic_machine=i586-pc
624 os=-msdosdjgpp
625 ;;
626 dpx20 | dpx20-*)
627 basic_machine=rs6000-bull
628 os=-bosx
629 ;;
630 dpx2* | dpx2*-bull)
631 basic_machine=m68k-bull
632 os=-sysv3
633 ;;
634 ebmon29k)
635 basic_machine=a29k-amd
636 os=-ebmon
637 ;;
638 elxsi)
639 basic_machine=elxsi-elxsi
640 os=-bsd
641 ;;
642 encore | umax | mmax)
643 basic_machine=ns32k-encore
644 ;;
645 es1800 | OSE68k | ose68k | ose | OSE)
646 basic_machine=m68k-ericsson
647 os=-ose
648 ;;
649 fx2800)
650 basic_machine=i860-alliant
651 ;;
652 genix)
653 basic_machine=ns32k-ns
654 ;;
655 gmicro)
656 basic_machine=tron-gmicro
657 os=-sysv
658 ;;
659 go32)
660 basic_machine=i386-pc
661 os=-go32
662 ;;
663 h3050r* | hiux*)
664 basic_machine=hppa1.1-hitachi
665 os=-hiuxwe2
666 ;;
667 h8300hms)
668 basic_machine=h8300-hitachi
669 os=-hms
670 ;;
671 h8300xray)
672 basic_machine=h8300-hitachi
673 os=-xray
674 ;;
675 h8500hms)
676 basic_machine=h8500-hitachi
677 os=-hms
678 ;;
679 harris)
680 basic_machine=m88k-harris
681 os=-sysv3
682 ;;
683 hp300-*)
684 basic_machine=m68k-hp
685 ;;
686 hp300bsd)
687 basic_machine=m68k-hp
688 os=-bsd
689 ;;
690 hp300hpux)
691 basic_machine=m68k-hp
692 os=-hpux
693 ;;
694 hp3k9[0-9][0-9] | hp9[0-9][0-9])
695 basic_machine=hppa1.0-hp
696 ;;
697 hp9k2[0-9][0-9] | hp9k31[0-9])
698 basic_machine=m68000-hp
699 ;;
700 hp9k3[2-9][0-9])
701 basic_machine=m68k-hp
702 ;;
703 hp9k6[0-9][0-9] | hp6[0-9][0-9])
704 basic_machine=hppa1.0-hp
705 ;;
706 hp9k7[0-79][0-9] | hp7[0-79][0-9])
707 basic_machine=hppa1.1-hp
708 ;;
709 hp9k78[0-9] | hp78[0-9])
710 # FIXME: really hppa2.0-hp
711 basic_machine=hppa1.1-hp
712 ;;
713 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
714 # FIXME: really hppa2.0-hp
715 basic_machine=hppa1.1-hp
716 ;;
717 hp9k8[0-9][13679] | hp8[0-9][13679])
718 basic_machine=hppa1.1-hp
719 ;;
720 hp9k8[0-9][0-9] | hp8[0-9][0-9])
721 basic_machine=hppa1.0-hp
722 ;;
723 hppa-next)
724 os=-nextstep3
725 ;;
726 hppaosf)
727 basic_machine=hppa1.1-hp
728 os=-osf
729 ;;
730 hppro)
731 basic_machine=hppa1.1-hp
732 os=-proelf
733 ;;
734 i370-ibm* | ibm*)
735 basic_machine=i370-ibm
736 ;;
737 i*86v32)
738 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
739 os=-sysv32
740 ;;
741 i*86v4*)
742 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
743 os=-sysv4
744 ;;
745 i*86v)
746 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
747 os=-sysv
748 ;;
749 i*86sol2)
750 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
751 os=-solaris2
752 ;;
753 i386mach)
754 basic_machine=i386-mach
755 os=-mach
756 ;;
757 i386-vsta | vsta)
758 basic_machine=i386-unknown
759 os=-vsta
760 ;;
761 iris | iris4d)
762 basic_machine=mips-sgi
763 case $os in
764 -irix*)
765 ;;
766 *)
767 os=-irix4
768 ;;
769 esac
770 ;;
771 isi68 | isi)
772 basic_machine=m68k-isi
773 os=-sysv
774 ;;
775 m68knommu)
776 basic_machine=m68k-unknown
777 os=-linux
778 ;;
779 m68knommu-*)
780 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
781 os=-linux
782 ;;
783 m88k-omron*)
784 basic_machine=m88k-omron
785 ;;
786 magnum | m3230)
787 basic_machine=mips-mips
788 os=-sysv
789 ;;
790 merlin)
791 basic_machine=ns32k-utek
792 os=-sysv
793 ;;
794 microblaze*)
795 basic_machine=microblaze-xilinx
796 ;;
797 mingw64)
798 basic_machine=x86_64-pc
799 os=-mingw64
800 ;;
801 mingw32)
802 basic_machine=i686-pc
803 os=-mingw32
804 ;;
805 mingw32ce)
806 basic_machine=arm-unknown
807 os=-mingw32ce
808 ;;
809 miniframe)
810 basic_machine=m68000-convergent
811 ;;
812 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
813 basic_machine=m68k-atari
814 os=-mint
815 ;;
816 mips3*-*)
817 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
818 ;;
819 mips3*)
820 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
821 ;;
822 monitor)
823 basic_machine=m68k-rom68k
824 os=-coff
825 ;;
826 morphos)
827 basic_machine=powerpc-unknown
828 os=-morphos
829 ;;
830 msdos)
831 basic_machine=i386-pc
832 os=-msdos
833 ;;
834 ms1-*)
835 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
836 ;;
837 msys)
838 basic_machine=i686-pc
839 os=-msys
840 ;;
841 mvs)
842 basic_machine=i370-ibm
843 os=-mvs
844 ;;
845 nacl)
846 basic_machine=le32-unknown
847 os=-nacl
848 ;;
849 ncr3000)
850 basic_machine=i486-ncr
851 os=-sysv4
852 ;;
853 netbsd386)
854 basic_machine=i386-unknown
855 os=-netbsd
856 ;;
857 netwinder)
858 basic_machine=armv4l-rebel
859 os=-linux
860 ;;
861 news | news700 | news800 | news900)
862 basic_machine=m68k-sony
863 os=-newsos
864 ;;
865 news1000)
866 basic_machine=m68030-sony
867 os=-newsos
868 ;;
869 news-3600 | risc-news)
870 basic_machine=mips-sony
871 os=-newsos
872 ;;
873 necv70)
874 basic_machine=v70-nec
875 os=-sysv
876 ;;
877 next | m*-next )
878 basic_machine=m68k-next
879 case $os in
880 -nextstep* )
881 ;;
882 -ns2*)
883 os=-nextstep2
884 ;;
885 *)
886 os=-nextstep3
887 ;;
888 esac
889 ;;
890 nh3000)
891 basic_machine=m68k-harris
892 os=-cxux
893 ;;
894 nh[45]000)
895 basic_machine=m88k-harris
896 os=-cxux
897 ;;
898 nindy960)
899 basic_machine=i960-intel
900 os=-nindy
901 ;;
902 mon960)
903 basic_machine=i960-intel
904 os=-mon960
905 ;;
906 nonstopux)
907 basic_machine=mips-compaq
908 os=-nonstopux
909 ;;
910 np1)
911 basic_machine=np1-gould
912 ;;
913 neo-tandem)
914 basic_machine=neo-tandem
915 ;;
916 nse-tandem)
917 basic_machine=nse-tandem
918 ;;
919 nsr-tandem)
920 basic_machine=nsr-tandem
921 ;;
922 op50n-* | op60c-*)
923 basic_machine=hppa1.1-oki
924 os=-proelf
925 ;;
926 openrisc | openrisc-*)
927 basic_machine=or32-unknown
928 ;;
929 os400)
930 basic_machine=powerpc-ibm
931 os=-os400
932 ;;
933 OSE68000 | ose68000)
934 basic_machine=m68000-ericsson
935 os=-ose
936 ;;
937 os68k)
938 basic_machine=m68k-none
939 os=-os68k
940 ;;
941 pa-hitachi)
942 basic_machine=hppa1.1-hitachi
943 os=-hiuxwe2
944 ;;
945 paragon)
946 basic_machine=i860-intel
947 os=-osf
948 ;;
949 parisc)
950 basic_machine=hppa-unknown
951 os=-linux
952 ;;
953 parisc-*)
954 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
955 os=-linux
956 ;;
957 pbd)
958 basic_machine=sparc-tti
959 ;;
960 pbb)
961 basic_machine=m68k-tti
962 ;;
963 pc532 | pc532-*)
964 basic_machine=ns32k-pc532
965 ;;
966 pc98)
967 basic_machine=i386-pc
968 ;;
969 pc98-*)
970 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
971 ;;
972 pentium | p5 | k5 | k6 | nexgen | viac3)
973 basic_machine=i586-pc
974 ;;
975 pentiumpro | p6 | 6x86 | athlon | athlon_*)
976 basic_machine=i686-pc
977 ;;
978 pentiumii | pentium2 | pentiumiii | pentium3)
979 basic_machine=i686-pc
980 ;;
981 pentium4)
982 basic_machine=i786-pc
983 ;;
984 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
985 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
986 ;;
987 pentiumpro-* | p6-* | 6x86-* | athlon-*)
988 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
989 ;;
990 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
991 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
992 ;;
993 pentium4-*)
994 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
995 ;;
996 pn)
997 basic_machine=pn-gould
998 ;;
999 power) basic_machine=power-ibm
1000 ;;
1001 ppc | ppcbe) basic_machine=powerpc-unknown
1002 ;;
1003 ppc-* | ppcbe-*)
1004 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1005 ;;
1006 ppcle | powerpclittle | ppc-le | powerpc-little)
1007 basic_machine=powerpcle-unknown
1008 ;;
1009 ppcle-* | powerpclittle-*)
1010 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1011 ;;
1012 ppc64) basic_machine=powerpc64-unknown
1013 ;;
1014 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1015 ;;
1016 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1017 basic_machine=powerpc64le-unknown
1018 ;;
1019 ppc64le-* | powerpc64little-*)
1020 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1021 ;;
1022 ps2)
1023 basic_machine=i386-ibm
1024 ;;
1025 pw32)
1026 basic_machine=i586-unknown
1027 os=-pw32
1028 ;;
1029 rdos | rdos64)
1030 basic_machine=x86_64-pc
1031 os=-rdos
1032 ;;
1033 rdos32)
1034 basic_machine=i386-pc
1035 os=-rdos
1036 ;;
1037 rom68k)
1038 basic_machine=m68k-rom68k
1039 os=-coff
1040 ;;
1041 rm[46]00)
1042 basic_machine=mips-siemens
1043 ;;
1044 rtpc | rtpc-*)
1045 basic_machine=romp-ibm
1046 ;;
1047 s390 | s390-*)
1048 basic_machine=s390-ibm
1049 ;;
1050 s390x | s390x-*)
1051 basic_machine=s390x-ibm
1052 ;;
1053 sa29200)
1054 basic_machine=a29k-amd
1055 os=-udi
1056 ;;
1057 sb1)
1058 basic_machine=mipsisa64sb1-unknown
1059 ;;
1060 sb1el)
1061 basic_machine=mipsisa64sb1el-unknown
1062 ;;
1063 sde)
1064 basic_machine=mipsisa32-sde
1065 os=-elf
1066 ;;
1067 sei)
1068 basic_machine=mips-sei
1069 os=-seiux
1070 ;;
1071 sequent)
1072 basic_machine=i386-sequent
1073 ;;
1074 sh)
1075 basic_machine=sh-hitachi
1076 os=-hms
1077 ;;
1078 sh5el)
1079 basic_machine=sh5le-unknown
1080 ;;
1081 sh64)
1082 basic_machine=sh64-unknown
1083 ;;
1084 sparclite-wrs | simso-wrs)
1085 basic_machine=sparclite-wrs
1086 os=-vxworks
1087 ;;
1088 sps7)
1089 basic_machine=m68k-bull
1090 os=-sysv2
1091 ;;
1092 spur)
1093 basic_machine=spur-unknown
1094 ;;
1095 st2000)
1096 basic_machine=m68k-tandem
1097 ;;
1098 stratus)
1099 basic_machine=i860-stratus
1100 os=-sysv4
1101 ;;
1102 strongarm-* | thumb-*)
1103 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1104 ;;
1105 sun2)
1106 basic_machine=m68000-sun
1107 ;;
1108 sun2os3)
1109 basic_machine=m68000-sun
1110 os=-sunos3
1111 ;;
1112 sun2os4)
1113 basic_machine=m68000-sun
1114 os=-sunos4
1115 ;;
1116 sun3os3)
1117 basic_machine=m68k-sun
1118 os=-sunos3
1119 ;;
1120 sun3os4)
1121 basic_machine=m68k-sun
1122 os=-sunos4
1123 ;;
1124 sun4os3)
1125 basic_machine=sparc-sun
1126 os=-sunos3
1127 ;;
1128 sun4os4)
1129 basic_machine=sparc-sun
1130 os=-sunos4
1131 ;;
1132 sun4sol2)
1133 basic_machine=sparc-sun
1134 os=-solaris2
1135 ;;
1136 sun3 | sun3-*)
1137 basic_machine=m68k-sun
1138 ;;
1139 sun4)
1140 basic_machine=sparc-sun
1141 ;;
1142 sun386 | sun386i | roadrunner)
1143 basic_machine=i386-sun
1144 ;;
1145 sv1)
1146 basic_machine=sv1-cray
1147 os=-unicos
1148 ;;
1149 symmetry)
1150 basic_machine=i386-sequent
1151 os=-dynix
1152 ;;
1153 t3e)
1154 basic_machine=alphaev5-cray
1155 os=-unicos
1156 ;;
1157 t90)
1158 basic_machine=t90-cray
1159 os=-unicos
1160 ;;
1161 tile*)
1162 basic_machine=$basic_machine-unknown
1163 os=-linux-gnu
1164 ;;
1165 tx39)
1166 basic_machine=mipstx39-unknown
1167 ;;
1168 tx39el)
1169 basic_machine=mipstx39el-unknown
1170 ;;
1171 toad1)
1172 basic_machine=pdp10-xkl
1173 os=-tops20
1174 ;;
1175 tower | tower-32)
1176 basic_machine=m68k-ncr
1177 ;;
1178 tpf)
1179 basic_machine=s390x-ibm
1180 os=-tpf
1181 ;;
1182 udi29k)
1183 basic_machine=a29k-amd
1184 os=-udi
1185 ;;
1186 ultra3)
1187 basic_machine=a29k-nyu
1188 os=-sym1
1189 ;;
1190 v810 | necv810)
1191 basic_machine=v810-nec
1192 os=-none
1193 ;;
1194 vaxv)
1195 basic_machine=vax-dec
1196 os=-sysv
1197 ;;
1198 vms)
1199 basic_machine=vax-dec
1200 os=-vms
1201 ;;
1202 vpp*|vx|vx-*)
1203 basic_machine=f301-fujitsu
1204 ;;
1205 vxworks960)
1206 basic_machine=i960-wrs
1207 os=-vxworks
1208 ;;
1209 vxworks68)
1210 basic_machine=m68k-wrs
1211 os=-vxworks
1212 ;;
1213 vxworks29k)
1214 basic_machine=a29k-wrs
1215 os=-vxworks
1216 ;;
1217 w65*)
1218 basic_machine=w65-wdc
1219 os=-none
1220 ;;
1221 w89k-*)
1222 basic_machine=hppa1.1-winbond
1223 os=-proelf
1224 ;;
1225 xbox)
1226 basic_machine=i686-pc
1227 os=-mingw32
1228 ;;
1229 xps | xps100)
1230 basic_machine=xps100-honeywell
1231 ;;
1232 xscale-* | xscalee[bl]-*)
1233 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1234 ;;
1235 ymp)
1236 basic_machine=ymp-cray
1237 os=-unicos
1238 ;;
1239 z8k-*-coff)
1240 basic_machine=z8k-unknown
1241 os=-sim
1242 ;;
1243 z80-*-coff)
1244 basic_machine=z80-unknown
1245 os=-sim
1246 ;;
1247 none)
1248 basic_machine=none-none
1249 os=-none
1250 ;;
1251
1252 # Here we handle the default manufacturer of certain CPU types. It is in
1253 # some cases the only manufacturer, in others, it is the most popular.
1254 w89k)
1255 basic_machine=hppa1.1-winbond
1256 ;;
1257 op50n)
1258 basic_machine=hppa1.1-oki
1259 ;;
1260 op60c)
1261 basic_machine=hppa1.1-oki
1262 ;;
1263 romp)
1264 basic_machine=romp-ibm
1265 ;;
1266 mmix)
1267 basic_machine=mmix-knuth
1268 ;;
1269 rs6000)
1270 basic_machine=rs6000-ibm
1271 ;;
1272 vax)
1273 basic_machine=vax-dec
1274 ;;
1275 pdp10)
1276 # there are many clones, so DEC is not a safe bet
1277 basic_machine=pdp10-unknown
1278 ;;
1279 pdp11)
1280 basic_machine=pdp11-dec
1281 ;;
1282 we32k)
1283 basic_machine=we32k-att
1284 ;;
1285 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1286 basic_machine=sh-unknown
1287 ;;
1288 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1289 basic_machine=sparc-sun
1290 ;;
1291 cydra)
1292 basic_machine=cydra-cydrome
1293 ;;
1294 orion)
1295 basic_machine=orion-highlevel
1296 ;;
1297 orion105)
1298 basic_machine=clipper-highlevel
1299 ;;
1300 mac | mpw | mac-mpw)
1301 basic_machine=m68k-apple
1302 ;;
1303 pmac | pmac-mpw)
1304 basic_machine=powerpc-apple
1305 ;;
1306 *-unknown)
1307 # Make sure to match an already-canonicalized machine name.
1308 ;;
1309 *)
1310 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1311 exit 1
1312 ;;
1313 esac
1314
1315 # Here we canonicalize certain aliases for manufacturers.
1316 case $basic_machine in
1317 *-digital*)
1318 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1319 ;;
1320 *-commodore*)
1321 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1322 ;;
1323 *)
1324 ;;
1325 esac
1326
1327 # Decode manufacturer-specific aliases for certain operating systems.
1328
1329 if [ x"$os" != x"" ]
1330 then
1331 case $os in
1332 # First match some system type aliases
1333 # that might get confused with valid system types.
1334 # -solaris* is a basic system type, with this one exception.
1335 -auroraux)
1336 os=-auroraux
1337 ;;
1338 -solaris1 | -solaris1.*)
1339 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1340 ;;
1341 -solaris)
1342 os=-solaris2
1343 ;;
1344 -svr4*)
1345 os=-sysv4
1346 ;;
1347 -unixware*)
1348 os=-sysv4.2uw
1349 ;;
1350 -gnu/linux*)
1351 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1352 ;;
1353 # First accept the basic system types.
1354 # The portable systems comes first.
1355 # Each alternative MUST END IN A *, to match a version number.
1356 # -sysv* is not here because it comes later, after sysvr4.
1357 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1358 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1359 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1360 | -sym* | -kopensolaris* | -plan9* \
1361 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1362 | -aos* | -aros* \
1363 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1364 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1365 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1366 | -bitrig* | -openbsd* | -solidbsd* \
1367 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1368 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1369 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1370 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1371 | -chorusos* | -chorusrdb* | -cegcc* \
1372 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1373 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1374 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1375 | -uxpv* | -beos* | -mpeix* | -udk* \
1376 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1377 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1378 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1379 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1380 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1381 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1382 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1383 # Remember, each alternative MUST END IN *, to match a version number.
1384 ;;
1385 -qnx*)
1386 case $basic_machine in
1387 x86-* | i*86-*)
1388 ;;
1389 *)
1390 os=-nto$os
1391 ;;
1392 esac
1393 ;;
1394 -nto-qnx*)
1395 ;;
1396 -nto*)
1397 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1398 ;;
1399 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1400 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1401 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1402 ;;
1403 -mac*)
1404 os=`echo $os | sed -e 's|mac|macos|'`
1405 ;;
1406 -linux-dietlibc)
1407 os=-linux-dietlibc
1408 ;;
1409 -linux*)
1410 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1411 ;;
1412 -sunos5*)
1413 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1414 ;;
1415 -sunos6*)
1416 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1417 ;;
1418 -opened*)
1419 os=-openedition
1420 ;;
1421 -os400*)
1422 os=-os400
1423 ;;
1424 -wince*)
1425 os=-wince
1426 ;;
1427 -osfrose*)
1428 os=-osfrose
1429 ;;
1430 -osf*)
1431 os=-osf
1432 ;;
1433 -utek*)
1434 os=-bsd
1435 ;;
1436 -dynix*)
1437 os=-bsd
1438 ;;
1439 -acis*)
1440 os=-aos
1441 ;;
1442 -atheos*)
1443 os=-atheos
1444 ;;
1445 -syllable*)
1446 os=-syllable
1447 ;;
1448 -386bsd)
1449 os=-bsd
1450 ;;
1451 -ctix* | -uts*)
1452 os=-sysv
1453 ;;
1454 -nova*)
1455 os=-rtmk-nova
1456 ;;
1457 -ns2 )
1458 os=-nextstep2
1459 ;;
1460 -nsk*)
1461 os=-nsk
1462 ;;
1463 # Preserve the version number of sinix5.
1464 -sinix5.*)
1465 os=`echo $os | sed -e 's|sinix|sysv|'`
1466 ;;
1467 -sinix*)
1468 os=-sysv4
1469 ;;
1470 -tpf*)
1471 os=-tpf
1472 ;;
1473 -triton*)
1474 os=-sysv3
1475 ;;
1476 -oss*)
1477 os=-sysv3
1478 ;;
1479 -svr4)
1480 os=-sysv4
1481 ;;
1482 -svr3)
1483 os=-sysv3
1484 ;;
1485 -sysvr4)
1486 os=-sysv4
1487 ;;
1488 # This must come after -sysvr4.
1489 -sysv*)
1490 ;;
1491 -ose*)
1492 os=-ose
1493 ;;
1494 -es1800*)
1495 os=-ose
1496 ;;
1497 -xenix)
1498 os=-xenix
1499 ;;
1500 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1501 os=-mint
1502 ;;
1503 -aros*)
1504 os=-aros
1505 ;;
1506 -zvmoe)
1507 os=-zvmoe
1508 ;;
1509 -dicos*)
1510 os=-dicos
1511 ;;
1512 -nacl*)
1513 ;;
1514 -none)
1515 ;;
1516 *)
1517 # Get rid of the `-' at the beginning of $os.
1518 os=`echo $os | sed 's/[^-]*-//'`
1519 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1520 exit 1
1521 ;;
1522 esac
1523 else
1524
1525 # Here we handle the default operating systems that come with various machines.
1526 # The value should be what the vendor currently ships out the door with their
1527 # machine or put another way, the most popular os provided with the machine.
1528
1529 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1530 # "-sun"), then you have to tell the case statement up towards the top
1531 # that MANUFACTURER isn't an operating system. Otherwise, code above
1532 # will signal an error saying that MANUFACTURER isn't an operating
1533 # system, and we'll never get to this point.
1534
1535 case $basic_machine in
1536 score-*)
1537 os=-elf
1538 ;;
1539 spu-*)
1540 os=-elf
1541 ;;
1542 *-acorn)
1543 os=-riscix1.2
1544 ;;
1545 arm*-rebel)
1546 os=-linux
1547 ;;
1548 arm*-semi)
1549 os=-aout
1550 ;;
1551 c4x-* | tic4x-*)
1552 os=-coff
1553 ;;
1554 c8051-*)
1555 os=-elf
1556 ;;
1557 hexagon-*)
1558 os=-elf
1559 ;;
1560 tic54x-*)
1561 os=-coff
1562 ;;
1563 tic55x-*)
1564 os=-coff
1565 ;;
1566 tic6x-*)
1567 os=-coff
1568 ;;
1569 # This must come before the *-dec entry.
1570 pdp10-*)
1571 os=-tops20
1572 ;;
1573 pdp11-*)
1574 os=-none
1575 ;;
1576 *-dec | vax-*)
1577 os=-ultrix4.2
1578 ;;
1579 m68*-apollo)
1580 os=-domain
1581 ;;
1582 i386-sun)
1583 os=-sunos4.0.2
1584 ;;
1585 m68000-sun)
1586 os=-sunos3
1587 ;;
1588 m68*-cisco)
1589 os=-aout
1590 ;;
1591 mep-*)
1592 os=-elf
1593 ;;
1594 mips*-cisco)
1595 os=-elf
1596 ;;
1597 mips*-*)
1598 os=-elf
1599 ;;
1600 or32-*)
1601 os=-coff
1602 ;;
1603 *-tti) # must be before sparc entry or we get the wrong os.
1604 os=-sysv3
1605 ;;
1606 sparc-* | *-sun)
1607 os=-sunos4.1.1
1608 ;;
1609 *-be)
1610 os=-beos
1611 ;;
1612 *-haiku)
1613 os=-haiku
1614 ;;
1615 *-ibm)
1616 os=-aix
1617 ;;
1618 *-knuth)
1619 os=-mmixware
1620 ;;
1621 *-wec)
1622 os=-proelf
1623 ;;
1624 *-winbond)
1625 os=-proelf
1626 ;;
1627 *-oki)
1628 os=-proelf
1629 ;;
1630 *-hp)
1631 os=-hpux
1632 ;;
1633 *-hitachi)
1634 os=-hiux
1635 ;;
1636 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1637 os=-sysv
1638 ;;
1639 *-cbm)
1640 os=-amigaos
1641 ;;
1642 *-dg)
1643 os=-dgux
1644 ;;
1645 *-dolphin)
1646 os=-sysv3
1647 ;;
1648 m68k-ccur)
1649 os=-rtu
1650 ;;
1651 m88k-omron*)
1652 os=-luna
1653 ;;
1654 *-next )
1655 os=-nextstep
1656 ;;
1657 *-sequent)
1658 os=-ptx
1659 ;;
1660 *-crds)
1661 os=-unos
1662 ;;
1663 *-ns)
1664 os=-genix
1665 ;;
1666 i370-*)
1667 os=-mvs
1668 ;;
1669 *-next)
1670 os=-nextstep3
1671 ;;
1672 *-gould)
1673 os=-sysv
1674 ;;
1675 *-highlevel)
1676 os=-bsd
1677 ;;
1678 *-encore)
1679 os=-bsd
1680 ;;
1681 *-sgi)
1682 os=-irix
1683 ;;
1684 *-siemens)
1685 os=-sysv4
1686 ;;
1687 *-masscomp)
1688 os=-rtu
1689 ;;
1690 f30[01]-fujitsu | f700-fujitsu)
1691 os=-uxpv
1692 ;;
1693 *-rom68k)
1694 os=-coff
1695 ;;
1696 *-*bug)
1697 os=-coff
1698 ;;
1699 *-apple)
1700 os=-macos
1701 ;;
1702 *-atari*)
1703 os=-mint
1704 ;;
1705 *)
1706 os=-none
1707 ;;
1708 esac
1709 fi
1710
1711 # Here we handle the case where we know the os, and the CPU type, but not the
1712 # manufacturer. We pick the logical manufacturer.
1713 vendor=unknown
1714 case $basic_machine in
1715 *-unknown)
1716 case $os in
1717 -riscix*)
1718 vendor=acorn
1719 ;;
1720 -sunos*)
1721 vendor=sun
1722 ;;
1723 -cnk*|-aix*)
1724 vendor=ibm
1725 ;;
1726 -beos*)
1727 vendor=be
1728 ;;
1729 -hpux*)
1730 vendor=hp
1731 ;;
1732 -mpeix*)
1733 vendor=hp
1734 ;;
1735 -hiux*)
1736 vendor=hitachi
1737 ;;
1738 -unos*)
1739 vendor=crds
1740 ;;
1741 -dgux*)
1742 vendor=dg
1743 ;;
1744 -luna*)
1745 vendor=omron
1746 ;;
1747 -genix*)
1748 vendor=ns
1749 ;;
1750 -mvs* | -opened*)
1751 vendor=ibm
1752 ;;
1753 -os400*)
1754 vendor=ibm
1755 ;;
1756 -ptx*)
1757 vendor=sequent
1758 ;;
1759 -tpf*)
1760 vendor=ibm
1761 ;;
1762 -vxsim* | -vxworks* | -windiss*)
1763 vendor=wrs
1764 ;;
1765 -aux*)
1766 vendor=apple
1767 ;;
1768 -hms*)
1769 vendor=hitachi
1770 ;;
1771 -mpw* | -macos*)
1772 vendor=apple
1773 ;;
1774 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1775 vendor=atari
1776 ;;
1777 -vos*)
1778 vendor=stratus
1779 ;;
1780 esac
1781 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1782 ;;
1783 esac
1784
1785 echo $basic_machine$os
1786 exit
1787
1788 # Local variables:
1789 # eval: (add-hook 'write-file-hooks 'time-stamp)
1790 # time-stamp-start: "timestamp='"
1791 # time-stamp-format: "%:y-%02m-%02d"
1792 # time-stamp-end: "'"
1793 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for ui-utilcpp 1.8.1.snapshot20140701142031weslok.
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
199 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
200 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
201 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
202 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
203 PATH=/empty FPATH=/empty; export PATH FPATH
204 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
205 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
206 test \$(( 1 + 1 )) = 2 || 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='ui-utilcpp'
588 PACKAGE_TARNAME='ui-utilcpp'
589 PACKAGE_VERSION='1.8.1.snapshot20140701142031weslok'
590 PACKAGE_STRING='ui-utilcpp 1.8.1.snapshot20140701142031weslok'
591 PACKAGE_BUGREPORT=''
592 PACKAGE_URL=''
593
594 ac_unique_file="src/ui-utilcpp/Exception.hpp"
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 OST_CXXX2_LIBS
636 OST_CXXX2_FLAGS
637 EXTLIBS
638 GNULIBS
639 SINGLE_FLAGS
640 SINGLE_LIBS
641 CCGNU2_CONFIG
642 CPP
643 OTOOL64
644 OTOOL
645 LIPO
646 NMEDIT
647 DSYMUTIL
648 MANIFEST_TOOL
649 RANLIB
650 ac_ct_AR
651 AR
652 DLLTOOL
653 OBJDUMP
654 NM
655 ac_ct_DUMPBIN
656 DUMPBIN
657 LD
658 FGREP
659 EGREP
660 GREP
661 SED
662 am__fastdepCC_FALSE
663 am__fastdepCC_TRUE
664 CCDEPMODE
665 ac_ct_CC
666 CFLAGS
667 CC
668 host_os
669 host_vendor
670 host_cpu
671 host
672 build_os
673 build_vendor
674 build_cpu
675 build
676 LIBTOOL
677 LN_S
678 CXXCPP
679 am__fastdepCXX_FALSE
680 am__fastdepCXX_TRUE
681 CXXDEPMODE
682 am__nodep
683 AMDEPBACKSLASH
684 AMDEP_FALSE
685 AMDEP_TRUE
686 am__quote
687 am__include
688 DEPDIR
689 OBJEXT
690 EXEEXT
691 ac_ct_CXX
692 CPPFLAGS
693 LDFLAGS
694 CXXFLAGS
695 CXX
696 PERL
697 DOXYGEN
698 UI_UTILCPP_CXXFLAGS
699 SO_VERSION
700 AM_BACKSLASH
701 AM_DEFAULT_VERBOSITY
702 AM_DEFAULT_V
703 AM_V
704 am__untar
705 am__tar
706 AMTAR
707 am__leading_dot
708 SET_MAKE
709 AWK
710 mkdir_p
711 MKDIR_P
712 INSTALL_STRIP_PROGRAM
713 STRIP
714 install_sh
715 MAKEINFO
716 AUTOHEADER
717 AUTOMAKE
718 AUTOCONF
719 ACLOCAL
720 VERSION
721 PACKAGE
722 CYGPATH_W
723 am__isrc
724 INSTALL_DATA
725 INSTALL_SCRIPT
726 INSTALL_PROGRAM
727 target_alias
728 host_alias
729 build_alias
730 LIBS
731 ECHO_T
732 ECHO_N
733 ECHO_C
734 DEFS
735 mandir
736 localedir
737 libdir
738 psdir
739 pdfdir
740 dvidir
741 htmldir
742 infodir
743 docdir
744 oldincludedir
745 includedir
746 localstatedir
747 sharedstatedir
748 sysconfdir
749 datadir
750 datarootdir
751 libexecdir
752 sbindir
753 bindir
754 program_transform_name
755 prefix
756 exec_prefix
757 PACKAGE_URL
758 PACKAGE_BUGREPORT
759 PACKAGE_STRING
760 PACKAGE_VERSION
761 PACKAGE_TARNAME
762 PACKAGE_NAME
763 PATH_SEPARATOR
764 SHELL'
765 ac_subst_files='UI_AUTO_AM'
766 ac_user_opts='
767 enable_option_checking
768 enable_silent_rules
769 enable_strerror
770 enable_ui_doxygen
771 enable_dependency_tracking
772 enable_shared
773 enable_static
774 with_pic
775 enable_fast_install
776 with_gnu_ld
777 with_sysroot
778 enable_libtool_lock
779 enable_libproc
780 '
781 ac_precious_vars='build_alias
782 host_alias
783 target_alias
784 CXX
785 CXXFLAGS
786 LDFLAGS
787 LIBS
788 CPPFLAGS
789 CCC
790 CXXCPP
791 CC
792 CFLAGS
793 CPP'
794
795
796 # Initialize some variables set by options.
797 ac_init_help=
798 ac_init_version=false
799 ac_unrecognized_opts=
800 ac_unrecognized_sep=
801 # The variables have the same names as the options, with
802 # dashes changed to underlines.
803 cache_file=/dev/null
804 exec_prefix=NONE
805 no_create=
806 no_recursion=
807 prefix=NONE
808 program_prefix=NONE
809 program_suffix=NONE
810 program_transform_name=s,x,x,
811 silent=
812 site=
813 srcdir=
814 verbose=
815 x_includes=NONE
816 x_libraries=NONE
817
818 # Installation directory options.
819 # These are left unexpanded so users can "make install exec_prefix=/foo"
820 # and all the variables that are supposed to be based on exec_prefix
821 # by default will actually change.
822 # Use braces instead of parens because sh, perl, etc. also accept them.
823 # (The list follows the same order as the GNU Coding Standards.)
824 bindir='${exec_prefix}/bin'
825 sbindir='${exec_prefix}/sbin'
826 libexecdir='${exec_prefix}/libexec'
827 datarootdir='${prefix}/share'
828 datadir='${datarootdir}'
829 sysconfdir='${prefix}/etc'
830 sharedstatedir='${prefix}/com'
831 localstatedir='${prefix}/var'
832 includedir='${prefix}/include'
833 oldincludedir='/usr/include'
834 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
835 infodir='${datarootdir}/info'
836 htmldir='${docdir}'
837 dvidir='${docdir}'
838 pdfdir='${docdir}'
839 psdir='${docdir}'
840 libdir='${exec_prefix}/lib'
841 localedir='${datarootdir}/locale'
842 mandir='${datarootdir}/man'
843
844 ac_prev=
845 ac_dashdash=
846 for ac_option
847 do
848 # If the previous option needs an argument, assign it.
849 if test -n "$ac_prev"; then
850 eval $ac_prev=\$ac_option
851 ac_prev=
852 continue
853 fi
854
855 case $ac_option in
856 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
857 *=) ac_optarg= ;;
858 *) ac_optarg=yes ;;
859 esac
860
861 # Accept the important Cygnus configure options, so we can diagnose typos.
862
863 case $ac_dashdash$ac_option in
864 --)
865 ac_dashdash=yes ;;
866
867 -bindir | --bindir | --bindi | --bind | --bin | --bi)
868 ac_prev=bindir ;;
869 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
870 bindir=$ac_optarg ;;
871
872 -build | --build | --buil | --bui | --bu)
873 ac_prev=build_alias ;;
874 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
875 build_alias=$ac_optarg ;;
876
877 -cache-file | --cache-file | --cache-fil | --cache-fi \
878 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
879 ac_prev=cache_file ;;
880 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
881 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
882 cache_file=$ac_optarg ;;
883
884 --config-cache | -C)
885 cache_file=config.cache ;;
886
887 -datadir | --datadir | --datadi | --datad)
888 ac_prev=datadir ;;
889 -datadir=* | --datadir=* | --datadi=* | --datad=*)
890 datadir=$ac_optarg ;;
891
892 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
893 | --dataroo | --dataro | --datar)
894 ac_prev=datarootdir ;;
895 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
896 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
897 datarootdir=$ac_optarg ;;
898
899 -disable-* | --disable-*)
900 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
901 # Reject names that are not valid shell variable names.
902 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
903 as_fn_error $? "invalid feature name: $ac_useropt"
904 ac_useropt_orig=$ac_useropt
905 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
906 case $ac_user_opts in
907 *"
908 "enable_$ac_useropt"
909 "*) ;;
910 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
911 ac_unrecognized_sep=', ';;
912 esac
913 eval enable_$ac_useropt=no ;;
914
915 -docdir | --docdir | --docdi | --doc | --do)
916 ac_prev=docdir ;;
917 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
918 docdir=$ac_optarg ;;
919
920 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
921 ac_prev=dvidir ;;
922 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
923 dvidir=$ac_optarg ;;
924
925 -enable-* | --enable-*)
926 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
927 # Reject names that are not valid shell variable names.
928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
929 as_fn_error $? "invalid feature name: $ac_useropt"
930 ac_useropt_orig=$ac_useropt
931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
932 case $ac_user_opts in
933 *"
934 "enable_$ac_useropt"
935 "*) ;;
936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
937 ac_unrecognized_sep=', ';;
938 esac
939 eval enable_$ac_useropt=\$ac_optarg ;;
940
941 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
942 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
943 | --exec | --exe | --ex)
944 ac_prev=exec_prefix ;;
945 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
946 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
947 | --exec=* | --exe=* | --ex=*)
948 exec_prefix=$ac_optarg ;;
949
950 -gas | --gas | --ga | --g)
951 # Obsolete; use --with-gas.
952 with_gas=yes ;;
953
954 -help | --help | --hel | --he | -h)
955 ac_init_help=long ;;
956 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
957 ac_init_help=recursive ;;
958 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
959 ac_init_help=short ;;
960
961 -host | --host | --hos | --ho)
962 ac_prev=host_alias ;;
963 -host=* | --host=* | --hos=* | --ho=*)
964 host_alias=$ac_optarg ;;
965
966 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
967 ac_prev=htmldir ;;
968 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
969 | --ht=*)
970 htmldir=$ac_optarg ;;
971
972 -includedir | --includedir | --includedi | --included | --include \
973 | --includ | --inclu | --incl | --inc)
974 ac_prev=includedir ;;
975 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
976 | --includ=* | --inclu=* | --incl=* | --inc=*)
977 includedir=$ac_optarg ;;
978
979 -infodir | --infodir | --infodi | --infod | --info | --inf)
980 ac_prev=infodir ;;
981 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
982 infodir=$ac_optarg ;;
983
984 -libdir | --libdir | --libdi | --libd)
985 ac_prev=libdir ;;
986 -libdir=* | --libdir=* | --libdi=* | --libd=*)
987 libdir=$ac_optarg ;;
988
989 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
990 | --libexe | --libex | --libe)
991 ac_prev=libexecdir ;;
992 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
993 | --libexe=* | --libex=* | --libe=*)
994 libexecdir=$ac_optarg ;;
995
996 -localedir | --localedir | --localedi | --localed | --locale)
997 ac_prev=localedir ;;
998 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
999 localedir=$ac_optarg ;;
1000
1001 -localstatedir | --localstatedir | --localstatedi | --localstated \
1002 | --localstate | --localstat | --localsta | --localst | --locals)
1003 ac_prev=localstatedir ;;
1004 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1005 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1006 localstatedir=$ac_optarg ;;
1007
1008 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1009 ac_prev=mandir ;;
1010 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1011 mandir=$ac_optarg ;;
1012
1013 -nfp | --nfp | --nf)
1014 # Obsolete; use --without-fp.
1015 with_fp=no ;;
1016
1017 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1018 | --no-cr | --no-c | -n)
1019 no_create=yes ;;
1020
1021 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1022 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1023 no_recursion=yes ;;
1024
1025 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1026 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1027 | --oldin | --oldi | --old | --ol | --o)
1028 ac_prev=oldincludedir ;;
1029 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1030 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1031 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1032 oldincludedir=$ac_optarg ;;
1033
1034 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1035 ac_prev=prefix ;;
1036 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1037 prefix=$ac_optarg ;;
1038
1039 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1040 | --program-pre | --program-pr | --program-p)
1041 ac_prev=program_prefix ;;
1042 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1043 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1044 program_prefix=$ac_optarg ;;
1045
1046 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1047 | --program-suf | --program-su | --program-s)
1048 ac_prev=program_suffix ;;
1049 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1050 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1051 program_suffix=$ac_optarg ;;
1052
1053 -program-transform-name | --program-transform-name \
1054 | --program-transform-nam | --program-transform-na \
1055 | --program-transform-n | --program-transform- \
1056 | --program-transform | --program-transfor \
1057 | --program-transfo | --program-transf \
1058 | --program-trans | --program-tran \
1059 | --progr-tra | --program-tr | --program-t)
1060 ac_prev=program_transform_name ;;
1061 -program-transform-name=* | --program-transform-name=* \
1062 | --program-transform-nam=* | --program-transform-na=* \
1063 | --program-transform-n=* | --program-transform-=* \
1064 | --program-transform=* | --program-transfor=* \
1065 | --program-transfo=* | --program-transf=* \
1066 | --program-trans=* | --program-tran=* \
1067 | --progr-tra=* | --program-tr=* | --program-t=*)
1068 program_transform_name=$ac_optarg ;;
1069
1070 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1071 ac_prev=pdfdir ;;
1072 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1073 pdfdir=$ac_optarg ;;
1074
1075 -psdir | --psdir | --psdi | --psd | --ps)
1076 ac_prev=psdir ;;
1077 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1078 psdir=$ac_optarg ;;
1079
1080 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1081 | -silent | --silent | --silen | --sile | --sil)
1082 silent=yes ;;
1083
1084 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1085 ac_prev=sbindir ;;
1086 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1087 | --sbi=* | --sb=*)
1088 sbindir=$ac_optarg ;;
1089
1090 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1091 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1092 | --sharedst | --shareds | --shared | --share | --shar \
1093 | --sha | --sh)
1094 ac_prev=sharedstatedir ;;
1095 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1096 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1097 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1098 | --sha=* | --sh=*)
1099 sharedstatedir=$ac_optarg ;;
1100
1101 -site | --site | --sit)
1102 ac_prev=site ;;
1103 -site=* | --site=* | --sit=*)
1104 site=$ac_optarg ;;
1105
1106 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1107 ac_prev=srcdir ;;
1108 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1109 srcdir=$ac_optarg ;;
1110
1111 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1112 | --syscon | --sysco | --sysc | --sys | --sy)
1113 ac_prev=sysconfdir ;;
1114 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1115 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1116 sysconfdir=$ac_optarg ;;
1117
1118 -target | --target | --targe | --targ | --tar | --ta | --t)
1119 ac_prev=target_alias ;;
1120 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1121 target_alias=$ac_optarg ;;
1122
1123 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1124 verbose=yes ;;
1125
1126 -version | --version | --versio | --versi | --vers | -V)
1127 ac_init_version=: ;;
1128
1129 -with-* | --with-*)
1130 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1131 # Reject names that are not valid shell variable names.
1132 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1133 as_fn_error $? "invalid package name: $ac_useropt"
1134 ac_useropt_orig=$ac_useropt
1135 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1136 case $ac_user_opts in
1137 *"
1138 "with_$ac_useropt"
1139 "*) ;;
1140 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1141 ac_unrecognized_sep=', ';;
1142 esac
1143 eval with_$ac_useropt=\$ac_optarg ;;
1144
1145 -without-* | --without-*)
1146 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1147 # Reject names that are not valid shell variable names.
1148 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1149 as_fn_error $? "invalid package name: $ac_useropt"
1150 ac_useropt_orig=$ac_useropt
1151 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1152 case $ac_user_opts in
1153 *"
1154 "with_$ac_useropt"
1155 "*) ;;
1156 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1157 ac_unrecognized_sep=', ';;
1158 esac
1159 eval with_$ac_useropt=no ;;
1160
1161 --x)
1162 # Obsolete; use --with-x.
1163 with_x=yes ;;
1164
1165 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1166 | --x-incl | --x-inc | --x-in | --x-i)
1167 ac_prev=x_includes ;;
1168 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1169 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1170 x_includes=$ac_optarg ;;
1171
1172 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1173 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1174 ac_prev=x_libraries ;;
1175 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1176 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1177 x_libraries=$ac_optarg ;;
1178
1179 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1180 Try \`$0 --help' for more information"
1181 ;;
1182
1183 *=*)
1184 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1185 # Reject names that are not valid shell variable names.
1186 case $ac_envvar in #(
1187 '' | [0-9]* | *[!_$as_cr_alnum]* )
1188 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1189 esac
1190 eval $ac_envvar=\$ac_optarg
1191 export $ac_envvar ;;
1192
1193 *)
1194 # FIXME: should be removed in autoconf 3.0.
1195 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1196 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1197 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1198 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1199 ;;
1200
1201 esac
1202 done
1203
1204 if test -n "$ac_prev"; then
1205 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1206 as_fn_error $? "missing argument to $ac_option"
1207 fi
1208
1209 if test -n "$ac_unrecognized_opts"; then
1210 case $enable_option_checking in
1211 no) ;;
1212 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1213 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1214 esac
1215 fi
1216
1217 # Check all directory arguments for consistency.
1218 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1219 datadir sysconfdir sharedstatedir localstatedir includedir \
1220 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1221 libdir localedir mandir
1222 do
1223 eval ac_val=\$$ac_var
1224 # Remove trailing slashes.
1225 case $ac_val in
1226 */ )
1227 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1228 eval $ac_var=\$ac_val;;
1229 esac
1230 # Be sure to have absolute directory names.
1231 case $ac_val in
1232 [\\/$]* | ?:[\\/]* ) continue;;
1233 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1234 esac
1235 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1236 done
1237
1238 # There might be people who depend on the old broken behavior: `$host'
1239 # used to hold the argument of --host etc.
1240 # FIXME: To remove some day.
1241 build=$build_alias
1242 host=$host_alias
1243 target=$target_alias
1244
1245 # FIXME: To remove some day.
1246 if test "x$host_alias" != x; then
1247 if test "x$build_alias" = x; then
1248 cross_compiling=maybe
1249 elif test "x$build_alias" != "x$host_alias"; then
1250 cross_compiling=yes
1251 fi
1252 fi
1253
1254 ac_tool_prefix=
1255 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1256
1257 test "$silent" = yes && exec 6>/dev/null
1258
1259
1260 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1261 ac_ls_di=`ls -di .` &&
1262 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1263 as_fn_error $? "working directory cannot be determined"
1264 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1265 as_fn_error $? "pwd does not report name of working directory"
1266
1267
1268 # Find the source files, if location was not specified.
1269 if test -z "$srcdir"; then
1270 ac_srcdir_defaulted=yes
1271 # Try the directory containing this script, then the parent directory.
1272 ac_confdir=`$as_dirname -- "$as_myself" ||
1273 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1274 X"$as_myself" : 'X\(//\)[^/]' \| \
1275 X"$as_myself" : 'X\(//\)$' \| \
1276 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1277 $as_echo X"$as_myself" |
1278 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1279 s//\1/
1280 q
1281 }
1282 /^X\(\/\/\)[^/].*/{
1283 s//\1/
1284 q
1285 }
1286 /^X\(\/\/\)$/{
1287 s//\1/
1288 q
1289 }
1290 /^X\(\/\).*/{
1291 s//\1/
1292 q
1293 }
1294 s/.*/./; q'`
1295 srcdir=$ac_confdir
1296 if test ! -r "$srcdir/$ac_unique_file"; then
1297 srcdir=..
1298 fi
1299 else
1300 ac_srcdir_defaulted=no
1301 fi
1302 if test ! -r "$srcdir/$ac_unique_file"; then
1303 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1304 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1305 fi
1306 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1307 ac_abs_confdir=`(
1308 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1309 pwd)`
1310 # When building in place, set srcdir=.
1311 if test "$ac_abs_confdir" = "$ac_pwd"; then
1312 srcdir=.
1313 fi
1314 # Remove unnecessary trailing slashes from srcdir.
1315 # Double slashes in file names in object file debugging info
1316 # mess up M-x gdb in Emacs.
1317 case $srcdir in
1318 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1319 esac
1320 for ac_var in $ac_precious_vars; do
1321 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1322 eval ac_env_${ac_var}_value=\$${ac_var}
1323 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1324 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1325 done
1326
1327 #
1328 # Report the --help message.
1329 #
1330 if test "$ac_init_help" = "long"; then
1331 # Omit some internal or obsolete options to make the list less imposing.
1332 # This message is too long to be a string in the A/UX 3.1 sh.
1333 cat <<_ACEOF
1334 \`configure' configures ui-utilcpp 1.8.1.snapshot20140701142031weslok to adapt to many kinds of systems.
1335
1336 Usage: $0 [OPTION]... [VAR=VALUE]...
1337
1338 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1339 VAR=VALUE. See below for descriptions of some of the useful variables.
1340
1341 Defaults for the options are specified in brackets.
1342
1343 Configuration:
1344 -h, --help display this help and exit
1345 --help=short display options specific to this package
1346 --help=recursive display the short help of all the included packages
1347 -V, --version display version information and exit
1348 -q, --quiet, --silent do not print \`checking ...' messages
1349 --cache-file=FILE cache test results in FILE [disabled]
1350 -C, --config-cache alias for \`--cache-file=config.cache'
1351 -n, --no-create do not create output files
1352 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1353
1354 Installation directories:
1355 --prefix=PREFIX install architecture-independent files in PREFIX
1356 [$ac_default_prefix]
1357 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1358 [PREFIX]
1359
1360 By default, \`make install' will install all the files in
1361 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1362 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1363 for instance \`--prefix=\$HOME'.
1364
1365 For better control, use the options below.
1366
1367 Fine tuning of the installation directories:
1368 --bindir=DIR user executables [EPREFIX/bin]
1369 --sbindir=DIR system admin executables [EPREFIX/sbin]
1370 --libexecdir=DIR program executables [EPREFIX/libexec]
1371 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1372 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1373 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1374 --libdir=DIR object code libraries [EPREFIX/lib]
1375 --includedir=DIR C header files [PREFIX/include]
1376 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1377 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1378 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1379 --infodir=DIR info documentation [DATAROOTDIR/info]
1380 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1381 --mandir=DIR man documentation [DATAROOTDIR/man]
1382 --docdir=DIR documentation root [DATAROOTDIR/doc/ui-utilcpp]
1383 --htmldir=DIR html documentation [DOCDIR]
1384 --dvidir=DIR dvi documentation [DOCDIR]
1385 --pdfdir=DIR pdf documentation [DOCDIR]
1386 --psdir=DIR ps documentation [DOCDIR]
1387 _ACEOF
1388
1389 cat <<\_ACEOF
1390
1391 Program names:
1392 --program-prefix=PREFIX prepend PREFIX to installed program names
1393 --program-suffix=SUFFIX append SUFFIX to installed program names
1394 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1395
1396 System types:
1397 --build=BUILD configure for building on BUILD [guessed]
1398 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1399 _ACEOF
1400 fi
1401
1402 if test -n "$ac_init_help"; then
1403 case $ac_init_help in
1404 short | recursive ) echo "Configuration of ui-utilcpp 1.8.1.snapshot20140701142031weslok:";;
1405 esac
1406 cat <<\_ACEOF
1407
1408 Optional Features:
1409 --disable-option-checking ignore unrecognized --enable/--with options
1410 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1411 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1412 --enable-silent-rules less verbose build output (undo: "make V=1")
1413 --disable-silent-rules verbose build output (undo: "make V=0")
1414 --disable-strerror Disable usage of strerror(3) (avoid segfaults w/ static/wrong libc).
1415
1416 --disable-ui-doxygen Disable generation of doxygen documentation.
1417 --enable-dependency-tracking
1418 do not reject slow dependency extractors
1419 --disable-dependency-tracking
1420 speeds up one-time build
1421 --enable-shared[=PKGS] build shared libraries [default=yes]
1422 --enable-static[=PKGS] build static libraries [default=yes]
1423 --enable-fast-install[=PKGS]
1424 optimize for fast installation [default=yes]
1425 --disable-libtool-lock avoid locking (might break parallel builds)
1426 --enable-libproc Use libproc for procfs parsing (has memory leak issues).
1427
1428 Optional Packages:
1429 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1430 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1431 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1432 both]
1433 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1434 --with-sysroot=DIR Search for dependent libraries within DIR
1435 (or the compiler's sysroot if not specified).
1436
1437 Some influential environment variables:
1438 CXX C++ compiler command
1439 CXXFLAGS C++ compiler flags
1440 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1441 nonstandard directory <lib dir>
1442 LIBS libraries to pass to the linker, e.g. -l<library>
1443 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1444 you have headers in a nonstandard directory <include dir>
1445 CXXCPP C++ preprocessor
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 CPP C preprocessor
1449
1450 Use these variables to override the choices made by `configure' or to help
1451 it to find libraries and programs with nonstandard names/locations.
1452
1453 Report bugs to the package provider.
1454 _ACEOF
1455 ac_status=$?
1456 fi
1457
1458 if test "$ac_init_help" = "recursive"; then
1459 # If there are subdirs, report their specific --help.
1460 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1461 test -d "$ac_dir" ||
1462 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1463 continue
1464 ac_builddir=.
1465
1466 case "$ac_dir" in
1467 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1468 *)
1469 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1470 # A ".." for each directory in $ac_dir_suffix.
1471 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1472 case $ac_top_builddir_sub in
1473 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1475 esac ;;
1476 esac
1477 ac_abs_top_builddir=$ac_pwd
1478 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1479 # for backward compatibility:
1480 ac_top_builddir=$ac_top_build_prefix
1481
1482 case $srcdir in
1483 .) # We are building in place.
1484 ac_srcdir=.
1485 ac_top_srcdir=$ac_top_builddir_sub
1486 ac_abs_top_srcdir=$ac_pwd ;;
1487 [\\/]* | ?:[\\/]* ) # Absolute name.
1488 ac_srcdir=$srcdir$ac_dir_suffix;
1489 ac_top_srcdir=$srcdir
1490 ac_abs_top_srcdir=$srcdir ;;
1491 *) # Relative name.
1492 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1493 ac_top_srcdir=$ac_top_build_prefix$srcdir
1494 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1495 esac
1496 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1497
1498 cd "$ac_dir" || { ac_status=$?; continue; }
1499 # Check for guested configure.
1500 if test -f "$ac_srcdir/configure.gnu"; then
1501 echo &&
1502 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1503 elif test -f "$ac_srcdir/configure"; then
1504 echo &&
1505 $SHELL "$ac_srcdir/configure" --help=recursive
1506 else
1507 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1508 fi || ac_status=$?
1509 cd "$ac_pwd" || { ac_status=$?; break; }
1510 done
1511 fi
1512
1513 test -n "$ac_init_help" && exit $ac_status
1514 if $ac_init_version; then
1515 cat <<\_ACEOF
1516 ui-utilcpp configure 1.8.1.snapshot20140701142031weslok
1517 generated by GNU Autoconf 2.69
1518
1519 Copyright (C) 2012 Free Software Foundation, Inc.
1520 This configure script is free software; the Free Software Foundation
1521 gives unlimited permission to copy, distribute and modify it.
1522 _ACEOF
1523 exit
1524 fi
1525
1526 ## ------------------------ ##
1527 ## Autoconf initialization. ##
1528 ## ------------------------ ##
1529
1530 # ac_fn_cxx_try_compile LINENO
1531 # ----------------------------
1532 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1533 ac_fn_cxx_try_compile ()
1534 {
1535 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1536 rm -f conftest.$ac_objext
1537 if { { ac_try="$ac_compile"
1538 case "(($ac_try" in
1539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1540 *) ac_try_echo=$ac_try;;
1541 esac
1542 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1543 $as_echo "$ac_try_echo"; } >&5
1544 (eval "$ac_compile") 2>conftest.err
1545 ac_status=$?
1546 if test -s conftest.err; then
1547 grep -v '^ *+' conftest.err >conftest.er1
1548 cat conftest.er1 >&5
1549 mv -f conftest.er1 conftest.err
1550 fi
1551 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1552 test $ac_status = 0; } && {
1553 test -z "$ac_cxx_werror_flag" ||
1554 test ! -s conftest.err
1555 } && test -s conftest.$ac_objext; then :
1556 ac_retval=0
1557 else
1558 $as_echo "$as_me: failed program was:" >&5
1559 sed 's/^/| /' conftest.$ac_ext >&5
1560
1561 ac_retval=1
1562 fi
1563 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1564 as_fn_set_status $ac_retval
1565
1566 } # ac_fn_cxx_try_compile
1567
1568 # ac_fn_cxx_try_cpp LINENO
1569 # ------------------------
1570 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1571 ac_fn_cxx_try_cpp ()
1572 {
1573 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1574 if { { ac_try="$ac_cpp conftest.$ac_ext"
1575 case "(($ac_try" in
1576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1577 *) ac_try_echo=$ac_try;;
1578 esac
1579 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1580 $as_echo "$ac_try_echo"; } >&5
1581 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1582 ac_status=$?
1583 if test -s conftest.err; then
1584 grep -v '^ *+' conftest.err >conftest.er1
1585 cat conftest.er1 >&5
1586 mv -f conftest.er1 conftest.err
1587 fi
1588 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1589 test $ac_status = 0; } > conftest.i && {
1590 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
1591 test ! -s conftest.err
1592 }; then :
1593 ac_retval=0
1594 else
1595 $as_echo "$as_me: failed program was:" >&5
1596 sed 's/^/| /' conftest.$ac_ext >&5
1597
1598 ac_retval=1
1599 fi
1600 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1601 as_fn_set_status $ac_retval
1602
1603 } # ac_fn_cxx_try_cpp
1604
1605 # ac_fn_c_try_compile LINENO
1606 # --------------------------
1607 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1608 ac_fn_c_try_compile ()
1609 {
1610 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1611 rm -f conftest.$ac_objext
1612 if { { ac_try="$ac_compile"
1613 case "(($ac_try" in
1614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1615 *) ac_try_echo=$ac_try;;
1616 esac
1617 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1618 $as_echo "$ac_try_echo"; } >&5
1619 (eval "$ac_compile") 2>conftest.err
1620 ac_status=$?
1621 if test -s conftest.err; then
1622 grep -v '^ *+' conftest.err >conftest.er1
1623 cat conftest.er1 >&5
1624 mv -f conftest.er1 conftest.err
1625 fi
1626 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1627 test $ac_status = 0; } && {
1628 test -z "$ac_c_werror_flag" ||
1629 test ! -s conftest.err
1630 } && test -s conftest.$ac_objext; then :
1631 ac_retval=0
1632 else
1633 $as_echo "$as_me: failed program was:" >&5
1634 sed 's/^/| /' conftest.$ac_ext >&5
1635
1636 ac_retval=1
1637 fi
1638 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1639 as_fn_set_status $ac_retval
1640
1641 } # ac_fn_c_try_compile
1642
1643 # ac_fn_c_try_link LINENO
1644 # -----------------------
1645 # Try to link conftest.$ac_ext, and return whether this succeeded.
1646 ac_fn_c_try_link ()
1647 {
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 rm -f conftest.$ac_objext conftest$ac_exeext
1650 if { { ac_try="$ac_link"
1651 case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654 esac
1655 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656 $as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_link") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665 test $ac_status = 0; } && {
1666 test -z "$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 } && test -s conftest$ac_exeext && {
1669 test "$cross_compiling" = yes ||
1670 test -x conftest$ac_exeext
1671 }; then :
1672 ac_retval=0
1673 else
1674 $as_echo "$as_me: failed program was:" >&5
1675 sed 's/^/| /' conftest.$ac_ext >&5
1676
1677 ac_retval=1
1678 fi
1679 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1680 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1681 # interfere with the next link command; also delete a directory that is
1682 # left behind by Apple's compiler. We do this before executing the actions.
1683 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1685 as_fn_set_status $ac_retval
1686
1687 } # ac_fn_c_try_link
1688
1689 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1690 # -------------------------------------------------------
1691 # Tests whether HEADER exists and can be compiled using the include files in
1692 # INCLUDES, setting the cache variable VAR accordingly.
1693 ac_fn_c_check_header_compile ()
1694 {
1695 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1697 $as_echo_n "checking for $2... " >&6; }
1698 if eval \${$3+:} false; then :
1699 $as_echo_n "(cached) " >&6
1700 else
1701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1702 /* end confdefs.h. */
1703 $4
1704 #include <$2>
1705 _ACEOF
1706 if ac_fn_c_try_compile "$LINENO"; then :
1707 eval "$3=yes"
1708 else
1709 eval "$3=no"
1710 fi
1711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1712 fi
1713 eval ac_res=\$$3
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1715 $as_echo "$ac_res" >&6; }
1716 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1717
1718 } # ac_fn_c_check_header_compile
1719
1720 # ac_fn_c_try_cpp LINENO
1721 # ----------------------
1722 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1723 ac_fn_c_try_cpp ()
1724 {
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 if { { ac_try="$ac_cpp conftest.$ac_ext"
1727 case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730 esac
1731 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732 $as_echo "$ac_try_echo"; } >&5
1733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
1740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1741 test $ac_status = 0; } > conftest.i && {
1742 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1743 test ! -s conftest.err
1744 }; then :
1745 ac_retval=0
1746 else
1747 $as_echo "$as_me: failed program was:" >&5
1748 sed 's/^/| /' conftest.$ac_ext >&5
1749
1750 ac_retval=1
1751 fi
1752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1753 as_fn_set_status $ac_retval
1754
1755 } # ac_fn_c_try_cpp
1756
1757 # ac_fn_c_try_run LINENO
1758 # ----------------------
1759 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1760 # that executables *can* be run.
1761 ac_fn_c_try_run ()
1762 {
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 if { { ac_try="$ac_link"
1765 case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768 esac
1769 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770 $as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_link") 2>&5
1772 ac_status=$?
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1775 { { case "(($ac_try" in
1776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777 *) ac_try_echo=$ac_try;;
1778 esac
1779 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780 $as_echo "$ac_try_echo"; } >&5
1781 (eval "$ac_try") 2>&5
1782 ac_status=$?
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; }; }; then :
1785 ac_retval=0
1786 else
1787 $as_echo "$as_me: program exited with status $ac_status" >&5
1788 $as_echo "$as_me: failed program was:" >&5
1789 sed 's/^/| /' conftest.$ac_ext >&5
1790
1791 ac_retval=$ac_status
1792 fi
1793 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1794 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1795 as_fn_set_status $ac_retval
1796
1797 } # ac_fn_c_try_run
1798
1799 # ac_fn_c_check_func LINENO FUNC VAR
1800 # ----------------------------------
1801 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1802 ac_fn_c_check_func ()
1803 {
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1806 $as_echo_n "checking for $2... " >&6; }
1807 if eval \${$3+:} false; then :
1808 $as_echo_n "(cached) " >&6
1809 else
1810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811 /* end confdefs.h. */
1812 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1813 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1814 #define $2 innocuous_$2
1815
1816 /* System header to define __stub macros and hopefully few prototypes,
1817 which can conflict with char $2 (); below.
1818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1819 <limits.h> exists even on freestanding compilers. */
1820
1821 #ifdef __STDC__
1822 # include <limits.h>
1823 #else
1824 # include <assert.h>
1825 #endif
1826
1827 #undef $2
1828
1829 /* Override any GCC internal prototype to avoid an error.
1830 Use char because int might match the return type of a GCC
1831 builtin and then its argument prototype would still apply. */
1832 #ifdef __cplusplus
1833 extern "C"
1834 #endif
1835 char $2 ();
1836 /* The GNU C library defines this for functions which it implements
1837 to always fail with ENOSYS. Some functions are actually named
1838 something starting with __ and the normal name is an alias. */
1839 #if defined __stub_$2 || defined __stub___$2
1840 choke me
1841 #endif
1842
1843 int
1844 main ()
1845 {
1846 return $2 ();
1847 ;
1848 return 0;
1849 }
1850 _ACEOF
1851 if ac_fn_c_try_link "$LINENO"; then :
1852 eval "$3=yes"
1853 else
1854 eval "$3=no"
1855 fi
1856 rm -f core conftest.err conftest.$ac_objext \
1857 conftest$ac_exeext conftest.$ac_ext
1858 fi
1859 eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861 $as_echo "$ac_res" >&6; }
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863
1864 } # ac_fn_c_check_func
1865
1866 # ac_fn_cxx_try_link LINENO
1867 # -------------------------
1868 # Try to link conftest.$ac_ext, and return whether this succeeded.
1869 ac_fn_cxx_try_link ()
1870 {
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 rm -f conftest.$ac_objext conftest$ac_exeext
1873 if { { ac_try="$ac_link"
1874 case "(($ac_try" in
1875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1876 *) ac_try_echo=$ac_try;;
1877 esac
1878 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1879 $as_echo "$ac_try_echo"; } >&5
1880 (eval "$ac_link") 2>conftest.err
1881 ac_status=$?
1882 if test -s conftest.err; then
1883 grep -v '^ *+' conftest.err >conftest.er1
1884 cat conftest.er1 >&5
1885 mv -f conftest.er1 conftest.err
1886 fi
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; } && {
1889 test -z "$ac_cxx_werror_flag" ||
1890 test ! -s conftest.err
1891 } && test -s conftest$ac_exeext && {
1892 test "$cross_compiling" = yes ||
1893 test -x conftest$ac_exeext
1894 }; then :
1895 ac_retval=0
1896 else
1897 $as_echo "$as_me: failed program was:" >&5
1898 sed 's/^/| /' conftest.$ac_ext >&5
1899
1900 ac_retval=1
1901 fi
1902 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1903 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1904 # interfere with the next link command; also delete a directory that is
1905 # left behind by Apple's compiler. We do this before executing the actions.
1906 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1908 as_fn_set_status $ac_retval
1909
1910 } # ac_fn_cxx_try_link
1911
1912 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
1913 # ---------------------------------------------------------
1914 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1915 # the include files in INCLUDES and setting the cache variable VAR
1916 # accordingly.
1917 ac_fn_cxx_check_header_mongrel ()
1918 {
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 if eval \${$3+:} false; then :
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922 $as_echo_n "checking for $2... " >&6; }
1923 if eval \${$3+:} false; then :
1924 $as_echo_n "(cached) " >&6
1925 fi
1926 eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928 $as_echo "$ac_res" >&6; }
1929 else
1930 # Is the header compilable?
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1932 $as_echo_n "checking $2 usability... " >&6; }
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934 /* end confdefs.h. */
1935 $4
1936 #include <$2>
1937 _ACEOF
1938 if ac_fn_cxx_try_compile "$LINENO"; then :
1939 ac_header_compiler=yes
1940 else
1941 ac_header_compiler=no
1942 fi
1943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1945 $as_echo "$ac_header_compiler" >&6; }
1946
1947 # Is the header present?
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1949 $as_echo_n "checking $2 presence... " >&6; }
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951 /* end confdefs.h. */
1952 #include <$2>
1953 _ACEOF
1954 if ac_fn_cxx_try_cpp "$LINENO"; then :
1955 ac_header_preproc=yes
1956 else
1957 ac_header_preproc=no
1958 fi
1959 rm -f conftest.err conftest.i conftest.$ac_ext
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1961 $as_echo "$ac_header_preproc" >&6; }
1962
1963 # So? What about this header?
1964 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
1965 yes:no: )
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1967 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1969 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1970 ;;
1971 no:yes:* )
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1973 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1975 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1977 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1979 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1981 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1982 ;;
1983 esac
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1985 $as_echo_n "checking for $2... " >&6; }
1986 if eval \${$3+:} false; then :
1987 $as_echo_n "(cached) " >&6
1988 else
1989 eval "$3=\$ac_header_compiler"
1990 fi
1991 eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993 $as_echo "$ac_res" >&6; }
1994 fi
1995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1996
1997 } # ac_fn_cxx_check_header_mongrel
1998
1999 # ac_fn_cxx_try_run LINENO
2000 # ------------------------
2001 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2002 # that executables *can* be run.
2003 ac_fn_cxx_try_run ()
2004 {
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if { { ac_try="$ac_link"
2007 case "(($ac_try" in
2008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2009 *) ac_try_echo=$ac_try;;
2010 esac
2011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2012 $as_echo "$ac_try_echo"; } >&5
2013 (eval "$ac_link") 2>&5
2014 ac_status=$?
2015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2016 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2017 { { case "(($ac_try" in
2018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2019 *) ac_try_echo=$ac_try;;
2020 esac
2021 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2022 $as_echo "$ac_try_echo"; } >&5
2023 (eval "$ac_try") 2>&5
2024 ac_status=$?
2025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026 test $ac_status = 0; }; }; then :
2027 ac_retval=0
2028 else
2029 $as_echo "$as_me: program exited with status $ac_status" >&5
2030 $as_echo "$as_me: failed program was:" >&5
2031 sed 's/^/| /' conftest.$ac_ext >&5
2032
2033 ac_retval=$ac_status
2034 fi
2035 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2036 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2037 as_fn_set_status $ac_retval
2038
2039 } # ac_fn_cxx_try_run
2040
2041 # ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES
2042 # -----------------------------------------------
2043 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2044 # accordingly.
2045 ac_fn_cxx_check_decl ()
2046 {
2047 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048 as_decl_name=`echo $2|sed 's/ *(.*//'`
2049 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2051 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2052 if eval \${$3+:} false; then :
2053 $as_echo_n "(cached) " >&6
2054 else
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056 /* end confdefs.h. */
2057 $4
2058 int
2059 main ()
2060 {
2061 #ifndef $as_decl_name
2062 #ifdef __cplusplus
2063 (void) $as_decl_use;
2064 #else
2065 (void) $as_decl_name;
2066 #endif
2067 #endif
2068
2069 ;
2070 return 0;
2071 }
2072 _ACEOF
2073 if ac_fn_cxx_try_compile "$LINENO"; then :
2074 eval "$3=yes"
2075 else
2076 eval "$3=no"
2077 fi
2078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 fi
2080 eval ac_res=\$$3
2081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2082 $as_echo "$ac_res" >&6; }
2083 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2084
2085 } # ac_fn_cxx_check_decl
2086
2087 # ac_fn_cxx_check_func LINENO FUNC VAR
2088 # ------------------------------------
2089 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2090 ac_fn_cxx_check_func ()
2091 {
2092 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2094 $as_echo_n "checking for $2... " >&6; }
2095 if eval \${$3+:} false; then :
2096 $as_echo_n "(cached) " >&6
2097 else
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099 /* end confdefs.h. */
2100 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2102 #define $2 innocuous_$2
2103
2104 /* System header to define __stub macros and hopefully few prototypes,
2105 which can conflict with char $2 (); below.
2106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2107 <limits.h> exists even on freestanding compilers. */
2108
2109 #ifdef __STDC__
2110 # include <limits.h>
2111 #else
2112 # include <assert.h>
2113 #endif
2114
2115 #undef $2
2116
2117 /* Override any GCC internal prototype to avoid an error.
2118 Use char because int might match the return type of a GCC
2119 builtin and then its argument prototype would still apply. */
2120 #ifdef __cplusplus
2121 extern "C"
2122 #endif
2123 char $2 ();
2124 /* The GNU C library defines this for functions which it implements
2125 to always fail with ENOSYS. Some functions are actually named
2126 something starting with __ and the normal name is an alias. */
2127 #if defined __stub_$2 || defined __stub___$2
2128 choke me
2129 #endif
2130
2131 int
2132 main ()
2133 {
2134 return $2 ();
2135 ;
2136 return 0;
2137 }
2138 _ACEOF
2139 if ac_fn_cxx_try_link "$LINENO"; then :
2140 eval "$3=yes"
2141 else
2142 eval "$3=no"
2143 fi
2144 rm -f core conftest.err conftest.$ac_objext \
2145 conftest$ac_exeext conftest.$ac_ext
2146 fi
2147 eval ac_res=\$$3
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2149 $as_echo "$ac_res" >&6; }
2150 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2151
2152 } # ac_fn_cxx_check_func
2153 cat >config.log <<_ACEOF
2154 This file contains any messages produced by compilers while
2155 running configure, to aid debugging if configure makes a mistake.
2156
2157 It was created by ui-utilcpp $as_me 1.8.1.snapshot20140701142031weslok, which was
2158 generated by GNU Autoconf 2.69. Invocation command line was
2159
2160 $ $0 $@
2161
2162 _ACEOF
2163 exec 5>>config.log
2164 {
2165 cat <<_ASUNAME
2166 ## --------- ##
2167 ## Platform. ##
2168 ## --------- ##
2169
2170 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2171 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2172 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2173 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2174 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2175
2176 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2177 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2178
2179 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2180 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2181 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2182 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2183 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2184 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2185 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2186
2187 _ASUNAME
2188
2189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2190 for as_dir in $PATH
2191 do
2192 IFS=$as_save_IFS
2193 test -z "$as_dir" && as_dir=.
2194 $as_echo "PATH: $as_dir"
2195 done
2196 IFS=$as_save_IFS
2197
2198 } >&5
2199
2200 cat >&5 <<_ACEOF
2201
2202
2203 ## ----------- ##
2204 ## Core tests. ##
2205 ## ----------- ##
2206
2207 _ACEOF
2208
2209
2210 # Keep a trace of the command line.
2211 # Strip out --no-create and --no-recursion so they do not pile up.
2212 # Strip out --silent because we don't want to record it for future runs.
2213 # Also quote any args containing shell meta-characters.
2214 # Make two passes to allow for proper duplicate-argument suppression.
2215 ac_configure_args=
2216 ac_configure_args0=
2217 ac_configure_args1=
2218 ac_must_keep_next=false
2219 for ac_pass in 1 2
2220 do
2221 for ac_arg
2222 do
2223 case $ac_arg in
2224 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2225 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2226 | -silent | --silent | --silen | --sile | --sil)
2227 continue ;;
2228 *\'*)
2229 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2230 esac
2231 case $ac_pass in
2232 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2233 2)
2234 as_fn_append ac_configure_args1 " '$ac_arg'"
2235 if test $ac_must_keep_next = true; then
2236 ac_must_keep_next=false # Got value, back to normal.
2237 else
2238 case $ac_arg in
2239 *=* | --config-cache | -C | -disable-* | --disable-* \
2240 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2241 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2242 | -with-* | --with-* | -without-* | --without-* | --x)
2243 case "$ac_configure_args0 " in
2244 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2245 esac
2246 ;;
2247 -* ) ac_must_keep_next=true ;;
2248 esac
2249 fi
2250 as_fn_append ac_configure_args " '$ac_arg'"
2251 ;;
2252 esac
2253 done
2254 done
2255 { ac_configure_args0=; unset ac_configure_args0;}
2256 { ac_configure_args1=; unset ac_configure_args1;}
2257
2258 # When interrupted or exit'd, cleanup temporary files, and complete
2259 # config.log. We remove comments because anyway the quotes in there
2260 # would cause problems or look ugly.
2261 # WARNING: Use '\'' to represent an apostrophe within the trap.
2262 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2263 trap 'exit_status=$?
2264 # Save into config.log some information that might help in debugging.
2265 {
2266 echo
2267
2268 $as_echo "## ---------------- ##
2269 ## Cache variables. ##
2270 ## ---------------- ##"
2271 echo
2272 # The following way of writing the cache mishandles newlines in values,
2273 (
2274 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2275 eval ac_val=\$$ac_var
2276 case $ac_val in #(
2277 *${as_nl}*)
2278 case $ac_var in #(
2279 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2280 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2281 esac
2282 case $ac_var in #(
2283 _ | IFS | as_nl) ;; #(
2284 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2285 *) { eval $ac_var=; unset $ac_var;} ;;
2286 esac ;;
2287 esac
2288 done
2289 (set) 2>&1 |
2290 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2291 *${as_nl}ac_space=\ *)
2292 sed -n \
2293 "s/'\''/'\''\\\\'\'''\''/g;
2294 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2295 ;; #(
2296 *)
2297 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2298 ;;
2299 esac |
2300 sort
2301 )
2302 echo
2303
2304 $as_echo "## ----------------- ##
2305 ## Output variables. ##
2306 ## ----------------- ##"
2307 echo
2308 for ac_var in $ac_subst_vars
2309 do
2310 eval ac_val=\$$ac_var
2311 case $ac_val in
2312 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2313 esac
2314 $as_echo "$ac_var='\''$ac_val'\''"
2315 done | sort
2316 echo
2317
2318 if test -n "$ac_subst_files"; then
2319 $as_echo "## ------------------- ##
2320 ## File substitutions. ##
2321 ## ------------------- ##"
2322 echo
2323 for ac_var in $ac_subst_files
2324 do
2325 eval ac_val=\$$ac_var
2326 case $ac_val in
2327 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2328 esac
2329 $as_echo "$ac_var='\''$ac_val'\''"
2330 done | sort
2331 echo
2332 fi
2333
2334 if test -s confdefs.h; then
2335 $as_echo "## ----------- ##
2336 ## confdefs.h. ##
2337 ## ----------- ##"
2338 echo
2339 cat confdefs.h
2340 echo
2341 fi
2342 test "$ac_signal" != 0 &&
2343 $as_echo "$as_me: caught signal $ac_signal"
2344 $as_echo "$as_me: exit $exit_status"
2345 } >&5
2346 rm -f core *.core core.conftest.* &&
2347 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2348 exit $exit_status
2349 ' 0
2350 for ac_signal in 1 2 13 15; do
2351 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2352 done
2353 ac_signal=0
2354
2355 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2356 rm -f -r conftest* confdefs.h
2357
2358 $as_echo "/* confdefs.h */" > confdefs.h
2359
2360 # Predefined preprocessor variables.
2361
2362 cat >>confdefs.h <<_ACEOF
2363 #define PACKAGE_NAME "$PACKAGE_NAME"
2364 _ACEOF
2365
2366 cat >>confdefs.h <<_ACEOF
2367 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2368 _ACEOF
2369
2370 cat >>confdefs.h <<_ACEOF
2371 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2372 _ACEOF
2373
2374 cat >>confdefs.h <<_ACEOF
2375 #define PACKAGE_STRING "$PACKAGE_STRING"
2376 _ACEOF
2377
2378 cat >>confdefs.h <<_ACEOF
2379 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2380 _ACEOF
2381
2382 cat >>confdefs.h <<_ACEOF
2383 #define PACKAGE_URL "$PACKAGE_URL"
2384 _ACEOF
2385
2386
2387 # Let the site file select an alternate cache file if it wants to.
2388 # Prefer an explicitly selected file to automatically selected ones.
2389 ac_site_file1=NONE
2390 ac_site_file2=NONE
2391 if test -n "$CONFIG_SITE"; then
2392 # We do not want a PATH search for config.site.
2393 case $CONFIG_SITE in #((
2394 -*) ac_site_file1=./$CONFIG_SITE;;
2395 */*) ac_site_file1=$CONFIG_SITE;;
2396 *) ac_site_file1=./$CONFIG_SITE;;
2397 esac
2398 elif test "x$prefix" != xNONE; then
2399 ac_site_file1=$prefix/share/config.site
2400 ac_site_file2=$prefix/etc/config.site
2401 else
2402 ac_site_file1=$ac_default_prefix/share/config.site
2403 ac_site_file2=$ac_default_prefix/etc/config.site
2404 fi
2405 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2406 do
2407 test "x$ac_site_file" = xNONE && continue
2408 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2410 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2411 sed 's/^/| /' "$ac_site_file" >&5
2412 . "$ac_site_file" \
2413 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2414 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2415 as_fn_error $? "failed to load site script $ac_site_file
2416 See \`config.log' for more details" "$LINENO" 5; }
2417 fi
2418 done
2419
2420 if test -r "$cache_file"; then
2421 # Some versions of bash will fail to source /dev/null (special files
2422 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2423 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2425 $as_echo "$as_me: loading cache $cache_file" >&6;}
2426 case $cache_file in
2427 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2428 *) . "./$cache_file";;
2429 esac
2430 fi
2431 else
2432 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2433 $as_echo "$as_me: creating cache $cache_file" >&6;}
2434 >$cache_file
2435 fi
2436
2437 # Check that the precious variables saved in the cache have kept the same
2438 # value.
2439 ac_cache_corrupted=false
2440 for ac_var in $ac_precious_vars; do
2441 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2442 eval ac_new_set=\$ac_env_${ac_var}_set
2443 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2444 eval ac_new_val=\$ac_env_${ac_var}_value
2445 case $ac_old_set,$ac_new_set in
2446 set,)
2447 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2448 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2449 ac_cache_corrupted=: ;;
2450 ,set)
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2452 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2453 ac_cache_corrupted=: ;;
2454 ,);;
2455 *)
2456 if test "x$ac_old_val" != "x$ac_new_val"; then
2457 # differences in whitespace do not lead to failure.
2458 ac_old_val_w=`echo x $ac_old_val`
2459 ac_new_val_w=`echo x $ac_new_val`
2460 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2462 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2463 ac_cache_corrupted=:
2464 else
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2466 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2467 eval $ac_var=\$ac_old_val
2468 fi
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2470 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2472 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2473 fi;;
2474 esac
2475 # Pass precious variables to config.status.
2476 if test "$ac_new_set" = set; then
2477 case $ac_new_val in
2478 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2479 *) ac_arg=$ac_var=$ac_new_val ;;
2480 esac
2481 case " $ac_configure_args " in
2482 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2483 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2484 esac
2485 fi
2486 done
2487 if $ac_cache_corrupted; then
2488 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2489 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2490 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2491 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2492 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2493 fi
2494 ## -------------------- ##
2495 ## Main body of script. ##
2496 ## -------------------- ##
2497
2498 ac_ext=c
2499 ac_cpp='$CPP $CPPFLAGS'
2500 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2501 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2502 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2503
2504
2505
2506 am__api_version='1.14'
2507
2508 ac_aux_dir=
2509 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2510 if test -f "$ac_dir/install-sh"; then
2511 ac_aux_dir=$ac_dir
2512 ac_install_sh="$ac_aux_dir/install-sh -c"
2513 break
2514 elif test -f "$ac_dir/install.sh"; then
2515 ac_aux_dir=$ac_dir
2516 ac_install_sh="$ac_aux_dir/install.sh -c"
2517 break
2518 elif test -f "$ac_dir/shtool"; then
2519 ac_aux_dir=$ac_dir
2520 ac_install_sh="$ac_aux_dir/shtool install -c"
2521 break
2522 fi
2523 done
2524 if test -z "$ac_aux_dir"; then
2525 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2526 fi
2527
2528 # These three variables are undocumented and unsupported,
2529 # and are intended to be withdrawn in a future Autoconf release.
2530 # They can cause serious problems if a builder's source tree is in a directory
2531 # whose full name contains unusual characters.
2532 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2533 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2534 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2535
2536
2537 # Find a good install program. We prefer a C program (faster),
2538 # so one script is as good as another. But avoid the broken or
2539 # incompatible versions:
2540 # SysV /etc/install, /usr/sbin/install
2541 # SunOS /usr/etc/install
2542 # IRIX /sbin/install
2543 # AIX /bin/install
2544 # AmigaOS /C/install, which installs bootblocks on floppy discs
2545 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2546 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2547 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2548 # OS/2's system install, which has a completely different semantic
2549 # ./install, which can be erroneously created by make from ./install.sh.
2550 # Reject install programs that cannot install multiple files.
2551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2552 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2553 if test -z "$INSTALL"; then
2554 if ${ac_cv_path_install+:} false; then :
2555 $as_echo_n "(cached) " >&6
2556 else
2557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2558 for as_dir in $PATH
2559 do
2560 IFS=$as_save_IFS
2561 test -z "$as_dir" && as_dir=.
2562 # Account for people who put trailing slashes in PATH elements.
2563 case $as_dir/ in #((
2564 ./ | .// | /[cC]/* | \
2565 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2566 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2567 /usr/ucb/* ) ;;
2568 *)
2569 # OSF1 and SCO ODT 3.0 have their own names for install.
2570 # Don't use installbsd from OSF since it installs stuff as root
2571 # by default.
2572 for ac_prog in ginstall scoinst install; do
2573 for ac_exec_ext in '' $ac_executable_extensions; do
2574 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2575 if test $ac_prog = install &&
2576 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2577 # AIX install. It has an incompatible calling convention.
2578 :
2579 elif test $ac_prog = install &&
2580 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2581 # program-specific install script used by HP pwplus--don't use.
2582 :
2583 else
2584 rm -rf conftest.one conftest.two conftest.dir
2585 echo one > conftest.one
2586 echo two > conftest.two
2587 mkdir conftest.dir
2588 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2589 test -s conftest.one && test -s conftest.two &&
2590 test -s conftest.dir/conftest.one &&
2591 test -s conftest.dir/conftest.two
2592 then
2593 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2594 break 3
2595 fi
2596 fi
2597 fi
2598 done
2599 done
2600 ;;
2601 esac
2602
2603 done
2604 IFS=$as_save_IFS
2605
2606 rm -rf conftest.one conftest.two conftest.dir
2607
2608 fi
2609 if test "${ac_cv_path_install+set}" = set; then
2610 INSTALL=$ac_cv_path_install
2611 else
2612 # As a last resort, use the slow shell script. Don't cache a
2613 # value for INSTALL within a source directory, because that will
2614 # break other packages using the cache if that directory is
2615 # removed, or if the value is a relative name.
2616 INSTALL=$ac_install_sh
2617 fi
2618 fi
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2620 $as_echo "$INSTALL" >&6; }
2621
2622 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2623 # It thinks the first close brace ends the variable substitution.
2624 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2625
2626 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2627
2628 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2629
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2631 $as_echo_n "checking whether build environment is sane... " >&6; }
2632 # Reject unsafe characters in $srcdir or the absolute working directory
2633 # name. Accept space and tab only in the latter.
2634 am_lf='
2635 '
2636 case `pwd` in
2637 *[\\\"\#\$\&\'\`$am_lf]*)
2638 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2639 esac
2640 case $srcdir in
2641 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2642 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2643 esac
2644
2645 # Do 'set' in a subshell so we don't clobber the current shell's
2646 # arguments. Must try -L first in case configure is actually a
2647 # symlink; some systems play weird games with the mod time of symlinks
2648 # (eg FreeBSD returns the mod time of the symlink's containing
2649 # directory).
2650 if (
2651 am_has_slept=no
2652 for am_try in 1 2; do
2653 echo "timestamp, slept: $am_has_slept" > conftest.file
2654 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2655 if test "$*" = "X"; then
2656 # -L didn't work.
2657 set X `ls -t "$srcdir/configure" conftest.file`
2658 fi
2659 if test "$*" != "X $srcdir/configure conftest.file" \
2660 && test "$*" != "X conftest.file $srcdir/configure"; then
2661
2662 # If neither matched, then we have a broken ls. This can happen
2663 # if, for instance, CONFIG_SHELL is bash and it inherits a
2664 # broken ls alias from the environment. This has actually
2665 # happened. Such a system could not be considered "sane".
2666 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2667 alias in your environment" "$LINENO" 5
2668 fi
2669 if test "$2" = conftest.file || test $am_try -eq 2; then
2670 break
2671 fi
2672 # Just in case.
2673 sleep 1
2674 am_has_slept=yes
2675 done
2676 test "$2" = conftest.file
2677 )
2678 then
2679 # Ok.
2680 :
2681 else
2682 as_fn_error $? "newly created file is older than distributed files!
2683 Check your system clock" "$LINENO" 5
2684 fi
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2686 $as_echo "yes" >&6; }
2687 # If we didn't sleep, we still need to ensure time stamps of config.status and
2688 # generated files are strictly newer.
2689 am_sleep_pid=
2690 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2691 ( sleep 1 ) &
2692 am_sleep_pid=$!
2693 fi
2694
2695 rm -f conftest.file
2696
2697 test "$program_prefix" != NONE &&
2698 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2699 # Use a double $ so make ignores it.
2700 test "$program_suffix" != NONE &&
2701 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2702 # Double any \ or $.
2703 # By default was `s,x,x', remove it if useless.
2704 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2705 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2706
2707 # expand $ac_aux_dir to an absolute path
2708 am_aux_dir=`cd $ac_aux_dir && pwd`
2709
2710 if test x"${MISSING+set}" != xset; then
2711 case $am_aux_dir in
2712 *\ * | *\ *)
2713 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2714 *)
2715 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2716 esac
2717 fi
2718 # Use eval to expand $SHELL
2719 if eval "$MISSING --is-lightweight"; then
2720 am_missing_run="$MISSING "
2721 else
2722 am_missing_run=
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2724 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2725 fi
2726
2727 if test x"${install_sh}" != xset; then
2728 case $am_aux_dir in
2729 *\ * | *\ *)
2730 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2731 *)
2732 install_sh="\${SHELL} $am_aux_dir/install-sh"
2733 esac
2734 fi
2735
2736 # Installed binaries are usually stripped using 'strip' when the user
2737 # run "make install-strip". However 'strip' might not be the right
2738 # tool to use in cross-compilation environments, therefore Automake
2739 # will honor the 'STRIP' environment variable to overrule this program.
2740 if test "$cross_compiling" != no; then
2741 if test -n "$ac_tool_prefix"; then
2742 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2743 set dummy ${ac_tool_prefix}strip; ac_word=$2
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2745 $as_echo_n "checking for $ac_word... " >&6; }
2746 if ${ac_cv_prog_STRIP+:} false; then :
2747 $as_echo_n "(cached) " >&6
2748 else
2749 if test -n "$STRIP"; then
2750 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2751 else
2752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2753 for as_dir in $PATH
2754 do
2755 IFS=$as_save_IFS
2756 test -z "$as_dir" && as_dir=.
2757 for ac_exec_ext in '' $ac_executable_extensions; do
2758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2759 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2761 break 2
2762 fi
2763 done
2764 done
2765 IFS=$as_save_IFS
2766
2767 fi
2768 fi
2769 STRIP=$ac_cv_prog_STRIP
2770 if test -n "$STRIP"; then
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2772 $as_echo "$STRIP" >&6; }
2773 else
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2775 $as_echo "no" >&6; }
2776 fi
2777
2778
2779 fi
2780 if test -z "$ac_cv_prog_STRIP"; then
2781 ac_ct_STRIP=$STRIP
2782 # Extract the first word of "strip", so it can be a program name with args.
2783 set dummy strip; ac_word=$2
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2785 $as_echo_n "checking for $ac_word... " >&6; }
2786 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2787 $as_echo_n "(cached) " >&6
2788 else
2789 if test -n "$ac_ct_STRIP"; then
2790 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2791 else
2792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2793 for as_dir in $PATH
2794 do
2795 IFS=$as_save_IFS
2796 test -z "$as_dir" && as_dir=.
2797 for ac_exec_ext in '' $ac_executable_extensions; do
2798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2799 ac_cv_prog_ac_ct_STRIP="strip"
2800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2801 break 2
2802 fi
2803 done
2804 done
2805 IFS=$as_save_IFS
2806
2807 fi
2808 fi
2809 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2810 if test -n "$ac_ct_STRIP"; then
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2812 $as_echo "$ac_ct_STRIP" >&6; }
2813 else
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2815 $as_echo "no" >&6; }
2816 fi
2817
2818 if test "x$ac_ct_STRIP" = x; then
2819 STRIP=":"
2820 else
2821 case $cross_compiling:$ac_tool_warned in
2822 yes:)
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2824 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2825 ac_tool_warned=yes ;;
2826 esac
2827 STRIP=$ac_ct_STRIP
2828 fi
2829 else
2830 STRIP="$ac_cv_prog_STRIP"
2831 fi
2832
2833 fi
2834 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2835
2836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2837 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2838 if test -z "$MKDIR_P"; then
2839 if ${ac_cv_path_mkdir+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841 else
2842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2843 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2844 do
2845 IFS=$as_save_IFS
2846 test -z "$as_dir" && as_dir=.
2847 for ac_prog in mkdir gmkdir; do
2848 for ac_exec_ext in '' $ac_executable_extensions; do
2849 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
2850 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2851 'mkdir (GNU coreutils) '* | \
2852 'mkdir (coreutils) '* | \
2853 'mkdir (fileutils) '4.1*)
2854 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2855 break 3;;
2856 esac
2857 done
2858 done
2859 done
2860 IFS=$as_save_IFS
2861
2862 fi
2863
2864 test -d ./--version && rmdir ./--version
2865 if test "${ac_cv_path_mkdir+set}" = set; then
2866 MKDIR_P="$ac_cv_path_mkdir -p"
2867 else
2868 # As a last resort, use the slow shell script. Don't cache a
2869 # value for MKDIR_P within a source directory, because that will
2870 # break other packages using the cache if that directory is
2871 # removed, or if the value is a relative name.
2872 MKDIR_P="$ac_install_sh -d"
2873 fi
2874 fi
2875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2876 $as_echo "$MKDIR_P" >&6; }
2877
2878 for ac_prog in gawk mawk nawk awk
2879 do
2880 # Extract the first word of "$ac_prog", so it can be a program name with args.
2881 set dummy $ac_prog; ac_word=$2
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883 $as_echo_n "checking for $ac_word... " >&6; }
2884 if ${ac_cv_prog_AWK+:} false; then :
2885 $as_echo_n "(cached) " >&6
2886 else
2887 if test -n "$AWK"; then
2888 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2889 else
2890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891 for as_dir in $PATH
2892 do
2893 IFS=$as_save_IFS
2894 test -z "$as_dir" && as_dir=.
2895 for ac_exec_ext in '' $ac_executable_extensions; do
2896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2897 ac_cv_prog_AWK="$ac_prog"
2898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2899 break 2
2900 fi
2901 done
2902 done
2903 IFS=$as_save_IFS
2904
2905 fi
2906 fi
2907 AWK=$ac_cv_prog_AWK
2908 if test -n "$AWK"; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2910 $as_echo "$AWK" >&6; }
2911 else
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913 $as_echo "no" >&6; }
2914 fi
2915
2916
2917 test -n "$AWK" && break
2918 done
2919
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2921 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2922 set x ${MAKE-make}
2923 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2924 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2925 $as_echo_n "(cached) " >&6
2926 else
2927 cat >conftest.make <<\_ACEOF
2928 SHELL = /bin/sh
2929 all:
2930 @echo '@@@%%%=$(MAKE)=@@@%%%'
2931 _ACEOF
2932 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2933 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2934 *@@@%%%=?*=@@@%%%*)
2935 eval ac_cv_prog_make_${ac_make}_set=yes;;
2936 *)
2937 eval ac_cv_prog_make_${ac_make}_set=no;;
2938 esac
2939 rm -f conftest.make
2940 fi
2941 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2943 $as_echo "yes" >&6; }
2944 SET_MAKE=
2945 else
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2947 $as_echo "no" >&6; }
2948 SET_MAKE="MAKE=${MAKE-make}"
2949 fi
2950
2951 rm -rf .tst 2>/dev/null
2952 mkdir .tst 2>/dev/null
2953 if test -d .tst; then
2954 am__leading_dot=.
2955 else
2956 am__leading_dot=_
2957 fi
2958 rmdir .tst 2>/dev/null
2959
2960 # Check whether --enable-silent-rules was given.
2961 if test "${enable_silent_rules+set}" = set; then :
2962 enableval=$enable_silent_rules;
2963 fi
2964
2965 case $enable_silent_rules in # (((
2966 yes) AM_DEFAULT_VERBOSITY=0;;
2967 no) AM_DEFAULT_VERBOSITY=1;;
2968 *) AM_DEFAULT_VERBOSITY=1;;
2969 esac
2970 am_make=${MAKE-make}
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2972 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2973 if ${am_cv_make_support_nested_variables+:} false; then :
2974 $as_echo_n "(cached) " >&6
2975 else
2976 if $as_echo 'TRUE=$(BAR$(V))
2977 BAR0=false
2978 BAR1=true
2979 V=1
2980 am__doit:
2981 @$(TRUE)
2982 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2983 am_cv_make_support_nested_variables=yes
2984 else
2985 am_cv_make_support_nested_variables=no
2986 fi
2987 fi
2988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2989 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2990 if test $am_cv_make_support_nested_variables = yes; then
2991 AM_V='$(V)'
2992 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2993 else
2994 AM_V=$AM_DEFAULT_VERBOSITY
2995 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2996 fi
2997 AM_BACKSLASH='\'
2998
2999
3000
3001
3002 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3003 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3004 # is not polluted with repeated "-I."
3005 am__isrc=' -I$(srcdir)'
3006 # test to see if srcdir already configured
3007 if test -f $srcdir/config.status; then
3008 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3009 fi
3010 fi
3011
3012 # test whether we have cygpath
3013 if test -z "$CYGPATH_W"; then
3014 if (cygpath --version) >/dev/null 2>/dev/null; then
3015 CYGPATH_W='cygpath -w'
3016 else
3017 CYGPATH_W=echo
3018 fi
3019 fi
3020
3021
3022 # Define the identity of the package.
3023 PACKAGE='ui-utilcpp'
3024 VERSION='1.8.1.snapshot20140701142031weslok'
3025
3026
3027 cat >>confdefs.h <<_ACEOF
3028 #define PACKAGE "$PACKAGE"
3029 _ACEOF
3030
3031
3032 cat >>confdefs.h <<_ACEOF
3033 #define VERSION "$VERSION"
3034 _ACEOF
3035
3036 # Some tools Automake needs.
3037
3038 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3039
3040
3041 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3042
3043
3044 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3045
3046
3047 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3048
3049
3050 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3051
3052 # For better backward compatibility. To be removed once Automake 1.9.x
3053 # dies out for good. For more background, see:
3054 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3055 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3056 mkdir_p='$(MKDIR_P)'
3057
3058 # We need awk for the "check" target. The system "awk" is bad on
3059 # some platforms.
3060 # Always define AMTAR for backward compatibility. Yes, it's still used
3061 # in the wild :-( We should find a proper way to deprecate it ...
3062 AMTAR='$${TAR-tar}'
3063
3064
3065 # We'll loop over all known methods to create a tar archive until one works.
3066 _am_tools='gnutar pax cpio none'
3067
3068
3069
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
3071 $as_echo_n "checking how to create a pax tar archive... " >&6; }
3072
3073 # Go ahead even if we have the value already cached. We do so because we
3074 # need to set the values for the 'am__tar' and 'am__untar' variables.
3075 _am_tools=${am_cv_prog_tar_pax-$_am_tools}
3076
3077 for _am_tool in $_am_tools; do
3078 case $_am_tool in
3079 gnutar)
3080 for _am_tar in tar gnutar gtar; do
3081 { echo "$as_me:$LINENO: $_am_tar --version" >&5
3082 ($_am_tar --version) >&5 2>&5
3083 ac_status=$?
3084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3085 (exit $ac_status); } && break
3086 done
3087 am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
3088 am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
3089 am__untar="$_am_tar -xf -"
3090 ;;
3091 plaintar)
3092 # Must skip GNU tar: if it does not support --format= it doesn't create
3093 # ustar tarball either.
3094 (tar --version) >/dev/null 2>&1 && continue
3095 am__tar='tar chf - "$$tardir"'
3096 am__tar_='tar chf - "$tardir"'
3097 am__untar='tar xf -'
3098 ;;
3099 pax)
3100 am__tar='pax -L -x pax -w "$$tardir"'
3101 am__tar_='pax -L -x pax -w "$tardir"'
3102 am__untar='pax -r'
3103 ;;
3104 cpio)
3105 am__tar='find "$$tardir" -print | cpio -o -H pax -L'
3106 am__tar_='find "$tardir" -print | cpio -o -H pax -L'
3107 am__untar='cpio -i -H pax -d'
3108 ;;
3109 none)
3110 am__tar=false
3111 am__tar_=false
3112 am__untar=false
3113 ;;
3114 esac
3115
3116 # If the value was cached, stop now. We just wanted to have am__tar
3117 # and am__untar set.
3118 test -n "${am_cv_prog_tar_pax}" && break
3119
3120 # tar/untar a dummy directory, and stop if the command works.
3121 rm -rf conftest.dir
3122 mkdir conftest.dir
3123 echo GrepMe > conftest.dir/file
3124 { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
3125 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
3126 ac_status=$?
3127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3128 (exit $ac_status); }
3129 rm -rf conftest.dir
3130 if test -s conftest.tar; then
3131 { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
3132 ($am__untar <conftest.tar) >&5 2>&5
3133 ac_status=$?
3134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3135 (exit $ac_status); }
3136 { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
3137 (cat conftest.dir/file) >&5 2>&5
3138 ac_status=$?
3139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3140 (exit $ac_status); }
3141 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3142 fi
3143 done
3144 rm -rf conftest.dir
3145
3146 if ${am_cv_prog_tar_pax+:} false; then :
3147 $as_echo_n "(cached) " >&6
3148 else
3149 am_cv_prog_tar_pax=$_am_tool
3150 fi
3151
3152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
3153 $as_echo "$am_cv_prog_tar_pax" >&6; }
3154
3155
3156
3157
3158
3159
3160 # POSIX will say in a future version that running "rm -f" with no argument
3161 # is OK; and we want to be able to make that assumption in our Makefile
3162 # recipes. So use an aggressive probe to check that the usage we want is
3163 # actually supported "in the wild" to an acceptable degree.
3164 # See automake bug#10828.
3165 # To make any issue more visible, cause the running configure to be aborted
3166 # by default if the 'rm' program in use doesn't match our expectations; the
3167 # user can still override this though.
3168 if rm -f && rm -fr && rm -rf; then : OK; else
3169 cat >&2 <<'END'
3170 Oops!
3171
3172 Your 'rm' program seems unable to run without file operands specified
3173 on the command line, even when the '-f' option is present. This is contrary
3174 to the behaviour of most rm programs out there, and not conforming with
3175 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3176
3177 Please tell bug-automake@gnu.org about your system, including the value
3178 of your $PATH and any error possibly output before this message. This
3179 can help us improve future automake versions.
3180
3181 END
3182 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3183 echo 'Configuration will proceed anyway, since you have set the' >&2
3184 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3185 echo >&2
3186 else
3187 cat >&2 <<'END'
3188 Aborting the configuration process, to ensure you take notice of the issue.
3189
3190 You can download and install GNU coreutils to get an 'rm' implementation
3191 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3192
3193 If you want to complete the configuration process using your problematic
3194 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3195 to "yes", and re-run configure.
3196
3197 END
3198 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3199 fi
3200 fi
3201
3202
3203 if test -z "${PACKAGE_VERSION}"; then
3204 as_fn_error $? "Cant continue: PACKAGE_VERSION missing." "$LINENO" 5
3205 fi
3206 SO_VERSION=9:0:0
3207
3208
3209 TOOLDIR=
3210 if test -z "${TOOLDIR}"; then
3211 TOOLDIR="src/tools"
3212 fi
3213
3214 INCDIR=
3215 if test -z "${INCDIR}"; then
3216 INCDIR="src/${PACKAGE_NAME}"
3217 fi
3218
3219 UI_AUTO_AM="ui-auto.am"
3220 rm -v -f "${UI_AUTO_AM}"
3221
3222
3223
3224 echo -n "
3225 # These are the generic ui-auto rules rules (add these to your Makefile.am appropriately to *-local targets).
3226 .PHONY: ui-auto-all ui-auto-clean ui-auto-dist ui-auto-distclean ui-auto-install-data ui-auto-install-exec ui-auto-uninstall
3227
3228 ui-auto-am-clean:
3229 rm -f "${UI_AUTO_AM}"
3230
3231 .PHONY: ui-auto-am-clean
3232
3233 # Set dependencies for generic rules
3234 ui-auto-distclean: ui-auto-am-clean
3235 " >>"ui-auto.am"
3236
3237
3238 S_NAME="${PACKAGE_NAME}-version"
3239 S_PATH="${TOOLDIR}/${S_NAME}"
3240 V_MAJOR=`echo ${PACKAGE_VERSION} | cut -d'.' -f1`
3241 V_MINOR=`echo ${PACKAGE_VERSION} | cut -d'.' -f2`
3242 V_PATCH=`echo ${PACKAGE_VERSION} | cut -d'.' -f3`
3243
3244 mkdir -p `dirname "${S_PATH}"`
3245 cat <<EOF >"${S_PATH}"
3246 #!/bin/sh -e
3247 echo "UI_PACKAGE=\"${PACKAGE_NAME}\""
3248 echo "UI_VERSION=\"${PACKAGE_VERSION}\""
3249 echo "UI_VERSION_MAJOR=\"${V_MAJOR}\""
3250 echo "UI_VERSION_MINOR=\"${V_MINOR}\""
3251 echo "UI_VERSION_PATCH=\"${V_PATCH}\""
3252 EOF
3253
3254 if test -n "${SO_VERSION}"; then
3255 LV_IF=`echo ${SO_VERSION} | cut -d':' -f1`
3256 LV_REV=`echo ${SO_VERSION} | cut -d':' -f2`
3257 LV_AGE=`echo ${SO_VERSION} | cut -d':' -f3`
3258 LV_MAJOR=$[LV_IF - LV_AGE]
3259 LV_MINOR=${LV_AGE}
3260 LV_PATCH=${LV_REV}
3261 SO_VERSION_SYS="${LV_MAJOR}.${LV_MINOR}.${LV_PATCH}"
3262
3263 cat <<EOF >>"${S_PATH}"
3264 echo "UI_SO_VERSION=\"${SO_VERSION_SYS}\""
3265 echo "UI_SO_VERSION_MAJOR=\"${LV_MAJOR}\""
3266 echo "UI_SO_VERSION_MINOR=\"${LV_MINOR}\""
3267 echo "UI_SO_VERSION_PATCH=\"${LV_PATCH}\""
3268 EOF
3269 fi
3270 chmod +x "${S_PATH}"
3271
3272 S_NAME_CAP=`echo "${S_NAME}" | tr "[:lower:]" "[:upper:]"`
3273 cat <<EOF >"${S_PATH}.1"
3274 .TH ${S_NAME_CAP} "1"
3275 .SH NAME
3276 ${S_NAME} \- Print parsable version information for development package ${PACKAGE_NAME}.
3277 .SH SYNOPSIS
3278 .PP
3279 .B ${S_NAME}
3280 .SH DESCRIPTION
3281 .PP
3282 Prints version information for installed development package
3283 ${PACKAGE_NAME} in a parsable way.
3284
3285 This is intended to be used by automatic version checks of build systems.
3286 .SH AUTHOR
3287 Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`.
3288 EOF
3289
3290
3291 echo -n "
3292 ui-version-script-install:
3293 install -d -m755 \"\$(DESTDIR)\$(bindir)\"
3294 install -m755 \"${S_PATH}\" \"\$(DESTDIR)\$(bindir)\"
3295 install -d -m755 \"\$(DESTDIR)\$(mandir)/man1\"
3296 install -m644 \"${S_PATH}.1\" \"\$(DESTDIR)\$(mandir)/man1\"
3297
3298 ui-version-script-uninstall:
3299 rm -f \"\$(DESTDIR)\$(bindir)/${S_NAME}\" \"\$(DESTDIR)\$(mandir)/man1/${S_NAME}.1\"
3300
3301 ui-version-script-clean:
3302 rm -f "${S_PATH}" "${S_PATH}.1"
3303
3304 .PHONY: ui-version-script-install ui-version-script-uninstall ui-version-script-clean
3305
3306 # Set dependencies for generic rules
3307 ui-auto-distclean: ui-version-script-clean
3308 ui-auto-install-exec: ui-version-script-install
3309 ui-auto-uninstall: ui-version-script-uninstall
3310 " >>"ui-auto.am"
3311
3312
3313 if test -n "${SO_VERSION}"; then
3314 I_NAME="version.h"
3315 I_PATH="${INCDIR}/${I_NAME}"
3316 HEADER_NAME=`echo "${PACKAGE_NAME}" | tr - _ | tr a-z A-Z`
3317 mkdir -p `dirname "${I_PATH}"`
3318 cat <<EOF >"${I_PATH}"
3319 #ifndef ${HEADER_NAME}_VERSION_H
3320 #define ${HEADER_NAME}_VERSION_H
3321
3322 /** @{ @brief ui-auto'mated version macros. */
3323 #define ${HEADER_NAME}_VERSION "${PACKAGE_VERSION}"
3324 #define ${HEADER_NAME}_VERSION_MAJOR ${V_MAJOR}
3325 #define ${HEADER_NAME}_VERSION_MINOR ${V_MINOR}
3326 #define ${HEADER_NAME}_VERSION_PATCH ${V_PATCH}
3327 /** @} */
3328 /** @{ @brief ui-auto'mated library version support. */
3329 #define ${HEADER_NAME}_LIBVERSION "${SO_VERSION_SYS}"
3330 #define ${HEADER_NAME}_LIBVERSION_MAJOR ${LV_MAJOR}
3331 #define ${HEADER_NAME}_LIBVERSION_MINOR ${LV_MINOR}
3332 #define ${HEADER_NAME}_LIBVERSION_PATCH ${LV_PATCH}
3333 /** @} */
3334 #endif
3335 EOF
3336
3337 echo -n "
3338 ui-version-header-install:
3339 install -d -m755 \"\$(DESTDIR)\$(incdir)\"
3340 install -m644 \"${I_PATH}\" \"\$(DESTDIR)\$(incdir)\"
3341
3342 ui-version-header-uninstall:
3343 rm -f \"\$(DESTDIR)\$(incdir)/${I_NAME}\"
3344
3345 ui-version-header-clean:
3346 rm -f "${I_PATH}"
3347
3348 .PHONY: ui-version-header-install ui-version-header-uninstall ui-version-header-clean
3349
3350 # Set dependencies for generic rules
3351 ui-auto-distclean: ui-version-header-clean
3352 ui-auto-install-exec: ui-version-header-install
3353 ui-auto-uninstall: ui-version-header-uninstall
3354 " >>"ui-auto.am"
3355
3356 fi
3357
3358 ac_config_headers="$ac_config_headers config.h"
3359
3360
3361 # Check whether --enable-strerror was given.
3362 if test "${enable_strerror+set}" = set; then :
3363 enableval=$enable_strerror; UI_UTILCPP_CXXFLAGS="${UI_UTILCPP_CXXFLAGS} -DUI_UTILCPP_DISABLE_STRERROR"
3364 fi
3365
3366
3367
3368
3369
3370 # Check whether --enable-ui-doxygen was given.
3371 if test "${enable_ui_doxygen+set}" = set; then :
3372 enableval=$enable_ui_doxygen;
3373 UI_DOXYGEN_ENABLED="${enableval}"
3374
3375 fi
3376
3377
3378 UI_DOXYGEN_TARGETS='def html latex man rtf xml'
3379 if test "$UI_DOXYGEN_ENABLED" = "no"; then
3380 UI_DOXYGEN_MAKE="mkdir autodoc && for d in ${UI_DOXYGEN_TARGETS}; do echo 'Doxygen documentation was disabled by configure option.' >autodoc/\$\${d}; done"
3381 else
3382
3383 # Extract the first word of "doxygen", so it can be a program name with args.
3384 set dummy doxygen; ac_word=$2
3385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3386 $as_echo_n "checking for $ac_word... " >&6; }
3387 if ${ac_cv_path_DOXYGEN+:} false; then :
3388 $as_echo_n "(cached) " >&6
3389 else
3390 case $DOXYGEN in
3391 [\\/]* | ?:[\\/]*)
3392 ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
3393 ;;
3394 *)
3395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3396 for as_dir in $PATH
3397 do
3398 IFS=$as_save_IFS
3399 test -z "$as_dir" && as_dir=.
3400 for ac_exec_ext in '' $ac_executable_extensions; do
3401 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3402 ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
3403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3404 break 2
3405 fi
3406 done
3407 done
3408 IFS=$as_save_IFS
3409
3410 ;;
3411 esac
3412 fi
3413 DOXYGEN=$ac_cv_path_DOXYGEN
3414 if test -n "$DOXYGEN"; then
3415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
3416 $as_echo "$DOXYGEN" >&6; }
3417 else
3418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3419 $as_echo "no" >&6; }
3420 fi
3421
3422
3423
3424 if test x"$DOXYGEN" = "x" -o x"$DOXYGEN" = "xno"; then
3425 if test x"" = "xwarn"; then
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Missing support for: Program doxygen." >&5
3427 $as_echo "$as_me: WARNING: Missing support for: Program doxygen." >&2;}
3428 else
3429 as_fn_error $? "Missing support for: Program doxygen." "$LINENO" 5
3430 fi
3431 fi
3432
3433
3434
3435 # Extract the first word of "perl", so it can be a program name with args.
3436 set dummy perl; ac_word=$2
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438 $as_echo_n "checking for $ac_word... " >&6; }
3439 if ${ac_cv_path_PERL+:} false; then :
3440 $as_echo_n "(cached) " >&6
3441 else
3442 case $PERL in
3443 [\\/]* | ?:[\\/]*)
3444 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
3445 ;;
3446 *)
3447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3448 for as_dir in $PATH
3449 do
3450 IFS=$as_save_IFS
3451 test -z "$as_dir" && as_dir=.
3452 for ac_exec_ext in '' $ac_executable_extensions; do
3453 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3454 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
3455 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3456 break 2
3457 fi
3458 done
3459 done
3460 IFS=$as_save_IFS
3461
3462 ;;
3463 esac
3464 fi
3465 PERL=$ac_cv_path_PERL
3466 if test -n "$PERL"; then
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
3468 $as_echo "$PERL" >&6; }
3469 else
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3471 $as_echo "no" >&6; }
3472 fi
3473
3474
3475
3476 if test x"$PERL" = "x" -o x"$PERL" = "xno"; then
3477 if test x"" = "xwarn"; then
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Missing support for: Program perl." >&5
3479 $as_echo "$as_me: WARNING: Missing support for: Program perl." >&2;}
3480 else
3481 as_fn_error $? "Missing support for: Program perl." "$LINENO" 5
3482 fi
3483 fi
3484
3485
3486 UI_DOXYGEN_MAKE='$(DOXYGEN) Doxyfile'
3487 fi
3488
3489
3490 echo -n "
3491
3492 ui-doxygen:
3493 rm -rf autodoc && ${UI_DOXYGEN_MAKE}
3494 touch ui-doxygen
3495
3496 ui-doxygen-clean:
3497 rm -rf autodoc ui-doxygen
3498
3499 ui-doxygen-install: ui-doxygen
3500 install -d \$(DESTDIR)\$(docdir) && \
3501 chmod -R u=rwx,g=rx,o=rx \$(DESTDIR)\$(docdir) && \
3502 cp -a autodoc/* \$(DESTDIR)\$(docdir)
3503
3504 ui-doxygen-uninstall:
3505 for d in ${UI_DOXYGEN_TARGETS}; do \
3506 chmod -R u+wx \$(DESTDIR)\$(docdir)/\$\${d} 2>/dev/null || true ; \
3507 rm -rf \$(DESTDIR)\$(docdir)/\$\${d}; \
3508 done
3509
3510 .PHONY: ui-doxygen-clean ui-doxygen-install ui-doxygen-uninstall
3511
3512 ui-auto-all: ui-doxygen
3513 ui-auto-clean: ui-doxygen-clean
3514 ui-auto-install-data: ui-doxygen-install
3515 ui-auto-uninstall: ui-doxygen-uninstall
3516
3517 " >>"ui-auto.am"
3518
3519
3520
3521
3522 echo -n "
3523 ui-distdir-cruft:
3524 test ! -z \$(distdir)
3525 rm -rf \`find \$(distdir) -type d -name "CVS" -o -name ".svn" -o -name ".git"\`
3526 rm -f \`find \$(distdir) -type f -name ".cvsignore" -or -name CVSDUMMY -or -name '*~' -or -name '#*#' -or -name '.#*'\`
3527
3528 .PHONY: ui-distdir-cruft
3529
3530 # Set dependencies for generic rules
3531 ui-auto-dist: ui-distdir-cruft
3532 " >>"ui-auto.am"
3533
3534
3535
3536 # Checks for programs.
3537 DEPDIR="${am__leading_dot}deps"
3538
3539 ac_config_commands="$ac_config_commands depfiles"
3540
3541
3542 am_make=${MAKE-make}
3543 cat > confinc << 'END'
3544 am__doit:
3545 @echo this is the am__doit target
3546 .PHONY: am__doit
3547 END
3548 # If we don't find an include directive, just comment out the code.
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3550 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3551 am__include="#"
3552 am__quote=
3553 _am_result=none
3554 # First try GNU make style include.
3555 echo "include confinc" > confmf
3556 # Ignore all kinds of additional output from 'make'.
3557 case `$am_make -s -f confmf 2> /dev/null` in #(
3558 *the\ am__doit\ target*)
3559 am__include=include
3560 am__quote=
3561 _am_result=GNU
3562 ;;
3563 esac
3564 # Now try BSD make style include.
3565 if test "$am__include" = "#"; then
3566 echo '.include "confinc"' > confmf
3567 case `$am_make -s -f confmf 2> /dev/null` in #(
3568 *the\ am__doit\ target*)
3569 am__include=.include
3570 am__quote="\""
3571 _am_result=BSD
3572 ;;
3573 esac
3574 fi
3575
3576
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3578 $as_echo "$_am_result" >&6; }
3579 rm -f confinc confmf
3580
3581 # Check whether --enable-dependency-tracking was given.
3582 if test "${enable_dependency_tracking+set}" = set; then :
3583 enableval=$enable_dependency_tracking;
3584 fi
3585
3586 if test "x$enable_dependency_tracking" != xno; then
3587 am_depcomp="$ac_aux_dir/depcomp"
3588 AMDEPBACKSLASH='\'
3589 am__nodep='_no'
3590 fi
3591 if test "x$enable_dependency_tracking" != xno; then
3592 AMDEP_TRUE=
3593 AMDEP_FALSE='#'
3594 else
3595 AMDEP_TRUE='#'
3596 AMDEP_FALSE=
3597 fi
3598
3599
3600
3601 ac_ext=cpp
3602 ac_cpp='$CXXCPP $CPPFLAGS'
3603 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3604 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3605 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3606 if test -z "$CXX"; then
3607 if test -n "$CCC"; then
3608 CXX=$CCC
3609 else
3610 if test -n "$ac_tool_prefix"; then
3611 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3612 do
3613 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3614 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616 $as_echo_n "checking for $ac_word... " >&6; }
3617 if ${ac_cv_prog_CXX+:} false; then :
3618 $as_echo_n "(cached) " >&6
3619 else
3620 if test -n "$CXX"; then
3621 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3622 else
3623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624 for as_dir in $PATH
3625 do
3626 IFS=$as_save_IFS
3627 test -z "$as_dir" && as_dir=.
3628 for ac_exec_ext in '' $ac_executable_extensions; do
3629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3630 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3632 break 2
3633 fi
3634 done
3635 done
3636 IFS=$as_save_IFS
3637
3638 fi
3639 fi
3640 CXX=$ac_cv_prog_CXX
3641 if test -n "$CXX"; then
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3643 $as_echo "$CXX" >&6; }
3644 else
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646 $as_echo "no" >&6; }
3647 fi
3648
3649
3650 test -n "$CXX" && break
3651 done
3652 fi
3653 if test -z "$CXX"; then
3654 ac_ct_CXX=$CXX
3655 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3656 do
3657 # Extract the first word of "$ac_prog", so it can be a program name with args.
3658 set dummy $ac_prog; ac_word=$2
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3660 $as_echo_n "checking for $ac_word... " >&6; }
3661 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3662 $as_echo_n "(cached) " >&6
3663 else
3664 if test -n "$ac_ct_CXX"; then
3665 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3666 else
3667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3668 for as_dir in $PATH
3669 do
3670 IFS=$as_save_IFS
3671 test -z "$as_dir" && as_dir=.
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3674 ac_cv_prog_ac_ct_CXX="$ac_prog"
3675 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3676 break 2
3677 fi
3678 done
3679 done
3680 IFS=$as_save_IFS
3681
3682 fi
3683 fi
3684 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3685 if test -n "$ac_ct_CXX"; then
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3687 $as_echo "$ac_ct_CXX" >&6; }
3688 else
3689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3690 $as_echo "no" >&6; }
3691 fi
3692
3693
3694 test -n "$ac_ct_CXX" && break
3695 done
3696
3697 if test "x$ac_ct_CXX" = x; then
3698 CXX="g++"
3699 else
3700 case $cross_compiling:$ac_tool_warned in
3701 yes:)
3702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3703 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3704 ac_tool_warned=yes ;;
3705 esac
3706 CXX=$ac_ct_CXX
3707 fi
3708 fi
3709
3710 fi
3711 fi
3712 # Provide some information about the compiler.
3713 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3714 set X $ac_compile
3715 ac_compiler=$2
3716 for ac_option in --version -v -V -qversion; do
3717 { { ac_try="$ac_compiler $ac_option >&5"
3718 case "(($ac_try" in
3719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3720 *) ac_try_echo=$ac_try;;
3721 esac
3722 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3723 $as_echo "$ac_try_echo"; } >&5
3724 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3725 ac_status=$?
3726 if test -s conftest.err; then
3727 sed '10a\
3728 ... rest of stderr output deleted ...
3729 10q' conftest.err >conftest.er1
3730 cat conftest.er1 >&5
3731 fi
3732 rm -f conftest.er1 conftest.err
3733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734 test $ac_status = 0; }
3735 done
3736
3737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3738 /* end confdefs.h. */
3739
3740 int
3741 main ()
3742 {
3743
3744 ;
3745 return 0;
3746 }
3747 _ACEOF
3748 ac_clean_files_save=$ac_clean_files
3749 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3750 # Try to create an executable without -o first, disregard a.out.
3751 # It will help us diagnose broken compilers, and finding out an intuition
3752 # of exeext.
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
3754 $as_echo_n "checking whether the C++ compiler works... " >&6; }
3755 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3756
3757 # The possible output files:
3758 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3759
3760 ac_rmfiles=
3761 for ac_file in $ac_files
3762 do
3763 case $ac_file in
3764 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3765 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3766 esac
3767 done
3768 rm -f $ac_rmfiles
3769
3770 if { { ac_try="$ac_link_default"
3771 case "(($ac_try" in
3772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3773 *) ac_try_echo=$ac_try;;
3774 esac
3775 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3776 $as_echo "$ac_try_echo"; } >&5
3777 (eval "$ac_link_default") 2>&5
3778 ac_status=$?
3779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3780 test $ac_status = 0; }; then :
3781 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3782 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3783 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3784 # so that the user can short-circuit this test for compilers unknown to
3785 # Autoconf.
3786 for ac_file in $ac_files ''
3787 do
3788 test -f "$ac_file" || continue
3789 case $ac_file in
3790 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3791 ;;
3792 [ab].out )
3793 # We found the default executable, but exeext='' is most
3794 # certainly right.
3795 break;;
3796 *.* )
3797 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3798 then :; else
3799 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3800 fi
3801 # We set ac_cv_exeext here because the later test for it is not
3802 # safe: cross compilers may not add the suffix if given an `-o'
3803 # argument, so we may need to know it at that point already.
3804 # Even if this section looks crufty: it has the advantage of
3805 # actually working.
3806 break;;
3807 * )
3808 break;;
3809 esac
3810 done
3811 test "$ac_cv_exeext" = no && ac_cv_exeext=
3812
3813 else
3814 ac_file=''
3815 fi
3816 if test -z "$ac_file"; then :
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3818 $as_echo "no" >&6; }
3819 $as_echo "$as_me: failed program was:" >&5
3820 sed 's/^/| /' conftest.$ac_ext >&5
3821
3822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3823 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3824 as_fn_error 77 "C++ compiler cannot create executables
3825 See \`config.log' for more details" "$LINENO" 5; }
3826 else
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3828 $as_echo "yes" >&6; }
3829 fi
3830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
3831 $as_echo_n "checking for C++ compiler default output file name... " >&6; }
3832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3833 $as_echo "$ac_file" >&6; }
3834 ac_exeext=$ac_cv_exeext
3835
3836 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3837 ac_clean_files=$ac_clean_files_save
3838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3839 $as_echo_n "checking for suffix of executables... " >&6; }
3840 if { { ac_try="$ac_link"
3841 case "(($ac_try" in
3842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3843 *) ac_try_echo=$ac_try;;
3844 esac
3845 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3846 $as_echo "$ac_try_echo"; } >&5
3847 (eval "$ac_link") 2>&5
3848 ac_status=$?
3849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3850 test $ac_status = 0; }; then :
3851 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3852 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3853 # work properly (i.e., refer to `conftest.exe'), while it won't with
3854 # `rm'.
3855 for ac_file in conftest.exe conftest conftest.*; do
3856 test -f "$ac_file" || continue
3857 case $ac_file in
3858 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3859 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3860 break;;
3861 * ) break;;
3862 esac
3863 done
3864 else
3865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3866 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3867 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3868 See \`config.log' for more details" "$LINENO" 5; }
3869 fi
3870 rm -f conftest conftest$ac_cv_exeext
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3872 $as_echo "$ac_cv_exeext" >&6; }
3873
3874 rm -f conftest.$ac_ext
3875 EXEEXT=$ac_cv_exeext
3876 ac_exeext=$EXEEXT
3877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3878 /* end confdefs.h. */
3879 #include <stdio.h>
3880 int
3881 main ()
3882 {
3883 FILE *f = fopen ("conftest.out", "w");
3884 return ferror (f) || fclose (f) != 0;
3885
3886 ;
3887 return 0;
3888 }
3889 _ACEOF
3890 ac_clean_files="$ac_clean_files conftest.out"
3891 # Check that the compiler produces executables we can run. If not, either
3892 # the compiler is broken, or we cross compile.
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3894 $as_echo_n "checking whether we are cross compiling... " >&6; }
3895 if test "$cross_compiling" != yes; then
3896 { { ac_try="$ac_link"
3897 case "(($ac_try" in
3898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3899 *) ac_try_echo=$ac_try;;
3900 esac
3901 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3902 $as_echo "$ac_try_echo"; } >&5
3903 (eval "$ac_link") 2>&5
3904 ac_status=$?
3905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3906 test $ac_status = 0; }
3907 if { ac_try='./conftest$ac_cv_exeext'
3908 { { case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911 esac
3912 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3913 $as_echo "$ac_try_echo"; } >&5
3914 (eval "$ac_try") 2>&5
3915 ac_status=$?
3916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }; }; then
3918 cross_compiling=no
3919 else
3920 if test "$cross_compiling" = maybe; then
3921 cross_compiling=yes
3922 else
3923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3924 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3925 as_fn_error $? "cannot run C++ compiled programs.
3926 If you meant to cross compile, use \`--host'.
3927 See \`config.log' for more details" "$LINENO" 5; }
3928 fi
3929 fi
3930 fi
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3932 $as_echo "$cross_compiling" >&6; }
3933
3934 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3935 ac_clean_files=$ac_clean_files_save
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3937 $as_echo_n "checking for suffix of object files... " >&6; }
3938 if ${ac_cv_objext+:} false; then :
3939 $as_echo_n "(cached) " >&6
3940 else
3941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3942 /* end confdefs.h. */
3943
3944 int
3945 main ()
3946 {
3947
3948 ;
3949 return 0;
3950 }
3951 _ACEOF
3952 rm -f conftest.o conftest.obj
3953 if { { ac_try="$ac_compile"
3954 case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957 esac
3958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959 $as_echo "$ac_try_echo"; } >&5
3960 (eval "$ac_compile") 2>&5
3961 ac_status=$?
3962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
3964 for ac_file in conftest.o conftest.obj conftest.*; do
3965 test -f "$ac_file" || continue;
3966 case $ac_file in
3967 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3968 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3969 break;;
3970 esac
3971 done
3972 else
3973 $as_echo "$as_me: failed program was:" >&5
3974 sed 's/^/| /' conftest.$ac_ext >&5
3975
3976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3977 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3978 as_fn_error $? "cannot compute suffix of object files: cannot compile
3979 See \`config.log' for more details" "$LINENO" 5; }
3980 fi
3981 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3982 fi
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3984 $as_echo "$ac_cv_objext" >&6; }
3985 OBJEXT=$ac_cv_objext
3986 ac_objext=$OBJEXT
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3988 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3989 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3990 $as_echo_n "(cached) " >&6
3991 else
3992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3993 /* end confdefs.h. */
3994
3995 int
3996 main ()
3997 {
3998 #ifndef __GNUC__
3999 choke me
4000 #endif
4001
4002 ;
4003 return 0;
4004 }
4005 _ACEOF
4006 if ac_fn_cxx_try_compile "$LINENO"; then :
4007 ac_compiler_gnu=yes
4008 else
4009 ac_compiler_gnu=no
4010 fi
4011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4012 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4013
4014 fi
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4016 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4017 if test $ac_compiler_gnu = yes; then
4018 GXX=yes
4019 else
4020 GXX=
4021 fi
4022 ac_test_CXXFLAGS=${CXXFLAGS+set}
4023 ac_save_CXXFLAGS=$CXXFLAGS
4024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4025 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4026 if ${ac_cv_prog_cxx_g+:} false; then :
4027 $as_echo_n "(cached) " >&6
4028 else
4029 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4030 ac_cxx_werror_flag=yes
4031 ac_cv_prog_cxx_g=no
4032 CXXFLAGS="-g"
4033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4034 /* end confdefs.h. */
4035
4036 int
4037 main ()
4038 {
4039
4040 ;
4041 return 0;
4042 }
4043 _ACEOF
4044 if ac_fn_cxx_try_compile "$LINENO"; then :
4045 ac_cv_prog_cxx_g=yes
4046 else
4047 CXXFLAGS=""
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049 /* end confdefs.h. */
4050
4051 int
4052 main ()
4053 {
4054
4055 ;
4056 return 0;
4057 }
4058 _ACEOF
4059 if ac_fn_cxx_try_compile "$LINENO"; then :
4060
4061 else
4062 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4063 CXXFLAGS="-g"
4064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4065 /* end confdefs.h. */
4066
4067 int
4068 main ()
4069 {
4070
4071 ;
4072 return 0;
4073 }
4074 _ACEOF
4075 if ac_fn_cxx_try_compile "$LINENO"; then :
4076 ac_cv_prog_cxx_g=yes
4077 fi
4078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4079 fi
4080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4081 fi
4082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4083 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4084 fi
4085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4086 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4087 if test "$ac_test_CXXFLAGS" = set; then
4088 CXXFLAGS=$ac_save_CXXFLAGS
4089 elif test $ac_cv_prog_cxx_g = yes; then
4090 if test "$GXX" = yes; then
4091 CXXFLAGS="-g -O2"
4092 else
4093 CXXFLAGS="-g"
4094 fi
4095 else
4096 if test "$GXX" = yes; then
4097 CXXFLAGS="-O2"
4098 else
4099 CXXFLAGS=
4100 fi
4101 fi
4102 ac_ext=c
4103 ac_cpp='$CPP $CPPFLAGS'
4104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4107
4108 depcc="$CXX" am_compiler_list=
4109
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4111 $as_echo_n "checking dependency style of $depcc... " >&6; }
4112 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
4113 $as_echo_n "(cached) " >&6
4114 else
4115 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4116 # We make a subdir and do the tests there. Otherwise we can end up
4117 # making bogus files that we don't know about and never remove. For
4118 # instance it was reported that on HP-UX the gcc test will end up
4119 # making a dummy file named 'D' -- because '-MD' means "put the output
4120 # in D".
4121 rm -rf conftest.dir
4122 mkdir conftest.dir
4123 # Copy depcomp to subdir because otherwise we won't find it if we're
4124 # using a relative directory.
4125 cp "$am_depcomp" conftest.dir
4126 cd conftest.dir
4127 # We will build objects and dependencies in a subdirectory because
4128 # it helps to detect inapplicable dependency modes. For instance
4129 # both Tru64's cc and ICC support -MD to output dependencies as a
4130 # side effect of compilation, but ICC will put the dependencies in
4131 # the current directory while Tru64 will put them in the object
4132 # directory.
4133 mkdir sub
4134
4135 am_cv_CXX_dependencies_compiler_type=none
4136 if test "$am_compiler_list" = ""; then
4137 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4138 fi
4139 am__universal=false
4140 case " $depcc " in #(
4141 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4142 esac
4143
4144 for depmode in $am_compiler_list; do
4145 # Setup a source with many dependencies, because some compilers
4146 # like to wrap large dependency lists on column 80 (with \), and
4147 # we should not choose a depcomp mode which is confused by this.
4148 #
4149 # We need to recreate these files for each test, as the compiler may
4150 # overwrite some of them when testing with obscure command lines.
4151 # This happens at least with the AIX C compiler.
4152 : > sub/conftest.c
4153 for i in 1 2 3 4 5 6; do
4154 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4155 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4156 # Solaris 10 /bin/sh.
4157 echo '/* dummy */' > sub/conftst$i.h
4158 done
4159 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4160
4161 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4162 # mode. It turns out that the SunPro C++ compiler does not properly
4163 # handle '-M -o', and we need to detect this. Also, some Intel
4164 # versions had trouble with output in subdirs.
4165 am__obj=sub/conftest.${OBJEXT-o}
4166 am__minus_obj="-o $am__obj"
4167 case $depmode in
4168 gcc)
4169 # This depmode causes a compiler race in universal mode.
4170 test "$am__universal" = false || continue
4171 ;;
4172 nosideeffect)
4173 # After this tag, mechanisms are not by side-effect, so they'll
4174 # only be used when explicitly requested.
4175 if test "x$enable_dependency_tracking" = xyes; then
4176 continue
4177 else
4178 break
4179 fi
4180 ;;
4181 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4182 # This compiler won't grok '-c -o', but also, the minuso test has
4183 # not run yet. These depmodes are late enough in the game, and
4184 # so weak that their functioning should not be impacted.
4185 am__obj=conftest.${OBJEXT-o}
4186 am__minus_obj=
4187 ;;
4188 none) break ;;
4189 esac
4190 if depmode=$depmode \
4191 source=sub/conftest.c object=$am__obj \
4192 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4193 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4194 >/dev/null 2>conftest.err &&
4195 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4196 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4197 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4198 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4199 # icc doesn't choke on unknown options, it will just issue warnings
4200 # or remarks (even with -Werror). So we grep stderr for any message
4201 # that says an option was ignored or not supported.
4202 # When given -MP, icc 7.0 and 7.1 complain thusly:
4203 # icc: Command line warning: ignoring option '-M'; no argument required
4204 # The diagnosis changed in icc 8.0:
4205 # icc: Command line remark: option '-MP' not supported
4206 if (grep 'ignoring option' conftest.err ||
4207 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4208 am_cv_CXX_dependencies_compiler_type=$depmode
4209 break
4210 fi
4211 fi
4212 done
4213
4214 cd ..
4215 rm -rf conftest.dir
4216 else
4217 am_cv_CXX_dependencies_compiler_type=none
4218 fi
4219
4220 fi
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
4222 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
4223 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
4224
4225 if
4226 test "x$enable_dependency_tracking" != xno \
4227 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
4228 am__fastdepCXX_TRUE=
4229 am__fastdepCXX_FALSE='#'
4230 else
4231 am__fastdepCXX_TRUE='#'
4232 am__fastdepCXX_FALSE=
4233 fi
4234
4235
4236 if test "x$GXX" = "xyes"; then
4237 if ${CXX} --version | grep "2\.9[]0123456789[]\..*"; then
4238 as_fn_error $? "We cannot use g++-2.9*; pls use at least g++-3.0." "$LINENO" 5
4239 fi
4240 fi
4241
4242 ac_ext=cpp
4243 ac_cpp='$CXXCPP $CPPFLAGS'
4244 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4245 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4246 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
4248 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
4249 if test -z "$CXXCPP"; then
4250 if ${ac_cv_prog_CXXCPP+:} false; then :
4251 $as_echo_n "(cached) " >&6
4252 else
4253 # Double quotes because CXXCPP needs to be expanded
4254 for CXXCPP in "$CXX -E" "/lib/cpp"
4255 do
4256 ac_preproc_ok=false
4257 for ac_cxx_preproc_warn_flag in '' yes
4258 do
4259 # Use a header file that comes with gcc, so configuring glibc
4260 # with a fresh cross-compiler works.
4261 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4262 # <limits.h> exists even on freestanding compilers.
4263 # On the NeXT, cc -E runs the code through the compiler's parser,
4264 # not just through cpp. "Syntax error" is here to catch this case.
4265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4266 /* end confdefs.h. */
4267 #ifdef __STDC__
4268 # include <limits.h>
4269 #else
4270 # include <assert.h>
4271 #endif
4272 Syntax error
4273 _ACEOF
4274 if ac_fn_cxx_try_cpp "$LINENO"; then :
4275
4276 else
4277 # Broken: fails on valid input.
4278 continue
4279 fi
4280 rm -f conftest.err conftest.i conftest.$ac_ext
4281
4282 # OK, works on sane cases. Now check whether nonexistent headers
4283 # can be detected and how.
4284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h. */
4286 #include <ac_nonexistent.h>
4287 _ACEOF
4288 if ac_fn_cxx_try_cpp "$LINENO"; then :
4289 # Broken: success on invalid input.
4290 continue
4291 else
4292 # Passes both tests.
4293 ac_preproc_ok=:
4294 break
4295 fi
4296 rm -f conftest.err conftest.i conftest.$ac_ext
4297
4298 done
4299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4300 rm -f conftest.i conftest.err conftest.$ac_ext
4301 if $ac_preproc_ok; then :
4302 break
4303 fi
4304
4305 done
4306 ac_cv_prog_CXXCPP=$CXXCPP
4307
4308 fi
4309 CXXCPP=$ac_cv_prog_CXXCPP
4310 else
4311 ac_cv_prog_CXXCPP=$CXXCPP
4312 fi
4313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
4314 $as_echo "$CXXCPP" >&6; }
4315 ac_preproc_ok=false
4316 for ac_cxx_preproc_warn_flag in '' yes
4317 do
4318 # Use a header file that comes with gcc, so configuring glibc
4319 # with a fresh cross-compiler works.
4320 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4321 # <limits.h> exists even on freestanding compilers.
4322 # On the NeXT, cc -E runs the code through the compiler's parser,
4323 # not just through cpp. "Syntax error" is here to catch this case.
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325 /* end confdefs.h. */
4326 #ifdef __STDC__
4327 # include <limits.h>
4328 #else
4329 # include <assert.h>
4330 #endif
4331 Syntax error
4332 _ACEOF
4333 if ac_fn_cxx_try_cpp "$LINENO"; then :
4334
4335 else
4336 # Broken: fails on valid input.
4337 continue
4338 fi
4339 rm -f conftest.err conftest.i conftest.$ac_ext
4340
4341 # OK, works on sane cases. Now check whether nonexistent headers
4342 # can be detected and how.
4343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4344 /* end confdefs.h. */
4345 #include <ac_nonexistent.h>
4346 _ACEOF
4347 if ac_fn_cxx_try_cpp "$LINENO"; then :
4348 # Broken: success on invalid input.
4349 continue
4350 else
4351 # Passes both tests.
4352 ac_preproc_ok=:
4353 break
4354 fi
4355 rm -f conftest.err conftest.i conftest.$ac_ext
4356
4357 done
4358 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4359 rm -f conftest.i conftest.err conftest.$ac_ext
4360 if $ac_preproc_ok; then :
4361
4362 else
4363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4364 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4365 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
4366 See \`config.log' for more details" "$LINENO" 5; }
4367 fi
4368
4369 ac_ext=c
4370 ac_cpp='$CPP $CPPFLAGS'
4371 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4372 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4373 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4374
4375
4376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
4377 $as_echo_n "checking whether ln -s works... " >&6; }
4378 LN_S=$as_ln_s
4379 if test "$LN_S" = "ln -s"; then
4380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4381 $as_echo "yes" >&6; }
4382 else
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
4384 $as_echo "no, using $LN_S" >&6; }
4385 fi
4386
4387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4388 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4389 set x ${MAKE-make}
4390 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4391 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393 else
4394 cat >conftest.make <<\_ACEOF
4395 SHELL = /bin/sh
4396 all:
4397 @echo '@@@%%%=$(MAKE)=@@@%%%'
4398 _ACEOF
4399 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4400 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4401 *@@@%%%=?*=@@@%%%*)
4402 eval ac_cv_prog_make_${ac_make}_set=yes;;
4403 *)
4404 eval ac_cv_prog_make_${ac_make}_set=no;;
4405 esac
4406 rm -f conftest.make
4407 fi
4408 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4410 $as_echo "yes" >&6; }
4411 SET_MAKE=
4412 else
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4414 $as_echo "no" >&6; }
4415 SET_MAKE="MAKE=${MAKE-make}"
4416 fi
4417
4418 case `pwd` in
4419 *\ * | *\ *)
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
4421 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
4422 esac
4423
4424
4425
4426 macro_version='2.4.2'
4427 macro_revision='1.3337'
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441 ltmain="$ac_aux_dir/ltmain.sh"
4442
4443 # Make sure we can run config.sub.
4444 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4445 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4446
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4448 $as_echo_n "checking build system type... " >&6; }
4449 if ${ac_cv_build+:} false; then :
4450 $as_echo_n "(cached) " >&6
4451 else
4452 ac_build_alias=$build_alias
4453 test "x$ac_build_alias" = x &&
4454 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4455 test "x$ac_build_alias" = x &&
4456 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4457 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4458 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4459
4460 fi
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4462 $as_echo "$ac_cv_build" >&6; }
4463 case $ac_cv_build in
4464 *-*-*) ;;
4465 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4466 esac
4467 build=$ac_cv_build
4468 ac_save_IFS=$IFS; IFS='-'
4469 set x $ac_cv_build
4470 shift
4471 build_cpu=$1
4472 build_vendor=$2
4473 shift; shift
4474 # Remember, the first character of IFS is used to create $*,
4475 # except with old shells:
4476 build_os=$*
4477 IFS=$ac_save_IFS
4478 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4479
4480
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4482 $as_echo_n "checking host system type... " >&6; }
4483 if ${ac_cv_host+:} false; then :
4484 $as_echo_n "(cached) " >&6
4485 else
4486 if test "x$host_alias" = x; then
4487 ac_cv_host=$ac_cv_build
4488 else
4489 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4490 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4491 fi
4492
4493 fi
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4495 $as_echo "$ac_cv_host" >&6; }
4496 case $ac_cv_host in
4497 *-*-*) ;;
4498 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4499 esac
4500 host=$ac_cv_host
4501 ac_save_IFS=$IFS; IFS='-'
4502 set x $ac_cv_host
4503 shift
4504 host_cpu=$1
4505 host_vendor=$2
4506 shift; shift
4507 # Remember, the first character of IFS is used to create $*,
4508 # except with old shells:
4509 host_os=$*
4510 IFS=$ac_save_IFS
4511 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4512
4513
4514 # Backslashify metacharacters that are still active within
4515 # double-quoted strings.
4516 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
4517
4518 # Same as above, but do not quote variable references.
4519 double_quote_subst='s/\(["`\\]\)/\\\1/g'
4520
4521 # Sed substitution to delay expansion of an escaped shell variable in a
4522 # double_quote_subst'ed string.
4523 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4524
4525 # Sed substitution to delay expansion of an escaped single quote.
4526 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
4527
4528 # Sed substitution to avoid accidental globbing in evaled expressions
4529 no_glob_subst='s/\*/\\\*/g'
4530
4531 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4532 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4533 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4534
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
4536 $as_echo_n "checking how to print strings... " >&6; }
4537 # Test print first, because it will be a builtin if present.
4538 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4539 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4540 ECHO='print -r --'
4541 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4542 ECHO='printf %s\n'
4543 else
4544 # Use this function as a fallback that always works.
4545 func_fallback_echo ()
4546 {
4547 eval 'cat <<_LTECHO_EOF
4548 $1
4549 _LTECHO_EOF'
4550 }
4551 ECHO='func_fallback_echo'
4552 fi
4553
4554 # func_echo_all arg...
4555 # Invoke $ECHO with all args, space-separated.
4556 func_echo_all ()
4557 {
4558 $ECHO ""
4559 }
4560
4561 case "$ECHO" in
4562 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
4563 $as_echo "printf" >&6; } ;;
4564 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
4565 $as_echo "print -r" >&6; } ;;
4566 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
4567 $as_echo "cat" >&6; } ;;
4568 esac
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583 ac_ext=c
4584 ac_cpp='$CPP $CPPFLAGS'
4585 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4586 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4587 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4588 if test -n "$ac_tool_prefix"; then
4589 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4590 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4592 $as_echo_n "checking for $ac_word... " >&6; }
4593 if ${ac_cv_prog_CC+:} false; then :
4594 $as_echo_n "(cached) " >&6
4595 else
4596 if test -n "$CC"; then
4597 ac_cv_prog_CC="$CC" # Let the user override the test.
4598 else
4599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600 for as_dir in $PATH
4601 do
4602 IFS=$as_save_IFS
4603 test -z "$as_dir" && as_dir=.
4604 for ac_exec_ext in '' $ac_executable_extensions; do
4605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4606 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4608 break 2
4609 fi
4610 done
4611 done
4612 IFS=$as_save_IFS
4613
4614 fi
4615 fi
4616 CC=$ac_cv_prog_CC
4617 if test -n "$CC"; then
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4619 $as_echo "$CC" >&6; }
4620 else
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4622 $as_echo "no" >&6; }
4623 fi
4624
4625
4626 fi
4627 if test -z "$ac_cv_prog_CC"; then
4628 ac_ct_CC=$CC
4629 # Extract the first word of "gcc", so it can be a program name with args.
4630 set dummy gcc; ac_word=$2
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632 $as_echo_n "checking for $ac_word... " >&6; }
4633 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635 else
4636 if test -n "$ac_ct_CC"; then
4637 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4638 else
4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4640 for as_dir in $PATH
4641 do
4642 IFS=$as_save_IFS
4643 test -z "$as_dir" && as_dir=.
4644 for ac_exec_ext in '' $ac_executable_extensions; do
4645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4646 ac_cv_prog_ac_ct_CC="gcc"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4648 break 2
4649 fi
4650 done
4651 done
4652 IFS=$as_save_IFS
4653
4654 fi
4655 fi
4656 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4657 if test -n "$ac_ct_CC"; then
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4659 $as_echo "$ac_ct_CC" >&6; }
4660 else
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662 $as_echo "no" >&6; }
4663 fi
4664
4665 if test "x$ac_ct_CC" = x; then
4666 CC=""
4667 else
4668 case $cross_compiling:$ac_tool_warned in
4669 yes:)
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4671 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4672 ac_tool_warned=yes ;;
4673 esac
4674 CC=$ac_ct_CC
4675 fi
4676 else
4677 CC="$ac_cv_prog_CC"
4678 fi
4679
4680 if test -z "$CC"; then
4681 if test -n "$ac_tool_prefix"; then
4682 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4683 set dummy ${ac_tool_prefix}cc; ac_word=$2
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685 $as_echo_n "checking for $ac_word... " >&6; }
4686 if ${ac_cv_prog_CC+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688 else
4689 if test -n "$CC"; then
4690 ac_cv_prog_CC="$CC" # Let the user override the test.
4691 else
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693 for as_dir in $PATH
4694 do
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
4698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699 ac_cv_prog_CC="${ac_tool_prefix}cc"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4702 fi
4703 done
4704 done
4705 IFS=$as_save_IFS
4706
4707 fi
4708 fi
4709 CC=$ac_cv_prog_CC
4710 if test -n "$CC"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4712 $as_echo "$CC" >&6; }
4713 else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715 $as_echo "no" >&6; }
4716 fi
4717
4718
4719 fi
4720 fi
4721 if test -z "$CC"; then
4722 # Extract the first word of "cc", so it can be a program name with args.
4723 set dummy cc; ac_word=$2
4724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725 $as_echo_n "checking for $ac_word... " >&6; }
4726 if ${ac_cv_prog_CC+:} false; then :
4727 $as_echo_n "(cached) " >&6
4728 else
4729 if test -n "$CC"; then
4730 ac_cv_prog_CC="$CC" # Let the user override the test.
4731 else
4732 ac_prog_rejected=no
4733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4734 for as_dir in $PATH
4735 do
4736 IFS=$as_save_IFS
4737 test -z "$as_dir" && as_dir=.
4738 for ac_exec_ext in '' $ac_executable_extensions; do
4739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4740 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4741 ac_prog_rejected=yes
4742 continue
4743 fi
4744 ac_cv_prog_CC="cc"
4745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4746 break 2
4747 fi
4748 done
4749 done
4750 IFS=$as_save_IFS
4751
4752 if test $ac_prog_rejected = yes; then
4753 # We found a bogon in the path, so make sure we never use it.
4754 set dummy $ac_cv_prog_CC
4755 shift
4756 if test $# != 0; then
4757 # We chose a different compiler from the bogus one.
4758 # However, it has the same basename, so the bogon will be chosen
4759 # first if we set CC to just the basename; use the full file name.
4760 shift
4761 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4762 fi
4763 fi
4764 fi
4765 fi
4766 CC=$ac_cv_prog_CC
4767 if test -n "$CC"; then
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4769 $as_echo "$CC" >&6; }
4770 else
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4772 $as_echo "no" >&6; }
4773 fi
4774
4775
4776 fi
4777 if test -z "$CC"; then
4778 if test -n "$ac_tool_prefix"; then
4779 for ac_prog in cl.exe
4780 do
4781 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4782 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784 $as_echo_n "checking for $ac_word... " >&6; }
4785 if ${ac_cv_prog_CC+:} false; then :
4786 $as_echo_n "(cached) " >&6
4787 else
4788 if test -n "$CC"; then
4789 ac_cv_prog_CC="$CC" # Let the user override the test.
4790 else
4791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4792 for as_dir in $PATH
4793 do
4794 IFS=$as_save_IFS
4795 test -z "$as_dir" && as_dir=.
4796 for ac_exec_ext in '' $ac_executable_extensions; do
4797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4798 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4800 break 2
4801 fi
4802 done
4803 done
4804 IFS=$as_save_IFS
4805
4806 fi
4807 fi
4808 CC=$ac_cv_prog_CC
4809 if test -n "$CC"; then
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4811 $as_echo "$CC" >&6; }
4812 else
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814 $as_echo "no" >&6; }
4815 fi
4816
4817
4818 test -n "$CC" && break
4819 done
4820 fi
4821 if test -z "$CC"; then
4822 ac_ct_CC=$CC
4823 for ac_prog in cl.exe
4824 do
4825 # Extract the first word of "$ac_prog", so it can be a program name with args.
4826 set dummy $ac_prog; ac_word=$2
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4828 $as_echo_n "checking for $ac_word... " >&6; }
4829 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4830 $as_echo_n "(cached) " >&6
4831 else
4832 if test -n "$ac_ct_CC"; then
4833 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4834 else
4835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836 for as_dir in $PATH
4837 do
4838 IFS=$as_save_IFS
4839 test -z "$as_dir" && as_dir=.
4840 for ac_exec_ext in '' $ac_executable_extensions; do
4841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4842 ac_cv_prog_ac_ct_CC="$ac_prog"
4843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844 break 2
4845 fi
4846 done
4847 done
4848 IFS=$as_save_IFS
4849
4850 fi
4851 fi
4852 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4853 if test -n "$ac_ct_CC"; then
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4855 $as_echo "$ac_ct_CC" >&6; }
4856 else
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858 $as_echo "no" >&6; }
4859 fi
4860
4861
4862 test -n "$ac_ct_CC" && break
4863 done
4864
4865 if test "x$ac_ct_CC" = x; then
4866 CC=""
4867 else
4868 case $cross_compiling:$ac_tool_warned in
4869 yes:)
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4871 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4872 ac_tool_warned=yes ;;
4873 esac
4874 CC=$ac_ct_CC
4875 fi
4876 fi
4877
4878 fi
4879
4880
4881 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4882 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4883 as_fn_error $? "no acceptable C compiler found in \$PATH
4884 See \`config.log' for more details" "$LINENO" 5; }
4885
4886 # Provide some information about the compiler.
4887 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4888 set X $ac_compile
4889 ac_compiler=$2
4890 for ac_option in --version -v -V -qversion; do
4891 { { ac_try="$ac_compiler $ac_option >&5"
4892 case "(($ac_try" in
4893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4894 *) ac_try_echo=$ac_try;;
4895 esac
4896 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4897 $as_echo "$ac_try_echo"; } >&5
4898 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4899 ac_status=$?
4900 if test -s conftest.err; then
4901 sed '10a\
4902 ... rest of stderr output deleted ...
4903 10q' conftest.err >conftest.er1
4904 cat conftest.er1 >&5
4905 fi
4906 rm -f conftest.er1 conftest.err
4907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4908 test $ac_status = 0; }
4909 done
4910
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4912 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4913 if ${ac_cv_c_compiler_gnu+:} false; then :
4914 $as_echo_n "(cached) " >&6
4915 else
4916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4917 /* end confdefs.h. */
4918
4919 int
4920 main ()
4921 {
4922 #ifndef __GNUC__
4923 choke me
4924 #endif
4925
4926 ;
4927 return 0;
4928 }
4929 _ACEOF
4930 if ac_fn_c_try_compile "$LINENO"; then :
4931 ac_compiler_gnu=yes
4932 else
4933 ac_compiler_gnu=no
4934 fi
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4937
4938 fi
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4940 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4941 if test $ac_compiler_gnu = yes; then
4942 GCC=yes
4943 else
4944 GCC=
4945 fi
4946 ac_test_CFLAGS=${CFLAGS+set}
4947 ac_save_CFLAGS=$CFLAGS
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4949 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4950 if ${ac_cv_prog_cc_g+:} false; then :
4951 $as_echo_n "(cached) " >&6
4952 else
4953 ac_save_c_werror_flag=$ac_c_werror_flag
4954 ac_c_werror_flag=yes
4955 ac_cv_prog_cc_g=no
4956 CFLAGS="-g"
4957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4958 /* end confdefs.h. */
4959
4960 int
4961 main ()
4962 {
4963
4964 ;
4965 return 0;
4966 }
4967 _ACEOF
4968 if ac_fn_c_try_compile "$LINENO"; then :
4969 ac_cv_prog_cc_g=yes
4970 else
4971 CFLAGS=""
4972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4973 /* end confdefs.h. */
4974
4975 int
4976 main ()
4977 {
4978
4979 ;
4980 return 0;
4981 }
4982 _ACEOF
4983 if ac_fn_c_try_compile "$LINENO"; then :
4984
4985 else
4986 ac_c_werror_flag=$ac_save_c_werror_flag
4987 CFLAGS="-g"
4988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4989 /* end confdefs.h. */
4990
4991 int
4992 main ()
4993 {
4994
4995 ;
4996 return 0;
4997 }
4998 _ACEOF
4999 if ac_fn_c_try_compile "$LINENO"; then :
5000 ac_cv_prog_cc_g=yes
5001 fi
5002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5003 fi
5004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5005 fi
5006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5007 ac_c_werror_flag=$ac_save_c_werror_flag
5008 fi
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5010 $as_echo "$ac_cv_prog_cc_g" >&6; }
5011 if test "$ac_test_CFLAGS" = set; then
5012 CFLAGS=$ac_save_CFLAGS
5013 elif test $ac_cv_prog_cc_g = yes; then
5014 if test "$GCC" = yes; then
5015 CFLAGS="-g -O2"
5016 else
5017 CFLAGS="-g"
5018 fi
5019 else
5020 if test "$GCC" = yes; then
5021 CFLAGS="-O2"
5022 else
5023 CFLAGS=
5024 fi
5025 fi
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5027 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5028 if ${ac_cv_prog_cc_c89+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030 else
5031 ac_cv_prog_cc_c89=no
5032 ac_save_CC=$CC
5033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5034 /* end confdefs.h. */
5035 #include <stdarg.h>
5036 #include <stdio.h>
5037 struct stat;
5038 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5039 struct buf { int x; };
5040 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5041 static char *e (p, i)
5042 char **p;
5043 int i;
5044 {
5045 return p[i];
5046 }
5047 static char *f (char * (*g) (char **, int), char **p, ...)
5048 {
5049 char *s;
5050 va_list v;
5051 va_start (v,p);
5052 s = g (p, va_arg (v,int));
5053 va_end (v);
5054 return s;
5055 }
5056
5057 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5058 function prototypes and stuff, but not '\xHH' hex character constants.
5059 These don't provoke an error unfortunately, instead are silently treated
5060 as 'x'. The following induces an error, until -std is added to get
5061 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5062 array size at least. It's necessary to write '\x00'==0 to get something
5063 that's true only with -std. */
5064 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5065
5066 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5067 inside strings and character constants. */
5068 #define FOO(x) 'x'
5069 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5070
5071 int test (int i, double x);
5072 struct s1 {int (*f) (int a);};
5073 struct s2 {int (*f) (double a);};
5074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5075 int argc;
5076 char **argv;
5077 int
5078 main ()
5079 {
5080 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5081 ;
5082 return 0;
5083 }
5084 _ACEOF
5085 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5086 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5087 do
5088 CC="$ac_save_CC $ac_arg"
5089 if ac_fn_c_try_compile "$LINENO"; then :
5090 ac_cv_prog_cc_c89=$ac_arg
5091 fi
5092 rm -f core conftest.err conftest.$ac_objext
5093 test "x$ac_cv_prog_cc_c89" != "xno" && break
5094 done
5095 rm -f conftest.$ac_ext
5096 CC=$ac_save_CC
5097
5098 fi
5099 # AC_CACHE_VAL
5100 case "x$ac_cv_prog_cc_c89" in
5101 x)
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5103 $as_echo "none needed" >&6; } ;;
5104 xno)
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5106 $as_echo "unsupported" >&6; } ;;
5107 *)
5108 CC="$CC $ac_cv_prog_cc_c89"
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5110 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5111 esac
5112 if test "x$ac_cv_prog_cc_c89" != xno; then :
5113
5114 fi
5115
5116 ac_ext=c
5117 ac_cpp='$CPP $CPPFLAGS'
5118 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5119 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5120 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5121
5122 ac_ext=c
5123 ac_cpp='$CPP $CPPFLAGS'
5124 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5125 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5126 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5128 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5129 if ${am_cv_prog_cc_c_o+:} false; then :
5130 $as_echo_n "(cached) " >&6
5131 else
5132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5133 /* end confdefs.h. */
5134
5135 int
5136 main ()
5137 {
5138
5139 ;
5140 return 0;
5141 }
5142 _ACEOF
5143 # Make sure it works both with $CC and with simple cc.
5144 # Following AC_PROG_CC_C_O, we do the test twice because some
5145 # compilers refuse to overwrite an existing .o file with -o,
5146 # though they will create one.
5147 am_cv_prog_cc_c_o=yes
5148 for am_i in 1 2; do
5149 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5150 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5151 ac_status=$?
5152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5153 (exit $ac_status); } \
5154 && test -f conftest2.$ac_objext; then
5155 : OK
5156 else
5157 am_cv_prog_cc_c_o=no
5158 break
5159 fi
5160 done
5161 rm -f core conftest*
5162 unset am_i
5163 fi
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5165 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5166 if test "$am_cv_prog_cc_c_o" != yes; then
5167 # Losing compiler, so override with the script.
5168 # FIXME: It is wrong to rewrite CC.
5169 # But if we don't then we get into trouble of one sort or another.
5170 # A longer-term fix would be to have automake use am__CC in this case,
5171 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5172 CC="$am_aux_dir/compile $CC"
5173 fi
5174 ac_ext=c
5175 ac_cpp='$CPP $CPPFLAGS'
5176 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5177 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5178 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5179
5180
5181 depcc="$CC" am_compiler_list=
5182
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5184 $as_echo_n "checking dependency style of $depcc... " >&6; }
5185 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5186 $as_echo_n "(cached) " >&6
5187 else
5188 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5189 # We make a subdir and do the tests there. Otherwise we can end up
5190 # making bogus files that we don't know about and never remove. For
5191 # instance it was reported that on HP-UX the gcc test will end up
5192 # making a dummy file named 'D' -- because '-MD' means "put the output
5193 # in D".
5194 rm -rf conftest.dir
5195 mkdir conftest.dir
5196 # Copy depcomp to subdir because otherwise we won't find it if we're
5197 # using a relative directory.
5198 cp "$am_depcomp" conftest.dir
5199 cd conftest.dir
5200 # We will build objects and dependencies in a subdirectory because
5201 # it helps to detect inapplicable dependency modes. For instance
5202 # both Tru64's cc and ICC support -MD to output dependencies as a
5203 # side effect of compilation, but ICC will put the dependencies in
5204 # the current directory while Tru64 will put them in the object
5205 # directory.
5206 mkdir sub
5207
5208 am_cv_CC_dependencies_compiler_type=none
5209 if test "$am_compiler_list" = ""; then
5210 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5211 fi
5212 am__universal=false
5213 case " $depcc " in #(
5214 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5215 esac
5216
5217 for depmode in $am_compiler_list; do
5218 # Setup a source with many dependencies, because some compilers
5219 # like to wrap large dependency lists on column 80 (with \), and
5220 # we should not choose a depcomp mode which is confused by this.
5221 #
5222 # We need to recreate these files for each test, as the compiler may
5223 # overwrite some of them when testing with obscure command lines.
5224 # This happens at least with the AIX C compiler.
5225 : > sub/conftest.c
5226 for i in 1 2 3 4 5 6; do
5227 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5228 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5229 # Solaris 10 /bin/sh.
5230 echo '/* dummy */' > sub/conftst$i.h
5231 done
5232 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5233
5234 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5235 # mode. It turns out that the SunPro C++ compiler does not properly
5236 # handle '-M -o', and we need to detect this. Also, some Intel
5237 # versions had trouble with output in subdirs.
5238 am__obj=sub/conftest.${OBJEXT-o}
5239 am__minus_obj="-o $am__obj"
5240 case $depmode in
5241 gcc)
5242 # This depmode causes a compiler race in universal mode.
5243 test "$am__universal" = false || continue
5244 ;;
5245 nosideeffect)
5246 # After this tag, mechanisms are not by side-effect, so they'll
5247 # only be used when explicitly requested.
5248 if test "x$enable_dependency_tracking" = xyes; then
5249 continue
5250 else
5251 break
5252 fi
5253 ;;
5254 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5255 # This compiler won't grok '-c -o', but also, the minuso test has
5256 # not run yet. These depmodes are late enough in the game, and
5257 # so weak that their functioning should not be impacted.
5258 am__obj=conftest.${OBJEXT-o}
5259 am__minus_obj=
5260 ;;
5261 none) break ;;
5262 esac
5263 if depmode=$depmode \
5264 source=sub/conftest.c object=$am__obj \
5265 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5266 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5267 >/dev/null 2>conftest.err &&
5268 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5269 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5270 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5271 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5272 # icc doesn't choke on unknown options, it will just issue warnings
5273 # or remarks (even with -Werror). So we grep stderr for any message
5274 # that says an option was ignored or not supported.
5275 # When given -MP, icc 7.0 and 7.1 complain thusly:
5276 # icc: Command line warning: ignoring option '-M'; no argument required
5277 # The diagnosis changed in icc 8.0:
5278 # icc: Command line remark: option '-MP' not supported
5279 if (grep 'ignoring option' conftest.err ||
5280 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5281 am_cv_CC_dependencies_compiler_type=$depmode
5282 break
5283 fi
5284 fi
5285 done
5286
5287 cd ..
5288 rm -rf conftest.dir
5289 else
5290 am_cv_CC_dependencies_compiler_type=none
5291 fi
5292
5293 fi
5294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5295 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5296 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5297
5298 if
5299 test "x$enable_dependency_tracking" != xno \
5300 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5301 am__fastdepCC_TRUE=
5302 am__fastdepCC_FALSE='#'
5303 else
5304 am__fastdepCC_TRUE='#'
5305 am__fastdepCC_FALSE=
5306 fi
5307
5308
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5310 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
5311 if ${ac_cv_path_SED+:} false; then :
5312 $as_echo_n "(cached) " >&6
5313 else
5314 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5315 for ac_i in 1 2 3 4 5 6 7; do
5316 ac_script="$ac_script$as_nl$ac_script"
5317 done
5318 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5319 { ac_script=; unset ac_script;}
5320 if test -z "$SED"; then
5321 ac_path_SED_found=false
5322 # Loop through the user's path and test for each of PROGNAME-LIST
5323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5324 for as_dir in $PATH
5325 do
5326 IFS=$as_save_IFS
5327 test -z "$as_dir" && as_dir=.
5328 for ac_prog in sed gsed; do
5329 for ac_exec_ext in '' $ac_executable_extensions; do
5330 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5331 as_fn_executable_p "$ac_path_SED" || continue
5332 # Check for GNU ac_path_SED and select it if it is found.
5333 # Check for GNU $ac_path_SED
5334 case `"$ac_path_SED" --version 2>&1` in
5335 *GNU*)
5336 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5337 *)
5338 ac_count=0
5339 $as_echo_n 0123456789 >"conftest.in"
5340 while :
5341 do
5342 cat "conftest.in" "conftest.in" >"conftest.tmp"
5343 mv "conftest.tmp" "conftest.in"
5344 cp "conftest.in" "conftest.nl"
5345 $as_echo '' >> "conftest.nl"
5346 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5347 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5348 as_fn_arith $ac_count + 1 && ac_count=$as_val
5349 if test $ac_count -gt ${ac_path_SED_max-0}; then
5350 # Best one so far, save it but keep looking for a better one
5351 ac_cv_path_SED="$ac_path_SED"
5352 ac_path_SED_max=$ac_count
5353 fi
5354 # 10*(2^10) chars as input seems more than enough
5355 test $ac_count -gt 10 && break
5356 done
5357 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5358 esac
5359
5360 $ac_path_SED_found && break 3
5361 done
5362 done
5363 done
5364 IFS=$as_save_IFS
5365 if test -z "$ac_cv_path_SED"; then
5366 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5367 fi
5368 else
5369 ac_cv_path_SED=$SED
5370 fi
5371
5372 fi
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5374 $as_echo "$ac_cv_path_SED" >&6; }
5375 SED="$ac_cv_path_SED"
5376 rm -f conftest.sed
5377
5378 test -z "$SED" && SED=sed
5379 Xsed="$SED -e 1s/^X//"
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5392 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5393 if ${ac_cv_path_GREP+:} false; then :
5394 $as_echo_n "(cached) " >&6
5395 else
5396 if test -z "$GREP"; then
5397 ac_path_GREP_found=false
5398 # Loop through the user's path and test for each of PROGNAME-LIST
5399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5400 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5401 do
5402 IFS=$as_save_IFS
5403 test -z "$as_dir" && as_dir=.
5404 for ac_prog in grep ggrep; do
5405 for ac_exec_ext in '' $ac_executable_extensions; do
5406 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5407 as_fn_executable_p "$ac_path_GREP" || continue
5408 # Check for GNU ac_path_GREP and select it if it is found.
5409 # Check for GNU $ac_path_GREP
5410 case `"$ac_path_GREP" --version 2>&1` in
5411 *GNU*)
5412 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5413 *)
5414 ac_count=0
5415 $as_echo_n 0123456789 >"conftest.in"
5416 while :
5417 do
5418 cat "conftest.in" "conftest.in" >"conftest.tmp"
5419 mv "conftest.tmp" "conftest.in"
5420 cp "conftest.in" "conftest.nl"
5421 $as_echo 'GREP' >> "conftest.nl"
5422 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5423 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5424 as_fn_arith $ac_count + 1 && ac_count=$as_val
5425 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5426 # Best one so far, save it but keep looking for a better one
5427 ac_cv_path_GREP="$ac_path_GREP"
5428 ac_path_GREP_max=$ac_count
5429 fi
5430 # 10*(2^10) chars as input seems more than enough
5431 test $ac_count -gt 10 && break
5432 done
5433 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5434 esac
5435
5436 $ac_path_GREP_found && break 3
5437 done
5438 done
5439 done
5440 IFS=$as_save_IFS
5441 if test -z "$ac_cv_path_GREP"; then
5442 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5443 fi
5444 else
5445 ac_cv_path_GREP=$GREP
5446 fi
5447
5448 fi
5449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5450 $as_echo "$ac_cv_path_GREP" >&6; }
5451 GREP="$ac_cv_path_GREP"
5452
5453
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5455 $as_echo_n "checking for egrep... " >&6; }
5456 if ${ac_cv_path_EGREP+:} false; then :
5457 $as_echo_n "(cached) " >&6
5458 else
5459 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5460 then ac_cv_path_EGREP="$GREP -E"
5461 else
5462 if test -z "$EGREP"; then
5463 ac_path_EGREP_found=false
5464 # Loop through the user's path and test for each of PROGNAME-LIST
5465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5467 do
5468 IFS=$as_save_IFS
5469 test -z "$as_dir" && as_dir=.
5470 for ac_prog in egrep; do
5471 for ac_exec_ext in '' $ac_executable_extensions; do
5472 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5473 as_fn_executable_p "$ac_path_EGREP" || continue
5474 # Check for GNU ac_path_EGREP and select it if it is found.
5475 # Check for GNU $ac_path_EGREP
5476 case `"$ac_path_EGREP" --version 2>&1` in
5477 *GNU*)
5478 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5479 *)
5480 ac_count=0
5481 $as_echo_n 0123456789 >"conftest.in"
5482 while :
5483 do
5484 cat "conftest.in" "conftest.in" >"conftest.tmp"
5485 mv "conftest.tmp" "conftest.in"
5486 cp "conftest.in" "conftest.nl"
5487 $as_echo 'EGREP' >> "conftest.nl"
5488 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5489 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5490 as_fn_arith $ac_count + 1 && ac_count=$as_val
5491 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5492 # Best one so far, save it but keep looking for a better one
5493 ac_cv_path_EGREP="$ac_path_EGREP"
5494 ac_path_EGREP_max=$ac_count
5495 fi
5496 # 10*(2^10) chars as input seems more than enough
5497 test $ac_count -gt 10 && break
5498 done
5499 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5500 esac
5501
5502 $ac_path_EGREP_found && break 3
5503 done
5504 done
5505 done
5506 IFS=$as_save_IFS
5507 if test -z "$ac_cv_path_EGREP"; then
5508 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5509 fi
5510 else
5511 ac_cv_path_EGREP=$EGREP
5512 fi
5513
5514 fi
5515 fi
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5517 $as_echo "$ac_cv_path_EGREP" >&6; }
5518 EGREP="$ac_cv_path_EGREP"
5519
5520
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5522 $as_echo_n "checking for fgrep... " >&6; }
5523 if ${ac_cv_path_FGREP+:} false; then :
5524 $as_echo_n "(cached) " >&6
5525 else
5526 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5527 then ac_cv_path_FGREP="$GREP -F"
5528 else
5529 if test -z "$FGREP"; then
5530 ac_path_FGREP_found=false
5531 # Loop through the user's path and test for each of PROGNAME-LIST
5532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5534 do
5535 IFS=$as_save_IFS
5536 test -z "$as_dir" && as_dir=.
5537 for ac_prog in fgrep; do
5538 for ac_exec_ext in '' $ac_executable_extensions; do
5539 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5540 as_fn_executable_p "$ac_path_FGREP" || continue
5541 # Check for GNU ac_path_FGREP and select it if it is found.
5542 # Check for GNU $ac_path_FGREP
5543 case `"$ac_path_FGREP" --version 2>&1` in
5544 *GNU*)
5545 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5546 *)
5547 ac_count=0
5548 $as_echo_n 0123456789 >"conftest.in"
5549 while :
5550 do
5551 cat "conftest.in" "conftest.in" >"conftest.tmp"
5552 mv "conftest.tmp" "conftest.in"
5553 cp "conftest.in" "conftest.nl"
5554 $as_echo 'FGREP' >> "conftest.nl"
5555 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5556 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5557 as_fn_arith $ac_count + 1 && ac_count=$as_val
5558 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5559 # Best one so far, save it but keep looking for a better one
5560 ac_cv_path_FGREP="$ac_path_FGREP"
5561 ac_path_FGREP_max=$ac_count
5562 fi
5563 # 10*(2^10) chars as input seems more than enough
5564 test $ac_count -gt 10 && break
5565 done
5566 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5567 esac
5568
5569 $ac_path_FGREP_found && break 3
5570 done
5571 done
5572 done
5573 IFS=$as_save_IFS
5574 if test -z "$ac_cv_path_FGREP"; then
5575 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5576 fi
5577 else
5578 ac_cv_path_FGREP=$FGREP
5579 fi
5580
5581 fi
5582 fi
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5584 $as_echo "$ac_cv_path_FGREP" >&6; }
5585 FGREP="$ac_cv_path_FGREP"
5586
5587
5588 test -z "$GREP" && GREP=grep
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608 # Check whether --with-gnu-ld was given.
5609 if test "${with_gnu_ld+set}" = set; then :
5610 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5611 else
5612 with_gnu_ld=no
5613 fi
5614
5615 ac_prog=ld
5616 if test "$GCC" = yes; then
5617 # Check if gcc -print-prog-name=ld gives a path.
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5619 $as_echo_n "checking for ld used by $CC... " >&6; }
5620 case $host in
5621 *-*-mingw*)
5622 # gcc leaves a trailing carriage return which upsets mingw
5623 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5624 *)
5625 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5626 esac
5627 case $ac_prog in
5628 # Accept absolute paths.
5629 [\\/]* | ?:[\\/]*)
5630 re_direlt='/[^/][^/]*/\.\./'
5631 # Canonicalize the pathname of ld
5632 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5633 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5634 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5635 done
5636 test -z "$LD" && LD="$ac_prog"
5637 ;;
5638 "")
5639 # If it fails, then pretend we aren't using GCC.
5640 ac_prog=ld
5641 ;;
5642 *)
5643 # If it is relative, then search for the first ld in PATH.
5644 with_gnu_ld=unknown
5645 ;;
5646 esac
5647 elif test "$with_gnu_ld" = yes; then
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5649 $as_echo_n "checking for GNU ld... " >&6; }
5650 else
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5652 $as_echo_n "checking for non-GNU ld... " >&6; }
5653 fi
5654 if ${lt_cv_path_LD+:} false; then :
5655 $as_echo_n "(cached) " >&6
5656 else
5657 if test -z "$LD"; then
5658 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5659 for ac_dir in $PATH; do
5660 IFS="$lt_save_ifs"
5661 test -z "$ac_dir" && ac_dir=.
5662 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5663 lt_cv_path_LD="$ac_dir/$ac_prog"
5664 # Check to see if the program is GNU ld. I'd rather use --version,
5665 # but apparently some variants of GNU ld only accept -v.
5666 # Break only if it was the GNU/non-GNU ld that we prefer.
5667 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5668 *GNU* | *'with BFD'*)
5669 test "$with_gnu_ld" != no && break
5670 ;;
5671 *)
5672 test "$with_gnu_ld" != yes && break
5673 ;;
5674 esac
5675 fi
5676 done
5677 IFS="$lt_save_ifs"
5678 else
5679 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5680 fi
5681 fi
5682
5683 LD="$lt_cv_path_LD"
5684 if test -n "$LD"; then
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5686 $as_echo "$LD" >&6; }
5687 else
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689 $as_echo "no" >&6; }
5690 fi
5691 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5693 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5694 if ${lt_cv_prog_gnu_ld+:} false; then :
5695 $as_echo_n "(cached) " >&6
5696 else
5697 # I'd rather use --version here, but apparently some GNU lds only accept -v.
5698 case `$LD -v 2>&1 </dev/null` in
5699 *GNU* | *'with BFD'*)
5700 lt_cv_prog_gnu_ld=yes
5701 ;;
5702 *)
5703 lt_cv_prog_gnu_ld=no
5704 ;;
5705 esac
5706 fi
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
5708 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
5709 with_gnu_ld=$lt_cv_prog_gnu_ld
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
5720 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
5721 if ${lt_cv_path_NM+:} false; then :
5722 $as_echo_n "(cached) " >&6
5723 else
5724 if test -n "$NM"; then
5725 # Let the user override the test.
5726 lt_cv_path_NM="$NM"
5727 else
5728 lt_nm_to_check="${ac_tool_prefix}nm"
5729 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5730 lt_nm_to_check="$lt_nm_to_check nm"
5731 fi
5732 for lt_tmp_nm in $lt_nm_to_check; do
5733 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5734 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5735 IFS="$lt_save_ifs"
5736 test -z "$ac_dir" && ac_dir=.
5737 tmp_nm="$ac_dir/$lt_tmp_nm"
5738 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5739 # Check to see if the nm accepts a BSD-compat flag.
5740 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5741 # nm: unknown option "B" ignored
5742 # Tru64's nm complains that /dev/null is an invalid object file
5743 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5744 */dev/null* | *'Invalid file or object type'*)
5745 lt_cv_path_NM="$tmp_nm -B"
5746 break
5747 ;;
5748 *)
5749 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5750 */dev/null*)
5751 lt_cv_path_NM="$tmp_nm -p"
5752 break
5753 ;;
5754 *)
5755 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5756 continue # so that we can try to find one that supports BSD flags
5757 ;;
5758 esac
5759 ;;
5760 esac
5761 fi
5762 done
5763 IFS="$lt_save_ifs"
5764 done
5765 : ${lt_cv_path_NM=no}
5766 fi
5767 fi
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
5769 $as_echo "$lt_cv_path_NM" >&6; }
5770 if test "$lt_cv_path_NM" != "no"; then
5771 NM="$lt_cv_path_NM"
5772 else
5773 # Didn't find any BSD compatible name lister, look for dumpbin.
5774 if test -n "$DUMPBIN"; then :
5775 # Let the user override the test.
5776 else
5777 if test -n "$ac_tool_prefix"; then
5778 for ac_prog in dumpbin "link -dump"
5779 do
5780 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5781 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783 $as_echo_n "checking for $ac_word... " >&6; }
5784 if ${ac_cv_prog_DUMPBIN+:} false; then :
5785 $as_echo_n "(cached) " >&6
5786 else
5787 if test -n "$DUMPBIN"; then
5788 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
5789 else
5790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791 for as_dir in $PATH
5792 do
5793 IFS=$as_save_IFS
5794 test -z "$as_dir" && as_dir=.
5795 for ac_exec_ext in '' $ac_executable_extensions; do
5796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799 break 2
5800 fi
5801 done
5802 done
5803 IFS=$as_save_IFS
5804
5805 fi
5806 fi
5807 DUMPBIN=$ac_cv_prog_DUMPBIN
5808 if test -n "$DUMPBIN"; then
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
5810 $as_echo "$DUMPBIN" >&6; }
5811 else
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813 $as_echo "no" >&6; }
5814 fi
5815
5816
5817 test -n "$DUMPBIN" && break
5818 done
5819 fi
5820 if test -z "$DUMPBIN"; then
5821 ac_ct_DUMPBIN=$DUMPBIN
5822 for ac_prog in dumpbin "link -dump"
5823 do
5824 # Extract the first word of "$ac_prog", so it can be a program name with args.
5825 set dummy $ac_prog; ac_word=$2
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5827 $as_echo_n "checking for $ac_word... " >&6; }
5828 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
5829 $as_echo_n "(cached) " >&6
5830 else
5831 if test -n "$ac_ct_DUMPBIN"; then
5832 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
5833 else
5834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5835 for as_dir in $PATH
5836 do
5837 IFS=$as_save_IFS
5838 test -z "$as_dir" && as_dir=.
5839 for ac_exec_ext in '' $ac_executable_extensions; do
5840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5841 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5843 break 2
5844 fi
5845 done
5846 done
5847 IFS=$as_save_IFS
5848
5849 fi
5850 fi
5851 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
5852 if test -n "$ac_ct_DUMPBIN"; then
5853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
5854 $as_echo "$ac_ct_DUMPBIN" >&6; }
5855 else
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5857 $as_echo "no" >&6; }
5858 fi
5859
5860
5861 test -n "$ac_ct_DUMPBIN" && break
5862 done
5863
5864 if test "x$ac_ct_DUMPBIN" = x; then
5865 DUMPBIN=":"
5866 else
5867 case $cross_compiling:$ac_tool_warned in
5868 yes:)
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5870 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5871 ac_tool_warned=yes ;;
5872 esac
5873 DUMPBIN=$ac_ct_DUMPBIN
5874 fi
5875 fi
5876
5877 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5878 *COFF*)
5879 DUMPBIN="$DUMPBIN -symbols"
5880 ;;
5881 *)
5882 DUMPBIN=:
5883 ;;
5884 esac
5885 fi
5886
5887 if test "$DUMPBIN" != ":"; then
5888 NM="$DUMPBIN"
5889 fi
5890 fi
5891 test -z "$NM" && NM=nm
5892
5893
5894
5895
5896
5897
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
5899 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
5900 if ${lt_cv_nm_interface+:} false; then :
5901 $as_echo_n "(cached) " >&6
5902 else
5903 lt_cv_nm_interface="BSD nm"
5904 echo "int some_variable = 0;" > conftest.$ac_ext
5905 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
5906 (eval "$ac_compile" 2>conftest.err)
5907 cat conftest.err >&5
5908 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5909 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5910 cat conftest.err >&5
5911 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
5912 cat conftest.out >&5
5913 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5914 lt_cv_nm_interface="MS dumpbin"
5915 fi
5916 rm -f conftest*
5917 fi
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
5919 $as_echo "$lt_cv_nm_interface" >&6; }
5920
5921 # find the maximum length of command line arguments
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
5923 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
5924 if ${lt_cv_sys_max_cmd_len+:} false; then :
5925 $as_echo_n "(cached) " >&6
5926 else
5927 i=0
5928 teststring="ABCD"
5929
5930 case $build_os in
5931 msdosdjgpp*)
5932 # On DJGPP, this test can blow up pretty badly due to problems in libc
5933 # (any single argument exceeding 2000 bytes causes a buffer overrun
5934 # during glob expansion). Even if it were fixed, the result of this
5935 # check would be larger than it should be.
5936 lt_cv_sys_max_cmd_len=12288; # 12K is about right
5937 ;;
5938
5939 gnu*)
5940 # Under GNU Hurd, this test is not required because there is
5941 # no limit to the length of command line arguments.
5942 # Libtool will interpret -1 as no limit whatsoever
5943 lt_cv_sys_max_cmd_len=-1;
5944 ;;
5945
5946 cygwin* | mingw* | cegcc*)
5947 # On Win9x/ME, this test blows up -- it succeeds, but takes
5948 # about 5 minutes as the teststring grows exponentially.
5949 # Worse, since 9x/ME are not pre-emptively multitasking,
5950 # you end up with a "frozen" computer, even though with patience
5951 # the test eventually succeeds (with a max line length of 256k).
5952 # Instead, let's just punt: use the minimum linelength reported by
5953 # all of the supported platforms: 8192 (on NT/2K/XP).
5954 lt_cv_sys_max_cmd_len=8192;
5955 ;;
5956
5957 mint*)
5958 # On MiNT this can take a long time and run out of memory.
5959 lt_cv_sys_max_cmd_len=8192;
5960 ;;
5961
5962 amigaos*)
5963 # On AmigaOS with pdksh, this test takes hours, literally.
5964 # So we just punt and use a minimum line length of 8192.
5965 lt_cv_sys_max_cmd_len=8192;
5966 ;;
5967
5968 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
5969 # This has been around since 386BSD, at least. Likely further.
5970 if test -x /sbin/sysctl; then
5971 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5972 elif test -x /usr/sbin/sysctl; then
5973 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5974 else
5975 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
5976 fi
5977 # And add a safety zone
5978 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5979 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5980 ;;
5981
5982 interix*)
5983 # We know the value 262144 and hardcode it with a safety zone (like BSD)
5984 lt_cv_sys_max_cmd_len=196608
5985 ;;
5986
5987 os2*)
5988 # The test takes a long time on OS/2.
5989 lt_cv_sys_max_cmd_len=8192
5990 ;;
5991
5992 osf*)
5993 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5994 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5995 # nice to cause kernel panics so lets avoid the loop below.
5996 # First set a reasonable default.
5997 lt_cv_sys_max_cmd_len=16384
5998 #
5999 if test -x /sbin/sysconfig; then
6000 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6001 *1*) lt_cv_sys_max_cmd_len=-1 ;;
6002 esac
6003 fi
6004 ;;
6005 sco3.2v5*)
6006 lt_cv_sys_max_cmd_len=102400
6007 ;;
6008 sysv5* | sco5v6* | sysv4.2uw2*)
6009 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6010 if test -n "$kargmax"; then
6011 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6012 else
6013 lt_cv_sys_max_cmd_len=32768
6014 fi
6015 ;;
6016 *)
6017 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6018 if test -n "$lt_cv_sys_max_cmd_len" && \
6019 test undefined != "$lt_cv_sys_max_cmd_len"; then
6020 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6021 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6022 else
6023 # Make teststring a little bigger before we do anything with it.
6024 # a 1K string should be a reasonable start.
6025 for i in 1 2 3 4 5 6 7 8 ; do
6026 teststring=$teststring$teststring
6027 done
6028 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6029 # If test is not a shell built-in, we'll probably end up computing a
6030 # maximum length that is only half of the actual maximum length, but
6031 # we can't tell.
6032 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
6033 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
6034 test $i != 17 # 1/2 MB should be enough
6035 do
6036 i=`expr $i + 1`
6037 teststring=$teststring$teststring
6038 done
6039 # Only check the string length outside the loop.
6040 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
6041 teststring=
6042 # Add a significant safety factor because C++ compilers can tack on
6043 # massive amounts of additional arguments before passing them to the
6044 # linker. It appears as though 1/2 is a usable value.
6045 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6046 fi
6047 ;;
6048 esac
6049
6050 fi
6051
6052 if test -n $lt_cv_sys_max_cmd_len ; then
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6054 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
6055 else
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
6057 $as_echo "none" >&6; }
6058 fi
6059 max_cmd_len=$lt_cv_sys_max_cmd_len
6060
6061
6062
6063
6064
6065
6066 : ${CP="cp -f"}
6067 : ${MV="mv -f"}
6068 : ${RM="rm -f"}
6069
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
6071 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
6072 # Try some XSI features
6073 xsi_shell=no
6074 ( _lt_dummy="a/b/c"
6075 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
6076 = c,a/b,b/c, \
6077 && eval 'test $(( 1 + 1 )) -eq 2 \
6078 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
6079 && xsi_shell=yes
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
6081 $as_echo "$xsi_shell" >&6; }
6082
6083
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
6085 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
6086 lt_shell_append=no
6087 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
6088 >/dev/null 2>&1 \
6089 && lt_shell_append=yes
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
6091 $as_echo "$lt_shell_append" >&6; }
6092
6093
6094 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6095 lt_unset=unset
6096 else
6097 lt_unset=false
6098 fi
6099
6100
6101
6102
6103
6104 # test EBCDIC or ASCII
6105 case `echo X|tr X '\101'` in
6106 A) # ASCII based system
6107 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6108 lt_SP2NL='tr \040 \012'
6109 lt_NL2SP='tr \015\012 \040\040'
6110 ;;
6111 *) # EBCDIC based system
6112 lt_SP2NL='tr \100 \n'
6113 lt_NL2SP='tr \r\n \100\100'
6114 ;;
6115 esac
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
6126 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
6127 if ${lt_cv_to_host_file_cmd+:} false; then :
6128 $as_echo_n "(cached) " >&6
6129 else
6130 case $host in
6131 *-*-mingw* )
6132 case $build in
6133 *-*-mingw* ) # actually msys
6134 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
6135 ;;
6136 *-*-cygwin* )
6137 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
6138 ;;
6139 * ) # otherwise, assume *nix
6140 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
6141 ;;
6142 esac
6143 ;;
6144 *-*-cygwin* )
6145 case $build in
6146 *-*-mingw* ) # actually msys
6147 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
6148 ;;
6149 *-*-cygwin* )
6150 lt_cv_to_host_file_cmd=func_convert_file_noop
6151 ;;
6152 * ) # otherwise, assume *nix
6153 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
6154 ;;
6155 esac
6156 ;;
6157 * ) # unhandled hosts (and "normal" native builds)
6158 lt_cv_to_host_file_cmd=func_convert_file_noop
6159 ;;
6160 esac
6161
6162 fi
6163
6164 to_host_file_cmd=$lt_cv_to_host_file_cmd
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
6166 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
6167
6168
6169
6170
6171
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
6173 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
6174 if ${lt_cv_to_tool_file_cmd+:} false; then :
6175 $as_echo_n "(cached) " >&6
6176 else
6177 #assume ordinary cross tools, or native build.
6178 lt_cv_to_tool_file_cmd=func_convert_file_noop
6179 case $host in
6180 *-*-mingw* )
6181 case $build in
6182 *-*-mingw* ) # actually msys
6183 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
6184 ;;
6185 esac
6186 ;;
6187 esac
6188
6189 fi
6190
6191 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
6193 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
6194
6195
6196
6197
6198
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6200 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6201 if ${lt_cv_ld_reload_flag+:} false; then :
6202 $as_echo_n "(cached) " >&6
6203 else
6204 lt_cv_ld_reload_flag='-r'
6205 fi
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6207 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6208 reload_flag=$lt_cv_ld_reload_flag
6209 case $reload_flag in
6210 "" | " "*) ;;
6211 *) reload_flag=" $reload_flag" ;;
6212 esac
6213 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6214 case $host_os in
6215 cygwin* | mingw* | pw32* | cegcc*)
6216 if test "$GCC" != yes; then
6217 reload_cmds=false
6218 fi
6219 ;;
6220 darwin*)
6221 if test "$GCC" = yes; then
6222 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
6223 else
6224 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6225 fi
6226 ;;
6227 esac
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237 if test -n "$ac_tool_prefix"; then
6238 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6239 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6241 $as_echo_n "checking for $ac_word... " >&6; }
6242 if ${ac_cv_prog_OBJDUMP+:} false; then :
6243 $as_echo_n "(cached) " >&6
6244 else
6245 if test -n "$OBJDUMP"; then
6246 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6247 else
6248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249 for as_dir in $PATH
6250 do
6251 IFS=$as_save_IFS
6252 test -z "$as_dir" && as_dir=.
6253 for ac_exec_ext in '' $ac_executable_extensions; do
6254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6255 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6257 break 2
6258 fi
6259 done
6260 done
6261 IFS=$as_save_IFS
6262
6263 fi
6264 fi
6265 OBJDUMP=$ac_cv_prog_OBJDUMP
6266 if test -n "$OBJDUMP"; then
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6268 $as_echo "$OBJDUMP" >&6; }
6269 else
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271 $as_echo "no" >&6; }
6272 fi
6273
6274
6275 fi
6276 if test -z "$ac_cv_prog_OBJDUMP"; then
6277 ac_ct_OBJDUMP=$OBJDUMP
6278 # Extract the first word of "objdump", so it can be a program name with args.
6279 set dummy objdump; ac_word=$2
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6281 $as_echo_n "checking for $ac_word... " >&6; }
6282 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
6283 $as_echo_n "(cached) " >&6
6284 else
6285 if test -n "$ac_ct_OBJDUMP"; then
6286 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6287 else
6288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289 for as_dir in $PATH
6290 do
6291 IFS=$as_save_IFS
6292 test -z "$as_dir" && as_dir=.
6293 for ac_exec_ext in '' $ac_executable_extensions; do
6294 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6295 ac_cv_prog_ac_ct_OBJDUMP="objdump"
6296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297 break 2
6298 fi
6299 done
6300 done
6301 IFS=$as_save_IFS
6302
6303 fi
6304 fi
6305 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6306 if test -n "$ac_ct_OBJDUMP"; then
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6308 $as_echo "$ac_ct_OBJDUMP" >&6; }
6309 else
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311 $as_echo "no" >&6; }
6312 fi
6313
6314 if test "x$ac_ct_OBJDUMP" = x; then
6315 OBJDUMP="false"
6316 else
6317 case $cross_compiling:$ac_tool_warned in
6318 yes:)
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6320 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6321 ac_tool_warned=yes ;;
6322 esac
6323 OBJDUMP=$ac_ct_OBJDUMP
6324 fi
6325 else
6326 OBJDUMP="$ac_cv_prog_OBJDUMP"
6327 fi
6328
6329 test -z "$OBJDUMP" && OBJDUMP=objdump
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6340 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
6341 if ${lt_cv_deplibs_check_method+:} false; then :
6342 $as_echo_n "(cached) " >&6
6343 else
6344 lt_cv_file_magic_cmd='$MAGIC_CMD'
6345 lt_cv_file_magic_test_file=
6346 lt_cv_deplibs_check_method='unknown'
6347 # Need to set the preceding variable on all platforms that support
6348 # interlibrary dependencies.
6349 # 'none' -- dependencies not supported.
6350 # `unknown' -- same as none, but documents that we really don't know.
6351 # 'pass_all' -- all dependencies passed with no checks.
6352 # 'test_compile' -- check by making test program.
6353 # 'file_magic [[regex]]' -- check by looking for files in library path
6354 # which responds to the $file_magic_cmd with a given extended regex.
6355 # If you have `file' or equivalent on your system and you're not sure
6356 # whether `pass_all' will *always* work, you probably want this one.
6357
6358 case $host_os in
6359 aix[4-9]*)
6360 lt_cv_deplibs_check_method=pass_all
6361 ;;
6362
6363 beos*)
6364 lt_cv_deplibs_check_method=pass_all
6365 ;;
6366
6367 bsdi[45]*)
6368 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6369 lt_cv_file_magic_cmd='/usr/bin/file -L'
6370 lt_cv_file_magic_test_file=/shlib/libc.so
6371 ;;
6372
6373 cygwin*)
6374 # func_win32_libid is a shell function defined in ltmain.sh
6375 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6376 lt_cv_file_magic_cmd='func_win32_libid'
6377 ;;
6378
6379 mingw* | pw32*)
6380 # Base MSYS/MinGW do not provide the 'file' command needed by
6381 # func_win32_libid shell function, so use a weaker test based on 'objdump',
6382 # unless we find 'file', for example because we are cross-compiling.
6383 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
6384 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
6385 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6386 lt_cv_file_magic_cmd='func_win32_libid'
6387 else
6388 # Keep this pattern in sync with the one in func_win32_libid.
6389 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6390 lt_cv_file_magic_cmd='$OBJDUMP -f'
6391 fi
6392 ;;
6393
6394 cegcc*)
6395 # use the weaker test based on 'objdump'. See mingw*.
6396 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6397 lt_cv_file_magic_cmd='$OBJDUMP -f'
6398 ;;
6399
6400 darwin* | rhapsody*)
6401 lt_cv_deplibs_check_method=pass_all
6402 ;;
6403
6404 freebsd* | dragonfly*)
6405 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6406 case $host_cpu in
6407 i*86 )
6408 # Not sure whether the presence of OpenBSD here was a mistake.
6409 # Let's accept both of them until this is cleared up.
6410 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6411 lt_cv_file_magic_cmd=/usr/bin/file
6412 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6413 ;;
6414 esac
6415 else
6416 lt_cv_deplibs_check_method=pass_all
6417 fi
6418 ;;
6419
6420 haiku*)
6421 lt_cv_deplibs_check_method=pass_all
6422 ;;
6423
6424 hpux10.20* | hpux11*)
6425 lt_cv_file_magic_cmd=/usr/bin/file
6426 case $host_cpu in
6427 ia64*)
6428 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6429 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6430 ;;
6431 hppa*64*)
6432 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]'
6433 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6434 ;;
6435 *)
6436 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
6437 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6438 ;;
6439 esac
6440 ;;
6441
6442 interix[3-9]*)
6443 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6444 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6445 ;;
6446
6447 irix5* | irix6* | nonstopux*)
6448 case $LD in
6449 *-32|*"-32 ") libmagic=32-bit;;
6450 *-n32|*"-n32 ") libmagic=N32;;
6451 *-64|*"-64 ") libmagic=64-bit;;
6452 *) libmagic=never-match;;
6453 esac
6454 lt_cv_deplibs_check_method=pass_all
6455 ;;
6456
6457 # This must be glibc/ELF.
6458 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6459 lt_cv_deplibs_check_method=pass_all
6460 ;;
6461
6462 netbsd* | netbsdelf*-gnu)
6463 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6464 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6465 else
6466 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6467 fi
6468 ;;
6469
6470 newos6*)
6471 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6472 lt_cv_file_magic_cmd=/usr/bin/file
6473 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6474 ;;
6475
6476 *nto* | *qnx*)
6477 lt_cv_deplibs_check_method=pass_all
6478 ;;
6479
6480 openbsd*)
6481 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6482 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6483 else
6484 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6485 fi
6486 ;;
6487
6488 osf3* | osf4* | osf5*)
6489 lt_cv_deplibs_check_method=pass_all
6490 ;;
6491
6492 rdos*)
6493 lt_cv_deplibs_check_method=pass_all
6494 ;;
6495
6496 solaris*)
6497 lt_cv_deplibs_check_method=pass_all
6498 ;;
6499
6500 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6501 lt_cv_deplibs_check_method=pass_all
6502 ;;
6503
6504 sysv4 | sysv4.3*)
6505 case $host_vendor in
6506 motorola)
6507 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]'
6508 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6509 ;;
6510 ncr)
6511 lt_cv_deplibs_check_method=pass_all
6512 ;;
6513 sequent)
6514 lt_cv_file_magic_cmd='/bin/file'
6515 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6516 ;;
6517 sni)
6518 lt_cv_file_magic_cmd='/bin/file'
6519 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6520 lt_cv_file_magic_test_file=/lib/libc.so
6521 ;;
6522 siemens)
6523 lt_cv_deplibs_check_method=pass_all
6524 ;;
6525 pc)
6526 lt_cv_deplibs_check_method=pass_all
6527 ;;
6528 esac
6529 ;;
6530
6531 tpf*)
6532 lt_cv_deplibs_check_method=pass_all
6533 ;;
6534 esac
6535
6536 fi
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6538 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6539
6540 file_magic_glob=
6541 want_nocaseglob=no
6542 if test "$build" = "$host"; then
6543 case $host_os in
6544 mingw* | pw32*)
6545 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6546 want_nocaseglob=yes
6547 else
6548 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
6549 fi
6550 ;;
6551 esac
6552 fi
6553
6554 file_magic_cmd=$lt_cv_file_magic_cmd
6555 deplibs_check_method=$lt_cv_deplibs_check_method
6556 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579 if test -n "$ac_tool_prefix"; then
6580 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6581 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583 $as_echo_n "checking for $ac_word... " >&6; }
6584 if ${ac_cv_prog_DLLTOOL+:} false; then :
6585 $as_echo_n "(cached) " >&6
6586 else
6587 if test -n "$DLLTOOL"; then
6588 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6589 else
6590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6591 for as_dir in $PATH
6592 do
6593 IFS=$as_save_IFS
6594 test -z "$as_dir" && as_dir=.
6595 for ac_exec_ext in '' $ac_executable_extensions; do
6596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6597 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6599 break 2
6600 fi
6601 done
6602 done
6603 IFS=$as_save_IFS
6604
6605 fi
6606 fi
6607 DLLTOOL=$ac_cv_prog_DLLTOOL
6608 if test -n "$DLLTOOL"; then
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6610 $as_echo "$DLLTOOL" >&6; }
6611 else
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613 $as_echo "no" >&6; }
6614 fi
6615
6616
6617 fi
6618 if test -z "$ac_cv_prog_DLLTOOL"; then
6619 ac_ct_DLLTOOL=$DLLTOOL
6620 # Extract the first word of "dlltool", so it can be a program name with args.
6621 set dummy dlltool; ac_word=$2
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623 $as_echo_n "checking for $ac_word... " >&6; }
6624 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6625 $as_echo_n "(cached) " >&6
6626 else
6627 if test -n "$ac_ct_DLLTOOL"; then
6628 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6629 else
6630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6631 for as_dir in $PATH
6632 do
6633 IFS=$as_save_IFS
6634 test -z "$as_dir" && as_dir=.
6635 for ac_exec_ext in '' $ac_executable_extensions; do
6636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6637 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6639 break 2
6640 fi
6641 done
6642 done
6643 IFS=$as_save_IFS
6644
6645 fi
6646 fi
6647 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6648 if test -n "$ac_ct_DLLTOOL"; then
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6650 $as_echo "$ac_ct_DLLTOOL" >&6; }
6651 else
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6653 $as_echo "no" >&6; }
6654 fi
6655
6656 if test "x$ac_ct_DLLTOOL" = x; then
6657 DLLTOOL="false"
6658 else
6659 case $cross_compiling:$ac_tool_warned in
6660 yes:)
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6663 ac_tool_warned=yes ;;
6664 esac
6665 DLLTOOL=$ac_ct_DLLTOOL
6666 fi
6667 else
6668 DLLTOOL="$ac_cv_prog_DLLTOOL"
6669 fi
6670
6671 test -z "$DLLTOOL" && DLLTOOL=dlltool
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
6683 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
6684 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
6685 $as_echo_n "(cached) " >&6
6686 else
6687 lt_cv_sharedlib_from_linklib_cmd='unknown'
6688
6689 case $host_os in
6690 cygwin* | mingw* | pw32* | cegcc*)
6691 # two different shell functions defined in ltmain.sh
6692 # decide which to use based on capabilities of $DLLTOOL
6693 case `$DLLTOOL --help 2>&1` in
6694 *--identify-strict*)
6695 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6696 ;;
6697 *)
6698 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6699 ;;
6700 esac
6701 ;;
6702 *)
6703 # fallback: assume linklib IS sharedlib
6704 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6705 ;;
6706 esac
6707
6708 fi
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
6710 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
6711 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6712 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6713
6714
6715
6716
6717
6718
6719
6720
6721 if test -n "$ac_tool_prefix"; then
6722 for ac_prog in ar
6723 do
6724 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6725 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6727 $as_echo_n "checking for $ac_word... " >&6; }
6728 if ${ac_cv_prog_AR+:} false; then :
6729 $as_echo_n "(cached) " >&6
6730 else
6731 if test -n "$AR"; then
6732 ac_cv_prog_AR="$AR" # Let the user override the test.
6733 else
6734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6735 for as_dir in $PATH
6736 do
6737 IFS=$as_save_IFS
6738 test -z "$as_dir" && as_dir=.
6739 for ac_exec_ext in '' $ac_executable_extensions; do
6740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6741 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6743 break 2
6744 fi
6745 done
6746 done
6747 IFS=$as_save_IFS
6748
6749 fi
6750 fi
6751 AR=$ac_cv_prog_AR
6752 if test -n "$AR"; then
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6754 $as_echo "$AR" >&6; }
6755 else
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6757 $as_echo "no" >&6; }
6758 fi
6759
6760
6761 test -n "$AR" && break
6762 done
6763 fi
6764 if test -z "$AR"; then
6765 ac_ct_AR=$AR
6766 for ac_prog in ar
6767 do
6768 # Extract the first word of "$ac_prog", so it can be a program name with args.
6769 set dummy $ac_prog; ac_word=$2
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6771 $as_echo_n "checking for $ac_word... " >&6; }
6772 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6773 $as_echo_n "(cached) " >&6
6774 else
6775 if test -n "$ac_ct_AR"; then
6776 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6777 else
6778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6779 for as_dir in $PATH
6780 do
6781 IFS=$as_save_IFS
6782 test -z "$as_dir" && as_dir=.
6783 for ac_exec_ext in '' $ac_executable_extensions; do
6784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6785 ac_cv_prog_ac_ct_AR="$ac_prog"
6786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6787 break 2
6788 fi
6789 done
6790 done
6791 IFS=$as_save_IFS
6792
6793 fi
6794 fi
6795 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6796 if test -n "$ac_ct_AR"; then
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6798 $as_echo "$ac_ct_AR" >&6; }
6799 else
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6801 $as_echo "no" >&6; }
6802 fi
6803
6804
6805 test -n "$ac_ct_AR" && break
6806 done
6807
6808 if test "x$ac_ct_AR" = x; then
6809 AR="false"
6810 else
6811 case $cross_compiling:$ac_tool_warned in
6812 yes:)
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6814 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6815 ac_tool_warned=yes ;;
6816 esac
6817 AR=$ac_ct_AR
6818 fi
6819 fi
6820
6821 : ${AR=ar}
6822 : ${AR_FLAGS=cru}
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
6835 $as_echo_n "checking for archiver @FILE support... " >&6; }
6836 if ${lt_cv_ar_at_file+:} false; then :
6837 $as_echo_n "(cached) " >&6
6838 else
6839 lt_cv_ar_at_file=no
6840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6841 /* end confdefs.h. */
6842
6843 int
6844 main ()
6845 {
6846
6847 ;
6848 return 0;
6849 }
6850 _ACEOF
6851 if ac_fn_c_try_compile "$LINENO"; then :
6852 echo conftest.$ac_objext > conftest.lst
6853 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
6854 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6855 (eval $lt_ar_try) 2>&5
6856 ac_status=$?
6857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6858 test $ac_status = 0; }
6859 if test "$ac_status" -eq 0; then
6860 # Ensure the archiver fails upon bogus file names.
6861 rm -f conftest.$ac_objext libconftest.a
6862 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6863 (eval $lt_ar_try) 2>&5
6864 ac_status=$?
6865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6866 test $ac_status = 0; }
6867 if test "$ac_status" -ne 0; then
6868 lt_cv_ar_at_file=@
6869 fi
6870 fi
6871 rm -f conftest.* libconftest.a
6872
6873 fi
6874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6875
6876 fi
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
6878 $as_echo "$lt_cv_ar_at_file" >&6; }
6879
6880 if test "x$lt_cv_ar_at_file" = xno; then
6881 archiver_list_spec=
6882 else
6883 archiver_list_spec=$lt_cv_ar_at_file
6884 fi
6885
6886
6887
6888
6889
6890
6891
6892 if test -n "$ac_tool_prefix"; then
6893 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6894 set dummy ${ac_tool_prefix}strip; ac_word=$2
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6896 $as_echo_n "checking for $ac_word... " >&6; }
6897 if ${ac_cv_prog_STRIP+:} false; then :
6898 $as_echo_n "(cached) " >&6
6899 else
6900 if test -n "$STRIP"; then
6901 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6902 else
6903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6904 for as_dir in $PATH
6905 do
6906 IFS=$as_save_IFS
6907 test -z "$as_dir" && as_dir=.
6908 for ac_exec_ext in '' $ac_executable_extensions; do
6909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6910 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6912 break 2
6913 fi
6914 done
6915 done
6916 IFS=$as_save_IFS
6917
6918 fi
6919 fi
6920 STRIP=$ac_cv_prog_STRIP
6921 if test -n "$STRIP"; then
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6923 $as_echo "$STRIP" >&6; }
6924 else
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6926 $as_echo "no" >&6; }
6927 fi
6928
6929
6930 fi
6931 if test -z "$ac_cv_prog_STRIP"; then
6932 ac_ct_STRIP=$STRIP
6933 # Extract the first word of "strip", so it can be a program name with args.
6934 set dummy strip; ac_word=$2
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6936 $as_echo_n "checking for $ac_word... " >&6; }
6937 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6938 $as_echo_n "(cached) " >&6
6939 else
6940 if test -n "$ac_ct_STRIP"; then
6941 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6942 else
6943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944 for as_dir in $PATH
6945 do
6946 IFS=$as_save_IFS
6947 test -z "$as_dir" && as_dir=.
6948 for ac_exec_ext in '' $ac_executable_extensions; do
6949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6950 ac_cv_prog_ac_ct_STRIP="strip"
6951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6952 break 2
6953 fi
6954 done
6955 done
6956 IFS=$as_save_IFS
6957
6958 fi
6959 fi
6960 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6961 if test -n "$ac_ct_STRIP"; then
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6963 $as_echo "$ac_ct_STRIP" >&6; }
6964 else
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6966 $as_echo "no" >&6; }
6967 fi
6968
6969 if test "x$ac_ct_STRIP" = x; then
6970 STRIP=":"
6971 else
6972 case $cross_compiling:$ac_tool_warned in
6973 yes:)
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6975 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6976 ac_tool_warned=yes ;;
6977 esac
6978 STRIP=$ac_ct_STRIP
6979 fi
6980 else
6981 STRIP="$ac_cv_prog_STRIP"
6982 fi
6983
6984 test -z "$STRIP" && STRIP=:
6985
6986
6987
6988
6989
6990
6991 if test -n "$ac_tool_prefix"; then
6992 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6993 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6995 $as_echo_n "checking for $ac_word... " >&6; }
6996 if ${ac_cv_prog_RANLIB+:} false; then :
6997 $as_echo_n "(cached) " >&6
6998 else
6999 if test -n "$RANLIB"; then
7000 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7001 else
7002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7003 for as_dir in $PATH
7004 do
7005 IFS=$as_save_IFS
7006 test -z "$as_dir" && as_dir=.
7007 for ac_exec_ext in '' $ac_executable_extensions; do
7008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7009 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7011 break 2
7012 fi
7013 done
7014 done
7015 IFS=$as_save_IFS
7016
7017 fi
7018 fi
7019 RANLIB=$ac_cv_prog_RANLIB
7020 if test -n "$RANLIB"; then
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7022 $as_echo "$RANLIB" >&6; }
7023 else
7024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025 $as_echo "no" >&6; }
7026 fi
7027
7028
7029 fi
7030 if test -z "$ac_cv_prog_RANLIB"; then
7031 ac_ct_RANLIB=$RANLIB
7032 # Extract the first word of "ranlib", so it can be a program name with args.
7033 set dummy ranlib; ac_word=$2
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7035 $as_echo_n "checking for $ac_word... " >&6; }
7036 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7037 $as_echo_n "(cached) " >&6
7038 else
7039 if test -n "$ac_ct_RANLIB"; then
7040 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7041 else
7042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7043 for as_dir in $PATH
7044 do
7045 IFS=$as_save_IFS
7046 test -z "$as_dir" && as_dir=.
7047 for ac_exec_ext in '' $ac_executable_extensions; do
7048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7049 ac_cv_prog_ac_ct_RANLIB="ranlib"
7050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7051 break 2
7052 fi
7053 done
7054 done
7055 IFS=$as_save_IFS
7056
7057 fi
7058 fi
7059 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7060 if test -n "$ac_ct_RANLIB"; then
7061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7062 $as_echo "$ac_ct_RANLIB" >&6; }
7063 else
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7065 $as_echo "no" >&6; }
7066 fi
7067
7068 if test "x$ac_ct_RANLIB" = x; then
7069 RANLIB=":"
7070 else
7071 case $cross_compiling:$ac_tool_warned in
7072 yes:)
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7074 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7075 ac_tool_warned=yes ;;
7076 esac
7077 RANLIB=$ac_ct_RANLIB
7078 fi
7079 else
7080 RANLIB="$ac_cv_prog_RANLIB"
7081 fi
7082
7083 test -z "$RANLIB" && RANLIB=:
7084
7085
7086
7087
7088
7089
7090 # Determine commands to create old-style static archives.
7091 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
7092 old_postinstall_cmds='chmod 644 $oldlib'
7093 old_postuninstall_cmds=
7094
7095 if test -n "$RANLIB"; then
7096 case $host_os in
7097 openbsd*)
7098 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
7099 ;;
7100 *)
7101 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
7102 ;;
7103 esac
7104 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
7105 fi
7106
7107 case $host_os in
7108 darwin*)
7109 lock_old_archive_extraction=yes ;;
7110 *)
7111 lock_old_archive_extraction=no ;;
7112 esac
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152 # If no C compiler was specified, use CC.
7153 LTCC=${LTCC-"$CC"}
7154
7155 # If no C compiler flags were specified, use CFLAGS.
7156 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7157
7158 # Allow CC to be a program name with arguments.
7159 compiler=$CC
7160
7161
7162 # Check for command to grab the raw symbol name followed by C symbol from nm.
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7164 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7165 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
7166 $as_echo_n "(cached) " >&6
7167 else
7168
7169 # These are sane defaults that work on at least a few old systems.
7170 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7171
7172 # Character class describing NM global symbol codes.
7173 symcode='[BCDEGRST]'
7174
7175 # Regexp to match symbols that can be accessed directly from C.
7176 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7177
7178 # Define system-specific variables.
7179 case $host_os in
7180 aix*)
7181 symcode='[BCDT]'
7182 ;;
7183 cygwin* | mingw* | pw32* | cegcc*)
7184 symcode='[ABCDGISTW]'
7185 ;;
7186 hpux*)
7187 if test "$host_cpu" = ia64; then
7188 symcode='[ABCDEGRST]'
7189 fi
7190 ;;
7191 irix* | nonstopux*)
7192 symcode='[BCDEGRST]'
7193 ;;
7194 osf*)
7195 symcode='[BCDEGQRST]'
7196 ;;
7197 solaris*)
7198 symcode='[BDRT]'
7199 ;;
7200 sco3.2v5*)
7201 symcode='[DT]'
7202 ;;
7203 sysv4.2uw2*)
7204 symcode='[DT]'
7205 ;;
7206 sysv5* | sco5v6* | unixware* | OpenUNIX*)
7207 symcode='[ABDT]'
7208 ;;
7209 sysv4)
7210 symcode='[DFNSTU]'
7211 ;;
7212 esac
7213
7214 # If we're using GNU nm, then use its standard symbol codes.
7215 case `$NM -V 2>&1` in
7216 *GNU* | *'with BFD'*)
7217 symcode='[ABCDGIRSTW]' ;;
7218 esac
7219
7220 # Transform an extracted symbol line into a proper C declaration.
7221 # Some systems (esp. on ia64) link data and code symbols differently,
7222 # so use this general approach.
7223 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7224
7225 # Transform an extracted symbol line into symbol name and symbol address
7226 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
7227 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'"
7228
7229 # Handle CRLF in mingw tool chain
7230 opt_cr=
7231 case $build_os in
7232 mingw*)
7233 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7234 ;;
7235 esac
7236
7237 # Try without a prefix underscore, then with it.
7238 for ac_symprfx in "" "_"; do
7239
7240 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7241 symxfrm="\\1 $ac_symprfx\\2 \\2"
7242
7243 # Write the raw and C identifiers.
7244 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7245 # Fake it for dumpbin and say T for any non-static function
7246 # and D for any global variable.
7247 # Also find C++ and __fastcall symbols from MSVC++,
7248 # which start with @ or ?.
7249 lt_cv_sys_global_symbol_pipe="$AWK '"\
7250 " {last_section=section; section=\$ 3};"\
7251 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7252 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7253 " \$ 0!~/External *\|/{next};"\
7254 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7255 " {if(hide[section]) next};"\
7256 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
7257 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
7258 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
7259 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
7260 " ' prfx=^$ac_symprfx"
7261 else
7262 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7263 fi
7264 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
7265
7266 # Check to see that the pipe works correctly.
7267 pipe_works=no
7268
7269 rm -f conftest*
7270 cat > conftest.$ac_ext <<_LT_EOF
7271 #ifdef __cplusplus
7272 extern "C" {
7273 #endif
7274 char nm_test_var;
7275 void nm_test_func(void);
7276 void nm_test_func(void){}
7277 #ifdef __cplusplus
7278 }
7279 #endif
7280 int main(){nm_test_var='a';nm_test_func();return(0);}
7281 _LT_EOF
7282
7283 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7284 (eval $ac_compile) 2>&5
7285 ac_status=$?
7286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7287 test $ac_status = 0; }; then
7288 # Now try to grab the symbols.
7289 nlist=conftest.nm
7290 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
7291 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
7292 ac_status=$?
7293 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7294 test $ac_status = 0; } && test -s "$nlist"; then
7295 # Try sorting and uniquifying the output.
7296 if sort "$nlist" | uniq > "$nlist"T; then
7297 mv -f "$nlist"T "$nlist"
7298 else
7299 rm -f "$nlist"T
7300 fi
7301
7302 # Make sure that we snagged all the symbols we need.
7303 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7304 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7305 cat <<_LT_EOF > conftest.$ac_ext
7306 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
7307 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
7308 /* DATA imports from DLLs on WIN32 con't be const, because runtime
7309 relocations are performed -- see ld's documentation on pseudo-relocs. */
7310 # define LT_DLSYM_CONST
7311 #elif defined(__osf__)
7312 /* This system does not cope well with relocations in const data. */
7313 # define LT_DLSYM_CONST
7314 #else
7315 # define LT_DLSYM_CONST const
7316 #endif
7317
7318 #ifdef __cplusplus
7319 extern "C" {
7320 #endif
7321
7322 _LT_EOF
7323 # Now generate the symbol file.
7324 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7325
7326 cat <<_LT_EOF >> conftest.$ac_ext
7327
7328 /* The mapping between symbol names and symbols. */
7329 LT_DLSYM_CONST struct {
7330 const char *name;
7331 void *address;
7332 }
7333 lt__PROGRAM__LTX_preloaded_symbols[] =
7334 {
7335 { "@PROGRAM@", (void *) 0 },
7336 _LT_EOF
7337 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7338 cat <<\_LT_EOF >> conftest.$ac_ext
7339 {0, (void *) 0}
7340 };
7341
7342 /* This works around a problem in FreeBSD linker */
7343 #ifdef FREEBSD_WORKAROUND
7344 static const void *lt_preloaded_setup() {
7345 return lt__PROGRAM__LTX_preloaded_symbols;
7346 }
7347 #endif
7348
7349 #ifdef __cplusplus
7350 }
7351 #endif
7352 _LT_EOF
7353 # Now try linking the two files.
7354 mv conftest.$ac_objext conftstm.$ac_objext
7355 lt_globsym_save_LIBS=$LIBS
7356 lt_globsym_save_CFLAGS=$CFLAGS
7357 LIBS="conftstm.$ac_objext"
7358 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7359 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7360 (eval $ac_link) 2>&5
7361 ac_status=$?
7362 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7363 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7364 pipe_works=yes
7365 fi
7366 LIBS=$lt_globsym_save_LIBS
7367 CFLAGS=$lt_globsym_save_CFLAGS
7368 else
7369 echo "cannot find nm_test_func in $nlist" >&5
7370 fi
7371 else
7372 echo "cannot find nm_test_var in $nlist" >&5
7373 fi
7374 else
7375 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7376 fi
7377 else
7378 echo "$progname: failed program was:" >&5
7379 cat conftest.$ac_ext >&5
7380 fi
7381 rm -rf conftest* conftst*
7382
7383 # Do not use the global_symbol_pipe unless it works.
7384 if test "$pipe_works" = yes; then
7385 break
7386 else
7387 lt_cv_sys_global_symbol_pipe=
7388 fi
7389 done
7390
7391 fi
7392
7393 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7394 lt_cv_sys_global_symbol_to_cdecl=
7395 fi
7396 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7398 $as_echo "failed" >&6; }
7399 else
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7401 $as_echo "ok" >&6; }
7402 fi
7403
7404 # Response file support.
7405 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7406 nm_file_list_spec='@'
7407 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
7408 nm_file_list_spec='@'
7409 fi
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
7438 $as_echo_n "checking for sysroot... " >&6; }
7439
7440 # Check whether --with-sysroot was given.
7441 if test "${with_sysroot+set}" = set; then :
7442 withval=$with_sysroot;
7443 else
7444 with_sysroot=no
7445 fi
7446
7447
7448 lt_sysroot=
7449 case ${with_sysroot} in #(
7450 yes)
7451 if test "$GCC" = yes; then
7452 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
7453 fi
7454 ;; #(
7455 /*)
7456 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
7457 ;; #(
7458 no|'')
7459 ;; #(
7460 *)
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
7462 $as_echo "${with_sysroot}" >&6; }
7463 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
7464 ;;
7465 esac
7466
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
7468 $as_echo "${lt_sysroot:-no}" >&6; }
7469
7470
7471
7472
7473
7474 # Check whether --enable-libtool-lock was given.
7475 if test "${enable_libtool_lock+set}" = set; then :
7476 enableval=$enable_libtool_lock;
7477 fi
7478
7479 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7480
7481 # Some flags need to be propagated to the compiler or linker for good
7482 # libtool support.
7483 case $host in
7484 ia64-*-hpux*)
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.$ac_objext` in
7493 *ELF-32*)
7494 HPUX_IA64_MODE="32"
7495 ;;
7496 *ELF-64*)
7497 HPUX_IA64_MODE="64"
7498 ;;
7499 esac
7500 fi
7501 rm -rf conftest*
7502 ;;
7503 *-*-irix6*)
7504 # Find out which ABI we are using.
7505 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
7506 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7507 (eval $ac_compile) 2>&5
7508 ac_status=$?
7509 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7510 test $ac_status = 0; }; then
7511 if test "$lt_cv_prog_gnu_ld" = yes; then
7512 case `/usr/bin/file conftest.$ac_objext` in
7513 *32-bit*)
7514 LD="${LD-ld} -melf32bsmip"
7515 ;;
7516 *N32*)
7517 LD="${LD-ld} -melf32bmipn32"
7518 ;;
7519 *64-bit*)
7520 LD="${LD-ld} -melf64bmip"
7521 ;;
7522 esac
7523 else
7524 case `/usr/bin/file conftest.$ac_objext` in
7525 *32-bit*)
7526 LD="${LD-ld} -32"
7527 ;;
7528 *N32*)
7529 LD="${LD-ld} -n32"
7530 ;;
7531 *64-bit*)
7532 LD="${LD-ld} -64"
7533 ;;
7534 esac
7535 fi
7536 fi
7537 rm -rf conftest*
7538 ;;
7539
7540 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
7541 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
7542 # Find out which ABI we are using.
7543 echo 'int i;' > conftest.$ac_ext
7544 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7545 (eval $ac_compile) 2>&5
7546 ac_status=$?
7547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7548 test $ac_status = 0; }; then
7549 case `/usr/bin/file conftest.o` in
7550 *32-bit*)
7551 case $host in
7552 x86_64-*kfreebsd*-gnu)
7553 LD="${LD-ld} -m elf_i386_fbsd"
7554 ;;
7555 x86_64-*linux*)
7556 case `/usr/bin/file conftest.o` in
7557 *x86-64*)
7558 LD="${LD-ld} -m elf32_x86_64"
7559 ;;
7560 *)
7561 LD="${LD-ld} -m elf_i386"
7562 ;;
7563 esac
7564 ;;
7565 powerpc64le-*)
7566 LD="${LD-ld} -m elf32lppclinux"
7567 ;;
7568 powerpc64-*)
7569 LD="${LD-ld} -m elf32ppclinux"
7570 ;;
7571 s390x-*linux*)
7572 LD="${LD-ld} -m elf_s390"
7573 ;;
7574 sparc64-*linux*)
7575 LD="${LD-ld} -m elf32_sparc"
7576 ;;
7577 esac
7578 ;;
7579 *64-bit*)
7580 case $host in
7581 x86_64-*kfreebsd*-gnu)
7582 LD="${LD-ld} -m elf_x86_64_fbsd"
7583 ;;
7584 x86_64-*linux*)
7585 LD="${LD-ld} -m elf_x86_64"
7586 ;;
7587 powerpcle-*)
7588 LD="${LD-ld} -m elf64lppc"
7589 ;;
7590 powerpc-*)
7591 LD="${LD-ld} -m elf64ppc"
7592 ;;
7593 s390*-*linux*|s390*-*tpf*)
7594 LD="${LD-ld} -m elf64_s390"
7595 ;;
7596 sparc*-*linux*)
7597 LD="${LD-ld} -m elf64_sparc"
7598 ;;
7599 esac
7600 ;;
7601 esac
7602 fi
7603 rm -rf conftest*
7604 ;;
7605
7606 *-*-sco3.2v5*)
7607 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7608 SAVE_CFLAGS="$CFLAGS"
7609 CFLAGS="$CFLAGS -belf"
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7611 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7612 if ${lt_cv_cc_needs_belf+:} false; then :
7613 $as_echo_n "(cached) " >&6
7614 else
7615 ac_ext=c
7616 ac_cpp='$CPP $CPPFLAGS'
7617 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7618 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7619 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7620
7621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7622 /* end confdefs.h. */
7623
7624 int
7625 main ()
7626 {
7627
7628 ;
7629 return 0;
7630 }
7631 _ACEOF
7632 if ac_fn_c_try_link "$LINENO"; then :
7633 lt_cv_cc_needs_belf=yes
7634 else
7635 lt_cv_cc_needs_belf=no
7636 fi
7637 rm -f core conftest.err conftest.$ac_objext \
7638 conftest$ac_exeext conftest.$ac_ext
7639 ac_ext=c
7640 ac_cpp='$CPP $CPPFLAGS'
7641 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7642 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7643 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7644
7645 fi
7646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7647 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7648 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7649 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7650 CFLAGS="$SAVE_CFLAGS"
7651 fi
7652 ;;
7653 *-*solaris*)
7654 # Find out which ABI we are using.
7655 echo 'int i;' > conftest.$ac_ext
7656 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7657 (eval $ac_compile) 2>&5
7658 ac_status=$?
7659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7660 test $ac_status = 0; }; then
7661 case `/usr/bin/file conftest.o` in
7662 *64-bit*)
7663 case $lt_cv_prog_gnu_ld in
7664 yes*)
7665 case $host in
7666 i?86-*-solaris*)
7667 LD="${LD-ld} -m elf_x86_64"
7668 ;;
7669 sparc*-*-solaris*)
7670 LD="${LD-ld} -m elf64_sparc"
7671 ;;
7672 esac
7673 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
7674 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
7675 LD="${LD-ld}_sol2"
7676 fi
7677 ;;
7678 *)
7679 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
7680 LD="${LD-ld} -64"
7681 fi
7682 ;;
7683 esac
7684 ;;
7685 esac
7686 fi
7687 rm -rf conftest*
7688 ;;
7689 esac
7690
7691 need_locks="$enable_libtool_lock"
7692
7693 if test -n "$ac_tool_prefix"; then
7694 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
7695 set dummy ${ac_tool_prefix}mt; ac_word=$2
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7697 $as_echo_n "checking for $ac_word... " >&6; }
7698 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
7699 $as_echo_n "(cached) " >&6
7700 else
7701 if test -n "$MANIFEST_TOOL"; then
7702 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
7703 else
7704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7705 for as_dir in $PATH
7706 do
7707 IFS=$as_save_IFS
7708 test -z "$as_dir" && as_dir=.
7709 for ac_exec_ext in '' $ac_executable_extensions; do
7710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7711 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
7712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7713 break 2
7714 fi
7715 done
7716 done
7717 IFS=$as_save_IFS
7718
7719 fi
7720 fi
7721 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
7722 if test -n "$MANIFEST_TOOL"; then
7723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
7724 $as_echo "$MANIFEST_TOOL" >&6; }
7725 else
7726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7727 $as_echo "no" >&6; }
7728 fi
7729
7730
7731 fi
7732 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
7733 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
7734 # Extract the first word of "mt", so it can be a program name with args.
7735 set dummy mt; ac_word=$2
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7737 $as_echo_n "checking for $ac_word... " >&6; }
7738 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
7739 $as_echo_n "(cached) " >&6
7740 else
7741 if test -n "$ac_ct_MANIFEST_TOOL"; then
7742 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
7743 else
7744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7745 for as_dir in $PATH
7746 do
7747 IFS=$as_save_IFS
7748 test -z "$as_dir" && as_dir=.
7749 for ac_exec_ext in '' $ac_executable_extensions; do
7750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7751 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
7752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7753 break 2
7754 fi
7755 done
7756 done
7757 IFS=$as_save_IFS
7758
7759 fi
7760 fi
7761 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
7762 if test -n "$ac_ct_MANIFEST_TOOL"; then
7763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
7764 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
7765 else
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7767 $as_echo "no" >&6; }
7768 fi
7769
7770 if test "x$ac_ct_MANIFEST_TOOL" = x; then
7771 MANIFEST_TOOL=":"
7772 else
7773 case $cross_compiling:$ac_tool_warned in
7774 yes:)
7775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7776 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7777 ac_tool_warned=yes ;;
7778 esac
7779 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
7780 fi
7781 else
7782 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
7783 fi
7784
7785 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
7787 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
7788 if ${lt_cv_path_mainfest_tool+:} false; then :
7789 $as_echo_n "(cached) " >&6
7790 else
7791 lt_cv_path_mainfest_tool=no
7792 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
7793 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7794 cat conftest.err >&5
7795 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7796 lt_cv_path_mainfest_tool=yes
7797 fi
7798 rm -f conftest*
7799 fi
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
7801 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
7802 if test "x$lt_cv_path_mainfest_tool" != xyes; then
7803 MANIFEST_TOOL=:
7804 fi
7805
7806
7807
7808
7809
7810
7811 case $host_os in
7812 rhapsody* | darwin*)
7813 if test -n "$ac_tool_prefix"; then
7814 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7815 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817 $as_echo_n "checking for $ac_word... " >&6; }
7818 if ${ac_cv_prog_DSYMUTIL+:} false; then :
7819 $as_echo_n "(cached) " >&6
7820 else
7821 if test -n "$DSYMUTIL"; then
7822 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7823 else
7824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7825 for as_dir in $PATH
7826 do
7827 IFS=$as_save_IFS
7828 test -z "$as_dir" && as_dir=.
7829 for ac_exec_ext in '' $ac_executable_extensions; do
7830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7831 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
7832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7833 break 2
7834 fi
7835 done
7836 done
7837 IFS=$as_save_IFS
7838
7839 fi
7840 fi
7841 DSYMUTIL=$ac_cv_prog_DSYMUTIL
7842 if test -n "$DSYMUTIL"; then
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
7844 $as_echo "$DSYMUTIL" >&6; }
7845 else
7846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7847 $as_echo "no" >&6; }
7848 fi
7849
7850
7851 fi
7852 if test -z "$ac_cv_prog_DSYMUTIL"; then
7853 ac_ct_DSYMUTIL=$DSYMUTIL
7854 # Extract the first word of "dsymutil", so it can be a program name with args.
7855 set dummy dsymutil; ac_word=$2
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7857 $as_echo_n "checking for $ac_word... " >&6; }
7858 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
7859 $as_echo_n "(cached) " >&6
7860 else
7861 if test -n "$ac_ct_DSYMUTIL"; then
7862 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7863 else
7864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7865 for as_dir in $PATH
7866 do
7867 IFS=$as_save_IFS
7868 test -z "$as_dir" && as_dir=.
7869 for ac_exec_ext in '' $ac_executable_extensions; do
7870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7871 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
7872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7873 break 2
7874 fi
7875 done
7876 done
7877 IFS=$as_save_IFS
7878
7879 fi
7880 fi
7881 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7882 if test -n "$ac_ct_DSYMUTIL"; then
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
7884 $as_echo "$ac_ct_DSYMUTIL" >&6; }
7885 else
7886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7887 $as_echo "no" >&6; }
7888 fi
7889
7890 if test "x$ac_ct_DSYMUTIL" = x; then
7891 DSYMUTIL=":"
7892 else
7893 case $cross_compiling:$ac_tool_warned in
7894 yes:)
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7896 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7897 ac_tool_warned=yes ;;
7898 esac
7899 DSYMUTIL=$ac_ct_DSYMUTIL
7900 fi
7901 else
7902 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
7903 fi
7904
7905 if test -n "$ac_tool_prefix"; then
7906 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7907 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909 $as_echo_n "checking for $ac_word... " >&6; }
7910 if ${ac_cv_prog_NMEDIT+:} false; then :
7911 $as_echo_n "(cached) " >&6
7912 else
7913 if test -n "$NMEDIT"; then
7914 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7915 else
7916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917 for as_dir in $PATH
7918 do
7919 IFS=$as_save_IFS
7920 test -z "$as_dir" && as_dir=.
7921 for ac_exec_ext in '' $ac_executable_extensions; do
7922 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7924 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925 break 2
7926 fi
7927 done
7928 done
7929 IFS=$as_save_IFS
7930
7931 fi
7932 fi
7933 NMEDIT=$ac_cv_prog_NMEDIT
7934 if test -n "$NMEDIT"; then
7935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
7936 $as_echo "$NMEDIT" >&6; }
7937 else
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939 $as_echo "no" >&6; }
7940 fi
7941
7942
7943 fi
7944 if test -z "$ac_cv_prog_NMEDIT"; then
7945 ac_ct_NMEDIT=$NMEDIT
7946 # Extract the first word of "nmedit", so it can be a program name with args.
7947 set dummy nmedit; ac_word=$2
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7949 $as_echo_n "checking for $ac_word... " >&6; }
7950 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
7951 $as_echo_n "(cached) " >&6
7952 else
7953 if test -n "$ac_ct_NMEDIT"; then
7954 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7955 else
7956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7957 for as_dir in $PATH
7958 do
7959 IFS=$as_save_IFS
7960 test -z "$as_dir" && as_dir=.
7961 for ac_exec_ext in '' $ac_executable_extensions; do
7962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7963 ac_cv_prog_ac_ct_NMEDIT="nmedit"
7964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7965 break 2
7966 fi
7967 done
7968 done
7969 IFS=$as_save_IFS
7970
7971 fi
7972 fi
7973 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7974 if test -n "$ac_ct_NMEDIT"; then
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
7976 $as_echo "$ac_ct_NMEDIT" >&6; }
7977 else
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7979 $as_echo "no" >&6; }
7980 fi
7981
7982 if test "x$ac_ct_NMEDIT" = x; then
7983 NMEDIT=":"
7984 else
7985 case $cross_compiling:$ac_tool_warned in
7986 yes:)
7987 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7988 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7989 ac_tool_warned=yes ;;
7990 esac
7991 NMEDIT=$ac_ct_NMEDIT
7992 fi
7993 else
7994 NMEDIT="$ac_cv_prog_NMEDIT"
7995 fi
7996
7997 if test -n "$ac_tool_prefix"; then
7998 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
7999 set dummy ${ac_tool_prefix}lipo; ac_word=$2
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8001 $as_echo_n "checking for $ac_word... " >&6; }
8002 if ${ac_cv_prog_LIPO+:} false; then :
8003 $as_echo_n "(cached) " >&6
8004 else
8005 if test -n "$LIPO"; then
8006 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
8007 else
8008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8009 for as_dir in $PATH
8010 do
8011 IFS=$as_save_IFS
8012 test -z "$as_dir" && as_dir=.
8013 for ac_exec_ext in '' $ac_executable_extensions; do
8014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8015 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
8016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8017 break 2
8018 fi
8019 done
8020 done
8021 IFS=$as_save_IFS
8022
8023 fi
8024 fi
8025 LIPO=$ac_cv_prog_LIPO
8026 if test -n "$LIPO"; then
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
8028 $as_echo "$LIPO" >&6; }
8029 else
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8031 $as_echo "no" >&6; }
8032 fi
8033
8034
8035 fi
8036 if test -z "$ac_cv_prog_LIPO"; then
8037 ac_ct_LIPO=$LIPO
8038 # Extract the first word of "lipo", so it can be a program name with args.
8039 set dummy lipo; ac_word=$2
8040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8041 $as_echo_n "checking for $ac_word... " >&6; }
8042 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
8043 $as_echo_n "(cached) " >&6
8044 else
8045 if test -n "$ac_ct_LIPO"; then
8046 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
8047 else
8048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8049 for as_dir in $PATH
8050 do
8051 IFS=$as_save_IFS
8052 test -z "$as_dir" && as_dir=.
8053 for ac_exec_ext in '' $ac_executable_extensions; do
8054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8055 ac_cv_prog_ac_ct_LIPO="lipo"
8056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8057 break 2
8058 fi
8059 done
8060 done
8061 IFS=$as_save_IFS
8062
8063 fi
8064 fi
8065 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
8066 if test -n "$ac_ct_LIPO"; then
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
8068 $as_echo "$ac_ct_LIPO" >&6; }
8069 else
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8071 $as_echo "no" >&6; }
8072 fi
8073
8074 if test "x$ac_ct_LIPO" = x; then
8075 LIPO=":"
8076 else
8077 case $cross_compiling:$ac_tool_warned in
8078 yes:)
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8080 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8081 ac_tool_warned=yes ;;
8082 esac
8083 LIPO=$ac_ct_LIPO
8084 fi
8085 else
8086 LIPO="$ac_cv_prog_LIPO"
8087 fi
8088
8089 if test -n "$ac_tool_prefix"; then
8090 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
8091 set dummy ${ac_tool_prefix}otool; ac_word=$2
8092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8093 $as_echo_n "checking for $ac_word... " >&6; }
8094 if ${ac_cv_prog_OTOOL+:} false; then :
8095 $as_echo_n "(cached) " >&6
8096 else
8097 if test -n "$OTOOL"; then
8098 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
8099 else
8100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8101 for as_dir in $PATH
8102 do
8103 IFS=$as_save_IFS
8104 test -z "$as_dir" && as_dir=.
8105 for ac_exec_ext in '' $ac_executable_extensions; do
8106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8107 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
8108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8109 break 2
8110 fi
8111 done
8112 done
8113 IFS=$as_save_IFS
8114
8115 fi
8116 fi
8117 OTOOL=$ac_cv_prog_OTOOL
8118 if test -n "$OTOOL"; then
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
8120 $as_echo "$OTOOL" >&6; }
8121 else
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8123 $as_echo "no" >&6; }
8124 fi
8125
8126
8127 fi
8128 if test -z "$ac_cv_prog_OTOOL"; then
8129 ac_ct_OTOOL=$OTOOL
8130 # Extract the first word of "otool", so it can be a program name with args.
8131 set dummy otool; ac_word=$2
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8133 $as_echo_n "checking for $ac_word... " >&6; }
8134 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
8135 $as_echo_n "(cached) " >&6
8136 else
8137 if test -n "$ac_ct_OTOOL"; then
8138 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
8139 else
8140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8141 for as_dir in $PATH
8142 do
8143 IFS=$as_save_IFS
8144 test -z "$as_dir" && as_dir=.
8145 for ac_exec_ext in '' $ac_executable_extensions; do
8146 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8147 ac_cv_prog_ac_ct_OTOOL="otool"
8148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8149 break 2
8150 fi
8151 done
8152 done
8153 IFS=$as_save_IFS
8154
8155 fi
8156 fi
8157 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
8158 if test -n "$ac_ct_OTOOL"; then
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
8160 $as_echo "$ac_ct_OTOOL" >&6; }
8161 else
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163 $as_echo "no" >&6; }
8164 fi
8165
8166 if test "x$ac_ct_OTOOL" = x; then
8167 OTOOL=":"
8168 else
8169 case $cross_compiling:$ac_tool_warned in
8170 yes:)
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8172 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8173 ac_tool_warned=yes ;;
8174 esac
8175 OTOOL=$ac_ct_OTOOL
8176 fi
8177 else
8178 OTOOL="$ac_cv_prog_OTOOL"
8179 fi
8180
8181 if test -n "$ac_tool_prefix"; then
8182 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
8183 set dummy ${ac_tool_prefix}otool64; ac_word=$2
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8185 $as_echo_n "checking for $ac_word... " >&6; }
8186 if ${ac_cv_prog_OTOOL64+:} false; then :
8187 $as_echo_n "(cached) " >&6
8188 else
8189 if test -n "$OTOOL64"; then
8190 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
8191 else
8192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8193 for as_dir in $PATH
8194 do
8195 IFS=$as_save_IFS
8196 test -z "$as_dir" && as_dir=.
8197 for ac_exec_ext in '' $ac_executable_extensions; do
8198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8199 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
8200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8201 break 2
8202 fi
8203 done
8204 done
8205 IFS=$as_save_IFS
8206
8207 fi
8208 fi
8209 OTOOL64=$ac_cv_prog_OTOOL64
8210 if test -n "$OTOOL64"; then
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
8212 $as_echo "$OTOOL64" >&6; }
8213 else
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215 $as_echo "no" >&6; }
8216 fi
8217
8218
8219 fi
8220 if test -z "$ac_cv_prog_OTOOL64"; then
8221 ac_ct_OTOOL64=$OTOOL64
8222 # Extract the first word of "otool64", so it can be a program name with args.
8223 set dummy otool64; ac_word=$2
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225 $as_echo_n "checking for $ac_word... " >&6; }
8226 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
8227 $as_echo_n "(cached) " >&6
8228 else
8229 if test -n "$ac_ct_OTOOL64"; then
8230 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
8231 else
8232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8233 for as_dir in $PATH
8234 do
8235 IFS=$as_save_IFS
8236 test -z "$as_dir" && as_dir=.
8237 for ac_exec_ext in '' $ac_executable_extensions; do
8238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8239 ac_cv_prog_ac_ct_OTOOL64="otool64"
8240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8241 break 2
8242 fi
8243 done
8244 done
8245 IFS=$as_save_IFS
8246
8247 fi
8248 fi
8249 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
8250 if test -n "$ac_ct_OTOOL64"; then
8251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
8252 $as_echo "$ac_ct_OTOOL64" >&6; }
8253 else
8254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8255 $as_echo "no" >&6; }
8256 fi
8257
8258 if test "x$ac_ct_OTOOL64" = x; then
8259 OTOOL64=":"
8260 else
8261 case $cross_compiling:$ac_tool_warned in
8262 yes:)
8263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8264 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8265 ac_tool_warned=yes ;;
8266 esac
8267 OTOOL64=$ac_ct_OTOOL64
8268 fi
8269 else
8270 OTOOL64="$ac_cv_prog_OTOOL64"
8271 fi
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
8300 $as_echo_n "checking for -single_module linker flag... " >&6; }
8301 if ${lt_cv_apple_cc_single_mod+:} false; then :
8302 $as_echo_n "(cached) " >&6
8303 else
8304 lt_cv_apple_cc_single_mod=no
8305 if test -z "${LT_MULTI_MODULE}"; then
8306 # By default we will add the -single_module flag. You can override
8307 # by either setting the environment variable LT_MULTI_MODULE
8308 # non-empty at configure time, or by adding -multi_module to the
8309 # link flags.
8310 rm -rf libconftest.dylib*
8311 echo "int foo(void){return 1;}" > conftest.c
8312 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8313 -dynamiclib -Wl,-single_module conftest.c" >&5
8314 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8315 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
8316 _lt_result=$?
8317 # If there is a non-empty error log, and "single_module"
8318 # appears in it, assume the flag caused a linker warning
8319 if test -s conftest.err && $GREP single_module conftest.err; then
8320 cat conftest.err >&5
8321 # Otherwise, if the output was created with a 0 exit code from
8322 # the compiler, it worked.
8323 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
8324 lt_cv_apple_cc_single_mod=yes
8325 else
8326 cat conftest.err >&5
8327 fi
8328 rm -rf libconftest.dylib*
8329 rm -f conftest.*
8330 fi
8331 fi
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
8333 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
8334
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
8336 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
8337 if ${lt_cv_ld_exported_symbols_list+:} false; then :
8338 $as_echo_n "(cached) " >&6
8339 else
8340 lt_cv_ld_exported_symbols_list=no
8341 save_LDFLAGS=$LDFLAGS
8342 echo "_main" > conftest.sym
8343 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
8344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8345 /* end confdefs.h. */
8346
8347 int
8348 main ()
8349 {
8350
8351 ;
8352 return 0;
8353 }
8354 _ACEOF
8355 if ac_fn_c_try_link "$LINENO"; then :
8356 lt_cv_ld_exported_symbols_list=yes
8357 else
8358 lt_cv_ld_exported_symbols_list=no
8359 fi
8360 rm -f core conftest.err conftest.$ac_objext \
8361 conftest$ac_exeext conftest.$ac_ext
8362 LDFLAGS="$save_LDFLAGS"
8363
8364 fi
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
8366 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
8367
8368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
8369 $as_echo_n "checking for -force_load linker flag... " >&6; }
8370 if ${lt_cv_ld_force_load+:} false; then :
8371 $as_echo_n "(cached) " >&6
8372 else
8373 lt_cv_ld_force_load=no
8374 cat > conftest.c << _LT_EOF
8375 int forced_loaded() { return 2;}
8376 _LT_EOF
8377 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
8378 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8379 echo "$AR cru libconftest.a conftest.o" >&5
8380 $AR cru libconftest.a conftest.o 2>&5
8381 echo "$RANLIB libconftest.a" >&5
8382 $RANLIB libconftest.a 2>&5
8383 cat > conftest.c << _LT_EOF
8384 int main() { return 0;}
8385 _LT_EOF
8386 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
8387 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
8388 _lt_result=$?
8389 if test -s conftest.err && $GREP force_load conftest.err; then
8390 cat conftest.err >&5
8391 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
8392 lt_cv_ld_force_load=yes
8393 else
8394 cat conftest.err >&5
8395 fi
8396 rm -f conftest.err libconftest.a conftest conftest.c
8397 rm -rf conftest.dSYM
8398
8399 fi
8400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
8401 $as_echo "$lt_cv_ld_force_load" >&6; }
8402 case $host_os in
8403 rhapsody* | darwin1.[012])
8404 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
8405 darwin1.*)
8406 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8407 darwin*) # darwin 5.x on
8408 # if running on 10.5 or later, the deployment target defaults
8409 # to the OS version, if on x86, and 10.4, the deployment
8410 # target defaults to 10.4. Don't you love it?
8411 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
8412 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
8413 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8414 10.[012]*)
8415 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
8416 10.*)
8417 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
8418 esac
8419 ;;
8420 esac
8421 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
8422 _lt_dar_single_mod='$single_module'
8423 fi
8424 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
8425 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
8426 else
8427 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
8428 fi
8429 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
8430 _lt_dsymutil='~$DSYMUTIL $lib || :'
8431 else
8432 _lt_dsymutil=
8433 fi
8434 ;;
8435 esac
8436
8437 ac_ext=c
8438 ac_cpp='$CPP $CPPFLAGS'
8439 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8440 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8441 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
8443 $as_echo_n "checking how to run the C preprocessor... " >&6; }
8444 # On Suns, sometimes $CPP names a directory.
8445 if test -n "$CPP" && test -d "$CPP"; then
8446 CPP=
8447 fi
8448 if test -z "$CPP"; then
8449 if ${ac_cv_prog_CPP+:} false; then :
8450 $as_echo_n "(cached) " >&6
8451 else
8452 # Double quotes because CPP needs to be expanded
8453 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
8454 do
8455 ac_preproc_ok=false
8456 for ac_c_preproc_warn_flag in '' yes
8457 do
8458 # Use a header file that comes with gcc, so configuring glibc
8459 # with a fresh cross-compiler works.
8460 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8461 # <limits.h> exists even on freestanding compilers.
8462 # On the NeXT, cc -E runs the code through the compiler's parser,
8463 # not just through cpp. "Syntax error" is here to catch this case.
8464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8465 /* end confdefs.h. */
8466 #ifdef __STDC__
8467 # include <limits.h>
8468 #else
8469 # include <assert.h>
8470 #endif
8471 Syntax error
8472 _ACEOF
8473 if ac_fn_c_try_cpp "$LINENO"; then :
8474
8475 else
8476 # Broken: fails on valid input.
8477 continue
8478 fi
8479 rm -f conftest.err conftest.i conftest.$ac_ext
8480
8481 # OK, works on sane cases. Now check whether nonexistent headers
8482 # can be detected and how.
8483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8484 /* end confdefs.h. */
8485 #include <ac_nonexistent.h>
8486 _ACEOF
8487 if ac_fn_c_try_cpp "$LINENO"; then :
8488 # Broken: success on invalid input.
8489 continue
8490 else
8491 # Passes both tests.
8492 ac_preproc_ok=:
8493 break
8494 fi
8495 rm -f conftest.err conftest.i conftest.$ac_ext
8496
8497 done
8498 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8499 rm -f conftest.i conftest.err conftest.$ac_ext
8500 if $ac_preproc_ok; then :
8501 break
8502 fi
8503
8504 done
8505 ac_cv_prog_CPP=$CPP
8506
8507 fi
8508 CPP=$ac_cv_prog_CPP
8509 else
8510 ac_cv_prog_CPP=$CPP
8511 fi
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8513 $as_echo "$CPP" >&6; }
8514 ac_preproc_ok=false
8515 for ac_c_preproc_warn_flag in '' yes
8516 do
8517 # Use a header file that comes with gcc, so configuring glibc
8518 # with a fresh cross-compiler works.
8519 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8520 # <limits.h> exists even on freestanding compilers.
8521 # On the NeXT, cc -E runs the code through the compiler's parser,
8522 # not just through cpp. "Syntax error" is here to catch this case.
8523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8524 /* end confdefs.h. */
8525 #ifdef __STDC__
8526 # include <limits.h>
8527 #else
8528 # include <assert.h>
8529 #endif
8530 Syntax error
8531 _ACEOF
8532 if ac_fn_c_try_cpp "$LINENO"; then :
8533
8534 else
8535 # Broken: fails on valid input.
8536 continue
8537 fi
8538 rm -f conftest.err conftest.i conftest.$ac_ext
8539
8540 # OK, works on sane cases. Now check whether nonexistent headers
8541 # can be detected and how.
8542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8543 /* end confdefs.h. */
8544 #include <ac_nonexistent.h>
8545 _ACEOF
8546 if ac_fn_c_try_cpp "$LINENO"; then :
8547 # Broken: success on invalid input.
8548 continue
8549 else
8550 # Passes both tests.
8551 ac_preproc_ok=:
8552 break
8553 fi
8554 rm -f conftest.err conftest.i conftest.$ac_ext
8555
8556 done
8557 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8558 rm -f conftest.i conftest.err conftest.$ac_ext
8559 if $ac_preproc_ok; then :
8560
8561 else
8562 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8563 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8564 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8565 See \`config.log' for more details" "$LINENO" 5; }
8566 fi
8567
8568 ac_ext=c
8569 ac_cpp='$CPP $CPPFLAGS'
8570 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8571 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8573
8574
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8576 $as_echo_n "checking for ANSI C header files... " >&6; }
8577 if ${ac_cv_header_stdc+:} false; then :
8578 $as_echo_n "(cached) " >&6
8579 else
8580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8581 /* end confdefs.h. */
8582 #include <stdlib.h>
8583 #include <stdarg.h>
8584 #include <string.h>
8585 #include <float.h>
8586
8587 int
8588 main ()
8589 {
8590
8591 ;
8592 return 0;
8593 }
8594 _ACEOF
8595 if ac_fn_c_try_compile "$LINENO"; then :
8596 ac_cv_header_stdc=yes
8597 else
8598 ac_cv_header_stdc=no
8599 fi
8600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8601
8602 if test $ac_cv_header_stdc = yes; then
8603 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8605 /* end confdefs.h. */
8606 #include <string.h>
8607
8608 _ACEOF
8609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8610 $EGREP "memchr" >/dev/null 2>&1; then :
8611
8612 else
8613 ac_cv_header_stdc=no
8614 fi
8615 rm -f conftest*
8616
8617 fi
8618
8619 if test $ac_cv_header_stdc = yes; then
8620 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8622 /* end confdefs.h. */
8623 #include <stdlib.h>
8624
8625 _ACEOF
8626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8627 $EGREP "free" >/dev/null 2>&1; then :
8628
8629 else
8630 ac_cv_header_stdc=no
8631 fi
8632 rm -f conftest*
8633
8634 fi
8635
8636 if test $ac_cv_header_stdc = yes; then
8637 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8638 if test "$cross_compiling" = yes; then :
8639 :
8640 else
8641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8642 /* end confdefs.h. */
8643 #include <ctype.h>
8644 #include <stdlib.h>
8645 #if ((' ' & 0x0FF) == 0x020)
8646 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8647 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8648 #else
8649 # define ISLOWER(c) \
8650 (('a' <= (c) && (c) <= 'i') \
8651 || ('j' <= (c) && (c) <= 'r') \
8652 || ('s' <= (c) && (c) <= 'z'))
8653 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8654 #endif
8655
8656 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8657 int
8658 main ()
8659 {
8660 int i;
8661 for (i = 0; i < 256; i++)
8662 if (XOR (islower (i), ISLOWER (i))
8663 || toupper (i) != TOUPPER (i))
8664 return 2;
8665 return 0;
8666 }
8667 _ACEOF
8668 if ac_fn_c_try_run "$LINENO"; then :
8669
8670 else
8671 ac_cv_header_stdc=no
8672 fi
8673 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8674 conftest.$ac_objext conftest.beam conftest.$ac_ext
8675 fi
8676
8677 fi
8678 fi
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8680 $as_echo "$ac_cv_header_stdc" >&6; }
8681 if test $ac_cv_header_stdc = yes; then
8682
8683 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8684
8685 fi
8686
8687 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8688 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8689 inttypes.h stdint.h unistd.h
8690 do :
8691 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8692 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8693 "
8694 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8695 cat >>confdefs.h <<_ACEOF
8696 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8697 _ACEOF
8698
8699 fi
8700
8701 done
8702
8703
8704 for ac_header in dlfcn.h
8705 do :
8706 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
8707 "
8708 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
8709 cat >>confdefs.h <<_ACEOF
8710 #define HAVE_DLFCN_H 1
8711 _ACEOF
8712
8713 fi
8714
8715 done
8716
8717
8718
8719
8720 func_stripname_cnf ()
8721 {
8722 case ${2} in
8723 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8724 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8725 esac
8726 } # func_stripname_cnf
8727
8728
8729
8730
8731
8732 # Set options
8733
8734
8735
8736 enable_dlopen=no
8737
8738
8739 enable_win32_dll=no
8740
8741
8742 # Check whether --enable-shared was given.
8743 if test "${enable_shared+set}" = set; then :
8744 enableval=$enable_shared; p=${PACKAGE-default}
8745 case $enableval in
8746 yes) enable_shared=yes ;;
8747 no) enable_shared=no ;;
8748 *)
8749 enable_shared=no
8750 # Look at the argument we got. We use all the common list separators.
8751 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8752 for pkg in $enableval; do
8753 IFS="$lt_save_ifs"
8754 if test "X$pkg" = "X$p"; then
8755 enable_shared=yes
8756 fi
8757 done
8758 IFS="$lt_save_ifs"
8759 ;;
8760 esac
8761 else
8762 enable_shared=yes
8763 fi
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773 # Check whether --enable-static was given.
8774 if test "${enable_static+set}" = set; then :
8775 enableval=$enable_static; p=${PACKAGE-default}
8776 case $enableval in
8777 yes) enable_static=yes ;;
8778 no) enable_static=no ;;
8779 *)
8780 enable_static=no
8781 # Look at the argument we got. We use all the common list separators.
8782 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8783 for pkg in $enableval; do
8784 IFS="$lt_save_ifs"
8785 if test "X$pkg" = "X$p"; then
8786 enable_static=yes
8787 fi
8788 done
8789 IFS="$lt_save_ifs"
8790 ;;
8791 esac
8792 else
8793 enable_static=yes
8794 fi
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805 # Check whether --with-pic was given.
8806 if test "${with_pic+set}" = set; then :
8807 withval=$with_pic; lt_p=${PACKAGE-default}
8808 case $withval in
8809 yes|no) pic_mode=$withval ;;
8810 *)
8811 pic_mode=default
8812 # Look at the argument we got. We use all the common list separators.
8813 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8814 for lt_pkg in $withval; do
8815 IFS="$lt_save_ifs"
8816 if test "X$lt_pkg" = "X$lt_p"; then
8817 pic_mode=yes
8818 fi
8819 done
8820 IFS="$lt_save_ifs"
8821 ;;
8822 esac
8823 else
8824 pic_mode=default
8825 fi
8826
8827
8828 test -z "$pic_mode" && pic_mode=default
8829
8830
8831
8832
8833
8834
8835
8836 # Check whether --enable-fast-install was given.
8837 if test "${enable_fast_install+set}" = set; then :
8838 enableval=$enable_fast_install; p=${PACKAGE-default}
8839 case $enableval in
8840 yes) enable_fast_install=yes ;;
8841 no) enable_fast_install=no ;;
8842 *)
8843 enable_fast_install=no
8844 # Look at the argument we got. We use all the common list separators.
8845 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8846 for pkg in $enableval; do
8847 IFS="$lt_save_ifs"
8848 if test "X$pkg" = "X$p"; then
8849 enable_fast_install=yes
8850 fi
8851 done
8852 IFS="$lt_save_ifs"
8853 ;;
8854 esac
8855 else
8856 enable_fast_install=yes
8857 fi
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869 # This can be used to rebuild libtool when needed
8870 LIBTOOL_DEPS="$ltmain"
8871
8872 # Always use our own libtool.
8873 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904 test -z "$LN_S" && LN_S="ln -s"
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919 if test -n "${ZSH_VERSION+set}" ; then
8920 setopt NO_GLOB_SUBST
8921 fi
8922
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8924 $as_echo_n "checking for objdir... " >&6; }
8925 if ${lt_cv_objdir+:} false; then :
8926 $as_echo_n "(cached) " >&6
8927 else
8928 rm -f .libs 2>/dev/null
8929 mkdir .libs 2>/dev/null
8930 if test -d .libs; then
8931 lt_cv_objdir=.libs
8932 else
8933 # MS-DOS does not allow filenames that begin with a dot.
8934 lt_cv_objdir=_libs
8935 fi
8936 rmdir .libs 2>/dev/null
8937 fi
8938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8939 $as_echo "$lt_cv_objdir" >&6; }
8940 objdir=$lt_cv_objdir
8941
8942
8943
8944
8945
8946 cat >>confdefs.h <<_ACEOF
8947 #define LT_OBJDIR "$lt_cv_objdir/"
8948 _ACEOF
8949
8950
8951
8952
8953 case $host_os in
8954 aix3*)
8955 # AIX sometimes has problems with the GCC collect2 program. For some
8956 # reason, if we set the COLLECT_NAMES environment variable, the problems
8957 # vanish in a puff of smoke.
8958 if test "X${COLLECT_NAMES+set}" != Xset; then
8959 COLLECT_NAMES=
8960 export COLLECT_NAMES
8961 fi
8962 ;;
8963 esac
8964
8965 # Global variables:
8966 ofile=libtool
8967 can_build_shared=yes
8968
8969 # All known linkers require a `.a' archive for static linking (except MSVC,
8970 # which needs '.lib').
8971 libext=a
8972
8973 with_gnu_ld="$lt_cv_prog_gnu_ld"
8974
8975 old_CC="$CC"
8976 old_CFLAGS="$CFLAGS"
8977
8978 # Set sane defaults for various variables
8979 test -z "$CC" && CC=cc
8980 test -z "$LTCC" && LTCC=$CC
8981 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
8982 test -z "$LD" && LD=ld
8983 test -z "$ac_objext" && ac_objext=o
8984
8985 for cc_temp in $compiler""; do
8986 case $cc_temp in
8987 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8988 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8989 \-*) ;;
8990 *) break;;
8991 esac
8992 done
8993 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
8994
8995
8996 # Only perform the check for file, if the check method requires it
8997 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8998 case $deplibs_check_method in
8999 file_magic*)
9000 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
9002 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
9003 if ${lt_cv_path_MAGIC_CMD+:} false; then :
9004 $as_echo_n "(cached) " >&6
9005 else
9006 case $MAGIC_CMD in
9007 [\\/*] | ?:[\\/]*)
9008 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
9009 ;;
9010 *)
9011 lt_save_MAGIC_CMD="$MAGIC_CMD"
9012 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9013 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9014 for ac_dir in $ac_dummy; do
9015 IFS="$lt_save_ifs"
9016 test -z "$ac_dir" && ac_dir=.
9017 if test -f $ac_dir/${ac_tool_prefix}file; then
9018 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
9019 if test -n "$file_magic_test_file"; then
9020 case $deplibs_check_method in
9021 "file_magic "*)
9022 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9023 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9024 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9025 $EGREP "$file_magic_regex" > /dev/null; then
9026 :
9027 else
9028 cat <<_LT_EOF 1>&2
9029
9030 *** Warning: the command libtool uses to detect shared libraries,
9031 *** $file_magic_cmd, produces output that libtool cannot recognize.
9032 *** The result is that libtool may fail to recognize shared libraries
9033 *** as such. This will affect the creation of libtool libraries that
9034 *** depend on shared libraries, but programs linked with such libtool
9035 *** libraries will work regardless of this problem. Nevertheless, you
9036 *** may want to report the problem to your system manager and/or to
9037 *** bug-libtool@gnu.org
9038
9039 _LT_EOF
9040 fi ;;
9041 esac
9042 fi
9043 break
9044 fi
9045 done
9046 IFS="$lt_save_ifs"
9047 MAGIC_CMD="$lt_save_MAGIC_CMD"
9048 ;;
9049 esac
9050 fi
9051
9052 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9053 if test -n "$MAGIC_CMD"; then
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9055 $as_echo "$MAGIC_CMD" >&6; }
9056 else
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9058 $as_echo "no" >&6; }
9059 fi
9060
9061
9062
9063
9064
9065 if test -z "$lt_cv_path_MAGIC_CMD"; then
9066 if test -n "$ac_tool_prefix"; then
9067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
9068 $as_echo_n "checking for file... " >&6; }
9069 if ${lt_cv_path_MAGIC_CMD+:} false; then :
9070 $as_echo_n "(cached) " >&6
9071 else
9072 case $MAGIC_CMD in
9073 [\\/*] | ?:[\\/]*)
9074 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
9075 ;;
9076 *)
9077 lt_save_MAGIC_CMD="$MAGIC_CMD"
9078 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
9079 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9080 for ac_dir in $ac_dummy; do
9081 IFS="$lt_save_ifs"
9082 test -z "$ac_dir" && ac_dir=.
9083 if test -f $ac_dir/file; then
9084 lt_cv_path_MAGIC_CMD="$ac_dir/file"
9085 if test -n "$file_magic_test_file"; then
9086 case $deplibs_check_method in
9087 "file_magic "*)
9088 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9089 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9090 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9091 $EGREP "$file_magic_regex" > /dev/null; then
9092 :
9093 else
9094 cat <<_LT_EOF 1>&2
9095
9096 *** Warning: the command libtool uses to detect shared libraries,
9097 *** $file_magic_cmd, produces output that libtool cannot recognize.
9098 *** The result is that libtool may fail to recognize shared libraries
9099 *** as such. This will affect the creation of libtool libraries that
9100 *** depend on shared libraries, but programs linked with such libtool
9101 *** libraries will work regardless of this problem. Nevertheless, you
9102 *** may want to report the problem to your system manager and/or to
9103 *** bug-libtool@gnu.org
9104
9105 _LT_EOF
9106 fi ;;
9107 esac
9108 fi
9109 break
9110 fi
9111 done
9112 IFS="$lt_save_ifs"
9113 MAGIC_CMD="$lt_save_MAGIC_CMD"
9114 ;;
9115 esac
9116 fi
9117
9118 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
9119 if test -n "$MAGIC_CMD"; then
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9121 $as_echo "$MAGIC_CMD" >&6; }
9122 else
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124 $as_echo "no" >&6; }
9125 fi
9126
9127
9128 else
9129 MAGIC_CMD=:
9130 fi
9131 fi
9132
9133 fi
9134 ;;
9135 esac
9136
9137 # Use C for the default configuration in the libtool script
9138
9139 lt_save_CC="$CC"
9140 ac_ext=c
9141 ac_cpp='$CPP $CPPFLAGS'
9142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9145
9146
9147 # Source file extension for C test sources.
9148 ac_ext=c
9149
9150 # Object file extension for compiled C test sources.
9151 objext=o
9152 objext=$objext
9153
9154 # Code to be used in simple compile tests
9155 lt_simple_compile_test_code="int some_variable = 0;"
9156
9157 # Code to be used in simple link tests
9158 lt_simple_link_test_code='int main(){return(0);}'
9159
9160
9161
9162
9163
9164
9165
9166 # If no C compiler was specified, use CC.
9167 LTCC=${LTCC-"$CC"}
9168
9169 # If no C compiler flags were specified, use CFLAGS.
9170 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9171
9172 # Allow CC to be a program name with arguments.
9173 compiler=$CC
9174
9175 # Save the default compiler, since it gets overwritten when the other
9176 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9177 compiler_DEFAULT=$CC
9178
9179 # save warnings/boilerplate of simple test code
9180 ac_outfile=conftest.$ac_objext
9181 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
9182 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9183 _lt_compiler_boilerplate=`cat conftest.err`
9184 $RM conftest*
9185
9186 ac_outfile=conftest.$ac_objext
9187 echo "$lt_simple_link_test_code" >conftest.$ac_ext
9188 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9189 _lt_linker_boilerplate=`cat conftest.err`
9190 $RM -r conftest*
9191
9192
9193 if test -n "$compiler"; then
9194
9195 lt_prog_compiler_no_builtin_flag=
9196
9197 if test "$GCC" = yes; then
9198 case $cc_basename in
9199 nvcc*)
9200 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
9201 *)
9202 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
9203 esac
9204
9205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
9206 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
9207 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
9208 $as_echo_n "(cached) " >&6
9209 else
9210 lt_cv_prog_compiler_rtti_exceptions=no
9211 ac_outfile=conftest.$ac_objext
9212 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9213 lt_compiler_flag="-fno-rtti -fno-exceptions"
9214 # Insert the option either (1) after the last *FLAGS variable, or
9215 # (2) before a word containing "conftest.", or (3) at the end.
9216 # Note that $ac_compile itself does not contain backslashes and begins
9217 # with a dollar sign (not a hyphen), so the echo should work correctly.
9218 # The option is referenced via a variable to avoid confusing sed.
9219 lt_compile=`echo "$ac_compile" | $SED \
9220 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9221 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9222 -e 's:$: $lt_compiler_flag:'`
9223 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9224 (eval "$lt_compile" 2>conftest.err)
9225 ac_status=$?
9226 cat conftest.err >&5
9227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9228 if (exit $ac_status) && test -s "$ac_outfile"; then
9229 # The compiler can only warn and ignore the option if not recognized
9230 # So say no if there are warnings other than the usual output.
9231 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9232 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9233 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9234 lt_cv_prog_compiler_rtti_exceptions=yes
9235 fi
9236 fi
9237 $RM conftest*
9238
9239 fi
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
9241 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
9242
9243 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
9244 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
9245 else
9246 :
9247 fi
9248
9249 fi
9250
9251
9252
9253
9254
9255
9256 lt_prog_compiler_wl=
9257 lt_prog_compiler_pic=
9258 lt_prog_compiler_static=
9259
9260
9261 if test "$GCC" = yes; then
9262 lt_prog_compiler_wl='-Wl,'
9263 lt_prog_compiler_static='-static'
9264
9265 case $host_os in
9266 aix*)
9267 # All AIX code is PIC.
9268 if test "$host_cpu" = ia64; then
9269 # AIX 5 now supports IA64 processor
9270 lt_prog_compiler_static='-Bstatic'
9271 fi
9272 ;;
9273
9274 amigaos*)
9275 case $host_cpu in
9276 powerpc)
9277 # see comment about AmigaOS4 .so support
9278 lt_prog_compiler_pic='-fPIC'
9279 ;;
9280 m68k)
9281 # FIXME: we need at least 68020 code to build shared libraries, but
9282 # adding the `-m68020' flag to GCC prevents building anything better,
9283 # like `-m68040'.
9284 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
9285 ;;
9286 esac
9287 ;;
9288
9289 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9290 # PIC is the default for these OSes.
9291 ;;
9292
9293 mingw* | cygwin* | pw32* | os2* | cegcc*)
9294 # This hack is so that the source file can tell whether it is being
9295 # built for inclusion in a dll (and should export symbols for example).
9296 # Although the cygwin gcc ignores -fPIC, still need this for old-style
9297 # (--disable-auto-import) libraries
9298 lt_prog_compiler_pic='-DDLL_EXPORT'
9299 ;;
9300
9301 darwin* | rhapsody*)
9302 # PIC is the default on this platform
9303 # Common symbols not allowed in MH_DYLIB files
9304 lt_prog_compiler_pic='-fno-common'
9305 ;;
9306
9307 haiku*)
9308 # PIC is the default for Haiku.
9309 # The "-static" flag exists, but is broken.
9310 lt_prog_compiler_static=
9311 ;;
9312
9313 hpux*)
9314 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
9315 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
9316 # sets the default TLS model and affects inlining.
9317 case $host_cpu in
9318 hppa*64*)
9319 # +Z the default
9320 ;;
9321 *)
9322 lt_prog_compiler_pic='-fPIC'
9323 ;;
9324 esac
9325 ;;
9326
9327 interix[3-9]*)
9328 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
9329 # Instead, we relocate shared libraries at runtime.
9330 ;;
9331
9332 msdosdjgpp*)
9333 # Just because we use GCC doesn't mean we suddenly get shared libraries
9334 # on systems that don't support them.
9335 lt_prog_compiler_can_build_shared=no
9336 enable_shared=no
9337 ;;
9338
9339 *nto* | *qnx*)
9340 # QNX uses GNU C++, but need to define -shared option too, otherwise
9341 # it will coredump.
9342 lt_prog_compiler_pic='-fPIC -shared'
9343 ;;
9344
9345 sysv4*MP*)
9346 if test -d /usr/nec; then
9347 lt_prog_compiler_pic=-Kconform_pic
9348 fi
9349 ;;
9350
9351 *)
9352 lt_prog_compiler_pic='-fPIC'
9353 ;;
9354 esac
9355
9356 case $cc_basename in
9357 nvcc*) # Cuda Compiler Driver 2.2
9358 lt_prog_compiler_wl='-Xlinker '
9359 if test -n "$lt_prog_compiler_pic"; then
9360 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
9361 fi
9362 ;;
9363 esac
9364 else
9365 # PORTME Check for flag to pass linker flags through the system compiler.
9366 case $host_os in
9367 aix*)
9368 lt_prog_compiler_wl='-Wl,'
9369 if test "$host_cpu" = ia64; then
9370 # AIX 5 now supports IA64 processor
9371 lt_prog_compiler_static='-Bstatic'
9372 else
9373 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
9374 fi
9375 ;;
9376
9377 mingw* | cygwin* | pw32* | os2* | cegcc*)
9378 # This hack is so that the source file can tell whether it is being
9379 # built for inclusion in a dll (and should export symbols for example).
9380 lt_prog_compiler_pic='-DDLL_EXPORT'
9381 ;;
9382
9383 hpux9* | hpux10* | hpux11*)
9384 lt_prog_compiler_wl='-Wl,'
9385 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9386 # not for PA HP-UX.
9387 case $host_cpu in
9388 hppa*64*|ia64*)
9389 # +Z the default
9390 ;;
9391 *)
9392 lt_prog_compiler_pic='+Z'
9393 ;;
9394 esac
9395 # Is there a better lt_prog_compiler_static that works with the bundled CC?
9396 lt_prog_compiler_static='${wl}-a ${wl}archive'
9397 ;;
9398
9399 irix5* | irix6* | nonstopux*)
9400 lt_prog_compiler_wl='-Wl,'
9401 # PIC (with -KPIC) is the default.
9402 lt_prog_compiler_static='-non_shared'
9403 ;;
9404
9405 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9406 case $cc_basename in
9407 # old Intel for x86_64 which still supported -KPIC.
9408 ecc*)
9409 lt_prog_compiler_wl='-Wl,'
9410 lt_prog_compiler_pic='-KPIC'
9411 lt_prog_compiler_static='-static'
9412 ;;
9413 # icc used to be incompatible with GCC.
9414 # ICC 10 doesn't accept -KPIC any more.
9415 icc* | ifort*)
9416 lt_prog_compiler_wl='-Wl,'
9417 lt_prog_compiler_pic='-fPIC'
9418 lt_prog_compiler_static='-static'
9419 ;;
9420 # Lahey Fortran 8.1.
9421 lf95*)
9422 lt_prog_compiler_wl='-Wl,'
9423 lt_prog_compiler_pic='--shared'
9424 lt_prog_compiler_static='--static'
9425 ;;
9426 nagfor*)
9427 # NAG Fortran compiler
9428 lt_prog_compiler_wl='-Wl,-Wl,,'
9429 lt_prog_compiler_pic='-PIC'
9430 lt_prog_compiler_static='-Bstatic'
9431 ;;
9432 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
9433 # Portland Group compilers (*not* the Pentium gcc compiler,
9434 # which looks to be a dead project)
9435 lt_prog_compiler_wl='-Wl,'
9436 lt_prog_compiler_pic='-fpic'
9437 lt_prog_compiler_static='-Bstatic'
9438 ;;
9439 ccc*)
9440 lt_prog_compiler_wl='-Wl,'
9441 # All Alpha code is PIC.
9442 lt_prog_compiler_static='-non_shared'
9443 ;;
9444 xl* | bgxl* | bgf* | mpixl*)
9445 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
9446 lt_prog_compiler_wl='-Wl,'
9447 lt_prog_compiler_pic='-qpic'
9448 lt_prog_compiler_static='-qstaticlink'
9449 ;;
9450 *)
9451 case `$CC -V 2>&1 | sed 5q` in
9452 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
9453 # Sun Fortran 8.3 passes all unrecognized flags to the linker
9454 lt_prog_compiler_pic='-KPIC'
9455 lt_prog_compiler_static='-Bstatic'
9456 lt_prog_compiler_wl=''
9457 ;;
9458 *Sun\ F* | *Sun*Fortran*)
9459 lt_prog_compiler_pic='-KPIC'
9460 lt_prog_compiler_static='-Bstatic'
9461 lt_prog_compiler_wl='-Qoption ld '
9462 ;;
9463 *Sun\ C*)
9464 # Sun C 5.9
9465 lt_prog_compiler_pic='-KPIC'
9466 lt_prog_compiler_static='-Bstatic'
9467 lt_prog_compiler_wl='-Wl,'
9468 ;;
9469 *Intel*\ [CF]*Compiler*)
9470 lt_prog_compiler_wl='-Wl,'
9471 lt_prog_compiler_pic='-fPIC'
9472 lt_prog_compiler_static='-static'
9473 ;;
9474 *Portland\ Group*)
9475 lt_prog_compiler_wl='-Wl,'
9476 lt_prog_compiler_pic='-fpic'
9477 lt_prog_compiler_static='-Bstatic'
9478 ;;
9479 esac
9480 ;;
9481 esac
9482 ;;
9483
9484 newsos6)
9485 lt_prog_compiler_pic='-KPIC'
9486 lt_prog_compiler_static='-Bstatic'
9487 ;;
9488
9489 *nto* | *qnx*)
9490 # QNX uses GNU C++, but need to define -shared option too, otherwise
9491 # it will coredump.
9492 lt_prog_compiler_pic='-fPIC -shared'
9493 ;;
9494
9495 osf3* | osf4* | osf5*)
9496 lt_prog_compiler_wl='-Wl,'
9497 # All OSF/1 code is PIC.
9498 lt_prog_compiler_static='-non_shared'
9499 ;;
9500
9501 rdos*)
9502 lt_prog_compiler_static='-non_shared'
9503 ;;
9504
9505 solaris*)
9506 lt_prog_compiler_pic='-KPIC'
9507 lt_prog_compiler_static='-Bstatic'
9508 case $cc_basename in
9509 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
9510 lt_prog_compiler_wl='-Qoption ld ';;
9511 *)
9512 lt_prog_compiler_wl='-Wl,';;
9513 esac
9514 ;;
9515
9516 sunos4*)
9517 lt_prog_compiler_wl='-Qoption ld '
9518 lt_prog_compiler_pic='-PIC'
9519 lt_prog_compiler_static='-Bstatic'
9520 ;;
9521
9522 sysv4 | sysv4.2uw2* | sysv4.3*)
9523 lt_prog_compiler_wl='-Wl,'
9524 lt_prog_compiler_pic='-KPIC'
9525 lt_prog_compiler_static='-Bstatic'
9526 ;;
9527
9528 sysv4*MP*)
9529 if test -d /usr/nec ;then
9530 lt_prog_compiler_pic='-Kconform_pic'
9531 lt_prog_compiler_static='-Bstatic'
9532 fi
9533 ;;
9534
9535 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
9536 lt_prog_compiler_wl='-Wl,'
9537 lt_prog_compiler_pic='-KPIC'
9538 lt_prog_compiler_static='-Bstatic'
9539 ;;
9540
9541 unicos*)
9542 lt_prog_compiler_wl='-Wl,'
9543 lt_prog_compiler_can_build_shared=no
9544 ;;
9545
9546 uts4*)
9547 lt_prog_compiler_pic='-pic'
9548 lt_prog_compiler_static='-Bstatic'
9549 ;;
9550
9551 *)
9552 lt_prog_compiler_can_build_shared=no
9553 ;;
9554 esac
9555 fi
9556
9557 case $host_os in
9558 # For platforms which do not support PIC, -DPIC is meaningless:
9559 *djgpp*)
9560 lt_prog_compiler_pic=
9561 ;;
9562 *)
9563 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
9564 ;;
9565 esac
9566
9567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
9568 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
9569 if ${lt_cv_prog_compiler_pic+:} false; then :
9570 $as_echo_n "(cached) " >&6
9571 else
9572 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
9573 fi
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
9575 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
9576 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
9577
9578 #
9579 # Check to make sure the PIC flag actually works.
9580 #
9581 if test -n "$lt_prog_compiler_pic"; then
9582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
9583 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
9584 if ${lt_cv_prog_compiler_pic_works+:} false; then :
9585 $as_echo_n "(cached) " >&6
9586 else
9587 lt_cv_prog_compiler_pic_works=no
9588 ac_outfile=conftest.$ac_objext
9589 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9590 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
9591 # Insert the option either (1) after the last *FLAGS variable, or
9592 # (2) before a word containing "conftest.", or (3) at the end.
9593 # Note that $ac_compile itself does not contain backslashes and begins
9594 # with a dollar sign (not a hyphen), so the echo should work correctly.
9595 # The option is referenced via a variable to avoid confusing sed.
9596 lt_compile=`echo "$ac_compile" | $SED \
9597 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9598 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9599 -e 's:$: $lt_compiler_flag:'`
9600 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9601 (eval "$lt_compile" 2>conftest.err)
9602 ac_status=$?
9603 cat conftest.err >&5
9604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605 if (exit $ac_status) && test -s "$ac_outfile"; then
9606 # The compiler can only warn and ignore the option if not recognized
9607 # So say no if there are warnings other than the usual output.
9608 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9609 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9610 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9611 lt_cv_prog_compiler_pic_works=yes
9612 fi
9613 fi
9614 $RM conftest*
9615
9616 fi
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
9618 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
9619
9620 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
9621 case $lt_prog_compiler_pic in
9622 "" | " "*) ;;
9623 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
9624 esac
9625 else
9626 lt_prog_compiler_pic=
9627 lt_prog_compiler_can_build_shared=no
9628 fi
9629
9630 fi
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642 #
9643 # Check to make sure the static flag actually works.
9644 #
9645 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
9647 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
9648 if ${lt_cv_prog_compiler_static_works+:} false; then :
9649 $as_echo_n "(cached) " >&6
9650 else
9651 lt_cv_prog_compiler_static_works=no
9652 save_LDFLAGS="$LDFLAGS"
9653 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
9654 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9655 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9656 # The linker can only warn and ignore the option if not recognized
9657 # So say no if there are warnings
9658 if test -s conftest.err; then
9659 # Append any errors to the config.log.
9660 cat conftest.err 1>&5
9661 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9662 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9663 if diff conftest.exp conftest.er2 >/dev/null; then
9664 lt_cv_prog_compiler_static_works=yes
9665 fi
9666 else
9667 lt_cv_prog_compiler_static_works=yes
9668 fi
9669 fi
9670 $RM -r conftest*
9671 LDFLAGS="$save_LDFLAGS"
9672
9673 fi
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
9675 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
9676
9677 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
9678 :
9679 else
9680 lt_prog_compiler_static=
9681 fi
9682
9683
9684
9685
9686
9687
9688
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9690 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9691 if ${lt_cv_prog_compiler_c_o+:} false; then :
9692 $as_echo_n "(cached) " >&6
9693 else
9694 lt_cv_prog_compiler_c_o=no
9695 $RM -r conftest 2>/dev/null
9696 mkdir conftest
9697 cd conftest
9698 mkdir out
9699 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9700
9701 lt_compiler_flag="-o out/conftest2.$ac_objext"
9702 # Insert the option either (1) after the last *FLAGS variable, or
9703 # (2) before a word containing "conftest.", or (3) at the end.
9704 # Note that $ac_compile itself does not contain backslashes and begins
9705 # with a dollar sign (not a hyphen), so the echo should work correctly.
9706 lt_compile=`echo "$ac_compile" | $SED \
9707 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9708 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9709 -e 's:$: $lt_compiler_flag:'`
9710 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9711 (eval "$lt_compile" 2>out/conftest.err)
9712 ac_status=$?
9713 cat out/conftest.err >&5
9714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9716 then
9717 # The compiler can only warn and ignore the option if not recognized
9718 # So say no if there are warnings
9719 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9720 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9721 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9722 lt_cv_prog_compiler_c_o=yes
9723 fi
9724 fi
9725 chmod u+w . 2>&5
9726 $RM conftest*
9727 # SGI C++ compiler will create directory out/ii_files/ for
9728 # template instantiation
9729 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9730 $RM out/* && rmdir out
9731 cd ..
9732 $RM -r conftest
9733 $RM conftest*
9734
9735 fi
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9737 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9738
9739
9740
9741
9742
9743
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9745 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9746 if ${lt_cv_prog_compiler_c_o+:} false; then :
9747 $as_echo_n "(cached) " >&6
9748 else
9749 lt_cv_prog_compiler_c_o=no
9750 $RM -r conftest 2>/dev/null
9751 mkdir conftest
9752 cd conftest
9753 mkdir out
9754 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9755
9756 lt_compiler_flag="-o out/conftest2.$ac_objext"
9757 # Insert the option either (1) after the last *FLAGS variable, or
9758 # (2) before a word containing "conftest.", or (3) at the end.
9759 # Note that $ac_compile itself does not contain backslashes and begins
9760 # with a dollar sign (not a hyphen), so the echo should work correctly.
9761 lt_compile=`echo "$ac_compile" | $SED \
9762 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9763 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9764 -e 's:$: $lt_compiler_flag:'`
9765 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9766 (eval "$lt_compile" 2>out/conftest.err)
9767 ac_status=$?
9768 cat out/conftest.err >&5
9769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9770 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9771 then
9772 # The compiler can only warn and ignore the option if not recognized
9773 # So say no if there are warnings
9774 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9775 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9776 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9777 lt_cv_prog_compiler_c_o=yes
9778 fi
9779 fi
9780 chmod u+w . 2>&5
9781 $RM conftest*
9782 # SGI C++ compiler will create directory out/ii_files/ for
9783 # template instantiation
9784 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9785 $RM out/* && rmdir out
9786 cd ..
9787 $RM -r conftest
9788 $RM conftest*
9789
9790 fi
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9792 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9793
9794
9795
9796
9797 hard_links="nottested"
9798 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9799 # do not overwrite the value of need_locks provided by the user
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9801 $as_echo_n "checking if we can lock with hard links... " >&6; }
9802 hard_links=yes
9803 $RM conftest*
9804 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9805 touch conftest.a
9806 ln conftest.a conftest.b 2>&5 || hard_links=no
9807 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9809 $as_echo "$hard_links" >&6; }
9810 if test "$hard_links" = no; then
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9812 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9813 need_locks=warn
9814 fi
9815 else
9816 need_locks=no
9817 fi
9818
9819
9820
9821
9822
9823
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9825 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9826
9827 runpath_var=
9828 allow_undefined_flag=
9829 always_export_symbols=no
9830 archive_cmds=
9831 archive_expsym_cmds=
9832 compiler_needs_object=no
9833 enable_shared_with_static_runtimes=no
9834 export_dynamic_flag_spec=
9835 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9836 hardcode_automatic=no
9837 hardcode_direct=no
9838 hardcode_direct_absolute=no
9839 hardcode_libdir_flag_spec=
9840 hardcode_libdir_separator=
9841 hardcode_minus_L=no
9842 hardcode_shlibpath_var=unsupported
9843 inherit_rpath=no
9844 link_all_deplibs=unknown
9845 module_cmds=
9846 module_expsym_cmds=
9847 old_archive_from_new_cmds=
9848 old_archive_from_expsyms_cmds=
9849 thread_safe_flag_spec=
9850 whole_archive_flag_spec=
9851 # include_expsyms should be a list of space-separated symbols to be *always*
9852 # included in the symbol list
9853 include_expsyms=
9854 # exclude_expsyms can be an extended regexp of symbols to exclude
9855 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9856 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9857 # as well as any symbol that contains `d'.
9858 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
9859 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9860 # platforms (ab)use it in PIC code, but their linkers get confused if
9861 # the symbol is explicitly referenced. Since portable code cannot
9862 # rely on this symbol name, it's probably fine to never include it in
9863 # preloaded symbol tables.
9864 # Exclude shared library initialization/finalization symbols.
9865 extract_expsyms_cmds=
9866
9867 case $host_os in
9868 cygwin* | mingw* | pw32* | cegcc*)
9869 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9870 # When not using gcc, we currently assume that we are using
9871 # Microsoft Visual C++.
9872 if test "$GCC" != yes; then
9873 with_gnu_ld=no
9874 fi
9875 ;;
9876 interix*)
9877 # we just hope/assume this is gcc and not c89 (= MSVC++)
9878 with_gnu_ld=yes
9879 ;;
9880 openbsd*)
9881 with_gnu_ld=no
9882 ;;
9883 linux* | k*bsd*-gnu | gnu*)
9884 link_all_deplibs=no
9885 ;;
9886 esac
9887
9888 ld_shlibs=yes
9889
9890 # On some targets, GNU ld is compatible enough with the native linker
9891 # that we're better off using the native interface for both.
9892 lt_use_gnu_ld_interface=no
9893 if test "$with_gnu_ld" = yes; then
9894 case $host_os in
9895 aix*)
9896 # The AIX port of GNU ld has always aspired to compatibility
9897 # with the native linker. However, as the warning in the GNU ld
9898 # block says, versions before 2.19.5* couldn't really create working
9899 # shared libraries, regardless of the interface used.
9900 case `$LD -v 2>&1` in
9901 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
9902 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
9903 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
9904 *)
9905 lt_use_gnu_ld_interface=yes
9906 ;;
9907 esac
9908 ;;
9909 *)
9910 lt_use_gnu_ld_interface=yes
9911 ;;
9912 esac
9913 fi
9914
9915 if test "$lt_use_gnu_ld_interface" = yes; then
9916 # If archive_cmds runs LD, not CC, wlarc should be empty
9917 wlarc='${wl}'
9918
9919 # Set some defaults for GNU ld with shared library support. These
9920 # are reset later if shared libraries are not supported. Putting them
9921 # here allows them to be overridden if necessary.
9922 runpath_var=LD_RUN_PATH
9923 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9924 export_dynamic_flag_spec='${wl}--export-dynamic'
9925 # ancient GNU ld didn't support --whole-archive et. al.
9926 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9927 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9928 else
9929 whole_archive_flag_spec=
9930 fi
9931 supports_anon_versioning=no
9932 case `$LD -v 2>&1` in
9933 *GNU\ gold*) supports_anon_versioning=yes ;;
9934 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9935 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9936 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9937 *\ 2.11.*) ;; # other 2.11 versions
9938 *) supports_anon_versioning=yes ;;
9939 esac
9940
9941 # See if GNU ld supports shared libraries.
9942 case $host_os in
9943 aix[3-9]*)
9944 # On AIX/PPC, the GNU linker is very broken
9945 if test "$host_cpu" != ia64; then
9946 ld_shlibs=no
9947 cat <<_LT_EOF 1>&2
9948
9949 *** Warning: the GNU linker, at least up to release 2.19, is reported
9950 *** to be unable to reliably create shared libraries on AIX.
9951 *** Therefore, libtool is disabling shared libraries support. If you
9952 *** really care for shared libraries, you may want to install binutils
9953 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
9954 *** You will then need to restart the configuration process.
9955
9956 _LT_EOF
9957 fi
9958 ;;
9959
9960 amigaos*)
9961 case $host_cpu in
9962 powerpc)
9963 # see comment about AmigaOS4 .so support
9964 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9965 archive_expsym_cmds=''
9966 ;;
9967 m68k)
9968 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)'
9969 hardcode_libdir_flag_spec='-L$libdir'
9970 hardcode_minus_L=yes
9971 ;;
9972 esac
9973 ;;
9974
9975 beos*)
9976 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9977 allow_undefined_flag=unsupported
9978 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9979 # support --undefined. This deserves some investigation. FIXME
9980 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9981 else
9982 ld_shlibs=no
9983 fi
9984 ;;
9985
9986 cygwin* | mingw* | pw32* | cegcc*)
9987 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9988 # as there is no search path for DLLs.
9989 hardcode_libdir_flag_spec='-L$libdir'
9990 export_dynamic_flag_spec='${wl}--export-all-symbols'
9991 allow_undefined_flag=unsupported
9992 always_export_symbols=no
9993 enable_shared_with_static_runtimes=yes
9994 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'
9995 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
9996
9997 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9998 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9999 # If the export-symbols file already is a .def file (1st line
10000 # is EXPORTS), use it as is; otherwise, prepend...
10001 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10002 cp $export_symbols $output_objdir/$soname.def;
10003 else
10004 echo EXPORTS > $output_objdir/$soname.def;
10005 cat $export_symbols >> $output_objdir/$soname.def;
10006 fi~
10007 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10008 else
10009 ld_shlibs=no
10010 fi
10011 ;;
10012
10013 haiku*)
10014 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10015 link_all_deplibs=yes
10016 ;;
10017
10018 interix[3-9]*)
10019 hardcode_direct=no
10020 hardcode_shlibpath_var=no
10021 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10022 export_dynamic_flag_spec='${wl}-E'
10023 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
10024 # Instead, shared libraries are loaded at an image base (0x10000000 by
10025 # default) and relocated if they conflict, which is a slow very memory
10026 # consuming and fragmenting process. To avoid this, we pick a random,
10027 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
10028 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
10029 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
10030 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'
10031 ;;
10032
10033 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
10034 tmp_diet=no
10035 if test "$host_os" = linux-dietlibc; then
10036 case $cc_basename in
10037 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
10038 esac
10039 fi
10040 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
10041 && test "$tmp_diet" = no
10042 then
10043 tmp_addflag=' $pic_flag'
10044 tmp_sharedflag='-shared'
10045 case $cc_basename,$host_cpu in
10046 pgcc*) # Portland Group C compiler
10047 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'
10048 tmp_addflag=' $pic_flag'
10049 ;;
10050 pgf77* | pgf90* | pgf95* | pgfortran*)
10051 # Portland Group f77 and f90 compilers
10052 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'
10053 tmp_addflag=' $pic_flag -Mnomain' ;;
10054 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
10055 tmp_addflag=' -i_dynamic' ;;
10056 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
10057 tmp_addflag=' -i_dynamic -nofor_main' ;;
10058 ifc* | ifort*) # Intel Fortran compiler
10059 tmp_addflag=' -nofor_main' ;;
10060 lf95*) # Lahey Fortran 8.1
10061 whole_archive_flag_spec=
10062 tmp_sharedflag='--shared' ;;
10063 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
10064 tmp_sharedflag='-qmkshrobj'
10065 tmp_addflag= ;;
10066 nvcc*) # Cuda Compiler Driver 2.2
10067 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'
10068 compiler_needs_object=yes
10069 ;;
10070 esac
10071 case `$CC -V 2>&1 | sed 5q` in
10072 *Sun\ C*) # Sun C 5.9
10073 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'
10074 compiler_needs_object=yes
10075 tmp_sharedflag='-G' ;;
10076 *Sun\ F*) # Sun Fortran 8.3
10077 tmp_sharedflag='-G' ;;
10078 esac
10079 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10080
10081 if test "x$supports_anon_versioning" = xyes; then
10082 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10083 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10084 echo "local: *; };" >> $output_objdir/$libname.ver~
10085 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
10086 fi
10087
10088 case $cc_basename in
10089 xlf* | bgf* | bgxlf* | mpixlf*)
10090 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
10091 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
10092 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10093 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
10094 if test "x$supports_anon_versioning" = xyes; then
10095 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10096 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10097 echo "local: *; };" >> $output_objdir/$libname.ver~
10098 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
10099 fi
10100 ;;
10101 esac
10102 else
10103 ld_shlibs=no
10104 fi
10105 ;;
10106
10107 netbsd* | netbsdelf*-gnu)
10108 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10109 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10110 wlarc=
10111 else
10112 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10113 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10114 fi
10115 ;;
10116
10117 solaris*)
10118 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
10119 ld_shlibs=no
10120 cat <<_LT_EOF 1>&2
10121
10122 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
10123 *** create shared libraries on Solaris systems. Therefore, libtool
10124 *** is disabling shared libraries support. We urge you to upgrade GNU
10125 *** binutils to release 2.9.1 or newer. Another option is to modify
10126 *** your PATH or compiler configuration so that the native linker is
10127 *** used, and then restart.
10128
10129 _LT_EOF
10130 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10131 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10132 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10133 else
10134 ld_shlibs=no
10135 fi
10136 ;;
10137
10138 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
10139 case `$LD -v 2>&1` in
10140 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
10141 ld_shlibs=no
10142 cat <<_LT_EOF 1>&2
10143
10144 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
10145 *** reliably create shared libraries on SCO systems. Therefore, libtool
10146 *** is disabling shared libraries support. We urge you to upgrade GNU
10147 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
10148 *** your PATH or compiler configuration so that the native linker is
10149 *** used, and then restart.
10150
10151 _LT_EOF
10152 ;;
10153 *)
10154 # For security reasons, it is highly recommended that you always
10155 # use absolute paths for naming shared libraries, and exclude the
10156 # DT_RUNPATH tag from executables and libraries. But doing so
10157 # requires that you compile everything twice, which is a pain.
10158 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10159 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10160 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10161 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10162 else
10163 ld_shlibs=no
10164 fi
10165 ;;
10166 esac
10167 ;;
10168
10169 sunos4*)
10170 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10171 wlarc=
10172 hardcode_direct=yes
10173 hardcode_shlibpath_var=no
10174 ;;
10175
10176 *)
10177 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10178 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10179 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10180 else
10181 ld_shlibs=no
10182 fi
10183 ;;
10184 esac
10185
10186 if test "$ld_shlibs" = no; then
10187 runpath_var=
10188 hardcode_libdir_flag_spec=
10189 export_dynamic_flag_spec=
10190 whole_archive_flag_spec=
10191 fi
10192 else
10193 # PORTME fill in a description of your system's linker (not GNU ld)
10194 case $host_os in
10195 aix3*)
10196 allow_undefined_flag=unsupported
10197 always_export_symbols=yes
10198 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'
10199 # Note: this linker hardcodes the directories in LIBPATH if there
10200 # are no directories specified by -L.
10201 hardcode_minus_L=yes
10202 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
10203 # Neither direct hardcoding nor static linking is supported with a
10204 # broken collect2.
10205 hardcode_direct=unsupported
10206 fi
10207 ;;
10208
10209 aix[4-9]*)
10210 if test "$host_cpu" = ia64; then
10211 # On IA64, the linker does run time linking by default, so we don't
10212 # have to do anything special.
10213 aix_use_runtimelinking=no
10214 exp_sym_flag='-Bexport'
10215 no_entry_flag=""
10216 else
10217 # If we're using GNU nm, then we don't want the "-C" option.
10218 # -C means demangle to AIX nm, but means don't demangle with GNU nm
10219 # Also, AIX nm treats weak defined symbols like other global
10220 # defined symbols, whereas GNU nm marks them as "W".
10221 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
10222 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'
10223 else
10224 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'
10225 fi
10226 aix_use_runtimelinking=no
10227
10228 # Test if we are trying to use run time linking or normal
10229 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10230 # need to do runtime linking.
10231 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
10232 for ld_flag in $LDFLAGS; do
10233 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
10234 aix_use_runtimelinking=yes
10235 break
10236 fi
10237 done
10238 ;;
10239 esac
10240
10241 exp_sym_flag='-bexport'
10242 no_entry_flag='-bnoentry'
10243 fi
10244
10245 # When large executables or shared objects are built, AIX ld can
10246 # have problems creating the table of contents. If linking a library
10247 # or program results in "error TOC overflow" add -mminimal-toc to
10248 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10249 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10250
10251 archive_cmds=''
10252 hardcode_direct=yes
10253 hardcode_direct_absolute=yes
10254 hardcode_libdir_separator=':'
10255 link_all_deplibs=yes
10256 file_list_spec='${wl}-f,'
10257
10258 if test "$GCC" = yes; then
10259 case $host_os in aix4.[012]|aix4.[012].*)
10260 # We only want to do this on AIX 4.2 and lower, the check
10261 # below for broken collect2 doesn't work under 4.3+
10262 collect2name=`${CC} -print-prog-name=collect2`
10263 if test -f "$collect2name" &&
10264 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
10265 then
10266 # We have reworked collect2
10267 :
10268 else
10269 # We have old collect2
10270 hardcode_direct=unsupported
10271 # It fails to find uninstalled libraries when the uninstalled
10272 # path is not listed in the libpath. Setting hardcode_minus_L
10273 # to unsupported forces relinking
10274 hardcode_minus_L=yes
10275 hardcode_libdir_flag_spec='-L$libdir'
10276 hardcode_libdir_separator=
10277 fi
10278 ;;
10279 esac
10280 shared_flag='-shared'
10281 if test "$aix_use_runtimelinking" = yes; then
10282 shared_flag="$shared_flag "'${wl}-G'
10283 fi
10284 link_all_deplibs=no
10285 else
10286 # not using gcc
10287 if test "$host_cpu" = ia64; then
10288 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10289 # chokes on -Wl,-G. The following line is correct:
10290 shared_flag='-G'
10291 else
10292 if test "$aix_use_runtimelinking" = yes; then
10293 shared_flag='${wl}-G'
10294 else
10295 shared_flag='${wl}-bM:SRE'
10296 fi
10297 fi
10298 fi
10299
10300 export_dynamic_flag_spec='${wl}-bexpall'
10301 # It seems that -bexpall does not export symbols beginning with
10302 # underscore (_), so it is better to generate a list of symbols to export.
10303 always_export_symbols=yes
10304 if test "$aix_use_runtimelinking" = yes; then
10305 # Warning - without using the other runtime loading flags (-brtl),
10306 # -berok will link without error, but may produce a broken library.
10307 allow_undefined_flag='-berok'
10308 # Determine the default libpath from the value encoded in an
10309 # empty executable.
10310 if test "${lt_cv_aix_libpath+set}" = set; then
10311 aix_libpath=$lt_cv_aix_libpath
10312 else
10313 if ${lt_cv_aix_libpath_+:} false; then :
10314 $as_echo_n "(cached) " >&6
10315 else
10316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10317 /* end confdefs.h. */
10318
10319 int
10320 main ()
10321 {
10322
10323 ;
10324 return 0;
10325 }
10326 _ACEOF
10327 if ac_fn_c_try_link "$LINENO"; then :
10328
10329 lt_aix_libpath_sed='
10330 /Import File Strings/,/^$/ {
10331 /^0/ {
10332 s/^0 *\([^ ]*\) *$/\1/
10333 p
10334 }
10335 }'
10336 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10337 # Check for a 64-bit object if we didn't find anything.
10338 if test -z "$lt_cv_aix_libpath_"; then
10339 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10340 fi
10341 fi
10342 rm -f core conftest.err conftest.$ac_objext \
10343 conftest$ac_exeext conftest.$ac_ext
10344 if test -z "$lt_cv_aix_libpath_"; then
10345 lt_cv_aix_libpath_="/usr/lib:/lib"
10346 fi
10347
10348 fi
10349
10350 aix_libpath=$lt_cv_aix_libpath_
10351 fi
10352
10353 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10354 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"
10355 else
10356 if test "$host_cpu" = ia64; then
10357 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
10358 allow_undefined_flag="-z nodefs"
10359 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"
10360 else
10361 # Determine the default libpath from the value encoded in an
10362 # empty executable.
10363 if test "${lt_cv_aix_libpath+set}" = set; then
10364 aix_libpath=$lt_cv_aix_libpath
10365 else
10366 if ${lt_cv_aix_libpath_+:} false; then :
10367 $as_echo_n "(cached) " >&6
10368 else
10369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10370 /* end confdefs.h. */
10371
10372 int
10373 main ()
10374 {
10375
10376 ;
10377 return 0;
10378 }
10379 _ACEOF
10380 if ac_fn_c_try_link "$LINENO"; then :
10381
10382 lt_aix_libpath_sed='
10383 /Import File Strings/,/^$/ {
10384 /^0/ {
10385 s/^0 *\([^ ]*\) *$/\1/
10386 p
10387 }
10388 }'
10389 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10390 # Check for a 64-bit object if we didn't find anything.
10391 if test -z "$lt_cv_aix_libpath_"; then
10392 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10393 fi
10394 fi
10395 rm -f core conftest.err conftest.$ac_objext \
10396 conftest$ac_exeext conftest.$ac_ext
10397 if test -z "$lt_cv_aix_libpath_"; then
10398 lt_cv_aix_libpath_="/usr/lib:/lib"
10399 fi
10400
10401 fi
10402
10403 aix_libpath=$lt_cv_aix_libpath_
10404 fi
10405
10406 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
10407 # Warning - without using the other run time loading flags,
10408 # -berok will link without error, but may produce a broken library.
10409 no_undefined_flag=' ${wl}-bernotok'
10410 allow_undefined_flag=' ${wl}-berok'
10411 if test "$with_gnu_ld" = yes; then
10412 # We only use this code for GNU lds that support --whole-archive.
10413 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
10414 else
10415 # Exported symbols can be pulled into shared objects from archives
10416 whole_archive_flag_spec='$convenience'
10417 fi
10418 archive_cmds_need_lc=yes
10419 # This is similar to how AIX traditionally builds its shared libraries.
10420 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'
10421 fi
10422 fi
10423 ;;
10424
10425 amigaos*)
10426 case $host_cpu in
10427 powerpc)
10428 # see comment about AmigaOS4 .so support
10429 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10430 archive_expsym_cmds=''
10431 ;;
10432 m68k)
10433 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)'
10434 hardcode_libdir_flag_spec='-L$libdir'
10435 hardcode_minus_L=yes
10436 ;;
10437 esac
10438 ;;
10439
10440 bsdi[45]*)
10441 export_dynamic_flag_spec=-rdynamic
10442 ;;
10443
10444 cygwin* | mingw* | pw32* | cegcc*)
10445 # When not using gcc, we currently assume that we are using
10446 # Microsoft Visual C++.
10447 # hardcode_libdir_flag_spec is actually meaningless, as there is
10448 # no search path for DLLs.
10449 case $cc_basename in
10450 cl*)
10451 # Native MSVC
10452 hardcode_libdir_flag_spec=' '
10453 allow_undefined_flag=unsupported
10454 always_export_symbols=yes
10455 file_list_spec='@'
10456 # Tell ltmain to make .lib files, not .a files.
10457 libext=lib
10458 # Tell ltmain to make .dll files, not .so files.
10459 shrext_cmds=".dll"
10460 # FIXME: Setting linknames here is a bad hack.
10461 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
10462 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10463 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
10464 else
10465 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
10466 fi~
10467 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10468 linknames='
10469 # The linker will not automatically build a static lib if we build a DLL.
10470 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
10471 enable_shared_with_static_runtimes=yes
10472 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
10473 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
10474 # Don't use ranlib
10475 old_postinstall_cmds='chmod 644 $oldlib'
10476 postlink_cmds='lt_outputfile="@OUTPUT@"~
10477 lt_tool_outputfile="@TOOL_OUTPUT@"~
10478 case $lt_outputfile in
10479 *.exe|*.EXE) ;;
10480 *)
10481 lt_outputfile="$lt_outputfile.exe"
10482 lt_tool_outputfile="$lt_tool_outputfile.exe"
10483 ;;
10484 esac~
10485 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
10486 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10487 $RM "$lt_outputfile.manifest";
10488 fi'
10489 ;;
10490 *)
10491 # Assume MSVC wrapper
10492 hardcode_libdir_flag_spec=' '
10493 allow_undefined_flag=unsupported
10494 # Tell ltmain to make .lib files, not .a files.
10495 libext=lib
10496 # Tell ltmain to make .dll files, not .so files.
10497 shrext_cmds=".dll"
10498 # FIXME: Setting linknames here is a bad hack.
10499 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
10500 # The linker will automatically build a .lib file if we build a DLL.
10501 old_archive_from_new_cmds='true'
10502 # FIXME: Should let the user specify the lib program.
10503 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
10504 enable_shared_with_static_runtimes=yes
10505 ;;
10506 esac
10507 ;;
10508
10509 darwin* | rhapsody*)
10510
10511
10512 archive_cmds_need_lc=no
10513 hardcode_direct=no
10514 hardcode_automatic=yes
10515 hardcode_shlibpath_var=unsupported
10516 if test "$lt_cv_ld_force_load" = "yes"; then
10517 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\"`'
10518
10519 else
10520 whole_archive_flag_spec=''
10521 fi
10522 link_all_deplibs=yes
10523 allow_undefined_flag="$_lt_dar_allow_undefined"
10524 case $cc_basename in
10525 ifort*) _lt_dar_can_shared=yes ;;
10526 *) _lt_dar_can_shared=$GCC ;;
10527 esac
10528 if test "$_lt_dar_can_shared" = "yes"; then
10529 output_verbose_link_cmd=func_echo_all
10530 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
10531 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
10532 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}"
10533 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}"
10534
10535 else
10536 ld_shlibs=no
10537 fi
10538
10539 ;;
10540
10541 dgux*)
10542 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10543 hardcode_libdir_flag_spec='-L$libdir'
10544 hardcode_shlibpath_var=no
10545 ;;
10546
10547 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10548 # support. Future versions do this automatically, but an explicit c++rt0.o
10549 # does not break anything, and helps significantly (at the cost of a little
10550 # extra space).
10551 freebsd2.2*)
10552 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10553 hardcode_libdir_flag_spec='-R$libdir'
10554 hardcode_direct=yes
10555 hardcode_shlibpath_var=no
10556 ;;
10557
10558 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10559 freebsd2.*)
10560 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10561 hardcode_direct=yes
10562 hardcode_minus_L=yes
10563 hardcode_shlibpath_var=no
10564 ;;
10565
10566 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10567 freebsd* | dragonfly*)
10568 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10569 hardcode_libdir_flag_spec='-R$libdir'
10570 hardcode_direct=yes
10571 hardcode_shlibpath_var=no
10572 ;;
10573
10574 hpux9*)
10575 if test "$GCC" = yes; then
10576 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'
10577 else
10578 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'
10579 fi
10580 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10581 hardcode_libdir_separator=:
10582 hardcode_direct=yes
10583
10584 # hardcode_minus_L: Not really in the search PATH,
10585 # but as the default location of the library.
10586 hardcode_minus_L=yes
10587 export_dynamic_flag_spec='${wl}-E'
10588 ;;
10589
10590 hpux10*)
10591 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10592 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10593 else
10594 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10595 fi
10596 if test "$with_gnu_ld" = no; then
10597 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10598 hardcode_libdir_separator=:
10599 hardcode_direct=yes
10600 hardcode_direct_absolute=yes
10601 export_dynamic_flag_spec='${wl}-E'
10602 # hardcode_minus_L: Not really in the search PATH,
10603 # but as the default location of the library.
10604 hardcode_minus_L=yes
10605 fi
10606 ;;
10607
10608 hpux11*)
10609 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
10610 case $host_cpu in
10611 hppa*64*)
10612 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10613 ;;
10614 ia64*)
10615 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10616 ;;
10617 *)
10618 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10619 ;;
10620 esac
10621 else
10622 case $host_cpu in
10623 hppa*64*)
10624 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10625 ;;
10626 ia64*)
10627 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10628 ;;
10629 *)
10630
10631 # Older versions of the 11.00 compiler do not understand -b yet
10632 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
10634 $as_echo_n "checking if $CC understands -b... " >&6; }
10635 if ${lt_cv_prog_compiler__b+:} false; then :
10636 $as_echo_n "(cached) " >&6
10637 else
10638 lt_cv_prog_compiler__b=no
10639 save_LDFLAGS="$LDFLAGS"
10640 LDFLAGS="$LDFLAGS -b"
10641 echo "$lt_simple_link_test_code" > conftest.$ac_ext
10642 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10643 # The linker can only warn and ignore the option if not recognized
10644 # So say no if there are warnings
10645 if test -s conftest.err; then
10646 # Append any errors to the config.log.
10647 cat conftest.err 1>&5
10648 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10649 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10650 if diff conftest.exp conftest.er2 >/dev/null; then
10651 lt_cv_prog_compiler__b=yes
10652 fi
10653 else
10654 lt_cv_prog_compiler__b=yes
10655 fi
10656 fi
10657 $RM -r conftest*
10658 LDFLAGS="$save_LDFLAGS"
10659
10660 fi
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
10662 $as_echo "$lt_cv_prog_compiler__b" >&6; }
10663
10664 if test x"$lt_cv_prog_compiler__b" = xyes; then
10665 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10666 else
10667 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10668 fi
10669
10670 ;;
10671 esac
10672 fi
10673 if test "$with_gnu_ld" = no; then
10674 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
10675 hardcode_libdir_separator=:
10676
10677 case $host_cpu in
10678 hppa*64*|ia64*)
10679 hardcode_direct=no
10680 hardcode_shlibpath_var=no
10681 ;;
10682 *)
10683 hardcode_direct=yes
10684 hardcode_direct_absolute=yes
10685 export_dynamic_flag_spec='${wl}-E'
10686
10687 # hardcode_minus_L: Not really in the search PATH,
10688 # but as the default location of the library.
10689 hardcode_minus_L=yes
10690 ;;
10691 esac
10692 fi
10693 ;;
10694
10695 irix5* | irix6* | nonstopux*)
10696 if test "$GCC" = yes; then
10697 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'
10698 # Try to use the -exported_symbol ld option, if it does not
10699 # work, assume that -exports_file does not work either and
10700 # implicitly export all symbols.
10701 # This should be the same for all languages, so no per-tag cache variable.
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
10703 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
10704 if ${lt_cv_irix_exported_symbol+:} false; then :
10705 $as_echo_n "(cached) " >&6
10706 else
10707 save_LDFLAGS="$LDFLAGS"
10708 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10710 /* end confdefs.h. */
10711 int foo (void) { return 0; }
10712 _ACEOF
10713 if ac_fn_c_try_link "$LINENO"; then :
10714 lt_cv_irix_exported_symbol=yes
10715 else
10716 lt_cv_irix_exported_symbol=no
10717 fi
10718 rm -f core conftest.err conftest.$ac_objext \
10719 conftest$ac_exeext conftest.$ac_ext
10720 LDFLAGS="$save_LDFLAGS"
10721 fi
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
10723 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
10724 if test "$lt_cv_irix_exported_symbol" = yes; then
10725 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'
10726 fi
10727 else
10728 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'
10729 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'
10730 fi
10731 archive_cmds_need_lc='no'
10732 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10733 hardcode_libdir_separator=:
10734 inherit_rpath=yes
10735 link_all_deplibs=yes
10736 ;;
10737
10738 netbsd* | netbsdelf*-gnu)
10739 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10740 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10741 else
10742 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10743 fi
10744 hardcode_libdir_flag_spec='-R$libdir'
10745 hardcode_direct=yes
10746 hardcode_shlibpath_var=no
10747 ;;
10748
10749 newsos6)
10750 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10751 hardcode_direct=yes
10752 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10753 hardcode_libdir_separator=:
10754 hardcode_shlibpath_var=no
10755 ;;
10756
10757 *nto* | *qnx*)
10758 ;;
10759
10760 openbsd*)
10761 if test -f /usr/libexec/ld.so; then
10762 hardcode_direct=yes
10763 hardcode_shlibpath_var=no
10764 hardcode_direct_absolute=yes
10765 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10766 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10767 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
10768 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10769 export_dynamic_flag_spec='${wl}-E'
10770 else
10771 case $host_os in
10772 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
10773 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10774 hardcode_libdir_flag_spec='-R$libdir'
10775 ;;
10776 *)
10777 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10778 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
10779 ;;
10780 esac
10781 fi
10782 else
10783 ld_shlibs=no
10784 fi
10785 ;;
10786
10787 os2*)
10788 hardcode_libdir_flag_spec='-L$libdir'
10789 hardcode_minus_L=yes
10790 allow_undefined_flag=unsupported
10791 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'
10792 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10793 ;;
10794
10795 osf3*)
10796 if test "$GCC" = yes; then
10797 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10798 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'
10799 else
10800 allow_undefined_flag=' -expect_unresolved \*'
10801 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'
10802 fi
10803 archive_cmds_need_lc='no'
10804 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10805 hardcode_libdir_separator=:
10806 ;;
10807
10808 osf4* | osf5*) # as osf3* with the addition of -msym flag
10809 if test "$GCC" = yes; then
10810 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
10811 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'
10812 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10813 else
10814 allow_undefined_flag=' -expect_unresolved \*'
10815 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'
10816 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~
10817 $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'
10818
10819 # Both c and cxx compiler support -rpath directly
10820 hardcode_libdir_flag_spec='-rpath $libdir'
10821 fi
10822 archive_cmds_need_lc='no'
10823 hardcode_libdir_separator=:
10824 ;;
10825
10826 solaris*)
10827 no_undefined_flag=' -z defs'
10828 if test "$GCC" = yes; then
10829 wlarc='${wl}'
10830 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10831 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10832 $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'
10833 else
10834 case `$CC -V 2>&1` in
10835 *"Compilers 5.0"*)
10836 wlarc=''
10837 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10838 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10839 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
10840 ;;
10841 *)
10842 wlarc='${wl}'
10843 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
10844 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10845 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10846 ;;
10847 esac
10848 fi
10849 hardcode_libdir_flag_spec='-R$libdir'
10850 hardcode_shlibpath_var=no
10851 case $host_os in
10852 solaris2.[0-5] | solaris2.[0-5].*) ;;
10853 *)
10854 # The compiler driver will combine and reorder linker options,
10855 # but understands `-z linker_flag'. GCC discards it without `$wl',
10856 # but is careful enough not to reorder.
10857 # Supported since Solaris 2.6 (maybe 2.5.1?)
10858 if test "$GCC" = yes; then
10859 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
10860 else
10861 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
10862 fi
10863 ;;
10864 esac
10865 link_all_deplibs=yes
10866 ;;
10867
10868 sunos4*)
10869 if test "x$host_vendor" = xsequent; then
10870 # Use $CC to link under sequent, because it throws in some extra .o
10871 # files that make .init and .fini sections work.
10872 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10873 else
10874 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10875 fi
10876 hardcode_libdir_flag_spec='-L$libdir'
10877 hardcode_direct=yes
10878 hardcode_minus_L=yes
10879 hardcode_shlibpath_var=no
10880 ;;
10881
10882 sysv4)
10883 case $host_vendor in
10884 sni)
10885 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10886 hardcode_direct=yes # is this really true???
10887 ;;
10888 siemens)
10889 ## LD is ld it makes a PLAMLIB
10890 ## CC just makes a GrossModule.
10891 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10892 reload_cmds='$CC -r -o $output$reload_objs'
10893 hardcode_direct=no
10894 ;;
10895 motorola)
10896 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10897 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
10898 ;;
10899 esac
10900 runpath_var='LD_RUN_PATH'
10901 hardcode_shlibpath_var=no
10902 ;;
10903
10904 sysv4.3*)
10905 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10906 hardcode_shlibpath_var=no
10907 export_dynamic_flag_spec='-Bexport'
10908 ;;
10909
10910 sysv4*MP*)
10911 if test -d /usr/nec; then
10912 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10913 hardcode_shlibpath_var=no
10914 runpath_var=LD_RUN_PATH
10915 hardcode_runpath_var=yes
10916 ld_shlibs=yes
10917 fi
10918 ;;
10919
10920 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
10921 no_undefined_flag='${wl}-z,text'
10922 archive_cmds_need_lc=no
10923 hardcode_shlibpath_var=no
10924 runpath_var='LD_RUN_PATH'
10925
10926 if test "$GCC" = yes; then
10927 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10928 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10929 else
10930 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10931 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10932 fi
10933 ;;
10934
10935 sysv5* | sco3.2v5* | sco5v6*)
10936 # Note: We can NOT use -z defs as we might desire, because we do not
10937 # link with -lc, and that would cause any symbols used from libc to
10938 # always be unresolved, which means just about no library would
10939 # ever link correctly. If we're not using GNU ld we use -z text
10940 # though, which does catch some bad symbols but isn't as heavy-handed
10941 # as -z defs.
10942 no_undefined_flag='${wl}-z,text'
10943 allow_undefined_flag='${wl}-z,nodefs'
10944 archive_cmds_need_lc=no
10945 hardcode_shlibpath_var=no
10946 hardcode_libdir_flag_spec='${wl}-R,$libdir'
10947 hardcode_libdir_separator=':'
10948 link_all_deplibs=yes
10949 export_dynamic_flag_spec='${wl}-Bexport'
10950 runpath_var='LD_RUN_PATH'
10951
10952 if test "$GCC" = yes; then
10953 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10954 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10955 else
10956 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10957 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10958 fi
10959 ;;
10960
10961 uts4*)
10962 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10963 hardcode_libdir_flag_spec='-L$libdir'
10964 hardcode_shlibpath_var=no
10965 ;;
10966
10967 *)
10968 ld_shlibs=no
10969 ;;
10970 esac
10971
10972 if test x$host_vendor = xsni; then
10973 case $host in
10974 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10975 export_dynamic_flag_spec='${wl}-Blargedynsym'
10976 ;;
10977 esac
10978 fi
10979 fi
10980
10981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
10982 $as_echo "$ld_shlibs" >&6; }
10983 test "$ld_shlibs" = no && can_build_shared=no
10984
10985 with_gnu_ld=$with_gnu_ld
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001 #
11002 # Do we need to explicitly link libc?
11003 #
11004 case "x$archive_cmds_need_lc" in
11005 x|xyes)
11006 # Assume -lc should be added
11007 archive_cmds_need_lc=yes
11008
11009 if test "$enable_shared" = yes && test "$GCC" = yes; then
11010 case $archive_cmds in
11011 *'~'*)
11012 # FIXME: we may have to deal with multi-command sequences.
11013 ;;
11014 '$CC '*)
11015 # Test whether the compiler implicitly links with -lc since on some
11016 # systems, -lgcc has to come before -lc. If gcc already passes -lc
11017 # to ld, don't add -lc before -lgcc.
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
11019 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
11020 if ${lt_cv_archive_cmds_need_lc+:} false; then :
11021 $as_echo_n "(cached) " >&6
11022 else
11023 $RM conftest*
11024 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11025
11026 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11027 (eval $ac_compile) 2>&5
11028 ac_status=$?
11029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11030 test $ac_status = 0; } 2>conftest.err; then
11031 soname=conftest
11032 lib=conftest
11033 libobjs=conftest.$ac_objext
11034 deplibs=
11035 wl=$lt_prog_compiler_wl
11036 pic_flag=$lt_prog_compiler_pic
11037 compiler_flags=-v
11038 linker_flags=-v
11039 verstring=
11040 output_objdir=.
11041 libname=conftest
11042 lt_save_allow_undefined_flag=$allow_undefined_flag
11043 allow_undefined_flag=
11044 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
11045 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
11046 ac_status=$?
11047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11048 test $ac_status = 0; }
11049 then
11050 lt_cv_archive_cmds_need_lc=no
11051 else
11052 lt_cv_archive_cmds_need_lc=yes
11053 fi
11054 allow_undefined_flag=$lt_save_allow_undefined_flag
11055 else
11056 cat conftest.err 1>&5
11057 fi
11058 $RM conftest*
11059
11060 fi
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
11062 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
11063 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
11064 ;;
11065 esac
11066 fi
11067 ;;
11068 esac
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
11222 $as_echo_n "checking dynamic linker characteristics... " >&6; }
11223
11224 if test "$GCC" = yes; then
11225 case $host_os in
11226 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
11227 *) lt_awk_arg="/^libraries:/" ;;
11228 esac
11229 case $host_os in
11230 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
11231 *) lt_sed_strip_eq="s,=/,/,g" ;;
11232 esac
11233 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
11234 case $lt_search_path_spec in
11235 *\;*)
11236 # if the path contains ";" then we assume it to be the separator
11237 # otherwise default to the standard path separator (i.e. ":") - it is
11238 # assumed that no part of a normal pathname contains ";" but that should
11239 # okay in the real world where ";" in dirpaths is itself problematic.
11240 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
11241 ;;
11242 *)
11243 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
11244 ;;
11245 esac
11246 # Ok, now we have the path, separated by spaces, we can step through it
11247 # and add multilib dir if necessary.
11248 lt_tmp_lt_search_path_spec=
11249 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
11250 for lt_sys_path in $lt_search_path_spec; do
11251 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
11252 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
11253 else
11254 test -d "$lt_sys_path" && \
11255 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
11256 fi
11257 done
11258 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
11259 BEGIN {RS=" "; FS="/|\n";} {
11260 lt_foo="";
11261 lt_count=0;
11262 for (lt_i = NF; lt_i > 0; lt_i--) {
11263 if ($lt_i != "" && $lt_i != ".") {
11264 if ($lt_i == "..") {
11265 lt_count++;
11266 } else {
11267 if (lt_count == 0) {
11268 lt_foo="/" $lt_i lt_foo;
11269 } else {
11270 lt_count--;
11271 }
11272 }
11273 }
11274 }
11275 if (lt_foo != "") { lt_freq[lt_foo]++; }
11276 if (lt_freq[lt_foo] == 1) { print lt_foo; }
11277 }'`
11278 # AWK program above erroneously prepends '/' to C:/dos/paths
11279 # for these hosts.
11280 case $host_os in
11281 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
11282 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
11283 esac
11284 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
11285 else
11286 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
11287 fi
11288 library_names_spec=
11289 libname_spec='lib$name'
11290 soname_spec=
11291 shrext_cmds=".so"
11292 postinstall_cmds=
11293 postuninstall_cmds=
11294 finish_cmds=
11295 finish_eval=
11296 shlibpath_var=
11297 shlibpath_overrides_runpath=unknown
11298 version_type=none
11299 dynamic_linker="$host_os ld.so"
11300 sys_lib_dlsearch_path_spec="/lib /usr/lib"
11301 need_lib_prefix=unknown
11302 hardcode_into_libs=no
11303
11304 # when you set need_version to no, make sure it does not cause -set_version
11305 # flags to be left without arguments
11306 need_version=unknown
11307
11308 case $host_os in
11309 aix3*)
11310 version_type=linux # correct to gnu/linux during the next big refactor
11311 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
11312 shlibpath_var=LIBPATH
11313
11314 # AIX 3 has no versioning support, so we append a major version to the name.
11315 soname_spec='${libname}${release}${shared_ext}$major'
11316 ;;
11317
11318 aix[4-9]*)
11319 version_type=linux # correct to gnu/linux during the next big refactor
11320 need_lib_prefix=no
11321 need_version=no
11322 hardcode_into_libs=yes
11323 if test "$host_cpu" = ia64; then
11324 # AIX 5 supports IA64
11325 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
11326 shlibpath_var=LD_LIBRARY_PATH
11327 else
11328 # With GCC up to 2.95.x, collect2 would create an import file
11329 # for dependence libraries. The import file would start with
11330 # the line `#! .'. This would cause the generated library to
11331 # depend on `.', always an invalid library. This was fixed in
11332 # development snapshots of GCC prior to 3.0.
11333 case $host_os in
11334 aix4 | aix4.[01] | aix4.[01].*)
11335 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
11336 echo ' yes '
11337 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
11338 :
11339 else
11340 can_build_shared=no
11341 fi
11342 ;;
11343 esac
11344 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
11345 # soname into executable. Probably we can add versioning support to
11346 # collect2, so additional links can be useful in future.
11347 if test "$aix_use_runtimelinking" = yes; then
11348 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
11349 # instead of lib<name>.a to let people know that these are not
11350 # typical AIX shared libraries.
11351 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11352 else
11353 # We preserve .a as extension for shared libraries through AIX4.2
11354 # and later when we are not doing run time linking.
11355 library_names_spec='${libname}${release}.a $libname.a'
11356 soname_spec='${libname}${release}${shared_ext}$major'
11357 fi
11358 shlibpath_var=LIBPATH
11359 fi
11360 ;;
11361
11362 amigaos*)
11363 case $host_cpu in
11364 powerpc)
11365 # Since July 2007 AmigaOS4 officially supports .so libraries.
11366 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
11367 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11368 ;;
11369 m68k)
11370 library_names_spec='$libname.ixlibrary $libname.a'
11371 # Create ${libname}_ixlibrary.a entries in /sys/libs.
11372 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'
11373 ;;
11374 esac
11375 ;;
11376
11377 beos*)
11378 library_names_spec='${libname}${shared_ext}'
11379 dynamic_linker="$host_os ld.so"
11380 shlibpath_var=LIBRARY_PATH
11381 ;;
11382
11383 bsdi[45]*)
11384 version_type=linux # correct to gnu/linux during the next big refactor
11385 need_version=no
11386 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11387 soname_spec='${libname}${release}${shared_ext}$major'
11388 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
11389 shlibpath_var=LD_LIBRARY_PATH
11390 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
11391 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
11392 # the default ld.so.conf also contains /usr/contrib/lib and
11393 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
11394 # libtool to hard-code these into programs
11395 ;;
11396
11397 cygwin* | mingw* | pw32* | cegcc*)
11398 version_type=windows
11399 shrext_cmds=".dll"
11400 need_version=no
11401 need_lib_prefix=no
11402
11403 case $GCC,$cc_basename in
11404 yes,*)
11405 # gcc
11406 library_names_spec='$libname.dll.a'
11407 # DLL is installed to $(libdir)/../bin by postinstall_cmds
11408 postinstall_cmds='base_file=`basename \${file}`~
11409 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11410 dldir=$destdir/`dirname \$dlpath`~
11411 test -d \$dldir || mkdir -p \$dldir~
11412 $install_prog $dir/$dlname \$dldir/$dlname~
11413 chmod a+x \$dldir/$dlname~
11414 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
11415 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
11416 fi'
11417 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11418 dlpath=$dir/\$dldll~
11419 $RM \$dlpath'
11420 shlibpath_overrides_runpath=yes
11421
11422 case $host_os in
11423 cygwin*)
11424 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
11425 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11426
11427 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
11428 ;;
11429 mingw* | cegcc*)
11430 # MinGW DLLs use traditional 'lib' prefix
11431 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11432 ;;
11433 pw32*)
11434 # pw32 DLLs use 'pw' prefix rather than 'lib'
11435 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11436 ;;
11437 esac
11438 dynamic_linker='Win32 ld.exe'
11439 ;;
11440
11441 *,cl*)
11442 # Native MSVC
11443 libname_spec='$name'
11444 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
11445 library_names_spec='${libname}.dll.lib'
11446
11447 case $build_os in
11448 mingw*)
11449 sys_lib_search_path_spec=
11450 lt_save_ifs=$IFS
11451 IFS=';'
11452 for lt_path in $LIB
11453 do
11454 IFS=$lt_save_ifs
11455 # Let DOS variable expansion print the short 8.3 style file name.
11456 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
11457 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
11458 done
11459 IFS=$lt_save_ifs
11460 # Convert to MSYS style.
11461 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
11462 ;;
11463 cygwin*)
11464 # Convert to unix form, then to dos form, then back to unix form
11465 # but this time dos style (no spaces!) so that the unix form looks
11466 # like /cygdrive/c/PROGRA~1:/cygdr...
11467 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
11468 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
11469 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11470 ;;
11471 *)
11472 sys_lib_search_path_spec="$LIB"
11473 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
11474 # It is most probably a Windows format PATH.
11475 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
11476 else
11477 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11478 fi
11479 # FIXME: find the short name or the path components, as spaces are
11480 # common. (e.g. "Program Files" -> "PROGRA~1")
11481 ;;
11482 esac
11483
11484 # DLL is installed to $(libdir)/../bin by postinstall_cmds
11485 postinstall_cmds='base_file=`basename \${file}`~
11486 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
11487 dldir=$destdir/`dirname \$dlpath`~
11488 test -d \$dldir || mkdir -p \$dldir~
11489 $install_prog $dir/$dlname \$dldir/$dlname'
11490 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11491 dlpath=$dir/\$dldll~
11492 $RM \$dlpath'
11493 shlibpath_overrides_runpath=yes
11494 dynamic_linker='Win32 link.exe'
11495 ;;
11496
11497 *)
11498 # Assume MSVC wrapper
11499 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
11500 dynamic_linker='Win32 ld.exe'
11501 ;;
11502 esac
11503 # FIXME: first we should search . and the directory the executable is in
11504 shlibpath_var=PATH
11505 ;;
11506
11507 darwin* | rhapsody*)
11508 dynamic_linker="$host_os dyld"
11509 version_type=darwin
11510 need_lib_prefix=no
11511 need_version=no
11512 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
11513 soname_spec='${libname}${release}${major}$shared_ext'
11514 shlibpath_overrides_runpath=yes
11515 shlibpath_var=DYLD_LIBRARY_PATH
11516 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
11517
11518 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
11519 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
11520 ;;
11521
11522 dgux*)
11523 version_type=linux # correct to gnu/linux during the next big refactor
11524 need_lib_prefix=no
11525 need_version=no
11526 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
11527 soname_spec='${libname}${release}${shared_ext}$major'
11528 shlibpath_var=LD_LIBRARY_PATH
11529 ;;
11530
11531 freebsd* | dragonfly*)
11532 # DragonFly does not have aout. When/if they implement a new
11533 # versioning mechanism, adjust this.
11534 if test -x /usr/bin/objformat; then
11535 objformat=`/usr/bin/objformat`
11536 else
11537 case $host_os in
11538 freebsd[23].*) objformat=aout ;;
11539 *) objformat=elf ;;
11540 esac
11541 fi
11542 version_type=freebsd-$objformat
11543 case $version_type in
11544 freebsd-elf*)
11545 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11546 need_version=no
11547 need_lib_prefix=no
11548 ;;
11549 freebsd-*)
11550 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
11551 need_version=yes
11552 ;;
11553 esac
11554 shlibpath_var=LD_LIBRARY_PATH
11555 case $host_os in
11556 freebsd2.*)
11557 shlibpath_overrides_runpath=yes
11558 ;;
11559 freebsd3.[01]* | freebsdelf3.[01]*)
11560 shlibpath_overrides_runpath=yes
11561 hardcode_into_libs=yes
11562 ;;
11563 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
11564 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
11565 shlibpath_overrides_runpath=no
11566 hardcode_into_libs=yes
11567 ;;
11568 *) # from 4.6 on, and DragonFly
11569 shlibpath_overrides_runpath=yes
11570 hardcode_into_libs=yes
11571 ;;
11572 esac
11573 ;;
11574
11575 haiku*)
11576 version_type=linux # correct to gnu/linux during the next big refactor
11577 need_lib_prefix=no
11578 need_version=no
11579 dynamic_linker="$host_os runtime_loader"
11580 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
11581 soname_spec='${libname}${release}${shared_ext}$major'
11582 shlibpath_var=LIBRARY_PATH
11583 shlibpath_overrides_runpath=yes
11584 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
11585 hardcode_into_libs=yes
11586 ;;
11587
11588 hpux9* | hpux10* | hpux11*)
11589 # Give a soname corresponding to the major version so that dld.sl refuses to
11590 # link against other versions.
11591 version_type=sunos
11592 need_lib_prefix=no
11593 need_version=no
11594 case $host_cpu in
11595 ia64*)
11596 shrext_cmds='.so'
11597 hardcode_into_libs=yes
11598 dynamic_linker="$host_os dld.so"
11599 shlibpath_var=LD_LIBRARY_PATH
11600 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11601 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11602 soname_spec='${libname}${release}${shared_ext}$major'
11603 if test "X$HPUX_IA64_MODE" = X32; then
11604 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
11605 else
11606 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
11607 fi
11608 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11609 ;;
11610 hppa*64*)
11611 shrext_cmds='.sl'
11612 hardcode_into_libs=yes
11613 dynamic_linker="$host_os dld.sl"
11614 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
11615 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11617 soname_spec='${libname}${release}${shared_ext}$major'
11618 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
11619 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11620 ;;
11621 *)
11622 shrext_cmds='.sl'
11623 dynamic_linker="$host_os dld.sl"
11624 shlibpath_var=SHLIB_PATH
11625 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
11626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11627 soname_spec='${libname}${release}${shared_ext}$major'
11628 ;;
11629 esac
11630 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
11631 postinstall_cmds='chmod 555 $lib'
11632 # or fails outright, so override atomically:
11633 install_override_mode=555
11634 ;;
11635
11636 interix[3-9]*)
11637 version_type=linux # correct to gnu/linux during the next big refactor
11638 need_lib_prefix=no
11639 need_version=no
11640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11641 soname_spec='${libname}${release}${shared_ext}$major'
11642 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
11643 shlibpath_var=LD_LIBRARY_PATH
11644 shlibpath_overrides_runpath=no
11645 hardcode_into_libs=yes
11646 ;;
11647
11648 irix5* | irix6* | nonstopux*)
11649 case $host_os in
11650 nonstopux*) version_type=nonstopux ;;
11651 *)
11652 if test "$lt_cv_prog_gnu_ld" = yes; then
11653 version_type=linux # correct to gnu/linux during the next big refactor
11654 else
11655 version_type=irix
11656 fi ;;
11657 esac
11658 need_lib_prefix=no
11659 need_version=no
11660 soname_spec='${libname}${release}${shared_ext}$major'
11661 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
11662 case $host_os in
11663 irix5* | nonstopux*)
11664 libsuff= shlibsuff=
11665 ;;
11666 *)
11667 case $LD in # libtool.m4 will add one of these switches to LD
11668 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
11669 libsuff= shlibsuff= libmagic=32-bit;;
11670 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
11671 libsuff=32 shlibsuff=N32 libmagic=N32;;
11672 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
11673 libsuff=64 shlibsuff=64 libmagic=64-bit;;
11674 *) libsuff= shlibsuff= libmagic=never-match;;
11675 esac
11676 ;;
11677 esac
11678 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
11679 shlibpath_overrides_runpath=no
11680 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
11681 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
11682 hardcode_into_libs=yes
11683 ;;
11684
11685 # No shared lib support for Linux oldld, aout, or coff.
11686 linux*oldld* | linux*aout* | linux*coff*)
11687 dynamic_linker=no
11688 ;;
11689
11690 # This must be glibc/ELF.
11691 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11692 version_type=linux # correct to gnu/linux during the next big refactor
11693 need_lib_prefix=no
11694 need_version=no
11695 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11696 soname_spec='${libname}${release}${shared_ext}$major'
11697 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
11698 shlibpath_var=LD_LIBRARY_PATH
11699 shlibpath_overrides_runpath=no
11700
11701 # Some binutils ld are patched to set DT_RUNPATH
11702 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
11703 $as_echo_n "(cached) " >&6
11704 else
11705 lt_cv_shlibpath_overrides_runpath=no
11706 save_LDFLAGS=$LDFLAGS
11707 save_libdir=$libdir
11708 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
11709 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
11710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11711 /* end confdefs.h. */
11712
11713 int
11714 main ()
11715 {
11716
11717 ;
11718 return 0;
11719 }
11720 _ACEOF
11721 if ac_fn_c_try_link "$LINENO"; then :
11722 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
11723 lt_cv_shlibpath_overrides_runpath=yes
11724 fi
11725 fi
11726 rm -f core conftest.err conftest.$ac_objext \
11727 conftest$ac_exeext conftest.$ac_ext
11728 LDFLAGS=$save_LDFLAGS
11729 libdir=$save_libdir
11730
11731 fi
11732
11733 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
11734
11735 # This implies no fast_install, which is unacceptable.
11736 # Some rework will be needed to allow for fast_install
11737 # before this can be enabled.
11738 hardcode_into_libs=yes
11739
11740 # Append ld.so.conf contents to the search path
11741 if test -f /etc/ld.so.conf; then
11742 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' ' '`
11743 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
11744 fi
11745
11746 # We used to test for /lib/ld.so.1 and disable shared libraries on
11747 # powerpc, because MkLinux only supported shared libraries with the
11748 # GNU dynamic linker. Since this was broken with cross compilers,
11749 # most powerpc-linux boxes support dynamic linking these days and
11750 # people can always --disable-shared, the test was removed, and we
11751 # assume the GNU/Linux dynamic linker is in use.
11752 dynamic_linker='GNU/Linux ld.so'
11753 ;;
11754
11755 netbsdelf*-gnu)
11756 version_type=linux
11757 need_lib_prefix=no
11758 need_version=no
11759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11760 soname_spec='${libname}${release}${shared_ext}$major'
11761 shlibpath_var=LD_LIBRARY_PATH
11762 shlibpath_overrides_runpath=no
11763 hardcode_into_libs=yes
11764 dynamic_linker='NetBSD ld.elf_so'
11765 ;;
11766
11767 netbsd*)
11768 version_type=sunos
11769 need_lib_prefix=no
11770 need_version=no
11771 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11772 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11773 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11774 dynamic_linker='NetBSD (a.out) ld.so'
11775 else
11776 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11777 soname_spec='${libname}${release}${shared_ext}$major'
11778 dynamic_linker='NetBSD ld.elf_so'
11779 fi
11780 shlibpath_var=LD_LIBRARY_PATH
11781 shlibpath_overrides_runpath=yes
11782 hardcode_into_libs=yes
11783 ;;
11784
11785 newsos6)
11786 version_type=linux # correct to gnu/linux during the next big refactor
11787 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11788 shlibpath_var=LD_LIBRARY_PATH
11789 shlibpath_overrides_runpath=yes
11790 ;;
11791
11792 *nto* | *qnx*)
11793 version_type=qnx
11794 need_lib_prefix=no
11795 need_version=no
11796 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11797 soname_spec='${libname}${release}${shared_ext}$major'
11798 shlibpath_var=LD_LIBRARY_PATH
11799 shlibpath_overrides_runpath=no
11800 hardcode_into_libs=yes
11801 dynamic_linker='ldqnx.so'
11802 ;;
11803
11804 openbsd*)
11805 version_type=sunos
11806 sys_lib_dlsearch_path_spec="/usr/lib"
11807 need_lib_prefix=no
11808 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
11809 case $host_os in
11810 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
11811 *) need_version=no ;;
11812 esac
11813 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11814 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11815 shlibpath_var=LD_LIBRARY_PATH
11816 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11817 case $host_os in
11818 openbsd2.[89] | openbsd2.[89].*)
11819 shlibpath_overrides_runpath=no
11820 ;;
11821 *)
11822 shlibpath_overrides_runpath=yes
11823 ;;
11824 esac
11825 else
11826 shlibpath_overrides_runpath=yes
11827 fi
11828 ;;
11829
11830 os2*)
11831 libname_spec='$name'
11832 shrext_cmds=".dll"
11833 need_lib_prefix=no
11834 library_names_spec='$libname${shared_ext} $libname.a'
11835 dynamic_linker='OS/2 ld.exe'
11836 shlibpath_var=LIBPATH
11837 ;;
11838
11839 osf3* | osf4* | osf5*)
11840 version_type=osf
11841 need_lib_prefix=no
11842 need_version=no
11843 soname_spec='${libname}${release}${shared_ext}$major'
11844 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11845 shlibpath_var=LD_LIBRARY_PATH
11846 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
11847 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
11848 ;;
11849
11850 rdos*)
11851 dynamic_linker=no
11852 ;;
11853
11854 solaris*)
11855 version_type=linux # correct to gnu/linux during the next big refactor
11856 need_lib_prefix=no
11857 need_version=no
11858 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11859 soname_spec='${libname}${release}${shared_ext}$major'
11860 shlibpath_var=LD_LIBRARY_PATH
11861 shlibpath_overrides_runpath=yes
11862 hardcode_into_libs=yes
11863 # ldd complains unless libraries are executable
11864 postinstall_cmds='chmod +x $lib'
11865 ;;
11866
11867 sunos4*)
11868 version_type=sunos
11869 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
11870 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
11871 shlibpath_var=LD_LIBRARY_PATH
11872 shlibpath_overrides_runpath=yes
11873 if test "$with_gnu_ld" = yes; then
11874 need_lib_prefix=no
11875 fi
11876 need_version=yes
11877 ;;
11878
11879 sysv4 | sysv4.3*)
11880 version_type=linux # correct to gnu/linux during the next big refactor
11881 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11882 soname_spec='${libname}${release}${shared_ext}$major'
11883 shlibpath_var=LD_LIBRARY_PATH
11884 case $host_vendor in
11885 sni)
11886 shlibpath_overrides_runpath=no
11887 need_lib_prefix=no
11888 runpath_var=LD_RUN_PATH
11889 ;;
11890 siemens)
11891 need_lib_prefix=no
11892 ;;
11893 motorola)
11894 need_lib_prefix=no
11895 need_version=no
11896 shlibpath_overrides_runpath=no
11897 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
11898 ;;
11899 esac
11900 ;;
11901
11902 sysv4*MP*)
11903 if test -d /usr/nec ;then
11904 version_type=linux # correct to gnu/linux during the next big refactor
11905 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
11906 soname_spec='$libname${shared_ext}.$major'
11907 shlibpath_var=LD_LIBRARY_PATH
11908 fi
11909 ;;
11910
11911 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
11912 version_type=freebsd-elf
11913 need_lib_prefix=no
11914 need_version=no
11915 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
11916 soname_spec='${libname}${release}${shared_ext}$major'
11917 shlibpath_var=LD_LIBRARY_PATH
11918 shlibpath_overrides_runpath=yes
11919 hardcode_into_libs=yes
11920 if test "$with_gnu_ld" = yes; then
11921 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
11922 else
11923 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
11924 case $host_os in
11925 sco3.2v5*)
11926 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
11927 ;;
11928 esac
11929 fi
11930 sys_lib_dlsearch_path_spec='/usr/lib'
11931 ;;
11932
11933 tpf*)
11934 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
11935 version_type=linux # correct to gnu/linux during the next big refactor
11936 need_lib_prefix=no
11937 need_version=no
11938 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11939 shlibpath_var=LD_LIBRARY_PATH
11940 shlibpath_overrides_runpath=no
11941 hardcode_into_libs=yes
11942 ;;
11943
11944 uts4*)
11945 version_type=linux # correct to gnu/linux during the next big refactor
11946 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
11947 soname_spec='${libname}${release}${shared_ext}$major'
11948 shlibpath_var=LD_LIBRARY_PATH
11949 ;;
11950
11951 *)
11952 dynamic_linker=no
11953 ;;
11954 esac
11955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
11956 $as_echo "$dynamic_linker" >&6; }
11957 test "$dynamic_linker" = no && can_build_shared=no
11958
11959 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11960 if test "$GCC" = yes; then
11961 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11962 fi
11963
11964 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
11965 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
11966 fi
11967 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
11968 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
11969 fi
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
12063 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
12064 hardcode_action=
12065 if test -n "$hardcode_libdir_flag_spec" ||
12066 test -n "$runpath_var" ||
12067 test "X$hardcode_automatic" = "Xyes" ; then
12068
12069 # We can hardcode non-existent directories.
12070 if test "$hardcode_direct" != no &&
12071 # If the only mechanism to avoid hardcoding is shlibpath_var, we
12072 # have to relink, otherwise we might link with an installed library
12073 # when we should be linking with a yet-to-be-installed one
12074 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
12075 test "$hardcode_minus_L" != no; then
12076 # Linking always hardcodes the temporary library directory.
12077 hardcode_action=relink
12078 else
12079 # We can link without hardcoding, and we can hardcode nonexisting dirs.
12080 hardcode_action=immediate
12081 fi
12082 else
12083 # We cannot hardcode anything, or else we can only hardcode existing
12084 # directories.
12085 hardcode_action=unsupported
12086 fi
12087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
12088 $as_echo "$hardcode_action" >&6; }
12089
12090 if test "$hardcode_action" = relink ||
12091 test "$inherit_rpath" = yes; then
12092 # Fast installation is not supported
12093 enable_fast_install=no
12094 elif test "$shlibpath_overrides_runpath" = yes ||
12095 test "$enable_shared" = no; then
12096 # Fast installation is not necessary
12097 enable_fast_install=needless
12098 fi
12099
12100
12101
12102
12103
12104
12105 if test "x$enable_dlopen" != xyes; then
12106 enable_dlopen=unknown
12107 enable_dlopen_self=unknown
12108 enable_dlopen_self_static=unknown
12109 else
12110 lt_cv_dlopen=no
12111 lt_cv_dlopen_libs=
12112
12113 case $host_os in
12114 beos*)
12115 lt_cv_dlopen="load_add_on"
12116 lt_cv_dlopen_libs=
12117 lt_cv_dlopen_self=yes
12118 ;;
12119
12120 mingw* | pw32* | cegcc*)
12121 lt_cv_dlopen="LoadLibrary"
12122 lt_cv_dlopen_libs=
12123 ;;
12124
12125 cygwin*)
12126 lt_cv_dlopen="dlopen"
12127 lt_cv_dlopen_libs=
12128 ;;
12129
12130 darwin*)
12131 # if libdl is installed we need to link against it
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12133 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12134 if ${ac_cv_lib_dl_dlopen+:} false; then :
12135 $as_echo_n "(cached) " >&6
12136 else
12137 ac_check_lib_save_LIBS=$LIBS
12138 LIBS="-ldl $LIBS"
12139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12140 /* end confdefs.h. */
12141
12142 /* Override any GCC internal prototype to avoid an error.
12143 Use char because int might match the return type of a GCC
12144 builtin and then its argument prototype would still apply. */
12145 #ifdef __cplusplus
12146 extern "C"
12147 #endif
12148 char dlopen ();
12149 int
12150 main ()
12151 {
12152 return dlopen ();
12153 ;
12154 return 0;
12155 }
12156 _ACEOF
12157 if ac_fn_c_try_link "$LINENO"; then :
12158 ac_cv_lib_dl_dlopen=yes
12159 else
12160 ac_cv_lib_dl_dlopen=no
12161 fi
12162 rm -f core conftest.err conftest.$ac_objext \
12163 conftest$ac_exeext conftest.$ac_ext
12164 LIBS=$ac_check_lib_save_LIBS
12165 fi
12166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12167 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12168 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12169 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
12170 else
12171
12172 lt_cv_dlopen="dyld"
12173 lt_cv_dlopen_libs=
12174 lt_cv_dlopen_self=yes
12175
12176 fi
12177
12178 ;;
12179
12180 *)
12181 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
12182 if test "x$ac_cv_func_shl_load" = xyes; then :
12183 lt_cv_dlopen="shl_load"
12184 else
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
12186 $as_echo_n "checking for shl_load in -ldld... " >&6; }
12187 if ${ac_cv_lib_dld_shl_load+:} false; then :
12188 $as_echo_n "(cached) " >&6
12189 else
12190 ac_check_lib_save_LIBS=$LIBS
12191 LIBS="-ldld $LIBS"
12192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12193 /* end confdefs.h. */
12194
12195 /* Override any GCC internal prototype to avoid an error.
12196 Use char because int might match the return type of a GCC
12197 builtin and then its argument prototype would still apply. */
12198 #ifdef __cplusplus
12199 extern "C"
12200 #endif
12201 char shl_load ();
12202 int
12203 main ()
12204 {
12205 return shl_load ();
12206 ;
12207 return 0;
12208 }
12209 _ACEOF
12210 if ac_fn_c_try_link "$LINENO"; then :
12211 ac_cv_lib_dld_shl_load=yes
12212 else
12213 ac_cv_lib_dld_shl_load=no
12214 fi
12215 rm -f core conftest.err conftest.$ac_objext \
12216 conftest$ac_exeext conftest.$ac_ext
12217 LIBS=$ac_check_lib_save_LIBS
12218 fi
12219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
12220 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
12221 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
12222 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
12223 else
12224 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12225 if test "x$ac_cv_func_dlopen" = xyes; then :
12226 lt_cv_dlopen="dlopen"
12227 else
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12229 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12230 if ${ac_cv_lib_dl_dlopen+:} false; then :
12231 $as_echo_n "(cached) " >&6
12232 else
12233 ac_check_lib_save_LIBS=$LIBS
12234 LIBS="-ldl $LIBS"
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236 /* end confdefs.h. */
12237
12238 /* Override any GCC internal prototype to avoid an error.
12239 Use char because int might match the return type of a GCC
12240 builtin and then its argument prototype would still apply. */
12241 #ifdef __cplusplus
12242 extern "C"
12243 #endif
12244 char dlopen ();
12245 int
12246 main ()
12247 {
12248 return dlopen ();
12249 ;
12250 return 0;
12251 }
12252 _ACEOF
12253 if ac_fn_c_try_link "$LINENO"; then :
12254 ac_cv_lib_dl_dlopen=yes
12255 else
12256 ac_cv_lib_dl_dlopen=no
12257 fi
12258 rm -f core conftest.err conftest.$ac_objext \
12259 conftest$ac_exeext conftest.$ac_ext
12260 LIBS=$ac_check_lib_save_LIBS
12261 fi
12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12263 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12264 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12265 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
12266 else
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
12268 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
12269 if ${ac_cv_lib_svld_dlopen+:} false; then :
12270 $as_echo_n "(cached) " >&6
12271 else
12272 ac_check_lib_save_LIBS=$LIBS
12273 LIBS="-lsvld $LIBS"
12274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12275 /* end confdefs.h. */
12276
12277 /* Override any GCC internal prototype to avoid an error.
12278 Use char because int might match the return type of a GCC
12279 builtin and then its argument prototype would still apply. */
12280 #ifdef __cplusplus
12281 extern "C"
12282 #endif
12283 char dlopen ();
12284 int
12285 main ()
12286 {
12287 return dlopen ();
12288 ;
12289 return 0;
12290 }
12291 _ACEOF
12292 if ac_fn_c_try_link "$LINENO"; then :
12293 ac_cv_lib_svld_dlopen=yes
12294 else
12295 ac_cv_lib_svld_dlopen=no
12296 fi
12297 rm -f core conftest.err conftest.$ac_objext \
12298 conftest$ac_exeext conftest.$ac_ext
12299 LIBS=$ac_check_lib_save_LIBS
12300 fi
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
12302 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
12303 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
12304 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
12305 else
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
12307 $as_echo_n "checking for dld_link in -ldld... " >&6; }
12308 if ${ac_cv_lib_dld_dld_link+:} false; then :
12309 $as_echo_n "(cached) " >&6
12310 else
12311 ac_check_lib_save_LIBS=$LIBS
12312 LIBS="-ldld $LIBS"
12313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314 /* end confdefs.h. */
12315
12316 /* Override any GCC internal prototype to avoid an error.
12317 Use char because int might match the return type of a GCC
12318 builtin and then its argument prototype would still apply. */
12319 #ifdef __cplusplus
12320 extern "C"
12321 #endif
12322 char dld_link ();
12323 int
12324 main ()
12325 {
12326 return dld_link ();
12327 ;
12328 return 0;
12329 }
12330 _ACEOF
12331 if ac_fn_c_try_link "$LINENO"; then :
12332 ac_cv_lib_dld_dld_link=yes
12333 else
12334 ac_cv_lib_dld_dld_link=no
12335 fi
12336 rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext conftest.$ac_ext
12338 LIBS=$ac_check_lib_save_LIBS
12339 fi
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
12341 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
12342 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
12343 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
12344 fi
12345
12346
12347 fi
12348
12349
12350 fi
12351
12352
12353 fi
12354
12355
12356 fi
12357
12358
12359 fi
12360
12361 ;;
12362 esac
12363
12364 if test "x$lt_cv_dlopen" != xno; then
12365 enable_dlopen=yes
12366 else
12367 enable_dlopen=no
12368 fi
12369
12370 case $lt_cv_dlopen in
12371 dlopen)
12372 save_CPPFLAGS="$CPPFLAGS"
12373 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
12374
12375 save_LDFLAGS="$LDFLAGS"
12376 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
12377
12378 save_LIBS="$LIBS"
12379 LIBS="$lt_cv_dlopen_libs $LIBS"
12380
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
12382 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
12383 if ${lt_cv_dlopen_self+:} false; then :
12384 $as_echo_n "(cached) " >&6
12385 else
12386 if test "$cross_compiling" = yes; then :
12387 lt_cv_dlopen_self=cross
12388 else
12389 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12390 lt_status=$lt_dlunknown
12391 cat > conftest.$ac_ext <<_LT_EOF
12392 #line $LINENO "configure"
12393 #include "confdefs.h"
12394
12395 #if HAVE_DLFCN_H
12396 #include <dlfcn.h>
12397 #endif
12398
12399 #include <stdio.h>
12400
12401 #ifdef RTLD_GLOBAL
12402 # define LT_DLGLOBAL RTLD_GLOBAL
12403 #else
12404 # ifdef DL_GLOBAL
12405 # define LT_DLGLOBAL DL_GLOBAL
12406 # else
12407 # define LT_DLGLOBAL 0
12408 # endif
12409 #endif
12410
12411 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12412 find out it does not work in some platform. */
12413 #ifndef LT_DLLAZY_OR_NOW
12414 # ifdef RTLD_LAZY
12415 # define LT_DLLAZY_OR_NOW RTLD_LAZY
12416 # else
12417 # ifdef DL_LAZY
12418 # define LT_DLLAZY_OR_NOW DL_LAZY
12419 # else
12420 # ifdef RTLD_NOW
12421 # define LT_DLLAZY_OR_NOW RTLD_NOW
12422 # else
12423 # ifdef DL_NOW
12424 # define LT_DLLAZY_OR_NOW DL_NOW
12425 # else
12426 # define LT_DLLAZY_OR_NOW 0
12427 # endif
12428 # endif
12429 # endif
12430 # endif
12431 #endif
12432
12433 /* When -fvisbility=hidden is used, assume the code has been annotated
12434 correspondingly for the symbols needed. */
12435 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12436 int fnord () __attribute__((visibility("default")));
12437 #endif
12438
12439 int fnord () { return 42; }
12440 int main ()
12441 {
12442 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12443 int status = $lt_dlunknown;
12444
12445 if (self)
12446 {
12447 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12448 else
12449 {
12450 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12451 else puts (dlerror ());
12452 }
12453 /* dlclose (self); */
12454 }
12455 else
12456 puts (dlerror ());
12457
12458 return status;
12459 }
12460 _LT_EOF
12461 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12462 (eval $ac_link) 2>&5
12463 ac_status=$?
12464 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12465 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12466 (./conftest; exit; ) >&5 2>/dev/null
12467 lt_status=$?
12468 case x$lt_status in
12469 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
12470 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
12471 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
12472 esac
12473 else :
12474 # compilation failed
12475 lt_cv_dlopen_self=no
12476 fi
12477 fi
12478 rm -fr conftest*
12479
12480
12481 fi
12482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
12483 $as_echo "$lt_cv_dlopen_self" >&6; }
12484
12485 if test "x$lt_cv_dlopen_self" = xyes; then
12486 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
12488 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
12489 if ${lt_cv_dlopen_self_static+:} false; then :
12490 $as_echo_n "(cached) " >&6
12491 else
12492 if test "$cross_compiling" = yes; then :
12493 lt_cv_dlopen_self_static=cross
12494 else
12495 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12496 lt_status=$lt_dlunknown
12497 cat > conftest.$ac_ext <<_LT_EOF
12498 #line $LINENO "configure"
12499 #include "confdefs.h"
12500
12501 #if HAVE_DLFCN_H
12502 #include <dlfcn.h>
12503 #endif
12504
12505 #include <stdio.h>
12506
12507 #ifdef RTLD_GLOBAL
12508 # define LT_DLGLOBAL RTLD_GLOBAL
12509 #else
12510 # ifdef DL_GLOBAL
12511 # define LT_DLGLOBAL DL_GLOBAL
12512 # else
12513 # define LT_DLGLOBAL 0
12514 # endif
12515 #endif
12516
12517 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12518 find out it does not work in some platform. */
12519 #ifndef LT_DLLAZY_OR_NOW
12520 # ifdef RTLD_LAZY
12521 # define LT_DLLAZY_OR_NOW RTLD_LAZY
12522 # else
12523 # ifdef DL_LAZY
12524 # define LT_DLLAZY_OR_NOW DL_LAZY
12525 # else
12526 # ifdef RTLD_NOW
12527 # define LT_DLLAZY_OR_NOW RTLD_NOW
12528 # else
12529 # ifdef DL_NOW
12530 # define LT_DLLAZY_OR_NOW DL_NOW
12531 # else
12532 # define LT_DLLAZY_OR_NOW 0
12533 # endif
12534 # endif
12535 # endif
12536 # endif
12537 #endif
12538
12539 /* When -fvisbility=hidden is used, assume the code has been annotated
12540 correspondingly for the symbols needed. */
12541 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12542 int fnord () __attribute__((visibility("default")));
12543 #endif
12544
12545 int fnord () { return 42; }
12546 int main ()
12547 {
12548 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12549 int status = $lt_dlunknown;
12550
12551 if (self)
12552 {
12553 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12554 else
12555 {
12556 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12557 else puts (dlerror ());
12558 }
12559 /* dlclose (self); */
12560 }
12561 else
12562 puts (dlerror ());
12563
12564 return status;
12565 }
12566 _LT_EOF
12567 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12568 (eval $ac_link) 2>&5
12569 ac_status=$?
12570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12571 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
12572 (./conftest; exit; ) >&5 2>/dev/null
12573 lt_status=$?
12574 case x$lt_status in
12575 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
12576 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
12577 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
12578 esac
12579 else :
12580 # compilation failed
12581 lt_cv_dlopen_self_static=no
12582 fi
12583 fi
12584 rm -fr conftest*
12585
12586
12587 fi
12588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
12589 $as_echo "$lt_cv_dlopen_self_static" >&6; }
12590 fi
12591
12592 CPPFLAGS="$save_CPPFLAGS"
12593 LDFLAGS="$save_LDFLAGS"
12594 LIBS="$save_LIBS"
12595 ;;
12596 esac
12597
12598 case $lt_cv_dlopen_self in
12599 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
12600 *) enable_dlopen_self=unknown ;;
12601 esac
12602
12603 case $lt_cv_dlopen_self_static in
12604 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
12605 *) enable_dlopen_self_static=unknown ;;
12606 esac
12607 fi
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625 striplib=
12626 old_striplib=
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
12628 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
12629 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12630 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12631 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12633 $as_echo "yes" >&6; }
12634 else
12635 # FIXME - insert some real tests, host_os isn't really good enough
12636 case $host_os in
12637 darwin*)
12638 if test -n "$STRIP" ; then
12639 striplib="$STRIP -x"
12640 old_striplib="$STRIP -S"
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12642 $as_echo "yes" >&6; }
12643 else
12644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12645 $as_echo "no" >&6; }
12646 fi
12647 ;;
12648 *)
12649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12650 $as_echo "no" >&6; }
12651 ;;
12652 esac
12653 fi
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666 # Report which library types will actually be built
12667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
12668 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
12669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
12670 $as_echo "$can_build_shared" >&6; }
12671
12672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
12673 $as_echo_n "checking whether to build shared libraries... " >&6; }
12674 test "$can_build_shared" = "no" && enable_shared=no
12675
12676 # On AIX, shared libraries and static libraries use the same namespace, and
12677 # are all built from PIC.
12678 case $host_os in
12679 aix3*)
12680 test "$enable_shared" = yes && enable_static=no
12681 if test -n "$RANLIB"; then
12682 archive_cmds="$archive_cmds~\$RANLIB \$lib"
12683 postinstall_cmds='$RANLIB $lib'
12684 fi
12685 ;;
12686
12687 aix[4-9]*)
12688 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
12689 test "$enable_shared" = yes && enable_static=no
12690 fi
12691 ;;
12692 esac
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
12694 $as_echo "$enable_shared" >&6; }
12695
12696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
12697 $as_echo_n "checking whether to build static libraries... " >&6; }
12698 # Make sure either enable_shared or enable_static is yes.
12699 test "$enable_shared" = yes || enable_static=yes
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
12701 $as_echo "$enable_static" >&6; }
12702
12703
12704
12705
12706 fi
12707 ac_ext=c
12708 ac_cpp='$CPP $CPPFLAGS'
12709 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12710 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12711 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12712
12713 CC="$lt_save_CC"
12714
12715 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
12716 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
12717 (test "X$CXX" != "Xg++"))) ; then
12718 ac_ext=cpp
12719 ac_cpp='$CXXCPP $CPPFLAGS'
12720 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12721 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12722 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
12724 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
12725 if test -z "$CXXCPP"; then
12726 if ${ac_cv_prog_CXXCPP+:} false; then :
12727 $as_echo_n "(cached) " >&6
12728 else
12729 # Double quotes because CXXCPP needs to be expanded
12730 for CXXCPP in "$CXX -E" "/lib/cpp"
12731 do
12732 ac_preproc_ok=false
12733 for ac_cxx_preproc_warn_flag in '' yes
12734 do
12735 # Use a header file that comes with gcc, so configuring glibc
12736 # with a fresh cross-compiler works.
12737 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12738 # <limits.h> exists even on freestanding compilers.
12739 # On the NeXT, cc -E runs the code through the compiler's parser,
12740 # not just through cpp. "Syntax error" is here to catch this case.
12741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12742 /* end confdefs.h. */
12743 #ifdef __STDC__
12744 # include <limits.h>
12745 #else
12746 # include <assert.h>
12747 #endif
12748 Syntax error
12749 _ACEOF
12750 if ac_fn_cxx_try_cpp "$LINENO"; then :
12751
12752 else
12753 # Broken: fails on valid input.
12754 continue
12755 fi
12756 rm -f conftest.err conftest.i conftest.$ac_ext
12757
12758 # OK, works on sane cases. Now check whether nonexistent headers
12759 # can be detected and how.
12760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12761 /* end confdefs.h. */
12762 #include <ac_nonexistent.h>
12763 _ACEOF
12764 if ac_fn_cxx_try_cpp "$LINENO"; then :
12765 # Broken: success on invalid input.
12766 continue
12767 else
12768 # Passes both tests.
12769 ac_preproc_ok=:
12770 break
12771 fi
12772 rm -f conftest.err conftest.i conftest.$ac_ext
12773
12774 done
12775 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12776 rm -f conftest.i conftest.err conftest.$ac_ext
12777 if $ac_preproc_ok; then :
12778 break
12779 fi
12780
12781 done
12782 ac_cv_prog_CXXCPP=$CXXCPP
12783
12784 fi
12785 CXXCPP=$ac_cv_prog_CXXCPP
12786 else
12787 ac_cv_prog_CXXCPP=$CXXCPP
12788 fi
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
12790 $as_echo "$CXXCPP" >&6; }
12791 ac_preproc_ok=false
12792 for ac_cxx_preproc_warn_flag in '' yes
12793 do
12794 # Use a header file that comes with gcc, so configuring glibc
12795 # with a fresh cross-compiler works.
12796 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12797 # <limits.h> exists even on freestanding compilers.
12798 # On the NeXT, cc -E runs the code through the compiler's parser,
12799 # not just through cpp. "Syntax error" is here to catch this case.
12800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12801 /* end confdefs.h. */
12802 #ifdef __STDC__
12803 # include <limits.h>
12804 #else
12805 # include <assert.h>
12806 #endif
12807 Syntax error
12808 _ACEOF
12809 if ac_fn_cxx_try_cpp "$LINENO"; then :
12810
12811 else
12812 # Broken: fails on valid input.
12813 continue
12814 fi
12815 rm -f conftest.err conftest.i conftest.$ac_ext
12816
12817 # OK, works on sane cases. Now check whether nonexistent headers
12818 # can be detected and how.
12819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820 /* end confdefs.h. */
12821 #include <ac_nonexistent.h>
12822 _ACEOF
12823 if ac_fn_cxx_try_cpp "$LINENO"; then :
12824 # Broken: success on invalid input.
12825 continue
12826 else
12827 # Passes both tests.
12828 ac_preproc_ok=:
12829 break
12830 fi
12831 rm -f conftest.err conftest.i conftest.$ac_ext
12832
12833 done
12834 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12835 rm -f conftest.i conftest.err conftest.$ac_ext
12836 if $ac_preproc_ok; then :
12837
12838 else
12839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12840 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12841 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
12842 See \`config.log' for more details" "$LINENO" 5; }
12843 fi
12844
12845 ac_ext=c
12846 ac_cpp='$CPP $CPPFLAGS'
12847 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12848 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12850
12851 else
12852 _lt_caught_CXX_error=yes
12853 fi
12854
12855 ac_ext=cpp
12856 ac_cpp='$CXXCPP $CPPFLAGS'
12857 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12858 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12859 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12860
12861 archive_cmds_need_lc_CXX=no
12862 allow_undefined_flag_CXX=
12863 always_export_symbols_CXX=no
12864 archive_expsym_cmds_CXX=
12865 compiler_needs_object_CXX=no
12866 export_dynamic_flag_spec_CXX=
12867 hardcode_direct_CXX=no
12868 hardcode_direct_absolute_CXX=no
12869 hardcode_libdir_flag_spec_CXX=
12870 hardcode_libdir_separator_CXX=
12871 hardcode_minus_L_CXX=no
12872 hardcode_shlibpath_var_CXX=unsupported
12873 hardcode_automatic_CXX=no
12874 inherit_rpath_CXX=no
12875 module_cmds_CXX=
12876 module_expsym_cmds_CXX=
12877 link_all_deplibs_CXX=unknown
12878 old_archive_cmds_CXX=$old_archive_cmds
12879 reload_flag_CXX=$reload_flag
12880 reload_cmds_CXX=$reload_cmds
12881 no_undefined_flag_CXX=
12882 whole_archive_flag_spec_CXX=
12883 enable_shared_with_static_runtimes_CXX=no
12884
12885 # Source file extension for C++ test sources.
12886 ac_ext=cpp
12887
12888 # Object file extension for compiled C++ test sources.
12889 objext=o
12890 objext_CXX=$objext
12891
12892 # No sense in running all these tests if we already determined that
12893 # the CXX compiler isn't working. Some variables (like enable_shared)
12894 # are currently assumed to apply to all compilers on this platform,
12895 # and will be corrupted by setting them based on a non-working compiler.
12896 if test "$_lt_caught_CXX_error" != yes; then
12897 # Code to be used in simple compile tests
12898 lt_simple_compile_test_code="int some_variable = 0;"
12899
12900 # Code to be used in simple link tests
12901 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
12902
12903 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
12904
12905
12906
12907
12908
12909
12910 # If no C compiler was specified, use CC.
12911 LTCC=${LTCC-"$CC"}
12912
12913 # If no C compiler flags were specified, use CFLAGS.
12914 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12915
12916 # Allow CC to be a program name with arguments.
12917 compiler=$CC
12918
12919
12920 # save warnings/boilerplate of simple test code
12921 ac_outfile=conftest.$ac_objext
12922 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12923 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12924 _lt_compiler_boilerplate=`cat conftest.err`
12925 $RM conftest*
12926
12927 ac_outfile=conftest.$ac_objext
12928 echo "$lt_simple_link_test_code" >conftest.$ac_ext
12929 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12930 _lt_linker_boilerplate=`cat conftest.err`
12931 $RM -r conftest*
12932
12933
12934 # Allow CC to be a program name with arguments.
12935 lt_save_CC=$CC
12936 lt_save_CFLAGS=$CFLAGS
12937 lt_save_LD=$LD
12938 lt_save_GCC=$GCC
12939 GCC=$GXX
12940 lt_save_with_gnu_ld=$with_gnu_ld
12941 lt_save_path_LD=$lt_cv_path_LD
12942 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
12943 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
12944 else
12945 $as_unset lt_cv_prog_gnu_ld
12946 fi
12947 if test -n "${lt_cv_path_LDCXX+set}"; then
12948 lt_cv_path_LD=$lt_cv_path_LDCXX
12949 else
12950 $as_unset lt_cv_path_LD
12951 fi
12952 test -z "${LDCXX+set}" || LD=$LDCXX
12953 CC=${CXX-"c++"}
12954 CFLAGS=$CXXFLAGS
12955 compiler=$CC
12956 compiler_CXX=$CC
12957 for cc_temp in $compiler""; do
12958 case $cc_temp in
12959 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
12960 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
12961 \-*) ;;
12962 *) break;;
12963 esac
12964 done
12965 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
12966
12967
12968 if test -n "$compiler"; then
12969 # We don't want -fno-exception when compiling C++ code, so set the
12970 # no_builtin_flag separately
12971 if test "$GXX" = yes; then
12972 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
12973 else
12974 lt_prog_compiler_no_builtin_flag_CXX=
12975 fi
12976
12977 if test "$GXX" = yes; then
12978 # Set up default GNU C++ configuration
12979
12980
12981
12982 # Check whether --with-gnu-ld was given.
12983 if test "${with_gnu_ld+set}" = set; then :
12984 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12985 else
12986 with_gnu_ld=no
12987 fi
12988
12989 ac_prog=ld
12990 if test "$GCC" = yes; then
12991 # Check if gcc -print-prog-name=ld gives a path.
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12993 $as_echo_n "checking for ld used by $CC... " >&6; }
12994 case $host in
12995 *-*-mingw*)
12996 # gcc leaves a trailing carriage return which upsets mingw
12997 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12998 *)
12999 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13000 esac
13001 case $ac_prog in
13002 # Accept absolute paths.
13003 [\\/]* | ?:[\\/]*)
13004 re_direlt='/[^/][^/]*/\.\./'
13005 # Canonicalize the pathname of ld
13006 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
13007 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
13008 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
13009 done
13010 test -z "$LD" && LD="$ac_prog"
13011 ;;
13012 "")
13013 # If it fails, then pretend we aren't using GCC.
13014 ac_prog=ld
13015 ;;
13016 *)
13017 # If it is relative, then search for the first ld in PATH.
13018 with_gnu_ld=unknown
13019 ;;
13020 esac
13021 elif test "$with_gnu_ld" = yes; then
13022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13023 $as_echo_n "checking for GNU ld... " >&6; }
13024 else
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13026 $as_echo_n "checking for non-GNU ld... " >&6; }
13027 fi
13028 if ${lt_cv_path_LD+:} false; then :
13029 $as_echo_n "(cached) " >&6
13030 else
13031 if test -z "$LD"; then
13032 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
13033 for ac_dir in $PATH; do
13034 IFS="$lt_save_ifs"
13035 test -z "$ac_dir" && ac_dir=.
13036 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13037 lt_cv_path_LD="$ac_dir/$ac_prog"
13038 # Check to see if the program is GNU ld. I'd rather use --version,
13039 # but apparently some variants of GNU ld only accept -v.
13040 # Break only if it was the GNU/non-GNU ld that we prefer.
13041 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
13042 *GNU* | *'with BFD'*)
13043 test "$with_gnu_ld" != no && break
13044 ;;
13045 *)
13046 test "$with_gnu_ld" != yes && break
13047 ;;
13048 esac
13049 fi
13050 done
13051 IFS="$lt_save_ifs"
13052 else
13053 lt_cv_path_LD="$LD" # Let the user override the test with a path.
13054 fi
13055 fi
13056
13057 LD="$lt_cv_path_LD"
13058 if test -n "$LD"; then
13059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13060 $as_echo "$LD" >&6; }
13061 else
13062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063 $as_echo "no" >&6; }
13064 fi
13065 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13067 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
13068 if ${lt_cv_prog_gnu_ld+:} false; then :
13069 $as_echo_n "(cached) " >&6
13070 else
13071 # I'd rather use --version here, but apparently some GNU lds only accept -v.
13072 case `$LD -v 2>&1 </dev/null` in
13073 *GNU* | *'with BFD'*)
13074 lt_cv_prog_gnu_ld=yes
13075 ;;
13076 *)
13077 lt_cv_prog_gnu_ld=no
13078 ;;
13079 esac
13080 fi
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
13082 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
13083 with_gnu_ld=$lt_cv_prog_gnu_ld
13084
13085
13086
13087
13088
13089
13090
13091 # Check if GNU C++ uses GNU ld as the underlying linker, since the
13092 # archiving commands below assume that GNU ld is being used.
13093 if test "$with_gnu_ld" = yes; then
13094 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
13095 archive_expsym_cmds_CXX='$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'
13096
13097 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
13098 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13099
13100 # If archive_cmds runs LD, not CC, wlarc should be empty
13101 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
13102 # investigate it a little bit more. (MM)
13103 wlarc='${wl}'
13104
13105 # ancient GNU ld didn't support --whole-archive et. al.
13106 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
13107 $GREP 'no-whole-archive' > /dev/null; then
13108 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
13109 else
13110 whole_archive_flag_spec_CXX=
13111 fi
13112 else
13113 with_gnu_ld=no
13114 wlarc=
13115
13116 # A generic and very simple default shared library creation
13117 # command for GNU C++ for the case where it uses the native
13118 # linker, instead of GNU ld. If possible, this setting should
13119 # overridden to take advantage of the native linker features on
13120 # the platform it is being used on.
13121 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
13122 fi
13123
13124 # Commands to make compiler produce verbose output that lists
13125 # what "hidden" libraries, object files and flags are used when
13126 # linking a shared library.
13127 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
13128
13129 else
13130 GXX=no
13131 with_gnu_ld=no
13132 wlarc=
13133 fi
13134
13135 # PORTME: fill in a description of your system's C++ link characteristics
13136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13137 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
13138 ld_shlibs_CXX=yes
13139 case $host_os in
13140 aix3*)
13141 # FIXME: insert proper C++ library support
13142 ld_shlibs_CXX=no
13143 ;;
13144 aix[4-9]*)
13145 if test "$host_cpu" = ia64; then
13146 # On IA64, the linker does run time linking by default, so we don't
13147 # have to do anything special.
13148 aix_use_runtimelinking=no
13149 exp_sym_flag='-Bexport'
13150 no_entry_flag=""
13151 else
13152 aix_use_runtimelinking=no
13153
13154 # Test if we are trying to use run time linking or normal
13155 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
13156 # need to do runtime linking.
13157 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13158 for ld_flag in $LDFLAGS; do
13159 case $ld_flag in
13160 *-brtl*)
13161 aix_use_runtimelinking=yes
13162 break
13163 ;;
13164 esac
13165 done
13166 ;;
13167 esac
13168
13169 exp_sym_flag='-bexport'
13170 no_entry_flag='-bnoentry'
13171 fi
13172
13173 # When large executables or shared objects are built, AIX ld can
13174 # have problems creating the table of contents. If linking a library
13175 # or program results in "error TOC overflow" add -mminimal-toc to
13176 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
13177 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13178
13179 archive_cmds_CXX=''
13180 hardcode_direct_CXX=yes
13181 hardcode_direct_absolute_CXX=yes
13182 hardcode_libdir_separator_CXX=':'
13183 link_all_deplibs_CXX=yes
13184 file_list_spec_CXX='${wl}-f,'
13185
13186 if test "$GXX" = yes; then
13187 case $host_os in aix4.[012]|aix4.[012].*)
13188 # We only want to do this on AIX 4.2 and lower, the check
13189 # below for broken collect2 doesn't work under 4.3+
13190 collect2name=`${CC} -print-prog-name=collect2`
13191 if test -f "$collect2name" &&
13192 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13193 then
13194 # We have reworked collect2
13195 :
13196 else
13197 # We have old collect2
13198 hardcode_direct_CXX=unsupported
13199 # It fails to find uninstalled libraries when the uninstalled
13200 # path is not listed in the libpath. Setting hardcode_minus_L
13201 # to unsupported forces relinking
13202 hardcode_minus_L_CXX=yes
13203 hardcode_libdir_flag_spec_CXX='-L$libdir'
13204 hardcode_libdir_separator_CXX=
13205 fi
13206 esac
13207 shared_flag='-shared'
13208 if test "$aix_use_runtimelinking" = yes; then
13209 shared_flag="$shared_flag "'${wl}-G'
13210 fi
13211 else
13212 # not using gcc
13213 if test "$host_cpu" = ia64; then
13214 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13215 # chokes on -Wl,-G. The following line is correct:
13216 shared_flag='-G'
13217 else
13218 if test "$aix_use_runtimelinking" = yes; then
13219 shared_flag='${wl}-G'
13220 else
13221 shared_flag='${wl}-bM:SRE'
13222 fi
13223 fi
13224 fi
13225
13226 export_dynamic_flag_spec_CXX='${wl}-bexpall'
13227 # It seems that -bexpall does not export symbols beginning with
13228 # underscore (_), so it is better to generate a list of symbols to
13229 # export.
13230 always_export_symbols_CXX=yes
13231 if test "$aix_use_runtimelinking" = yes; then
13232 # Warning - without using the other runtime loading flags (-brtl),
13233 # -berok will link without error, but may produce a broken library.
13234 allow_undefined_flag_CXX='-berok'
13235 # Determine the default libpath from the value encoded in an empty
13236 # executable.
13237 if test "${lt_cv_aix_libpath+set}" = set; then
13238 aix_libpath=$lt_cv_aix_libpath
13239 else
13240 if ${lt_cv_aix_libpath__CXX+:} false; then :
13241 $as_echo_n "(cached) " >&6
13242 else
13243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13244 /* end confdefs.h. */
13245
13246 int
13247 main ()
13248 {
13249
13250 ;
13251 return 0;
13252 }
13253 _ACEOF
13254 if ac_fn_cxx_try_link "$LINENO"; then :
13255
13256 lt_aix_libpath_sed='
13257 /Import File Strings/,/^$/ {
13258 /^0/ {
13259 s/^0 *\([^ ]*\) *$/\1/
13260 p
13261 }
13262 }'
13263 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13264 # Check for a 64-bit object if we didn't find anything.
13265 if test -z "$lt_cv_aix_libpath__CXX"; then
13266 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13267 fi
13268 fi
13269 rm -f core conftest.err conftest.$ac_objext \
13270 conftest$ac_exeext conftest.$ac_ext
13271 if test -z "$lt_cv_aix_libpath__CXX"; then
13272 lt_cv_aix_libpath__CXX="/usr/lib:/lib"
13273 fi
13274
13275 fi
13276
13277 aix_libpath=$lt_cv_aix_libpath__CXX
13278 fi
13279
13280 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
13281
13282 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
13283 else
13284 if test "$host_cpu" = ia64; then
13285 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
13286 allow_undefined_flag_CXX="-z nodefs"
13287 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
13288 else
13289 # Determine the default libpath from the value encoded in an
13290 # empty executable.
13291 if test "${lt_cv_aix_libpath+set}" = set; then
13292 aix_libpath=$lt_cv_aix_libpath
13293 else
13294 if ${lt_cv_aix_libpath__CXX+:} false; then :
13295 $as_echo_n "(cached) " >&6
13296 else
13297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13298 /* end confdefs.h. */
13299
13300 int
13301 main ()
13302 {
13303
13304 ;
13305 return 0;
13306 }
13307 _ACEOF
13308 if ac_fn_cxx_try_link "$LINENO"; then :
13309
13310 lt_aix_libpath_sed='
13311 /Import File Strings/,/^$/ {
13312 /^0/ {
13313 s/^0 *\([^ ]*\) *$/\1/
13314 p
13315 }
13316 }'
13317 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13318 # Check for a 64-bit object if we didn't find anything.
13319 if test -z "$lt_cv_aix_libpath__CXX"; then
13320 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13321 fi
13322 fi
13323 rm -f core conftest.err conftest.$ac_objext \
13324 conftest$ac_exeext conftest.$ac_ext
13325 if test -z "$lt_cv_aix_libpath__CXX"; then
13326 lt_cv_aix_libpath__CXX="/usr/lib:/lib"
13327 fi
13328
13329 fi
13330
13331 aix_libpath=$lt_cv_aix_libpath__CXX
13332 fi
13333
13334 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
13335 # Warning - without using the other run time loading flags,
13336 # -berok will link without error, but may produce a broken library.
13337 no_undefined_flag_CXX=' ${wl}-bernotok'
13338 allow_undefined_flag_CXX=' ${wl}-berok'
13339 if test "$with_gnu_ld" = yes; then
13340 # We only use this code for GNU lds that support --whole-archive.
13341 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
13342 else
13343 # Exported symbols can be pulled into shared objects from archives
13344 whole_archive_flag_spec_CXX='$convenience'
13345 fi
13346 archive_cmds_need_lc_CXX=yes
13347 # This is similar to how AIX traditionally builds its shared
13348 # libraries.
13349 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
13350 fi
13351 fi
13352 ;;
13353
13354 beos*)
13355 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13356 allow_undefined_flag_CXX=unsupported
13357 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
13358 # support --undefined. This deserves some investigation. FIXME
13359 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13360 else
13361 ld_shlibs_CXX=no
13362 fi
13363 ;;
13364
13365 chorus*)
13366 case $cc_basename in
13367 *)
13368 # FIXME: insert proper C++ library support
13369 ld_shlibs_CXX=no
13370 ;;
13371 esac
13372 ;;
13373
13374 cygwin* | mingw* | pw32* | cegcc*)
13375 case $GXX,$cc_basename in
13376 ,cl* | no,cl*)
13377 # Native MSVC
13378 # hardcode_libdir_flag_spec is actually meaningless, as there is
13379 # no search path for DLLs.
13380 hardcode_libdir_flag_spec_CXX=' '
13381 allow_undefined_flag_CXX=unsupported
13382 always_export_symbols_CXX=yes
13383 file_list_spec_CXX='@'
13384 # Tell ltmain to make .lib files, not .a files.
13385 libext=lib
13386 # Tell ltmain to make .dll files, not .so files.
13387 shrext_cmds=".dll"
13388 # FIXME: Setting linknames here is a bad hack.
13389 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
13390 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
13391 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
13392 else
13393 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
13394 fi~
13395 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13396 linknames='
13397 # The linker will not automatically build a static lib if we build a DLL.
13398 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
13399 enable_shared_with_static_runtimes_CXX=yes
13400 # Don't use ranlib
13401 old_postinstall_cmds_CXX='chmod 644 $oldlib'
13402 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
13403 lt_tool_outputfile="@TOOL_OUTPUT@"~
13404 case $lt_outputfile in
13405 *.exe|*.EXE) ;;
13406 *)
13407 lt_outputfile="$lt_outputfile.exe"
13408 lt_tool_outputfile="$lt_tool_outputfile.exe"
13409 ;;
13410 esac~
13411 func_to_tool_file "$lt_outputfile"~
13412 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
13413 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13414 $RM "$lt_outputfile.manifest";
13415 fi'
13416 ;;
13417 *)
13418 # g++
13419 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
13420 # as there is no search path for DLLs.
13421 hardcode_libdir_flag_spec_CXX='-L$libdir'
13422 export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
13423 allow_undefined_flag_CXX=unsupported
13424 always_export_symbols_CXX=no
13425 enable_shared_with_static_runtimes_CXX=yes
13426
13427 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
13428 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13429 # If the export-symbols file already is a .def file (1st line
13430 # is EXPORTS), use it as is; otherwise, prepend...
13431 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
13432 cp $export_symbols $output_objdir/$soname.def;
13433 else
13434 echo EXPORTS > $output_objdir/$soname.def;
13435 cat $export_symbols >> $output_objdir/$soname.def;
13436 fi~
13437 $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'
13438 else
13439 ld_shlibs_CXX=no
13440 fi
13441 ;;
13442 esac
13443 ;;
13444 darwin* | rhapsody*)
13445
13446
13447 archive_cmds_need_lc_CXX=no
13448 hardcode_direct_CXX=no
13449 hardcode_automatic_CXX=yes
13450 hardcode_shlibpath_var_CXX=unsupported
13451 if test "$lt_cv_ld_force_load" = "yes"; then
13452 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
13453
13454 else
13455 whole_archive_flag_spec_CXX=''
13456 fi
13457 link_all_deplibs_CXX=yes
13458 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
13459 case $cc_basename in
13460 ifort*) _lt_dar_can_shared=yes ;;
13461 *) _lt_dar_can_shared=$GCC ;;
13462 esac
13463 if test "$_lt_dar_can_shared" = "yes"; then
13464 output_verbose_link_cmd=func_echo_all
13465 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
13466 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
13467 archive_expsym_cmds_CXX="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}"
13468 module_expsym_cmds_CXX="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}"
13469 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
13470 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
13471 archive_expsym_cmds_CXX="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}"
13472 fi
13473
13474 else
13475 ld_shlibs_CXX=no
13476 fi
13477
13478 ;;
13479
13480 dgux*)
13481 case $cc_basename in
13482 ec++*)
13483 # FIXME: insert proper C++ library support
13484 ld_shlibs_CXX=no
13485 ;;
13486 ghcx*)
13487 # Green Hills C++ Compiler
13488 # FIXME: insert proper C++ library support
13489 ld_shlibs_CXX=no
13490 ;;
13491 *)
13492 # FIXME: insert proper C++ library support
13493 ld_shlibs_CXX=no
13494 ;;
13495 esac
13496 ;;
13497
13498 freebsd2.*)
13499 # C++ shared libraries reported to be fairly broken before
13500 # switch to ELF
13501 ld_shlibs_CXX=no
13502 ;;
13503
13504 freebsd-elf*)
13505 archive_cmds_need_lc_CXX=no
13506 ;;
13507
13508 freebsd* | dragonfly*)
13509 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
13510 # conventions
13511 ld_shlibs_CXX=yes
13512 ;;
13513
13514 haiku*)
13515 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13516 link_all_deplibs_CXX=yes
13517 ;;
13518
13519 hpux9*)
13520 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
13521 hardcode_libdir_separator_CXX=:
13522 export_dynamic_flag_spec_CXX='${wl}-E'
13523 hardcode_direct_CXX=yes
13524 hardcode_minus_L_CXX=yes # Not in the search PATH,
13525 # but as the default
13526 # location of the library.
13527
13528 case $cc_basename in
13529 CC*)
13530 # FIXME: insert proper C++ library support
13531 ld_shlibs_CXX=no
13532 ;;
13533 aCC*)
13534 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
13535 # Commands to make compiler produce verbose output that lists
13536 # what "hidden" libraries, object files and flags are used when
13537 # linking a shared library.
13538 #
13539 # There doesn't appear to be a way to prevent this compiler from
13540 # explicitly linking system object files so we need to strip them
13541 # from the output so that they don't get included in the library
13542 # dependencies.
13543 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"'
13544 ;;
13545 *)
13546 if test "$GXX" = yes; then
13547 archive_cmds_CXX='$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'
13548 else
13549 # FIXME: insert proper C++ library support
13550 ld_shlibs_CXX=no
13551 fi
13552 ;;
13553 esac
13554 ;;
13555
13556 hpux10*|hpux11*)
13557 if test $with_gnu_ld = no; then
13558 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
13559 hardcode_libdir_separator_CXX=:
13560
13561 case $host_cpu in
13562 hppa*64*|ia64*)
13563 ;;
13564 *)
13565 export_dynamic_flag_spec_CXX='${wl}-E'
13566 ;;
13567 esac
13568 fi
13569 case $host_cpu in
13570 hppa*64*|ia64*)
13571 hardcode_direct_CXX=no
13572 hardcode_shlibpath_var_CXX=no
13573 ;;
13574 *)
13575 hardcode_direct_CXX=yes
13576 hardcode_direct_absolute_CXX=yes
13577 hardcode_minus_L_CXX=yes # Not in the search PATH,
13578 # but as the default
13579 # location of the library.
13580 ;;
13581 esac
13582
13583 case $cc_basename in
13584 CC*)
13585 # FIXME: insert proper C++ library support
13586 ld_shlibs_CXX=no
13587 ;;
13588 aCC*)
13589 case $host_cpu in
13590 hppa*64*)
13591 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13592 ;;
13593 ia64*)
13594 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13595 ;;
13596 *)
13597 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13598 ;;
13599 esac
13600 # Commands to make compiler produce verbose output that lists
13601 # what "hidden" libraries, object files and flags are used when
13602 # linking a shared library.
13603 #
13604 # There doesn't appear to be a way to prevent this compiler from
13605 # explicitly linking system object files so we need to strip them
13606 # from the output so that they don't get included in the library
13607 # dependencies.
13608 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"'
13609 ;;
13610 *)
13611 if test "$GXX" = yes; then
13612 if test $with_gnu_ld = no; then
13613 case $host_cpu in
13614 hppa*64*)
13615 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13616 ;;
13617 ia64*)
13618 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13619 ;;
13620 *)
13621 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13622 ;;
13623 esac
13624 fi
13625 else
13626 # FIXME: insert proper C++ library support
13627 ld_shlibs_CXX=no
13628 fi
13629 ;;
13630 esac
13631 ;;
13632
13633 interix[3-9]*)
13634 hardcode_direct_CXX=no
13635 hardcode_shlibpath_var_CXX=no
13636 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13637 export_dynamic_flag_spec_CXX='${wl}-E'
13638 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
13639 # Instead, shared libraries are loaded at an image base (0x10000000 by
13640 # default) and relocated if they conflict, which is a slow very memory
13641 # consuming and fragmenting process. To avoid this, we pick a random,
13642 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
13643 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
13644 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13645 archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13646 ;;
13647 irix5* | irix6*)
13648 case $cc_basename in
13649 CC*)
13650 # SGI C++
13651 archive_cmds_CXX='$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'
13652
13653 # Archives containing C++ object files must be created using
13654 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
13655 # necessary to make sure instantiated templates are included
13656 # in the archive.
13657 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
13658 ;;
13659 *)
13660 if test "$GXX" = yes; then
13661 if test "$with_gnu_ld" = no; then
13662 archive_cmds_CXX='$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'
13663 else
13664 archive_cmds_CXX='$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'
13665 fi
13666 fi
13667 link_all_deplibs_CXX=yes
13668 ;;
13669 esac
13670 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
13671 hardcode_libdir_separator_CXX=:
13672 inherit_rpath_CXX=yes
13673 ;;
13674
13675 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13676 case $cc_basename in
13677 KCC*)
13678 # Kuck and Associates, Inc. (KAI) C++ Compiler
13679
13680 # KCC will only create a shared library if the output file
13681 # ends with ".so" (or ".sl" for HP-UX), so rename the library
13682 # to its proper name (with version) after linking.
13683 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
13684 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
13685 # Commands to make compiler produce verbose output that lists
13686 # what "hidden" libraries, object files and flags are used when
13687 # linking a shared library.
13688 #
13689 # There doesn't appear to be a way to prevent this compiler from
13690 # explicitly linking system object files so we need to strip them
13691 # from the output so that they don't get included in the library
13692 # dependencies.
13693 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"'
13694
13695 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13696 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13697
13698 # Archives containing C++ object files must be created using
13699 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
13700 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
13701 ;;
13702 icpc* | ecpc* )
13703 # Intel C++
13704 with_gnu_ld=yes
13705 # version 8.0 and above of icpc choke on multiply defined symbols
13706 # if we add $predep_objects and $postdep_objects, however 7.1 and
13707 # earlier do not add the objects themselves.
13708 case `$CC -V 2>&1` in
13709 *"Version 7."*)
13710 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
13711 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13712 ;;
13713 *) # Version 8.0 or newer
13714 tmp_idyn=
13715 case $host_cpu in
13716 ia64*) tmp_idyn=' -i_dynamic';;
13717 esac
13718 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13719 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
13720 ;;
13721 esac
13722 archive_cmds_need_lc_CXX=no
13723 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13724 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13725 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
13726 ;;
13727 pgCC* | pgcpp*)
13728 # Portland Group C++ compiler
13729 case `$CC -V` in
13730 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
13731 prelink_cmds_CXX='tpldir=Template.dir~
13732 rm -rf $tpldir~
13733 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
13734 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
13735 old_archive_cmds_CXX='tpldir=Template.dir~
13736 rm -rf $tpldir~
13737 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
13738 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
13739 $RANLIB $oldlib'
13740 archive_cmds_CXX='tpldir=Template.dir~
13741 rm -rf $tpldir~
13742 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13743 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
13744 archive_expsym_cmds_CXX='tpldir=Template.dir~
13745 rm -rf $tpldir~
13746 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13747 $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'
13748 ;;
13749 *) # Version 6 and above use weak symbols
13750 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
13751 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
13752 ;;
13753 esac
13754
13755 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
13756 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13757 whole_archive_flag_spec_CXX='${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'
13758 ;;
13759 cxx*)
13760 # Compaq C++
13761 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
13762 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
13763
13764 runpath_var=LD_RUN_PATH
13765 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
13766 hardcode_libdir_separator_CXX=:
13767
13768 # Commands to make compiler produce verbose output that lists
13769 # what "hidden" libraries, object files and flags are used when
13770 # linking a shared library.
13771 #
13772 # There doesn't appear to be a way to prevent this compiler from
13773 # explicitly linking system object files so we need to strip them
13774 # from the output so that they don't get included in the library
13775 # dependencies.
13776 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'
13777 ;;
13778 xl* | mpixl* | bgxl*)
13779 # IBM XL 8.0 on PPC, with GNU ld
13780 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
13781 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
13782 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
13783 if test "x$supports_anon_versioning" = xyes; then
13784 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
13785 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13786 echo "local: *; };" >> $output_objdir/$libname.ver~
13787 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
13788 fi
13789 ;;
13790 *)
13791 case `$CC -V 2>&1 | sed 5q` in
13792 *Sun\ C*)
13793 # Sun C++ 5.9
13794 no_undefined_flag_CXX=' -zdefs'
13795 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13796 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
13797 hardcode_libdir_flag_spec_CXX='-R$libdir'
13798 whole_archive_flag_spec_CXX='${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'
13799 compiler_needs_object_CXX=yes
13800
13801 # Not sure whether something based on
13802 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
13803 # would be better.
13804 output_verbose_link_cmd='func_echo_all'
13805
13806 # Archives containing C++ object files must be created using
13807 # "CC -xar", where "CC" is the Sun C++ compiler. This is
13808 # necessary to make sure instantiated templates are included
13809 # in the archive.
13810 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
13811 ;;
13812 esac
13813 ;;
13814 esac
13815 ;;
13816
13817 lynxos*)
13818 # FIXME: insert proper C++ library support
13819 ld_shlibs_CXX=no
13820 ;;
13821
13822 m88k*)
13823 # FIXME: insert proper C++ library support
13824 ld_shlibs_CXX=no
13825 ;;
13826
13827 mvs*)
13828 case $cc_basename in
13829 cxx*)
13830 # FIXME: insert proper C++ library support
13831 ld_shlibs_CXX=no
13832 ;;
13833 *)
13834 # FIXME: insert proper C++ library support
13835 ld_shlibs_CXX=no
13836 ;;
13837 esac
13838 ;;
13839
13840 netbsd*)
13841 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13842 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
13843 wlarc=
13844 hardcode_libdir_flag_spec_CXX='-R$libdir'
13845 hardcode_direct_CXX=yes
13846 hardcode_shlibpath_var_CXX=no
13847 fi
13848 # Workaround some broken pre-1.5 toolchains
13849 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
13850 ;;
13851
13852 *nto* | *qnx*)
13853 ld_shlibs_CXX=yes
13854 ;;
13855
13856 openbsd2*)
13857 # C++ shared libraries are fairly broken
13858 ld_shlibs_CXX=no
13859 ;;
13860
13861 openbsd*)
13862 if test -f /usr/libexec/ld.so; then
13863 hardcode_direct_CXX=yes
13864 hardcode_shlibpath_var_CXX=no
13865 hardcode_direct_absolute_CXX=yes
13866 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
13867 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13868 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
13869 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
13870 export_dynamic_flag_spec_CXX='${wl}-E'
13871 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
13872 fi
13873 output_verbose_link_cmd=func_echo_all
13874 else
13875 ld_shlibs_CXX=no
13876 fi
13877 ;;
13878
13879 osf3* | osf4* | osf5*)
13880 case $cc_basename in
13881 KCC*)
13882 # Kuck and Associates, Inc. (KAI) C++ Compiler
13883
13884 # KCC will only create a shared library if the output file
13885 # ends with ".so" (or ".sl" for HP-UX), so rename the library
13886 # to its proper name (with version) after linking.
13887 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
13888
13889 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
13890 hardcode_libdir_separator_CXX=:
13891
13892 # Archives containing C++ object files must be created using
13893 # the KAI C++ compiler.
13894 case $host in
13895 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
13896 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
13897 esac
13898 ;;
13899 RCC*)
13900 # Rational C++ 2.4.1
13901 # FIXME: insert proper C++ library support
13902 ld_shlibs_CXX=no
13903 ;;
13904 cxx*)
13905 case $host in
13906 osf3*)
13907 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
13908 archive_cmds_CXX='$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'
13909 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
13910 ;;
13911 *)
13912 allow_undefined_flag_CXX=' -expect_unresolved \*'
13913 archive_cmds_CXX='$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'
13914 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
13915 echo "-hidden">> $lib.exp~
13916 $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~
13917 $RM $lib.exp'
13918 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
13919 ;;
13920 esac
13921
13922 hardcode_libdir_separator_CXX=:
13923
13924 # Commands to make compiler produce verbose output that lists
13925 # what "hidden" libraries, object files and flags are used when
13926 # linking a shared library.
13927 #
13928 # There doesn't appear to be a way to prevent this compiler from
13929 # explicitly linking system object files so we need to strip them
13930 # from the output so that they don't get included in the library
13931 # dependencies.
13932 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"'
13933 ;;
13934 *)
13935 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
13936 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
13937 case $host in
13938 osf3*)
13939 archive_cmds_CXX='$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'
13940 ;;
13941 *)
13942 archive_cmds_CXX='$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'
13943 ;;
13944 esac
13945
13946 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
13947 hardcode_libdir_separator_CXX=:
13948
13949 # Commands to make compiler produce verbose output that lists
13950 # what "hidden" libraries, object files and flags are used when
13951 # linking a shared library.
13952 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
13953
13954 else
13955 # FIXME: insert proper C++ library support
13956 ld_shlibs_CXX=no
13957 fi
13958 ;;
13959 esac
13960 ;;
13961
13962 psos*)
13963 # FIXME: insert proper C++ library support
13964 ld_shlibs_CXX=no
13965 ;;
13966
13967 sunos4*)
13968 case $cc_basename in
13969 CC*)
13970 # Sun C++ 4.x
13971 # FIXME: insert proper C++ library support
13972 ld_shlibs_CXX=no
13973 ;;
13974 lcc*)
13975 # Lucid
13976 # FIXME: insert proper C++ library support
13977 ld_shlibs_CXX=no
13978 ;;
13979 *)
13980 # FIXME: insert proper C++ library support
13981 ld_shlibs_CXX=no
13982 ;;
13983 esac
13984 ;;
13985
13986 solaris*)
13987 case $cc_basename in
13988 CC* | sunCC*)
13989 # Sun C++ 4.2, 5.x and Centerline C++
13990 archive_cmds_need_lc_CXX=yes
13991 no_undefined_flag_CXX=' -zdefs'
13992 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13993 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
13994 $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'
13995
13996 hardcode_libdir_flag_spec_CXX='-R$libdir'
13997 hardcode_shlibpath_var_CXX=no
13998 case $host_os in
13999 solaris2.[0-5] | solaris2.[0-5].*) ;;
14000 *)
14001 # The compiler driver will combine and reorder linker options,
14002 # but understands `-z linker_flag'.
14003 # Supported since Solaris 2.6 (maybe 2.5.1?)
14004 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
14005 ;;
14006 esac
14007 link_all_deplibs_CXX=yes
14008
14009 output_verbose_link_cmd='func_echo_all'
14010
14011 # Archives containing C++ object files must be created using
14012 # "CC -xar", where "CC" is the Sun C++ compiler. This is
14013 # necessary to make sure instantiated templates are included
14014 # in the archive.
14015 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
14016 ;;
14017 gcx*)
14018 # Green Hills C++ Compiler
14019 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
14020
14021 # The C++ compiler must be used to create the archive.
14022 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
14023 ;;
14024 *)
14025 # GNU C++ compiler with Solaris linker
14026 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
14027 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
14028 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
14029 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
14030 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14031 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14032
14033 # Commands to make compiler produce verbose output that lists
14034 # what "hidden" libraries, object files and flags are used when
14035 # linking a shared library.
14036 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
14037 else
14038 # g++ 2.7 appears to require `-G' NOT `-shared' on this
14039 # platform.
14040 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
14041 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14042 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14043
14044 # Commands to make compiler produce verbose output that lists
14045 # what "hidden" libraries, object files and flags are used when
14046 # linking a shared library.
14047 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
14048 fi
14049
14050 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
14051 case $host_os in
14052 solaris2.[0-5] | solaris2.[0-5].*) ;;
14053 *)
14054 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
14055 ;;
14056 esac
14057 fi
14058 ;;
14059 esac
14060 ;;
14061
14062 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
14063 no_undefined_flag_CXX='${wl}-z,text'
14064 archive_cmds_need_lc_CXX=no
14065 hardcode_shlibpath_var_CXX=no
14066 runpath_var='LD_RUN_PATH'
14067
14068 case $cc_basename in
14069 CC*)
14070 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14071 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14072 ;;
14073 *)
14074 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14075 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14076 ;;
14077 esac
14078 ;;
14079
14080 sysv5* | sco3.2v5* | sco5v6*)
14081 # Note: We can NOT use -z defs as we might desire, because we do not
14082 # link with -lc, and that would cause any symbols used from libc to
14083 # always be unresolved, which means just about no library would
14084 # ever link correctly. If we're not using GNU ld we use -z text
14085 # though, which does catch some bad symbols but isn't as heavy-handed
14086 # as -z defs.
14087 no_undefined_flag_CXX='${wl}-z,text'
14088 allow_undefined_flag_CXX='${wl}-z,nodefs'
14089 archive_cmds_need_lc_CXX=no
14090 hardcode_shlibpath_var_CXX=no
14091 hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
14092 hardcode_libdir_separator_CXX=':'
14093 link_all_deplibs_CXX=yes
14094 export_dynamic_flag_spec_CXX='${wl}-Bexport'
14095 runpath_var='LD_RUN_PATH'
14096
14097 case $cc_basename in
14098 CC*)
14099 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14100 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14101 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
14102 '"$old_archive_cmds_CXX"
14103 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
14104 '"$reload_cmds_CXX"
14105 ;;
14106 *)
14107 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14108 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14109 ;;
14110 esac
14111 ;;
14112
14113 tandem*)
14114 case $cc_basename in
14115 NCC*)
14116 # NonStop-UX NCC 3.20
14117 # FIXME: insert proper C++ library support
14118 ld_shlibs_CXX=no
14119 ;;
14120 *)
14121 # FIXME: insert proper C++ library support
14122 ld_shlibs_CXX=no
14123 ;;
14124 esac
14125 ;;
14126
14127 vxworks*)
14128 # FIXME: insert proper C++ library support
14129 ld_shlibs_CXX=no
14130 ;;
14131
14132 *)
14133 # FIXME: insert proper C++ library support
14134 ld_shlibs_CXX=no
14135 ;;
14136 esac
14137
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
14139 $as_echo "$ld_shlibs_CXX" >&6; }
14140 test "$ld_shlibs_CXX" = no && can_build_shared=no
14141
14142 GCC_CXX="$GXX"
14143 LD_CXX="$LD"
14144
14145 ## CAVEAT EMPTOR:
14146 ## There is no encapsulation within the following macros, do not change
14147 ## the running order or otherwise move them around unless you know exactly
14148 ## what you are doing...
14149 # Dependencies to place before and after the object being linked:
14150 predep_objects_CXX=
14151 postdep_objects_CXX=
14152 predeps_CXX=
14153 postdeps_CXX=
14154 compiler_lib_search_path_CXX=
14155
14156 cat > conftest.$ac_ext <<_LT_EOF
14157 class Foo
14158 {
14159 public:
14160 Foo (void) { a = 0; }
14161 private:
14162 int a;
14163 };
14164 _LT_EOF
14165
14166
14167 _lt_libdeps_save_CFLAGS=$CFLAGS
14168 case "$CC $CFLAGS " in #(
14169 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
14170 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
14171 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
14172 esac
14173
14174 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14175 (eval $ac_compile) 2>&5
14176 ac_status=$?
14177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14178 test $ac_status = 0; }; then
14179 # Parse the compiler output and extract the necessary
14180 # objects, libraries and library flags.
14181
14182 # Sentinel used to keep track of whether or not we are before
14183 # the conftest object file.
14184 pre_test_object_deps_done=no
14185
14186 for p in `eval "$output_verbose_link_cmd"`; do
14187 case ${prev}${p} in
14188
14189 -L* | -R* | -l*)
14190 # Some compilers place space between "-{L,R}" and the path.
14191 # Remove the space.
14192 if test $p = "-L" ||
14193 test $p = "-R"; then
14194 prev=$p
14195 continue
14196 fi
14197
14198 # Expand the sysroot to ease extracting the directories later.
14199 if test -z "$prev"; then
14200 case $p in
14201 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
14202 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
14203 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
14204 esac
14205 fi
14206 case $p in
14207 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
14208 esac
14209 if test "$pre_test_object_deps_done" = no; then
14210 case ${prev} in
14211 -L | -R)
14212 # Internal compiler library paths should come after those
14213 # provided the user. The postdeps already come after the
14214 # user supplied libs so there is no need to process them.
14215 if test -z "$compiler_lib_search_path_CXX"; then
14216 compiler_lib_search_path_CXX="${prev}${p}"
14217 else
14218 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
14219 fi
14220 ;;
14221 # The "-l" case would never come before the object being
14222 # linked, so don't bother handling this case.
14223 esac
14224 else
14225 if test -z "$postdeps_CXX"; then
14226 postdeps_CXX="${prev}${p}"
14227 else
14228 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
14229 fi
14230 fi
14231 prev=
14232 ;;
14233
14234 *.lto.$objext) ;; # Ignore GCC LTO objects
14235 *.$objext)
14236 # This assumes that the test object file only shows up
14237 # once in the compiler output.
14238 if test "$p" = "conftest.$objext"; then
14239 pre_test_object_deps_done=yes
14240 continue
14241 fi
14242
14243 if test "$pre_test_object_deps_done" = no; then
14244 if test -z "$predep_objects_CXX"; then
14245 predep_objects_CXX="$p"
14246 else
14247 predep_objects_CXX="$predep_objects_CXX $p"
14248 fi
14249 else
14250 if test -z "$postdep_objects_CXX"; then
14251 postdep_objects_CXX="$p"
14252 else
14253 postdep_objects_CXX="$postdep_objects_CXX $p"
14254 fi
14255 fi
14256 ;;
14257
14258 *) ;; # Ignore the rest.
14259
14260 esac
14261 done
14262
14263 # Clean up.
14264 rm -f a.out a.exe
14265 else
14266 echo "libtool.m4: error: problem compiling CXX test program"
14267 fi
14268
14269 $RM -f confest.$objext
14270 CFLAGS=$_lt_libdeps_save_CFLAGS
14271
14272 # PORTME: override above test on systems where it is broken
14273 case $host_os in
14274 interix[3-9]*)
14275 # Interix 3.5 installs completely hosed .la files for C++, so rather than
14276 # hack all around it, let's just trust "g++" to DTRT.
14277 predep_objects_CXX=
14278 postdep_objects_CXX=
14279 postdeps_CXX=
14280 ;;
14281
14282 linux*)
14283 case `$CC -V 2>&1 | sed 5q` in
14284 *Sun\ C*)
14285 # Sun C++ 5.9
14286
14287 # The more standards-conforming stlport4 library is
14288 # incompatible with the Cstd library. Avoid specifying
14289 # it if it's in CXXFLAGS. Ignore libCrun as
14290 # -library=stlport4 depends on it.
14291 case " $CXX $CXXFLAGS " in
14292 *" -library=stlport4 "*)
14293 solaris_use_stlport4=yes
14294 ;;
14295 esac
14296
14297 if test "$solaris_use_stlport4" != yes; then
14298 postdeps_CXX='-library=Cstd -library=Crun'
14299 fi
14300 ;;
14301 esac
14302 ;;
14303
14304 solaris*)
14305 case $cc_basename in
14306 CC* | sunCC*)
14307 # The more standards-conforming stlport4 library is
14308 # incompatible with the Cstd library. Avoid specifying
14309 # it if it's in CXXFLAGS. Ignore libCrun as
14310 # -library=stlport4 depends on it.
14311 case " $CXX $CXXFLAGS " in
14312 *" -library=stlport4 "*)
14313 solaris_use_stlport4=yes
14314 ;;
14315 esac
14316
14317 # Adding this requires a known-good setup of shared libraries for
14318 # Sun compiler versions before 5.6, else PIC objects from an old
14319 # archive will be linked into the output, leading to subtle bugs.
14320 if test "$solaris_use_stlport4" != yes; then
14321 postdeps_CXX='-library=Cstd -library=Crun'
14322 fi
14323 ;;
14324 esac
14325 ;;
14326 esac
14327
14328
14329 case " $postdeps_CXX " in
14330 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
14331 esac
14332 compiler_lib_search_dirs_CXX=
14333 if test -n "${compiler_lib_search_path_CXX}"; then
14334 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
14335 fi
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367 lt_prog_compiler_wl_CXX=
14368 lt_prog_compiler_pic_CXX=
14369 lt_prog_compiler_static_CXX=
14370
14371
14372 # C++ specific cases for pic, static, wl, etc.
14373 if test "$GXX" = yes; then
14374 lt_prog_compiler_wl_CXX='-Wl,'
14375 lt_prog_compiler_static_CXX='-static'
14376
14377 case $host_os in
14378 aix*)
14379 # All AIX code is PIC.
14380 if test "$host_cpu" = ia64; then
14381 # AIX 5 now supports IA64 processor
14382 lt_prog_compiler_static_CXX='-Bstatic'
14383 fi
14384 ;;
14385
14386 amigaos*)
14387 case $host_cpu in
14388 powerpc)
14389 # see comment about AmigaOS4 .so support
14390 lt_prog_compiler_pic_CXX='-fPIC'
14391 ;;
14392 m68k)
14393 # FIXME: we need at least 68020 code to build shared libraries, but
14394 # adding the `-m68020' flag to GCC prevents building anything better,
14395 # like `-m68040'.
14396 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
14397 ;;
14398 esac
14399 ;;
14400
14401 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14402 # PIC is the default for these OSes.
14403 ;;
14404 mingw* | cygwin* | os2* | pw32* | cegcc*)
14405 # This hack is so that the source file can tell whether it is being
14406 # built for inclusion in a dll (and should export symbols for example).
14407 # Although the cygwin gcc ignores -fPIC, still need this for old-style
14408 # (--disable-auto-import) libraries
14409 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
14410 ;;
14411 darwin* | rhapsody*)
14412 # PIC is the default on this platform
14413 # Common symbols not allowed in MH_DYLIB files
14414 lt_prog_compiler_pic_CXX='-fno-common'
14415 ;;
14416 *djgpp*)
14417 # DJGPP does not support shared libraries at all
14418 lt_prog_compiler_pic_CXX=
14419 ;;
14420 haiku*)
14421 # PIC is the default for Haiku.
14422 # The "-static" flag exists, but is broken.
14423 lt_prog_compiler_static_CXX=
14424 ;;
14425 interix[3-9]*)
14426 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14427 # Instead, we relocate shared libraries at runtime.
14428 ;;
14429 sysv4*MP*)
14430 if test -d /usr/nec; then
14431 lt_prog_compiler_pic_CXX=-Kconform_pic
14432 fi
14433 ;;
14434 hpux*)
14435 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
14436 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
14437 # sets the default TLS model and affects inlining.
14438 case $host_cpu in
14439 hppa*64*)
14440 ;;
14441 *)
14442 lt_prog_compiler_pic_CXX='-fPIC'
14443 ;;
14444 esac
14445 ;;
14446 *qnx* | *nto*)
14447 # QNX uses GNU C++, but need to define -shared option too, otherwise
14448 # it will coredump.
14449 lt_prog_compiler_pic_CXX='-fPIC -shared'
14450 ;;
14451 *)
14452 lt_prog_compiler_pic_CXX='-fPIC'
14453 ;;
14454 esac
14455 else
14456 case $host_os in
14457 aix[4-9]*)
14458 # All AIX code is PIC.
14459 if test "$host_cpu" = ia64; then
14460 # AIX 5 now supports IA64 processor
14461 lt_prog_compiler_static_CXX='-Bstatic'
14462 else
14463 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
14464 fi
14465 ;;
14466 chorus*)
14467 case $cc_basename in
14468 cxch68*)
14469 # Green Hills C++ Compiler
14470 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
14471 ;;
14472 esac
14473 ;;
14474 mingw* | cygwin* | os2* | pw32* | cegcc*)
14475 # This hack is so that the source file can tell whether it is being
14476 # built for inclusion in a dll (and should export symbols for example).
14477 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
14478 ;;
14479 dgux*)
14480 case $cc_basename in
14481 ec++*)
14482 lt_prog_compiler_pic_CXX='-KPIC'
14483 ;;
14484 ghcx*)
14485 # Green Hills C++ Compiler
14486 lt_prog_compiler_pic_CXX='-pic'
14487 ;;
14488 *)
14489 ;;
14490 esac
14491 ;;
14492 freebsd* | dragonfly*)
14493 # FreeBSD uses GNU C++
14494 ;;
14495 hpux9* | hpux10* | hpux11*)
14496 case $cc_basename in
14497 CC*)
14498 lt_prog_compiler_wl_CXX='-Wl,'
14499 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
14500 if test "$host_cpu" != ia64; then
14501 lt_prog_compiler_pic_CXX='+Z'
14502 fi
14503 ;;
14504 aCC*)
14505 lt_prog_compiler_wl_CXX='-Wl,'
14506 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
14507 case $host_cpu in
14508 hppa*64*|ia64*)
14509 # +Z the default
14510 ;;
14511 *)
14512 lt_prog_compiler_pic_CXX='+Z'
14513 ;;
14514 esac
14515 ;;
14516 *)
14517 ;;
14518 esac
14519 ;;
14520 interix*)
14521 # This is c89, which is MS Visual C++ (no shared libs)
14522 # Anyone wants to do a port?
14523 ;;
14524 irix5* | irix6* | nonstopux*)
14525 case $cc_basename in
14526 CC*)
14527 lt_prog_compiler_wl_CXX='-Wl,'
14528 lt_prog_compiler_static_CXX='-non_shared'
14529 # CC pic flag -KPIC is the default.
14530 ;;
14531 *)
14532 ;;
14533 esac
14534 ;;
14535 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14536 case $cc_basename in
14537 KCC*)
14538 # KAI C++ Compiler
14539 lt_prog_compiler_wl_CXX='--backend -Wl,'
14540 lt_prog_compiler_pic_CXX='-fPIC'
14541 ;;
14542 ecpc* )
14543 # old Intel C++ for x86_64 which still supported -KPIC.
14544 lt_prog_compiler_wl_CXX='-Wl,'
14545 lt_prog_compiler_pic_CXX='-KPIC'
14546 lt_prog_compiler_static_CXX='-static'
14547 ;;
14548 icpc* )
14549 # Intel C++, used to be incompatible with GCC.
14550 # ICC 10 doesn't accept -KPIC any more.
14551 lt_prog_compiler_wl_CXX='-Wl,'
14552 lt_prog_compiler_pic_CXX='-fPIC'
14553 lt_prog_compiler_static_CXX='-static'
14554 ;;
14555 pgCC* | pgcpp*)
14556 # Portland Group C++ compiler
14557 lt_prog_compiler_wl_CXX='-Wl,'
14558 lt_prog_compiler_pic_CXX='-fpic'
14559 lt_prog_compiler_static_CXX='-Bstatic'
14560 ;;
14561 cxx*)
14562 # Compaq C++
14563 # Make sure the PIC flag is empty. It appears that all Alpha
14564 # Linux and Compaq Tru64 Unix objects are PIC.
14565 lt_prog_compiler_pic_CXX=
14566 lt_prog_compiler_static_CXX='-non_shared'
14567 ;;
14568 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
14569 # IBM XL 8.0, 9.0 on PPC and BlueGene
14570 lt_prog_compiler_wl_CXX='-Wl,'
14571 lt_prog_compiler_pic_CXX='-qpic'
14572 lt_prog_compiler_static_CXX='-qstaticlink'
14573 ;;
14574 *)
14575 case `$CC -V 2>&1 | sed 5q` in
14576 *Sun\ C*)
14577 # Sun C++ 5.9
14578 lt_prog_compiler_pic_CXX='-KPIC'
14579 lt_prog_compiler_static_CXX='-Bstatic'
14580 lt_prog_compiler_wl_CXX='-Qoption ld '
14581 ;;
14582 esac
14583 ;;
14584 esac
14585 ;;
14586 lynxos*)
14587 ;;
14588 m88k*)
14589 ;;
14590 mvs*)
14591 case $cc_basename in
14592 cxx*)
14593 lt_prog_compiler_pic_CXX='-W c,exportall'
14594 ;;
14595 *)
14596 ;;
14597 esac
14598 ;;
14599 netbsd* | netbsdelf*-gnu)
14600 ;;
14601 *qnx* | *nto*)
14602 # QNX uses GNU C++, but need to define -shared option too, otherwise
14603 # it will coredump.
14604 lt_prog_compiler_pic_CXX='-fPIC -shared'
14605 ;;
14606 osf3* | osf4* | osf5*)
14607 case $cc_basename in
14608 KCC*)
14609 lt_prog_compiler_wl_CXX='--backend -Wl,'
14610 ;;
14611 RCC*)
14612 # Rational C++ 2.4.1
14613 lt_prog_compiler_pic_CXX='-pic'
14614 ;;
14615 cxx*)
14616 # Digital/Compaq C++
14617 lt_prog_compiler_wl_CXX='-Wl,'
14618 # Make sure the PIC flag is empty. It appears that all Alpha
14619 # Linux and Compaq Tru64 Unix objects are PIC.
14620 lt_prog_compiler_pic_CXX=
14621 lt_prog_compiler_static_CXX='-non_shared'
14622 ;;
14623 *)
14624 ;;
14625 esac
14626 ;;
14627 psos*)
14628 ;;
14629 solaris*)
14630 case $cc_basename in
14631 CC* | sunCC*)
14632 # Sun C++ 4.2, 5.x and Centerline C++
14633 lt_prog_compiler_pic_CXX='-KPIC'
14634 lt_prog_compiler_static_CXX='-Bstatic'
14635 lt_prog_compiler_wl_CXX='-Qoption ld '
14636 ;;
14637 gcx*)
14638 # Green Hills C++ Compiler
14639 lt_prog_compiler_pic_CXX='-PIC'
14640 ;;
14641 *)
14642 ;;
14643 esac
14644 ;;
14645 sunos4*)
14646 case $cc_basename in
14647 CC*)
14648 # Sun C++ 4.x
14649 lt_prog_compiler_pic_CXX='-pic'
14650 lt_prog_compiler_static_CXX='-Bstatic'
14651 ;;
14652 lcc*)
14653 # Lucid
14654 lt_prog_compiler_pic_CXX='-pic'
14655 ;;
14656 *)
14657 ;;
14658 esac
14659 ;;
14660 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14661 case $cc_basename in
14662 CC*)
14663 lt_prog_compiler_wl_CXX='-Wl,'
14664 lt_prog_compiler_pic_CXX='-KPIC'
14665 lt_prog_compiler_static_CXX='-Bstatic'
14666 ;;
14667 esac
14668 ;;
14669 tandem*)
14670 case $cc_basename in
14671 NCC*)
14672 # NonStop-UX NCC 3.20
14673 lt_prog_compiler_pic_CXX='-KPIC'
14674 ;;
14675 *)
14676 ;;
14677 esac
14678 ;;
14679 vxworks*)
14680 ;;
14681 *)
14682 lt_prog_compiler_can_build_shared_CXX=no
14683 ;;
14684 esac
14685 fi
14686
14687 case $host_os in
14688 # For platforms which do not support PIC, -DPIC is meaningless:
14689 *djgpp*)
14690 lt_prog_compiler_pic_CXX=
14691 ;;
14692 *)
14693 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
14694 ;;
14695 esac
14696
14697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
14698 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
14699 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
14700 $as_echo_n "(cached) " >&6
14701 else
14702 lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
14703 fi
14704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
14705 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
14706 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
14707
14708 #
14709 # Check to make sure the PIC flag actually works.
14710 #
14711 if test -n "$lt_prog_compiler_pic_CXX"; then
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
14713 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
14714 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
14715 $as_echo_n "(cached) " >&6
14716 else
14717 lt_cv_prog_compiler_pic_works_CXX=no
14718 ac_outfile=conftest.$ac_objext
14719 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14720 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
14721 # Insert the option either (1) after the last *FLAGS variable, or
14722 # (2) before a word containing "conftest.", or (3) at the end.
14723 # Note that $ac_compile itself does not contain backslashes and begins
14724 # with a dollar sign (not a hyphen), so the echo should work correctly.
14725 # The option is referenced via a variable to avoid confusing sed.
14726 lt_compile=`echo "$ac_compile" | $SED \
14727 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14728 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14729 -e 's:$: $lt_compiler_flag:'`
14730 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14731 (eval "$lt_compile" 2>conftest.err)
14732 ac_status=$?
14733 cat conftest.err >&5
14734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735 if (exit $ac_status) && test -s "$ac_outfile"; then
14736 # The compiler can only warn and ignore the option if not recognized
14737 # So say no if there are warnings other than the usual output.
14738 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
14739 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14740 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14741 lt_cv_prog_compiler_pic_works_CXX=yes
14742 fi
14743 fi
14744 $RM conftest*
14745
14746 fi
14747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
14748 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
14749
14750 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
14751 case $lt_prog_compiler_pic_CXX in
14752 "" | " "*) ;;
14753 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
14754 esac
14755 else
14756 lt_prog_compiler_pic_CXX=
14757 lt_prog_compiler_can_build_shared_CXX=no
14758 fi
14759
14760 fi
14761
14762
14763
14764
14765
14766 #
14767 # Check to make sure the static flag actually works.
14768 #
14769 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14771 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
14772 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
14773 $as_echo_n "(cached) " >&6
14774 else
14775 lt_cv_prog_compiler_static_works_CXX=no
14776 save_LDFLAGS="$LDFLAGS"
14777 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14778 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14779 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14780 # The linker can only warn and ignore the option if not recognized
14781 # So say no if there are warnings
14782 if test -s conftest.err; then
14783 # Append any errors to the config.log.
14784 cat conftest.err 1>&5
14785 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
14786 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14787 if diff conftest.exp conftest.er2 >/dev/null; then
14788 lt_cv_prog_compiler_static_works_CXX=yes
14789 fi
14790 else
14791 lt_cv_prog_compiler_static_works_CXX=yes
14792 fi
14793 fi
14794 $RM -r conftest*
14795 LDFLAGS="$save_LDFLAGS"
14796
14797 fi
14798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
14799 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
14800
14801 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
14802 :
14803 else
14804 lt_prog_compiler_static_CXX=
14805 fi
14806
14807
14808
14809
14810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14811 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14812 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
14813 $as_echo_n "(cached) " >&6
14814 else
14815 lt_cv_prog_compiler_c_o_CXX=no
14816 $RM -r conftest 2>/dev/null
14817 mkdir conftest
14818 cd conftest
14819 mkdir out
14820 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14821
14822 lt_compiler_flag="-o out/conftest2.$ac_objext"
14823 # Insert the option either (1) after the last *FLAGS variable, or
14824 # (2) before a word containing "conftest.", or (3) at the end.
14825 # Note that $ac_compile itself does not contain backslashes and begins
14826 # with a dollar sign (not a hyphen), so the echo should work correctly.
14827 lt_compile=`echo "$ac_compile" | $SED \
14828 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14829 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14830 -e 's:$: $lt_compiler_flag:'`
14831 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14832 (eval "$lt_compile" 2>out/conftest.err)
14833 ac_status=$?
14834 cat out/conftest.err >&5
14835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14836 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14837 then
14838 # The compiler can only warn and ignore the option if not recognized
14839 # So say no if there are warnings
14840 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
14841 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14842 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14843 lt_cv_prog_compiler_c_o_CXX=yes
14844 fi
14845 fi
14846 chmod u+w . 2>&5
14847 $RM conftest*
14848 # SGI C++ compiler will create directory out/ii_files/ for
14849 # template instantiation
14850 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14851 $RM out/* && rmdir out
14852 cd ..
14853 $RM -r conftest
14854 $RM conftest*
14855
14856 fi
14857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
14858 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
14859
14860
14861
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14863 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14864 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
14865 $as_echo_n "(cached) " >&6
14866 else
14867 lt_cv_prog_compiler_c_o_CXX=no
14868 $RM -r conftest 2>/dev/null
14869 mkdir conftest
14870 cd conftest
14871 mkdir out
14872 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14873
14874 lt_compiler_flag="-o out/conftest2.$ac_objext"
14875 # Insert the option either (1) after the last *FLAGS variable, or
14876 # (2) before a word containing "conftest.", or (3) at the end.
14877 # Note that $ac_compile itself does not contain backslashes and begins
14878 # with a dollar sign (not a hyphen), so the echo should work correctly.
14879 lt_compile=`echo "$ac_compile" | $SED \
14880 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14881 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14882 -e 's:$: $lt_compiler_flag:'`
14883 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14884 (eval "$lt_compile" 2>out/conftest.err)
14885 ac_status=$?
14886 cat out/conftest.err >&5
14887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14888 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14889 then
14890 # The compiler can only warn and ignore the option if not recognized
14891 # So say no if there are warnings
14892 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
14893 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14894 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14895 lt_cv_prog_compiler_c_o_CXX=yes
14896 fi
14897 fi
14898 chmod u+w . 2>&5
14899 $RM conftest*
14900 # SGI C++ compiler will create directory out/ii_files/ for
14901 # template instantiation
14902 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14903 $RM out/* && rmdir out
14904 cd ..
14905 $RM -r conftest
14906 $RM conftest*
14907
14908 fi
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
14910 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
14911
14912
14913
14914
14915 hard_links="nottested"
14916 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
14917 # do not overwrite the value of need_locks provided by the user
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
14919 $as_echo_n "checking if we can lock with hard links... " >&6; }
14920 hard_links=yes
14921 $RM conftest*
14922 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14923 touch conftest.a
14924 ln conftest.a conftest.b 2>&5 || hard_links=no
14925 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
14927 $as_echo "$hard_links" >&6; }
14928 if test "$hard_links" = no; then
14929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14930 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
14931 need_locks=warn
14932 fi
14933 else
14934 need_locks=no
14935 fi
14936
14937
14938
14939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14940 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
14941
14942 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14943 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
14944 case $host_os in
14945 aix[4-9]*)
14946 # If we're using GNU nm, then we don't want the "-C" option.
14947 # -C means demangle to AIX nm, but means don't demangle with GNU nm
14948 # Also, AIX nm treats weak defined symbols like other global defined
14949 # symbols, whereas GNU nm marks them as "W".
14950 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
14951 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
14952 else
14953 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
14954 fi
14955 ;;
14956 pw32*)
14957 export_symbols_cmds_CXX="$ltdll_cmds"
14958 ;;
14959 cygwin* | mingw* | cegcc*)
14960 case $cc_basename in
14961 cl*)
14962 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
14963 ;;
14964 *)
14965 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
14966 exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
14967 ;;
14968 esac
14969 ;;
14970 linux* | k*bsd*-gnu | gnu*)
14971 link_all_deplibs_CXX=no
14972 ;;
14973 *)
14974 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14975 ;;
14976 esac
14977
14978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
14979 $as_echo "$ld_shlibs_CXX" >&6; }
14980 test "$ld_shlibs_CXX" = no && can_build_shared=no
14981
14982 with_gnu_ld_CXX=$with_gnu_ld
14983
14984
14985
14986
14987
14988
14989 #
14990 # Do we need to explicitly link libc?
14991 #
14992 case "x$archive_cmds_need_lc_CXX" in
14993 x|xyes)
14994 # Assume -lc should be added
14995 archive_cmds_need_lc_CXX=yes
14996
14997 if test "$enable_shared" = yes && test "$GCC" = yes; then
14998 case $archive_cmds_CXX in
14999 *'~'*)
15000 # FIXME: we may have to deal with multi-command sequences.
15001 ;;
15002 '$CC '*)
15003 # Test whether the compiler implicitly links with -lc since on some
15004 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15005 # to ld, don't add -lc before -lgcc.
15006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
15007 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
15008 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
15009 $as_echo_n "(cached) " >&6
15010 else
15011 $RM conftest*
15012 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15013
15014 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15015 (eval $ac_compile) 2>&5
15016 ac_status=$?
15017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15018 test $ac_status = 0; } 2>conftest.err; then
15019 soname=conftest
15020 lib=conftest
15021 libobjs=conftest.$ac_objext
15022 deplibs=
15023 wl=$lt_prog_compiler_wl_CXX
15024 pic_flag=$lt_prog_compiler_pic_CXX
15025 compiler_flags=-v
15026 linker_flags=-v
15027 verstring=
15028 output_objdir=.
15029 libname=conftest
15030 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
15031 allow_undefined_flag_CXX=
15032 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
15033 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
15034 ac_status=$?
15035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15036 test $ac_status = 0; }
15037 then
15038 lt_cv_archive_cmds_need_lc_CXX=no
15039 else
15040 lt_cv_archive_cmds_need_lc_CXX=yes
15041 fi
15042 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
15043 else
15044 cat conftest.err 1>&5
15045 fi
15046 $RM conftest*
15047
15048 fi
15049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
15050 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
15051 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
15052 ;;
15053 esac
15054 fi
15055 ;;
15056 esac
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
15120 $as_echo_n "checking dynamic linker characteristics... " >&6; }
15121
15122 library_names_spec=
15123 libname_spec='lib$name'
15124 soname_spec=
15125 shrext_cmds=".so"
15126 postinstall_cmds=
15127 postuninstall_cmds=
15128 finish_cmds=
15129 finish_eval=
15130 shlibpath_var=
15131 shlibpath_overrides_runpath=unknown
15132 version_type=none
15133 dynamic_linker="$host_os ld.so"
15134 sys_lib_dlsearch_path_spec="/lib /usr/lib"
15135 need_lib_prefix=unknown
15136 hardcode_into_libs=no
15137
15138 # when you set need_version to no, make sure it does not cause -set_version
15139 # flags to be left without arguments
15140 need_version=unknown
15141
15142 case $host_os in
15143 aix3*)
15144 version_type=linux # correct to gnu/linux during the next big refactor
15145 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
15146 shlibpath_var=LIBPATH
15147
15148 # AIX 3 has no versioning support, so we append a major version to the name.
15149 soname_spec='${libname}${release}${shared_ext}$major'
15150 ;;
15151
15152 aix[4-9]*)
15153 version_type=linux # correct to gnu/linux during the next big refactor
15154 need_lib_prefix=no
15155 need_version=no
15156 hardcode_into_libs=yes
15157 if test "$host_cpu" = ia64; then
15158 # AIX 5 supports IA64
15159 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
15160 shlibpath_var=LD_LIBRARY_PATH
15161 else
15162 # With GCC up to 2.95.x, collect2 would create an import file
15163 # for dependence libraries. The import file would start with
15164 # the line `#! .'. This would cause the generated library to
15165 # depend on `.', always an invalid library. This was fixed in
15166 # development snapshots of GCC prior to 3.0.
15167 case $host_os in
15168 aix4 | aix4.[01] | aix4.[01].*)
15169 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15170 echo ' yes '
15171 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
15172 :
15173 else
15174 can_build_shared=no
15175 fi
15176 ;;
15177 esac
15178 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
15179 # soname into executable. Probably we can add versioning support to
15180 # collect2, so additional links can be useful in future.
15181 if test "$aix_use_runtimelinking" = yes; then
15182 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15183 # instead of lib<name>.a to let people know that these are not
15184 # typical AIX shared libraries.
15185 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15186 else
15187 # We preserve .a as extension for shared libraries through AIX4.2
15188 # and later when we are not doing run time linking.
15189 library_names_spec='${libname}${release}.a $libname.a'
15190 soname_spec='${libname}${release}${shared_ext}$major'
15191 fi
15192 shlibpath_var=LIBPATH
15193 fi
15194 ;;
15195
15196 amigaos*)
15197 case $host_cpu in
15198 powerpc)
15199 # Since July 2007 AmigaOS4 officially supports .so libraries.
15200 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
15201 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15202 ;;
15203 m68k)
15204 library_names_spec='$libname.ixlibrary $libname.a'
15205 # Create ${libname}_ixlibrary.a entries in /sys/libs.
15206 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'
15207 ;;
15208 esac
15209 ;;
15210
15211 beos*)
15212 library_names_spec='${libname}${shared_ext}'
15213 dynamic_linker="$host_os ld.so"
15214 shlibpath_var=LIBRARY_PATH
15215 ;;
15216
15217 bsdi[45]*)
15218 version_type=linux # correct to gnu/linux during the next big refactor
15219 need_version=no
15220 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15221 soname_spec='${libname}${release}${shared_ext}$major'
15222 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
15223 shlibpath_var=LD_LIBRARY_PATH
15224 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
15225 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
15226 # the default ld.so.conf also contains /usr/contrib/lib and
15227 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
15228 # libtool to hard-code these into programs
15229 ;;
15230
15231 cygwin* | mingw* | pw32* | cegcc*)
15232 version_type=windows
15233 shrext_cmds=".dll"
15234 need_version=no
15235 need_lib_prefix=no
15236
15237 case $GCC,$cc_basename in
15238 yes,*)
15239 # gcc
15240 library_names_spec='$libname.dll.a'
15241 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15242 postinstall_cmds='base_file=`basename \${file}`~
15243 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
15244 dldir=$destdir/`dirname \$dlpath`~
15245 test -d \$dldir || mkdir -p \$dldir~
15246 $install_prog $dir/$dlname \$dldir/$dlname~
15247 chmod a+x \$dldir/$dlname~
15248 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15249 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15250 fi'
15251 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15252 dlpath=$dir/\$dldll~
15253 $RM \$dlpath'
15254 shlibpath_overrides_runpath=yes
15255
15256 case $host_os in
15257 cygwin*)
15258 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
15259 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15260
15261 ;;
15262 mingw* | cegcc*)
15263 # MinGW DLLs use traditional 'lib' prefix
15264 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15265 ;;
15266 pw32*)
15267 # pw32 DLLs use 'pw' prefix rather than 'lib'
15268 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15269 ;;
15270 esac
15271 dynamic_linker='Win32 ld.exe'
15272 ;;
15273
15274 *,cl*)
15275 # Native MSVC
15276 libname_spec='$name'
15277 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15278 library_names_spec='${libname}.dll.lib'
15279
15280 case $build_os in
15281 mingw*)
15282 sys_lib_search_path_spec=
15283 lt_save_ifs=$IFS
15284 IFS=';'
15285 for lt_path in $LIB
15286 do
15287 IFS=$lt_save_ifs
15288 # Let DOS variable expansion print the short 8.3 style file name.
15289 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
15290 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
15291 done
15292 IFS=$lt_save_ifs
15293 # Convert to MSYS style.
15294 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
15295 ;;
15296 cygwin*)
15297 # Convert to unix form, then to dos form, then back to unix form
15298 # but this time dos style (no spaces!) so that the unix form looks
15299 # like /cygdrive/c/PROGRA~1:/cygdr...
15300 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
15301 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
15302 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15303 ;;
15304 *)
15305 sys_lib_search_path_spec="$LIB"
15306 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
15307 # It is most probably a Windows format PATH.
15308 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15309 else
15310 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15311 fi
15312 # FIXME: find the short name or the path components, as spaces are
15313 # common. (e.g. "Program Files" -> "PROGRA~1")
15314 ;;
15315 esac
15316
15317 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15318 postinstall_cmds='base_file=`basename \${file}`~
15319 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
15320 dldir=$destdir/`dirname \$dlpath`~
15321 test -d \$dldir || mkdir -p \$dldir~
15322 $install_prog $dir/$dlname \$dldir/$dlname'
15323 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15324 dlpath=$dir/\$dldll~
15325 $RM \$dlpath'
15326 shlibpath_overrides_runpath=yes
15327 dynamic_linker='Win32 link.exe'
15328 ;;
15329
15330 *)
15331 # Assume MSVC wrapper
15332 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
15333 dynamic_linker='Win32 ld.exe'
15334 ;;
15335 esac
15336 # FIXME: first we should search . and the directory the executable is in
15337 shlibpath_var=PATH
15338 ;;
15339
15340 darwin* | rhapsody*)
15341 dynamic_linker="$host_os dyld"
15342 version_type=darwin
15343 need_lib_prefix=no
15344 need_version=no
15345 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
15346 soname_spec='${libname}${release}${major}$shared_ext'
15347 shlibpath_overrides_runpath=yes
15348 shlibpath_var=DYLD_LIBRARY_PATH
15349 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15350
15351 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15352 ;;
15353
15354 dgux*)
15355 version_type=linux # correct to gnu/linux during the next big refactor
15356 need_lib_prefix=no
15357 need_version=no
15358 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
15359 soname_spec='${libname}${release}${shared_ext}$major'
15360 shlibpath_var=LD_LIBRARY_PATH
15361 ;;
15362
15363 freebsd* | dragonfly*)
15364 # DragonFly does not have aout. When/if they implement a new
15365 # versioning mechanism, adjust this.
15366 if test -x /usr/bin/objformat; then
15367 objformat=`/usr/bin/objformat`
15368 else
15369 case $host_os in
15370 freebsd[23].*) objformat=aout ;;
15371 *) objformat=elf ;;
15372 esac
15373 fi
15374 version_type=freebsd-$objformat
15375 case $version_type in
15376 freebsd-elf*)
15377 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15378 need_version=no
15379 need_lib_prefix=no
15380 ;;
15381 freebsd-*)
15382 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
15383 need_version=yes
15384 ;;
15385 esac
15386 shlibpath_var=LD_LIBRARY_PATH
15387 case $host_os in
15388 freebsd2.*)
15389 shlibpath_overrides_runpath=yes
15390 ;;
15391 freebsd3.[01]* | freebsdelf3.[01]*)
15392 shlibpath_overrides_runpath=yes
15393 hardcode_into_libs=yes
15394 ;;
15395 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
15396 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
15397 shlibpath_overrides_runpath=no
15398 hardcode_into_libs=yes
15399 ;;
15400 *) # from 4.6 on, and DragonFly
15401 shlibpath_overrides_runpath=yes
15402 hardcode_into_libs=yes
15403 ;;
15404 esac
15405 ;;
15406
15407 haiku*)
15408 version_type=linux # correct to gnu/linux during the next big refactor
15409 need_lib_prefix=no
15410 need_version=no
15411 dynamic_linker="$host_os runtime_loader"
15412 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
15413 soname_spec='${libname}${release}${shared_ext}$major'
15414 shlibpath_var=LIBRARY_PATH
15415 shlibpath_overrides_runpath=yes
15416 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
15417 hardcode_into_libs=yes
15418 ;;
15419
15420 hpux9* | hpux10* | hpux11*)
15421 # Give a soname corresponding to the major version so that dld.sl refuses to
15422 # link against other versions.
15423 version_type=sunos
15424 need_lib_prefix=no
15425 need_version=no
15426 case $host_cpu in
15427 ia64*)
15428 shrext_cmds='.so'
15429 hardcode_into_libs=yes
15430 dynamic_linker="$host_os dld.so"
15431 shlibpath_var=LD_LIBRARY_PATH
15432 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15433 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15434 soname_spec='${libname}${release}${shared_ext}$major'
15435 if test "X$HPUX_IA64_MODE" = X32; then
15436 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15437 else
15438 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15439 fi
15440 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15441 ;;
15442 hppa*64*)
15443 shrext_cmds='.sl'
15444 hardcode_into_libs=yes
15445 dynamic_linker="$host_os dld.sl"
15446 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15447 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15448 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15449 soname_spec='${libname}${release}${shared_ext}$major'
15450 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15451 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15452 ;;
15453 *)
15454 shrext_cmds='.sl'
15455 dynamic_linker="$host_os dld.sl"
15456 shlibpath_var=SHLIB_PATH
15457 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15459 soname_spec='${libname}${release}${shared_ext}$major'
15460 ;;
15461 esac
15462 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
15463 postinstall_cmds='chmod 555 $lib'
15464 # or fails outright, so override atomically:
15465 install_override_mode=555
15466 ;;
15467
15468 interix[3-9]*)
15469 version_type=linux # correct to gnu/linux during the next big refactor
15470 need_lib_prefix=no
15471 need_version=no
15472 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15473 soname_spec='${libname}${release}${shared_ext}$major'
15474 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15475 shlibpath_var=LD_LIBRARY_PATH
15476 shlibpath_overrides_runpath=no
15477 hardcode_into_libs=yes
15478 ;;
15479
15480 irix5* | irix6* | nonstopux*)
15481 case $host_os in
15482 nonstopux*) version_type=nonstopux ;;
15483 *)
15484 if test "$lt_cv_prog_gnu_ld" = yes; then
15485 version_type=linux # correct to gnu/linux during the next big refactor
15486 else
15487 version_type=irix
15488 fi ;;
15489 esac
15490 need_lib_prefix=no
15491 need_version=no
15492 soname_spec='${libname}${release}${shared_ext}$major'
15493 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15494 case $host_os in
15495 irix5* | nonstopux*)
15496 libsuff= shlibsuff=
15497 ;;
15498 *)
15499 case $LD in # libtool.m4 will add one of these switches to LD
15500 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15501 libsuff= shlibsuff= libmagic=32-bit;;
15502 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15503 libsuff=32 shlibsuff=N32 libmagic=N32;;
15504 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15505 libsuff=64 shlibsuff=64 libmagic=64-bit;;
15506 *) libsuff= shlibsuff= libmagic=never-match;;
15507 esac
15508 ;;
15509 esac
15510 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15511 shlibpath_overrides_runpath=no
15512 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15513 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15514 hardcode_into_libs=yes
15515 ;;
15516
15517 # No shared lib support for Linux oldld, aout, or coff.
15518 linux*oldld* | linux*aout* | linux*coff*)
15519 dynamic_linker=no
15520 ;;
15521
15522 # This must be glibc/ELF.
15523 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15524 version_type=linux # correct to gnu/linux during the next big refactor
15525 need_lib_prefix=no
15526 need_version=no
15527 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15528 soname_spec='${libname}${release}${shared_ext}$major'
15529 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15530 shlibpath_var=LD_LIBRARY_PATH
15531 shlibpath_overrides_runpath=no
15532
15533 # Some binutils ld are patched to set DT_RUNPATH
15534 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
15535 $as_echo_n "(cached) " >&6
15536 else
15537 lt_cv_shlibpath_overrides_runpath=no
15538 save_LDFLAGS=$LDFLAGS
15539 save_libdir=$libdir
15540 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
15541 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
15542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15543 /* end confdefs.h. */
15544
15545 int
15546 main ()
15547 {
15548
15549 ;
15550 return 0;
15551 }
15552 _ACEOF
15553 if ac_fn_cxx_try_link "$LINENO"; then :
15554 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
15555 lt_cv_shlibpath_overrides_runpath=yes
15556 fi
15557 fi
15558 rm -f core conftest.err conftest.$ac_objext \
15559 conftest$ac_exeext conftest.$ac_ext
15560 LDFLAGS=$save_LDFLAGS
15561 libdir=$save_libdir
15562
15563 fi
15564
15565 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
15566
15567 # This implies no fast_install, which is unacceptable.
15568 # Some rework will be needed to allow for fast_install
15569 # before this can be enabled.
15570 hardcode_into_libs=yes
15571
15572 # Append ld.so.conf contents to the search path
15573 if test -f /etc/ld.so.conf; then
15574 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' ' '`
15575 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15576 fi
15577
15578 # We used to test for /lib/ld.so.1 and disable shared libraries on
15579 # powerpc, because MkLinux only supported shared libraries with the
15580 # GNU dynamic linker. Since this was broken with cross compilers,
15581 # most powerpc-linux boxes support dynamic linking these days and
15582 # people can always --disable-shared, the test was removed, and we
15583 # assume the GNU/Linux dynamic linker is in use.
15584 dynamic_linker='GNU/Linux ld.so'
15585 ;;
15586
15587 netbsdelf*-gnu)
15588 version_type=linux
15589 need_lib_prefix=no
15590 need_version=no
15591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15592 soname_spec='${libname}${release}${shared_ext}$major'
15593 shlibpath_var=LD_LIBRARY_PATH
15594 shlibpath_overrides_runpath=no
15595 hardcode_into_libs=yes
15596 dynamic_linker='NetBSD ld.elf_so'
15597 ;;
15598
15599 netbsd*)
15600 version_type=sunos
15601 need_lib_prefix=no
15602 need_version=no
15603 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15604 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15605 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15606 dynamic_linker='NetBSD (a.out) ld.so'
15607 else
15608 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15609 soname_spec='${libname}${release}${shared_ext}$major'
15610 dynamic_linker='NetBSD ld.elf_so'
15611 fi
15612 shlibpath_var=LD_LIBRARY_PATH
15613 shlibpath_overrides_runpath=yes
15614 hardcode_into_libs=yes
15615 ;;
15616
15617 newsos6)
15618 version_type=linux # correct to gnu/linux during the next big refactor
15619 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15620 shlibpath_var=LD_LIBRARY_PATH
15621 shlibpath_overrides_runpath=yes
15622 ;;
15623
15624 *nto* | *qnx*)
15625 version_type=qnx
15626 need_lib_prefix=no
15627 need_version=no
15628 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15629 soname_spec='${libname}${release}${shared_ext}$major'
15630 shlibpath_var=LD_LIBRARY_PATH
15631 shlibpath_overrides_runpath=no
15632 hardcode_into_libs=yes
15633 dynamic_linker='ldqnx.so'
15634 ;;
15635
15636 openbsd*)
15637 version_type=sunos
15638 sys_lib_dlsearch_path_spec="/usr/lib"
15639 need_lib_prefix=no
15640 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
15641 case $host_os in
15642 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
15643 *) need_version=no ;;
15644 esac
15645 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15646 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15647 shlibpath_var=LD_LIBRARY_PATH
15648 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15649 case $host_os in
15650 openbsd2.[89] | openbsd2.[89].*)
15651 shlibpath_overrides_runpath=no
15652 ;;
15653 *)
15654 shlibpath_overrides_runpath=yes
15655 ;;
15656 esac
15657 else
15658 shlibpath_overrides_runpath=yes
15659 fi
15660 ;;
15661
15662 os2*)
15663 libname_spec='$name'
15664 shrext_cmds=".dll"
15665 need_lib_prefix=no
15666 library_names_spec='$libname${shared_ext} $libname.a'
15667 dynamic_linker='OS/2 ld.exe'
15668 shlibpath_var=LIBPATH
15669 ;;
15670
15671 osf3* | osf4* | osf5*)
15672 version_type=osf
15673 need_lib_prefix=no
15674 need_version=no
15675 soname_spec='${libname}${release}${shared_ext}$major'
15676 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15677 shlibpath_var=LD_LIBRARY_PATH
15678 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15679 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
15680 ;;
15681
15682 rdos*)
15683 dynamic_linker=no
15684 ;;
15685
15686 solaris*)
15687 version_type=linux # correct to gnu/linux during the next big refactor
15688 need_lib_prefix=no
15689 need_version=no
15690 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15691 soname_spec='${libname}${release}${shared_ext}$major'
15692 shlibpath_var=LD_LIBRARY_PATH
15693 shlibpath_overrides_runpath=yes
15694 hardcode_into_libs=yes
15695 # ldd complains unless libraries are executable
15696 postinstall_cmds='chmod +x $lib'
15697 ;;
15698
15699 sunos4*)
15700 version_type=sunos
15701 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15702 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15703 shlibpath_var=LD_LIBRARY_PATH
15704 shlibpath_overrides_runpath=yes
15705 if test "$with_gnu_ld" = yes; then
15706 need_lib_prefix=no
15707 fi
15708 need_version=yes
15709 ;;
15710
15711 sysv4 | sysv4.3*)
15712 version_type=linux # correct to gnu/linux during the next big refactor
15713 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15714 soname_spec='${libname}${release}${shared_ext}$major'
15715 shlibpath_var=LD_LIBRARY_PATH
15716 case $host_vendor in
15717 sni)
15718 shlibpath_overrides_runpath=no
15719 need_lib_prefix=no
15720 runpath_var=LD_RUN_PATH
15721 ;;
15722 siemens)
15723 need_lib_prefix=no
15724 ;;
15725 motorola)
15726 need_lib_prefix=no
15727 need_version=no
15728 shlibpath_overrides_runpath=no
15729 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15730 ;;
15731 esac
15732 ;;
15733
15734 sysv4*MP*)
15735 if test -d /usr/nec ;then
15736 version_type=linux # correct to gnu/linux during the next big refactor
15737 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
15738 soname_spec='$libname${shared_ext}.$major'
15739 shlibpath_var=LD_LIBRARY_PATH
15740 fi
15741 ;;
15742
15743 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15744 version_type=freebsd-elf
15745 need_lib_prefix=no
15746 need_version=no
15747 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15748 soname_spec='${libname}${release}${shared_ext}$major'
15749 shlibpath_var=LD_LIBRARY_PATH
15750 shlibpath_overrides_runpath=yes
15751 hardcode_into_libs=yes
15752 if test "$with_gnu_ld" = yes; then
15753 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15754 else
15755 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15756 case $host_os in
15757 sco3.2v5*)
15758 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15759 ;;
15760 esac
15761 fi
15762 sys_lib_dlsearch_path_spec='/usr/lib'
15763 ;;
15764
15765 tpf*)
15766 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
15767 version_type=linux # correct to gnu/linux during the next big refactor
15768 need_lib_prefix=no
15769 need_version=no
15770 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15771 shlibpath_var=LD_LIBRARY_PATH
15772 shlibpath_overrides_runpath=no
15773 hardcode_into_libs=yes
15774 ;;
15775
15776 uts4*)
15777 version_type=linux # correct to gnu/linux during the next big refactor
15778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15779 soname_spec='${libname}${release}${shared_ext}$major'
15780 shlibpath_var=LD_LIBRARY_PATH
15781 ;;
15782
15783 *)
15784 dynamic_linker=no
15785 ;;
15786 esac
15787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
15788 $as_echo "$dynamic_linker" >&6; }
15789 test "$dynamic_linker" = no && can_build_shared=no
15790
15791 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15792 if test "$GCC" = yes; then
15793 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15794 fi
15795
15796 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
15797 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
15798 fi
15799 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
15800 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
15801 fi
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
15841 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
15842 hardcode_action_CXX=
15843 if test -n "$hardcode_libdir_flag_spec_CXX" ||
15844 test -n "$runpath_var_CXX" ||
15845 test "X$hardcode_automatic_CXX" = "Xyes" ; then
15846
15847 # We can hardcode non-existent directories.
15848 if test "$hardcode_direct_CXX" != no &&
15849 # If the only mechanism to avoid hardcoding is shlibpath_var, we
15850 # have to relink, otherwise we might link with an installed library
15851 # when we should be linking with a yet-to-be-installed one
15852 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
15853 test "$hardcode_minus_L_CXX" != no; then
15854 # Linking always hardcodes the temporary library directory.
15855 hardcode_action_CXX=relink
15856 else
15857 # We can link without hardcoding, and we can hardcode nonexisting dirs.
15858 hardcode_action_CXX=immediate
15859 fi
15860 else
15861 # We cannot hardcode anything, or else we can only hardcode existing
15862 # directories.
15863 hardcode_action_CXX=unsupported
15864 fi
15865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
15866 $as_echo "$hardcode_action_CXX" >&6; }
15867
15868 if test "$hardcode_action_CXX" = relink ||
15869 test "$inherit_rpath_CXX" = yes; then
15870 # Fast installation is not supported
15871 enable_fast_install=no
15872 elif test "$shlibpath_overrides_runpath" = yes ||
15873 test "$enable_shared" = no; then
15874 # Fast installation is not necessary
15875 enable_fast_install=needless
15876 fi
15877
15878
15879
15880
15881
15882
15883
15884 fi # test -n "$compiler"
15885
15886 CC=$lt_save_CC
15887 CFLAGS=$lt_save_CFLAGS
15888 LDCXX=$LD
15889 LD=$lt_save_LD
15890 GCC=$lt_save_GCC
15891 with_gnu_ld=$lt_save_with_gnu_ld
15892 lt_cv_path_LDCXX=$lt_cv_path_LD
15893 lt_cv_path_LD=$lt_save_path_LD
15894 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
15895 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
15896 fi # test "$_lt_caught_CXX_error" != yes
15897
15898 ac_ext=c
15899 ac_cpp='$CPP $CPPFLAGS'
15900 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15901 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15902 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918 ac_config_commands="$ac_config_commands libtool"
15919
15920
15921
15922
15923 # Only expand once:
15924
15925
15926 for ac_prog in gawk mawk nawk awk
15927 do
15928 # Extract the first word of "$ac_prog", so it can be a program name with args.
15929 set dummy $ac_prog; ac_word=$2
15930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15931 $as_echo_n "checking for $ac_word... " >&6; }
15932 if ${ac_cv_prog_AWK+:} false; then :
15933 $as_echo_n "(cached) " >&6
15934 else
15935 if test -n "$AWK"; then
15936 ac_cv_prog_AWK="$AWK" # Let the user override the test.
15937 else
15938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15939 for as_dir in $PATH
15940 do
15941 IFS=$as_save_IFS
15942 test -z "$as_dir" && as_dir=.
15943 for ac_exec_ext in '' $ac_executable_extensions; do
15944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15945 ac_cv_prog_AWK="$ac_prog"
15946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15947 break 2
15948 fi
15949 done
15950 done
15951 IFS=$as_save_IFS
15952
15953 fi
15954 fi
15955 AWK=$ac_cv_prog_AWK
15956 if test -n "$AWK"; then
15957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
15958 $as_echo "$AWK" >&6; }
15959 else
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15961 $as_echo "no" >&6; }
15962 fi
15963
15964
15965 test -n "$AWK" && break
15966 done
15967
15968
15969 # Checks for libraries.
15970
15971 # IMPORTANT: Do not make standard library checks here -- i.e. no
15972 # checks that would add the checked library to "LIBS" (unless it is
15973 # actually common to all sub-libraries), as we produce sub-libraries
15974 # with varying dependencies.
15975
15976 # check for dl lib
15977 # All symbolic libs are linked with
15978 ac_ext=cpp
15979 ac_cpp='$CXXCPP $CPPFLAGS'
15980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15983
15984
15985 ac_fn_cxx_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15986 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
15987
15988 else
15989 as_fn_error $? "error: libdl include file dlfcn.h not found." "$LINENO" 5
15990 fi
15991
15992
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15994 $as_echo_n "checking for dlopen in -ldl... " >&6; }
15995 if ${ac_cv_lib_dl_dlopen+:} false; then :
15996 $as_echo_n "(cached) " >&6
15997 else
15998 ac_check_lib_save_LIBS=$LIBS
15999 LIBS="-ldl $LIBS"
16000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16001 /* end confdefs.h. */
16002
16003 /* Override any GCC internal prototype to avoid an error.
16004 Use char because int might match the return type of a GCC
16005 builtin and then its argument prototype would still apply. */
16006 #ifdef __cplusplus
16007 extern "C"
16008 #endif
16009 char dlopen ();
16010 int
16011 main ()
16012 {
16013 return dlopen ();
16014 ;
16015 return 0;
16016 }
16017 _ACEOF
16018 if ac_fn_cxx_try_link "$LINENO"; then :
16019 ac_cv_lib_dl_dlopen=yes
16020 else
16021 ac_cv_lib_dl_dlopen=no
16022 fi
16023 rm -f core conftest.err conftest.$ac_objext \
16024 conftest$ac_exeext conftest.$ac_ext
16025 LIBS=$ac_check_lib_save_LIBS
16026 fi
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16028 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
16029 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
16030 cat >>confdefs.h <<_ACEOF
16031 #define HAVE_LIBDL 1
16032 _ACEOF
16033
16034 LIBS="-ldl $LIBS"
16035
16036 else
16037 as_fn_error $? "Failed to detect libdl." "$LINENO" 5
16038 fi
16039
16040
16041 # check for ccgnu lib (w/ workaround for buggy version test side effect)
16042 CXXFLAGS_SAVE=${CXXFLAGS}
16043 LIBS_SAVE=${LIBS}
16044
16045 if test -d ${exec_prefix}/bin ; then
16046 PATH=${exec_prefix}/bin:$PATH
16047 elif test -d ${prefix}/bin ; then
16048 PATH=${prefix}/bin:$PATH ; fi
16049
16050 # Extract the first word of "ccgnu2-config", so it can be a program name with args.
16051 set dummy ccgnu2-config; ac_word=$2
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16053 $as_echo_n "checking for $ac_word... " >&6; }
16054 if ${ac_cv_path_CCGNU2_CONFIG+:} false; then :
16055 $as_echo_n "(cached) " >&6
16056 else
16057 case $CCGNU2_CONFIG in
16058 [\\/]* | ?:[\\/]*)
16059 ac_cv_path_CCGNU2_CONFIG="$CCGNU2_CONFIG" # Let the user override the test with a path.
16060 ;;
16061 *)
16062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16063 for as_dir in $PATH
16064 do
16065 IFS=$as_save_IFS
16066 test -z "$as_dir" && as_dir=.
16067 for ac_exec_ext in '' $ac_executable_extensions; do
16068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16069 ac_cv_path_CCGNU2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
16070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16071 break 2
16072 fi
16073 done
16074 done
16075 IFS=$as_save_IFS
16076
16077 test -z "$ac_cv_path_CCGNU2_CONFIG" && ac_cv_path_CCGNU2_CONFIG="no"
16078 ;;
16079 esac
16080 fi
16081 CCGNU2_CONFIG=$ac_cv_path_CCGNU2_CONFIG
16082 if test -n "$CCGNU2_CONFIG"; then
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCGNU2_CONFIG" >&5
16084 $as_echo "$CCGNU2_CONFIG" >&6; }
16085 else
16086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16087 $as_echo "no" >&6; }
16088 fi
16089
16090
16091 ccgnu2_version=1.0.0
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for commoncpp2 version >= $ccgnu2_version" >&5
16093 $as_echo_n "checking for commoncpp2 version >= $ccgnu2_version... " >&6; }
16094 if test "$CCGNU2_CONFIG" = "no" ; then
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16096 $as_echo "not found" >&6; }
16097 echo "*** The ccgnu2-config script installed by commoncpp2 0.99"
16098 echo "*** or later could not be found."
16099 echo "*** You need to install GNU Common C++ 2, whose later releases are"
16100 echo "*** available from http://www.gnu.org/software/commoncpp/ and any"
16101 echo "*** GNU mirror."
16102 :
16103 exit -1
16104 else
16105 config_version=`$CCGNU2_CONFIG --version`
16106 ccgnu2_config_major_version=`echo $config_version | \
16107 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
16108 ccgnu2_config_minor_version=`echo $config_version | \
16109 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
16110 ccgnu2_config_micro_version=`echo $config_version | \
16111 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
16112
16113 ccgnu2_check_major_version=`echo "$ccgnu2_version" | \
16114 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
16115 ccgnu2_check_minor_version=`echo "$ccgnu2_version" | \
16116 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
16117 ccgnu2_check_micro_version=`echo "$ccgnu2_version" | \
16118 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
16119
16120 version_ok=no
16121 if test $ccgnu2_config_major_version -gt $ccgnu2_check_major_version ; then
16122 version_ok=yes
16123 elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \
16124 && test $ccgnu2_config_minor_version -gt $ccgnu2_check_minor_version ; then
16125 version_ok=yes
16126 elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \
16127 && test $ccgnu2_config_minor_version -eq $ccgnu2_check_minor_version \
16128 && test $ccgnu2_config_micro_version -ge $ccgnu2_check_micro_version; then
16129
16130 version_ok=yes
16131 fi
16132
16133 if test "$version_ok" = "no"; then
16134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16135 $as_echo "no" >&6; }
16136 ost_cv_ccxx_config=false
16137 echo "*** An old version of CommonC++ of $config_version was found."
16138 echo "*** You need a version of commoncpp2 newer than $ccgnu2_version. The latest version of"
16139 echo "*** CommonC++ is always available from ftp://ftp.gnu.org/gnu/commonc++/."
16140 :
16141 else
16142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16143 $as_echo "yes" >&6; }
16144 ost_cv_ccxx_config=true
16145 SINGLE_FLAGS="$CXXFLAGS"
16146 SINGLE_LIBS="$LIBS"
16147
16148
16149 CXXFLAGS="$CXXFLAGS "`$CCGNU2_CONFIG --flags`
16150 GNULIBS="$LIBS "`$CCGNU2_CONFIG --gnulibs`
16151 EXTLIBS=`$CCGNU2_CONFIG --extlibs`
16152 LIBS="$LIBS `$CCGNU2_CONFIG --stdlibs`"
16153
16154
16155 fi
16156 fi
16157
16158 CXXFLAGS=${CXXFLAGS_SAVE}
16159 LIBS=${LIBS_SAVE}
16160 # OST_CCXX2_VERSION extends CXXFLAGS. This is pathetic, and does not work, for example,
16161 # with 'make CXXFLAGS="-g -O0 -pedantic -Wall'.
16162 OST_CXXX2_FLAGS=`ccgnu2-config --flags`
16163 OST_CXXX2_LIBS=`ccgnu2-config --stdlibs`
16164
16165
16166
16167 # Normally, the dependency of libreadline to ncurses should be implicit and should
16168 # be encapsulated - we do not use anything from ncurses explicitely.
16169 # However, on some systems (at least for RH 7.3) this is not the case, so we need to check for ncurses, too
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curses_version in -lncurses" >&5
16171 $as_echo_n "checking for curses_version in -lncurses... " >&6; }
16172 if ${ac_cv_lib_ncurses_curses_version+:} false; then :
16173 $as_echo_n "(cached) " >&6
16174 else
16175 ac_check_lib_save_LIBS=$LIBS
16176 LIBS="-lncurses $LIBS"
16177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178 /* end confdefs.h. */
16179
16180 /* Override any GCC internal prototype to avoid an error.
16181 Use char because int might match the return type of a GCC
16182 builtin and then its argument prototype would still apply. */
16183 #ifdef __cplusplus
16184 extern "C"
16185 #endif
16186 char curses_version ();
16187 int
16188 main ()
16189 {
16190 return curses_version ();
16191 ;
16192 return 0;
16193 }
16194 _ACEOF
16195 if ac_fn_cxx_try_link "$LINENO"; then :
16196 ac_cv_lib_ncurses_curses_version=yes
16197 else
16198 ac_cv_lib_ncurses_curses_version=no
16199 fi
16200 rm -f core conftest.err conftest.$ac_objext \
16201 conftest$ac_exeext conftest.$ac_ext
16202 LIBS=$ac_check_lib_save_LIBS
16203 fi
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_curses_version" >&5
16205 $as_echo "$ac_cv_lib_ncurses_curses_version" >&6; }
16206 if test "x$ac_cv_lib_ncurses_curses_version" = xyes; then :
16207 cat >>confdefs.h <<_ACEOF
16208 #define HAVE_LIBNCURSES 1
16209 _ACEOF
16210
16211 LIBS="-lncurses $LIBS"
16212
16213 else
16214 as_fn_error $? "ui-utilcpp needs ncurses." "$LINENO" 5
16215 fi
16216
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcap" >&5
16218 $as_echo_n "checking for cap_init in -lcap... " >&6; }
16219 if ${ac_cv_lib_cap_cap_init+:} false; then :
16220 $as_echo_n "(cached) " >&6
16221 else
16222 ac_check_lib_save_LIBS=$LIBS
16223 LIBS="-lcap $LIBS"
16224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16225 /* end confdefs.h. */
16226
16227 /* Override any GCC internal prototype to avoid an error.
16228 Use char because int might match the return type of a GCC
16229 builtin and then its argument prototype would still apply. */
16230 #ifdef __cplusplus
16231 extern "C"
16232 #endif
16233 char cap_init ();
16234 int
16235 main ()
16236 {
16237 return cap_init ();
16238 ;
16239 return 0;
16240 }
16241 _ACEOF
16242 if ac_fn_cxx_try_link "$LINENO"; then :
16243 ac_cv_lib_cap_cap_init=yes
16244 else
16245 ac_cv_lib_cap_cap_init=no
16246 fi
16247 rm -f core conftest.err conftest.$ac_objext \
16248 conftest$ac_exeext conftest.$ac_ext
16249 LIBS=$ac_check_lib_save_LIBS
16250 fi
16251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_init" >&5
16252 $as_echo "$ac_cv_lib_cap_cap_init" >&6; }
16253 if test "x$ac_cv_lib_cap_cap_init" = xyes; then :
16254 cat >>confdefs.h <<_ACEOF
16255 #define HAVE_LIBCAP 1
16256 _ACEOF
16257
16258 LIBS="-lcap $LIBS"
16259
16260 else
16261 as_fn_error $? "ui-utilcpp needs libcap." "$LINENO" 5
16262 fi
16263
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
16265 $as_echo_n "checking for readline in -lreadline... " >&6; }
16266 if ${ac_cv_lib_readline_readline+:} false; then :
16267 $as_echo_n "(cached) " >&6
16268 else
16269 ac_check_lib_save_LIBS=$LIBS
16270 LIBS="-lreadline -lncurses $LIBS"
16271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272 /* end confdefs.h. */
16273
16274 /* Override any GCC internal prototype to avoid an error.
16275 Use char because int might match the return type of a GCC
16276 builtin and then its argument prototype would still apply. */
16277 #ifdef __cplusplus
16278 extern "C"
16279 #endif
16280 char readline ();
16281 int
16282 main ()
16283 {
16284 return readline ();
16285 ;
16286 return 0;
16287 }
16288 _ACEOF
16289 if ac_fn_cxx_try_link "$LINENO"; then :
16290 ac_cv_lib_readline_readline=yes
16291 else
16292 ac_cv_lib_readline_readline=no
16293 fi
16294 rm -f core conftest.err conftest.$ac_objext \
16295 conftest$ac_exeext conftest.$ac_ext
16296 LIBS=$ac_check_lib_save_LIBS
16297 fi
16298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
16299 $as_echo "$ac_cv_lib_readline_readline" >&6; }
16300 if test "x$ac_cv_lib_readline_readline" = xyes; then :
16301 cat >>confdefs.h <<_ACEOF
16302 #define HAVE_LIBREADLINE 1
16303 _ACEOF
16304
16305 LIBS="-lreadline $LIBS"
16306
16307 else
16308 as_fn_error $? "ui-utilcpp needs libreadline." "$LINENO" 5
16309 fi
16310
16311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recode_new_outer in -lrecode" >&5
16312 $as_echo_n "checking for recode_new_outer in -lrecode... " >&6; }
16313 if ${ac_cv_lib_recode_recode_new_outer+:} false; then :
16314 $as_echo_n "(cached) " >&6
16315 else
16316 ac_check_lib_save_LIBS=$LIBS
16317 LIBS="-lrecode $LIBS"
16318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16319 /* end confdefs.h. */
16320
16321 /* Override any GCC internal prototype to avoid an error.
16322 Use char because int might match the return type of a GCC
16323 builtin and then its argument prototype would still apply. */
16324 #ifdef __cplusplus
16325 extern "C"
16326 #endif
16327 char recode_new_outer ();
16328 int
16329 main ()
16330 {
16331 return recode_new_outer ();
16332 ;
16333 return 0;
16334 }
16335 _ACEOF
16336 if ac_fn_cxx_try_link "$LINENO"; then :
16337 ac_cv_lib_recode_recode_new_outer=yes
16338 else
16339 ac_cv_lib_recode_recode_new_outer=no
16340 fi
16341 rm -f core conftest.err conftest.$ac_objext \
16342 conftest$ac_exeext conftest.$ac_ext
16343 LIBS=$ac_check_lib_save_LIBS
16344 fi
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_recode_recode_new_outer" >&5
16346 $as_echo "$ac_cv_lib_recode_recode_new_outer" >&6; }
16347 if test "x$ac_cv_lib_recode_recode_new_outer" = xyes; then :
16348 cat >>confdefs.h <<_ACEOF
16349 #define HAVE_LIBRECODE 1
16350 _ACEOF
16351
16352 LIBS="-lrecode $LIBS"
16353
16354 else
16355 as_fn_error $? "ui-utilcpp needs librecode." "$LINENO" 5
16356 fi
16357
16358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for idna_to_ascii_8z in -lidn" >&5
16359 $as_echo_n "checking for idna_to_ascii_8z in -lidn... " >&6; }
16360 if ${ac_cv_lib_idn_idna_to_ascii_8z+:} false; then :
16361 $as_echo_n "(cached) " >&6
16362 else
16363 ac_check_lib_save_LIBS=$LIBS
16364 LIBS="-lidn $LIBS"
16365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366 /* end confdefs.h. */
16367
16368 /* Override any GCC internal prototype to avoid an error.
16369 Use char because int might match the return type of a GCC
16370 builtin and then its argument prototype would still apply. */
16371 #ifdef __cplusplus
16372 extern "C"
16373 #endif
16374 char idna_to_ascii_8z ();
16375 int
16376 main ()
16377 {
16378 return idna_to_ascii_8z ();
16379 ;
16380 return 0;
16381 }
16382 _ACEOF
16383 if ac_fn_cxx_try_link "$LINENO"; then :
16384 ac_cv_lib_idn_idna_to_ascii_8z=yes
16385 else
16386 ac_cv_lib_idn_idna_to_ascii_8z=no
16387 fi
16388 rm -f core conftest.err conftest.$ac_objext \
16389 conftest$ac_exeext conftest.$ac_ext
16390 LIBS=$ac_check_lib_save_LIBS
16391 fi
16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_idna_to_ascii_8z" >&5
16393 $as_echo "$ac_cv_lib_idn_idna_to_ascii_8z" >&6; }
16394 if test "x$ac_cv_lib_idn_idna_to_ascii_8z" = xyes; then :
16395 cat >>confdefs.h <<_ACEOF
16396 #define HAVE_LIBIDN 1
16397 _ACEOF
16398
16399 LIBS="-lidn $LIBS"
16400
16401 else
16402 as_fn_error $? "ui-utilcpp needs libidn." "$LINENO" 5
16403 fi
16404
16405 ac_fn_cxx_check_header_mongrel "$LINENO" "idna.h" "ac_cv_header_idna_h" "$ac_includes_default"
16406 if test "x$ac_cv_header_idna_h" = xyes; then :
16407
16408 else
16409 as_fn_error $? "\"Header error: idna.h\"" "$LINENO" 5
16410 fi
16411
16412
16413
16414 # Check whether --enable-libproc was given.
16415 if test "${enable_libproc+set}" = set; then :
16416 enableval=$enable_libproc; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openproc in -lproc" >&5
16417 $as_echo_n "checking for openproc in -lproc... " >&6; }
16418 if ${ac_cv_lib_proc_openproc+:} false; then :
16419 $as_echo_n "(cached) " >&6
16420 else
16421 ac_check_lib_save_LIBS=$LIBS
16422 LIBS="-lproc $LIBS"
16423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424 /* end confdefs.h. */
16425
16426 /* Override any GCC internal prototype to avoid an error.
16427 Use char because int might match the return type of a GCC
16428 builtin and then its argument prototype would still apply. */
16429 #ifdef __cplusplus
16430 extern "C"
16431 #endif
16432 char openproc ();
16433 int
16434 main ()
16435 {
16436 return openproc ();
16437 ;
16438 return 0;
16439 }
16440 _ACEOF
16441 if ac_fn_cxx_try_link "$LINENO"; then :
16442 ac_cv_lib_proc_openproc=yes
16443 else
16444 ac_cv_lib_proc_openproc=no
16445 fi
16446 rm -f core conftest.err conftest.$ac_objext \
16447 conftest$ac_exeext conftest.$ac_ext
16448 LIBS=$ac_check_lib_save_LIBS
16449 fi
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proc_openproc" >&5
16451 $as_echo "$ac_cv_lib_proc_openproc" >&6; }
16452 if test "x$ac_cv_lib_proc_openproc" = xyes; then :
16453 cat >>confdefs.h <<_ACEOF
16454 #define HAVE_LIBPROC 1
16455 _ACEOF
16456
16457 LIBS="-lproc $LIBS"
16458
16459 else
16460 as_fn_error $? "ui-utilcpp needs libproc." "$LINENO" 5
16461 fi
16462
16463 ac_fn_cxx_check_header_mongrel "$LINENO" "proc/readproc.h" "ac_cv_header_proc_readproc_h" "$ac_includes_default"
16464 if test "x$ac_cv_header_proc_readproc_h" = xyes; then :
16465
16466 else
16467 as_fn_error $? "\"Header error: proc/readproc.h\"" "$LINENO" 5
16468 fi
16469
16470
16471 fi
16472
16473
16474 # boost unit test framework check
16475 ac_fn_cxx_check_header_mongrel "$LINENO" "boost/test/auto_unit_test.hpp" "ac_cv_header_boost_test_auto_unit_test_hpp" "$ac_includes_default"
16476 if test "x$ac_cv_header_boost_test_auto_unit_test_hpp" = xyes; then :
16477
16478 else
16479 as_fn_error $? "\"Header error: boost/test/auto_unit_test.hpp\"" "$LINENO" 5
16480 fi
16481
16482
16483 ac_fn_cxx_check_header_mongrel "$LINENO" "boost/serialization/access.hpp" "ac_cv_header_boost_serialization_access_hpp" "$ac_includes_default"
16484 if test "x$ac_cv_header_boost_serialization_access_hpp" = xyes; then :
16485
16486 else
16487 as_fn_error $? "\"Header error: boost/serialization/access.hpp\"" "$LINENO" 5
16488 fi
16489
16490
16491 ac_fn_cxx_check_header_mongrel "$LINENO" "boost/multi_index_container.hpp" "ac_cv_header_boost_multi_index_container_hpp" "$ac_includes_default"
16492 if test "x$ac_cv_header_boost_multi_index_container_hpp" = xyes; then :
16493
16494 else
16495 as_fn_error $? "\"Header error: boost/multi_index_container.hpp\"" "$LINENO" 5
16496 fi
16497
16498
16499 ac_fn_cxx_check_header_mongrel "$LINENO" "boost/date_time/date.hpp" "ac_cv_header_boost_date_time_date_hpp" "$ac_includes_default"
16500 if test "x$ac_cv_header_boost_date_time_date_hpp" = xyes; then :
16501
16502 else
16503 as_fn_error $? "\"Header error: boost/date_time/date.hpp\"" "$LINENO" 5
16504 fi
16505
16506
16507 ac_fn_cxx_check_header_mongrel "$LINENO" "boost/random.hpp" "ac_cv_header_boost_random_hpp" "$ac_includes_default"
16508 if test "x$ac_cv_header_boost_random_hpp" = xyes; then :
16509
16510 else
16511 as_fn_error $? "\"Header error: boost/random.hpp\"" "$LINENO" 5
16512 fi
16513
16514
16515 # Test for library missing (unfortunately, this does not seem to be trivial)
16516
16517 # Quota support (std and xfs only, 26 support is build-in)
16518 for ac_header in sys/quota.h
16519 do :
16520 ac_fn_cxx_check_header_mongrel "$LINENO" "sys/quota.h" "ac_cv_header_sys_quota_h" "$ac_includes_default"
16521 if test "x$ac_cv_header_sys_quota_h" = xyes; then :
16522 cat >>confdefs.h <<_ACEOF
16523 #define HAVE_SYS_QUOTA_H 1
16524 _ACEOF
16525
16526 else
16527 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No linux \"standard\" quota available!" >&5
16528 $as_echo "$as_me: WARNING: No linux \"standard\" quota available!" >&2;}
16529 fi
16530
16531 done
16532
16533 for ac_header in xfs/xqm.h
16534 do :
16535 ac_fn_cxx_check_header_mongrel "$LINENO" "xfs/xqm.h" "ac_cv_header_xfs_xqm_h" "$ac_includes_default"
16536 if test "x$ac_cv_header_xfs_xqm_h" = xyes; then :
16537 cat >>confdefs.h <<_ACEOF
16538 #define HAVE_XFS_XQM_H 1
16539 _ACEOF
16540
16541 else
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No linux \"xfs\" quota available!" >&5
16543 $as_echo "$as_me: WARNING: No linux \"xfs\" quota available!" >&2;}
16544 fi
16545
16546 done
16547
16548
16549 # Checks for header files.
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
16551 $as_echo_n "checking for ANSI C header files... " >&6; }
16552 if ${ac_cv_header_stdc+:} false; then :
16553 $as_echo_n "(cached) " >&6
16554 else
16555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556 /* end confdefs.h. */
16557 #include <stdlib.h>
16558 #include <stdarg.h>
16559 #include <string.h>
16560 #include <float.h>
16561
16562 int
16563 main ()
16564 {
16565
16566 ;
16567 return 0;
16568 }
16569 _ACEOF
16570 if ac_fn_cxx_try_compile "$LINENO"; then :
16571 ac_cv_header_stdc=yes
16572 else
16573 ac_cv_header_stdc=no
16574 fi
16575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16576
16577 if test $ac_cv_header_stdc = yes; then
16578 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16580 /* end confdefs.h. */
16581 #include <string.h>
16582
16583 _ACEOF
16584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16585 $EGREP "memchr" >/dev/null 2>&1; then :
16586
16587 else
16588 ac_cv_header_stdc=no
16589 fi
16590 rm -f conftest*
16591
16592 fi
16593
16594 if test $ac_cv_header_stdc = yes; then
16595 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16597 /* end confdefs.h. */
16598 #include <stdlib.h>
16599
16600 _ACEOF
16601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16602 $EGREP "free" >/dev/null 2>&1; then :
16603
16604 else
16605 ac_cv_header_stdc=no
16606 fi
16607 rm -f conftest*
16608
16609 fi
16610
16611 if test $ac_cv_header_stdc = yes; then
16612 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16613 if test "$cross_compiling" = yes; then :
16614 :
16615 else
16616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16617 /* end confdefs.h. */
16618 #include <ctype.h>
16619 #include <stdlib.h>
16620 #if ((' ' & 0x0FF) == 0x020)
16621 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16622 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16623 #else
16624 # define ISLOWER(c) \
16625 (('a' <= (c) && (c) <= 'i') \
16626 || ('j' <= (c) && (c) <= 'r') \
16627 || ('s' <= (c) && (c) <= 'z'))
16628 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16629 #endif
16630
16631 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16632 int
16633 main ()
16634 {
16635 int i;
16636 for (i = 0; i < 256; i++)
16637 if (XOR (islower (i), ISLOWER (i))
16638 || toupper (i) != TOUPPER (i))
16639 return 2;
16640 return 0;
16641 }
16642 _ACEOF
16643 if ac_fn_cxx_try_run "$LINENO"; then :
16644
16645 else
16646 ac_cv_header_stdc=no
16647 fi
16648 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16649 conftest.$ac_objext conftest.beam conftest.$ac_ext
16650 fi
16651
16652 fi
16653 fi
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
16655 $as_echo "$ac_cv_header_stdc" >&6; }
16656 if test $ac_cv_header_stdc = yes; then
16657
16658 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
16659
16660 fi
16661
16662
16663 # Functuonal tests.
16664 ac_fn_cxx_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
16665 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
16666 ac_have_decl=1
16667 else
16668 ac_have_decl=0
16669 fi
16670
16671 cat >>confdefs.h <<_ACEOF
16672 #define HAVE_DECL_STRERROR_R $ac_have_decl
16673 _ACEOF
16674
16675 for ac_func in strerror_r
16676 do :
16677 ac_fn_cxx_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
16678 if test "x$ac_cv_func_strerror_r" = xyes; then :
16679 cat >>confdefs.h <<_ACEOF
16680 #define HAVE_STRERROR_R 1
16681 _ACEOF
16682
16683 fi
16684 done
16685
16686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
16687 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
16688 if ${ac_cv_func_strerror_r_char_p+:} false; then :
16689 $as_echo_n "(cached) " >&6
16690 else
16691
16692 ac_cv_func_strerror_r_char_p=no
16693 if test $ac_cv_have_decl_strerror_r = yes; then
16694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16695 /* end confdefs.h. */
16696 $ac_includes_default
16697 int
16698 main ()
16699 {
16700
16701 char buf[100];
16702 char x = *strerror_r (0, buf, sizeof buf);
16703 char *p = strerror_r (0, buf, sizeof buf);
16704 return !p || x;
16705
16706 ;
16707 return 0;
16708 }
16709 _ACEOF
16710 if ac_fn_cxx_try_compile "$LINENO"; then :
16711 ac_cv_func_strerror_r_char_p=yes
16712 fi
16713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16714 else
16715 # strerror_r is not declared. Choose between
16716 # systems that have relatively inaccessible declarations for the
16717 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
16718 # former has a strerror_r that returns char*, while the latter
16719 # has a strerror_r that returns `int'.
16720 # This test should segfault on the DEC system.
16721 if test "$cross_compiling" = yes; then :
16722 :
16723 else
16724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16725 /* end confdefs.h. */
16726 $ac_includes_default
16727 extern char *strerror_r ();
16728 int
16729 main ()
16730 {
16731 char buf[100];
16732 char x = *strerror_r (0, buf, sizeof buf);
16733 return ! isalpha (x);
16734 ;
16735 return 0;
16736 }
16737 _ACEOF
16738 if ac_fn_cxx_try_run "$LINENO"; then :
16739 ac_cv_func_strerror_r_char_p=yes
16740 fi
16741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16742 conftest.$ac_objext conftest.beam conftest.$ac_ext
16743 fi
16744
16745 fi
16746
16747 fi
16748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
16749 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
16750 if test $ac_cv_func_strerror_r_char_p = yes; then
16751
16752 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
16753
16754 fi
16755
16756 for ac_func in cap_compare
16757 do :
16758 ac_fn_cxx_check_func "$LINENO" "cap_compare" "ac_cv_func_cap_compare"
16759 if test "x$ac_cv_func_cap_compare" = xyes; then :
16760 cat >>confdefs.h <<_ACEOF
16761 #define HAVE_CAP_COMPARE 1
16762 _ACEOF
16763
16764 fi
16765 done
16766
16767 for ac_func in cap_clear_flag
16768 do :
16769 ac_fn_cxx_check_func "$LINENO" "cap_clear_flag" "ac_cv_func_cap_clear_flag"
16770 if test "x$ac_cv_func_cap_clear_flag" = xyes; then :
16771 cat >>confdefs.h <<_ACEOF
16772 #define HAVE_CAP_CLEAR_FLAG 1
16773 _ACEOF
16774
16775 fi
16776 done
16777
16778
16779 ac_ext=c
16780 ac_cpp='$CPP $CPPFLAGS'
16781 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16782 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16783 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16784
16785
16786 # Harvest
16787 ac_config_files="$ac_config_files Makefile Doxyfile doc/Makefile src/Makefile src/tools/Makefile src/ui-utilcpp/Makefile src/ui-utilcpp/http/Makefile"
16788
16789 cat >confcache <<\_ACEOF
16790 # This file is a shell script that caches the results of configure
16791 # tests run on this system so they can be shared between configure
16792 # scripts and configure runs, see configure's option --config-cache.
16793 # It is not useful on other systems. If it contains results you don't
16794 # want to keep, you may remove or edit it.
16795 #
16796 # config.status only pays attention to the cache file if you give it
16797 # the --recheck option to rerun configure.
16798 #
16799 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16800 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16801 # following values.
16802
16803 _ACEOF
16804
16805 # The following way of writing the cache mishandles newlines in values,
16806 # but we know of no workaround that is simple, portable, and efficient.
16807 # So, we kill variables containing newlines.
16808 # Ultrix sh set writes to stderr and can't be redirected directly,
16809 # and sets the high bit in the cache file unless we assign to the vars.
16810 (
16811 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16812 eval ac_val=\$$ac_var
16813 case $ac_val in #(
16814 *${as_nl}*)
16815 case $ac_var in #(
16816 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16817 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16818 esac
16819 case $ac_var in #(
16820 _ | IFS | as_nl) ;; #(
16821 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16822 *) { eval $ac_var=; unset $ac_var;} ;;
16823 esac ;;
16824 esac
16825 done
16826
16827 (set) 2>&1 |
16828 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16829 *${as_nl}ac_space=\ *)
16830 # `set' does not quote correctly, so add quotes: double-quote
16831 # substitution turns \\\\ into \\, and sed turns \\ into \.
16832 sed -n \
16833 "s/'/'\\\\''/g;
16834 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16835 ;; #(
16836 *)
16837 # `set' quotes correctly as required by POSIX, so do not add quotes.
16838 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16839 ;;
16840 esac |
16841 sort
16842 ) |
16843 sed '
16844 /^ac_cv_env_/b end
16845 t clear
16846 :clear
16847 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16848 t end
16849 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16850 :end' >>confcache
16851 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16852 if test -w "$cache_file"; then
16853 if test "x$cache_file" != "x/dev/null"; then
16854 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16855 $as_echo "$as_me: updating cache $cache_file" >&6;}
16856 if test ! -f "$cache_file" || test -h "$cache_file"; then
16857 cat confcache >"$cache_file"
16858 else
16859 case $cache_file in #(
16860 */* | ?:*)
16861 mv -f confcache "$cache_file"$$ &&
16862 mv -f "$cache_file"$$ "$cache_file" ;; #(
16863 *)
16864 mv -f confcache "$cache_file" ;;
16865 esac
16866 fi
16867 fi
16868 else
16869 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16870 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16871 fi
16872 fi
16873 rm -f confcache
16874
16875 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16876 # Let make expand exec_prefix.
16877 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16878
16879 DEFS=-DHAVE_CONFIG_H
16880
16881 ac_libobjs=
16882 ac_ltlibobjs=
16883 U=
16884 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16885 # 1. Remove the extension, and $U if already installed.
16886 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16887 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16888 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16889 # will be set to the directory where LIBOBJS objects are built.
16890 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16891 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16892 done
16893 LIBOBJS=$ac_libobjs
16894
16895 LTLIBOBJS=$ac_ltlibobjs
16896
16897
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
16899 $as_echo_n "checking that generated files are newer than configure... " >&6; }
16900 if test -n "$am_sleep_pid"; then
16901 # Hide warnings about reused PIDs.
16902 wait $am_sleep_pid 2>/dev/null
16903 fi
16904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16905 $as_echo "done" >&6; }
16906 if test -n "$EXEEXT"; then
16907 am__EXEEXT_TRUE=
16908 am__EXEEXT_FALSE='#'
16909 else
16910 am__EXEEXT_TRUE='#'
16911 am__EXEEXT_FALSE=
16912 fi
16913
16914 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
16915 as_fn_error $? "conditional \"AMDEP\" was never defined.
16916 Usually this means the macro was only invoked conditionally." "$LINENO" 5
16917 fi
16918 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
16919 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
16920 Usually this means the macro was only invoked conditionally." "$LINENO" 5
16921 fi
16922 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
16923 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
16924 Usually this means the macro was only invoked conditionally." "$LINENO" 5
16925 fi
16926
16927 : "${CONFIG_STATUS=./config.status}"
16928 ac_write_fail=0
16929 ac_clean_files_save=$ac_clean_files
16930 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16931 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16932 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16933 as_write_fail=0
16934 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16935 #! $SHELL
16936 # Generated by $as_me.
16937 # Run this file to recreate the current configuration.
16938 # Compiler output produced by configure, useful for debugging
16939 # configure, is in config.log if it exists.
16940
16941 debug=false
16942 ac_cs_recheck=false
16943 ac_cs_silent=false
16944
16945 SHELL=\${CONFIG_SHELL-$SHELL}
16946 export SHELL
16947 _ASEOF
16948 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16949 ## -------------------- ##
16950 ## M4sh Initialization. ##
16951 ## -------------------- ##
16952
16953 # Be more Bourne compatible
16954 DUALCASE=1; export DUALCASE # for MKS sh
16955 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16956 emulate sh
16957 NULLCMD=:
16958 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16959 # is contrary to our usage. Disable this feature.
16960 alias -g '${1+"$@"}'='"$@"'
16961 setopt NO_GLOB_SUBST
16962 else
16963 case `(set -o) 2>/dev/null` in #(
16964 *posix*) :
16965 set -o posix ;; #(
16966 *) :
16967 ;;
16968 esac
16969 fi
16970
16971
16972 as_nl='
16973 '
16974 export as_nl
16975 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16976 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16977 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16978 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16979 # Prefer a ksh shell builtin over an external printf program on Solaris,
16980 # but without wasting forks for bash or zsh.
16981 if test -z "$BASH_VERSION$ZSH_VERSION" \
16982 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16983 as_echo='print -r --'
16984 as_echo_n='print -rn --'
16985 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16986 as_echo='printf %s\n'
16987 as_echo_n='printf %s'
16988 else
16989 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16990 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16991 as_echo_n='/usr/ucb/echo -n'
16992 else
16993 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16994 as_echo_n_body='eval
16995 arg=$1;
16996 case $arg in #(
16997 *"$as_nl"*)
16998 expr "X$arg" : "X\\(.*\\)$as_nl";
16999 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17000 esac;
17001 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17002 '
17003 export as_echo_n_body
17004 as_echo_n='sh -c $as_echo_n_body as_echo'
17005 fi
17006 export as_echo_body
17007 as_echo='sh -c $as_echo_body as_echo'
17008 fi
17009
17010 # The user is always right.
17011 if test "${PATH_SEPARATOR+set}" != set; then
17012 PATH_SEPARATOR=:
17013 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17014 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17015 PATH_SEPARATOR=';'
17016 }
17017 fi
17018
17019
17020 # IFS
17021 # We need space, tab and new line, in precisely that order. Quoting is
17022 # there to prevent editors from complaining about space-tab.
17023 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17024 # splitting by setting IFS to empty value.)
17025 IFS=" "" $as_nl"
17026
17027 # Find who we are. Look in the path if we contain no directory separator.
17028 as_myself=
17029 case $0 in #((
17030 *[\\/]* ) as_myself=$0 ;;
17031 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17032 for as_dir in $PATH
17033 do
17034 IFS=$as_save_IFS
17035 test -z "$as_dir" && as_dir=.
17036 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17037 done
17038 IFS=$as_save_IFS
17039
17040 ;;
17041 esac
17042 # We did not find ourselves, most probably we were run as `sh COMMAND'
17043 # in which case we are not to be found in the path.
17044 if test "x$as_myself" = x; then
17045 as_myself=$0
17046 fi
17047 if test ! -f "$as_myself"; then
17048 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17049 exit 1
17050 fi
17051
17052 # Unset variables that we do not need and which cause bugs (e.g. in
17053 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17054 # suppresses any "Segmentation fault" message there. '((' could
17055 # trigger a bug in pdksh 5.2.14.
17056 for as_var in BASH_ENV ENV MAIL MAILPATH
17057 do eval test x\${$as_var+set} = xset \
17058 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17059 done
17060 PS1='$ '
17061 PS2='> '
17062 PS4='+ '
17063
17064 # NLS nuisances.
17065 LC_ALL=C
17066 export LC_ALL
17067 LANGUAGE=C
17068 export LANGUAGE
17069
17070 # CDPATH.
17071 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17072
17073
17074 # as_fn_error STATUS ERROR [LINENO LOG_FD]
17075 # ----------------------------------------
17076 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17077 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17078 # script with STATUS, using 1 if that was 0.
17079 as_fn_error ()
17080 {
17081 as_status=$1; test $as_status -eq 0 && as_status=1
17082 if test "$4"; then
17083 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17084 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17085 fi
17086 $as_echo "$as_me: error: $2" >&2
17087 as_fn_exit $as_status
17088 } # as_fn_error
17089
17090
17091 # as_fn_set_status STATUS
17092 # -----------------------
17093 # Set $? to STATUS, without forking.
17094 as_fn_set_status ()
17095 {
17096 return $1
17097 } # as_fn_set_status
17098
17099 # as_fn_exit STATUS
17100 # -----------------
17101 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17102 as_fn_exit ()
17103 {
17104 set +e
17105 as_fn_set_status $1
17106 exit $1
17107 } # as_fn_exit
17108
17109 # as_fn_unset VAR
17110 # ---------------
17111 # Portably unset VAR.
17112 as_fn_unset ()
17113 {
17114 { eval $1=; unset $1;}
17115 }
17116 as_unset=as_fn_unset
17117 # as_fn_append VAR VALUE
17118 # ----------------------
17119 # Append the text in VALUE to the end of the definition contained in VAR. Take
17120 # advantage of any shell optimizations that allow amortized linear growth over
17121 # repeated appends, instead of the typical quadratic growth present in naive
17122 # implementations.
17123 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17124 eval 'as_fn_append ()
17125 {
17126 eval $1+=\$2
17127 }'
17128 else
17129 as_fn_append ()
17130 {
17131 eval $1=\$$1\$2
17132 }
17133 fi # as_fn_append
17134
17135 # as_fn_arith ARG...
17136 # ------------------
17137 # Perform arithmetic evaluation on the ARGs, and store the result in the
17138 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17139 # must be portable across $(()) and expr.
17140 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17141 eval 'as_fn_arith ()
17142 {
17143 as_val=$(( $* ))
17144 }'
17145 else
17146 as_fn_arith ()
17147 {
17148 as_val=`expr "$@" || test $? -eq 1`
17149 }
17150 fi # as_fn_arith
17151
17152
17153 if expr a : '\(a\)' >/dev/null 2>&1 &&
17154 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17155 as_expr=expr
17156 else
17157 as_expr=false
17158 fi
17159
17160 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17161 as_basename=basename
17162 else
17163 as_basename=false
17164 fi
17165
17166 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17167 as_dirname=dirname
17168 else
17169 as_dirname=false
17170 fi
17171
17172 as_me=`$as_basename -- "$0" ||
17173 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17174 X"$0" : 'X\(//\)$' \| \
17175 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17176 $as_echo X/"$0" |
17177 sed '/^.*\/\([^/][^/]*\)\/*$/{
17178 s//\1/
17179 q
17180 }
17181 /^X\/\(\/\/\)$/{
17182 s//\1/
17183 q
17184 }
17185 /^X\/\(\/\).*/{
17186 s//\1/
17187 q
17188 }
17189 s/.*/./; q'`
17190
17191 # Avoid depending upon Character Ranges.
17192 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17193 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17194 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17195 as_cr_digits='0123456789'
17196 as_cr_alnum=$as_cr_Letters$as_cr_digits
17197
17198 ECHO_C= ECHO_N= ECHO_T=
17199 case `echo -n x` in #(((((
17200 -n*)
17201 case `echo 'xy\c'` in
17202 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17203 xy) ECHO_C='\c';;
17204 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17205 ECHO_T=' ';;
17206 esac;;
17207 *)
17208 ECHO_N='-n';;
17209 esac
17210
17211 rm -f conf$$ conf$$.exe conf$$.file
17212 if test -d conf$$.dir; then
17213 rm -f conf$$.dir/conf$$.file
17214 else
17215 rm -f conf$$.dir
17216 mkdir conf$$.dir 2>/dev/null
17217 fi
17218 if (echo >conf$$.file) 2>/dev/null; then
17219 if ln -s conf$$.file conf$$ 2>/dev/null; then
17220 as_ln_s='ln -s'
17221 # ... but there are two gotchas:
17222 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17223 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17224 # In both cases, we have to default to `cp -pR'.
17225 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17226 as_ln_s='cp -pR'
17227 elif ln conf$$.file conf$$ 2>/dev/null; then
17228 as_ln_s=ln
17229 else
17230 as_ln_s='cp -pR'
17231 fi
17232 else
17233 as_ln_s='cp -pR'
17234 fi
17235 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17236 rmdir conf$$.dir 2>/dev/null
17237
17238
17239 # as_fn_mkdir_p
17240 # -------------
17241 # Create "$as_dir" as a directory, including parents if necessary.
17242 as_fn_mkdir_p ()
17243 {
17244
17245 case $as_dir in #(
17246 -*) as_dir=./$as_dir;;
17247 esac
17248 test -d "$as_dir" || eval $as_mkdir_p || {
17249 as_dirs=
17250 while :; do
17251 case $as_dir in #(
17252 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17253 *) as_qdir=$as_dir;;
17254 esac
17255 as_dirs="'$as_qdir' $as_dirs"
17256 as_dir=`$as_dirname -- "$as_dir" ||
17257 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17258 X"$as_dir" : 'X\(//\)[^/]' \| \
17259 X"$as_dir" : 'X\(//\)$' \| \
17260 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17261 $as_echo X"$as_dir" |
17262 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17263 s//\1/
17264 q
17265 }
17266 /^X\(\/\/\)[^/].*/{
17267 s//\1/
17268 q
17269 }
17270 /^X\(\/\/\)$/{
17271 s//\1/
17272 q
17273 }
17274 /^X\(\/\).*/{
17275 s//\1/
17276 q
17277 }
17278 s/.*/./; q'`
17279 test -d "$as_dir" && break
17280 done
17281 test -z "$as_dirs" || eval "mkdir $as_dirs"
17282 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17283
17284
17285 } # as_fn_mkdir_p
17286 if mkdir -p . 2>/dev/null; then
17287 as_mkdir_p='mkdir -p "$as_dir"'
17288 else
17289 test -d ./-p && rmdir ./-p
17290 as_mkdir_p=false
17291 fi
17292
17293
17294 # as_fn_executable_p FILE
17295 # -----------------------
17296 # Test if FILE is an executable regular file.
17297 as_fn_executable_p ()
17298 {
17299 test -f "$1" && test -x "$1"
17300 } # as_fn_executable_p
17301 as_test_x='test -x'
17302 as_executable_p=as_fn_executable_p
17303
17304 # Sed expression to map a string onto a valid CPP name.
17305 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17306
17307 # Sed expression to map a string onto a valid variable name.
17308 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17309
17310
17311 exec 6>&1
17312 ## ----------------------------------- ##
17313 ## Main body of $CONFIG_STATUS script. ##
17314 ## ----------------------------------- ##
17315 _ASEOF
17316 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17317
17318 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17319 # Save the log message, to keep $0 and so on meaningful, and to
17320 # report actual input values of CONFIG_FILES etc. instead of their
17321 # values after options handling.
17322 ac_log="
17323 This file was extended by ui-utilcpp $as_me 1.8.1.snapshot20140701142031weslok, which was
17324 generated by GNU Autoconf 2.69. Invocation command line was
17325
17326 CONFIG_FILES = $CONFIG_FILES
17327 CONFIG_HEADERS = $CONFIG_HEADERS
17328 CONFIG_LINKS = $CONFIG_LINKS
17329 CONFIG_COMMANDS = $CONFIG_COMMANDS
17330 $ $0 $@
17331
17332 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17333 "
17334
17335 _ACEOF
17336
17337 case $ac_config_files in *"
17338 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17339 esac
17340
17341 case $ac_config_headers in *"
17342 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17343 esac
17344
17345
17346 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17347 # Files that config.status was made for.
17348 config_files="$ac_config_files"
17349 config_headers="$ac_config_headers"
17350 config_commands="$ac_config_commands"
17351
17352 _ACEOF
17353
17354 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17355 ac_cs_usage="\
17356 \`$as_me' instantiates files and other configuration actions
17357 from templates according to the current configuration. Unless the files
17358 and actions are specified as TAGs, all are instantiated by default.
17359
17360 Usage: $0 [OPTION]... [TAG]...
17361
17362 -h, --help print this help, then exit
17363 -V, --version print version number and configuration settings, then exit
17364 --config print configuration, then exit
17365 -q, --quiet, --silent
17366 do not print progress messages
17367 -d, --debug don't remove temporary files
17368 --recheck update $as_me by reconfiguring in the same conditions
17369 --file=FILE[:TEMPLATE]
17370 instantiate the configuration file FILE
17371 --header=FILE[:TEMPLATE]
17372 instantiate the configuration header FILE
17373
17374 Configuration files:
17375 $config_files
17376
17377 Configuration headers:
17378 $config_headers
17379
17380 Configuration commands:
17381 $config_commands
17382
17383 Report bugs to the package provider."
17384
17385 _ACEOF
17386 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17387 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17388 ac_cs_version="\\
17389 ui-utilcpp config.status 1.8.1.snapshot20140701142031weslok
17390 configured by $0, generated by GNU Autoconf 2.69,
17391 with options \\"\$ac_cs_config\\"
17392
17393 Copyright (C) 2012 Free Software Foundation, Inc.
17394 This config.status script is free software; the Free Software Foundation
17395 gives unlimited permission to copy, distribute and modify it."
17396
17397 ac_pwd='$ac_pwd'
17398 srcdir='$srcdir'
17399 INSTALL='$INSTALL'
17400 MKDIR_P='$MKDIR_P'
17401 AWK='$AWK'
17402 test -n "\$AWK" || AWK=awk
17403 _ACEOF
17404
17405 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17406 # The default lists apply if the user does not specify any file.
17407 ac_need_defaults=:
17408 while test $# != 0
17409 do
17410 case $1 in
17411 --*=?*)
17412 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17413 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17414 ac_shift=:
17415 ;;
17416 --*=)
17417 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17418 ac_optarg=
17419 ac_shift=:
17420 ;;
17421 *)
17422 ac_option=$1
17423 ac_optarg=$2
17424 ac_shift=shift
17425 ;;
17426 esac
17427
17428 case $ac_option in
17429 # Handling of the options.
17430 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17431 ac_cs_recheck=: ;;
17432 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17433 $as_echo "$ac_cs_version"; exit ;;
17434 --config | --confi | --conf | --con | --co | --c )
17435 $as_echo "$ac_cs_config"; exit ;;
17436 --debug | --debu | --deb | --de | --d | -d )
17437 debug=: ;;
17438 --file | --fil | --fi | --f )
17439 $ac_shift
17440 case $ac_optarg in
17441 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17442 '') as_fn_error $? "missing file argument" ;;
17443 esac
17444 as_fn_append CONFIG_FILES " '$ac_optarg'"
17445 ac_need_defaults=false;;
17446 --header | --heade | --head | --hea )
17447 $ac_shift
17448 case $ac_optarg in
17449 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17450 esac
17451 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17452 ac_need_defaults=false;;
17453 --he | --h)
17454 # Conflict between --help and --header
17455 as_fn_error $? "ambiguous option: \`$1'
17456 Try \`$0 --help' for more information.";;
17457 --help | --hel | -h )
17458 $as_echo "$ac_cs_usage"; exit ;;
17459 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17460 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17461 ac_cs_silent=: ;;
17462
17463 # This is an error.
17464 -*) as_fn_error $? "unrecognized option: \`$1'
17465 Try \`$0 --help' for more information." ;;
17466
17467 *) as_fn_append ac_config_targets " $1"
17468 ac_need_defaults=false ;;
17469
17470 esac
17471 shift
17472 done
17473
17474 ac_configure_extra_args=
17475
17476 if $ac_cs_silent; then
17477 exec 6>/dev/null
17478 ac_configure_extra_args="$ac_configure_extra_args --silent"
17479 fi
17480
17481 _ACEOF
17482 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17483 if \$ac_cs_recheck; then
17484 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17485 shift
17486 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17487 CONFIG_SHELL='$SHELL'
17488 export CONFIG_SHELL
17489 exec "\$@"
17490 fi
17491
17492 _ACEOF
17493 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17494 exec 5>>config.log
17495 {
17496 echo
17497 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17498 ## Running $as_me. ##
17499 _ASBOX
17500 $as_echo "$ac_log"
17501 } >&5
17502
17503 _ACEOF
17504 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17505 #
17506 # INIT-COMMANDS
17507 #
17508 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
17509
17510
17511 # The HP-UX ksh and POSIX shell print the target directory to stdout
17512 # if CDPATH is set.
17513 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17514
17515 sed_quote_subst='$sed_quote_subst'
17516 double_quote_subst='$double_quote_subst'
17517 delay_variable_subst='$delay_variable_subst'
17518 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
17519 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
17520 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
17521 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
17522 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
17523 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
17524 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
17525 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
17526 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
17527 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
17528 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
17529 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
17530 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
17531 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
17532 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
17533 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
17534 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
17535 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
17536 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
17537 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
17538 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
17539 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
17540 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
17541 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
17542 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
17543 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
17544 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
17545 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
17546 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
17547 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
17548 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
17549 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
17550 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
17551 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
17552 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
17553 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
17554 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
17555 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
17556 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
17557 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
17558 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
17559 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
17560 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
17561 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
17562 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
17563 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
17564 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
17565 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
17566 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
17567 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
17568 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
17569 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
17570 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
17571 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
17572 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
17573 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
17574 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"`'
17575 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
17576 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
17577 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
17578 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
17579 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
17580 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
17581 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
17582 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
17583 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
17584 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
17585 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
17586 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
17587 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
17588 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
17589 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
17590 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
17591 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
17592 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
17593 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
17594 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
17595 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
17596 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
17597 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
17598 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
17599 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
17600 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
17601 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
17602 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
17603 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
17604 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
17605 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
17606 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
17607 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
17608 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
17609 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
17610 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
17611 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
17612 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
17613 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
17614 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
17615 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
17616 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
17617 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
17618 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
17619 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
17620 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
17621 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
17622 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
17623 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
17624 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
17625 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
17626 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
17627 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
17628 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
17629 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
17630 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
17631 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
17632 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
17633 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
17634 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
17635 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
17636 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
17637 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
17638 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
17639 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
17640 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
17641 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
17642 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
17643 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
17644 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
17645 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
17646 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
17647 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
17648 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
17649 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
17650 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
17651 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
17652 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
17653 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
17654 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
17655 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
17656 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17657 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17658 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
17659 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
17660 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
17661 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
17662 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
17663 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
17664 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
17665 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
17666 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
17667 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
17668 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
17669 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
17670 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17671 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17672 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17673 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17674 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17675 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17676 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
17677 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
17678 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
17679 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
17680 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
17681 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
17682 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
17683 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
17684 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
17685 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
17686 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
17687 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
17688 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
17689 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17690 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
17691 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
17692 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17693 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
17694 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
17695 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
17696 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
17697 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
17698 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
17699 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
17700 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
17701 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
17702
17703 LTCC='$LTCC'
17704 LTCFLAGS='$LTCFLAGS'
17705 compiler='$compiler_DEFAULT'
17706
17707 # A function that is used when there is no print builtin or printf.
17708 func_fallback_echo ()
17709 {
17710 eval 'cat <<_LTECHO_EOF
17711 \$1
17712 _LTECHO_EOF'
17713 }
17714
17715 # Quote evaled strings.
17716 for var in SHELL \
17717 ECHO \
17718 PATH_SEPARATOR \
17719 SED \
17720 GREP \
17721 EGREP \
17722 FGREP \
17723 LD \
17724 NM \
17725 LN_S \
17726 lt_SP2NL \
17727 lt_NL2SP \
17728 reload_flag \
17729 OBJDUMP \
17730 deplibs_check_method \
17731 file_magic_cmd \
17732 file_magic_glob \
17733 want_nocaseglob \
17734 DLLTOOL \
17735 sharedlib_from_linklib_cmd \
17736 AR \
17737 AR_FLAGS \
17738 archiver_list_spec \
17739 STRIP \
17740 RANLIB \
17741 CC \
17742 CFLAGS \
17743 compiler \
17744 lt_cv_sys_global_symbol_pipe \
17745 lt_cv_sys_global_symbol_to_cdecl \
17746 lt_cv_sys_global_symbol_to_c_name_address \
17747 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
17748 nm_file_list_spec \
17749 lt_prog_compiler_no_builtin_flag \
17750 lt_prog_compiler_pic \
17751 lt_prog_compiler_wl \
17752 lt_prog_compiler_static \
17753 lt_cv_prog_compiler_c_o \
17754 need_locks \
17755 MANIFEST_TOOL \
17756 DSYMUTIL \
17757 NMEDIT \
17758 LIPO \
17759 OTOOL \
17760 OTOOL64 \
17761 shrext_cmds \
17762 export_dynamic_flag_spec \
17763 whole_archive_flag_spec \
17764 compiler_needs_object \
17765 with_gnu_ld \
17766 allow_undefined_flag \
17767 no_undefined_flag \
17768 hardcode_libdir_flag_spec \
17769 hardcode_libdir_separator \
17770 exclude_expsyms \
17771 include_expsyms \
17772 file_list_spec \
17773 variables_saved_for_relink \
17774 libname_spec \
17775 library_names_spec \
17776 soname_spec \
17777 install_override_mode \
17778 finish_eval \
17779 old_striplib \
17780 striplib \
17781 compiler_lib_search_dirs \
17782 predep_objects \
17783 postdep_objects \
17784 predeps \
17785 postdeps \
17786 compiler_lib_search_path \
17787 LD_CXX \
17788 reload_flag_CXX \
17789 compiler_CXX \
17790 lt_prog_compiler_no_builtin_flag_CXX \
17791 lt_prog_compiler_pic_CXX \
17792 lt_prog_compiler_wl_CXX \
17793 lt_prog_compiler_static_CXX \
17794 lt_cv_prog_compiler_c_o_CXX \
17795 export_dynamic_flag_spec_CXX \
17796 whole_archive_flag_spec_CXX \
17797 compiler_needs_object_CXX \
17798 with_gnu_ld_CXX \
17799 allow_undefined_flag_CXX \
17800 no_undefined_flag_CXX \
17801 hardcode_libdir_flag_spec_CXX \
17802 hardcode_libdir_separator_CXX \
17803 exclude_expsyms_CXX \
17804 include_expsyms_CXX \
17805 file_list_spec_CXX \
17806 compiler_lib_search_dirs_CXX \
17807 predep_objects_CXX \
17808 postdep_objects_CXX \
17809 predeps_CXX \
17810 postdeps_CXX \
17811 compiler_lib_search_path_CXX; do
17812 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
17813 *[\\\\\\\`\\"\\\$]*)
17814 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
17815 ;;
17816 *)
17817 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17818 ;;
17819 esac
17820 done
17821
17822 # Double-quote double-evaled strings.
17823 for var in reload_cmds \
17824 old_postinstall_cmds \
17825 old_postuninstall_cmds \
17826 old_archive_cmds \
17827 extract_expsyms_cmds \
17828 old_archive_from_new_cmds \
17829 old_archive_from_expsyms_cmds \
17830 archive_cmds \
17831 archive_expsym_cmds \
17832 module_cmds \
17833 module_expsym_cmds \
17834 export_symbols_cmds \
17835 prelink_cmds \
17836 postlink_cmds \
17837 postinstall_cmds \
17838 postuninstall_cmds \
17839 finish_cmds \
17840 sys_lib_search_path_spec \
17841 sys_lib_dlsearch_path_spec \
17842 reload_cmds_CXX \
17843 old_archive_cmds_CXX \
17844 old_archive_from_new_cmds_CXX \
17845 old_archive_from_expsyms_cmds_CXX \
17846 archive_cmds_CXX \
17847 archive_expsym_cmds_CXX \
17848 module_cmds_CXX \
17849 module_expsym_cmds_CXX \
17850 export_symbols_cmds_CXX \
17851 prelink_cmds_CXX \
17852 postlink_cmds_CXX; do
17853 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
17854 *[\\\\\\\`\\"\\\$]*)
17855 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
17856 ;;
17857 *)
17858 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17859 ;;
17860 esac
17861 done
17862
17863 ac_aux_dir='$ac_aux_dir'
17864 xsi_shell='$xsi_shell'
17865 lt_shell_append='$lt_shell_append'
17866
17867 # See if we are running on zsh, and set the options which allow our
17868 # commands through without removal of \ escapes INIT.
17869 if test -n "\${ZSH_VERSION+set}" ; then
17870 setopt NO_GLOB_SUBST
17871 fi
17872
17873
17874 PACKAGE='$PACKAGE'
17875 VERSION='$VERSION'
17876 TIMESTAMP='$TIMESTAMP'
17877 RM='$RM'
17878 ofile='$ofile'
17879
17880
17881
17882
17883
17884
17885 _ACEOF
17886
17887 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17888
17889 # Handling of arguments.
17890 for ac_config_target in $ac_config_targets
17891 do
17892 case $ac_config_target in
17893 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
17894 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
17895 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
17896 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17897 "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
17898 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
17899 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
17900 "src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
17901 "src/ui-utilcpp/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui-utilcpp/Makefile" ;;
17902 "src/ui-utilcpp/http/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui-utilcpp/http/Makefile" ;;
17903
17904 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17905 esac
17906 done
17907
17908
17909 # If the user did not use the arguments to specify the items to instantiate,
17910 # then the envvar interface is used. Set only those that are not.
17911 # We use the long form for the default assignment because of an extremely
17912 # bizarre bug on SunOS 4.1.3.
17913 if $ac_need_defaults; then
17914 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17915 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17916 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17917 fi
17918
17919 # Have a temporary directory for convenience. Make it in the build tree
17920 # simply because there is no reason against having it here, and in addition,
17921 # creating and moving files from /tmp can sometimes cause problems.
17922 # Hook for its removal unless debugging.
17923 # Note that there is a small window in which the directory will not be cleaned:
17924 # after its creation but before its name has been assigned to `$tmp'.
17925 $debug ||
17926 {
17927 tmp= ac_tmp=
17928 trap 'exit_status=$?
17929 : "${ac_tmp:=$tmp}"
17930 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17931 ' 0
17932 trap 'as_fn_exit 1' 1 2 13 15
17933 }
17934 # Create a (secure) tmp directory for tmp files.
17935
17936 {
17937 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17938 test -d "$tmp"
17939 } ||
17940 {
17941 tmp=./conf$$-$RANDOM
17942 (umask 077 && mkdir "$tmp")
17943 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17944 ac_tmp=$tmp
17945
17946 # Set up the scripts for CONFIG_FILES section.
17947 # No need to generate them if there are no CONFIG_FILES.
17948 # This happens for instance with `./config.status config.h'.
17949 if test -n "$CONFIG_FILES"; then
17950
17951 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
17952 ac_cs_awk_getline=:
17953 ac_cs_awk_pipe_init=
17954 ac_cs_awk_read_file='
17955 while ((getline aline < (F[key])) > 0)
17956 print(aline)
17957 close(F[key])'
17958 ac_cs_awk_pipe_fini=
17959 else
17960 ac_cs_awk_getline=false
17961 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
17962 ac_cs_awk_read_file='
17963 print "|#_!!_#|"
17964 print "cat " F[key] " &&"
17965 '$ac_cs_awk_pipe_init
17966 # The final `:' finishes the AND list.
17967 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
17968 fi
17969 ac_cr=`echo X | tr X '\015'`
17970 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17971 # But we know of no other shell where ac_cr would be empty at this
17972 # point, so we can use a bashism as a fallback.
17973 if test "x$ac_cr" = x; then
17974 eval ac_cr=\$\'\\r\'
17975 fi
17976 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17977 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17978 ac_cs_awk_cr='\\r'
17979 else
17980 ac_cs_awk_cr=$ac_cr
17981 fi
17982
17983 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17984 _ACEOF
17985
17986 # Create commands to substitute file output variables.
17987 {
17988 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
17989 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
17990 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
17991 echo "_ACAWK" &&
17992 echo "_ACEOF"
17993 } >conf$$files.sh &&
17994 . ./conf$$files.sh ||
17995 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17996 rm -f conf$$files.sh
17997
17998 {
17999 echo "cat >conf$$subs.awk <<_ACEOF" &&
18000 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18001 echo "_ACEOF"
18002 } >conf$$subs.sh ||
18003 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18004 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18005 ac_delim='%!_!# '
18006 for ac_last_try in false false false false false :; do
18007 . ./conf$$subs.sh ||
18008 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18009
18010 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18011 if test $ac_delim_n = $ac_delim_num; then
18012 break
18013 elif $ac_last_try; then
18014 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18015 else
18016 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18017 fi
18018 done
18019 rm -f conf$$subs.sh
18020
18021 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18022 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18023 _ACEOF
18024 sed -n '
18025 h
18026 s/^/S["/; s/!.*/"]=/
18027 p
18028 g
18029 s/^[^!]*!//
18030 :repl
18031 t repl
18032 s/'"$ac_delim"'$//
18033 t delim
18034 :nl
18035 h
18036 s/\(.\{148\}\)..*/\1/
18037 t more1
18038 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18039 p
18040 n
18041 b repl
18042 :more1
18043 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18044 p
18045 g
18046 s/.\{148\}//
18047 t nl
18048 :delim
18049 h
18050 s/\(.\{148\}\)..*/\1/
18051 t more2
18052 s/["\\]/\\&/g; s/^/"/; s/$/"/
18053 p
18054 b
18055 :more2
18056 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18057 p
18058 g
18059 s/.\{148\}//
18060 t delim
18061 ' <conf$$subs.awk | sed '
18062 /^[^""]/{
18063 N
18064 s/\n//
18065 }
18066 ' >>$CONFIG_STATUS || ac_write_fail=1
18067 rm -f conf$$subs.awk
18068 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18069 _ACAWK
18070 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18071 for (key in S) S_is_set[key] = 1
18072 FS = ""
18073 \$ac_cs_awk_pipe_init
18074 }
18075 {
18076 line = $ 0
18077 nfields = split(line, field, "@")
18078 substed = 0
18079 len = length(field[1])
18080 for (i = 2; i < nfields; i++) {
18081 key = field[i]
18082 keylen = length(key)
18083 if (S_is_set[key]) {
18084 value = S[key]
18085 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18086 len += length(value) + length(field[++i])
18087 substed = 1
18088 } else
18089 len += 1 + keylen
18090 }
18091 if (nfields == 3 && !substed) {
18092 key = field[2]
18093 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
18094 \$ac_cs_awk_read_file
18095 next
18096 }
18097 }
18098 print line
18099 }
18100 \$ac_cs_awk_pipe_fini
18101 _ACAWK
18102 _ACEOF
18103 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18104 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18105 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18106 else
18107 cat
18108 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18109 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18110 _ACEOF
18111
18112 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18113 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18114 # trailing colons and then remove the whole line if VPATH becomes empty
18115 # (actually we leave an empty line to preserve line numbers).
18116 if test "x$srcdir" = x.; then
18117 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18118 h
18119 s///
18120 s/^/:/
18121 s/[ ]*$/:/
18122 s/:\$(srcdir):/:/g
18123 s/:\${srcdir}:/:/g
18124 s/:@srcdir@:/:/g
18125 s/^:*//
18126 s/:*$//
18127 x
18128 s/\(=[ ]*\).*/\1/
18129 G
18130 s/\n//
18131 s/^[^=]*=[ ]*$//
18132 }'
18133 fi
18134
18135 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18136 fi # test -n "$CONFIG_FILES"
18137
18138 # Set up the scripts for CONFIG_HEADERS section.
18139 # No need to generate them if there are no CONFIG_HEADERS.
18140 # This happens for instance with `./config.status Makefile'.
18141 if test -n "$CONFIG_HEADERS"; then
18142 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18143 BEGIN {
18144 _ACEOF
18145
18146 # Transform confdefs.h into an awk script `defines.awk', embedded as
18147 # here-document in config.status, that substitutes the proper values into
18148 # config.h.in to produce config.h.
18149
18150 # Create a delimiter string that does not exist in confdefs.h, to ease
18151 # handling of long lines.
18152 ac_delim='%!_!# '
18153 for ac_last_try in false false :; do
18154 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18155 if test -z "$ac_tt"; then
18156 break
18157 elif $ac_last_try; then
18158 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18159 else
18160 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18161 fi
18162 done
18163
18164 # For the awk script, D is an array of macro values keyed by name,
18165 # likewise P contains macro parameters if any. Preserve backslash
18166 # newline sequences.
18167
18168 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18169 sed -n '
18170 s/.\{148\}/&'"$ac_delim"'/g
18171 t rset
18172 :rset
18173 s/^[ ]*#[ ]*define[ ][ ]*/ /
18174 t def
18175 d
18176 :def
18177 s/\\$//
18178 t bsnl
18179 s/["\\]/\\&/g
18180 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18181 D["\1"]=" \3"/p
18182 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18183 d
18184 :bsnl
18185 s/["\\]/\\&/g
18186 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18187 D["\1"]=" \3\\\\\\n"\\/p
18188 t cont
18189 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18190 t cont
18191 d
18192 :cont
18193 n
18194 s/.\{148\}/&'"$ac_delim"'/g
18195 t clear
18196 :clear
18197 s/\\$//
18198 t bsnlc
18199 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18200 d
18201 :bsnlc
18202 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18203 b cont
18204 ' <confdefs.h | sed '
18205 s/'"$ac_delim"'/"\\\
18206 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18207
18208 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18209 for (key in D) D_is_set[key] = 1
18210 FS = ""
18211 }
18212 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18213 line = \$ 0
18214 split(line, arg, " ")
18215 if (arg[1] == "#") {
18216 defundef = arg[2]
18217 mac1 = arg[3]
18218 } else {
18219 defundef = substr(arg[1], 2)
18220 mac1 = arg[2]
18221 }
18222 split(mac1, mac2, "(") #)
18223 macro = mac2[1]
18224 prefix = substr(line, 1, index(line, defundef) - 1)
18225 if (D_is_set[macro]) {
18226 # Preserve the white space surrounding the "#".
18227 print prefix "define", macro P[macro] D[macro]
18228 next
18229 } else {
18230 # Replace #undef with comments. This is necessary, for example,
18231 # in the case of _POSIX_SOURCE, which is predefined and required
18232 # on some systems where configure will not decide to define it.
18233 if (defundef == "undef") {
18234 print "/*", prefix defundef, macro, "*/"
18235 next
18236 }
18237 }
18238 }
18239 { print }
18240 _ACAWK
18241 _ACEOF
18242 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18243 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18244 fi # test -n "$CONFIG_HEADERS"
18245
18246
18247 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
18248 shift
18249 for ac_tag
18250 do
18251 case $ac_tag in
18252 :[FHLC]) ac_mode=$ac_tag; continue;;
18253 esac
18254 case $ac_mode$ac_tag in
18255 :[FHL]*:*);;
18256 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
18257 :[FH]-) ac_tag=-:-;;
18258 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18259 esac
18260 ac_save_IFS=$IFS
18261 IFS=:
18262 set x $ac_tag
18263 IFS=$ac_save_IFS
18264 shift
18265 ac_file=$1
18266 shift
18267
18268 case $ac_mode in
18269 :L) ac_source=$1;;
18270 :[FH])
18271 ac_file_inputs=
18272 for ac_f
18273 do
18274 case $ac_f in
18275 -) ac_f="$ac_tmp/stdin";;
18276 *) # Look for the file first in the build tree, then in the source tree
18277 # (if the path is not absolute). The absolute path cannot be DOS-style,
18278 # because $ac_f cannot contain `:'.
18279 test -f "$ac_f" ||
18280 case $ac_f in
18281 [\\/$]*) false;;
18282 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18283 esac ||
18284 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18285 esac
18286 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18287 as_fn_append ac_file_inputs " '$ac_f'"
18288 done
18289
18290 # Let's still pretend it is `configure' which instantiates (i.e., don't
18291 # use $as_me), people would be surprised to read:
18292 # /* config.h. Generated by config.status. */
18293 configure_input='Generated from '`
18294 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18295 `' by configure.'
18296 if test x"$ac_file" != x-; then
18297 configure_input="$ac_file. $configure_input"
18298 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18299 $as_echo "$as_me: creating $ac_file" >&6;}
18300 fi
18301 # Neutralize special characters interpreted by sed in replacement strings.
18302 case $configure_input in #(
18303 *\&* | *\|* | *\\* )
18304 ac_sed_conf_input=`$as_echo "$configure_input" |
18305 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18306 *) ac_sed_conf_input=$configure_input;;
18307 esac
18308
18309 case $ac_tag in
18310 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18311 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
18312 esac
18313 ;;
18314 esac
18315
18316 ac_dir=`$as_dirname -- "$ac_file" ||
18317 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18318 X"$ac_file" : 'X\(//\)[^/]' \| \
18319 X"$ac_file" : 'X\(//\)$' \| \
18320 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18321 $as_echo X"$ac_file" |
18322 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18323 s//\1/
18324 q
18325 }
18326 /^X\(\/\/\)[^/].*/{
18327 s//\1/
18328 q
18329 }
18330 /^X\(\/\/\)$/{
18331 s//\1/
18332 q
18333 }
18334 /^X\(\/\).*/{
18335 s//\1/
18336 q
18337 }
18338 s/.*/./; q'`
18339 as_dir="$ac_dir"; as_fn_mkdir_p
18340 ac_builddir=.
18341
18342 case "$ac_dir" in
18343 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18344 *)
18345 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18346 # A ".." for each directory in $ac_dir_suffix.
18347 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18348 case $ac_top_builddir_sub in
18349 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18350 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18351 esac ;;
18352 esac
18353 ac_abs_top_builddir=$ac_pwd
18354 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18355 # for backward compatibility:
18356 ac_top_builddir=$ac_top_build_prefix
18357
18358 case $srcdir in
18359 .) # We are building in place.
18360 ac_srcdir=.
18361 ac_top_srcdir=$ac_top_builddir_sub
18362 ac_abs_top_srcdir=$ac_pwd ;;
18363 [\\/]* | ?:[\\/]* ) # Absolute name.
18364 ac_srcdir=$srcdir$ac_dir_suffix;
18365 ac_top_srcdir=$srcdir
18366 ac_abs_top_srcdir=$srcdir ;;
18367 *) # Relative name.
18368 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18369 ac_top_srcdir=$ac_top_build_prefix$srcdir
18370 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18371 esac
18372 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18373
18374
18375 case $ac_mode in
18376 :F)
18377 #
18378 # CONFIG_FILE
18379 #
18380
18381 case $INSTALL in
18382 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18383 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18384 esac
18385 ac_MKDIR_P=$MKDIR_P
18386 case $MKDIR_P in
18387 [\\/$]* | ?:[\\/]* ) ;;
18388 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18389 esac
18390 _ACEOF
18391
18392 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18393 # If the template does not know about datarootdir, expand it.
18394 # FIXME: This hack should be removed a few years after 2.60.
18395 ac_datarootdir_hack=; ac_datarootdir_seen=
18396 ac_sed_dataroot='
18397 /datarootdir/ {
18398 p
18399 q
18400 }
18401 /@datadir@/p
18402 /@docdir@/p
18403 /@infodir@/p
18404 /@localedir@/p
18405 /@mandir@/p'
18406 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18407 *datarootdir*) ac_datarootdir_seen=yes;;
18408 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18409 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18410 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18411 _ACEOF
18412 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18413 ac_datarootdir_hack='
18414 s&@datadir@&$datadir&g
18415 s&@docdir@&$docdir&g
18416 s&@infodir@&$infodir&g
18417 s&@localedir@&$localedir&g
18418 s&@mandir@&$mandir&g
18419 s&\\\${datarootdir}&$datarootdir&g' ;;
18420 esac
18421 _ACEOF
18422
18423 # Neutralize VPATH when `$srcdir' = `.'.
18424 # Shell code in configure.ac might set extrasub.
18425 # FIXME: do we really want to maintain this feature?
18426 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18427 ac_sed_extra="$ac_vpsub
18428 $extrasub
18429 _ACEOF
18430 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18431 :t
18432 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18433 s|@configure_input@|$ac_sed_conf_input|;t t
18434 s&@top_builddir@&$ac_top_builddir_sub&;t t
18435 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18436 s&@srcdir@&$ac_srcdir&;t t
18437 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18438 s&@top_srcdir@&$ac_top_srcdir&;t t
18439 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18440 s&@builddir@&$ac_builddir&;t t
18441 s&@abs_builddir@&$ac_abs_builddir&;t t
18442 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18443 s&@INSTALL@&$ac_INSTALL&;t t
18444 s&@MKDIR_P@&$ac_MKDIR_P&;t t
18445 $ac_datarootdir_hack
18446 "
18447 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
18448 if $ac_cs_awk_getline; then
18449 $AWK -f "$ac_tmp/subs.awk"
18450 else
18451 $AWK -f "$ac_tmp/subs.awk" | $SHELL
18452 fi \
18453 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18454
18455 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18456 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18457 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18458 "$ac_tmp/out"`; test -z "$ac_out"; } &&
18459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18460 which seems to be undefined. Please make sure it is defined" >&5
18461 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18462 which seems to be undefined. Please make sure it is defined" >&2;}
18463
18464 rm -f "$ac_tmp/stdin"
18465 case $ac_file in
18466 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18467 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18468 esac \
18469 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18470 ;;
18471 :H)
18472 #
18473 # CONFIG_HEADER
18474 #
18475 if test x"$ac_file" != x-; then
18476 {
18477 $as_echo "/* $configure_input */" \
18478 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18479 } >"$ac_tmp/config.h" \
18480 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18481 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18482 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18483 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18484 else
18485 rm -f "$ac_file"
18486 mv "$ac_tmp/config.h" "$ac_file" \
18487 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18488 fi
18489 else
18490 $as_echo "/* $configure_input */" \
18491 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18492 || as_fn_error $? "could not create -" "$LINENO" 5
18493 fi
18494 # Compute "$ac_file"'s index in $config_headers.
18495 _am_arg="$ac_file"
18496 _am_stamp_count=1
18497 for _am_header in $config_headers :; do
18498 case $_am_header in
18499 $_am_arg | $_am_arg:* )
18500 break ;;
18501 * )
18502 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
18503 esac
18504 done
18505 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
18506 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18507 X"$_am_arg" : 'X\(//\)[^/]' \| \
18508 X"$_am_arg" : 'X\(//\)$' \| \
18509 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
18510 $as_echo X"$_am_arg" |
18511 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18512 s//\1/
18513 q
18514 }
18515 /^X\(\/\/\)[^/].*/{
18516 s//\1/
18517 q
18518 }
18519 /^X\(\/\/\)$/{
18520 s//\1/
18521 q
18522 }
18523 /^X\(\/\).*/{
18524 s//\1/
18525 q
18526 }
18527 s/.*/./; q'`/stamp-h$_am_stamp_count
18528 ;;
18529
18530 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18531 $as_echo "$as_me: executing $ac_file commands" >&6;}
18532 ;;
18533 esac
18534
18535
18536 case $ac_file$ac_mode in
18537 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
18538 # Older Autoconf quotes --file arguments for eval, but not when files
18539 # are listed without --file. Let's play safe and only enable the eval
18540 # if we detect the quoting.
18541 case $CONFIG_FILES in
18542 *\'*) eval set x "$CONFIG_FILES" ;;
18543 *) set x $CONFIG_FILES ;;
18544 esac
18545 shift
18546 for mf
18547 do
18548 # Strip MF so we end up with the name of the file.
18549 mf=`echo "$mf" | sed -e 's/:.*$//'`
18550 # Check whether this is an Automake generated Makefile or not.
18551 # We used to match only the files named 'Makefile.in', but
18552 # some people rename them; so instead we look at the file content.
18553 # Grep'ing the first line is not enough: some people post-process
18554 # each Makefile.in and add a new line on top of each file to say so.
18555 # Grep'ing the whole file is not good either: AIX grep has a line
18556 # limit of 2048, but all sed's we know have understand at least 4000.
18557 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
18558 dirpart=`$as_dirname -- "$mf" ||
18559 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18560 X"$mf" : 'X\(//\)[^/]' \| \
18561 X"$mf" : 'X\(//\)$' \| \
18562 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
18563 $as_echo X"$mf" |
18564 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18565 s//\1/
18566 q
18567 }
18568 /^X\(\/\/\)[^/].*/{
18569 s//\1/
18570 q
18571 }
18572 /^X\(\/\/\)$/{
18573 s//\1/
18574 q
18575 }
18576 /^X\(\/\).*/{
18577 s//\1/
18578 q
18579 }
18580 s/.*/./; q'`
18581 else
18582 continue
18583 fi
18584 # Extract the definition of DEPDIR, am__include, and am__quote
18585 # from the Makefile without running 'make'.
18586 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
18587 test -z "$DEPDIR" && continue
18588 am__include=`sed -n 's/^am__include = //p' < "$mf"`
18589 test -z "$am__include" && continue
18590 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
18591 # Find all dependency output files, they are included files with
18592 # $(DEPDIR) in their names. We invoke sed twice because it is the
18593 # simplest approach to changing $(DEPDIR) to its actual value in the
18594 # expansion.
18595 for file in `sed -n "
18596 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
18597 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
18598 # Make sure the directory exists.
18599 test -f "$dirpart/$file" && continue
18600 fdir=`$as_dirname -- "$file" ||
18601 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18602 X"$file" : 'X\(//\)[^/]' \| \
18603 X"$file" : 'X\(//\)$' \| \
18604 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
18605 $as_echo X"$file" |
18606 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18607 s//\1/
18608 q
18609 }
18610 /^X\(\/\/\)[^/].*/{
18611 s//\1/
18612 q
18613 }
18614 /^X\(\/\/\)$/{
18615 s//\1/
18616 q
18617 }
18618 /^X\(\/\).*/{
18619 s//\1/
18620 q
18621 }
18622 s/.*/./; q'`
18623 as_dir=$dirpart/$fdir; as_fn_mkdir_p
18624 # echo "creating $dirpart/$file"
18625 echo '# dummy' > "$dirpart/$file"
18626 done
18627 done
18628 }
18629 ;;
18630 "libtool":C)
18631
18632 # See if we are running on zsh, and set the options which allow our
18633 # commands through without removal of \ escapes.
18634 if test -n "${ZSH_VERSION+set}" ; then
18635 setopt NO_GLOB_SUBST
18636 fi
18637
18638 cfgfile="${ofile}T"
18639 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
18640 $RM "$cfgfile"
18641
18642 cat <<_LT_EOF >> "$cfgfile"
18643 #! $SHELL
18644
18645 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
18646 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
18647 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18648 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
18649 #
18650 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
18651 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
18652 # Foundation, Inc.
18653 # Written by Gordon Matzigkeit, 1996
18654 #
18655 # This file is part of GNU Libtool.
18656 #
18657 # GNU Libtool is free software; you can redistribute it and/or
18658 # modify it under the terms of the GNU General Public License as
18659 # published by the Free Software Foundation; either version 2 of
18660 # the License, or (at your option) any later version.
18661 #
18662 # As a special exception to the GNU General Public License,
18663 # if you distribute this file as part of a program or library that
18664 # is built using GNU Libtool, you may include this file under the
18665 # same distribution terms that you use for the rest of that program.
18666 #
18667 # GNU Libtool is distributed in the hope that it will be useful,
18668 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18669 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18670 # GNU General Public License for more details.
18671 #
18672 # You should have received a copy of the GNU General Public License
18673 # along with GNU Libtool; see the file COPYING. If not, a copy
18674 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
18675 # obtained by writing to the Free Software Foundation, Inc.,
18676 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18677
18678
18679 # The names of the tagged configurations supported by this script.
18680 available_tags="CXX "
18681
18682 # ### BEGIN LIBTOOL CONFIG
18683
18684 # Which release of libtool.m4 was used?
18685 macro_version=$macro_version
18686 macro_revision=$macro_revision
18687
18688 # Whether or not to build shared libraries.
18689 build_libtool_libs=$enable_shared
18690
18691 # Whether or not to build static libraries.
18692 build_old_libs=$enable_static
18693
18694 # What type of objects to build.
18695 pic_mode=$pic_mode
18696
18697 # Whether or not to optimize for fast installation.
18698 fast_install=$enable_fast_install
18699
18700 # Shell to use when invoking shell scripts.
18701 SHELL=$lt_SHELL
18702
18703 # An echo program that protects backslashes.
18704 ECHO=$lt_ECHO
18705
18706 # The PATH separator for the build system.
18707 PATH_SEPARATOR=$lt_PATH_SEPARATOR
18708
18709 # The host system.
18710 host_alias=$host_alias
18711 host=$host
18712 host_os=$host_os
18713
18714 # The build system.
18715 build_alias=$build_alias
18716 build=$build
18717 build_os=$build_os
18718
18719 # A sed program that does not truncate output.
18720 SED=$lt_SED
18721
18722 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
18723 Xsed="\$SED -e 1s/^X//"
18724
18725 # A grep program that handles long lines.
18726 GREP=$lt_GREP
18727
18728 # An ERE matcher.
18729 EGREP=$lt_EGREP
18730
18731 # A literal string matcher.
18732 FGREP=$lt_FGREP
18733
18734 # A BSD- or MS-compatible name lister.
18735 NM=$lt_NM
18736
18737 # Whether we need soft or hard links.
18738 LN_S=$lt_LN_S
18739
18740 # What is the maximum length of a command?
18741 max_cmd_len=$max_cmd_len
18742
18743 # Object file suffix (normally "o").
18744 objext=$ac_objext
18745
18746 # Executable file suffix (normally "").
18747 exeext=$exeext
18748
18749 # whether the shell understands "unset".
18750 lt_unset=$lt_unset
18751
18752 # turn spaces into newlines.
18753 SP2NL=$lt_lt_SP2NL
18754
18755 # turn newlines into spaces.
18756 NL2SP=$lt_lt_NL2SP
18757
18758 # convert \$build file names to \$host format.
18759 to_host_file_cmd=$lt_cv_to_host_file_cmd
18760
18761 # convert \$build files to toolchain format.
18762 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
18763
18764 # An object symbol dumper.
18765 OBJDUMP=$lt_OBJDUMP
18766
18767 # Method to check whether dependent libraries are shared objects.
18768 deplibs_check_method=$lt_deplibs_check_method
18769
18770 # Command to use when deplibs_check_method = "file_magic".
18771 file_magic_cmd=$lt_file_magic_cmd
18772
18773 # How to find potential files when deplibs_check_method = "file_magic".
18774 file_magic_glob=$lt_file_magic_glob
18775
18776 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
18777 want_nocaseglob=$lt_want_nocaseglob
18778
18779 # DLL creation program.
18780 DLLTOOL=$lt_DLLTOOL
18781
18782 # Command to associate shared and link libraries.
18783 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
18784
18785 # The archiver.
18786 AR=$lt_AR
18787
18788 # Flags to create an archive.
18789 AR_FLAGS=$lt_AR_FLAGS
18790
18791 # How to feed a file listing to the archiver.
18792 archiver_list_spec=$lt_archiver_list_spec
18793
18794 # A symbol stripping program.
18795 STRIP=$lt_STRIP
18796
18797 # Commands used to install an old-style archive.
18798 RANLIB=$lt_RANLIB
18799 old_postinstall_cmds=$lt_old_postinstall_cmds
18800 old_postuninstall_cmds=$lt_old_postuninstall_cmds
18801
18802 # Whether to use a lock for old archive extraction.
18803 lock_old_archive_extraction=$lock_old_archive_extraction
18804
18805 # A C compiler.
18806 LTCC=$lt_CC
18807
18808 # LTCC compiler flags.
18809 LTCFLAGS=$lt_CFLAGS
18810
18811 # Take the output of nm and produce a listing of raw symbols and C names.
18812 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
18813
18814 # Transform the output of nm in a proper C declaration.
18815 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
18816
18817 # Transform the output of nm in a C name address pair.
18818 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
18819
18820 # Transform the output of nm in a C name address pair when lib prefix is needed.
18821 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
18822
18823 # Specify filename containing input files for \$NM.
18824 nm_file_list_spec=$lt_nm_file_list_spec
18825
18826 # The root where to search for dependent libraries,and in which our libraries should be installed.
18827 lt_sysroot=$lt_sysroot
18828
18829 # The name of the directory that contains temporary libtool files.
18830 objdir=$objdir
18831
18832 # Used to examine libraries when file_magic_cmd begins with "file".
18833 MAGIC_CMD=$MAGIC_CMD
18834
18835 # Must we lock files when doing compilation?
18836 need_locks=$lt_need_locks
18837
18838 # Manifest tool.
18839 MANIFEST_TOOL=$lt_MANIFEST_TOOL
18840
18841 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
18842 DSYMUTIL=$lt_DSYMUTIL
18843
18844 # Tool to change global to local symbols on Mac OS X.
18845 NMEDIT=$lt_NMEDIT
18846
18847 # Tool to manipulate fat objects and archives on Mac OS X.
18848 LIPO=$lt_LIPO
18849
18850 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
18851 OTOOL=$lt_OTOOL
18852
18853 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
18854 OTOOL64=$lt_OTOOL64
18855
18856 # Old archive suffix (normally "a").
18857 libext=$libext
18858
18859 # Shared library suffix (normally ".so").
18860 shrext_cmds=$lt_shrext_cmds
18861
18862 # The commands to extract the exported symbol list from a shared archive.
18863 extract_expsyms_cmds=$lt_extract_expsyms_cmds
18864
18865 # Variables whose values should be saved in libtool wrapper scripts and
18866 # restored at link time.
18867 variables_saved_for_relink=$lt_variables_saved_for_relink
18868
18869 # Do we need the "lib" prefix for modules?
18870 need_lib_prefix=$need_lib_prefix
18871
18872 # Do we need a version for libraries?
18873 need_version=$need_version
18874
18875 # Library versioning type.
18876 version_type=$version_type
18877
18878 # Shared library runtime path variable.
18879 runpath_var=$runpath_var
18880
18881 # Shared library path variable.
18882 shlibpath_var=$shlibpath_var
18883
18884 # Is shlibpath searched before the hard-coded library search path?
18885 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
18886
18887 # Format of library name prefix.
18888 libname_spec=$lt_libname_spec
18889
18890 # List of archive names. First name is the real one, the rest are links.
18891 # The last name is the one that the linker finds with -lNAME
18892 library_names_spec=$lt_library_names_spec
18893
18894 # The coded name of the library, if different from the real name.
18895 soname_spec=$lt_soname_spec
18896
18897 # Permission mode override for installation of shared libraries.
18898 install_override_mode=$lt_install_override_mode
18899
18900 # Command to use after installation of a shared archive.
18901 postinstall_cmds=$lt_postinstall_cmds
18902
18903 # Command to use after uninstallation of a shared archive.
18904 postuninstall_cmds=$lt_postuninstall_cmds
18905
18906 # Commands used to finish a libtool library installation in a directory.
18907 finish_cmds=$lt_finish_cmds
18908
18909 # As "finish_cmds", except a single script fragment to be evaled but
18910 # not shown.
18911 finish_eval=$lt_finish_eval
18912
18913 # Whether we should hardcode library paths into libraries.
18914 hardcode_into_libs=$hardcode_into_libs
18915
18916 # Compile-time system search path for libraries.
18917 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
18918
18919 # Run-time system search path for libraries.
18920 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
18921
18922 # Whether dlopen is supported.
18923 dlopen_support=$enable_dlopen
18924
18925 # Whether dlopen of programs is supported.
18926 dlopen_self=$enable_dlopen_self
18927
18928 # Whether dlopen of statically linked programs is supported.
18929 dlopen_self_static=$enable_dlopen_self_static
18930
18931 # Commands to strip libraries.
18932 old_striplib=$lt_old_striplib
18933 striplib=$lt_striplib
18934
18935
18936 # The linker used to build libraries.
18937 LD=$lt_LD
18938
18939 # How to create reloadable object files.
18940 reload_flag=$lt_reload_flag
18941 reload_cmds=$lt_reload_cmds
18942
18943 # Commands used to build an old-style archive.
18944 old_archive_cmds=$lt_old_archive_cmds
18945
18946 # A language specific compiler.
18947 CC=$lt_compiler
18948
18949 # Is the compiler the GNU compiler?
18950 with_gcc=$GCC
18951
18952 # Compiler flag to turn off builtin functions.
18953 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
18954
18955 # Additional compiler flags for building library objects.
18956 pic_flag=$lt_lt_prog_compiler_pic
18957
18958 # How to pass a linker flag through the compiler.
18959 wl=$lt_lt_prog_compiler_wl
18960
18961 # Compiler flag to prevent dynamic linking.
18962 link_static_flag=$lt_lt_prog_compiler_static
18963
18964 # Does compiler simultaneously support -c and -o options?
18965 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
18966
18967 # Whether or not to add -lc for building shared libraries.
18968 build_libtool_need_lc=$archive_cmds_need_lc
18969
18970 # Whether or not to disallow shared libs when runtime libs are static.
18971 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
18972
18973 # Compiler flag to allow reflexive dlopens.
18974 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
18975
18976 # Compiler flag to generate shared objects directly from archives.
18977 whole_archive_flag_spec=$lt_whole_archive_flag_spec
18978
18979 # Whether the compiler copes with passing no objects directly.
18980 compiler_needs_object=$lt_compiler_needs_object
18981
18982 # Create an old-style archive from a shared archive.
18983 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
18984
18985 # Create a temporary old-style archive to link instead of a shared archive.
18986 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
18987
18988 # Commands used to build a shared archive.
18989 archive_cmds=$lt_archive_cmds
18990 archive_expsym_cmds=$lt_archive_expsym_cmds
18991
18992 # Commands used to build a loadable module if different from building
18993 # a shared archive.
18994 module_cmds=$lt_module_cmds
18995 module_expsym_cmds=$lt_module_expsym_cmds
18996
18997 # Whether we are building with GNU ld or not.
18998 with_gnu_ld=$lt_with_gnu_ld
18999
19000 # Flag that allows shared libraries with undefined symbols to be built.
19001 allow_undefined_flag=$lt_allow_undefined_flag
19002
19003 # Flag that enforces no undefined symbols.
19004 no_undefined_flag=$lt_no_undefined_flag
19005
19006 # Flag to hardcode \$libdir into a binary during linking.
19007 # This must work even if \$libdir does not exist
19008 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
19009
19010 # Whether we need a single "-rpath" flag with a separated argument.
19011 hardcode_libdir_separator=$lt_hardcode_libdir_separator
19012
19013 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
19014 # DIR into the resulting binary.
19015 hardcode_direct=$hardcode_direct
19016
19017 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
19018 # DIR into the resulting binary and the resulting library dependency is
19019 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
19020 # library is relocated.
19021 hardcode_direct_absolute=$hardcode_direct_absolute
19022
19023 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
19024 # into the resulting binary.
19025 hardcode_minus_L=$hardcode_minus_L
19026
19027 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
19028 # into the resulting binary.
19029 hardcode_shlibpath_var=$hardcode_shlibpath_var
19030
19031 # Set to "yes" if building a shared library automatically hardcodes DIR
19032 # into the library and all subsequent libraries and executables linked
19033 # against it.
19034 hardcode_automatic=$hardcode_automatic
19035
19036 # Set to yes if linker adds runtime paths of dependent libraries
19037 # to runtime path list.
19038 inherit_rpath=$inherit_rpath
19039
19040 # Whether libtool must link a program against all its dependency libraries.
19041 link_all_deplibs=$link_all_deplibs
19042
19043 # Set to "yes" if exported symbols are required.
19044 always_export_symbols=$always_export_symbols
19045
19046 # The commands to list exported symbols.
19047 export_symbols_cmds=$lt_export_symbols_cmds
19048
19049 # Symbols that should not be listed in the preloaded symbols.
19050 exclude_expsyms=$lt_exclude_expsyms
19051
19052 # Symbols that must always be exported.
19053 include_expsyms=$lt_include_expsyms
19054
19055 # Commands necessary for linking programs (against libraries) with templates.
19056 prelink_cmds=$lt_prelink_cmds
19057
19058 # Commands necessary for finishing linking programs.
19059 postlink_cmds=$lt_postlink_cmds
19060
19061 # Specify filename containing input files.
19062 file_list_spec=$lt_file_list_spec
19063
19064 # How to hardcode a shared library path into an executable.
19065 hardcode_action=$hardcode_action
19066
19067 # The directories searched by this compiler when creating a shared library.
19068 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
19069
19070 # Dependencies to place before and after the objects being linked to
19071 # create a shared library.
19072 predep_objects=$lt_predep_objects
19073 postdep_objects=$lt_postdep_objects
19074 predeps=$lt_predeps
19075 postdeps=$lt_postdeps
19076
19077 # The library search path used internally by the compiler when linking
19078 # a shared library.
19079 compiler_lib_search_path=$lt_compiler_lib_search_path
19080
19081 # ### END LIBTOOL CONFIG
19082
19083 _LT_EOF
19084
19085 case $host_os in
19086 aix3*)
19087 cat <<\_LT_EOF >> "$cfgfile"
19088 # AIX sometimes has problems with the GCC collect2 program. For some
19089 # reason, if we set the COLLECT_NAMES environment variable, the problems
19090 # vanish in a puff of smoke.
19091 if test "X${COLLECT_NAMES+set}" != Xset; then
19092 COLLECT_NAMES=
19093 export COLLECT_NAMES
19094 fi
19095 _LT_EOF
19096 ;;
19097 esac
19098
19099
19100 ltmain="$ac_aux_dir/ltmain.sh"
19101
19102
19103 # We use sed instead of cat because bash on DJGPP gets confused if
19104 # if finds mixed CR/LF and LF-only lines. Since sed operates in
19105 # text mode, it properly converts lines to CR/LF. This bash problem
19106 # is reportedly fixed, but why not run on old versions too?
19107 sed '$q' "$ltmain" >> "$cfgfile" \
19108 || (rm -f "$cfgfile"; exit 1)
19109
19110 if test x"$xsi_shell" = xyes; then
19111 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
19112 func_dirname ()\
19113 {\
19114 \ case ${1} in\
19115 \ */*) func_dirname_result="${1%/*}${2}" ;;\
19116 \ * ) func_dirname_result="${3}" ;;\
19117 \ esac\
19118 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
19119 && mv -f "$cfgfile.tmp" "$cfgfile" \
19120 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19121 test 0 -eq $? || _lt_function_replace_fail=:
19122
19123
19124 sed -e '/^func_basename ()$/,/^} # func_basename /c\
19125 func_basename ()\
19126 {\
19127 \ func_basename_result="${1##*/}"\
19128 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
19129 && mv -f "$cfgfile.tmp" "$cfgfile" \
19130 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19131 test 0 -eq $? || _lt_function_replace_fail=:
19132
19133
19134 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
19135 func_dirname_and_basename ()\
19136 {\
19137 \ case ${1} in\
19138 \ */*) func_dirname_result="${1%/*}${2}" ;;\
19139 \ * ) func_dirname_result="${3}" ;;\
19140 \ esac\
19141 \ func_basename_result="${1##*/}"\
19142 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
19143 && mv -f "$cfgfile.tmp" "$cfgfile" \
19144 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19145 test 0 -eq $? || _lt_function_replace_fail=:
19146
19147
19148 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
19149 func_stripname ()\
19150 {\
19151 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
19152 \ # positional parameters, so assign one to ordinary parameter first.\
19153 \ func_stripname_result=${3}\
19154 \ func_stripname_result=${func_stripname_result#"${1}"}\
19155 \ func_stripname_result=${func_stripname_result%"${2}"}\
19156 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
19157 && mv -f "$cfgfile.tmp" "$cfgfile" \
19158 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19159 test 0 -eq $? || _lt_function_replace_fail=:
19160
19161
19162 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
19163 func_split_long_opt ()\
19164 {\
19165 \ func_split_long_opt_name=${1%%=*}\
19166 \ func_split_long_opt_arg=${1#*=}\
19167 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
19168 && mv -f "$cfgfile.tmp" "$cfgfile" \
19169 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19170 test 0 -eq $? || _lt_function_replace_fail=:
19171
19172
19173 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
19174 func_split_short_opt ()\
19175 {\
19176 \ func_split_short_opt_arg=${1#??}\
19177 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
19178 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
19179 && mv -f "$cfgfile.tmp" "$cfgfile" \
19180 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19181 test 0 -eq $? || _lt_function_replace_fail=:
19182
19183
19184 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
19185 func_lo2o ()\
19186 {\
19187 \ case ${1} in\
19188 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
19189 \ *) func_lo2o_result=${1} ;;\
19190 \ esac\
19191 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
19192 && mv -f "$cfgfile.tmp" "$cfgfile" \
19193 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19194 test 0 -eq $? || _lt_function_replace_fail=:
19195
19196
19197 sed -e '/^func_xform ()$/,/^} # func_xform /c\
19198 func_xform ()\
19199 {\
19200 func_xform_result=${1%.*}.lo\
19201 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
19202 && mv -f "$cfgfile.tmp" "$cfgfile" \
19203 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19204 test 0 -eq $? || _lt_function_replace_fail=:
19205
19206
19207 sed -e '/^func_arith ()$/,/^} # func_arith /c\
19208 func_arith ()\
19209 {\
19210 func_arith_result=$(( $* ))\
19211 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
19212 && mv -f "$cfgfile.tmp" "$cfgfile" \
19213 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19214 test 0 -eq $? || _lt_function_replace_fail=:
19215
19216
19217 sed -e '/^func_len ()$/,/^} # func_len /c\
19218 func_len ()\
19219 {\
19220 func_len_result=${#1}\
19221 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
19222 && mv -f "$cfgfile.tmp" "$cfgfile" \
19223 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19224 test 0 -eq $? || _lt_function_replace_fail=:
19225
19226 fi
19227
19228 if test x"$lt_shell_append" = xyes; then
19229 sed -e '/^func_append ()$/,/^} # func_append /c\
19230 func_append ()\
19231 {\
19232 eval "${1}+=\\${2}"\
19233 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
19234 && mv -f "$cfgfile.tmp" "$cfgfile" \
19235 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19236 test 0 -eq $? || _lt_function_replace_fail=:
19237
19238
19239 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
19240 func_append_quoted ()\
19241 {\
19242 \ func_quote_for_eval "${2}"\
19243 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
19244 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
19245 && mv -f "$cfgfile.tmp" "$cfgfile" \
19246 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19247 test 0 -eq $? || _lt_function_replace_fail=:
19248
19249
19250 # Save a `func_append' function call where possible by direct use of '+='
19251 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
19252 && mv -f "$cfgfile.tmp" "$cfgfile" \
19253 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19254 test 0 -eq $? || _lt_function_replace_fail=:
19255 else
19256 # Save a `func_append' function call even when '+=' is not available
19257 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
19258 && mv -f "$cfgfile.tmp" "$cfgfile" \
19259 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
19260 test 0 -eq $? || _lt_function_replace_fail=:
19261 fi
19262
19263 if test x"$_lt_function_replace_fail" = x":"; then
19264 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
19265 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
19266 fi
19267
19268
19269 mv -f "$cfgfile" "$ofile" ||
19270 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
19271 chmod +x "$ofile"
19272
19273
19274 cat <<_LT_EOF >> "$ofile"
19275
19276 # ### BEGIN LIBTOOL TAG CONFIG: CXX
19277
19278 # The linker used to build libraries.
19279 LD=$lt_LD_CXX
19280
19281 # How to create reloadable object files.
19282 reload_flag=$lt_reload_flag_CXX
19283 reload_cmds=$lt_reload_cmds_CXX
19284
19285 # Commands used to build an old-style archive.
19286 old_archive_cmds=$lt_old_archive_cmds_CXX
19287
19288 # A language specific compiler.
19289 CC=$lt_compiler_CXX
19290
19291 # Is the compiler the GNU compiler?
19292 with_gcc=$GCC_CXX
19293
19294 # Compiler flag to turn off builtin functions.
19295 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
19296
19297 # Additional compiler flags for building library objects.
19298 pic_flag=$lt_lt_prog_compiler_pic_CXX
19299
19300 # How to pass a linker flag through the compiler.
19301 wl=$lt_lt_prog_compiler_wl_CXX
19302
19303 # Compiler flag to prevent dynamic linking.
19304 link_static_flag=$lt_lt_prog_compiler_static_CXX
19305
19306 # Does compiler simultaneously support -c and -o options?
19307 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
19308
19309 # Whether or not to add -lc for building shared libraries.
19310 build_libtool_need_lc=$archive_cmds_need_lc_CXX
19311
19312 # Whether or not to disallow shared libs when runtime libs are static.
19313 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
19314
19315 # Compiler flag to allow reflexive dlopens.
19316 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
19317
19318 # Compiler flag to generate shared objects directly from archives.
19319 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
19320
19321 # Whether the compiler copes with passing no objects directly.
19322 compiler_needs_object=$lt_compiler_needs_object_CXX
19323
19324 # Create an old-style archive from a shared archive.
19325 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
19326
19327 # Create a temporary old-style archive to link instead of a shared archive.
19328 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
19329
19330 # Commands used to build a shared archive.
19331 archive_cmds=$lt_archive_cmds_CXX
19332 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
19333
19334 # Commands used to build a loadable module if different from building
19335 # a shared archive.
19336 module_cmds=$lt_module_cmds_CXX
19337 module_expsym_cmds=$lt_module_expsym_cmds_CXX
19338
19339 # Whether we are building with GNU ld or not.
19340 with_gnu_ld=$lt_with_gnu_ld_CXX
19341
19342 # Flag that allows shared libraries with undefined symbols to be built.
19343 allow_undefined_flag=$lt_allow_undefined_flag_CXX
19344
19345 # Flag that enforces no undefined symbols.
19346 no_undefined_flag=$lt_no_undefined_flag_CXX
19347
19348 # Flag to hardcode \$libdir into a binary during linking.
19349 # This must work even if \$libdir does not exist
19350 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
19351
19352 # Whether we need a single "-rpath" flag with a separated argument.
19353 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
19354
19355 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
19356 # DIR into the resulting binary.
19357 hardcode_direct=$hardcode_direct_CXX
19358
19359 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
19360 # DIR into the resulting binary and the resulting library dependency is
19361 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
19362 # library is relocated.
19363 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
19364
19365 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
19366 # into the resulting binary.
19367 hardcode_minus_L=$hardcode_minus_L_CXX
19368
19369 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
19370 # into the resulting binary.
19371 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
19372
19373 # Set to "yes" if building a shared library automatically hardcodes DIR
19374 # into the library and all subsequent libraries and executables linked
19375 # against it.
19376 hardcode_automatic=$hardcode_automatic_CXX
19377
19378 # Set to yes if linker adds runtime paths of dependent libraries
19379 # to runtime path list.
19380 inherit_rpath=$inherit_rpath_CXX
19381
19382 # Whether libtool must link a program against all its dependency libraries.
19383 link_all_deplibs=$link_all_deplibs_CXX
19384
19385 # Set to "yes" if exported symbols are required.
19386 always_export_symbols=$always_export_symbols_CXX
19387
19388 # The commands to list exported symbols.
19389 export_symbols_cmds=$lt_export_symbols_cmds_CXX
19390
19391 # Symbols that should not be listed in the preloaded symbols.
19392 exclude_expsyms=$lt_exclude_expsyms_CXX
19393
19394 # Symbols that must always be exported.
19395 include_expsyms=$lt_include_expsyms_CXX
19396
19397 # Commands necessary for linking programs (against libraries) with templates.
19398 prelink_cmds=$lt_prelink_cmds_CXX
19399
19400 # Commands necessary for finishing linking programs.
19401 postlink_cmds=$lt_postlink_cmds_CXX
19402
19403 # Specify filename containing input files.
19404 file_list_spec=$lt_file_list_spec_CXX
19405
19406 # How to hardcode a shared library path into an executable.
19407 hardcode_action=$hardcode_action_CXX
19408
19409 # The directories searched by this compiler when creating a shared library.
19410 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
19411
19412 # Dependencies to place before and after the objects being linked to
19413 # create a shared library.
19414 predep_objects=$lt_predep_objects_CXX
19415 postdep_objects=$lt_postdep_objects_CXX
19416 predeps=$lt_predeps_CXX
19417 postdeps=$lt_postdeps_CXX
19418
19419 # The library search path used internally by the compiler when linking
19420 # a shared library.
19421 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
19422
19423 # ### END LIBTOOL TAG CONFIG: CXX
19424 _LT_EOF
19425
19426 ;;
19427
19428 esac
19429 done # for ac_tag
19430
19431
19432 as_fn_exit 0
19433 _ACEOF
19434 ac_clean_files=$ac_clean_files_save
19435
19436 test $ac_write_fail = 0 ||
19437 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19438
19439
19440 # configure is writing to config.log, and then calls config.status.
19441 # config.status does its own redirection, appending to config.log.
19442 # Unfortunately, on DOS this fails, as config.log is still kept open
19443 # by configure, so config.status won't be able to write to it; its
19444 # output is simply discarded. So we exec the FD to /dev/null,
19445 # effectively closing config.log, so it can be properly (re)opened and
19446 # appended to by config.status. When coming back to configure, we
19447 # need to make the FD available again.
19448 if test "$no_create" != yes; then
19449 ac_cs_success=:
19450 ac_config_status_args=
19451 test "$silent" = yes &&
19452 ac_config_status_args="$ac_config_status_args --quiet"
19453 exec 5>/dev/null
19454 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19455 exec 5>>config.log
19456 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19457 # would make configure fail if this is the last instruction.
19458 $ac_cs_success || as_fn_exit 1
19459 fi
19460 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19462 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19463 fi
19464
0 AC_INIT([ui-utilcpp], [1.8.1.snapshot20140701142031weslok])
1
2 dnl See DEVELOPERS file for shared library versioning instructions
3 dnl INTERFACE:REVISION:AGE
4 dnl One of A, B1 or B2 will be your path:
5 dnl
6 dnl A) If only the source code, but not the interface was changed,
7 dnl the REVISION is increased by one.
8 dnl B) If the interface changed, the INTERFACE number is increased by
9 dnl one and REVISION is set to zero.
10 dnl B1) If only new interfaces were added, the AGE is increased by
11 dnl one.
12 dnl B2) If interfaces were removed or there were incompatible
13 dnl changes, the AGE is set to zero.
14 UI_INIT([src/ui-utilcpp/Exception.hpp], [9:0:0],,,[tar-pax])
15 AC_CONFIG_HEADER(config.h)
16
17 dnl
18 dnl Disable strerror
19 dnl
20 AC_ARG_ENABLE(strerror,
21 [ --disable-strerror Disable usage of strerror(3) (avoid segfaults w/ static/wrong libc). ],
22 [ UI_UTILCPP_CXXFLAGS="${UI_UTILCPP_CXXFLAGS} -DUI_UTILCPP_DISABLE_STRERROR" ])
23
24 AC_SUBST(UI_UTILCPP_CXXFLAGS)
25
26 UI_DOXYGEN
27 UI_DISTDIR_CRUFT
28
29 # Checks for programs.
30 UI_PROG_CXX
31 AC_PROG_CXXCPP
32 AC_PROG_INSTALL
33 AC_PROG_LN_S
34 AC_PROG_MAKE_SET
35 AC_PROG_LIBTOOL
36 AC_PROG_AWK
37
38 # Checks for libraries.
39
40 # IMPORTANT: Do not make standard library checks here -- i.e. no
41 # checks that would add the checked library to "LIBS" (unless it is
42 # actually common to all sub-libraries), as we produce sub-libraries
43 # with varying dependencies.
44
45 # check for dl lib
46 # All symbolic libs are linked with
47 AC_LANG_PUSH(C++)
48 AC_CHECK_HEADER(dlfcn.h,, [ AC_MSG_ERROR(error: libdl include file dlfcn.h not found.)])
49 AC_CHECK_LIB(dl, dlopen,, [ AC_MSG_ERROR(Failed to detect libdl.)])
50
51 # check for ccgnu lib (w/ workaround for buggy version test side effect)
52 CXXFLAGS_SAVE=${CXXFLAGS}
53 LIBS_SAVE=${LIBS}
54 OST_CCXX2_VERSION(1.0.0)
55 CXXFLAGS=${CXXFLAGS_SAVE}
56 LIBS=${LIBS_SAVE}
57 # OST_CCXX2_VERSION extends CXXFLAGS. This is pathetic, and does not work, for example,
58 # with 'make CXXFLAGS="-g -O0 -pedantic -Wall'.
59 OST_CXXX2_FLAGS=`ccgnu2-config --flags`
60 OST_CXXX2_LIBS=`ccgnu2-config --stdlibs`
61 AC_SUBST(OST_CXXX2_FLAGS)
62 AC_SUBST(OST_CXXX2_LIBS)
63
64 # Normally, the dependency of libreadline to ncurses should be implicit and should
65 # be encapsulated - we do not use anything from ncurses explicitely.
66 # However, on some systems (at least for RH 7.3) this is not the case, so we need to check for ncurses, too
67 AC_CHECK_LIB(ncurses, curses_version,, [ AC_MSG_ERROR(ui-utilcpp needs ncurses.) ])
68 AC_CHECK_LIB(cap, cap_init,, [ AC_MSG_ERROR(ui-utilcpp needs libcap.) ])
69 AC_CHECK_LIB(readline, readline,, [ AC_MSG_ERROR(ui-utilcpp needs libreadline.) ], -lncurses)
70 AC_CHECK_LIB(recode, recode_new_outer,, [ AC_MSG_ERROR(ui-utilcpp needs librecode.) ])
71 AC_CHECK_LIB(idn, idna_to_ascii_8z,, [ AC_MSG_ERROR(ui-utilcpp needs libidn.) ])
72 AC_CHECK_HEADER(idna.h, , [ AC_MSG_ERROR("Header error: idna.h")])
73
74 dnl Enable libproc
75 AC_ARG_ENABLE(libproc,
76 [ --enable-libproc Use libproc for procfs parsing (has memory leak issues). ],
77 [ AC_CHECK_LIB(proc, openproc,, [ AC_MSG_ERROR(ui-utilcpp needs libproc.) ])
78 AC_CHECK_HEADER(proc/readproc.h, , [ AC_MSG_ERROR("Header error: proc/readproc.h")]) ])
79
80 # boost unit test framework check
81 AC_CHECK_HEADER(boost/test/auto_unit_test.hpp, , [ AC_MSG_ERROR("Header error: boost/test/auto_unit_test.hpp")])
82 AC_CHECK_HEADER(boost/serialization/access.hpp, , [ AC_MSG_ERROR("Header error: boost/serialization/access.hpp")])
83 AC_CHECK_HEADER(boost/multi_index_container.hpp, , [ AC_MSG_ERROR("Header error: boost/multi_index_container.hpp")])
84 AC_CHECK_HEADER(boost/date_time/date.hpp, , [ AC_MSG_ERROR("Header error: boost/date_time/date.hpp")])
85 AC_CHECK_HEADER(boost/random.hpp, , [ AC_MSG_ERROR("Header error: boost/random.hpp")])
86 # Test for library missing (unfortunately, this does not seem to be trivial)
87
88 # Quota support (std and xfs only, 26 support is build-in)
89 AC_CHECK_HEADERS([sys/quota.h], [], [AC_MSG_WARN(No linux "standard" quota available!)])
90 AC_CHECK_HEADERS([xfs/xqm.h], [], [AC_MSG_WARN(No linux "xfs" quota available!)])
91
92 # Checks for header files.
93 AC_HEADER_STDC
94
95 # Functuonal tests.
96 AC_FUNC_STRERROR_R
97 AC_CHECK_FUNCS(cap_compare)
98 AC_CHECK_FUNCS(cap_clear_flag)
99
100 AC_LANG_POP
101
102 # Harvest
103 AC_CONFIG_FILES([
104 Makefile
105 Doxyfile
106 doc/Makefile
107 src/Makefile
108 src/tools/Makefile
109 src/ui-utilcpp/Makefile
110 src/ui-utilcpp/http/Makefile
111 ])
112 AC_OUTPUT
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2013-05-30.07; # 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 echo >> "$depfile" # make sure the fragment doesn't end with a backslash
555 rm -f "$tmpdepfile"
556 ;;
557
558 msvc7msys)
559 # This case exists only to let depend.m4 do its work. It works by
560 # looking at the text of this script. This case will never be run,
561 # since it is checked for above.
562 exit 1
563 ;;
564
565 #nosideeffect)
566 # This comment above is used by automake to tell side-effect
567 # dependency tracking mechanisms from slower ones.
568
569 dashmstdout)
570 # Important note: in order to support this mode, a compiler *must*
571 # always write the preprocessed file to stdout, regardless of -o.
572 "$@" || exit $?
573
574 # Remove the call to Libtool.
575 if test "$libtool" = yes; then
576 while test "X$1" != 'X--mode=compile'; do
577 shift
578 done
579 shift
580 fi
581
582 # Remove '-o $object'.
583 IFS=" "
584 for arg
585 do
586 case $arg in
587 -o)
588 shift
589 ;;
590 $object)
591 shift
592 ;;
593 *)
594 set fnord "$@" "$arg"
595 shift # fnord
596 shift # $arg
597 ;;
598 esac
599 done
600
601 test -z "$dashmflag" && dashmflag=-M
602 # Require at least two characters before searching for ':'
603 # in the target name. This is to cope with DOS-style filenames:
604 # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
605 "$@" $dashmflag |
606 sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
607 rm -f "$depfile"
608 cat < "$tmpdepfile" > "$depfile"
609 # Some versions of the HPUX 10.20 sed can't process this sed invocation
610 # correctly. Breaking it into two sed invocations is a workaround.
611 tr ' ' "$nl" < "$tmpdepfile" \
612 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
613 | sed -e 's/$/ :/' >> "$depfile"
614 rm -f "$tmpdepfile"
615 ;;
616
617 dashXmstdout)
618 # This case only exists to satisfy depend.m4. It is never actually
619 # run, as this mode is specially recognized in the preamble.
620 exit 1
621 ;;
622
623 makedepend)
624 "$@" || exit $?
625 # Remove any Libtool call
626 if test "$libtool" = yes; then
627 while test "X$1" != 'X--mode=compile'; do
628 shift
629 done
630 shift
631 fi
632 # X makedepend
633 shift
634 cleared=no eat=no
635 for arg
636 do
637 case $cleared in
638 no)
639 set ""; shift
640 cleared=yes ;;
641 esac
642 if test $eat = yes; then
643 eat=no
644 continue
645 fi
646 case "$arg" in
647 -D*|-I*)
648 set fnord "$@" "$arg"; shift ;;
649 # Strip any option that makedepend may not understand. Remove
650 # the object too, otherwise makedepend will parse it as a source file.
651 -arch)
652 eat=yes ;;
653 -*|$object)
654 ;;
655 *)
656 set fnord "$@" "$arg"; shift ;;
657 esac
658 done
659 obj_suffix=`echo "$object" | sed 's/^.*\././'`
660 touch "$tmpdepfile"
661 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
662 rm -f "$depfile"
663 # makedepend may prepend the VPATH from the source file name to the object.
664 # No need to regex-escape $object, excess matching of '.' is harmless.
665 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
666 # Some versions of the HPUX 10.20 sed can't process the last invocation
667 # correctly. Breaking it into two sed invocations is a workaround.
668 sed '1,2d' "$tmpdepfile" \
669 | tr ' ' "$nl" \
670 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
671 | sed -e 's/$/ :/' >> "$depfile"
672 rm -f "$tmpdepfile" "$tmpdepfile".bak
673 ;;
674
675 cpp)
676 # Important note: in order to support this mode, a compiler *must*
677 # always write the preprocessed file to stdout.
678 "$@" || exit $?
679
680 # Remove the call to Libtool.
681 if test "$libtool" = yes; then
682 while test "X$1" != 'X--mode=compile'; do
683 shift
684 done
685 shift
686 fi
687
688 # Remove '-o $object'.
689 IFS=" "
690 for arg
691 do
692 case $arg in
693 -o)
694 shift
695 ;;
696 $object)
697 shift
698 ;;
699 *)
700 set fnord "$@" "$arg"
701 shift # fnord
702 shift # $arg
703 ;;
704 esac
705 done
706
707 "$@" -E \
708 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
709 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
710 | sed '$ s: \\$::' > "$tmpdepfile"
711 rm -f "$depfile"
712 echo "$object : \\" > "$depfile"
713 cat < "$tmpdepfile" >> "$depfile"
714 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
715 rm -f "$tmpdepfile"
716 ;;
717
718 msvisualcpp)
719 # Important note: in order to support this mode, a compiler *must*
720 # always write the preprocessed file to stdout.
721 "$@" || exit $?
722
723 # Remove the call to Libtool.
724 if test "$libtool" = yes; then
725 while test "X$1" != 'X--mode=compile'; do
726 shift
727 done
728 shift
729 fi
730
731 IFS=" "
732 for arg
733 do
734 case "$arg" in
735 -o)
736 shift
737 ;;
738 $object)
739 shift
740 ;;
741 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
742 set fnord "$@"
743 shift
744 shift
745 ;;
746 *)
747 set fnord "$@" "$arg"
748 shift
749 shift
750 ;;
751 esac
752 done
753 "$@" -E 2>/dev/null |
754 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
755 rm -f "$depfile"
756 echo "$object : \\" > "$depfile"
757 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
758 echo "$tab" >> "$depfile"
759 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
760 rm -f "$tmpdepfile"
761 ;;
762
763 msvcmsys)
764 # This case exists only to let depend.m4 do its work. It works by
765 # looking at the text of this script. This case will never be run,
766 # since it is checked for above.
767 exit 1
768 ;;
769
770 none)
771 exec "$@"
772 ;;
773
774 *)
775 echo "Unknown depmode $depmode" 1>&2
776 exit 1
777 ;;
778 esac
779
780 exit 0
781
782 # Local Variables:
783 # mode: shell-script
784 # sh-indentation: 2
785 # eval: (add-hook 'write-file-hooks 'time-stamp)
786 # time-stamp-start: "scriptversion="
787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC"
789 # time-stamp-end: "; # UTC"
790 # End:
0 doc_EXTRA_DIST =
1 EXTRA_DIST = $(doc_EXTRA_DIST)
2 docdir = $(datadir)/doc/$(PACKAGE)
3 doc_DATA = $(doc_EXTRA_DIST)
0 # Makefile.in generated by automake 1.14.1 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 VPATH = @srcdir@
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
30 case $$MAKEFLAGS in \
31 *\\[\ \ ]*) \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
35 esac; \
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
62 pkgdatadir = $(datadir)/@PACKAGE@
63 pkgincludedir = $(includedir)/@PACKAGE@
64 pkglibdir = $(libdir)/@PACKAGE@
65 pkglibexecdir = $(libexecdir)/@PACKAGE@
66 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
67 install_sh_DATA = $(install_sh) -c -m 644
68 install_sh_PROGRAM = $(install_sh) -c
69 install_sh_SCRIPT = $(install_sh) -c
70 INSTALL_HEADER = $(INSTALL_DATA)
71 transform = $(program_transform_name)
72 NORMAL_INSTALL = :
73 PRE_INSTALL = :
74 POST_INSTALL = :
75 NORMAL_UNINSTALL = :
76 PRE_UNINSTALL = :
77 POST_UNINSTALL = :
78 build_triplet = @build@
79 host_triplet = @host@
80 subdir = doc
81 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
82 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
83 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
84 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
85 $(ACLOCAL_M4)
86 mkinstalldirs = $(install_sh) -d
87 CONFIG_HEADER = $(top_builddir)/config.h
88 CONFIG_CLEAN_FILES =
89 CONFIG_CLEAN_VPATH_FILES =
90 AM_V_P = $(am__v_P_@AM_V@)
91 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
92 am__v_P_0 = false
93 am__v_P_1 = :
94 AM_V_GEN = $(am__v_GEN_@AM_V@)
95 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
96 am__v_GEN_0 = @echo " GEN " $@;
97 am__v_GEN_1 =
98 AM_V_at = $(am__v_at_@AM_V@)
99 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
100 am__v_at_0 = @
101 am__v_at_1 =
102 SOURCES =
103 DIST_SOURCES =
104 am__can_run_installinfo = \
105 case $$AM_UPDATE_INFO_DIR in \
106 n|no|NO) false;; \
107 *) (install-info --version) >/dev/null 2>&1;; \
108 esac
109 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
110 am__vpath_adj = case $$p in \
111 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
112 *) f=$$p;; \
113 esac;
114 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
115 am__install_max = 40
116 am__nobase_strip_setup = \
117 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
118 am__nobase_strip = \
119 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
120 am__nobase_list = $(am__nobase_strip_setup); \
121 for p in $$list; do echo "$$p $$p"; done | \
122 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
123 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
124 if (++n[$$2] == $(am__install_max)) \
125 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
126 END { for (dir in files) print dir, files[dir] }'
127 am__base_list = \
128 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
129 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
130 am__uninstall_files_from_dir = { \
131 test -z "$$files" \
132 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
133 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
134 $(am__cd) "$$dir" && rm -f $$files; }; \
135 }
136 am__installdirs = "$(DESTDIR)$(docdir)"
137 DATA = $(doc_DATA)
138 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
139 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
140 ACLOCAL = @ACLOCAL@
141 AMTAR = @AMTAR@
142 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
143 AR = @AR@
144 AUTOCONF = @AUTOCONF@
145 AUTOHEADER = @AUTOHEADER@
146 AUTOMAKE = @AUTOMAKE@
147 AWK = @AWK@
148 CC = @CC@
149 CCDEPMODE = @CCDEPMODE@
150 CCGNU2_CONFIG = @CCGNU2_CONFIG@
151 CFLAGS = @CFLAGS@
152 CPP = @CPP@
153 CPPFLAGS = @CPPFLAGS@
154 CXX = @CXX@
155 CXXCPP = @CXXCPP@
156 CXXDEPMODE = @CXXDEPMODE@
157 CXXFLAGS = @CXXFLAGS@
158 CYGPATH_W = @CYGPATH_W@
159 DEFS = @DEFS@
160 DEPDIR = @DEPDIR@
161 DLLTOOL = @DLLTOOL@
162 DOXYGEN = @DOXYGEN@
163 DSYMUTIL = @DSYMUTIL@
164 DUMPBIN = @DUMPBIN@
165 ECHO_C = @ECHO_C@
166 ECHO_N = @ECHO_N@
167 ECHO_T = @ECHO_T@
168 EGREP = @EGREP@
169 EXEEXT = @EXEEXT@
170 EXTLIBS = @EXTLIBS@
171 FGREP = @FGREP@
172 GNULIBS = @GNULIBS@
173 GREP = @GREP@
174 INSTALL = @INSTALL@
175 INSTALL_DATA = @INSTALL_DATA@
176 INSTALL_PROGRAM = @INSTALL_PROGRAM@
177 INSTALL_SCRIPT = @INSTALL_SCRIPT@
178 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
179 LD = @LD@
180 LDFLAGS = @LDFLAGS@
181 LIBOBJS = @LIBOBJS@
182 LIBS = @LIBS@
183 LIBTOOL = @LIBTOOL@
184 LIPO = @LIPO@
185 LN_S = @LN_S@
186 LTLIBOBJS = @LTLIBOBJS@
187 MAKEINFO = @MAKEINFO@
188 MANIFEST_TOOL = @MANIFEST_TOOL@
189 MKDIR_P = @MKDIR_P@
190 NM = @NM@
191 NMEDIT = @NMEDIT@
192 OBJDUMP = @OBJDUMP@
193 OBJEXT = @OBJEXT@
194 OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@
195 OST_CXXX2_LIBS = @OST_CXXX2_LIBS@
196 OTOOL = @OTOOL@
197 OTOOL64 = @OTOOL64@
198 PACKAGE = @PACKAGE@
199 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
200 PACKAGE_NAME = @PACKAGE_NAME@
201 PACKAGE_STRING = @PACKAGE_STRING@
202 PACKAGE_TARNAME = @PACKAGE_TARNAME@
203 PACKAGE_URL = @PACKAGE_URL@
204 PACKAGE_VERSION = @PACKAGE_VERSION@
205 PATH_SEPARATOR = @PATH_SEPARATOR@
206 PERL = @PERL@
207 RANLIB = @RANLIB@
208 SED = @SED@
209 SET_MAKE = @SET_MAKE@
210 SHELL = @SHELL@
211 SINGLE_FLAGS = @SINGLE_FLAGS@
212 SINGLE_LIBS = @SINGLE_LIBS@
213 SO_VERSION = @SO_VERSION@
214 STRIP = @STRIP@
215 UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@
216 VERSION = @VERSION@
217 abs_builddir = @abs_builddir@
218 abs_srcdir = @abs_srcdir@
219 abs_top_builddir = @abs_top_builddir@
220 abs_top_srcdir = @abs_top_srcdir@
221 ac_ct_AR = @ac_ct_AR@
222 ac_ct_CC = @ac_ct_CC@
223 ac_ct_CXX = @ac_ct_CXX@
224 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
225 am__include = @am__include@
226 am__leading_dot = @am__leading_dot@
227 am__quote = @am__quote@
228 am__tar = @am__tar@
229 am__untar = @am__untar@
230 bindir = @bindir@
231 build = @build@
232 build_alias = @build_alias@
233 build_cpu = @build_cpu@
234 build_os = @build_os@
235 build_vendor = @build_vendor@
236 builddir = @builddir@
237 datadir = @datadir@
238 datarootdir = @datarootdir@
239 docdir = $(datadir)/doc/$(PACKAGE)
240 dvidir = @dvidir@
241 exec_prefix = @exec_prefix@
242 host = @host@
243 host_alias = @host_alias@
244 host_cpu = @host_cpu@
245 host_os = @host_os@
246 host_vendor = @host_vendor@
247 htmldir = @htmldir@
248 includedir = @includedir@
249 infodir = @infodir@
250 install_sh = @install_sh@
251 libdir = @libdir@
252 libexecdir = @libexecdir@
253 localedir = @localedir@
254 localstatedir = @localstatedir@
255 mandir = @mandir@
256 mkdir_p = @mkdir_p@
257 oldincludedir = @oldincludedir@
258 pdfdir = @pdfdir@
259 prefix = @prefix@
260 program_transform_name = @program_transform_name@
261 psdir = @psdir@
262 sbindir = @sbindir@
263 sharedstatedir = @sharedstatedir@
264 srcdir = @srcdir@
265 sysconfdir = @sysconfdir@
266 target_alias = @target_alias@
267 top_build_prefix = @top_build_prefix@
268 top_builddir = @top_builddir@
269 top_srcdir = @top_srcdir@
270 doc_EXTRA_DIST =
271 EXTRA_DIST = $(doc_EXTRA_DIST)
272 doc_DATA = $(doc_EXTRA_DIST)
273 all: all-am
274
275 .SUFFIXES:
276 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
277 @for dep in $?; do \
278 case '$(am__configure_deps)' in \
279 *$$dep*) \
280 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
281 && { if test -f $@; then exit 0; else break; fi; }; \
282 exit 1;; \
283 esac; \
284 done; \
285 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
286 $(am__cd) $(top_srcdir) && \
287 $(AUTOMAKE) --gnu doc/Makefile
288 .PRECIOUS: Makefile
289 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
290 @case '$?' in \
291 *config.status*) \
292 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
293 *) \
294 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
295 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
296 esac;
297
298 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
299 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
300
301 $(top_srcdir)/configure: $(am__configure_deps)
302 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
303 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
304 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
305 $(am__aclocal_m4_deps):
306
307 mostlyclean-libtool:
308 -rm -f *.lo
309
310 clean-libtool:
311 -rm -rf .libs _libs
312 install-docDATA: $(doc_DATA)
313 @$(NORMAL_INSTALL)
314 @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
315 if test -n "$$list"; then \
316 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
317 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
318 fi; \
319 for p in $$list; do \
320 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
321 echo "$$d$$p"; \
322 done | $(am__base_list) | \
323 while read files; do \
324 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
325 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
326 done
327
328 uninstall-docDATA:
329 @$(NORMAL_UNINSTALL)
330 @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
331 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
332 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
333 tags TAGS:
334
335 ctags CTAGS:
336
337 cscope cscopelist:
338
339
340 distdir: $(DISTFILES)
341 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
342 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
343 list='$(DISTFILES)'; \
344 dist_files=`for file in $$list; do echo $$file; done | \
345 sed -e "s|^$$srcdirstrip/||;t" \
346 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
347 case $$dist_files in \
348 */*) $(MKDIR_P) `echo "$$dist_files" | \
349 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
350 sort -u` ;; \
351 esac; \
352 for file in $$dist_files; do \
353 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
354 if test -d $$d/$$file; then \
355 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
356 if test -d "$(distdir)/$$file"; then \
357 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
358 fi; \
359 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
360 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
361 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
362 fi; \
363 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
364 else \
365 test -f "$(distdir)/$$file" \
366 || cp -p $$d/$$file "$(distdir)/$$file" \
367 || exit 1; \
368 fi; \
369 done
370 check-am: all-am
371 check: check-am
372 all-am: Makefile $(DATA)
373 installdirs:
374 for dir in "$(DESTDIR)$(docdir)"; do \
375 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
376 done
377 install: install-am
378 install-exec: install-exec-am
379 install-data: install-data-am
380 uninstall: uninstall-am
381
382 install-am: all-am
383 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
384
385 installcheck: installcheck-am
386 install-strip:
387 if test -z '$(STRIP)'; then \
388 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
389 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
390 install; \
391 else \
392 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
393 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
394 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
395 fi
396 mostlyclean-generic:
397
398 clean-generic:
399
400 distclean-generic:
401 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
402 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
403
404 maintainer-clean-generic:
405 @echo "This command is intended for maintainers to use"
406 @echo "it deletes files that may require special tools to rebuild."
407 clean: clean-am
408
409 clean-am: clean-generic clean-libtool mostlyclean-am
410
411 distclean: distclean-am
412 -rm -f Makefile
413 distclean-am: clean-am distclean-generic
414
415 dvi: dvi-am
416
417 dvi-am:
418
419 html: html-am
420
421 html-am:
422
423 info: info-am
424
425 info-am:
426
427 install-data-am: install-docDATA
428
429 install-dvi: install-dvi-am
430
431 install-dvi-am:
432
433 install-exec-am:
434
435 install-html: install-html-am
436
437 install-html-am:
438
439 install-info: install-info-am
440
441 install-info-am:
442
443 install-man:
444
445 install-pdf: install-pdf-am
446
447 install-pdf-am:
448
449 install-ps: install-ps-am
450
451 install-ps-am:
452
453 installcheck-am:
454
455 maintainer-clean: maintainer-clean-am
456 -rm -f Makefile
457 maintainer-clean-am: distclean-am maintainer-clean-generic
458
459 mostlyclean: mostlyclean-am
460
461 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
462
463 pdf: pdf-am
464
465 pdf-am:
466
467 ps: ps-am
468
469 ps-am:
470
471 uninstall-am: uninstall-docDATA
472
473 .MAKE: install-am install-strip
474
475 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
476 cscopelist-am ctags-am distclean distclean-generic \
477 distclean-libtool distdir dvi dvi-am html html-am info info-am \
478 install install-am install-data install-data-am \
479 install-docDATA install-dvi install-dvi-am install-exec \
480 install-exec-am install-html install-html-am install-info \
481 install-info-am install-man install-pdf install-pdf-am \
482 install-ps install-ps-am install-strip installcheck \
483 installcheck-am installdirs maintainer-clean \
484 maintainer-clean-generic mostlyclean mostlyclean-generic \
485 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
486 uninstall-am uninstall-docDATA
487
488
489 # Tell versions [3.59,3.63) of GNU make to not export all variables.
490 # Otherwise a system limit (for SysV at least) may be exceeded.
491 .NOEXPORT:
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
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.7
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.7"
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 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2013-10-28.13; # 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 'autom4te' 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 SUBDIRS = ui-utilcpp tools
1
2 EXTRA_DIST = xfs/swab.h
0 # Makefile.in generated by automake 1.14.1 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 = src
80 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
81 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
82 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
83 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
84 $(ACLOCAL_M4)
85 mkinstalldirs = $(install_sh) -d
86 CONFIG_HEADER = $(top_builddir)/config.h
87 CONFIG_CLEAN_FILES =
88 CONFIG_CLEAN_VPATH_FILES =
89 AM_V_P = $(am__v_P_@AM_V@)
90 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
91 am__v_P_0 = false
92 am__v_P_1 = :
93 AM_V_GEN = $(am__v_GEN_@AM_V@)
94 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
95 am__v_GEN_0 = @echo " GEN " $@;
96 am__v_GEN_1 =
97 AM_V_at = $(am__v_at_@AM_V@)
98 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
99 am__v_at_0 = @
100 am__v_at_1 =
101 SOURCES =
102 DIST_SOURCES =
103 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
104 ctags-recursive dvi-recursive html-recursive info-recursive \
105 install-data-recursive install-dvi-recursive \
106 install-exec-recursive install-html-recursive \
107 install-info-recursive install-pdf-recursive \
108 install-ps-recursive install-recursive installcheck-recursive \
109 installdirs-recursive pdf-recursive ps-recursive \
110 tags-recursive uninstall-recursive
111 am__can_run_installinfo = \
112 case $$AM_UPDATE_INFO_DIR in \
113 n|no|NO) false;; \
114 *) (install-info --version) >/dev/null 2>&1;; \
115 esac
116 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
117 distclean-recursive maintainer-clean-recursive
118 am__recursive_targets = \
119 $(RECURSIVE_TARGETS) \
120 $(RECURSIVE_CLEAN_TARGETS) \
121 $(am__extra_recursive_targets)
122 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
123 distdir
124 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
125 # Read a list of newline-separated strings from the standard input,
126 # and print each of them once, without duplicates. Input order is
127 # *not* preserved.
128 am__uniquify_input = $(AWK) '\
129 BEGIN { nonempty = 0; } \
130 { items[$$0] = 1; nonempty = 1; } \
131 END { if (nonempty) { for (i in items) print i; }; } \
132 '
133 # Make sure the list of sources is unique. This is necessary because,
134 # e.g., the same source file might be shared among _SOURCES variables
135 # for different programs/libraries.
136 am__define_uniq_tagged_files = \
137 list='$(am__tagged_files)'; \
138 unique=`for i in $$list; do \
139 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
140 done | $(am__uniquify_input)`
141 ETAGS = etags
142 CTAGS = ctags
143 DIST_SUBDIRS = $(SUBDIRS)
144 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
145 am__relativize = \
146 dir0=`pwd`; \
147 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
148 sed_rest='s,^[^/]*/*,,'; \
149 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
150 sed_butlast='s,/*[^/]*$$,,'; \
151 while test -n "$$dir1"; do \
152 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
153 if test "$$first" != "."; then \
154 if test "$$first" = ".."; then \
155 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
156 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
157 else \
158 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
159 if test "$$first2" = "$$first"; then \
160 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
161 else \
162 dir2="../$$dir2"; \
163 fi; \
164 dir0="$$dir0"/"$$first"; \
165 fi; \
166 fi; \
167 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
168 done; \
169 reldir="$$dir2"
170 ACLOCAL = @ACLOCAL@
171 AMTAR = @AMTAR@
172 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
173 AR = @AR@
174 AUTOCONF = @AUTOCONF@
175 AUTOHEADER = @AUTOHEADER@
176 AUTOMAKE = @AUTOMAKE@
177 AWK = @AWK@
178 CC = @CC@
179 CCDEPMODE = @CCDEPMODE@
180 CCGNU2_CONFIG = @CCGNU2_CONFIG@
181 CFLAGS = @CFLAGS@
182 CPP = @CPP@
183 CPPFLAGS = @CPPFLAGS@
184 CXX = @CXX@
185 CXXCPP = @CXXCPP@
186 CXXDEPMODE = @CXXDEPMODE@
187 CXXFLAGS = @CXXFLAGS@
188 CYGPATH_W = @CYGPATH_W@
189 DEFS = @DEFS@
190 DEPDIR = @DEPDIR@
191 DLLTOOL = @DLLTOOL@
192 DOXYGEN = @DOXYGEN@
193 DSYMUTIL = @DSYMUTIL@
194 DUMPBIN = @DUMPBIN@
195 ECHO_C = @ECHO_C@
196 ECHO_N = @ECHO_N@
197 ECHO_T = @ECHO_T@
198 EGREP = @EGREP@
199 EXEEXT = @EXEEXT@
200 EXTLIBS = @EXTLIBS@
201 FGREP = @FGREP@
202 GNULIBS = @GNULIBS@
203 GREP = @GREP@
204 INSTALL = @INSTALL@
205 INSTALL_DATA = @INSTALL_DATA@
206 INSTALL_PROGRAM = @INSTALL_PROGRAM@
207 INSTALL_SCRIPT = @INSTALL_SCRIPT@
208 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
209 LD = @LD@
210 LDFLAGS = @LDFLAGS@
211 LIBOBJS = @LIBOBJS@
212 LIBS = @LIBS@
213 LIBTOOL = @LIBTOOL@
214 LIPO = @LIPO@
215 LN_S = @LN_S@
216 LTLIBOBJS = @LTLIBOBJS@
217 MAKEINFO = @MAKEINFO@
218 MANIFEST_TOOL = @MANIFEST_TOOL@
219 MKDIR_P = @MKDIR_P@
220 NM = @NM@
221 NMEDIT = @NMEDIT@
222 OBJDUMP = @OBJDUMP@
223 OBJEXT = @OBJEXT@
224 OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@
225 OST_CXXX2_LIBS = @OST_CXXX2_LIBS@
226 OTOOL = @OTOOL@
227 OTOOL64 = @OTOOL64@
228 PACKAGE = @PACKAGE@
229 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
230 PACKAGE_NAME = @PACKAGE_NAME@
231 PACKAGE_STRING = @PACKAGE_STRING@
232 PACKAGE_TARNAME = @PACKAGE_TARNAME@
233 PACKAGE_URL = @PACKAGE_URL@
234 PACKAGE_VERSION = @PACKAGE_VERSION@
235 PATH_SEPARATOR = @PATH_SEPARATOR@
236 PERL = @PERL@
237 RANLIB = @RANLIB@
238 SED = @SED@
239 SET_MAKE = @SET_MAKE@
240 SHELL = @SHELL@
241 SINGLE_FLAGS = @SINGLE_FLAGS@
242 SINGLE_LIBS = @SINGLE_LIBS@
243 SO_VERSION = @SO_VERSION@
244 STRIP = @STRIP@
245 UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@
246 VERSION = @VERSION@
247 abs_builddir = @abs_builddir@
248 abs_srcdir = @abs_srcdir@
249 abs_top_builddir = @abs_top_builddir@
250 abs_top_srcdir = @abs_top_srcdir@
251 ac_ct_AR = @ac_ct_AR@
252 ac_ct_CC = @ac_ct_CC@
253 ac_ct_CXX = @ac_ct_CXX@
254 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
255 am__include = @am__include@
256 am__leading_dot = @am__leading_dot@
257 am__quote = @am__quote@
258 am__tar = @am__tar@
259 am__untar = @am__untar@
260 bindir = @bindir@
261 build = @build@
262 build_alias = @build_alias@
263 build_cpu = @build_cpu@
264 build_os = @build_os@
265 build_vendor = @build_vendor@
266 builddir = @builddir@
267 datadir = @datadir@
268 datarootdir = @datarootdir@
269 docdir = @docdir@
270 dvidir = @dvidir@
271 exec_prefix = @exec_prefix@
272 host = @host@
273 host_alias = @host_alias@
274 host_cpu = @host_cpu@
275 host_os = @host_os@
276 host_vendor = @host_vendor@
277 htmldir = @htmldir@
278 includedir = @includedir@
279 infodir = @infodir@
280 install_sh = @install_sh@
281 libdir = @libdir@
282 libexecdir = @libexecdir@
283 localedir = @localedir@
284 localstatedir = @localstatedir@
285 mandir = @mandir@
286 mkdir_p = @mkdir_p@
287 oldincludedir = @oldincludedir@
288 pdfdir = @pdfdir@
289 prefix = @prefix@
290 program_transform_name = @program_transform_name@
291 psdir = @psdir@
292 sbindir = @sbindir@
293 sharedstatedir = @sharedstatedir@
294 srcdir = @srcdir@
295 sysconfdir = @sysconfdir@
296 target_alias = @target_alias@
297 top_build_prefix = @top_build_prefix@
298 top_builddir = @top_builddir@
299 top_srcdir = @top_srcdir@
300 SUBDIRS = ui-utilcpp tools
301 EXTRA_DIST = xfs/swab.h
302 all: all-recursive
303
304 .SUFFIXES:
305 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
306 @for dep in $?; do \
307 case '$(am__configure_deps)' in \
308 *$$dep*) \
309 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
310 && { if test -f $@; then exit 0; else break; fi; }; \
311 exit 1;; \
312 esac; \
313 done; \
314 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
315 $(am__cd) $(top_srcdir) && \
316 $(AUTOMAKE) --gnu src/Makefile
317 .PRECIOUS: Makefile
318 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
319 @case '$?' in \
320 *config.status*) \
321 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
322 *) \
323 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
324 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
325 esac;
326
327 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
328 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
329
330 $(top_srcdir)/configure: $(am__configure_deps)
331 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
332 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
333 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
334 $(am__aclocal_m4_deps):
335
336 mostlyclean-libtool:
337 -rm -f *.lo
338
339 clean-libtool:
340 -rm -rf .libs _libs
341
342 # This directory's subdirectories are mostly independent; you can cd
343 # into them and run 'make' without going through this Makefile.
344 # To change the values of 'make' variables: instead of editing Makefiles,
345 # (1) if the variable is set in 'config.status', edit 'config.status'
346 # (which will cause the Makefiles to be regenerated when you run 'make');
347 # (2) otherwise, pass the desired values on the 'make' command line.
348 $(am__recursive_targets):
349 @fail=; \
350 if $(am__make_keepgoing); then \
351 failcom='fail=yes'; \
352 else \
353 failcom='exit 1'; \
354 fi; \
355 dot_seen=no; \
356 target=`echo $@ | sed s/-recursive//`; \
357 case "$@" in \
358 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
359 *) list='$(SUBDIRS)' ;; \
360 esac; \
361 for subdir in $$list; do \
362 echo "Making $$target in $$subdir"; \
363 if test "$$subdir" = "."; then \
364 dot_seen=yes; \
365 local_target="$$target-am"; \
366 else \
367 local_target="$$target"; \
368 fi; \
369 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
370 || eval $$failcom; \
371 done; \
372 if test "$$dot_seen" = "no"; then \
373 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
374 fi; test -z "$$fail"
375
376 ID: $(am__tagged_files)
377 $(am__define_uniq_tagged_files); mkid -fID $$unique
378 tags: tags-recursive
379 TAGS: tags
380
381 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
382 set x; \
383 here=`pwd`; \
384 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
385 include_option=--etags-include; \
386 empty_fix=.; \
387 else \
388 include_option=--include; \
389 empty_fix=; \
390 fi; \
391 list='$(SUBDIRS)'; for subdir in $$list; do \
392 if test "$$subdir" = .; then :; else \
393 test ! -f $$subdir/TAGS || \
394 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
395 fi; \
396 done; \
397 $(am__define_uniq_tagged_files); \
398 shift; \
399 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
400 test -n "$$unique" || unique=$$empty_fix; \
401 if test $$# -gt 0; then \
402 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
403 "$$@" $$unique; \
404 else \
405 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
406 $$unique; \
407 fi; \
408 fi
409 ctags: ctags-recursive
410
411 CTAGS: ctags
412 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
413 $(am__define_uniq_tagged_files); \
414 test -z "$(CTAGS_ARGS)$$unique" \
415 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
416 $$unique
417
418 GTAGS:
419 here=`$(am__cd) $(top_builddir) && pwd` \
420 && $(am__cd) $(top_srcdir) \
421 && gtags -i $(GTAGS_ARGS) "$$here"
422 cscopelist: cscopelist-recursive
423
424 cscopelist-am: $(am__tagged_files)
425 list='$(am__tagged_files)'; \
426 case "$(srcdir)" in \
427 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
428 *) sdir=$(subdir)/$(srcdir) ;; \
429 esac; \
430 for i in $$list; do \
431 if test -f "$$i"; then \
432 echo "$(subdir)/$$i"; \
433 else \
434 echo "$$sdir/$$i"; \
435 fi; \
436 done >> $(top_builddir)/cscope.files
437
438 distclean-tags:
439 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
440
441 distdir: $(DISTFILES)
442 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
443 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
444 list='$(DISTFILES)'; \
445 dist_files=`for file in $$list; do echo $$file; done | \
446 sed -e "s|^$$srcdirstrip/||;t" \
447 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
448 case $$dist_files in \
449 */*) $(MKDIR_P) `echo "$$dist_files" | \
450 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
451 sort -u` ;; \
452 esac; \
453 for file in $$dist_files; do \
454 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
455 if test -d $$d/$$file; then \
456 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
457 if test -d "$(distdir)/$$file"; then \
458 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
459 fi; \
460 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
461 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
462 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
463 fi; \
464 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
465 else \
466 test -f "$(distdir)/$$file" \
467 || cp -p $$d/$$file "$(distdir)/$$file" \
468 || exit 1; \
469 fi; \
470 done
471 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
472 if test "$$subdir" = .; then :; else \
473 $(am__make_dryrun) \
474 || test -d "$(distdir)/$$subdir" \
475 || $(MKDIR_P) "$(distdir)/$$subdir" \
476 || exit 1; \
477 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
478 $(am__relativize); \
479 new_distdir=$$reldir; \
480 dir1=$$subdir; dir2="$(top_distdir)"; \
481 $(am__relativize); \
482 new_top_distdir=$$reldir; \
483 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
484 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
485 ($(am__cd) $$subdir && \
486 $(MAKE) $(AM_MAKEFLAGS) \
487 top_distdir="$$new_top_distdir" \
488 distdir="$$new_distdir" \
489 am__remove_distdir=: \
490 am__skip_length_check=: \
491 am__skip_mode_fix=: \
492 distdir) \
493 || exit 1; \
494 fi; \
495 done
496 check-am: all-am
497 check: check-recursive
498 all-am: Makefile
499 installdirs: installdirs-recursive
500 installdirs-am:
501 install: install-recursive
502 install-exec: install-exec-recursive
503 install-data: install-data-recursive
504 uninstall: uninstall-recursive
505
506 install-am: all-am
507 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
508
509 installcheck: installcheck-recursive
510 install-strip:
511 if test -z '$(STRIP)'; then \
512 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
513 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
514 install; \
515 else \
516 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
517 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
518 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
519 fi
520 mostlyclean-generic:
521
522 clean-generic:
523
524 distclean-generic:
525 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
526 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
527
528 maintainer-clean-generic:
529 @echo "This command is intended for maintainers to use"
530 @echo "it deletes files that may require special tools to rebuild."
531 clean: clean-recursive
532
533 clean-am: clean-generic clean-libtool mostlyclean-am
534
535 distclean: distclean-recursive
536 -rm -f Makefile
537 distclean-am: clean-am distclean-generic distclean-tags
538
539 dvi: dvi-recursive
540
541 dvi-am:
542
543 html: html-recursive
544
545 html-am:
546
547 info: info-recursive
548
549 info-am:
550
551 install-data-am:
552
553 install-dvi: install-dvi-recursive
554
555 install-dvi-am:
556
557 install-exec-am:
558
559 install-html: install-html-recursive
560
561 install-html-am:
562
563 install-info: install-info-recursive
564
565 install-info-am:
566
567 install-man:
568
569 install-pdf: install-pdf-recursive
570
571 install-pdf-am:
572
573 install-ps: install-ps-recursive
574
575 install-ps-am:
576
577 installcheck-am:
578
579 maintainer-clean: maintainer-clean-recursive
580 -rm -f Makefile
581 maintainer-clean-am: distclean-am maintainer-clean-generic
582
583 mostlyclean: mostlyclean-recursive
584
585 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
586
587 pdf: pdf-recursive
588
589 pdf-am:
590
591 ps: ps-recursive
592
593 ps-am:
594
595 uninstall-am:
596
597 .MAKE: $(am__recursive_targets) install-am install-strip
598
599 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
600 check-am clean clean-generic clean-libtool cscopelist-am ctags \
601 ctags-am distclean distclean-generic distclean-libtool \
602 distclean-tags distdir dvi dvi-am html html-am info info-am \
603 install install-am install-data install-data-am install-dvi \
604 install-dvi-am install-exec install-exec-am install-html \
605 install-html-am install-info install-info-am install-man \
606 install-pdf install-pdf-am install-ps install-ps-am \
607 install-strip installcheck installcheck-am installdirs \
608 installdirs-am maintainer-clean maintainer-clean-generic \
609 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
610 ps ps-am tags tags-am uninstall uninstall-am
611
612
613 # Tell versions [3.59,3.63) of GNU make to not export all variables.
614 # Otherwise a system limit (for SysV at least) may be exceeded.
615 .NOEXPORT:
0 // Local
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5
6 // C++ Libraries
7 #include <ui-utilcpp/Sys.hpp>
8 #include <ui-utilcpp/Cap.hpp>
9
10 void showCaps(std::string const & s, UI::Util::Cap const & c=UI::Util::Cap())
11 {
12 std::cout << s << ": " << c.get() << std::endl;
13 }
14
15 void changeCaps(std::string const & s)
16 {
17 showCaps("pre : [" + s + "]");
18 UI::Util::Cap(s).apply();
19 showCaps("post: [" + s + "]");
20 }
21
22 std::string USAGE("\nOnly a little dirty capabilities example program; see source.\n"
23 " Roughly this should run w/o exception:\n"
24 " $ touch ./local-capabilities.test\n"
25 " $ sudo ui-utilcpp-cap\n");
26
27 int main()
28 {
29 try
30 {
31 std::cout << "UID/EUID:" << UI::Util::Sys::getuid() << "/" << UI::Util::Sys::geteuid() << std::endl;
32
33 showCaps("Initial");
34
35 // Run this as root with this local file existing
36 std::string const testfile("./local-capabilities.test");
37
38 // Change file permissions to root
39 UI::Util::Sys::chown(testfile.c_str(), 0, 0);
40
41 // Keep capabilities when running setuid
42 UI::Util::Sys::prctl(PR_SET_KEEPCAPS, 1);
43
44 // Lower capabilities
45 UI::Util::Cap("cap_chown+p", UI::Util::Cap::Clear_).apply();
46 showCaps("Lowered");
47
48 // Set user and group id
49 setuid(1000);
50 setgid(1000);
51 std::cout << "UID/EUID:" << UI::Util::Sys::getuid() << "/" << UI::Util::Sys::geteuid() << std::endl;
52
53 #ifdef HAVE_CAP_COMPARE
54 UI::Util::Cap c;
55 assert(UI::Util::Cap() == c);
56 #endif
57
58 showCaps("After setuid");
59 {
60 UI::Util::CapScope cs("cap_chown");
61 showCaps("In CapScope");
62 UI::Util::Sys::chown(testfile.c_str(), 1000, 1000);
63 }
64 showCaps("After CapScope");
65 }
66 catch (std::exception const & e)
67 {
68 std::cerr << std::endl << "*EXCEPTION*: " << e.what() << std::endl;
69 std::cerr << USAGE << std::endl;
70 }
71 }
0 // Local
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5 #include <fstream>
6 #include <vector>
7
8 // POSIX C
9
10 // C++ Libraries
11 #include <ui-utilcpp/CmdLine.hpp>
12
13 class TestCmd: public UI::Util::CmdLine::Cmd
14 {
15 public:
16 TestCmd()
17 :Cmd("test", "Test command")
18 {
19 addArg("testarg", "Mandatory test argument documentation");
20 addOptArg("testoptarg", "Optional test argument documentation");
21 }
22 private:
23 int runCmd()
24 {
25 cl_->os() << "Test command running" << std::endl;
26 cl_->os() << "Arg(1) == " << getArg(1) << std::endl;
27 cl_->os() << "Arg(2) == " << getArg(2) << std::endl;
28
29 // Return "0" for ok, anything else for error
30 return(0);
31 }
32 };
33
34 class TestCmdLine: public UI::Util::CmdLine::CmdLine
35 {
36 public:
37 TestCmdLine(std::istream * is, std::ostream * os)
38 :CmdLine(is, os, &std::cerr, "Test Command Line", "\nTest Prompt# ")
39 {
40 // You can set some intital variables here
41 setVar("NATIVE_MOJO", "YES");
42
43 // You add any amount of Commands here
44 add(new UI::Util::CmdLine::HeaderCmd("Custom command line functions"));
45 add(new TestCmd());
46 }
47
48 ~TestCmdLine()
49 {}
50 };
51
52 int main()
53 {
54 return(TestCmdLine(0, &std::cout).run());
55 }
0 // STDC++
1 #include <string>
2 #include <memory>
3 #include <iostream>
4 #include <exception>
5 #include <cassert>
6
7 // C++ library
8 #include <ui-utilcpp/Socket.hpp>
9 #include <ui-utilcpp/Thread.hpp>
10
11 std::string const unSock("/tmp/ui-utilcpp-echoserver.sock");
12 std::string const inHost("localhost");
13 unsigned int const inPort(9999);
14
15 void client(UI::Util::Socket & client)
16 {
17 std::cout << "Connected: " << client.getId() << "->" << client.connect().getPeerId() << std::endl;
18
19 UI::Util::FDTypeStream<UI::Util::Socket> clientStream(client.getFd());
20 clientStream << "12345" << std::flush;
21 clientStream.clear();
22 std::string response;
23 clientStream >> response;
24 std::cout << "Response: \"" << response << "\"" << std::endl;
25 }
26
27 void server(UI::Util::Socket & server)
28 {
29 std::cout << "Listening: " << server.bind().listen().getId() << std::endl;
30 std::cout << "Echoing first 5 bytes on each connect." << std::endl;
31
32 while (1)
33 {
34 UI::Util::Socket connection(server.accept());
35 assert(connection.getFd() != -1);
36 std::cout << "Connection: " << connection.getId() << "<-" << connection.getPeerId() << " (setting snd/rcv timeout on connections 5 seconds)" << std::endl;
37 connection.
38 setRcvTimeout(5).
39 setSndTimeout(5);
40
41 UI::Util::FDTypeStream<UI::Util::Socket> stream(connection.getFd(), true);
42 char line[6];
43 stream.read(line, 5);
44 assert(stream.gcount() == 5);
45 line[5] = '\0';
46
47 std::cout << "ECHOING: " << line << std::endl;
48
49 stream.write(line, 5);
50 }
51 }
52
53 int main(int argc, char *argv[])
54 {
55 try
56 {
57 if (argc < 3) { throw UI::Exception("Wrong usage"); };
58
59 std::auto_ptr<UI::Util::Socket> socket((std::strcmp(argv[1], "unix") == 0) ?
60 (UI::Util::Socket *) new UI::Util::UnixSocket(unSock, true) :
61 (UI::Util::Socket *) new UI::Util::INetSocket(inHost, inPort, true, true));
62
63 std::strcmp(argv[2], "server") == 0 ? server(*socket.get()) : client(*socket.get());
64 }
65 catch (std::exception const & e)
66 {
67 std::cerr << "Error: " << e.what() << "." << std::endl;
68 std::cerr << "Usage: ui-utilcpp-echoserver inet|unix client|server" << std::endl;
69 return 1;
70 }
71 return 0;
72 }
0 // Local
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5 #include <string>
6
7 // POSIX C
8
9 // C++ Libraries
10 #include <ui-utilcpp/File.hpp>
11 #include <ui-utilcpp/Misc.hpp>
12 #include <ui-utilcpp/Thread.hpp>
13
14 using UI::Util::MutexLock;
15 using UI::Util::FileDescriptor;
16 using UI::Util::PosixFileMutex;
17 using UI::Util::BSDFileMutex;
18
19 template <typename M>
20 int lock(const std::string & fileName)
21 {
22 int exitCode(0);
23 try
24 {
25 M m(fileName);
26 MutexLock<M> l(m, false);
27 std::cout << "Locked (do some input to finish): " << fileName << std::flush;
28 std::string dummy;
29 std::cin >> dummy;
30 }
31 catch(typename MutexLock<M>::Exception const & ex)
32 {
33 std::cerr << "MutexLock exception: " << ex.getCode() << ": " << ex.what() << std::endl;
34 exitCode = 1;
35 }
36 catch(typename M::Exception const & ex)
37 {
38 std::cerr << "FileLock exception: " << ex.getCode() << ": " << ex.what() << std::endl;
39 exitCode = 2;
40 }
41 catch(std::exception const & ex)
42 {
43 std::cerr << "std::exception: " << ex.what() << std::endl;
44 exitCode = 3;
45 }
46 catch(...)
47 {
48 std::cerr << "ERROR: Unknown exception!" << std::endl;
49 exitCode = 4;
50 }
51 return(exitCode);
52 }
53
54 int main(int argc, char *argv[])
55 {
56 if (argc != 3)
57 {
58 std::cerr << "Lock a file via POSIX or BSD advisory locking." << std::endl << std::endl;
59 std::cerr << "Usage: " << argv[0] << " posix|bsd <file>" << std::endl << std::endl;
60 std::cerr << "Exit Codes: 0 for success, 1 if file was locked, 2 if creat(2) failed, 3 for unknown error." << std::endl;
61 std::cerr << "Exit Codes: 42 for some other error." << std::endl;
62 return(42);
63 }
64
65 if ((std::string) argv[1] == "posix")
66 {
67 return(lock<PosixFileMutex>(argv[2]));
68 }
69 else if ((std::string) argv[1] == "bsd")
70 {
71 return(lock<BSDFileMutex>(argv[2]));
72 }
73 else
74 {
75 std::cerr << "Argument 1 must be either \"posix\" or \"bsd\"." << std::endl;
76 return(42);
77 }
78 }
0 // Local configuration
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5
6 // POSIX C
7
8 // SYSTEM C
9
10 // C++ Libraries
11 #include <ui-utilcpp/GetOpt.hpp>
12
13 int main(int argc, char *argv[])
14 {
15 int retValue(0);
16
17 // Define Command Line Arguments
18 UI::Util::GetOpt getOpt(argc, argv);
19 getOpt
20 .set("version", 'v', UI::Util::GetOpt::NoArg_, "Show version information.")
21 .set("help", 'h', UI::Util::GetOpt::NoArg_, "Show usage information.")
22 .set("noarg", 'n', UI::Util::GetOpt::NoArg_, "Option with no argument.")
23 .set("arg", 'a', UI::Util::GetOpt::Arg_, "Option with mandatory argument.")
24 .set("optarg", 'o', UI::Util::GetOpt::OptArg_, "Option with optional argument.");
25
26 // Process standard options
27 if (!getOpt.isValid())
28 {
29 retValue = getOpt.wrongUsage("Parse error");
30 }
31 else if (getOpt.get("version")->isGiven())
32 {
33 std::cout << "Release : " << PACKAGE << "-" << VERSION << "." << std::endl << std::endl;
34 std::cout << "Build time: " << __DATE__ << " " << __TIME__ << "." << std::endl;
35 }
36 else if (getOpt.get("help")->isGiven())
37 {
38 std::cout << std::endl << "Blah tool to do blah." << std::endl;
39 getOpt.printUsage();
40 }
41 else
42 {
43 // Go down all other options sequentially
44 if (getOpt.get("noarg")->isGiven())
45 {
46 std::cout << "Option \"noarg\" given." << std::endl;
47 }
48
49 if (getOpt.get("arg")->isGiven())
50 {
51 std::cout << "Option \"arg\" given." << std::endl;
52 std::cout << "Argument is: " << getOpt.get("arg")->getArg() << std::endl;
53 }
54
55 if (getOpt.get("optarg")->isGiven())
56 {
57 std::cout << "Option \"arg\" given." << std::endl;
58 std::cout << "Argument is: " << getOpt.get("optarg")->getArg() << std::endl;
59 }
60
61 // Here, some main program code starts
62 std::cout << "Program Main Run" << std::endl;
63
64 std::cout << "Try --help if you want to test GetOpt" << std::endl;
65 }
66 return retValue;
67 }
0 AM_CPPFLAGS = -I$(top_srcdir)/src
1 AM_CXXFLAGS = -Wall
2 LIBS += $(OST_CXXX2_LIBS)
3
4 scripts = ui-utilcpp-sp2ui
5 EXTRA_DIST = ${scripts}
6 bin_SCRIPTS = ${scripts}
7
8 bin_PROGRAMS = \
9 ui-utilcpp-unittests \
10 ui-utilcpp-getopt \
11 ui-utilcpp-getopt \
12 ui-utilcpp-smlog \
13 ui-utilcpp-smlogmono \
14 ui-utilcpp-regex \
15 ui-utilcpp-cmdline \
16 ui-utilcpp-threads \
17 ui-utilcpp-filelock \
18 ui-utilcpp-echoserver \
19 ui-utilcpp-quota \
20 ui-utilcpp-recoder \
21 ui-utilcpp-wget \
22 ui-utilcpp-cap
23
24 docdir = $(datadir)/doc/$(PACKAGE)/examples
25 doc_DATA = GetOpt.cpp SMLog.cpp SMLogMono.cpp Regex.cpp CmdLine.cpp Threads.cpp FileLock.cpp EchoServer.cpp Quota.cpp
26
27 ui_utilcpp_unittests_SOURCES = UnitTests.cpp
28 ui_utilcpp_unittests_LDADD = $(XML_LIBS) $(XSLT_LIBS) -lboost_unit_test_framework ../ui-utilcpp/libui-utilcpp.la
29
30 ui_utilcpp_getopt_SOURCES = GetOpt.cpp
31 ui_utilcpp_getopt_LDADD = ../ui-utilcpp/libui-utilcpp.la
32
33 ui_utilcpp_smlog_SOURCES = SMLog.cpp
34 ui_utilcpp_smlog_LDADD = ../ui-utilcpp/libui-utilcpp.la
35 ui_utilcpp_smlog_CXXFLAGS = -pthread $(OST_CXXX2_FLAGS) -DSM_LOGFACILITY=ost::Slog::classUser -DSM_LOGLEVEL=7
36 ui_utilcpp_smlog_LDFLAGS = -pthread
37
38 ui_utilcpp_smlogmono_SOURCES = SMLogMono.cpp
39 ui_utilcpp_smlogmono_LDADD = ../ui-utilcpp/libui-utilcpp.la
40 ui_utilcpp_smlogmono_CXXFLAGS = -DSM_LOGLEVEL=7
41
42 ui_utilcpp_regex_SOURCES = Regex.cpp
43 ui_utilcpp_regex_LDADD = ../ui-utilcpp/libui-utilcpp.la
44
45 ui_utilcpp_cmdline_SOURCES = CmdLine.cpp
46 ui_utilcpp_cmdline_LDADD = ../ui-utilcpp/libui-utilcpp.la
47
48 ui_utilcpp_threads_SOURCES = Threads.cpp
49 ui_utilcpp_threads_LDADD = ../ui-utilcpp/libui-utilcpp.la
50
51 ui_utilcpp_filelock_SOURCES = FileLock.cpp
52 ui_utilcpp_filelock_LDADD = ../ui-utilcpp/libui-utilcpp.la
53
54 ui_utilcpp_echoserver_SOURCES = EchoServer.cpp
55 ui_utilcpp_echoserver_LDADD = ../ui-utilcpp/libui-utilcpp.la
56
57 ui_utilcpp_quota_SOURCES = Quota.cpp
58 ui_utilcpp_quota_LDADD = ../ui-utilcpp/libui-utilcpp.la
59
60 ui_utilcpp_recoder_SOURCES = Recoder.cpp
61 ui_utilcpp_recoder_LDADD = ../ui-utilcpp/libui-utilcpp.la
62
63 ui_utilcpp_wget_SOURCES = WGet.cpp
64 ui_utilcpp_wget_LDADD = ../ui-utilcpp/libui-utilcpp.la
65
66 ui_utilcpp_cap_SOURCES = Cap.cpp
67 ui_utilcpp_cap_LDADD = ../ui-utilcpp/libui-utilcpp.la
68
69 check-local:
70 ./ui-utilcpp-unittests
0 # Makefile.in generated by automake 1.14.1 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 bin_PROGRAMS = ui-utilcpp-unittests$(EXEEXT) \
83 ui-utilcpp-getopt$(EXEEXT) ui-utilcpp-getopt$(EXEEXT) \
84 ui-utilcpp-smlog$(EXEEXT) ui-utilcpp-smlogmono$(EXEEXT) \
85 ui-utilcpp-regex$(EXEEXT) ui-utilcpp-cmdline$(EXEEXT) \
86 ui-utilcpp-threads$(EXEEXT) ui-utilcpp-filelock$(EXEEXT) \
87 ui-utilcpp-echoserver$(EXEEXT) ui-utilcpp-quota$(EXEEXT) \
88 ui-utilcpp-recoder$(EXEEXT) ui-utilcpp-wget$(EXEEXT) \
89 ui-utilcpp-cap$(EXEEXT)
90 subdir = src/tools
91 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
92 $(top_srcdir)/depcomp
93 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
94 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
95 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
96 $(ACLOCAL_M4)
97 mkinstalldirs = $(install_sh) -d
98 CONFIG_HEADER = $(top_builddir)/config.h
99 CONFIG_CLEAN_FILES =
100 CONFIG_CLEAN_VPATH_FILES =
101 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
102 "$(DESTDIR)$(docdir)"
103 PROGRAMS = $(bin_PROGRAMS)
104 am_ui_utilcpp_cap_OBJECTS = Cap.$(OBJEXT)
105 ui_utilcpp_cap_OBJECTS = $(am_ui_utilcpp_cap_OBJECTS)
106 ui_utilcpp_cap_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
107 AM_V_lt = $(am__v_lt_@AM_V@)
108 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
109 am__v_lt_0 = --silent
110 am__v_lt_1 =
111 am_ui_utilcpp_cmdline_OBJECTS = CmdLine.$(OBJEXT)
112 ui_utilcpp_cmdline_OBJECTS = $(am_ui_utilcpp_cmdline_OBJECTS)
113 ui_utilcpp_cmdline_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
114 am_ui_utilcpp_echoserver_OBJECTS = EchoServer.$(OBJEXT)
115 ui_utilcpp_echoserver_OBJECTS = $(am_ui_utilcpp_echoserver_OBJECTS)
116 ui_utilcpp_echoserver_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
117 am_ui_utilcpp_filelock_OBJECTS = FileLock.$(OBJEXT)
118 ui_utilcpp_filelock_OBJECTS = $(am_ui_utilcpp_filelock_OBJECTS)
119 ui_utilcpp_filelock_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
120 am_ui_utilcpp_getopt_OBJECTS = GetOpt.$(OBJEXT)
121 ui_utilcpp_getopt_OBJECTS = $(am_ui_utilcpp_getopt_OBJECTS)
122 ui_utilcpp_getopt_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
123 am_ui_utilcpp_quota_OBJECTS = Quota.$(OBJEXT)
124 ui_utilcpp_quota_OBJECTS = $(am_ui_utilcpp_quota_OBJECTS)
125 ui_utilcpp_quota_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
126 am_ui_utilcpp_recoder_OBJECTS = Recoder.$(OBJEXT)
127 ui_utilcpp_recoder_OBJECTS = $(am_ui_utilcpp_recoder_OBJECTS)
128 ui_utilcpp_recoder_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
129 am_ui_utilcpp_regex_OBJECTS = Regex.$(OBJEXT)
130 ui_utilcpp_regex_OBJECTS = $(am_ui_utilcpp_regex_OBJECTS)
131 ui_utilcpp_regex_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
132 am_ui_utilcpp_smlog_OBJECTS = ui_utilcpp_smlog-SMLog.$(OBJEXT)
133 ui_utilcpp_smlog_OBJECTS = $(am_ui_utilcpp_smlog_OBJECTS)
134 ui_utilcpp_smlog_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
135 ui_utilcpp_smlog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
136 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
137 $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) \
138 $(ui_utilcpp_smlog_LDFLAGS) $(LDFLAGS) -o $@
139 am_ui_utilcpp_smlogmono_OBJECTS = \
140 ui_utilcpp_smlogmono-SMLogMono.$(OBJEXT)
141 ui_utilcpp_smlogmono_OBJECTS = $(am_ui_utilcpp_smlogmono_OBJECTS)
142 ui_utilcpp_smlogmono_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
143 ui_utilcpp_smlogmono_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
144 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
145 $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
146 $(LDFLAGS) -o $@
147 am_ui_utilcpp_threads_OBJECTS = Threads.$(OBJEXT)
148 ui_utilcpp_threads_OBJECTS = $(am_ui_utilcpp_threads_OBJECTS)
149 ui_utilcpp_threads_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
150 am_ui_utilcpp_unittests_OBJECTS = UnitTests.$(OBJEXT)
151 ui_utilcpp_unittests_OBJECTS = $(am_ui_utilcpp_unittests_OBJECTS)
152 ui_utilcpp_unittests_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
153 am_ui_utilcpp_wget_OBJECTS = WGet.$(OBJEXT)
154 ui_utilcpp_wget_OBJECTS = $(am_ui_utilcpp_wget_OBJECTS)
155 ui_utilcpp_wget_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la
156 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
157 am__vpath_adj = case $$p in \
158 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
159 *) f=$$p;; \
160 esac;
161 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
162 am__install_max = 40
163 am__nobase_strip_setup = \
164 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
165 am__nobase_strip = \
166 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
167 am__nobase_list = $(am__nobase_strip_setup); \
168 for p in $$list; do echo "$$p $$p"; done | \
169 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
170 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
171 if (++n[$$2] == $(am__install_max)) \
172 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
173 END { for (dir in files) print dir, files[dir] }'
174 am__base_list = \
175 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
176 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
177 am__uninstall_files_from_dir = { \
178 test -z "$$files" \
179 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
180 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
181 $(am__cd) "$$dir" && rm -f $$files; }; \
182 }
183 SCRIPTS = $(bin_SCRIPTS)
184 AM_V_P = $(am__v_P_@AM_V@)
185 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
186 am__v_P_0 = false
187 am__v_P_1 = :
188 AM_V_GEN = $(am__v_GEN_@AM_V@)
189 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
190 am__v_GEN_0 = @echo " GEN " $@;
191 am__v_GEN_1 =
192 AM_V_at = $(am__v_at_@AM_V@)
193 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
194 am__v_at_0 = @
195 am__v_at_1 =
196 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
197 depcomp = $(SHELL) $(top_srcdir)/depcomp
198 am__depfiles_maybe = depfiles
199 am__mv = mv -f
200 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
201 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
202 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
203 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
204 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
205 $(AM_CXXFLAGS) $(CXXFLAGS)
206 AM_V_CXX = $(am__v_CXX_@AM_V@)
207 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
208 am__v_CXX_0 = @echo " CXX " $@;
209 am__v_CXX_1 =
210 CXXLD = $(CXX)
211 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
212 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
213 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
214 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
215 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
216 am__v_CXXLD_0 = @echo " CXXLD " $@;
217 am__v_CXXLD_1 =
218 SOURCES = $(ui_utilcpp_cap_SOURCES) $(ui_utilcpp_cmdline_SOURCES) \
219 $(ui_utilcpp_echoserver_SOURCES) \
220 $(ui_utilcpp_filelock_SOURCES) $(ui_utilcpp_getopt_SOURCES) \
221 $(ui_utilcpp_quota_SOURCES) $(ui_utilcpp_recoder_SOURCES) \
222 $(ui_utilcpp_regex_SOURCES) $(ui_utilcpp_smlog_SOURCES) \
223 $(ui_utilcpp_smlogmono_SOURCES) $(ui_utilcpp_threads_SOURCES) \
224 $(ui_utilcpp_unittests_SOURCES) $(ui_utilcpp_wget_SOURCES)
225 DIST_SOURCES = $(ui_utilcpp_cap_SOURCES) $(ui_utilcpp_cmdline_SOURCES) \
226 $(ui_utilcpp_echoserver_SOURCES) \
227 $(ui_utilcpp_filelock_SOURCES) $(ui_utilcpp_getopt_SOURCES) \
228 $(ui_utilcpp_quota_SOURCES) $(ui_utilcpp_recoder_SOURCES) \
229 $(ui_utilcpp_regex_SOURCES) $(ui_utilcpp_smlog_SOURCES) \
230 $(ui_utilcpp_smlogmono_SOURCES) $(ui_utilcpp_threads_SOURCES) \
231 $(ui_utilcpp_unittests_SOURCES) $(ui_utilcpp_wget_SOURCES)
232 am__can_run_installinfo = \
233 case $$AM_UPDATE_INFO_DIR in \
234 n|no|NO) false;; \
235 *) (install-info --version) >/dev/null 2>&1;; \
236 esac
237 DATA = $(doc_DATA)
238 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
239 # Read a list of newline-separated strings from the standard input,
240 # and print each of them once, without duplicates. Input order is
241 # *not* preserved.
242 am__uniquify_input = $(AWK) '\
243 BEGIN { nonempty = 0; } \
244 { items[$$0] = 1; nonempty = 1; } \
245 END { if (nonempty) { for (i in items) print i; }; } \
246 '
247 # Make sure the list of sources is unique. This is necessary because,
248 # e.g., the same source file might be shared among _SOURCES variables
249 # for different programs/libraries.
250 am__define_uniq_tagged_files = \
251 list='$(am__tagged_files)'; \
252 unique=`for i in $$list; do \
253 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
254 done | $(am__uniquify_input)`
255 ETAGS = etags
256 CTAGS = ctags
257 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
258 ACLOCAL = @ACLOCAL@
259 AMTAR = @AMTAR@
260 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
261 AR = @AR@
262 AUTOCONF = @AUTOCONF@
263 AUTOHEADER = @AUTOHEADER@
264 AUTOMAKE = @AUTOMAKE@
265 AWK = @AWK@
266 CC = @CC@
267 CCDEPMODE = @CCDEPMODE@
268 CCGNU2_CONFIG = @CCGNU2_CONFIG@
269 CFLAGS = @CFLAGS@
270 CPP = @CPP@
271 CPPFLAGS = @CPPFLAGS@
272 CXX = @CXX@
273 CXXCPP = @CXXCPP@
274 CXXDEPMODE = @CXXDEPMODE@
275 CXXFLAGS = @CXXFLAGS@
276 CYGPATH_W = @CYGPATH_W@
277 DEFS = @DEFS@
278 DEPDIR = @DEPDIR@
279 DLLTOOL = @DLLTOOL@
280 DOXYGEN = @DOXYGEN@
281 DSYMUTIL = @DSYMUTIL@
282 DUMPBIN = @DUMPBIN@
283 ECHO_C = @ECHO_C@
284 ECHO_N = @ECHO_N@
285 ECHO_T = @ECHO_T@
286 EGREP = @EGREP@
287 EXEEXT = @EXEEXT@
288 EXTLIBS = @EXTLIBS@
289 FGREP = @FGREP@
290 GNULIBS = @GNULIBS@
291 GREP = @GREP@
292 INSTALL = @INSTALL@
293 INSTALL_DATA = @INSTALL_DATA@
294 INSTALL_PROGRAM = @INSTALL_PROGRAM@
295 INSTALL_SCRIPT = @INSTALL_SCRIPT@
296 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
297 LD = @LD@
298 LDFLAGS = @LDFLAGS@
299 LIBOBJS = @LIBOBJS@
300 LIBS = @LIBS@ $(OST_CXXX2_LIBS)
301 LIBTOOL = @LIBTOOL@
302 LIPO = @LIPO@
303 LN_S = @LN_S@
304 LTLIBOBJS = @LTLIBOBJS@
305 MAKEINFO = @MAKEINFO@
306 MANIFEST_TOOL = @MANIFEST_TOOL@
307 MKDIR_P = @MKDIR_P@
308 NM = @NM@
309 NMEDIT = @NMEDIT@
310 OBJDUMP = @OBJDUMP@
311 OBJEXT = @OBJEXT@
312 OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@
313 OST_CXXX2_LIBS = @OST_CXXX2_LIBS@
314 OTOOL = @OTOOL@
315 OTOOL64 = @OTOOL64@
316 PACKAGE = @PACKAGE@
317 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
318 PACKAGE_NAME = @PACKAGE_NAME@
319 PACKAGE_STRING = @PACKAGE_STRING@
320 PACKAGE_TARNAME = @PACKAGE_TARNAME@
321 PACKAGE_URL = @PACKAGE_URL@
322 PACKAGE_VERSION = @PACKAGE_VERSION@
323 PATH_SEPARATOR = @PATH_SEPARATOR@
324 PERL = @PERL@
325 RANLIB = @RANLIB@
326 SED = @SED@
327 SET_MAKE = @SET_MAKE@
328 SHELL = @SHELL@
329 SINGLE_FLAGS = @SINGLE_FLAGS@
330 SINGLE_LIBS = @SINGLE_LIBS@
331 SO_VERSION = @SO_VERSION@
332 STRIP = @STRIP@
333 UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@
334 VERSION = @VERSION@
335 abs_builddir = @abs_builddir@
336 abs_srcdir = @abs_srcdir@
337 abs_top_builddir = @abs_top_builddir@
338 abs_top_srcdir = @abs_top_srcdir@
339 ac_ct_AR = @ac_ct_AR@
340 ac_ct_CC = @ac_ct_CC@
341 ac_ct_CXX = @ac_ct_CXX@
342 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
343 am__include = @am__include@
344 am__leading_dot = @am__leading_dot@
345 am__quote = @am__quote@
346 am__tar = @am__tar@
347 am__untar = @am__untar@
348 bindir = @bindir@
349 build = @build@
350 build_alias = @build_alias@
351 build_cpu = @build_cpu@
352 build_os = @build_os@
353 build_vendor = @build_vendor@
354 builddir = @builddir@
355 datadir = @datadir@
356 datarootdir = @datarootdir@
357 docdir = $(datadir)/doc/$(PACKAGE)/examples
358 dvidir = @dvidir@
359 exec_prefix = @exec_prefix@
360 host = @host@
361 host_alias = @host_alias@
362 host_cpu = @host_cpu@
363 host_os = @host_os@
364 host_vendor = @host_vendor@
365 htmldir = @htmldir@
366 includedir = @includedir@
367 infodir = @infodir@
368 install_sh = @install_sh@
369 libdir = @libdir@
370 libexecdir = @libexecdir@
371 localedir = @localedir@
372 localstatedir = @localstatedir@
373 mandir = @mandir@
374 mkdir_p = @mkdir_p@
375 oldincludedir = @oldincludedir@
376 pdfdir = @pdfdir@
377 prefix = @prefix@
378 program_transform_name = @program_transform_name@
379 psdir = @psdir@
380 sbindir = @sbindir@
381 sharedstatedir = @sharedstatedir@
382 srcdir = @srcdir@
383 sysconfdir = @sysconfdir@
384 target_alias = @target_alias@
385 top_build_prefix = @top_build_prefix@
386 top_builddir = @top_builddir@
387 top_srcdir = @top_srcdir@
388 AM_CPPFLAGS = -I$(top_srcdir)/src
389 AM_CXXFLAGS = -Wall
390 scripts = ui-utilcpp-sp2ui
391 EXTRA_DIST = ${scripts}
392 bin_SCRIPTS = ${scripts}
393 doc_DATA = GetOpt.cpp SMLog.cpp SMLogMono.cpp Regex.cpp CmdLine.cpp Threads.cpp FileLock.cpp EchoServer.cpp Quota.cpp
394 ui_utilcpp_unittests_SOURCES = UnitTests.cpp
395 ui_utilcpp_unittests_LDADD = $(XML_LIBS) $(XSLT_LIBS) -lboost_unit_test_framework ../ui-utilcpp/libui-utilcpp.la
396 ui_utilcpp_getopt_SOURCES = GetOpt.cpp
397 ui_utilcpp_getopt_LDADD = ../ui-utilcpp/libui-utilcpp.la
398 ui_utilcpp_smlog_SOURCES = SMLog.cpp
399 ui_utilcpp_smlog_LDADD = ../ui-utilcpp/libui-utilcpp.la
400 ui_utilcpp_smlog_CXXFLAGS = -pthread $(OST_CXXX2_FLAGS) -DSM_LOGFACILITY=ost::Slog::classUser -DSM_LOGLEVEL=7
401 ui_utilcpp_smlog_LDFLAGS = -pthread
402 ui_utilcpp_smlogmono_SOURCES = SMLogMono.cpp
403 ui_utilcpp_smlogmono_LDADD = ../ui-utilcpp/libui-utilcpp.la
404 ui_utilcpp_smlogmono_CXXFLAGS = -DSM_LOGLEVEL=7
405 ui_utilcpp_regex_SOURCES = Regex.cpp
406 ui_utilcpp_regex_LDADD = ../ui-utilcpp/libui-utilcpp.la
407 ui_utilcpp_cmdline_SOURCES = CmdLine.cpp
408 ui_utilcpp_cmdline_LDADD = ../ui-utilcpp/libui-utilcpp.la
409 ui_utilcpp_threads_SOURCES = Threads.cpp
410 ui_utilcpp_threads_LDADD = ../ui-utilcpp/libui-utilcpp.la
411 ui_utilcpp_filelock_SOURCES = FileLock.cpp
412 ui_utilcpp_filelock_LDADD = ../ui-utilcpp/libui-utilcpp.la
413 ui_utilcpp_echoserver_SOURCES = EchoServer.cpp
414 ui_utilcpp_echoserver_LDADD = ../ui-utilcpp/libui-utilcpp.la
415 ui_utilcpp_quota_SOURCES = Quota.cpp
416 ui_utilcpp_quota_LDADD = ../ui-utilcpp/libui-utilcpp.la
417 ui_utilcpp_recoder_SOURCES = Recoder.cpp
418 ui_utilcpp_recoder_LDADD = ../ui-utilcpp/libui-utilcpp.la
419 ui_utilcpp_wget_SOURCES = WGet.cpp
420 ui_utilcpp_wget_LDADD = ../ui-utilcpp/libui-utilcpp.la
421 ui_utilcpp_cap_SOURCES = Cap.cpp
422 ui_utilcpp_cap_LDADD = ../ui-utilcpp/libui-utilcpp.la
423 all: all-am
424
425 .SUFFIXES:
426 .SUFFIXES: .cpp .lo .o .obj
427 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
428 @for dep in $?; do \
429 case '$(am__configure_deps)' in \
430 *$$dep*) \
431 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
432 && { if test -f $@; then exit 0; else break; fi; }; \
433 exit 1;; \
434 esac; \
435 done; \
436 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tools/Makefile'; \
437 $(am__cd) $(top_srcdir) && \
438 $(AUTOMAKE) --gnu src/tools/Makefile
439 .PRECIOUS: Makefile
440 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
441 @case '$?' in \
442 *config.status*) \
443 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
444 *) \
445 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
446 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
447 esac;
448
449 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
450 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
451
452 $(top_srcdir)/configure: $(am__configure_deps)
453 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
454 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
455 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
456 $(am__aclocal_m4_deps):
457 install-binPROGRAMS: $(bin_PROGRAMS)
458 @$(NORMAL_INSTALL)
459 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
460 if test -n "$$list"; then \
461 echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
462 $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
463 fi; \
464 for p in $$list; do echo "$$p $$p"; done | \
465 sed 's/$(EXEEXT)$$//' | \
466 while read p p1; do if test -f $$p \
467 || test -f $$p1 \
468 ; then echo "$$p"; echo "$$p"; else :; fi; \
469 done | \
470 sed -e 'p;s,.*/,,;n;h' \
471 -e 's|.*|.|' \
472 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
473 sed 'N;N;N;s,\n, ,g' | \
474 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
475 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
476 if ($$2 == $$4) files[d] = files[d] " " $$1; \
477 else { print "f", $$3 "/" $$4, $$1; } } \
478 END { for (d in files) print "f", d, files[d] }' | \
479 while read type dir files; do \
480 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
481 test -z "$$files" || { \
482 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
483 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
484 } \
485 ; done
486
487 uninstall-binPROGRAMS:
488 @$(NORMAL_UNINSTALL)
489 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
490 files=`for p in $$list; do echo "$$p"; done | \
491 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
492 -e 's/$$/$(EXEEXT)/' \
493 `; \
494 test -n "$$list" || exit 0; \
495 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
496 cd "$(DESTDIR)$(bindir)" && rm -f $$files
497
498 clean-binPROGRAMS:
499 @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
500 echo " rm -f" $$list; \
501 rm -f $$list || exit $$?; \
502 test -n "$(EXEEXT)" || exit 0; \
503 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
504 echo " rm -f" $$list; \
505 rm -f $$list
506
507 ui-utilcpp-cap$(EXEEXT): $(ui_utilcpp_cap_OBJECTS) $(ui_utilcpp_cap_DEPENDENCIES) $(EXTRA_ui_utilcpp_cap_DEPENDENCIES)
508 @rm -f ui-utilcpp-cap$(EXEEXT)
509 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_cap_OBJECTS) $(ui_utilcpp_cap_LDADD) $(LIBS)
510
511 ui-utilcpp-cmdline$(EXEEXT): $(ui_utilcpp_cmdline_OBJECTS) $(ui_utilcpp_cmdline_DEPENDENCIES) $(EXTRA_ui_utilcpp_cmdline_DEPENDENCIES)
512 @rm -f ui-utilcpp-cmdline$(EXEEXT)
513 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_cmdline_OBJECTS) $(ui_utilcpp_cmdline_LDADD) $(LIBS)
514
515 ui-utilcpp-echoserver$(EXEEXT): $(ui_utilcpp_echoserver_OBJECTS) $(ui_utilcpp_echoserver_DEPENDENCIES) $(EXTRA_ui_utilcpp_echoserver_DEPENDENCIES)
516 @rm -f ui-utilcpp-echoserver$(EXEEXT)
517 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_echoserver_OBJECTS) $(ui_utilcpp_echoserver_LDADD) $(LIBS)
518
519 ui-utilcpp-filelock$(EXEEXT): $(ui_utilcpp_filelock_OBJECTS) $(ui_utilcpp_filelock_DEPENDENCIES) $(EXTRA_ui_utilcpp_filelock_DEPENDENCIES)
520 @rm -f ui-utilcpp-filelock$(EXEEXT)
521 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_filelock_OBJECTS) $(ui_utilcpp_filelock_LDADD) $(LIBS)
522
523 ui-utilcpp-getopt$(EXEEXT): $(ui_utilcpp_getopt_OBJECTS) $(ui_utilcpp_getopt_DEPENDENCIES) $(EXTRA_ui_utilcpp_getopt_DEPENDENCIES)
524 @rm -f ui-utilcpp-getopt$(EXEEXT)
525 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_getopt_OBJECTS) $(ui_utilcpp_getopt_LDADD) $(LIBS)
526
527 ui-utilcpp-quota$(EXEEXT): $(ui_utilcpp_quota_OBJECTS) $(ui_utilcpp_quota_DEPENDENCIES) $(EXTRA_ui_utilcpp_quota_DEPENDENCIES)
528 @rm -f ui-utilcpp-quota$(EXEEXT)
529 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_quota_OBJECTS) $(ui_utilcpp_quota_LDADD) $(LIBS)
530
531 ui-utilcpp-recoder$(EXEEXT): $(ui_utilcpp_recoder_OBJECTS) $(ui_utilcpp_recoder_DEPENDENCIES) $(EXTRA_ui_utilcpp_recoder_DEPENDENCIES)
532 @rm -f ui-utilcpp-recoder$(EXEEXT)
533 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_recoder_OBJECTS) $(ui_utilcpp_recoder_LDADD) $(LIBS)
534
535 ui-utilcpp-regex$(EXEEXT): $(ui_utilcpp_regex_OBJECTS) $(ui_utilcpp_regex_DEPENDENCIES) $(EXTRA_ui_utilcpp_regex_DEPENDENCIES)
536 @rm -f ui-utilcpp-regex$(EXEEXT)
537 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_regex_OBJECTS) $(ui_utilcpp_regex_LDADD) $(LIBS)
538
539 ui-utilcpp-smlog$(EXEEXT): $(ui_utilcpp_smlog_OBJECTS) $(ui_utilcpp_smlog_DEPENDENCIES) $(EXTRA_ui_utilcpp_smlog_DEPENDENCIES)
540 @rm -f ui-utilcpp-smlog$(EXEEXT)
541 $(AM_V_CXXLD)$(ui_utilcpp_smlog_LINK) $(ui_utilcpp_smlog_OBJECTS) $(ui_utilcpp_smlog_LDADD) $(LIBS)
542
543 ui-utilcpp-smlogmono$(EXEEXT): $(ui_utilcpp_smlogmono_OBJECTS) $(ui_utilcpp_smlogmono_DEPENDENCIES) $(EXTRA_ui_utilcpp_smlogmono_DEPENDENCIES)
544 @rm -f ui-utilcpp-smlogmono$(EXEEXT)
545 $(AM_V_CXXLD)$(ui_utilcpp_smlogmono_LINK) $(ui_utilcpp_smlogmono_OBJECTS) $(ui_utilcpp_smlogmono_LDADD) $(LIBS)
546
547 ui-utilcpp-threads$(EXEEXT): $(ui_utilcpp_threads_OBJECTS) $(ui_utilcpp_threads_DEPENDENCIES) $(EXTRA_ui_utilcpp_threads_DEPENDENCIES)
548 @rm -f ui-utilcpp-threads$(EXEEXT)
549 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_threads_OBJECTS) $(ui_utilcpp_threads_LDADD) $(LIBS)
550
551 ui-utilcpp-unittests$(EXEEXT): $(ui_utilcpp_unittests_OBJECTS) $(ui_utilcpp_unittests_DEPENDENCIES) $(EXTRA_ui_utilcpp_unittests_DEPENDENCIES)
552 @rm -f ui-utilcpp-unittests$(EXEEXT)
553 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_unittests_OBJECTS) $(ui_utilcpp_unittests_LDADD) $(LIBS)
554
555 ui-utilcpp-wget$(EXEEXT): $(ui_utilcpp_wget_OBJECTS) $(ui_utilcpp_wget_DEPENDENCIES) $(EXTRA_ui_utilcpp_wget_DEPENDENCIES)
556 @rm -f ui-utilcpp-wget$(EXEEXT)
557 $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_wget_OBJECTS) $(ui_utilcpp_wget_LDADD) $(LIBS)
558 install-binSCRIPTS: $(bin_SCRIPTS)
559 @$(NORMAL_INSTALL)
560 @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
561 if test -n "$$list"; then \
562 echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
563 $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
564 fi; \
565 for p in $$list; do \
566 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
567 if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
568 done | \
569 sed -e 'p;s,.*/,,;n' \
570 -e 'h;s|.*|.|' \
571 -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
572 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
573 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
574 if ($$2 == $$4) { files[d] = files[d] " " $$1; \
575 if (++n[d] == $(am__install_max)) { \
576 print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
577 else { print "f", d "/" $$4, $$1 } } \
578 END { for (d in files) print "f", d, files[d] }' | \
579 while read type dir files; do \
580 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
581 test -z "$$files" || { \
582 echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
583 $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
584 } \
585 ; done
586
587 uninstall-binSCRIPTS:
588 @$(NORMAL_UNINSTALL)
589 @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
590 files=`for p in $$list; do echo "$$p"; done | \
591 sed -e 's,.*/,,;$(transform)'`; \
592 dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
593
594 mostlyclean-compile:
595 -rm -f *.$(OBJEXT)
596
597 distclean-compile:
598 -rm -f *.tab.c
599
600 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cap.Po@am__quote@
601 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmdLine.Po@am__quote@
602 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EchoServer.Po@am__quote@
603 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileLock.Po@am__quote@
604 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetOpt.Po@am__quote@
605 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Quota.Po@am__quote@
606 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Recoder.Po@am__quote@
607 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Regex.Po@am__quote@
608 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Threads.Po@am__quote@
609 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnitTests.Po@am__quote@
610 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WGet.Po@am__quote@
611 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_utilcpp_smlog-SMLog.Po@am__quote@
612 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Po@am__quote@
613
614 .cpp.o:
615 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
616 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
617 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
618 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
619 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
620
621 .cpp.obj:
622 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
623 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
624 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
625 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
626 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
627
628 .cpp.lo:
629 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
630 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
631 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
632 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
633 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
634
635 ui_utilcpp_smlog-SMLog.o: SMLog.cpp
636 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlog-SMLog.o -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo -c -o ui_utilcpp_smlog-SMLog.o `test -f 'SMLog.cpp' || echo '$(srcdir)/'`SMLog.cpp
637 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo $(DEPDIR)/ui_utilcpp_smlog-SMLog.Po
638 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLog.cpp' object='ui_utilcpp_smlog-SMLog.o' libtool=no @AMDEPBACKSLASH@
639 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
640 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlog-SMLog.o `test -f 'SMLog.cpp' || echo '$(srcdir)/'`SMLog.cpp
641
642 ui_utilcpp_smlog-SMLog.obj: SMLog.cpp
643 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlog-SMLog.obj -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo -c -o ui_utilcpp_smlog-SMLog.obj `if test -f 'SMLog.cpp'; then $(CYGPATH_W) 'SMLog.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLog.cpp'; fi`
644 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo $(DEPDIR)/ui_utilcpp_smlog-SMLog.Po
645 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLog.cpp' object='ui_utilcpp_smlog-SMLog.obj' libtool=no @AMDEPBACKSLASH@
646 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
647 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlog-SMLog.obj `if test -f 'SMLog.cpp'; then $(CYGPATH_W) 'SMLog.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLog.cpp'; fi`
648
649 ui_utilcpp_smlogmono-SMLogMono.o: SMLogMono.cpp
650 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlogmono-SMLogMono.o -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo -c -o ui_utilcpp_smlogmono-SMLogMono.o `test -f 'SMLogMono.cpp' || echo '$(srcdir)/'`SMLogMono.cpp
651 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Po
652 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLogMono.cpp' object='ui_utilcpp_smlogmono-SMLogMono.o' libtool=no @AMDEPBACKSLASH@
653 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
654 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlogmono-SMLogMono.o `test -f 'SMLogMono.cpp' || echo '$(srcdir)/'`SMLogMono.cpp
655
656 ui_utilcpp_smlogmono-SMLogMono.obj: SMLogMono.cpp
657 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlogmono-SMLogMono.obj -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo -c -o ui_utilcpp_smlogmono-SMLogMono.obj `if test -f 'SMLogMono.cpp'; then $(CYGPATH_W) 'SMLogMono.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLogMono.cpp'; fi`
658 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Po
659 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLogMono.cpp' object='ui_utilcpp_smlogmono-SMLogMono.obj' libtool=no @AMDEPBACKSLASH@
660 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
661 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlogmono-SMLogMono.obj `if test -f 'SMLogMono.cpp'; then $(CYGPATH_W) 'SMLogMono.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLogMono.cpp'; fi`
662
663 mostlyclean-libtool:
664 -rm -f *.lo
665
666 clean-libtool:
667 -rm -rf .libs _libs
668 install-docDATA: $(doc_DATA)
669 @$(NORMAL_INSTALL)
670 @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
671 if test -n "$$list"; then \
672 echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
673 $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
674 fi; \
675 for p in $$list; do \
676 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
677 echo "$$d$$p"; \
678 done | $(am__base_list) | \
679 while read files; do \
680 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
681 $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
682 done
683
684 uninstall-docDATA:
685 @$(NORMAL_UNINSTALL)
686 @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
687 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
688 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
689
690 ID: $(am__tagged_files)
691 $(am__define_uniq_tagged_files); mkid -fID $$unique
692 tags: tags-am
693 TAGS: tags
694
695 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
696 set x; \
697 here=`pwd`; \
698 $(am__define_uniq_tagged_files); \
699 shift; \
700 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
701 test -n "$$unique" || unique=$$empty_fix; \
702 if test $$# -gt 0; then \
703 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
704 "$$@" $$unique; \
705 else \
706 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
707 $$unique; \
708 fi; \
709 fi
710 ctags: ctags-am
711
712 CTAGS: ctags
713 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
714 $(am__define_uniq_tagged_files); \
715 test -z "$(CTAGS_ARGS)$$unique" \
716 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
717 $$unique
718
719 GTAGS:
720 here=`$(am__cd) $(top_builddir) && pwd` \
721 && $(am__cd) $(top_srcdir) \
722 && gtags -i $(GTAGS_ARGS) "$$here"
723 cscopelist: cscopelist-am
724
725 cscopelist-am: $(am__tagged_files)
726 list='$(am__tagged_files)'; \
727 case "$(srcdir)" in \
728 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
729 *) sdir=$(subdir)/$(srcdir) ;; \
730 esac; \
731 for i in $$list; do \
732 if test -f "$$i"; then \
733 echo "$(subdir)/$$i"; \
734 else \
735 echo "$$sdir/$$i"; \
736 fi; \
737 done >> $(top_builddir)/cscope.files
738
739 distclean-tags:
740 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
741
742 distdir: $(DISTFILES)
743 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
744 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
745 list='$(DISTFILES)'; \
746 dist_files=`for file in $$list; do echo $$file; done | \
747 sed -e "s|^$$srcdirstrip/||;t" \
748 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
749 case $$dist_files in \
750 */*) $(MKDIR_P) `echo "$$dist_files" | \
751 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
752 sort -u` ;; \
753 esac; \
754 for file in $$dist_files; do \
755 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
756 if test -d $$d/$$file; then \
757 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
758 if test -d "$(distdir)/$$file"; then \
759 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
760 fi; \
761 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
762 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
763 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
764 fi; \
765 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
766 else \
767 test -f "$(distdir)/$$file" \
768 || cp -p $$d/$$file "$(distdir)/$$file" \
769 || exit 1; \
770 fi; \
771 done
772 check-am: all-am
773 $(MAKE) $(AM_MAKEFLAGS) check-local
774 check: check-am
775 all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
776 installdirs:
777 for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)"; do \
778 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
779 done
780 install: install-am
781 install-exec: install-exec-am
782 install-data: install-data-am
783 uninstall: uninstall-am
784
785 install-am: all-am
786 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
787
788 installcheck: installcheck-am
789 install-strip:
790 if test -z '$(STRIP)'; then \
791 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
792 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
793 install; \
794 else \
795 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
796 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
797 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
798 fi
799 mostlyclean-generic:
800
801 clean-generic:
802
803 distclean-generic:
804 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
805 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
806
807 maintainer-clean-generic:
808 @echo "This command is intended for maintainers to use"
809 @echo "it deletes files that may require special tools to rebuild."
810 clean: clean-am
811
812 clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
813
814 distclean: distclean-am
815 -rm -rf ./$(DEPDIR)
816 -rm -f Makefile
817 distclean-am: clean-am distclean-compile distclean-generic \
818 distclean-tags
819
820 dvi: dvi-am
821
822 dvi-am:
823
824 html: html-am
825
826 html-am:
827
828 info: info-am
829
830 info-am:
831
832 install-data-am: install-docDATA
833
834 install-dvi: install-dvi-am
835
836 install-dvi-am:
837
838 install-exec-am: install-binPROGRAMS install-binSCRIPTS
839
840 install-html: install-html-am
841
842 install-html-am:
843
844 install-info: install-info-am
845
846 install-info-am:
847
848 install-man:
849
850 install-pdf: install-pdf-am
851
852 install-pdf-am:
853
854 install-ps: install-ps-am
855
856 install-ps-am:
857
858 installcheck-am:
859
860 maintainer-clean: maintainer-clean-am
861 -rm -rf ./$(DEPDIR)
862 -rm -f Makefile
863 maintainer-clean-am: distclean-am maintainer-clean-generic
864
865 mostlyclean: mostlyclean-am
866
867 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
868 mostlyclean-libtool
869
870 pdf: pdf-am
871
872 pdf-am:
873
874 ps: ps-am
875
876 ps-am:
877
878 uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
879 uninstall-docDATA
880
881 .MAKE: check-am install-am install-strip
882
883 .PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
884 clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
885 ctags ctags-am distclean distclean-compile distclean-generic \
886 distclean-libtool distclean-tags distdir dvi dvi-am html \
887 html-am info info-am install install-am install-binPROGRAMS \
888 install-binSCRIPTS install-data install-data-am \
889 install-docDATA install-dvi install-dvi-am install-exec \
890 install-exec-am install-html install-html-am install-info \
891 install-info-am install-man install-pdf install-pdf-am \
892 install-ps install-ps-am install-strip installcheck \
893 installcheck-am installdirs maintainer-clean \
894 maintainer-clean-generic mostlyclean mostlyclean-compile \
895 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
896 tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
897 uninstall-binSCRIPTS uninstall-docDATA
898
899
900 check-local:
901 ./ui-utilcpp-unittests
902
903 # Tell versions [3.59,3.63) of GNU make to not export all variables.
904 # Otherwise a system limit (for SysV at least) may be exceeded.
905 .NOEXPORT:
0 // Local
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5 #include <string>
6
7 // POSIX C
8
9 // C++ Libraries
10 #include <ui-utilcpp/QuotaInfo.hpp>
11 #include <ui-utilcpp/Time.hpp>
12
13 int main(int argc, char *argv[])
14 {
15 std::string arg1(""); if (argc > 1) arg1=argv[1];
16 std::string arg2(""); if (argc > 2) arg2=argv[2];
17
18 int exitCode(0);
19
20 try
21 {
22 UI::Util::QuotaInfo::FS const fs(UI::Util::QuotaInfo::file2fs(arg1));
23 std::cout << "All methods: " << fs.getMethods("__all__") << std::endl;
24 std::cout << "Device/type: " << fs.getDevice() << "/" << fs.getType() << std::endl;
25 std::cout << "FS methods: " << fs.getMethods() << std::endl;
26
27 UI::Util::QuotaInfo qi(fs, std::atoi(arg2.c_str()));
28
29 std::cout << "Quota for uid: " << arg2.c_str() << std::endl;
30 std::cout << "Method used : " << qi.getMethod() << std::endl;
31 std::cout << "Blocks : " << qi.getBlocks() << std::endl;
32 std::cout << "BlockHL: " << qi.getBlockHL() << std::endl;
33 std::cout << "BlockSL: " << qi.getBlockSL() << std::endl;
34 std::cout << "BlockTL: " << qi.getBlockTL() << std::endl;
35 std::cout << "Inodes : " << qi.getINodes() << std::endl;
36 std::cout << "INodeHL: " << qi.getINodeHL() << std::endl;
37 std::cout << "INodeSL: " << qi.getINodeSL() << std::endl;
38 std::cout << "INodeTL: " << qi.getINodeTL() << std::endl;
39 }
40 catch (UI::Exception const & e)
41 {
42 std::cerr << e.what() << std::endl << std::endl;
43 std::cerr << "Usage: quota <ANY_FILE_ON_FS> <UID>" << std::endl;
44 exitCode=1;
45 }
46
47 return exitCode;
48 }
0 // Local
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5 #include <string>
6
7 // C++ Libraries
8 #include <ui-utilcpp/Text.hpp>
9 #include <ui-utilcpp/Recoder.hpp>
10 #include <ui-utilcpp/CharsetMagic.hpp>
11
12 int main(int argc, char *argv[])
13 {
14 int exitCode(0);
15
16 try
17 {
18 if (argc < 2)
19 {
20 throw UI::Util::Exception("Wrong usage");
21 }
22
23 std::string const data(argv[1]);
24 std::string const outEnc((argc > 2 && std::string(argv[2]) != "") ? argv[2] : "UTF-8");
25 std::string const inEnc ((argc > 3 && std::string(argv[3]) != "") ? argv[3] : UI::Util::CharsetMagic::guess(data));
26 bool const sloppy((argc > 4) && std::string(argv[4]) == "sloppy");
27
28 std::cerr << "Input charset : " << inEnc << std::endl;
29 std::cerr << "Output charset : " << outEnc << std::endl;
30 std::cerr << "Sloppy conversion: " << sloppy << std::endl;
31
32 std::cout << UI::Util::Recoder(inEnc, outEnc, sloppy).run(data);
33 }
34 catch (std::exception const & e)
35 {
36 std::cerr << "Exception: " << e.what() << "." << std::endl;
37 std::cerr << std::endl;
38 std::cerr << "Usage: ui-utilcpp-recoder data [outEnc [inEnc [\"sloppy\"]]]" << std::endl << std::endl;
39 std::cerr << "Writes conversion result to cout, informational output to cerr." << std::endl;
40 exitCode=1;
41 }
42
43 return exitCode;
44 }
0 // Local
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5 #include <fstream>
6
7 // C++ Libraries
8 #include <ui-utilcpp/Text.hpp>
9 #include <ui-utilcpp/PosixRegex.hpp>
10
11 int main(int argc, char *argv[])
12 {
13 int retValue(0);
14
15 if (argc != 3)
16 {
17 std::cerr << "Simple grep-like test program: compares line per line, prints matching lines." << std::endl;
18 std::cerr << "Usage0: " << argv[0] << " <regex> <file>" << std::endl;
19 std::cerr << "Usage1: " << argv[0] << " RANDOM <max>" << std::endl;
20 exit(1);
21 }
22
23 try
24 {
25 std::string regex((std::string) argv[1]);
26 if (regex == "RANDOM")
27 {
28 // Random test
29 const long max(UI::Util::ato<long>(argv[2]));
30 long count(0);
31 long matches(0);
32 std::string regex(UI::Util::genAlphaNumericKey(4));
33 std::cout << "Regex: " << regex << std::endl;
34 while (count < max)
35 {
36 std::string text(UI::Util::genAlphaNumericKey(160));
37 if (UI::Util::PosixRegex(regex, REG_EXTENDED).run(text))
38 {
39 std::cout << text << std::endl;
40 ++matches;
41 }
42 ++count;
43 }
44 std::cout << matches << " matches in " << count << " random comparisons." << std::endl;
45 }
46 else
47 {
48 std::string fileName((std::string) argv[2]);
49 std::ifstream f(fileName.c_str(), std::ios::in);
50 char line[160];
51 while (!f.eof())
52 {
53 f.getline(line, 160);
54 if (UI::Util::PosixRegex(regex, REG_EXTENDED).run(line))
55 std::cout << line << std::endl;
56 }
57 }
58 }
59 catch (UI::Util::PosixRegex::Exception const & e)
60 {
61 std::cerr << "Posix Err Code: " << e.getCode() << "." << std::endl;
62 std::cerr << "Posix Err Text: " << e.what() << "." << std::endl;
63 }
64 catch (...)
65 {
66 std::cerr << "Unknown exception" << std::endl;
67 }
68 return(retValue);
69 }
0 // Local configuration
1 #include "config.h"
2
3 // C++ Libraries
4 #include <ui-utilcpp/SMLog.hpp>
5
6 int main()
7 {
8 // configure
9 ost::slog.open("ui-utilcpp_smlogm", ost::Slog::classUser);
10 ost::slog.clogEnable(true);
11
12 SM_LOGEMERG("EMERG log");
13 SM_LOGALERT("ALERT log");
14 SM_LOGCRIT("CRIT log");
15 SM_LOGERR("ERR log");
16 SM_LOGWARNING("WARNING log");
17 SM_LOGNOTICE("NOTICE log");
18 SM_LOGINFO("INFO log");
19 SM_LOGDEBUG("DEBUG log");
20 }
0 // Local configuration
1 #include "config.h"
2
3 // C++ Libraries
4 #include <ui-utilcpp/SMLogMono.hpp>
5
6 int main()
7 {
8 // configure syslog
9 UI::Util::SysLogMonoSingleton logger("ui-utilcpp_smlogmono", LOG_PERROR, LOG_USER);
10
11 SM_LOGEMERG("EMERG log");
12 SM_LOGALERT("ALERT log");
13 SM_LOGCRIT("CRIT log");
14 SM_LOGERR("ERR log");
15 SM_LOGWARNING("WARNING log");
16 SM_LOGNOTICE("NOTICE log");
17 SM_LOGINFO("INFO log");
18 SM_LOGDEBUG("DEBUG log");
19 }
0 // Local
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5 #include <fstream>
6 #include <vector>
7
8 // POSIX C
9
10 // C++ Libraries
11 #include <ui-utilcpp/Time.hpp>
12 #include <ui-utilcpp/Thread.hpp>
13
14 template <typename T>
15 class MyThread: public T
16 {
17 private:
18 int run()
19 {
20 for (int i(0); i < 5; ++i)
21 {
22 std::cout << "(PID " << T::getPID() << ": blurp)..." << std::flush;
23 UI::Util::nssleep(1);
24 }
25 return(42);
26 }
27 };
28
29 void test(UI::Util::ProcessThread * t)
30 {
31 std::cout << "Starting thread: " << std::flush;
32 t->start();
33 int exitCode(t->wait());
34 std::cout << "finished with status: " << exitCode << std::endl;
35 }
36
37 int main()
38 {
39 try
40 {
41 MyThread<UI::Util::ForkThread> ft;
42 test(&ft);
43 }
44 catch(...)
45 {
46 std::cerr << "Exception" << std::endl;
47 }
48 }
0 /**
1 * @file
2 */
3
4 // Local configuration
5 #include "config.h"
6
7 // STDC++
8 #include <iostream>
9 #include <set>
10
11 // C++ Libraries
12 #include <ui-utilcpp/Sys.hpp>
13 #include <ui-utilcpp/Recoder.hpp>
14 #include <ui-utilcpp/CharsetMagic.hpp>
15 #include <ui-utilcpp/File.hpp>
16 #include <ui-utilcpp/Time.hpp>
17
18 #include <ui-utilcpp/Http.hpp>
19
20 #ifdef WIN32
21 #define BOOST_TEST_MAIN
22 #include <boost/test/unit_test.hpp>
23 #else
24 #define BOOST_AUTO_TEST_MAIN
25 #define BOOST_TEST_DYN_LINK
26 #include <boost/test/auto_unit_test.hpp>
27 #endif
28
29 namespace UI {
30 namespace Util {
31
32 BOOST_AUTO_TEST_CASE(test_Exceptions)
33 {
34 // Tool class for static helpers
35 class T
36 {
37 public:
38 static void showException(UI::Exception const & e)
39 {
40 std::cout << "Exception what : " << e.what() << std::endl;
41 std::cout << "Exception debug: " << e.getDebug() << std::endl;
42 std::cout << "Exception errno: " << e.getErrno() << std::endl;
43 }
44 };
45
46 // Errno simple I
47 try
48 {
49 Sys::chmod("AyIuiePKIyBRudLB28YFzEzwLECuaMCoax0oBc9GBftQHJwEiveXvfqnExnTQr9I", 0);
50 }
51 catch (UI::Exception const & e)
52 {
53 T::showException(e);
54 BOOST_CHECK(e.getErrno() == ENOENT);
55 }
56
57 // Errno simple II
58 try
59 {
60 Sys::chmod("AyIuiePKIyBRudLB28YFzEzwLECuaMCoax0oBc9GBftQHJwEiveXvfqnExnTQr9I", 0);
61 }
62 catch (Sys::Exception const & e)
63 {
64 T::showException(e);
65 BOOST_CHECK(e.getErrno() == ENOENT);
66 }
67 catch (UI::Exception const & e)
68 {
69 T::showException(e);
70 BOOST_CHECK(false && "We should have been catched already as Sys::Exception");
71 }
72 }
73
74 BOOST_AUTO_TEST_CASE(test_Encoding)
75 {
76 unsigned char const c_ucs4[] = { 0x00, 0x00, 0x00, 0xf6, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xdf, 0x00, 0x00, 0x20, 0xac};
77 std::string const ucs4((char *)c_ucs4, 20);
78
79 unsigned char const c_utf16be[] = { 0x00, 0xf6, 0x00, 0xe4, 0x00, 0xfc, 0x00, 0xdf, 0x20, 0xac };
80 std::string const utf16be((char *)c_utf16be, 10);
81
82 unsigned char const c_utf8[] = { 0xc3, 0xb6, 0xc3, 0xa4, 0xc3, 0xbc, 0xc3, 0x9f, 0xe2, 0x82, 0xac };
83 std::string const utf8((char *)c_utf8, 11);
84
85 unsigned char const c_iso_8859_15[] = { 0xf6, 0xe4, 0xfc, 0xdf, 0xa4 };
86 std::string const iso_8859_15((char *)c_iso_8859_15, 5);
87
88 // Some non-sloppy full conversions
89 BOOST_CHECK(UI::Util::RecoderCache::get("UCS-4", "ISO-8859-15").run(ucs4) == iso_8859_15);
90 BOOST_CHECK(UI::Util::RecoderCache::get("UTF-16BE", "ISO-8859-15").run(utf16be) == iso_8859_15);
91 BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "ISO-8859-15").run(utf8) == iso_8859_15);
92 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "UTF-8").run(iso_8859_15) == utf8);
93 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "UTF-16BE").run(iso_8859_15) == utf16be);
94
95 // Non-ISO-8859 character "ACCUTE ACCENT"
96 char const c_utf8_noniso[] = { (char) 0xc2, (char) 0xb4 };
97 std::string const utf8_noniso(c_utf8_noniso, 2);
98 // Non-sloppy must fail with Conversion::Exception
99 try
100 {
101 UI::Util::RecoderCache::get("UTF-8", "ISO-8859-15").run(utf8_noniso);
102 BOOST_CHECK(false && "UTF-8..ISO-8859-15 exact conversion of ACUTE ACCENT should have failed");
103 }
104 catch (Converter::Exception const &)
105 {}
106 // Sloppy must succeed to "'"
107 BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "ISO-8859-15", true).run(utf8_noniso) == "'");
108
109 // b64..data tests
110 std::string const b64("SFVNQlVH");
111 std::string const data("HUMBUG");
112 BOOST_CHECK(UI::Util::RecoderCache::get("b64", "data").run(b64) == data);
113 BOOST_CHECK(UI::Util::RecoderCache::get("data", "b64").run(data) == b64);
114
115 std::string const url("eins+zwei+drei");
116 std::string const plain("eins zwei drei");
117 BOOST_CHECK(UI::Util::RecoderCache::get("data", "url").run(plain) == url);
118 BOOST_CHECK(UI::Util::RecoderCache::get("url", "data").run(url) == plain);
119
120 std::string const percentBugPlain("95%");
121 std::string const percentBugURL("95%25");
122 BOOST_CHECK(UI::Util::RecoderCache::get("data", "url").run(percentBugPlain) == percentBugURL);
123
124 std::string const nonASCIIBugURL("%F6%E4%FC");
125 std::string const nonASCIIBugPlain("צה�");
126 BOOST_CHECK(UI::Util::RecoderCache::get("data", "url").run(nonASCIIBugPlain) == nonASCIIBugURL);
127 BOOST_CHECK(UI::Util::RecoderCache::get("url", "data").run(nonASCIIBugURL) == nonASCIIBugPlain);
128
129 {
130 // This generates a bug with librecode0, version 3.6
131 // Fixed by a debian patch since 3.6-7.
132 // http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=156635
133 UI::Util::Recoder recode("UTF-8","ISO-8859-15");
134 std::string const a("Bitte_Xenden_Sie_dieYe_Mail_zurück,_um_Zich_anzumelden.");
135 std::string const b("C000035A300000006DBCD1409@pmt.1and1.com");
136
137 std::string const a2(recode.run(a));
138 std::string const b2(recode.run(b));
139
140 BOOST_CHECK(b == b2);
141 }
142
143 // rfc2047 (MIME)
144 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "rfc2047").run(iso_8859_15) == "=?ISO-8859-15?Q?=F6=E4=FC=DF=A4?=");
145 BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "rfc2047").run(utf8) == "=?UTF-8?Q?=C3=B6=C3=A4=C3=BC=C3=9F=E2=82=AC?=");
146 BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "rfc2047").run("Données du formulaire") == "=?UTF-8?Q?Donn=E9es_du_formulaire?=");
147
148 // rfc3490 (IDN)
149 BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "rfc3490").run("tinc-test-fünf.de") == "xn--tinc-test-fnf-6ob.de");
150 BOOST_CHECK(UI::Util::RecoderCache::get("rfc3490", "UTF-8").run("xn--tinc-test-fnf-6ob.de") == "tinc-test-fünf.de");
151
152 // IDN-EMAIL
153 BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "idn-email").run("test@tinc-test-fünf.de") == "test@xn--tinc-test-fnf-6ob.de");
154 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("test@tinc-test-fünf.de") == "test@xn--tinc-test-fnf-6ob.de");
155 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("<The Test> test@tinc-test-fünf.de(Theo Test),a@würfel.de,c@d.de a@süß.de Humbug")
156 == "<The Test> test@xn--tinc-test-fnf-6ob.de(Theo Test),a@xn--wrfel-kva.de,c@d.de a@xn--sss-hoa.de Humbug");
157 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("") == "");
158 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("@") == "@");
159 BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("@ö") == "@xn--nda");
160 }
161
162 BOOST_AUTO_TEST_CASE(test_Strtok)
163 {
164 // strtok: delim can be any string (default is ",").
165 {
166 std::vector<std::string> t(strtok(""));
167 BOOST_CHECK(t.size() == 0);
168 }
169 {
170 std::vector<std::string> t(strtok(","));
171 BOOST_CHECK(t.size() == 0);
172 }
173 {
174 std::vector<std::string> t(strtok("A,Bee,Zeh"));
175 BOOST_CHECK(t.size() == 3 && t.at(0) == "A" && t.at(1) == "Bee" && t.at(2) == "Zeh");
176 }
177 {
178 std::vector<std::string> t(strtok(",A,Bee,Zeh,"));
179 BOOST_CHECK(t.size() == 3 && t.at(0) == "A" && t.at(1) == "Bee" && t.at(2) == "Zeh");
180 }
181 {
182 std::vector<std::string> t(strtok(",A,Bee,Zeh,", "Bee"));
183 BOOST_CHECK(t.size() == 2 && t.at(0) == ",A," && t.at(1) == ",Zeh,");
184 }
185 // strtoks: all single chars in delims act as delimiter (default is " \t\n\r").
186 {
187 std::vector<std::string> t(strtoks(""));
188 BOOST_CHECK(t.size() == 0);
189 }
190 {
191 std::vector<std::string> t(strtoks(","));
192 BOOST_CHECK(t.size() == 1 && t.at(0) == ",");
193 }
194 {
195 std::vector<std::string> t(strtoks("A Bee \t Zeh\n"));
196 BOOST_CHECK(t.size() == 3 && t.at(0) == "A" && t.at(1) == "Bee" && t.at(2) == "Zeh");
197 }
198 {
199 std::vector<std::string> t(strtoks("Bettwurstende", "ewu"));
200 BOOST_CHECK(t.size() == 4 && t.at(0) == "B" && t.at(1) == "tt" && t.at(2) == "rst" && t.at(3) == "nd");
201 }
202 }
203
204 BOOST_AUTO_TEST_CASE(test_join)
205 {
206 // strtok: delim can be any string (default is ",").
207 {
208 std::vector<std::string> t;
209 std::string s( join( "xxx", t ) );
210 BOOST_CHECK(s.size() == 0);
211 }
212 {
213 std::vector<std::string> t;
214 t.push_back( "aa" );
215 t.push_back( "bb" );
216 t.push_back( "cc" );
217 t.push_back( "dd" );
218 std::string s( join( ",", t ) );
219 BOOST_CHECK( s == "aa,bb,cc,dd" );
220 }
221 {
222 std::set<std::string> t;
223 t.insert( "aa" );
224 t.insert( "bb" );
225 t.insert( "cc" );
226 t.insert( "dd" );
227 std::string s( join( ",", t ) );
228 BOOST_CHECK( s == "aa,bb,cc,dd" );
229 }
230 }
231 BOOST_AUTO_TEST_CASE(test_HttpCookie)
232 {
233 {
234 Http::Cookies c;
235 BOOST_CHECK(c.size() == 0);
236 }
237 {
238 Http::Cookies c("a=aval");
239 BOOST_CHECK(c.size() == 1);
240 BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval");
241 }
242 {
243 Http::Cookies c("a=aval;");
244 BOOST_CHECK(c.size() == 1);
245 BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval");
246 }
247 {
248 Http::Cookies c("a=aval; b=bval;");
249 BOOST_CHECK(c.size() == 2);
250 BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval");
251 BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval");
252 }
253 {
254 Http::Cookies c("a=aval;b=bval;");
255 BOOST_CHECK(c.size() == 2);
256 BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval");
257 BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval");
258 }
259 {
260 Http::Cookies c("a=aval; b=bval");
261 BOOST_CHECK(c.size() == 2);
262 BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval");
263 BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval");
264 }
265 {
266 Http::Cookies c("a=aval;b=bval");
267 BOOST_CHECK(c.size() == 2);
268 BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval");
269 BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval");
270 }
271 {
272 Http::Cookies c("a=a val; b=bval");
273 BOOST_CHECK(c.size() == 1);
274 BOOST_CHECK(c.at(0).getName() == "b" && c.at(0).getValue() == "bval");
275 }
276 {
277 Http::Cookies c("a=aval;foo;b=bval;c=cval");
278 BOOST_CHECK(c.size() == 2);
279 BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval");
280 BOOST_CHECK(c.at(1).getName() == "c" && c.at(1).getValue() == "cval");
281 }
282
283 {
284 Http::Header header;
285 std::string const line("pre0_eins=1; pre0_zwei=2; pre1_drei=3; pre0_=no_name");
286 header.add("Cookie: " + line);
287 BOOST_CHECK(Http::Cookies(header).getLine() == line);
288 BOOST_CHECK(Http::Cookies(header, "pre0_").getLine() == "eins=1; zwei=2; =no_name");
289 BOOST_CHECK(Http::Cookies(header, "pre1_").getLine() == "drei=3");
290 BOOST_CHECK(Http::Cookies(header, "pre0_").getLine("proll_") == "proll_eins=1; proll_zwei=2; proll_=no_name");
291 }
292 }
293
294 BOOST_AUTO_TEST_CASE(test_HttpSetCookie)
295 {
296 Http::SetCookie("sessid").setLine("sessid=test;");
297 }
298
299 BOOST_AUTO_TEST_CASE(test_HttpHeader)
300 {
301 Http::Header iHeader;
302 iHeader.
303 add("Content-Length: 1000").
304 add("X-PREFIX-PH-0: PV-0").
305 add("Multiple: MV-0").
306 add("X-PREFIX-PH-1: PV-1").
307 add("Multiple: MV-1").
308 add("X-PREFIX-PH-2: PV-2").
309 add("Multiple: MV-2").
310 add("X-Non-ASCII: äöüÄÖÜbertragÜ").
311 add("empty0:").
312 add("empty1: ");
313
314 // Check plain header
315 BOOST_CHECK(iHeader.size() == 10);
316 BOOST_CHECK(iHeader.get<int>("Content-Length") == 1000);
317 BOOST_CHECK(iHeader.get("X-PREFIX-PH-1") == "PV-1");
318 BOOST_CHECK(iHeader.get("X-Non-ASCII") == "??????bertrag?");
319 BOOST_CHECK(iHeader.get("empty0") == "");
320 BOOST_CHECK(iHeader.get("empty1") == "");
321
322 // Get multi header fields (exact match)
323 Http::Header multiHeader(iHeader.getMulti("Multiple"));
324 BOOST_CHECK(multiHeader.size() == 3);
325 BOOST_CHECK(multiHeader.at(0).getName() == "Multiple" && multiHeader.at(0).getValue() == "MV-0");
326 BOOST_CHECK(multiHeader.at(1).getName() == "Multiple" && multiHeader.at(1).getValue() == "MV-1");
327 BOOST_CHECK(multiHeader.at(2).getName() == "Multiple" && multiHeader.at(2).getValue() == "MV-2");
328
329 // Get all headerfields w/ prefix
330 Http::Header prefixHeader(iHeader.getPrefix("X-PREFIX-"));
331 BOOST_CHECK(prefixHeader.size() == 3);
332 BOOST_CHECK(prefixHeader.at(0).getName() == "PH-0" && prefixHeader.at(0).getValue() == "PV-0");
333 BOOST_CHECK(prefixHeader.at(1).getName() == "PH-1" && prefixHeader.at(1).getValue() == "PV-1");
334 BOOST_CHECK(prefixHeader.at(2).getName() == "PH-2" && prefixHeader.at(2).getValue() == "PV-2");
335 }
336
337 #ifndef WIN32
338 BOOST_AUTO_TEST_CASE(test_Http)
339 {
340 // Open an internal socket pair for testing
341 UI::Util::SocketPair sp;
342 Http::Connection server(sp.first());
343 Http::Connection client(sp.second());
344
345 // Client writes GET request
346 {
347 client.write(Http::RequestLine(Http::RequestLine::Get_, "/hotzenplotz"));
348 client.write(Http::Header().add("Host", "localhost"));
349 client.writeLine();
350 client.s().flush();
351 }
352
353 // Server reads incoming request
354 {
355 Http::RequestLine requestLine(server.readLine());
356 BOOST_CHECK(requestLine.getMethod() == Http::RequestLine::Get_);
357 BOOST_CHECK(requestLine.getMethodStr() == "GET");
358 BOOST_CHECK(requestLine.getURI() == "/hotzenplotz");
359
360 Http::Header header(server.readHeader());
361 BOOST_CHECK(header.get("Host") == "localhost");
362 }
363
364 std::string const body("Test response body.");
365
366 // Server writes response
367 {
368 server.write(Http::StatusLine(200));
369 server.write(Http::Header().
370 add("Content-Length", tos(body.size())).
371 add("Content-Type", "text/plain"));
372 server.writeLine();
373 server.write(body);
374 }
375
376 // Client reads response
377 {
378 Http::StatusLine status(client.readLine());
379 BOOST_CHECK(status.getCode() == 200);
380 BOOST_CHECK(status.getReason() == "OK");
381 std::cerr << status.getReason() << std::endl;
382
383 Http::Header header(client.readHeader());
384 BOOST_CHECK(header.get("Content-Type") == "text/plain");
385 BOOST_CHECK(body == client.readBlock(header.get<std::streamsize>("Content-Length")));
386 }
387 }
388 #endif
389
390 BOOST_AUTO_TEST_CASE(test_Http_Get)
391 {
392 #ifdef WIN32
393 WSADATA wsaData;
394 int iResult = ::WSAStartup(MAKEWORD(2,2), &wsaData);
395 if (iResult != NO_ERROR)
396 {
397 BOOST_CHECK(false);
398 return;
399 }
400 #endif
401
402 // Note: These tests only work if you have a local httpd server running.
403 Http::URLGet get1("http://localhost");
404 Http::URLGet get2("http://localhost/");
405 Http::URLGet get3("http://localhost:80");
406 Http::URLGet get4("http://localhost:80/");
407 Http::URLGet get5("http://localhost:80?a=b&c=d");
408
409 #ifdef WIN32
410 ::WSACleanup();
411 #endif
412 }
413
414 BOOST_AUTO_TEST_CASE(test_RealTimeStamp)
415 {
416 RealTimeStamp s0;
417 RealTimeStamp s1;
418
419 s0.stamp();
420 Sys::sleep(1);
421 s1.stamp();
422
423 RealTimeStamp const diff(s1-s0);
424 RealTimeStamp const bottomMargin(0,400000);
425 RealTimeStamp const topMargin(1,600000);
426
427 BOOST_CHECK(bottomMargin < diff);
428 BOOST_CHECK(diff < topMargin);
429 std::cout << "RealTimeStamp diff is: " << diff << " (should be: about 1 seconds)." << std::endl;
430 }
431
432 BOOST_AUTO_TEST_CASE(test_FsInfo)
433 {
434 FsInfo fsInfo("C:", ".");
435 std::cout << "Total: " << fsInfo.getTotal() << std::endl;
436 std::cout << "Used : " << fsInfo.getUsed() << std::endl;
437 std::cout << "Avail: " << fsInfo.getAvail() << std::endl;
438 std::cout << "Free : " << fsInfo.getFree() << std::endl;
439 }
440
441 }}
0 // Local configuration
1 #include "config.h"
2
3 // STDC++
4 #include <iostream>
5 #include <exception>
6
7 // C++ Libraries
8 #include <ui-utilcpp/Exception.hpp>
9 #include <ui-utilcpp/Http.hpp>
10
11 int main(int argc, char *argv[])
12 {
13 #ifdef WIN32
14 UI::Util::Sys::wsaStartup();
15 #endif
16
17 int retVal(0);
18 try
19 {
20 if (argc < 2) throw UI::Exception("Wrong usage");
21 UI::Util::Http::URLGet get(argv[1]);
22 std::cout << get.getStatus().get() << std::endl;
23 std::cout << get.getHeader().get() << std::endl;
24 std::cout << get.getBody() << std::endl;
25 }
26 catch (std::exception const & e)
27 {
28 std::cerr << "Exception: " << e.what() << "." << std::endl;
29 std::cerr << "Usage: ui-utilcpp-wget URL" << std::endl;
30 retVal = 1;
31 }
32
33 #ifdef WIN32
34 UI::Util::Sys::wsaCleanup();
35 #endif
36 return retVal;
37 }
0 #!/bin/bash -e
1
2 . ui-libopt.sh
3 ui_opt_init "Interactively update a project using sp-utilcpp to to ui-utilcpp.
4 Just run this from your project's top level."
5 ui_opt_parse "$@"
6
7 replace()
8 {
9 local f="$1"
10 local s="$2"
11 local d="$3"
12 local f_tmp="$f.ui-utilcpp-sp2ui.tmp"
13
14 cp "${f}" "${f_tmp}"
15 sed "s/${s}/${d}/g" "${f_tmp}" >"${f}"
16 rm "${f_tmp}"
17 }
18
19 echo "Assuming project using old sp-utilcpp in wd."
20 read -p "RETURN to update project (changes only local files), C-c to cancel."
21
22 ui-auto-uvc check_sync
23
24 for f in `find . -type f ! -wholename "*/.svn/*" ! -wholename "*/CVS/*" ! -name "*~" ! -name "ChangeLog" ! -name "NEWS" ! -name "*sp2ui*"`; do
25 echo "Updating ${f}..."
26 replace "$f" "sp-utilcpp" "ui-utilcpp"
27 replace "$f" "sp_utilcpp" "ui_utilcpp"
28 replace "$f" "namespace SP" "namespace UI"
29 replace "$f" "SP::" "UI::"
30 replace "$f" "SP_THROW" "UI_THROW"
31 done
32
33 echo
34 echo "=> Project updated; remaining TODOS for you:"
35 echo
36 echo "* Verify all changed files via VCS. You should only see sp->ui naming conversions for ui-utilcpp related strings."
37 echo "* Run \"ui-auto-strap && ./configure && make distcheck\" to test changes."
38 echo "* VC: You may need to fix up 'ignore settings'."
39
40 exit 0
0 #include "config.h"
1
2 // Implementation
3 #include "Cap.hpp"
4
5 // Local
6 #include "Sys.hpp"
7
8 namespace UI {
9 namespace Util {
10
11 Cap::Cap(InitType const & initType)
12 #ifdef __linux__
13 :cap_(initType == Clear_ ? Sys::cap_init() : Sys::cap_get_proc())
14 #endif
15 {}
16
17 Cap::Cap(std::string const & s, InitType const & initType)
18 #ifdef __linux__
19 :cap_(Sys::cap_from_text((Cap(initType).get() + " " + s).c_str()))
20 #endif
21 {}
22
23 Cap::Cap(Cap const & cap)
24 #ifdef __linux__
25 :cap_(Sys::cap_dup(cap.cap_))
26 #endif
27 {}
28
29 Cap::~Cap()
30 {
31 #ifdef __linux__
32 // Never throw in destructor
33 try { Sys::cap_free(cap_); }
34 catch (...) {}
35 #endif
36 }
37
38 Cap & Cap::apply()
39 {
40 #ifdef __linux__
41 Sys::cap_set_proc(cap_);
42 return *this;
43 #else
44 return *this;
45 #endif
46 }
47
48 #ifdef HAVE_CAP_COMPARE
49 bool Cap::operator==(Cap const & cap) const
50 {
51 return Sys::cap_compare(cap.cap_, cap_) == 0;
52 }
53 #endif
54
55 std::string const Cap::get() const
56 {
57 #ifdef __linux__
58 // Helper class needed to ensure exception safety
59 class Helper
60 {
61 public:
62 char * s_;
63 Helper( cap_t c): s_(Sys::cap_to_text(c, 0)) {};
64 ~Helper() { try { Sys::cap_free(s_); } catch (...) {}; }
65 };
66 return Helper(cap_).s_;
67 #else
68 return "";
69 #endif
70 }
71
72
73 CapScope::CapScope(std::string const & capabilities)
74 :capabilities_(capabilities)
75 {
76 #ifdef __linux__
77 Cap(capabilities_ + "+e").apply();
78 #endif
79 }
80
81 CapScope::~CapScope()
82 {
83 #ifdef __linux__
84 // Avoid exception in destructor
85 try { Cap(capabilities_ + "-e").apply(); } catch (...) {};
86 #endif
87 }
88
89 }}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_CAP_HPP
4 #define UI_UTIL_CAP_HPP
5
6 // STDC++
7 #include <string>
8
9 // POSIX C
10 #ifdef __linux__
11 #include <sys/capability.h>
12 #endif
13
14 namespace UI {
15 namespace Util {
16
17 /** @brief C++ encapsulation for libcap's 'cap_t'. */
18 class Cap
19 {
20 private:
21 #ifdef __linux__
22 cap_t cap_;
23 #endif
24
25 public:
26 enum InitType { Proc_, Clear_ };
27 /** @brief Construct from process state, or cleared with proc=false. */
28 Cap(InitType const & initType=Proc_);
29 /** @brief Construct from textual representation (see man cap_from_text(3)). */
30 Cap(std::string const & s, InitType const & initType=Proc_);
31 Cap(Cap const & cap);
32 ~Cap();
33
34 Cap & apply();
35
36 #ifdef HAVE_CAP_COMPARE
37 bool operator==(Cap const & cap) const;
38 #endif
39
40 /** @brief Get textual representation (see man cap_to_text(3)). */
41 std::string const get() const;
42 };
43
44 /** @brief Helper to enable effective capabilities safely for a scope. */
45 class CapScope
46 {
47 private:
48 std::string const capabilities_;
49 public:
50 CapScope(std::string const & capabilities);
51 ~CapScope();
52 };
53
54 }}
55 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "CharsetMagic.hpp"
5
6 // STDC++
7 #include <memory>
8 #include <vector>
9
10 // SYSTEM C
11
12 // Local
13 #include "Exception.hpp"
14
15 namespace UI {
16 namespace Util {
17 namespace CharsetMagic {
18
19 // From "file", somewhat adjusted.
20 namespace File
21 {
22 #include "ascmagic.c"
23 }
24
25 bool looksLikeASCII(char const * const buf, size_t const & len)
26 {
27 std::vector<File::unichar> ubuf(len+1);
28 size_t ulen;
29 return File::looks_ascii((unsigned char *)buf, len, &ubuf[0], &ulen) != 0;
30 }
31
32 bool looksLikeUTF8(char const * const buf, size_t const & len)
33 {
34 std::vector<File::unichar> ubuf(len+1);
35 size_t ulen;
36 return File::looks_utf8((unsigned char *)buf, len, &ubuf[0], &ulen) != 0;
37 }
38
39 bool looksLikeLatin1(char const * const buf, size_t const & len)
40 {
41 std::vector<File::unichar> ubuf(len+1);
42 size_t ulen;
43 return File::looks_latin1((unsigned char *)buf, len, &ubuf[0], &ulen) != 0;
44 }
45
46 bool looksLikeUTF16LE(char const * const buf, size_t const & len)
47 {
48 std::vector<File::unichar> ubuf(len+1);
49 size_t ulen;
50 return File::looks_unicode((unsigned char *)buf, len, &ubuf[0], &ulen) == 1;
51 }
52
53 bool looksLikeUTF16BE(char const * const buf, size_t const & len)
54 {
55 std::vector<File::unichar> ubuf(len+1);
56 size_t ulen;
57 return File::looks_unicode((unsigned char *)buf, len, &ubuf[0], &ulen) > 1;
58 }
59
60 typedef bool (* LooksLikeFunc) (char const * const, size_t const &);
61 typedef std::pair<LooksLikeFunc, std::string> LooksLikePair;
62 typedef std::vector<LooksLikePair > LooksLikePairVec;
63
64 // This determines available "looks like" tests and their order
65 LooksLikePairVec const genLooksLikePairs()
66 {
67 LooksLikePairVec result;
68 result.push_back(std::make_pair(&looksLikeASCII, "ASCII"));
69 result.push_back(std::make_pair(&looksLikeUTF8, "UTF-8"));
70 result.push_back(std::make_pair(&looksLikeUTF16LE, "UTF-16LE"));
71 result.push_back(std::make_pair(&looksLikeUTF16BE, "UTF-16BE"));
72 // This will also detect UTF-16 as latin, so this must come after utf16 tests
73 result.push_back(std::make_pair(&looksLikeLatin1, "ISO-8859-15"));
74 return result;
75 }
76
77 // The actual static test vector
78 static LooksLikePairVec const LooksLikePairs(genLooksLikePairs());
79
80 std::string guess(char const * const buf, size_t const & len)
81 {
82 for (LooksLikePairVec::const_iterator f(LooksLikePairs.begin()); f != LooksLikePairs.end(); ++f)
83 {
84 if (f->first(buf, len))
85 {
86 return f->second;
87 }
88 }
89 return "";
90 }
91
92 std::string guess(std::string const & buf, std::string::size_type const & len)
93 {
94 return guess(buf.c_str(), len == std::string::npos ? buf.size() : len);
95 }
96
97 }}}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_CHARSETMAGIC_HPP
4 #define UI_UTIL_CHARSETMAGIC_HPP
5
6 // STDC++
7 #include <string>
8
9 namespace UI {
10 namespace Util {
11 namespace CharsetMagic {
12
13 /** @name Guess encoding of data in buffer using len sample size.
14 *
15 * If no encoding could be guessed, this returns an empty string.
16 * @{ */
17 std::string guess(char const * const buf, size_t const & len);
18 std::string guess(std::string const & buf, std::string::size_type const & len=std::string::npos);
19 /** @} */
20
21 }}}
22 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "CmdLine.hpp"
5
6 // STDC++
7 #include <sstream>
8 #include <fstream>
9 #include <memory>
10 #include <cassert>
11
12 // C Libraries
13 #ifndef WIN32
14 #include <readline/readline.h>
15 #include <readline/history.h>
16 #endif
17
18 // Local
19 #include "Sys.hpp"
20 #include "Text.hpp"
21 #include "Misc.hpp"
22
23
24 #define UI_UTIL_CMDLINE_SEPLINE0 "======================================================================"
25 #define UI_UTIL_CMDLINE_SEPLINE1 "----------------------------------------------------------------------"
26
27 namespace UI {
28 namespace Util {
29 namespace CmdLine {
30
31 Cmd::Cmd(std::string const & name,
32 std::string const & help)
33 :cl_(0)
34 ,name_(name)
35 ,help_(help)
36 ,args_()
37 ,minArgs_(0)
38 ,tokens_()
39 ,isParsed_(false)
40 {
41 assert(name_ != "");
42 }
43
44 Cmd::~Cmd() {}
45
46 std::string Cmd::getName() const
47 {
48 return name_;
49 }
50
51 void Cmd::addArg(std::string const & name, std::string const & help)
52 {
53 args_.push_back(make_pair(name, help));
54 minArgs_ = args_.size();
55 }
56
57 void Cmd::addOptArg(std::string const & name, std::string const & help)
58 {
59 args_.push_back(make_pair(name, help));
60 }
61
62 int Cmd::getMinArgs() const { return minArgs_; }
63 int Cmd::getMaxArgs() const { return args_.size(); }
64
65 std::string Cmd::getSyntax() const
66 {
67 std::string result(name_);
68 for (int i(0); i < (int) args_.size(); ++i)
69 {
70 result += " " + getArgString(i);
71 }
72 return result;
73 }
74
75 std::string Cmd::getHelp(bool showArgs) const
76 {
77 std::string result("");
78 if (name_ == "__header")
79 {
80 result += "\n" + help_ + "\n" + UI_UTIL_CMDLINE_SEPLINE1 + "\n";
81 }
82 else
83 {
84 result += getSyntax() + "\n " + help_ + ".\n";
85 if (showArgs)
86 {
87 for (int i(0); i < (int) args_.size(); ++i)
88 {
89 result += " " + getArgString(i) + "\t: " + args_[i].second + ".\n";
90 }
91 }
92 }
93 return result;
94 }
95
96 bool Cmd::parse(std::string const & line)
97 {
98 tokens_.clear();
99 std::string l(line);
100 stripLine(l);
101 while (l.length() != 0)
102 {
103 // Skip leading spaces
104 l.erase(0, l.find_first_not_of(spaces_));
105
106 // Get token
107 if (l[0] == '"')
108 {
109 // Argument embraced with "
110 l.erase(0, 1);
111 std::string::size_type p(l.find_first_of('"'));
112 if (p == std::string::npos)
113 {
114 tokens_.push_back('"' + l.substr(0, p)); // unterminated
115 }
116 else
117 {
118 tokens_.push_back(l.substr(0, p)); // terminated
119 ++p;
120 }
121 l.erase(0, p);
122 }
123 else
124 {
125 std::string::size_type p(l.find_first_of(spaces_));
126 std::string token(l.substr(0, p));
127 if (token != "")
128 {
129 tokens_.push_back(token);
130 }
131 l.erase(0, p);
132 }
133 }
134 isParsed_ = (tokens_.size() > 0 &&
135 tokens_[0] == getName() &&
136 (int) tokens_.size() > getMinArgs() &&
137 (int) tokens_.size() <= getMaxArgs()+1);
138
139 return isParsed_;
140 }
141
142 bool Cmd::isParsed() const { return isParsed_; }
143
144 std::string Cmd::getArg(int i) const
145 {
146 assert(cl_);
147 assert(isParsed_);
148 assert(i <= getMaxArgs());
149
150 if (i < (int) tokens_.size())
151 {
152 if (tokens_[i].length() > 0 && tokens_[i][0] == '$')
153 {
154 // CLI expansion
155 return cl_->getVar(tokens_[i].substr(1, std::string::npos));
156 }
157 else
158 {
159 // Straight argument
160 return tokens_[i];
161 }
162 }
163 else
164 {
165 return ""; // Not given optional argument
166 }
167 }
168
169 int Cmd::run()
170 {
171 assert(cl_);
172 assert(isParsed_);
173 assert(getArg(0) == getName());
174
175 try { return runCmd(); }
176 catch (...)
177 {
178 cl_->es() << "Unknown exception catched when running: " << getName() << "." << std::endl;
179 return 20;
180 }
181 }
182
183 void Cmd::setCL(CmdLine * cl)
184 {
185 assert(cl);
186 cl_ = cl;
187 }
188
189 std::string Cmd::getArgString(int i) const
190 {
191 assert(i < (int)args_.size());
192
193 std::string result("");
194 if (i >= minArgs_)
195 {
196 result += "[";
197 }
198 result += "<" + args_[i].first + ">";
199 if (i >= minArgs_)
200 {
201 result += "]";
202 }
203 return result;
204 }
205
206 std::string Cmd::stripLine(std::string const & line)
207 {
208 std::string l(line);
209 l.erase(0, l.find_first_not_of(spaces_));
210 l.erase(l.find_last_not_of(spaces_)+1, std::string::npos);
211 return l;
212 }
213
214 std::string Cmd::commandFromLine(std::string const & line)
215 {
216 return stripLine(line).substr(0, line.find_first_of(Cmd::spaces_));
217 }
218
219 std::string const Cmd::spaces_(" \t\n\r\f\v");
220
221 HeaderCmd::HeaderCmd(std::string const & header)
222 :Cmd("__header", header)
223 {}
224
225 int
226 HeaderCmd::runCmd()
227 {
228 return 1;
229 }
230
231 /** @brief Internal command: Exit command line. */
232 class ExitCmd: public Cmd
233 {
234 public:
235 ExitCmd()
236 :Cmd("exit", "Leave session")
237 {}
238 private:
239 int runCmd()
240 {
241 cl_->setVar("__EXIT", "true");
242 return 0;
243 }
244 };
245
246 /** @brief Internal command: Get help. */
247 class HelpCmd: public Cmd
248 {
249 public:
250 HelpCmd()
251 :Cmd("help", "Show command help")
252 {
253 addOptArg("command", "Get more help for specific command");
254 }
255 private:
256 int runCmd()
257 {
258 int result(0);
259
260 if (getArg(1) == "")
261 {
262 cl_->os() << "\nHelp for " << cl_->getVar("__TITLE") << std::endl;
263 cl_->os() << UI_UTIL_CMDLINE_SEPLINE0 << std::endl;
264 for (std::vector<Cmd *>::iterator i(cl_->commands_.begin()); i != cl_->commands_.end(); ++i)
265 {
266 cl_->os() << (*i)->getHelp(false);
267 }
268 cl_->os() << UI_UTIL_CMDLINE_SEPLINE0 << std::endl;
269 }
270 else
271 {
272 Cmd * c(cl_->findCmd(getArg(1)));
273 if (c)
274 {
275 cl_->os() << c->getHelp(true);
276 }
277 else
278 {
279 cl_->es() << "Unknown command: " << getArg(1) << std::endl;
280 result = 1;
281 }
282 }
283 return result;
284 }
285 };
286
287 /** @brief Internal command: Set a variable. */
288 class SetCmd: public Cmd
289 {
290 public:
291 SetCmd()
292 :Cmd("set", "Show or set variables; shows all variables without any argument.\n Use \"set -e\" to enable or \"set +e\" to disable fatal errors, respectively")
293 {
294 addOptArg("name", "Get value for variable <name>");
295 addOptArg("value", "Set value for variable <name> to <value>");
296 }
297 private:
298 int runCmd()
299 {
300 if (getArg(1) == "-e")
301 {
302 cl_->setVar("__FATAL", "true"); // like bash's "set -e"
303 }
304 else if (getArg(1) == "+e")
305 {
306 cl_->setVar("__FATAL", "false"); // like bash's "set +e"
307 }
308 else if (getArg(1) == "")
309 {
310 cl_->showVars(); // "set": shows all variables
311 }
312 else if (getArg(2) == "")
313 {
314 // "set ARG1"
315 cl_->showVar(getArg(1)); // "set var": shows var
316 }
317 else
318 {
319 // "set ARG1 ARG2"
320 cl_->setVar(getArg(1), getArg(2));
321 }
322 return 0;
323 }
324 };
325
326 /** @brief Internal command: Source another script. */
327 class SourceCmd: public Cmd
328 {
329 public:
330 SourceCmd()
331 :Cmd("source", "Source (load and run all lines of) file")
332 {
333 addArg("file", "File to source");
334 }
335 private:
336 int runCmd()
337 {
338 std::ifstream * f = new std::ifstream(getArg(1).c_str(), std::ios::in);
339 if (f && f->is_open())
340 {
341 // Avoid leak with this bool flag ;)
342 if (cl_->isNeedsDeletion_)
343 {
344 delete cl_->is_;
345 }
346 cl_->is_ = f;
347 cl_->isNeedsDeletion_ = true;
348 return 0;
349 }
350 else
351 {
352 cl_->es() << "File open error: " << getArg(1) << std::endl;
353 return 1;
354 }
355 }
356 };
357
358 /** @brief Internal command: Sleep for n seconds. */
359 class SleepCmd: public Cmd
360 {
361 public:
362 SleepCmd()
363 :Cmd("sleep", "Delay execution for some time")
364 {
365 addOptArg("seconds", "Seconds to sleep");
366 }
367 private:
368 int runCmd()
369 {
370 return Sys::sleep(ato<unsigned int>(getArg(1)));
371 }
372 };
373
374 /** @brief Internal command: Print text. */
375 class EchoCmd: public Cmd
376 {
377 public:
378 EchoCmd()
379 :Cmd("echo", "Print text to stdout")
380 {
381 addOptArg("text", "Text to print");
382 }
383 private:
384 int runCmd()
385 {
386 cl_->os() << getArg(1) << std::endl;
387 return 0;
388 }
389 };
390
391
392 CmdLine::CmdLine(std::istream * is,
393 std::ostream * os,
394 std::ostream * es,
395 std::string const & title,
396 std::string const & prompt)
397 :is_(is)
398 ,isNeedsDeletion_(false)
399 ,os_(os)
400 ,es_(es)
401 ,commands_()
402 ,variables_()
403 {
404 assert(os_);
405 assert(es_);
406
407 // Variables that influence CmdLine's behaviour
408 setVar("__TITLE", title);
409 setVar("__PROMPT", prompt);
410 setVar("__ECHO", "false");
411 setVar("__LAST_ERROR", "0");
412 setVar("__ERRORS", "0");
413 setVar("__FATAL", "false");
414 setVar("__EXIT", "false");
415
416
417 // Set generic commands
418 add(new HeaderCmd("Generic command line functions"));
419 add(new ExitCmd());
420 add(new HelpCmd());
421 add(new SetCmd());
422 add(new SourceCmd());
423 add(new SleepCmd());
424 add(new EchoCmd());
425 }
426
427 CmdLine::~CmdLine()
428 {
429 delAnySeqContainer(commands_);
430 }
431
432 void CmdLine::add(Cmd * cmd)
433 {
434 assert(cmd);
435 commands_.push_back(cmd);
436 cmd->setCL(this);
437 }
438
439 Cmd * CmdLine::findCmd(std::string const & name) const
440 {
441 for (std::vector<Cmd *>::const_iterator i(commands_.begin()); i != commands_.end(); ++i)
442 {
443 if ((*i)->getName() == name)
444 {
445 return *i;
446 }
447 }
448 return 0;
449 }
450
451 std::ostream & CmdLine::os() { return *os_; }
452 std::ostream & CmdLine::es() { return *es_; }
453
454 std::string CmdLine::readLine(std::string const & promptVar)
455 {
456 std::string result("");
457
458 os() << getVar(promptVar);
459 if (is_)
460 {
461 // Use standard istream
462 char line[320];
463 is_->getline(line, 320);
464 result = line;
465 }
466 else
467 {
468 // Interactive; use readline/history
469 char * line(::readline(""));
470 if (line)
471 {
472 result = line;
473 std::free(line);
474 Cmd::stripLine(result);
475 if (result != "")
476 {
477 ::add_history(result.c_str());
478 }
479 }
480 }
481 return result;
482 }
483
484 std::string CmdLine::getVar(std::string const & key) const
485 {
486 std::map<std::string, std::string>::const_iterator i(variables_.find(key));
487 if (i == variables_.end())
488 {
489 return "";
490 }
491 else
492 {
493 return (*i).second;
494 }
495 }
496
497 void CmdLine::setVar(std::string const & key, std::string const & value)
498 {
499 std::map<std::string, std::string>::iterator i(variables_.find(key));
500 if (i == variables_.end())
501 {
502 std::pair<std::map<std::string, std::string>::iterator, bool> result(variables_.insert(std::make_pair(key, value)));
503 assert(result.second);
504 }
505 else
506 {
507 (*i).second = value;
508 }
509 }
510
511 void CmdLine::showVar(std::map<std::string, std::string>::iterator i)
512 {
513 if (i != variables_.end())
514 {
515 os() << (*i).first << "=\"" << (*i).second << "\"";
516 }
517 else
518 {
519 os() << "Variable not set.";
520 }
521 os() << std::endl;
522 }
523
524 void CmdLine::showVar(std::string const & key)
525 {
526 std::map<std::string, std::string>::iterator i(variables_.find(key));
527 showVar(i);
528 }
529
530 void CmdLine::showVars()
531 {
532 for (std::map<std::string, std::string>::iterator i(variables_.begin()); i != variables_.end(); ++i)
533 {
534 showVar(i);
535 }
536 }
537
538 int CmdLine::run()
539 {
540 os() << std::endl << getVar("__TITLE") << std::endl;
541 os() << UI_UTIL_CMDLINE_SEPLINE0 << std::endl;
542 os() << "\nType \"help\" for command overview." << std::endl;
543
544 while (getVar("__EXIT") != "true")
545 {
546 std::string line(readLine());
547 if (getVar("__ECHO") == "true")
548 {
549 os() << line << std::endl;
550 }
551
552 if (line.length() != 0 && line[0] != '#' && line[0] != '\n') // empty lines or comments
553 {
554 setVar("__LAST_ERROR", "0");
555
556 // Find command
557 Cmd * cmd(findCmd(Cmd::commandFromLine(line)));
558
559 if (cmd)
560 {
561 if (cmd->parse(line))
562 {
563 int exitCode(cmd->run());
564 if (exitCode != 0)
565 {
566 es() << "Error: \"" << line << "\" failed with exit code " << exitCode << "." << std::endl;
567 setVar("__LAST_ERROR", tos<int>(exitCode));
568 }
569 }
570 else
571 {
572 // Syntax error
573 os() << "\nParser error in: \"" << line << "\":\n\n";
574 es() << cmd->getHelp(true) << std::endl;
575 setVar("__LAST_ERROR", "5");
576 }
577 }
578 else
579 {
580 es() << "Unknown command." << std::endl;
581 setVar("__LAST_ERROR", "10");
582 }
583
584 // Error counter
585 if (getVar("__LAST_ERROR") != "0")
586 {
587 setVar("__ERRORS", tos<int>(ato<int>(getVar("__ERRORS"))+1));
588 }
589 }
590
591 // Change back to interactive mode if stream is done
592 if (is_ && is_->eof())
593 {
594 is_ = 0;
595 }
596
597 if (getVar("__FATAL") == "true" && ato<int>(getVar("__LAST_ERROR")) != 0)
598 {
599 es() << "Exiting on fatal error." << std::endl;
600 setVar("__EXIT", "true");
601 setVar("__ERRORS", tos<int>(-1 * ato<int>(getVar("__ERRORS"))));
602 }
603 }
604 return ato<int>(getVar("__ERRORS"));
605 }
606
607 }}}
0 /**
1 * @file CmdLine.hpp
2 * @author Schlund + Partner AG
3 * @brief Utility for easy command line interfaces.
4 *
5 * Simple command line abstraction; automatically shows help on commands,
6 * handles errors, can set variables, does variable expansion.
7 *
8 * Does not include a "real" scripting language (loops, variable
9 * expansion, etc...); for this, rather rewrite this or use some
10 * existing solution for embedded scripting.
11 *
12 */
13
14 /**
15 * @example CmdLine.cpp
16 * CmdLine example program
17 * Should be installed as ui-utilcpp-cmdline along with the library.
18 */
19
20 #ifndef UI_UTIL_CMDLINE_HPP
21 #define UI_UTIL_CMDLINE_HPP
22
23 // STDC++
24 #include <string>
25 #include <vector>
26 #include <map>
27 #include <iostream>
28 #include <cstdio>
29
30 namespace UI {
31 namespace Util {
32 // Better to have this extra namespace to avoid problems with local implementation-only Standard Command Classes
33 namespace CmdLine {
34
35 class Cmd;
36
37 /** @brief Simple Command Line interface.
38 *
39 * Short howto: Write your own command line class, inherit from CmdLine, inherit
40 * custom command classes from Cmd (overwrite private run function).
41 * Use run() to start the interface.
42 *
43 * When run interactively, libreadline is used.
44 *
45 * This class defines some common commands that cannot be used as
46 * custom commands later.
47 */
48 class CmdLine
49 {
50 /** @brief These two need access to CmdLine variables -- might be better to encapsulate further ;). */
51 friend class HelpCmd;
52 /** @brief These two need access to CmdLine variables -- might be better to encapsulate further ;). */
53 friend class SourceCmd;
54
55 public:
56 /**
57 * @param is In-Stream; use Null-Pointer to run interactive (using libreadline).
58 * @param os Out-Stream.
59 * @param es Error-Out-Stream.
60 * @param title Initial description of the command line (variable __TITLE).
61 * @param prompt Initial prompt (variable __PROMPT).
62 */
63 CmdLine(std::istream * is=&std::cin,
64 std::ostream * os=&std::cout,
65 std::ostream * es=&std::cerr,
66 std::string const & title="Simple Command Line Interface",
67 std::string const & prompt="\nCommand # ");
68 ~CmdLine();
69
70 /** @brief Add a command to the command line.
71 *
72 * @param cmd Command to add.
73 * @note Command must be created via "new"; will be deleted automatically in CmdLine's destructor.
74 */
75 void add(Cmd * cmd);
76
77 /** @brief Get variable value. */
78 std::string getVar(std::string const & key) const;
79 /** @brief Set variable value. */
80 void setVar(std::string const & key, std::string const & value);
81
82 /** @brief Show (print) variable value. */
83 void showVar(std::string const & key);
84 /** @brief Show (print) variable values. */
85 void showVar(std::map<std::string, std::string>::iterator i);
86 /** @brief Show (print) all variable values. */
87 void showVars();
88
89 /** @brief Get out-stream. */
90 std::ostream & os();
91 /** @brief Get in-stream. */
92 std::ostream & es();
93
94 /** @brief Find a command from name. */
95 Cmd * findCmd(std::string const & name) const;
96
97 /**
98 * @returns: 0 if everything was fine (no errors), >0 if there have been # ignored errors,
99 * <0 if it returned on error (with __FATAL set to 1). Negative amount of former errors.
100 */
101 int run();
102
103 protected:
104 /** @brief Only source for input. */
105 std::string readLine(std::string const & promptVar="__PROMPT");
106
107 private:
108 std::istream * is_;
109 bool isNeedsDeletion_; // Should be set if in stream was created inside CmdLine (currently avoids leak with the source command)
110 std::ostream * const os_;
111 std::ostream * const es_;
112 std::vector<Cmd *> commands_;
113 std::map<std::string, std::string> variables_;
114 };
115
116 /** @brief Represents a command. */
117 class Cmd
118 {
119 public:
120 /** @brief Standard constructor.
121 *
122 * @param name Name of the command.
123 * @param help Documentation string for this command.
124 */
125 Cmd(std::string const & name,
126 std::string const & help="No help for this command");
127
128 virtual ~Cmd();
129
130 /** @brief Get command name. */
131 std::string getName() const;
132
133 /** @brief Add mandatory argument. Use this in constructors of custom Cmd classes.
134 *
135 * @param name Name of the argument.
136 * @param help Help for this command.
137 */
138 void addArg(std::string const & name, std::string const & help="No help for this option");
139
140 /** @brief Add optional argument. Use this in constructors of custom Cmd classes.
141 *
142 * @param name Name of the argument.
143 * @param help Help for this command.
144 */
145 void addOptArg(std::string const & name, std::string const & help="No help for this option");
146
147 /** @brief Get min args. */
148 int getMinArgs() const;
149
150 /** @brief Get max args. */
151 int getMaxArgs() const;
152
153 /** @brief Get syntax line: cmd arg1 arg2 [arg3]. */
154 std::string getSyntax() const;
155
156 /** @brief Print help (i.e., syntax + documentation text). */
157 std::string getHelp(bool showArgs=false) const;
158
159 /** @brief Parse a line.
160 *
161 * @param line Input line.
162 */
163 bool parse(std::string const & line);
164
165 /** @brief Check if we are in "parsed" state. */
166 bool isParsed() const;
167
168 /** @brief Get the argument of a parsed command.
169 *
170 * @param i Number of argument to get.
171 */
172 std::string getArg(int i) const;
173
174 /** @brief Public run function. Use this to run commands. */
175 int run();
176
177 /** @brief Helper function. */
178 static std::string stripLine(std::string const & line);
179
180 /** @brief Helper function. */
181 static std::string commandFromLine(std::string const & line);
182
183 /** @brief Set Command Line Pointer; This must be run when adding commands from a CmdLine. */
184 void setCL(CmdLine * cl);
185
186 protected:
187 /** @brief Should be there to access CmdLine. */
188 CmdLine * cl_;
189
190 private:
191 /** @brief Virtual run function. Define this in custom Cmd classes.
192 *
193 * In this command, it is guaranteed to have "cl_" ready for use.
194 */
195 virtual int runCmd() = 0;
196
197 /** @brief Internal helper function. */
198 std::string getArgString(int i) const;
199
200 /** @brief Initializing variables. */
201 std::string const name_;
202 std::string const help_;
203
204 /** @brief Argument variables. */
205 std::vector<std::pair<std::string, std::string> > args_;
206 int minArgs_;
207
208 /** @brief Parser variables. */
209 std::vector<std::string> tokens_;
210 bool isParsed_;
211
212 /** @brief Helper variables. */
213 static std::string const spaces_;
214 };
215
216 /** @brief Pseudo command class to add header like seperators in help descriptions. */
217 class HeaderCmd: public Cmd
218 {
219 public:
220 /**
221 * @param header Text to show as header.
222 */
223 HeaderCmd(std::string const & header);
224
225 private:
226 int runCmd();
227 };
228
229 }}}
230 #endif
0 #include "config.h"
1
2 // Implementation
3 #include "Exception.hpp"
4
5 // STDC++
6 #include <typeinfo>
7
8 namespace UI {
9
10 std::string const Exception::Errno_ ("xxxERRNOxxx");
11 std::string const Exception::NoWhatGiven_ ("No error description given");
12 std::string const Exception::NoDebugGiven_("No debug information given");
13
14 Exception::Exception(std::string const & what, std::string const & debug, int const & errNo)
15 :what_(Util::strrpl(what, Errno_, "[" + Util::tos(errNo) + "] " + Util::strerror(errNo)))
16 ,debug_(debug)
17 ,errNo_(errNo)
18 {}
19
20 Exception::~Exception() throw() {}
21
22 char const * Exception::what() const throw() { return what_.c_str(); }
23 std::string Exception::getDebug() const { return std::string(std::string(typeid(*this).name()) + ": " + debug_); }
24 int const & Exception::getErrno() const { return errNo_; }
25
26 }
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_EXCEPTION_HPP
4 #define UI_UTIL_EXCEPTION_HPP
5
6 // STDC++
7 #include <string>
8 #include <cerrno>
9
10 // C++ libraries
11 #include <ui-utilcpp/Text.hpp>
12
13 #define UI_SOURCEDEBUG __FILE__ + std::string(":") + UI::Util::tos(__LINE__)
14
15 /** @name Throw macro shortcuts with automatic debug info and optimized errno handling.
16 *
17 * @{ */
18 /** @brief Throw non-code exception. */
19 #define UI_THROW(desc) throw Exception(desc, UI_SOURCEDEBUG)
20 /** @brief Throw non-code exception w/ errno handling. */
21 #define UI_THROW_ERRNO(call) { int const myErrno(errno); throw Exception(call + Exception::Errno_, UI_SOURCEDEBUG, myErrno); }
22 /** @brief Throw code exception. */
23 #define UI_THROW_CODE(code, desc) throw Exception(code, desc, UI_SOURCEDEBUG)
24 /** @brief Throw code exception w/ errno handling. */
25 #define UI_THROW_CODE_ERRNO(code, call) { int const myErrno(errno); throw Exception(code, call + Exception::Errno_, UI_SOURCEDEBUG, myErrno); }
26 /** @} */
27
28 /** @brief Namespace for any Schlund+Partner C++ code. */
29 namespace UI {
30
31 /** @brief Generic exception class for namespace UI.
32 *
33 * @section Exception_HowTo Exception HOWTO
34 *
35 * @subsection Exception_HowTo_U User's guide (exception handlers)
36 *
37 * - For standard (no "code" support), just use intuitively. For
38 * example, <em>UI::Exception</em> catches any S+P Exception,
39 * <em>UI::Util::Exception</em> any S+P exception in namespace UI::Util,
40 * <em>UI::Util::File::Exception</em> any exception of class UI::Util::File.
41 *
42 * - Any time you want to catch <em>code exceptions</em>, you will
43 * always need a dedicated handler (knowing the code semantics)
44 * anyway. For example, knowing <em>UI::Util::File::Exception</em> is
45 * a code exception, catch exactly that exception and evaluate further
46 * using getCode().
47 *
48 * @subsection Exception_HowTo_D Developer's guide (write own exception classes)
49 *
50 * @subsubsection Exception_HowTo_D_P Preliminaries
51 *
52 * - In any context (namespace or class), a class "Exception" should
53 * be available, using UI::Exception or UI::CodeException constructor
54 * syntax; this is needed so UI_THROW* macros can be used.
55 *
56 * - Note that the "interfacing" exception class is always called
57 * "Exception", even if it is a code exception. The
58 * <em>CodeException</em> template is only used to ease writing
59 * classes w/ dedicated code number support.
60 *
61 * - Be sure that your exception class always inherits the next class
62 * "context up". For example UI::Util::Sys::Exception must inherit
63 * from UI::Util::Exception, <b>not</b> UI::Exception; else a handler
64 * on UI::Util::Exception would not catch UI::Util::Sys::Exception,
65 * which is against intuitive use of exceptions. The same holds true
66 * for mere typedefs.
67 *
68 * @subsubsection Exception_HowTo_D_E Quickstart
69 *
70 * Let's say, you invented a new namespace "UI::Humbug".
71 *
72 * - In the simplest case, if you don't need support to catch down all
73 * UI::Humbug's exceptions, you may just use UI_THROW*-macros w/o any
74 * additional code.
75 *
76 * - Alternatively, if UI::Humbug needs a generic exception class so
77 * we can catch it all down, just use the very same source code for
78 * UI::Util::Exception in your new namespace.
79 *
80 * - Optionally, if you want to ease the use of code exceptions in
81 * your namespace for sub-contexts, just use the very code for
82 * the UI::Util::CodeException template in your namespace.
83 *
84 * - Alernatively, if your new namespace's generic exception class is
85 * to be a code exception itself, inherit UI::Humbug::Exception from
86 * UI::CodeException<HumbugCode>.
87 *
88 * The above three points typically go into "Exception.hpp" of your project.
89 *
90 * - Optionally, you can now add exception classes for sub-contexts
91 * (sub-namespaces or classes) if needed.
92 *
93 * - To throw exceptions, always use macros UI_THROW, UI_THROW_CODE,
94 * UI_THROW_ERRNO or UI_THROW_CODE_ERRNO.
95 *
96 */
97 class Exception: public std::exception
98 {
99 protected:
100 /** @name These constants may be used for description default values for derived classes.
101 * @{ */
102 static std::string const NoWhatGiven_;
103 static std::string const NoDebugGiven_;
104 /** @} */
105
106 public:
107 /** @brief If this string is used in a "what" description message, it will be replaced by an errno error string. */
108 static std::string const Errno_;
109
110 /** @brief Construct with description text.
111 *
112 * @note You usually <b>do not call this constructor directly</b>, but instead
113 * always use one of the UI_THROW_* macros above.
114 *
115 * @param what Exception description. Errno_ text in string will be replaced with error string.
116 * @param debug Any debug text.
117 * @param errNo Dedicated "errno" error number.
118 */
119 Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0);
120 virtual ~Exception() throw();
121
122 /** @name Get exception information.
123 * @{ */
124 char const * what() const throw();
125 int const & getErrno() const;
126 std::string getDebug() const;
127 /** @} */
128
129 private:
130 std::string const what_;
131 std::string const debug_;
132 int const errNo_;
133 };
134
135 /** @brief Adding code facility to Exception. */
136 template <typename Code = int>
137 class CodeException: public Exception
138 {
139 public:
140 CodeException(Code const & code, std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0)
141 :UI::Exception(what, debug, errNo)
142 ,code_(code)
143 {};
144 Code const & getCode() const { return code_; }
145 private:
146 Code const code_;
147 };
148
149 /** @brief Namespace for ui-utilcpp. */
150 namespace Util {
151
152 /** @brief Generic exception class for namespace UI::Util. */
153 class Exception: public UI::Exception
154 {
155 public:
156 Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0)
157 :UI::Exception(what, debug, errNo) {}
158 virtual ~Exception() throw() {};
159 };
160
161 /** @brief Adding code facility to Exception. */
162 template <typename Code = int>
163 class CodeException: public Exception
164 {
165 public:
166 CodeException(Code const & code, std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0)
167 :Exception(what, debug, errNo)
168 ,code_(code)
169 {};
170 Code const & getCode() const { return code_; }
171 private:
172 Code const code_;
173 };
174
175 }}
176 #endif
0 #include "config.h"
1
2 // Implementation
3 #include "File.hpp"
4
5 // STDC++
6 #include <cassert>
7 #include <fstream>
8 #include <cstring>
9
10 // Local
11 #include "Text.hpp"
12
13 namespace UI {
14 namespace Util {
15
16 std::string getenv(std::string const & name)
17 {
18 char const * const env(Sys::getenv(name.c_str()));
19 return env ? env : EmptyString_;
20 }
21
22 std::string guessConfFile(std::string const & id, std::string const & suffix)
23 {
24 #ifdef WIN32
25 return "./" + id + suffix;
26 #else
27 return (Sys::geteuid() == 0 ? "/etc/" : getenv("HOME") + "/.") + id + suffix;
28 #endif
29 }
30
31 std::string PIDFile::guess(std::string const & id)
32 {
33 return (Sys::geteuid() == 0 ? "/var/run/" : getenv("HOME") + "/.") + id + ".pid";
34 }
35
36 PIDFile::PIDFile(std::string const & path, pid_t const & pid, bool const & keepExisting, mode_t const & perms)
37 :path_(path)
38 {
39 #ifndef WIN32
40 if (keepExisting && fileExists(path))
41 {
42 UI_THROW("Won't write to existing PID file: " + path);
43 }
44
45 std::ofstream f(path_.c_str(), std::ios::out | std::ios::trunc);
46 if (!f.is_open()) { UI_THROW_ERRNO("Error opening pid file: " + path_ + ": "); }
47
48 // Set hardcoded unix permissions (stdc++ can't do it)
49 Sys::chmod(path_.c_str(), perms);
50
51 f << pid << std::endl;
52 if (f.fail()) { UI_THROW_ERRNO("Error writing to pid file: " + path_ + ": "); }
53 #endif
54 }
55
56 PIDFile::~PIDFile()
57 {
58 #ifndef WIN32
59 try { Sys::unlink(path_.c_str()); }
60 catch(...) {}
61 #endif
62 }
63
64 AutoRemoveFile::AutoRemoveFile(std::string const & path)
65 :path_(path)
66 {}
67
68 AutoRemoveFile::~AutoRemoveFile()
69 {
70 try { Sys::remove(path_.c_str()); }
71 catch(...) {}
72 }
73
74 std::string const & AutoRemoveFile::operator()() const { return path_; }
75
76
77 CFileStream::CFileStream(std::string const & file, std::string const & mode)
78 :file_(Sys::fopen(file.c_str(), mode.c_str()))
79 {}
80
81 CFileStream::~CFileStream()
82 {
83 try { Sys::fclose(file_); }
84 catch(...) {}
85 }
86
87 FILE * CFileStream::get() const
88 {
89 return file_;
90 }
91
92 void fileCopy(std::string const & src, std::string const & dest)
93 {
94 CFileStream srcFile(src, "rb");
95 CFileStream destFile(dest, "wb");
96
97 char buffer[4096];
98 int bytesRead(0);
99 while ((bytesRead = fread(buffer, sizeof(char), sizeof(buffer), srcFile.get())) > 0)
100 {
101 fwrite(buffer, sizeof(char), bytesRead, destFile.get());
102 }
103 }
104
105 bool fileExists(std::string const & fName)
106 {
107 #ifdef WIN32
108 return FALSE == PathFileExists(fName.c_str()) ? false : true;
109 #else
110 try
111 {
112 struct stat fStat;
113 Sys::stat(fName.c_str(), &fStat);
114 return true;
115 }
116 catch (Sys::Exception const &) { return false; }
117 #endif
118 }
119
120 time_t fileModificationTime(std::string const & path)
121 {
122 try
123 {
124 struct stat st;
125 Sys::stat(path.c_str(), &st);
126 return st.st_mtime;
127 }
128 catch (Sys::Exception const &) { return -1; }
129 }
130
131
132 void FileDescriptor::fdClose(int const & fd, std::string const &, bool const & doClose)
133 {
134 if (doClose)
135 {
136 try { Sys::close(fd); }
137 catch(...) {};
138 }
139 }
140
141 FileDescriptor::FileDescriptor(int fd, bool closeFd)
142 {
143 init(fd, closeFd);
144 }
145
146 FileDescriptor::~FileDescriptor()
147 {
148 fdClose(fd_, "FileDescriptor", closeFd_);
149 }
150
151 std::streamsize FileDescriptor::read(void * const buf, std::streamsize count)
152 {
153 try { return static_cast<std::streamsize>(Sys::read(fd_, buf, count)); }
154 catch(std::exception const & e) { UI_THROW_CODE(ReadErr_, "Error reading from fd " + tos(getFd()) + ": " + e.what()); }
155 }
156
157 std::streamsize FileDescriptor::write(void const * const buf, std::streamsize count)
158 {
159 try { return static_cast<std::streamsize>(Sys::write(fd_, buf, count)); }
160 catch(std::exception const & e) { UI_THROW_CODE(WriteErr_, "Error writing to fd " + tos(getFd()) + ": " + e.what()); }
161 }
162
163 int FileDescriptor::getFd() const
164 {
165 return fd_;
166 }
167
168 void FileDescriptor::init(int fd, bool closeFd)
169 {
170 fd_ = fd;
171 closeFd_ = closeFd;
172 }
173
174
175 File::File(std::string const & name, int flags, mode_t mode, bool closeFd)
176 :name_(name)
177 {
178 int fd(Sys::open(name_.c_str(), flags, mode));
179 init(fd, closeFd);
180 }
181
182 File::File(int fd, bool closeFd)
183 :FileDescriptor(fd, closeFd)
184 {}
185
186 std::string const & File::getName() const
187 {
188 return name_;
189 }
190
191 #ifndef WIN32
192 PosixFileMutex::PosixFileMutex(std::string const & lockFile)
193 :File(lockFile)
194 {}
195
196 PosixFileMutex::PosixFileMutex(int fd)
197 :File(fd)
198 {}
199
200 bool PosixFileMutex::setPosixLock(int type, bool wait)
201 {
202 struct flock lock;
203 std::memset(&lock, 0, sizeof(lock));
204 lock.l_type = type;
205 lock.l_start = 0;
206 lock.l_whence = SEEK_SET;
207 lock.l_len = 0;
208 lock.l_pid = Sys::getpid();
209 int cmd(wait ? F_SETLKW : F_SETLK);
210 try { return Sys::fcntl(fd_, cmd, &lock) == 0; }
211 catch (...) { return false; }
212 }
213
214 bool PosixFileMutex::tryEnterMutex() throw()
215 {
216 return setPosixLock(F_WRLCK, false);
217 }
218
219 void PosixFileMutex::enterMutex()
220 {
221 if (!setPosixLock(F_WRLCK, true))
222 {
223 UI_THROW_CODE_ERRNO(LockErr_, "Error locking posix file mutex on " + getName() + ": ");
224 }
225 }
226
227 void PosixFileMutex::leaveMutex()
228 {
229 if (!setPosixLock(F_UNLCK, false))
230 {
231 UI_THROW_CODE_ERRNO(UnlockErr_, "Error unlocking posix file mutex on \"" + getName() + "\": ");
232 }
233 }
234
235
236 BSDFileMutex::BSDFileMutex(std::string const & lockFile)
237 :File(lockFile)
238 {}
239
240 BSDFileMutex::BSDFileMutex(int fd)
241 :File(fd)
242 {}
243
244 bool BSDFileMutex::tryEnterMutex() throw()
245 {
246 try { return Sys::flock(fd_, LOCK_EX | LOCK_NB) == 0; }
247 catch (...) { return false; }
248 }
249
250 void BSDFileMutex::enterMutex()
251 {
252 Sys::flock(fd_, LOCK_EX);
253 }
254
255 void BSDFileMutex::leaveMutex()
256 {
257 Sys::flock(fd_, LOCK_UN);
258 }
259 #endif
260
261
262 uint64_t FsInfo::calc(long double const & value) const
263 {
264 return uint64_t(value * bSize_ / 1024);
265 }
266
267 FsInfo::FsInfo(std::string const & dev, std::string const & file)
268 {
269 #ifdef WIN32
270 __int64 i64FreeBytesToCaller = 0;
271 __int64 i64TotalBytes = 0;
272 __int64 i64FreeBytes = 0;
273 if (GetDiskFreeSpaceEx(dev.c_str(), (PULARGE_INTEGER)&i64FreeBytesToCaller,
274 (PULARGE_INTEGER)&i64TotalBytes,(PULARGE_INTEGER)&i64FreeBytes))
275 {
276 bSize_ = 1;
277 bTotal_ = static_cast<long double>(i64TotalBytes);
278 bAvail_ = static_cast<long double>(i64FreeBytesToCaller);
279 bFree_ = static_cast<long double>(i64FreeBytes);
280 }
281 else
282 {
283 UI_THROW("Cannot get disk usage for device/file on device=" + dev + "/" + file);
284 }
285 #else
286 // dev is not used for unix; this line avoids a compiler warning only.
287 if (dev.empty()) {};
288
289 struct statvfs stat;
290 Sys::statvfs(file.c_str(), &stat);
291 bSize_=stat.f_bsize;
292 bTotal_=stat.f_blocks;
293 bAvail_=stat.f_bavail;
294 bFree_=stat.f_bfree;
295 #endif
296 }
297
298 uint64_t FsInfo::getTotal() const { return calc(bTotal_); }
299 uint64_t FsInfo::getAvail() const { return calc(bAvail_); }
300 uint64_t FsInfo::getFree() const { return calc(bFree_); }
301 uint64_t FsInfo::getUsed() const { return calc(bTotal_-bFree_); }
302
303 }}
0 /**
1 * @file
2 * @brief File, descriptors and sockets.
3 */
4 #ifndef UI_UTIL_FILE_HPP
5 #define UI_UTIL_FILE_HPP
6
7 #ifdef WIN32
8 #include <fcntl.h>
9 #endif
10
11 // STDC++
12 #include <string>
13 #include <iostream>
14 #include <vector>
15 #include <ctime>
16
17 // C++ libraries
18 #include <ui-utilcpp/Exception.hpp>
19 #include <ui-utilcpp/Sys.hpp>
20
21 namespace UI {
22 namespace Util {
23
24 /** @brief Like getenv(3), but returns empty string when env is missing. */
25 std::string getenv(std::string const & name);
26
27 /** @brief Guess a config file (/etc/id.conf or ~/.id.conf). */
28 std::string guessConfFile(std::string const & id, std::string const & suffix=".conf");
29
30 /** @brief Write and keep pid file during lifetime. */
31 class PIDFile
32 {
33 public:
34 /** @brief Guess a pid file (/var/run/id.pid or ~/.id.pid). */
35 static std::string guess(std::string const & id);
36
37 PIDFile(std::string const & path,
38 #ifdef WIN32
39 pid_t const & pid=Sys::getpid(),
40 #else
41 pid_t const & pid=Sys::getpgid(0),
42 #endif
43 bool const & keepExisting=true,
44 mode_t const & perms=S_IRUSR | S_IWUSR
45 #ifndef WIN32
46 | S_IRGRP | S_IROTH
47 #endif
48 );
49 ~PIDFile();
50 private:
51 std::string const path_;
52 };
53
54 /** @brief Guarantuee to run "remove(2)" on path in destructor. */
55 class AutoRemoveFile
56 {
57 public:
58 AutoRemoveFile(std::string const & path);
59 ~AutoRemoveFile();
60 std::string const & operator()() const;
61 private:
62 std::string const path_;
63 };
64
65 /** @brief Simple exception-save FILE abstraction. */
66 class CFileStream
67 {
68 public:
69 /** @brief Constructor. */
70 CFileStream(std::string const & fileName, std::string const & mode);
71 ~CFileStream();
72 /** @brief Get C file stream. */
73 FILE * get() const;
74 private:
75 FILE * const file_;
76 };
77
78 /** @brief File copy from file names. */
79 void fileCopy(std::string const & src, std::string const & dest);
80
81 /** @brief Check if a file exists using stat(2).
82 *
83 * @param fName File name to check.
84 * @return true, if file exists, else false.
85 */
86 bool fileExists(std::string const & fName);
87
88 /** @brief Get the modification time for a file
89 *
90 * @param path File to check.
91 * @return time of last modification.
92 */
93 time_t fileModificationTime(std::string const & path);
94
95 /** @brief File Descriptor Holder Class.
96 *
97 * @see read(2), write(2)
98 *
99 * This should encapsulate system calls on file descriptors, and
100 * automate descriptor closing.
101 */
102 class FileDescriptor
103 {
104 public:
105 /** @brief Helper to close file descriptors from destructors. */
106 static void fdClose(int const & fd, std::string const & id, bool const & doClose=true);
107
108 /** @brief Error codes for exceptions. */
109 enum ErrorCode
110 {
111 OpenErr_ = 1,
112 ReadErr_,
113 WriteErr_,
114 LockErr_,
115 UnlockErr_,
116 BindErr_,
117 ConnectErr_,
118 UnblockErr_,
119 ListenErr_,
120 ShutdownErr_
121 };
122 /** @brief Exceptions for this class. */
123 typedef CodeException<ErrorCode> Exception;
124
125 /** @brief Constructor from file descriptor
126 *
127 * @param fd Already opened file descriptor
128 * @param closeFd Whether to call close(2) in destructor
129 *
130 * This constructor takes an already opened file descriptor. The
131 * destructor will not call close on this descriptor.
132 *
133 */
134 FileDescriptor(int fd=-1, bool closeFd=false);
135
136 /** @brief Destructor.
137 *
138 * This will close the file descriptor via close(2), unless it was
139 * constructed by an already opened descriptor.
140 *
141 * It will never delete the file, even if it got created by the
142 * constructor.
143 *
144 */
145 virtual ~FileDescriptor();
146
147
148 /** @brief C++ like virtual read method.
149 *
150 * This default implementation uses read(2).
151 */
152 virtual std::streamsize read(void * const buf, std::streamsize count);
153
154 /** @brief C++ like virtual erite method.
155 *
156 * This default implementation uses write(2).
157 */
158 virtual std::streamsize write(void const * const buf, std::streamsize count);
159
160 /** @brief Get file descriptor. */
161 int getFd() const;
162
163 protected:
164 /** @brief The file descriptor that is managed. */
165 int fd_;
166
167 /** @brief To be called in a constructor. */
168 void init(int fd, bool closeFd=false);
169
170 private:
171 bool closeFd_;
172 };
173
174 /** @brief File representation.
175 *
176 * @see FileDescriptor, fcntl(2), open(2), close(2)
177 */
178 class File: public FileDescriptor
179 {
180 public:
181 /** @brief Constructor.
182 *
183 * @param name Path to the file to open
184 * @param flags As in open(2)
185 * @param mode As in open(2)
186 * @param closeFd Whether to call close(2) in destructor
187 * @see open(2)
188 *
189 * This constructor takes a file name, will try to open the file
190 * using open(2). Arguments to open(2) can be given optionally,
191 * and have reasonable defaults.
192 *
193 * OPEN_ERR will be thrown if the file could not be created via
194 * open(2).
195 */
196 File(std::string const & name,
197 int flags=O_CREAT | O_WRONLY,
198 mode_t mode=S_IRUSR | S_IWUSR,
199 bool closeFd=true);
200
201 /** @brief Constructor from file descriptor.
202 *
203 * @param fd Already opened file descriptor
204 * @param closeFd Whether to call close(2) in destructor
205 *
206 * This constructor takes an already opened file descriptor.
207 */
208 File(int fd, bool closeFd=false);
209
210 /** @brief Get file name. This will always deliver en empty string if constructed from fd. */
211 std::string const & getName() const;
212
213 private:
214 std::string const name_;
215 };
216
217 /**
218 * @example FileLock.cpp
219 * Example program for advisory POSIX and BSD file locking.
220 * Should be installed as ui-utilcpp-filelock along with the library.
221 */
222
223 /** @brief Mutex For Posix Advisory File Locking
224 *
225 * @see MutexLock
226 * @see fcntl(2), open(2)
227 * @attention This does not work from the same process id, as any close() to any open file
228 * descriptor of a process removes all POSIX locks from that (process/fd)-pair.
229 */
230 #ifndef WIN32
231 class PosixFileMutex: public File
232 {
233 public:
234 /** @brief Constructor from file name.
235 *
236 * @param lockFile Name of lock file
237 * @see FileDescriptor
238 */
239 PosixFileMutex(std::string const & lockFile);
240
241 /** @brief Constructor from file descriptor.
242 *
243 * @param fd Opened file descriptor
244 * @see FileDescriptor
245 */
246 PosixFileMutex(int fd);
247
248 /** @name Standard mutex methods.
249 * @{ */
250 bool tryEnterMutex() throw();
251 void enterMutex();
252 void leaveMutex();
253 /** @} */
254
255 private:
256 bool setPosixLock(int type, bool wait);
257 };
258
259 /** @brief Mutex For BSD Advisory File Locking.
260 *
261 * @see MutexLock
262 * @see flock(2), open(2)
263 * @attention BSD locking does not work over NFS.
264 *
265 */
266 class BSDFileMutex: public File
267 {
268 public:
269 /** @brief Constructor from file name.
270 *
271 * @param lockFile Name of lock file
272 * @see FileDescriptor
273 */
274 BSDFileMutex(std::string const & lockFile);
275
276 /** @brief Constructor from file descriptor.
277 *
278 * @param fd Opened file descriptor
279 * @see FileDescriptor
280 */
281 BSDFileMutex(int fd);
282
283 /** @name Standard mutex methods.
284 * @{ */
285 bool tryEnterMutex() throw();
286 void enterMutex();
287 void leaveMutex();
288 /** @} */
289 };
290 #endif
291
292
293 /** @brief File system information abstraction.
294 *
295 * @note All methods always return (amounts of) 1024 byte
296 * blocks. Calculation is done via float for simplicity -- minor
297 * rounding errors may occur.
298 */
299 class FsInfo
300 {
301 private:
302 uint64_t calc(long double const & value) const;
303
304 public:
305 FsInfo(std::string const & dev, std::string const & file);
306
307 uint64_t getTotal() const;
308 uint64_t getAvail() const;
309 uint64_t getFree() const;
310 uint64_t getUsed() const;
311
312 private:
313 long double bSize_;
314 long double bTotal_;
315 long double bAvail_;
316 long double bFree_;
317 };
318
319 }}
320 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "GetOpt.hpp"
5
6 // STDC++
7 #include <iostream>
8 #include <algorithm>
9 #include <cassert>
10
11 // C++ Libraries
12 #include <ui-utilcpp/Misc.hpp>
13
14 namespace UI {
15 namespace Util {
16
17 //
18 // CLOption
19 //
20 CLOption::CLOption(std::string const & nameLong, char nameShort, std::string const & doc, std::string const & defaultArg)
21 :nameLong_(nameLong)
22 ,nameShort_(nameShort)
23 ,doc_(doc)
24 ,isGiven_(false)
25 ,arg_("")
26 ,defaultArg_(defaultArg)
27 {}
28
29 CLOption::~CLOption()
30 {}
31
32 std::string CLOption::getNameLong() const
33 {
34 return nameLong_;
35 }
36
37 char CLOption::getNameShort() const
38 {
39 return nameShort_;
40 }
41
42 std::string CLOption::getDoc() const
43 {
44 return doc_;
45 }
46
47 bool CLOption::isGiven() const
48 {
49 return isGiven_;
50 }
51
52 std::string CLOption::getArg() const
53 {
54 return isGiven() ? arg_ : defaultArg_;
55 }
56
57 option * CLOption::getCOptLong(option * opt) const
58 {
59 assert(opt);
60
61 // Generate a GNU C long option from values. Compare "getopt.h".
62 opt->name = nameLong_.c_str();
63 opt->has_arg = 0; // No args
64 opt->flag = 0; // This is evil, we do not use it
65 opt->val = nameShort_;
66 return opt;
67 }
68
69 std::string CLOption::getCOptShort() const
70 {
71 std::string res (1, nameShort_);
72 return res;
73 }
74
75 void CLOption::printUsage() const
76 {
77 std::cout << "--" << nameLong_ << ", -" << nameShort_ << std::endl;
78 std::cout << " " << doc_ << std::endl;
79 }
80
81 void CLOption::setGiven(std::string const & arg)
82 {
83 isGiven_ = true;
84 arg_ = arg;
85 }
86
87
88 ////////////////////////////////////////////////////////////////////////
89 // CLOptionArg Declarations
90 //
91 CLOptionArg::CLOptionArg(std::string const & nameLong, char nameShort, std::string const & doc, std::string const & defaultArg)
92 :CLOption(nameLong, nameShort, doc, defaultArg)
93 {}
94
95 std::string CLOptionArg::getCOptShort() const
96 {
97 std::string res (1, getNameShort());
98 return res + ":";
99 }
100
101 option * CLOptionArg::getCOptLong (option * opt) const
102 {
103 assert(opt);
104 CLOption::getCOptLong (opt);
105 opt->has_arg = 1; // Argument is mandatory
106 return opt;
107 }
108
109 void CLOptionArg::printUsage() const
110 {
111 std::cout << "--" << getNameLong() << "=<argument>, -" << getNameShort() << "<argument>";
112 if (!defaultArg_.empty())
113 {
114 std::cout << " :: defaults to \"" << defaultArg_ << "\"" << std::endl;
115 }
116 else
117 {
118 std::cout << std::endl;
119 }
120 std::cout << " " << getDoc() << std::endl;
121 }
122
123 ////////////////////////////////////////////////////////////////////////
124 // CLOptionOptArg Declarations
125 //
126 CLOptionOptArg::CLOptionOptArg(std::string const & nameLong, char nameShort, std::string const & doc, std::string const & defaultArg)
127 :CLOption(nameLong, nameShort, doc, defaultArg)
128 {}
129
130 std::string CLOptionOptArg::getCOptShort() const
131 {
132 std::string res (1, getNameShort());
133 return res + "::";
134 }
135
136 option * CLOptionOptArg::getCOptLong (option * opt) const
137 {
138 assert (opt);
139 CLOption::getCOptLong(opt);
140 opt->has_arg = 2; // Argument is optional
141 return opt;
142 }
143
144 void CLOptionOptArg::printUsage() const
145 {
146 std::cout << "--" << getNameLong() << "[=<argument>], -" << getNameShort() << "[<argument>]";
147 if (!defaultArg_.empty())
148 {
149 std::cout << " :: defaults to \"" << defaultArg_ << "\"" << std::endl;
150 }
151 else
152 {
153 std::cout << std::endl;
154 }
155 std::cout << " " << getDoc() << std::endl;
156 }
157
158 ////////////////////////////////////////////////////////////////////////
159 // GetOpt Declarations
160 //
161 GetOpt::GetOpt(int argc, char * const * const argv)
162 :argc_(argc)
163 ,argv_(argv)
164 ,isValid_(false)
165 ,isParsed_(false)
166 {}
167
168 GetOpt::~GetOpt()
169 {
170 UI::Util::delAnySeqContainer<CLOption>(opts_);
171 }
172
173 GetOpt & GetOpt::set(std::string const & nameLong, char nameShort, Type type, std::string const & doc, std::string const & defaultArg)
174 {
175 assert(!isParsed_);
176 CLOption * newOpt = 0;
177 switch(type)
178 {
179 case NoArg_:
180 newOpt = new CLOption(nameLong, nameShort, doc, defaultArg);
181 break;
182 case OptArg_:
183 newOpt = new CLOptionOptArg(nameLong, nameShort, doc, defaultArg);
184 break;
185 case Arg_:
186 newOpt = new CLOptionArg(nameLong, nameShort, doc, defaultArg);
187 break;
188 }
189 assert(newOpt);
190 opts_.push_back(newOpt);
191
192 return *this;
193 }
194
195 CLOption * GetOpt::get(char nameShort)
196 {
197 if (! isParsed_)
198 {
199 parse();
200 }
201 CLOption * result = 0;
202
203 for (std::vector < CLOption * >::iterator i=opts_.begin(); i != opts_.end(); i++)
204 {
205 CLOption *co = *i;
206 if (co->getNameShort() == nameShort)
207 {
208 result = co;
209 continue;
210 }
211 }
212 assert(result);
213 return result;
214 }
215
216 CLOption * GetOpt::get(std::string const & nameLong)
217 {
218 if (!isParsed_)
219 {
220 parse();
221 }
222 CLOption * result = 0;
223 for (std::vector < CLOption * >::iterator i=opts_.begin(); i != opts_.end(); i++)
224 {
225 CLOption *co = *i;
226 if (co->getNameLong() == nameLong)
227 {
228 result = co;
229 continue;
230 }
231 }
232 assert(result);
233 return result;
234 }
235
236 void GetOpt::parse()
237 {
238 isParsed_ = true;
239 isValid_ = true;
240 // Generate long and short opts as needed by getopt_long(3)
241 const int s(opts_.size() + 1);
242 std::vector<struct option> gnucLongOpts(s);
243 std::string gnucShortOpts;
244
245 unsigned int j(0);
246 for (std::vector <CLOption *>::const_iterator i(opts_.begin()); i != opts_.end(); i++)
247 {
248 assert(j < opts_.size());
249 // Longopts
250 CLOption *co = *i;
251 co->getCOptLong(&gnucLongOpts[j]);
252 // ShortOpts
253 gnucShortOpts += co->getCOptShort();
254 ++j;
255 };
256 // Finish gnuc long opts with end struct
257 const struct option endOpt = { 0, 0, 0, 0 };
258 gnucLongOpts[j] = endOpt;
259
260 // This Loop will parse arguments, and set option objects accordingly
261 int opt;
262 int option_index;
263 while ((opt = getopt_long (argc_, argv_, gnucShortOpts.c_str(), (struct option *) &gnucLongOpts[0], &option_index)) != -1)
264 {
265 if (opt == '?')
266 {
267 isValid_ = false;
268 }
269 else
270 {
271 for (std::vector < CLOption * >::iterator i = opts_.begin(); i != opts_.end(); i++)
272 {
273 CLOption *co = *i;
274 if (co->getNameShort() == opt)
275 {
276 co->setGiven (std::string(optarg == 0 ? "" : optarg));
277 }
278 }
279 }
280 }
281 }
282
283 bool GetOpt::isValid()
284 {
285 if (!isParsed_)
286 {
287 parse();
288 }
289 return isValid_;
290 }
291
292 int GetOpt::wrongUsage(std::string const & reason, std::string const & title) const
293 {
294 std::cerr << "\nWrong usage: " << reason << "." << std::endl;
295 printUsage(title);
296 return 1;
297 }
298
299 void GetOpt::printUsage(std::string const & title) const
300 {
301 std::cout << title;
302 std::for_each(opts_.begin(), opts_.end(), std::mem_fun(&CLOption::printUsage));
303 }
304
305 }}
0 /**
1 * @file GetOpt.hpp
2 * @author Schlund + Partner AG
3 * @brief Abstraction of GNU C "getopt_long(3)".
4 * @deprecated Leagcy - don't use this for new code -- use boost::program_options instead.
5 *
6 * Synopsis:
7 *
8 * @code
9 * #include <ui-utilcpp/GetOpt.hpp>
10 * @endcode
11 *
12 * Notes:
13 * - A "command line option" has the form "--<nameLong>=<arg>" or "-<nameShort> <arg>".
14 * - Arg can be optional.
15 * - Parser used is GNU getoptAlong.
16 *
17 * Limitations / todos:
18 * - Currently, all c.l.options MUST have a short _and_ a long option.
19 *
20 * Usage (informal):
21 * - GetOpt getOpt(argc, argv)
22 * - { getOpt.set(...) }
23 *
24 * - CLOption * opt0(getOpt.get("version" | 'v'))
25 *
26 * - getOpt.isValid(), opt0->isGiven(), ...
27 */
28 #ifndef UI_UTIL_GETOPT_HPP
29 #define UI_UTIL_GETOPT_HPP
30
31 /**
32 * @example GetOpt.cpp
33 * Simple test program for GetOpt.
34 * Binary should be installed as ui-utilcpp-getopt.
35 */
36
37 // STDC++
38 #include <string>
39 #include <vector>
40
41 // SYSTEM C
42 #include <getopt.h> // GNU
43
44 namespace UI {
45 namespace Util {
46
47 /** @brief Most general class for a command line option. Use this class for a option without argument.
48 * @deprecated Leagcy - don't use this for new code -- use boost::program_options instead.
49 */
50 class CLOption
51 {
52 public:
53 /** @brief Standard constructor. Normally, you would not use this directly, but rather use GetOpt::set.
54 *
55 * @param nameLong Long name of the option; e.g. "version".
56 * @param nameShort Short name (one character) of the option; e.g. 'v'.
57 * @param doc Documentation string for this option; e.g. "Show version information".
58 * @param defaultArg Default value for that option.
59 */
60 CLOption(std::string const & nameLong, char nameShort, std::string const & doc = "No documentation for this option.", std::string const & defaultArg="");
61
62 /** */
63 virtual ~CLOption();
64
65 /** @brief Get the long name.
66 *
67 * @return Long name of this option.
68 */
69 std::string getNameLong() const;
70
71 /** @brief Get the short name.
72 *
73 * @return Short name of this option.
74 */
75 char getNameShort() const;
76
77 /** @brief Get the documentation.
78 *
79 * @return Documentation string of this option.
80 */
81 std::string getDoc() const;
82
83 /** @brief Check if this option was given.
84 *
85 * @result true, if argument was given, else false. This must be set manually via setGiven() (GetOpt automates this).
86 */
87 bool isGiven() const;
88
89 /** @brief Get argument given with this option.
90 *
91 * @result Argument, if any; zero-length string for none. This must be set manually via setGiven() (GetOpt automates this).
92 */
93 std::string getArg() const;
94
95 /** @brief Print usage information for this option. */
96 virtual void printUsage() const;
97
98 /** @brief Get GNU getopt_long(3) represention of this option.
99 *
100 * @return Corresponding option struct for GNU getopt_long(3).
101 */
102 virtual option * getCOptLong(option * opt) const;
103
104 /** @brief Get GNU getopt(3) represention of this option.
105 *
106 * @return Corresponding "optstr" for getopt(3).
107 */
108 virtual std::string getCOptShort() const;
109
110 /** @brief Mark this option as "given", and optionally set the argument.
111 *
112 * @param arg Argument string to set this option to.
113 */
114 virtual void setGiven(std::string const & arg="");
115
116 protected:
117
118 private:
119 // Attributes set when initialized
120 std::string const nameLong_; /** Long option */
121 char const nameShort_; /** Short option */
122 std::string const doc_; /** Option documentation */
123
124 // Attributes set when parsed
125 bool isGiven_; /** Option given */
126 std::string arg_; /** Option argument */
127
128 protected:
129 std::string const defaultArg_; /** Default option argument */
130 };
131
132
133 /** @brief Class representing a command line option with mandatory argument. */
134 class CLOptionArg: public CLOption
135 {
136 public:
137 /** @brief Standard constructor.
138 *
139 * @see CLOption::CLOption.
140 */
141 CLOptionArg(std::string const & nameLong, char nameShort, std::string const & doc = "No documentation for this option.", std::string const & defaultArg="");
142 virtual void printUsage() const;
143 virtual option * getCOptLong(option * opt) const;
144 virtual std::string getCOptShort() const;
145 };
146
147 /** @brief Class representing a command line option with optional argument. */
148 class CLOptionOptArg : public CLOption
149 {
150 public:
151 /** @brief Standard constructor.
152 *
153 * @see CLOption::CLOption.
154 */
155 CLOptionOptArg(std::string const & nameLong, char nameShort, std::string const & doc = "No documentation for this option.", std::string const & defaultArg="");
156
157 virtual void printUsage() const;
158 virtual option * getCOptLong(option * opt) const;
159 virtual std::string getCOptShort() const;
160 };
161
162
163 /** @brief Abstraction class for GNU getopt_long(3).
164 *
165 * Use this rather than the CLOption*-Classes directly.
166 *
167 * @deprecated Leagcy - don't use this for new code -- use boost::program_options instead.
168 */
169 class GetOpt
170 {
171 public:
172 /** @brief All three possible types of CLOption* Classes.
173 *
174 * In normal use, you would use this in set(), who then choses what type of object
175 * to create. Use "NOARG" for CLOption, "ARG" for CLOptionArg and "OPTARG" for CLOptionOptArg.
176 * @see set()
177 */
178 enum Type {NoArg_, Arg_, OptArg_};
179
180 /** @brief Standard constructor.
181 *
182 * @param argc Number of arguments (first argument of main() function).
183 * @param argv Array of arguments (second argument of main() function).
184 */
185 GetOpt(int argc, char * const * const argv);
186
187 /** @brief Standard destructor. */
188 ~GetOpt();
189
190 /** @brief Introduce a new option.
191 *
192 * @param nameLong Long name of the option; e.g. "version".
193 * @param nameShort Short name (one character) of the option; e.g. 'v'.
194 * @param type Type of the option (NOARG, ARG, OPTARG); e.g. "NOARG".
195 * @param doc Documentaion for this option; e.g. "Show version information".
196 * @param defaultArg Default value for that option.
197 */
198 GetOpt & set(std::string const & nameLong, char nameShort, Type type,
199 std::string const & doc = "No documentation for this option.", std::string const & defaultArg="");
200
201 /** @brief Get an option object from short name.
202 *
203 * The pointer is valid as long as the GetOpt object stays alive.
204 * This will implicitely parse the command line options, if not already done.
205 *
206 * @param nameShort Short name (one character) of the option; e.g. 'v'.
207 */
208 CLOption * get(char nameShort);
209
210 /** @brief Get an option object from long name.
211 *
212 * @param nameLong Long name of the option; e.g. "version".
213 */
214 CLOption * get(std::string const & nameLong);
215
216 /** @brief Prints out Usage information to cout (stdout).
217 *
218 * @param title Print this text before usage information.
219 */
220 void printUsage(std::string const & title="\nUsage:\n\n") const;
221
222 /** @brief Helper.
223 *
224 * Prints out an error text to cerr, prints usage to cout
225 * and always returns 1 (suitable as program exit code).
226 * @param reason Explanatory error text.
227 * @param title Print this text before usage information.
228 */
229 int wrongUsage(std::string const & reason, std::string const & title="\nUsage:\n\n") const;
230
231 /** @brief Check if given command line arguments are "well-formed".
232 *
233 * @note GNU getopt_long(3) will print error messages to stderr, if
234 * the given arguments are not valid.
235 *
236 * @return true if valid, else false.
237 */
238 bool isValid();
239
240 private:
241 int const argc_;
242 char * const * const argv_;
243
244 std::vector<CLOption *> opts_;
245
246 void parse();
247
248 bool isValid_;
249 bool isParsed_;
250 };
251
252 }}
253 #endif
0 /**
1 * @file
2 * @brief Include this for all HTTP related things.
3 */
4 #ifndef UI_UTIL_HTTP_HPP
5 #define UI_UTIL_HTTP_HPP
6
7 #include <ui-utilcpp/http/Cookie.hpp>
8 #include <ui-utilcpp/http/Header.hpp>
9 #include <ui-utilcpp/http/Connection.hpp>
10 #include <ui-utilcpp/http/URL.hpp>
11
12 #endif
0 AM_CPPFLAGS = -I$(top_srcdir)/src
1 AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS)
2
3 SUBDIRS = http
4 EXTRA_DIST=ascmagic.c
5
6 incdir = $(includedir)/$(PACKAGE)
7 inc_HEADERS = \
8 CmdLine.hpp \
9 Exception.hpp \
10 Sys.hpp \
11 File.hpp \
12 Socket.hpp \
13 GetOpt.hpp \
14 Misc.hpp \
15 QuotaInfo.hpp \
16 Recoder.hpp \
17 CharsetMagic.hpp \
18 SMLog.hpp SMLogMono.hpp SysLogMono.hpp \
19 Text.hpp \
20 PosixRegex.hpp \
21 Thread.hpp \
22 Time.hpp \
23 Cap.hpp \
24 \
25 Http.hpp Shortcuts.hpp
26
27 lib_LTLIBRARIES = libui-utilcpp.la
28 libui_utilcpp_la_SOURCES = \
29 CmdLine.cpp \
30 Exception.cpp \
31 Sys.cpp \
32 File.cpp \
33 Socket.cpp \
34 GetOpt.cpp \
35 Misc.cpp \
36 QuotaInfo.cpp \
37 Recoder.cpp \
38 CharsetMagic.cpp \
39 SysLogMono.cpp \
40 Text.cpp \
41 PosixRegex.cpp \
42 Thread.cpp \
43 Time.cpp \
44 Cap.cpp
45
46 libui_utilcpp_la_LIBADD = http/libui-utilcpp-http.la $(OST_CXXX2_LIBS) -lpthread -lrpcsvc
47 libui_utilcpp_la_LDFLAGS = -version-info @SO_VERSION@
0 # Makefile.in generated by automake 1.14.1 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 VPATH = @srcdir@
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
31 case $$MAKEFLAGS in \
32 *\\[\ \ ]*) \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
36 esac; \
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
63 pkgdatadir = $(datadir)/@PACKAGE@
64 pkgincludedir = $(includedir)/@PACKAGE@
65 pkglibdir = $(libdir)/@PACKAGE@
66 pkglibexecdir = $(libexecdir)/@PACKAGE@
67 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
68 install_sh_DATA = $(install_sh) -c -m 644
69 install_sh_PROGRAM = $(install_sh) -c
70 install_sh_SCRIPT = $(install_sh) -c
71 INSTALL_HEADER = $(INSTALL_DATA)
72 transform = $(program_transform_name)
73 NORMAL_INSTALL = :
74 PRE_INSTALL = :
75 POST_INSTALL = :
76 NORMAL_UNINSTALL = :
77 PRE_UNINSTALL = :
78 POST_UNINSTALL = :
79 build_triplet = @build@
80 host_triplet = @host@
81 subdir = src/ui-utilcpp
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp $(inc_HEADERS)
84 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
85 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
86 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
87 $(ACLOCAL_M4)
88 mkinstalldirs = $(install_sh) -d
89 CONFIG_HEADER = $(top_builddir)/config.h
90 CONFIG_CLEAN_FILES =
91 CONFIG_CLEAN_VPATH_FILES =
92 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
93 am__vpath_adj = case $$p in \
94 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
95 *) f=$$p;; \
96 esac;
97 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
98 am__install_max = 40
99 am__nobase_strip_setup = \
100 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
101 am__nobase_strip = \
102 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
103 am__nobase_list = $(am__nobase_strip_setup); \
104 for p in $$list; do echo "$$p $$p"; done | \
105 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
106 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
107 if (++n[$$2] == $(am__install_max)) \
108 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
109 END { for (dir in files) print dir, files[dir] }'
110 am__base_list = \
111 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
112 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
113 am__uninstall_files_from_dir = { \
114 test -z "$$files" \
115 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
116 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
117 $(am__cd) "$$dir" && rm -f $$files; }; \
118 }
119 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(incdir)"
120 LTLIBRARIES = $(lib_LTLIBRARIES)
121 am__DEPENDENCIES_1 =
122 libui_utilcpp_la_DEPENDENCIES = http/libui-utilcpp-http.la \
123 $(am__DEPENDENCIES_1)
124 am_libui_utilcpp_la_OBJECTS = CmdLine.lo Exception.lo Sys.lo File.lo \
125 Socket.lo GetOpt.lo Misc.lo QuotaInfo.lo Recoder.lo \
126 CharsetMagic.lo SysLogMono.lo Text.lo PosixRegex.lo Thread.lo \
127 Time.lo Cap.lo
128 libui_utilcpp_la_OBJECTS = $(am_libui_utilcpp_la_OBJECTS)
129 AM_V_lt = $(am__v_lt_@AM_V@)
130 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
131 am__v_lt_0 = --silent
132 am__v_lt_1 =
133 libui_utilcpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
134 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
135 $(AM_CXXFLAGS) $(CXXFLAGS) $(libui_utilcpp_la_LDFLAGS) \
136 $(LDFLAGS) -o $@
137 AM_V_P = $(am__v_P_@AM_V@)
138 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
139 am__v_P_0 = false
140 am__v_P_1 = :
141 AM_V_GEN = $(am__v_GEN_@AM_V@)
142 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
143 am__v_GEN_0 = @echo " GEN " $@;
144 am__v_GEN_1 =
145 AM_V_at = $(am__v_at_@AM_V@)
146 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
147 am__v_at_0 = @
148 am__v_at_1 =
149 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
150 depcomp = $(SHELL) $(top_srcdir)/depcomp
151 am__depfiles_maybe = depfiles
152 am__mv = mv -f
153 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
154 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
155 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
156 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
157 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
158 $(AM_CXXFLAGS) $(CXXFLAGS)
159 AM_V_CXX = $(am__v_CXX_@AM_V@)
160 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
161 am__v_CXX_0 = @echo " CXX " $@;
162 am__v_CXX_1 =
163 CXXLD = $(CXX)
164 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
165 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
166 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
167 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
168 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
169 am__v_CXXLD_0 = @echo " CXXLD " $@;
170 am__v_CXXLD_1 =
171 SOURCES = $(libui_utilcpp_la_SOURCES)
172 DIST_SOURCES = $(libui_utilcpp_la_SOURCES)
173 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
174 ctags-recursive dvi-recursive html-recursive info-recursive \
175 install-data-recursive install-dvi-recursive \
176 install-exec-recursive install-html-recursive \
177 install-info-recursive install-pdf-recursive \
178 install-ps-recursive install-recursive installcheck-recursive \
179 installdirs-recursive pdf-recursive ps-recursive \
180 tags-recursive uninstall-recursive
181 am__can_run_installinfo = \
182 case $$AM_UPDATE_INFO_DIR in \
183 n|no|NO) false;; \
184 *) (install-info --version) >/dev/null 2>&1;; \
185 esac
186 HEADERS = $(inc_HEADERS)
187 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
188 distclean-recursive maintainer-clean-recursive
189 am__recursive_targets = \
190 $(RECURSIVE_TARGETS) \
191 $(RECURSIVE_CLEAN_TARGETS) \
192 $(am__extra_recursive_targets)
193 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
194 distdir
195 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
196 # Read a list of newline-separated strings from the standard input,
197 # and print each of them once, without duplicates. Input order is
198 # *not* preserved.
199 am__uniquify_input = $(AWK) '\
200 BEGIN { nonempty = 0; } \
201 { items[$$0] = 1; nonempty = 1; } \
202 END { if (nonempty) { for (i in items) print i; }; } \
203 '
204 # Make sure the list of sources is unique. This is necessary because,
205 # e.g., the same source file might be shared among _SOURCES variables
206 # for different programs/libraries.
207 am__define_uniq_tagged_files = \
208 list='$(am__tagged_files)'; \
209 unique=`for i in $$list; do \
210 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
211 done | $(am__uniquify_input)`
212 ETAGS = etags
213 CTAGS = ctags
214 DIST_SUBDIRS = $(SUBDIRS)
215 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
216 am__relativize = \
217 dir0=`pwd`; \
218 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
219 sed_rest='s,^[^/]*/*,,'; \
220 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
221 sed_butlast='s,/*[^/]*$$,,'; \
222 while test -n "$$dir1"; do \
223 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
224 if test "$$first" != "."; then \
225 if test "$$first" = ".."; then \
226 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
227 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
228 else \
229 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
230 if test "$$first2" = "$$first"; then \
231 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
232 else \
233 dir2="../$$dir2"; \
234 fi; \
235 dir0="$$dir0"/"$$first"; \
236 fi; \
237 fi; \
238 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
239 done; \
240 reldir="$$dir2"
241 ACLOCAL = @ACLOCAL@
242 AMTAR = @AMTAR@
243 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
244 AR = @AR@
245 AUTOCONF = @AUTOCONF@
246 AUTOHEADER = @AUTOHEADER@
247 AUTOMAKE = @AUTOMAKE@
248 AWK = @AWK@
249 CC = @CC@
250 CCDEPMODE = @CCDEPMODE@
251 CCGNU2_CONFIG = @CCGNU2_CONFIG@
252 CFLAGS = @CFLAGS@
253 CPP = @CPP@
254 CPPFLAGS = @CPPFLAGS@
255 CXX = @CXX@
256 CXXCPP = @CXXCPP@
257 CXXDEPMODE = @CXXDEPMODE@
258 CXXFLAGS = @CXXFLAGS@
259 CYGPATH_W = @CYGPATH_W@
260 DEFS = @DEFS@
261 DEPDIR = @DEPDIR@
262 DLLTOOL = @DLLTOOL@
263 DOXYGEN = @DOXYGEN@
264 DSYMUTIL = @DSYMUTIL@
265 DUMPBIN = @DUMPBIN@
266 ECHO_C = @ECHO_C@
267 ECHO_N = @ECHO_N@
268 ECHO_T = @ECHO_T@
269 EGREP = @EGREP@
270 EXEEXT = @EXEEXT@
271 EXTLIBS = @EXTLIBS@
272 FGREP = @FGREP@
273 GNULIBS = @GNULIBS@
274 GREP = @GREP@
275 INSTALL = @INSTALL@
276 INSTALL_DATA = @INSTALL_DATA@
277 INSTALL_PROGRAM = @INSTALL_PROGRAM@
278 INSTALL_SCRIPT = @INSTALL_SCRIPT@
279 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
280 LD = @LD@
281 LDFLAGS = @LDFLAGS@
282 LIBOBJS = @LIBOBJS@
283 LIBS = @LIBS@
284 LIBTOOL = @LIBTOOL@
285 LIPO = @LIPO@
286 LN_S = @LN_S@
287 LTLIBOBJS = @LTLIBOBJS@
288 MAKEINFO = @MAKEINFO@
289 MANIFEST_TOOL = @MANIFEST_TOOL@
290 MKDIR_P = @MKDIR_P@
291 NM = @NM@
292 NMEDIT = @NMEDIT@
293 OBJDUMP = @OBJDUMP@
294 OBJEXT = @OBJEXT@
295 OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@
296 OST_CXXX2_LIBS = @OST_CXXX2_LIBS@
297 OTOOL = @OTOOL@
298 OTOOL64 = @OTOOL64@
299 PACKAGE = @PACKAGE@
300 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
301 PACKAGE_NAME = @PACKAGE_NAME@
302 PACKAGE_STRING = @PACKAGE_STRING@
303 PACKAGE_TARNAME = @PACKAGE_TARNAME@
304 PACKAGE_URL = @PACKAGE_URL@
305 PACKAGE_VERSION = @PACKAGE_VERSION@
306 PATH_SEPARATOR = @PATH_SEPARATOR@
307 PERL = @PERL@
308 RANLIB = @RANLIB@
309 SED = @SED@
310 SET_MAKE = @SET_MAKE@
311 SHELL = @SHELL@
312 SINGLE_FLAGS = @SINGLE_FLAGS@
313 SINGLE_LIBS = @SINGLE_LIBS@
314 SO_VERSION = @SO_VERSION@
315 STRIP = @STRIP@
316 UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@
317 VERSION = @VERSION@
318 abs_builddir = @abs_builddir@
319 abs_srcdir = @abs_srcdir@
320 abs_top_builddir = @abs_top_builddir@
321 abs_top_srcdir = @abs_top_srcdir@
322 ac_ct_AR = @ac_ct_AR@
323 ac_ct_CC = @ac_ct_CC@
324 ac_ct_CXX = @ac_ct_CXX@
325 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
326 am__include = @am__include@
327 am__leading_dot = @am__leading_dot@
328 am__quote = @am__quote@
329 am__tar = @am__tar@
330 am__untar = @am__untar@
331 bindir = @bindir@
332 build = @build@
333 build_alias = @build_alias@
334 build_cpu = @build_cpu@
335 build_os = @build_os@
336 build_vendor = @build_vendor@
337 builddir = @builddir@
338 datadir = @datadir@
339 datarootdir = @datarootdir@
340 docdir = @docdir@
341 dvidir = @dvidir@
342 exec_prefix = @exec_prefix@
343 host = @host@
344 host_alias = @host_alias@
345 host_cpu = @host_cpu@
346 host_os = @host_os@
347 host_vendor = @host_vendor@
348 htmldir = @htmldir@
349 includedir = @includedir@
350 infodir = @infodir@
351 install_sh = @install_sh@
352 libdir = @libdir@
353 libexecdir = @libexecdir@
354 localedir = @localedir@
355 localstatedir = @localstatedir@
356 mandir = @mandir@
357 mkdir_p = @mkdir_p@
358 oldincludedir = @oldincludedir@
359 pdfdir = @pdfdir@
360 prefix = @prefix@
361 program_transform_name = @program_transform_name@
362 psdir = @psdir@
363 sbindir = @sbindir@
364 sharedstatedir = @sharedstatedir@
365 srcdir = @srcdir@
366 sysconfdir = @sysconfdir@
367 target_alias = @target_alias@
368 top_build_prefix = @top_build_prefix@
369 top_builddir = @top_builddir@
370 top_srcdir = @top_srcdir@
371 AM_CPPFLAGS = -I$(top_srcdir)/src
372 AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS)
373 SUBDIRS = http
374 EXTRA_DIST = ascmagic.c
375 incdir = $(includedir)/$(PACKAGE)
376 inc_HEADERS = \
377 CmdLine.hpp \
378 Exception.hpp \
379 Sys.hpp \
380 File.hpp \
381 Socket.hpp \
382 GetOpt.hpp \
383 Misc.hpp \
384 QuotaInfo.hpp \
385 Recoder.hpp \
386 CharsetMagic.hpp \
387 SMLog.hpp SMLogMono.hpp SysLogMono.hpp \
388 Text.hpp \
389 PosixRegex.hpp \
390 Thread.hpp \
391 Time.hpp \
392 Cap.hpp \
393 \
394 Http.hpp Shortcuts.hpp
395
396 lib_LTLIBRARIES = libui-utilcpp.la
397 libui_utilcpp_la_SOURCES = \
398 CmdLine.cpp \
399 Exception.cpp \
400 Sys.cpp \
401 File.cpp \
402 Socket.cpp \
403 GetOpt.cpp \
404 Misc.cpp \
405 QuotaInfo.cpp \
406 Recoder.cpp \
407 CharsetMagic.cpp \
408 SysLogMono.cpp \
409 Text.cpp \
410 PosixRegex.cpp \
411 Thread.cpp \
412 Time.cpp \
413 Cap.cpp
414
415 libui_utilcpp_la_LIBADD = http/libui-utilcpp-http.la $(OST_CXXX2_LIBS) -lpthread -lrpcsvc
416 libui_utilcpp_la_LDFLAGS = -version-info @SO_VERSION@
417 all: all-recursive
418
419 .SUFFIXES:
420 .SUFFIXES: .cpp .lo .o .obj
421 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
422 @for dep in $?; do \
423 case '$(am__configure_deps)' in \
424 *$$dep*) \
425 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
426 && { if test -f $@; then exit 0; else break; fi; }; \
427 exit 1;; \
428 esac; \
429 done; \
430 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ui-utilcpp/Makefile'; \
431 $(am__cd) $(top_srcdir) && \
432 $(AUTOMAKE) --gnu src/ui-utilcpp/Makefile
433 .PRECIOUS: Makefile
434 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
435 @case '$?' in \
436 *config.status*) \
437 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
438 *) \
439 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
440 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
441 esac;
442
443 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
444 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
445
446 $(top_srcdir)/configure: $(am__configure_deps)
447 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
448 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
449 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
450 $(am__aclocal_m4_deps):
451
452 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
453 @$(NORMAL_INSTALL)
454 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
455 list2=; for p in $$list; do \
456 if test -f $$p; then \
457 list2="$$list2 $$p"; \
458 else :; fi; \
459 done; \
460 test -z "$$list2" || { \
461 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
462 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
463 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
464 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
465 }
466
467 uninstall-libLTLIBRARIES:
468 @$(NORMAL_UNINSTALL)
469 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
470 for p in $$list; do \
471 $(am__strip_dir) \
472 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
473 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
474 done
475
476 clean-libLTLIBRARIES:
477 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
478 @list='$(lib_LTLIBRARIES)'; \
479 locs=`for p in $$list; do echo $$p; done | \
480 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
481 sort -u`; \
482 test -z "$$locs" || { \
483 echo rm -f $${locs}; \
484 rm -f $${locs}; \
485 }
486
487 libui-utilcpp.la: $(libui_utilcpp_la_OBJECTS) $(libui_utilcpp_la_DEPENDENCIES) $(EXTRA_libui_utilcpp_la_DEPENDENCIES)
488 $(AM_V_CXXLD)$(libui_utilcpp_la_LINK) -rpath $(libdir) $(libui_utilcpp_la_OBJECTS) $(libui_utilcpp_la_LIBADD) $(LIBS)
489
490 mostlyclean-compile:
491 -rm -f *.$(OBJEXT)
492
493 distclean-compile:
494 -rm -f *.tab.c
495
496 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cap.Plo@am__quote@
497 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CharsetMagic.Plo@am__quote@
498 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmdLine.Plo@am__quote@
499 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Exception.Plo@am__quote@
500 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/File.Plo@am__quote@
501 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetOpt.Plo@am__quote@
502 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Misc.Plo@am__quote@
503 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PosixRegex.Plo@am__quote@
504 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QuotaInfo.Plo@am__quote@
505 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Recoder.Plo@am__quote@
506 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Socket.Plo@am__quote@
507 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sys.Plo@am__quote@
508 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SysLogMono.Plo@am__quote@
509 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Text.Plo@am__quote@
510 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Thread.Plo@am__quote@
511 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Time.Plo@am__quote@
512
513 .cpp.o:
514 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
515 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
516 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
517 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
518 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
519
520 .cpp.obj:
521 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
522 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
523 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
524 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
525 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
526
527 .cpp.lo:
528 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
529 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
530 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
531 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
532 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
533
534 mostlyclean-libtool:
535 -rm -f *.lo
536
537 clean-libtool:
538 -rm -rf .libs _libs
539 install-incHEADERS: $(inc_HEADERS)
540 @$(NORMAL_INSTALL)
541 @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \
542 if test -n "$$list"; then \
543 echo " $(MKDIR_P) '$(DESTDIR)$(incdir)'"; \
544 $(MKDIR_P) "$(DESTDIR)$(incdir)" || exit 1; \
545 fi; \
546 for p in $$list; do \
547 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
548 echo "$$d$$p"; \
549 done | $(am__base_list) | \
550 while read files; do \
551 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(incdir)'"; \
552 $(INSTALL_HEADER) $$files "$(DESTDIR)$(incdir)" || exit $$?; \
553 done
554
555 uninstall-incHEADERS:
556 @$(NORMAL_UNINSTALL)
557 @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \
558 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
559 dir='$(DESTDIR)$(incdir)'; $(am__uninstall_files_from_dir)
560
561 # This directory's subdirectories are mostly independent; you can cd
562 # into them and run 'make' without going through this Makefile.
563 # To change the values of 'make' variables: instead of editing Makefiles,
564 # (1) if the variable is set in 'config.status', edit 'config.status'
565 # (which will cause the Makefiles to be regenerated when you run 'make');
566 # (2) otherwise, pass the desired values on the 'make' command line.
567 $(am__recursive_targets):
568 @fail=; \
569 if $(am__make_keepgoing); then \
570 failcom='fail=yes'; \
571 else \
572 failcom='exit 1'; \
573 fi; \
574 dot_seen=no; \
575 target=`echo $@ | sed s/-recursive//`; \
576 case "$@" in \
577 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
578 *) list='$(SUBDIRS)' ;; \
579 esac; \
580 for subdir in $$list; do \
581 echo "Making $$target in $$subdir"; \
582 if test "$$subdir" = "."; then \
583 dot_seen=yes; \
584 local_target="$$target-am"; \
585 else \
586 local_target="$$target"; \
587 fi; \
588 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
589 || eval $$failcom; \
590 done; \
591 if test "$$dot_seen" = "no"; then \
592 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
593 fi; test -z "$$fail"
594
595 ID: $(am__tagged_files)
596 $(am__define_uniq_tagged_files); mkid -fID $$unique
597 tags: tags-recursive
598 TAGS: tags
599
600 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
601 set x; \
602 here=`pwd`; \
603 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
604 include_option=--etags-include; \
605 empty_fix=.; \
606 else \
607 include_option=--include; \
608 empty_fix=; \
609 fi; \
610 list='$(SUBDIRS)'; for subdir in $$list; do \
611 if test "$$subdir" = .; then :; else \
612 test ! -f $$subdir/TAGS || \
613 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
614 fi; \
615 done; \
616 $(am__define_uniq_tagged_files); \
617 shift; \
618 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
619 test -n "$$unique" || unique=$$empty_fix; \
620 if test $$# -gt 0; then \
621 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
622 "$$@" $$unique; \
623 else \
624 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
625 $$unique; \
626 fi; \
627 fi
628 ctags: ctags-recursive
629
630 CTAGS: ctags
631 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
632 $(am__define_uniq_tagged_files); \
633 test -z "$(CTAGS_ARGS)$$unique" \
634 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
635 $$unique
636
637 GTAGS:
638 here=`$(am__cd) $(top_builddir) && pwd` \
639 && $(am__cd) $(top_srcdir) \
640 && gtags -i $(GTAGS_ARGS) "$$here"
641 cscopelist: cscopelist-recursive
642
643 cscopelist-am: $(am__tagged_files)
644 list='$(am__tagged_files)'; \
645 case "$(srcdir)" in \
646 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
647 *) sdir=$(subdir)/$(srcdir) ;; \
648 esac; \
649 for i in $$list; do \
650 if test -f "$$i"; then \
651 echo "$(subdir)/$$i"; \
652 else \
653 echo "$$sdir/$$i"; \
654 fi; \
655 done >> $(top_builddir)/cscope.files
656
657 distclean-tags:
658 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
659
660 distdir: $(DISTFILES)
661 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
662 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
663 list='$(DISTFILES)'; \
664 dist_files=`for file in $$list; do echo $$file; done | \
665 sed -e "s|^$$srcdirstrip/||;t" \
666 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
667 case $$dist_files in \
668 */*) $(MKDIR_P) `echo "$$dist_files" | \
669 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
670 sort -u` ;; \
671 esac; \
672 for file in $$dist_files; do \
673 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
674 if test -d $$d/$$file; then \
675 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
676 if test -d "$(distdir)/$$file"; then \
677 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
678 fi; \
679 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
680 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
681 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
682 fi; \
683 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
684 else \
685 test -f "$(distdir)/$$file" \
686 || cp -p $$d/$$file "$(distdir)/$$file" \
687 || exit 1; \
688 fi; \
689 done
690 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
691 if test "$$subdir" = .; then :; else \
692 $(am__make_dryrun) \
693 || test -d "$(distdir)/$$subdir" \
694 || $(MKDIR_P) "$(distdir)/$$subdir" \
695 || exit 1; \
696 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
697 $(am__relativize); \
698 new_distdir=$$reldir; \
699 dir1=$$subdir; dir2="$(top_distdir)"; \
700 $(am__relativize); \
701 new_top_distdir=$$reldir; \
702 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
703 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
704 ($(am__cd) $$subdir && \
705 $(MAKE) $(AM_MAKEFLAGS) \
706 top_distdir="$$new_top_distdir" \
707 distdir="$$new_distdir" \
708 am__remove_distdir=: \
709 am__skip_length_check=: \
710 am__skip_mode_fix=: \
711 distdir) \
712 || exit 1; \
713 fi; \
714 done
715 check-am: all-am
716 check: check-recursive
717 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
718 installdirs: installdirs-recursive
719 installdirs-am:
720 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(incdir)"; do \
721 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
722 done
723 install: install-recursive
724 install-exec: install-exec-recursive
725 install-data: install-data-recursive
726 uninstall: uninstall-recursive
727
728 install-am: all-am
729 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
730
731 installcheck: installcheck-recursive
732 install-strip:
733 if test -z '$(STRIP)'; then \
734 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
735 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
736 install; \
737 else \
738 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
739 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
740 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
741 fi
742 mostlyclean-generic:
743
744 clean-generic:
745
746 distclean-generic:
747 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
748 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
749
750 maintainer-clean-generic:
751 @echo "This command is intended for maintainers to use"
752 @echo "it deletes files that may require special tools to rebuild."
753 clean: clean-recursive
754
755 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
756 mostlyclean-am
757
758 distclean: distclean-recursive
759 -rm -rf ./$(DEPDIR)
760 -rm -f Makefile
761 distclean-am: clean-am distclean-compile distclean-generic \
762 distclean-tags
763
764 dvi: dvi-recursive
765
766 dvi-am:
767
768 html: html-recursive
769
770 html-am:
771
772 info: info-recursive
773
774 info-am:
775
776 install-data-am: install-incHEADERS
777
778 install-dvi: install-dvi-recursive
779
780 install-dvi-am:
781
782 install-exec-am: install-libLTLIBRARIES
783
784 install-html: install-html-recursive
785
786 install-html-am:
787
788 install-info: install-info-recursive
789
790 install-info-am:
791
792 install-man:
793
794 install-pdf: install-pdf-recursive
795
796 install-pdf-am:
797
798 install-ps: install-ps-recursive
799
800 install-ps-am:
801
802 installcheck-am:
803
804 maintainer-clean: maintainer-clean-recursive
805 -rm -rf ./$(DEPDIR)
806 -rm -f Makefile
807 maintainer-clean-am: distclean-am maintainer-clean-generic
808
809 mostlyclean: mostlyclean-recursive
810
811 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
812 mostlyclean-libtool
813
814 pdf: pdf-recursive
815
816 pdf-am:
817
818 ps: ps-recursive
819
820 ps-am:
821
822 uninstall-am: uninstall-incHEADERS uninstall-libLTLIBRARIES
823
824 .MAKE: $(am__recursive_targets) install-am install-strip
825
826 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
827 check-am clean clean-generic clean-libLTLIBRARIES \
828 clean-libtool cscopelist-am ctags ctags-am distclean \
829 distclean-compile distclean-generic distclean-libtool \
830 distclean-tags distdir dvi dvi-am html html-am info info-am \
831 install install-am install-data install-data-am install-dvi \
832 install-dvi-am install-exec install-exec-am install-html \
833 install-html-am install-incHEADERS install-info \
834 install-info-am install-libLTLIBRARIES install-man install-pdf \
835 install-pdf-am install-ps install-ps-am install-strip \
836 installcheck installcheck-am installdirs installdirs-am \
837 maintainer-clean maintainer-clean-generic mostlyclean \
838 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
839 pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
840 uninstall-incHEADERS uninstall-libLTLIBRARIES
841
842
843 # Tell versions [3.59,3.63) of GNU make to not export all variables.
844 # Otherwise a system limit (for SysV at least) may be exceeded.
845 .NOEXPORT:
0 #include "config.h"
1
2 // Implementation
3 #include "Misc.hpp"
4
5 // Local
6 #include "Text.hpp"
7
8 namespace UI {
9 namespace Util {
10
11 std::string realpath(std::string const & path)
12 {
13 char buffer[PATH_MAX];
14 Sys::realpath(path.c_str(), buffer);
15 return std::string(buffer);
16 }
17
18 EUIDSwap::EUIDSwap(uid_t uid)
19 :origEUID_(Sys::geteuid())
20 {
21 try { Sys::seteuid(uid); }
22 catch(std::exception const & e) { UI_THROW_CODE(SetEuidErr_, "Cannot set euid to " + tos(uid) + ": " + e.what()); }
23 }
24
25 EUIDSwap::~EUIDSwap()
26 {
27 try { Sys::seteuid(origEUID_); }
28 catch(...) { }
29 }
30
31 uid_t EUIDSwap::getOrigUID() const
32 {
33 return origEUID_;
34 }
35
36 }}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_MISC_HPP
4 #define UI_UTIL_MISC_HPP
5
6 // STDC++
7 #include <string>
8 #include <vector>
9 #include <map>
10 #include <list>
11 #include <memory>
12
13 // C++ libraries
14 #include <ui-utilcpp/Exception.hpp>
15 #include <ui-utilcpp/Sys.hpp>
16 #include <ui-utilcpp/Text.hpp>
17
18 namespace UI {
19 namespace Util {
20
21 /** @brief Run "delete" on all vector elements, and clear the vector. *>.
22 *
23 * I.e. empty whole vector && call destructor for each ElType * - element.
24 */
25 template <typename ElType>
26 void delAnySeqContainer(std::vector<ElType *> & l) throw()
27 {
28 for (typename std::vector<ElType *>::iterator i(l.begin()); i != l.end(); ++i)
29 {
30 delete *i;
31 }
32 l.clear();
33 }
34
35 /** @brief Run "std::free" on all vector elements, and clear the vector. *>.
36 *
37 * I.e. empty whole vector && call destructor for each ElType * - element.
38 */
39 template <typename ElType>
40 void freeAnySeqContainer(std::vector<ElType *> & l) throw()
41 {
42 for (typename std::vector<ElType *>::iterator i(l.begin()); i != l.end(); ++i)
43 {
44 std::free((void *) *i);
45 }
46 l.clear();
47 }
48
49 /** @brief Utility to delete any map<string, anytype>.
50 *
51 * I.e. empty whole map && call destuctor for each ElType * - element.
52 */
53 template <typename ElType>
54 void delStringMap(std::map<std::string, ElType *> & l) throw()
55 {
56 for (typename std::map<std::string, ElType *>::iterator i(l.begin()); i != l.end(); ++i)
57 {
58 delete i->second;
59 }
60 l.clear();
61 }
62
63 /** @brief Base adapter class to hold a pointer that can't be freed
64 * using standard "delete".
65 *
66 * Derived classes should overwrite the destructor accordingly (and
67 * add other tool methods at will).
68 */
69 template <typename P>
70 class auto_base
71 {
72 public:
73 /** @brief Construct from any pointer (may be 0). */
74 auto_base(P * const p=0)
75 :p_(p)
76 {}
77
78 /** @brief Set controlled pointer (must not be 0). */
79 void set(P * const p)
80 {
81 assert(p);
82 p_ = p;
83 }
84
85 /** @brief Get underlying pointer. */
86 P * get() const
87 {
88 return p_;
89 }
90
91 /** @brief Smart dereferencing. */
92 P * operator->() const
93 {
94 return p_;
95 }
96 protected:
97 /** @brief Controlled pointer. */
98 P * p_;
99 };
100
101 /** @brief Control freeing of C vector pointers via delete[]. */
102 template<typename P>
103 class auto_cvec: public auto_base<P>
104 {
105 public:
106 /** @brief Control this C vector pointer created via new P[n]. */
107 auto_cvec(P * const p)
108 :auto_base<P>(p)
109 {}
110
111 /** @brief Free memory held by C vector via delete[]. */
112 ~auto_cvec()
113 {
114 delete[] auto_base<P>::p_;
115 }
116
117 /** @brief Access an C vector element. */
118 P & operator[](int i)
119 {
120 return auto_base<P>::p_[i];
121 }
122 };
123
124 /** @brief Control freeing of memory via std::free. */
125 template <typename P>
126 class auto_free: public auto_base<P>
127 {
128 public:
129 /** @brief Control this memory allocated via std::*alloc. */
130 auto_free(P * const p)
131 :auto_base<P>(p)
132 {}
133
134 /** @brief Free memory via std::free. */
135 ~auto_free()
136 {
137 std::free(auto_base<P>::p_);
138 }
139 };
140
141 /** @brief Reverse "find" for lists.
142 *
143 * @note Why doesn't "find(list.rbegin(), list.rend(), key)" work?
144 *
145 * @param l The list to search.
146 * @param key The key to find.
147 * @return Iterator to found key, or l.end() if not found.
148 */
149 template <typename K>
150 typename std::list<K>::iterator reverse_lfind(std::list<K> & l, K const & key)
151 {
152 typename std::list<K>::iterator i(l.end());
153 do
154 {
155 --i;
156 if ((*i) == key)
157 {
158 return i;
159 }
160 }
161 while (i != l.begin());
162 return l.end();
163 }
164
165 /** @brief Get canonical absolute path name
166 *
167 * This effectively works like realpath(3), wrapped up for C++, w/ exception error handling.
168 *
169 * @see realpath(3)
170 * @bug realpath(3) is "broken by design". We need to create a char buffer of size MAX_PATH
171 * each time we call this function.
172 */
173 std::string realpath(std::string const & path);
174
175 /** @brief Mutex Lock class; an object of this class will guard a scope.
176 *
177 * The Mutex class must provide enterMutex(), tryEnterMutex() and leaveMutex() methods.
178 */
179 template <typename Mutex>
180 class MutexLock
181 {
182 public:
183 /** @brief Error codes for exceptions. */
184 enum ErrorCode
185 {
186 Locked_ = 1
187 };
188 /** @brief This classes exceptions. */
189 typedef CodeException<ErrorCode> Exception;
190
191 /** @brief Constructor; locks the mutex.
192 *
193 * @param mutex Any Mutex providing enterMutex(), tryEnterMutex() and leaveMutex().
194 * @param wait Whether to wait until the lock can be set, or to return with exception LOCKED.
195 */
196 MutexLock(Mutex & mutex, bool wait=true) throw(Exception)
197 :mutex_(&mutex)
198 {
199 if (wait)
200 {
201 mutex_->enterMutex();
202 }
203 else
204 {
205 if (!mutex_->tryEnterMutex())
206 {
207 UI_THROW_CODE(Locked_, "Mutex is locked");
208 }
209 }
210 }
211
212 /** @brief Destructor; unlocks the mutex. */
213 ~MutexLock()
214 {
215 mutex_->leaveMutex();
216 }
217 private:
218 Mutex * const mutex_;
219 };
220
221
222 /** @brief Get canonical absolute path name (mutex-protected)
223 *
224 * You should create one instance of this for one multi-threaded environment, and then
225 * call the object's get() method. Purpose is to be faster than realpath() by not having
226 * to create a buffer of MAX_PATH each time we call. Tests however suprisingly show
227 * it's even somewhat slower.
228 *
229 * @param path Path to canonize.
230 *
231 * @attention Do not use more than one object in a multi-threaded environment.
232 *
233 * @see UI::Util::realpath().
234 *
235 */
236 template <typename M>
237 class RealPath
238 {
239 public:
240 /** @brief Get canonical path, mutex-protected. */
241 std::string get(std::string const & path)
242 {
243 MutexLock<M> lock(mutex_);
244 Sys::realpath(path.c_str(), buffer_);
245 return std::string(buffer_);
246 };
247
248 private:
249 M mutex_;
250 char buffer_[PATH_MAX];
251 };
252
253 /** @brief Helper class to get a scope executed with some other effective uid. */
254 class EUIDSwap
255 {
256 public:
257 /** @brief Error codes for exceptions. */
258 enum ErrorCode
259 {
260 SetEuidErr_ = 1
261 };
262 /** @brief This classes exceptions. */
263 typedef CodeException<ErrorCode> Exception;
264
265 EUIDSwap(uid_t uid=Sys::getuid());
266 ~EUIDSwap();
267
268 /** @brief Get the original effective user id. */
269 uid_t getOrigUID() const;
270
271 private:
272 uid_t const origEUID_;
273 };
274
275 }}
276 #endif
0 #include "config.h"
1
2 // Implementation
3 #include "PosixRegex.hpp"
4
5 // Local
6 #include "Text.hpp"
7
8 namespace UI {
9 namespace Util {
10
11 std::string PosixRegex::getErrorMessage(int result) const
12 {
13 int const maxSize(256);
14 std::string msg;
15 msg.resize(maxSize);
16 regerror(result, &preg_, &msg[0], maxSize-1);
17 return msg.c_str();
18 }
19
20 PosixRegex::PosixRegex(std::string const & regex, int cflags) throw(Exception)
21 {
22 int result(::regcomp(&preg_, regex.c_str(), cflags));
23 if (result != 0)
24 {
25 std::string msg(getErrorMessage(result));
26 ::regfree(&preg_);
27 UI_THROW_CODE((reg_errcode_t)result, "Error compiling posix regex \"" + regex + "\": " + msg);
28 }
29 }
30
31 PosixRegex::~PosixRegex()
32 {
33 ::regfree(&preg_);
34 }
35
36 PosixRegex::Match PosixRegex::runMatch(std::string const & text, int eflags) throw(Exception)
37 {
38 Match result;
39 ::regmatch_t pmatch[1];
40 int posixErr(::regexec(&preg_, text.c_str(), 1, pmatch, eflags));
41 if (posixErr == 0)
42 {
43 result.matches = true;
44 result.begin = pmatch[1].rm_so;
45 result.end = pmatch[1].rm_eo;
46 }
47 else if (posixErr == REG_NOMATCH)
48 {
49 result.matches = false;
50 }
51 else
52 {
53 UI_THROW_CODE((reg_errcode_t)posixErr, "Error matching \"" + text + "\" against posix regex: " + getErrorMessage(posixErr));
54 }
55 return result;
56 }
57
58 bool PosixRegex::run(std::string const & text, int eflags) throw(Exception)
59 {
60 return runMatch(text, eflags).matches;
61 }
62
63 }}
0 /**
1 * @file
2 * @brief Posixregex, descriptors and sockets.
3 */
4 #ifndef UI_UTIL_POSIXREGEX_HPP
5 #define UI_UTIL_POSIXREGEX_HPP
6
7 // STDC++
8 #include <string>
9
10 // POSIX C
11 #include <regex.h>
12
13 // C++ libraries
14 #include <ui-utilcpp/Exception.hpp>
15
16 namespace UI {
17 namespace Util {
18
19 /** @example Regex.cpp Example on how to use the PosixRegex class. */
20
21 /** @brief Wrapper class for POSIX.2 regex functions.
22 *
23 * @note For the future, one might rather use the libboost's regexx implementation.
24 *
25 * @see regex(3)
26 * @bug Not fully encapsulated; flags must be given using the values from regex.h; Catched
27 * exception code must be compared against the reg_errcode_t defined in regex.h.
28 * @bug Does not support multiple matches (seems this does not work anyway currently)
29 * @bug Does not support clear text error reporting as via regerror.
30 */
31 class PosixRegex
32 {
33 private:
34 std::string getErrorMessage(int result) const;
35
36 public:
37 /** @brief Exceptions we might throw. */
38 typedef CodeException<reg_errcode_t> Exception;
39
40 /** @brief Helper class representing match data. */
41 class Match
42 {
43 public:
44 Match(): matches(false), begin(0), end(0) {}
45 /** Do we have a match? */
46 bool matches;
47 /** If yes: where it begins */
48 unsigned begin;
49 /** If yes: where it ends */
50 unsigned end;
51 };
52
53 /**
54 * @param regex The regular expression
55 * @param cflags Flags as described in regex(3)
56 */
57 PosixRegex(std::string const & regex, int cflags=0) throw(Exception);
58
59 /** */
60 ~PosixRegex();
61
62 /** @brief Check if text matches, and return the (first) match.
63 *
64 * @param text Text to examine.
65 * @param eflags Flags as described in regex(3).
66 * @returns First match found; if no match, match.matches will be false.
67 */
68 Match runMatch(std::string const & text, int eflags=0) throw(Exception);
69
70 /** @brief Check if text matches.
71 *
72 * @param text Text to examine.
73 * @param eflags Flags as described in regex(3).
74 * @returns True if match found; else false.
75 */
76 bool run(std::string const & text, int eflags=0) throw(Exception);
77
78 private:
79 regex_t preg_;
80 };
81
82 }}
83 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "QuotaInfo.hpp"
5
6 // System C
7 #ifndef WIN32
8 #include <mntent.h> // unix: read mtab
9 #endif
10
11 // Windows DiskQuota
12 #ifdef W2K8
13 #include <comutil.h>
14 #include <fsrmquota.h>
15 #include <fsrmtlb.h>
16 #include <boost/regex.hpp>
17 #endif
18
19 #ifdef __linux__
20 #include <sys/quota.h> // linux-std
21 #include <asm/types.h> // linux-std
22 #ifdef HAVE_XFS_XQM_H
23 #include <xfs/xqm.h> // linux-xfs
24 #endif
25 #include <rpc/clnt.h> // linux-rpc
26 #include <rpcsvc/rquota.h> // linux-rpc
27 #endif
28
29 // Local
30 #include "Text.hpp"
31
32 namespace UI {
33 namespace Util {
34
35 std::string QuotaInfo::FS::getMethods(std::string const & fstype) const
36 {
37 std::string const fst(fstype == "" ? getType() : fstype);
38 std::string result("");
39 Methods::MethodVec const & mv(methods_.getMethods(fst));
40 for (Methods::MethodVec::const_iterator m(mv.begin()); m != mv.end(); ++m)
41 {
42 result += (*m)->first + " ";
43 }
44 return result;
45 }
46
47 QuotaInfo::FS QuotaInfo::file2fs(std::string const & fName, std::string const & tab)
48 {
49 QuotaInfo::FS res("");
50
51 #ifdef WIN32
52 if(fName.length() < 3)
53 {
54 UI_THROW("File name to short; can't extract drive: " + fName);
55 }
56 res = QuotaInfo::FS(fName.substr(0, 3));
57 #else
58 std::string::size_type resDirOverhang(std::string::npos);
59 struct mntent * mnt;
60 FILE * fp(setmntent(tab.c_str(), "r"));
61 if (!fp)
62 {
63 UI_THROW("Error opening mount table: " + tab);
64 }
65
66 while ((mnt = getmntent(fp)))
67 {
68 std::string const dir(mnt->mnt_dir);
69
70 if (fName.compare(0, dir.size(), dir) == 0)
71 {
72 std::string::size_type const overhang(fName.size()-dir.size());
73 if ((resDirOverhang == std::string::npos) || (overhang <= resDirOverhang))
74 {
75 res=QuotaInfo::FS(mnt->mnt_fsname, mnt->mnt_type);
76 resDirOverhang=overhang;
77 }
78 }
79 }
80
81 endmntent(fp);
82 #endif
83
84 return res;
85 }
86
87 QuotaInfo::Methods::Methods()
88 {
89 // Method Map
90 #ifdef HAVE_SYS_QUOTA_H
91 m_["linux-v2"] = &QuotaInfo::methodLinuxV2;
92 #endif
93 #ifdef HAVE_XFS_XQM_H
94 m_["linux-xfs"] = &QuotaInfo::methodLinuxXfs;
95 #endif
96 #ifdef __linux__
97 m_["linux-rpc"] = &QuotaInfo::methodLinuxRpc;
98 #endif
99 #ifdef HAVE_SYS_QUOTA_H
100 m_["linux-v1"] = &QuotaInfo::methodLinuxV1;
101 #endif
102 #ifdef WIN32
103 #ifndef W2K8
104 m_["no-quota"] = &QuotaInfo::noQuota;
105 #else
106 m_["w2k8-quota"] = &QuotaInfo::w2k8Quota;
107 #endif
108 #endif
109
110 // FS Map
111 #ifdef __linux__
112 // Default
113 f_["__all__"].push_back(m_.find("linux-v2"));
114 f_["__all__"].push_back(m_.find("linux-xfs"));
115 f_["__all__"].push_back(m_.find("linux-v1"));
116 f_["__all__"].push_back(m_.find("linux-rpc"));
117
118 // XFS
119 f_["xfs"].push_back(m_.find("linux-xfs"));
120
121 // NFS
122 f_["nfs"].push_back(m_.find("linux-rpc"));
123
124 // NFS4
125 f_["nfs4"].push_back(m_.find("linux-rpc"));
126 #endif
127
128 #ifdef WIN32
129 #ifndef W2K8
130 f_["__all__"].push_back(m_.find("no-quota"));
131 #else
132 f_["__all__"].push_back((m_.find("w2k8-quota")));
133 #endif
134 #endif
135 }
136
137 QuotaInfo::Methods::MethodVec const & QuotaInfo::Methods::getMethods(std::string const & fstype) const
138 {
139 FSMap::const_iterator mv(f_.find(fstype));
140 if (mv == methods_.f_.end())
141 {
142 mv = methods_.f_.find("__all__");
143 }
144 return mv->second;
145 }
146
147
148 // No quota method: Limit "0" means no limit
149 #ifdef WIN32
150 #ifndef W2K8
151 void QuotaInfo::noQuota(std::string const & dev, uid_t const uid)
152 {
153 blockHL_=0;
154 blockSL_=0;
155 blocks_=0;
156
157 inodeHL_=0;
158 inodeSL_=0;
159 inodes_=0;
160
161 blockTL_=0;
162 inodeTL_=0;
163 }
164 #else
165 void QuotaInfo::w2k8Quota(std::string const & dev, uid_t const uid)
166 {
167 if (home_ == "")
168 {
169 UI_THROW("Home not provided: " + home_);
170 }
171
172 // reduce the home path to the customers root path
173 // e.g. E:\kunden\homepages\18\d12345678\www\wsb123456\ -> E:\kunden\homepages\18\d12345678
174 boost::regex regExNormal("^(e:\\\\kunden\\\\homepages\\\\[0-9][0-9]?\\\\d[0-9]+)(\\\\www\\\\.+)");
175 boost::cmatch what;
176 if (!boost::regex_match(home_.c_str(), what, regExNormal))
177 {
178 // may also be e.g. E:\kunden\homepages\18\d12345678\www
179 boost::regex regExOtherNormal("^(e:\\\\kunden\\\\homepages\\\\[0-9][0-9]?\\\\d[0-9]+)(\\\\www)");
180 if (!boost::regex_match(home_.c_str(), what, regExOtherNormal))
181 {
182 // may already be without "www"
183 boost::regex regExAlreadyCut("^(e:\\\\kunden\\\\homepages\\\\[0-9][0-9]?\\\\d[0-9]+)");
184 if (!boost::regex_match(home_.c_str(), what, regExAlreadyCut))
185 {
186 UI_THROW("File path not matched: " + home_);
187 }
188 }
189 }
190
191 std::string cstrCustomersRoot = what[1];
192
193 HRESULT hr = CoInitializeEx(NULL, 0);
194 if (SUCCEEDED(hr))
195 {
196 IFsrmQuotaManager* pQuotaManager;
197 IFsrmQuota* pQuota;
198
199 ULONGLONG ullQuotaLimit = 0;
200 ULONGLONG ullQuotaUsed = 0;
201
202 hr = CoCreateInstance(CLSID_FsrmQuotaManager, NULL,
203 CLSCTX_LOCAL_SERVER, IID_IFsrmQuotaManager,
204 reinterpret_cast<void**>(&pQuotaManager));
205 if (SUCCEEDED(hr))
206 {
207 hr = pQuotaManager->GetQuota(_bstr_t(cstrCustomersRoot.c_str()), &pQuota);
208 if (FAILED(hr))
209 {
210 if (hr == (LONG)0x80045301) //no quota defined, so just go on
211 {
212 blockHL_=0;
213 blockSL_=0;
214 blocks_=0;
215
216 inodeHL_=0;
217 inodeSL_=0;
218 inodes_=0;
219
220 blockTL_=0;
221 inodeTL_=0;
222 }
223 }
224 else
225 {
226 VARIANT var;
227 VariantInit(&var);
228 hr = pQuota->get_QuotaLimit(&var);
229 if (SUCCEEDED(hr))
230 {
231 ullQuotaLimit = var.ullVal;
232 }
233
234 VariantClear(&var);
235
236 hr = pQuota->get_QuotaUsed(&var);
237 if (SUCCEEDED(hr))
238 {
239 ullQuotaUsed = var.ullVal;
240 }
241
242 blockHL_ = static_cast<unsigned long>(ullQuotaLimit / BlockSize_);
243 blockSL_ = 0;
244 blocks_ = static_cast<unsigned long>(ullQuotaUsed / BlockSize_);
245
246 inodeHL_ = 0;
247 inodeSL_ = 0;
248 inodes_ = 0;
249
250 blockTL_ = 0;
251 inodeTL_ = 0;
252
253 VariantClear(&var);
254
255 pQuota->Release();
256 }
257 pQuotaManager->Release();
258 }
259 CoUninitialize();
260 }
261 }
262 #endif
263 #endif
264
265 QuotaInfo::Methods const QuotaInfo::methods_;
266
267 QuotaInfo::QuotaInfo(FS const & fs, int const id, Type const type, std::string const & strPath)
268 #ifndef WIN32
269 :sub_(type == Usr_ ? USRQUOTA : GRPQUOTA)
270 #else
271 :sub_(0)
272 #endif
273 ,home_(strPath)
274 ,method_("none")
275 {
276 bool found(false);
277 std::string errorText("QuotaInfo failed:");
278
279 Methods::MethodVec const & mv(methods_.getMethods(fs.fstype_));
280
281 for (Methods::MethodVec::const_iterator m(mv.begin()); !found && m != mv.end(); ++m)
282 {
283 try
284 {
285 (this->*(*m)->second)(fs.dev_, id);
286 method_=(*m)->first;
287 found=true;
288 }
289 catch (std::exception const & e)
290 {
291 errorText+=" Method " + (*m)->first + " said: " + e.what() + ".";
292 }
293 }
294 if (!found)
295 {
296 UI_THROW(errorText);
297 }
298 }
299
300 #ifdef HAVE_SYS_QUOTA_H
301 void QuotaInfo::methodLinuxV1(std::string const & dev, uid_t const uid)
302 {
303 // This is struct "dqblk" from "sys/quota.h" for Linux Quota Version 1
304 struct
305 {
306 u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */
307 u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */
308 u_int32_t dqb_curblocks; /* current block count */
309 u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */
310 u_int32_t dqb_isoftlimit; /* preferred inode limit */
311 u_int32_t dqb_curinodes; /* current # allocated inodes */
312 time_t dqb_btime; /* time limit for excessive disk use */
313 time_t dqb_itime; /* time limit for excessive files */
314 } q;
315 // 0x0300 is Q_GETQUOTA from "sys/quota.h" for Linux Quota Version 1
316 Sys::quotactl(QCMD(0x0300, sub_), dev.c_str(), uid, (caddr_t) &q);
317 blockHL_=q.dqb_bhardlimit;
318 blockSL_=q.dqb_bsoftlimit;
319 blocks_=q.dqb_curblocks;
320 inodeHL_=q.dqb_ihardlimit;
321 inodeSL_=q.dqb_isoftlimit;
322 inodes_=q.dqb_curinodes;
323
324 blockTL_=q.dqb_btime;
325 inodeTL_=q.dqb_itime;
326 }
327
328 void QuotaInfo::methodLinuxV2(std::string const & dev, uid_t const uid)
329 {
330 // This is struct "dqblk" from "sys/quota.h" for Linux Quota Version 2
331 struct
332 {
333 u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */
334 u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */
335 u_int64_t dqb_curspace; /* current quota block count */ /* WRONG: This actually holds bytes; absurd@schlund.de 2006-May */
336 u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */
337 u_int64_t dqb_isoftlimit; /* preferred inode limit */
338 u_int64_t dqb_curinodes; /* current # allocated inodes */
339 u_int64_t dqb_btime; /* time limit for excessive disk use */
340 u_int64_t dqb_itime; /* time limit for excessive files */
341 u_int32_t dqb_valid; /* bitmask of QIF_* constants */
342 } q;
343 // 0x800007 is Q_GETQUOTA from "sys/quota.h" for Linux Quota Version 2
344 Sys::quotactl(QCMD(0x800007, sub_), dev.c_str(), uid, (caddr_t) &q);
345 blockHL_=q.dqb_bhardlimit;
346 blockSL_=q.dqb_bsoftlimit;
347 // If block size is not hard coded to BlockSize_, we have a problem here ;(
348 blocks_=q.dqb_curspace / BlockSize_;
349 if (q.dqb_curspace % BlockSize_ != 0) { ++blocks_; }
350
351 inodeHL_=q.dqb_ihardlimit;
352 inodeSL_=q.dqb_isoftlimit;
353 inodes_=q.dqb_curinodes;
354
355 blockTL_=q.dqb_btime;
356 inodeTL_=q.dqb_itime;
357 }
358 #endif
359
360 #ifdef HAVE_XFS_XQM_H
361 void QuotaInfo::methodLinuxXfs(std::string const & dev, uid_t const uid)
362 {
363 struct fs_disk_quota q;
364 Sys::quotactl(QCMD(Q_XGETQUOTA,sub_), dev.c_str(), uid, (caddr_t) &q);
365 /** @bug: Maybe there is some more effort needed to make this
366 * portable. At least there's no overflow check here (on linux,
367 * values are 64bit; unsgigned long ist 32bit only). */
368 blockHL_=q.d_blk_hardlimit >> 1;
369 blockSL_=q.d_blk_softlimit >> 1;
370 blocks_=q.d_bcount >> 1;
371
372 inodeHL_=q.d_ino_hardlimit;
373 inodeSL_=q.d_ino_softlimit;
374 inodes_=q.d_icount;
375
376 blockTL_=q.d_btimer;
377 inodeTL_=q.d_itimer;
378 }
379 #endif
380
381 #ifdef __linux__
382 void QuotaInfo::methodLinuxRpc(std::string const & dev, uid_t const uid)
383 {
384 class RPCClient
385 {
386 public:
387 RPCClient(std::string const & host)
388 :clnt_(0)
389 ,host_(host)
390 {
391 clnt_ = clnt_create(host.c_str(), RQUOTAPROG, RQUOTAVERS, "udp");
392 if (clnt_ == 0) { UI_THROW("RPC clnt_create(3) failed for " + host_); }
393 clnt_->cl_auth = authunix_create_default();
394 }
395 ~RPCClient()
396 {
397 auth_destroy(clnt_->cl_auth);
398 clnt_destroy(clnt_);
399 }
400 getquota_rslt request(std::string const & path, uid_t const uid)
401 {
402 struct timeval const timeout = {2,0};
403
404 // Set up args
405 getquota_args args;
406 args.gqa_pathp = (char *) path.c_str();
407 args.gqa_uid = uid;
408
409 // Set up result
410 getquota_rslt result;
411 memset((char *) &result, 0, sizeof(result));
412
413 // Run request
414 enum clnt_stat retval(clnt_call(clnt_, RQUOTAPROC_GETQUOTA,
415 (xdrproc_t) xdr_getquota_args, (caddr_t) &args,
416 (xdrproc_t) xdr_getquota_rslt, (caddr_t) &result,
417 timeout));
418
419 // Error handling
420 if (retval != RPC_SUCCESS || result.status != Q_OK)
421 {
422 UI_THROW("RPC clnt_call(3) failed (" + host_ + ":" + path + " uid=" + tos(uid) + "): retval/status=" + tos(retval) + "/" + tos(result.status));
423 }
424 return result;
425 }
426 private:
427 CLIENT * clnt_;
428 std::string const host_;
429 };
430
431 // We don't use quotactl for this, and we only have a method for user quota
432 if (sub_ == GRPQUOTA)
433 {
434 UI_THROW("No method for group quota for rpc; device was: " + dev);
435 }
436
437 std::string::size_type const col(dev.find_first_of(':'));
438 if (col == std::string::npos || col >= dev.length() || dev[col+1] == '(')
439 {
440 UI_THROW("Invalid NFS mount syntax: " + dev);
441 }
442 std::string const host(dev.substr(0, col));
443 std::string const path(dev.substr(col+1));
444
445 RPCClient client(host);
446 getquota_rslt result(client.request(path, uid));
447 struct rquota * n(&result.getquota_rslt_u.gqr_rquota);
448
449 // Finally, fill quota vars
450 blockHL_ = n->rq_bhardlimit;
451 blockSL_ = n->rq_bsoftlimit;
452 inodeHL_ = n->rq_fhardlimit;
453 inodeSL_ = n->rq_fsoftlimit;
454 inodes_ = n->rq_curfiles;
455 blocks_ = n->rq_curblocks;
456
457 // Adapt from remote block size if needed
458 if ((unsigned long) n->rq_bsize != BlockSize_)
459 {
460 blockHL_ = (blockHL_ * n->rq_bsize) / BlockSize_;
461 blockSL_ = (blockSL_ * n->rq_bsize) / BlockSize_;
462 blocks_ = (blocks_ * n->rq_bsize) / BlockSize_;
463 }
464
465 // Timer values are in "time left" -- adapt
466 time_t now;
467 time(&now);
468 blockTL_ = (n->rq_btimeleft ? n->rq_btimeleft + now : 0);
469 inodeTL_ = (n->rq_ftimeleft ? n->rq_ftimeleft + now : 0);
470 }
471 #endif
472
473 std::string QuotaInfo::getMethod() const { return method_; }
474 unsigned long QuotaInfo::getBlockHL() const { return blockHL_; }
475 unsigned long QuotaInfo::getBlockSL() const { return blockSL_; }
476 unsigned long QuotaInfo::getBlocks() const { return blocks_; }
477 unsigned long QuotaInfo::getINodeHL() const { return inodeHL_; }
478 unsigned long QuotaInfo::getINodeSL() const { return inodeSL_; }
479 unsigned long QuotaInfo::getINodes() const { return inodes_; }
480 time_t QuotaInfo::getBlockTL() const { return blockTL_; }
481 time_t QuotaInfo::getINodeTL() const { return inodeTL_; }
482
483
484 bool QuotaInfo::getFreeBlocksHL(unsigned long & free) const
485 {
486 return getFree(getBlockHL(), getBlocks(), free);
487 }
488
489 bool QuotaInfo::getFreeBlocksSL(unsigned long & free) const
490 {
491 return getFree(getBlockSL(), getBlocks(), free);
492 }
493
494 bool QuotaInfo::getFreeINodesHL(unsigned long & free) const
495 {
496 return getFree(getINodeHL(), getINodes(), free);
497 }
498
499 bool QuotaInfo::getFreeInodesSL(unsigned long & free) const
500 {
501 return getFree(getINodeSL(), getINodes(), free);
502 }
503
504
505 bool QuotaInfo::getFree(unsigned long const limit, unsigned long const blocks, unsigned long & free) const
506 {
507 bool haveLimit(limit > 0);
508 if (haveLimit)
509 {
510 free=0;
511 if (limit > blocks)
512 {
513 free = limit-blocks;
514 }
515 }
516 return haveLimit;
517 }
518
519 unsigned long QuotaInfo::BlockSize_(1024);
520
521 }}
0 /**
1 * @file
2 * @author Schlund + Partner AG
3 *
4 */
5 #ifndef UI_UTIL_QUOTAINFO_HPP
6 #define UI_UTIL_QUOTAINFO_HPP
7
8 // STDC++
9 #include <string>
10 #include <vector>
11
12 // C++ libraries
13 #include <ui-utilcpp/Exception.hpp>
14 #include <ui-utilcpp/Sys.hpp>
15
16 namespace UI {
17 namespace Util {
18
19 /** @brief Quota information abstraction.
20 *
21 * May be extended easily be adding new methods:
22 * - Add a new private methodXXX method (e.g. methodWinFake) that somehow
23 * sets all the quota values.
24 * - Add it to the method vector (see constructor of QuotaInfo::Methods).
25 *
26 * @todo: The interface is focused on linux "standard" quota
27 * interface. Interface should rather be most powerful, with lesser
28 * implementations falling back to sane defaults.
29 *
30 * @todo: Nicer way to find out what interface to use rather then
31 * testing on by one (check "quota" source).
32 */
33 class QuotaInfo
34 {
35 public:
36 /** @brief Helper class to hold the device string and (optional) the
37 * fs type (to be able to do better selection on the quota method to
38 * use). */
39 class FS
40 {
41 friend class QuotaInfo;
42 public:
43 FS(std::string const & dev, std::string const & fstype="")
44 :dev_(dev)
45 ,fstype_(fstype)
46 {}
47 std::string const & getDevice() const { return dev_; }
48 std::string const & getType() const { return fstype_; }
49 std::string getMethods(std::string const & fstype="") const;
50 private:
51 std::string dev_;
52 std::string fstype_;
53 };
54 /** @brief Get FS information from any file in that fs.
55 *
56 * @note: This method is potentially NOT thread-safe (uses getmntent under linux).
57 */
58 static FS file2fs(std::string const & fName, std::string const & tab="/proc/mounts");
59
60 /** @brief Type of quota information. */
61 enum Type
62 {
63 Usr_, Grp_
64 };
65
66 /**
67 * @param fs Device name (std::string - implicit) or file system (FS).
68 * @param id ID as in quotactl(2), normally a user or group ID.
69 * @param type Type (user or group) of quota info to retrieve.
70 * @param strPath Extra parameter for windows "quota".
71 */
72 QuotaInfo(FS const & fs, int const id=Sys::geteuid(), Type const type=Usr_, std::string const & strPath = "");
73
74 public:
75 /** @brief Get method string of utilized method. */
76 std::string getMethod() const;
77
78 /** @brief Hard limit of disk blocks. */
79 unsigned long getBlockHL() const;
80 /** @brief Soft limit of disk blocks. */
81 unsigned long getBlockSL() const;
82 /** @brief Current block usage. */
83 unsigned long getBlocks() const;
84
85 /** @brief Hard limit of inodes. */
86 unsigned long getINodeHL() const;
87 /** @brief Soft limit of inodes. */
88 unsigned long getINodeSL() const;
89 /** @brief Current inode usage. */
90 unsigned long getINodes() const;
91
92 /** @brief Block timer limit. */
93 time_t getBlockTL() const;
94 /** @brief Inodes timer limit. */
95 time_t getINodeTL() const;
96
97 /** @brief Helper for getFree* methods. */
98 bool getFree(unsigned long const limit, unsigned long const blocks, unsigned long & free) const;
99
100 /** @brief Get free blocks from hard limit. False, if there is no hard limit. */
101 bool getFreeBlocksHL(unsigned long & free) const;
102 /** @brief Get free blocks from soft limit. False, if there is no soft limit. */
103 bool getFreeBlocksSL(unsigned long & free) const;
104 /** @brief Get free indoes from hard limit. False, if there is no hard limit. */
105 bool getFreeINodesHL(unsigned long & free) const;
106 /** @brief Get free inodes from soft limit. False, if there is no soft limit. */
107 bool getFreeInodesSL(unsigned long & free) const;
108
109 /** @brief QuotaInfo exceptions. */
110 class Exception: public UI::Util::Exception
111 {
112 public:
113 Exception(std::string const & what, std::string const & debug)
114 :UI::Util::Exception(what, debug)
115 {};
116 };
117
118 private:
119 typedef void (QuotaInfo::*Method) (std::string const &, uid_t const);
120
121 #ifdef HAVE_SYS_QUOTA_H
122 /** @brief Method for linux quota version 1 (@e vfsold). */
123 void methodLinuxV1(std::string const & dev, uid_t const uid);
124
125 /** @brief Method for linux quota versions 1,2 (@e vfsold, @e vfsv0) (requires "recent" kernel). */
126 void methodLinuxV2(std::string const & dev, uid_t const uid);
127 #endif
128
129 #ifdef HAVE_XFS_XQM_H
130 /** @brief Method for XFS quota. */
131 void methodLinuxXfs(std::string const & dev, uid_t const uid);
132 #endif
133
134 /** @brief Method for (NFS) quota via rpc. */
135 void methodLinuxRpc(std::string const & dev, uid_t const uid);
136
137 #ifdef WIN32
138 #ifndef W2K8
139 void noQuota(std::string const & dev, uid_t const uid);
140 #else
141 void w2k8Quota(std::string const & dev, uid_t const uid);
142 #endif
143 #endif
144
145 private:
146 /** @brief: Block size used for all block values. */
147 static unsigned long BlockSize_;
148
149 class Methods
150 {
151 public:
152 typedef std::map<std::string, Method> MethodMap;
153 typedef std::vector<MethodMap::const_iterator> MethodVec;
154 typedef std::map<std::string, MethodVec> FSMap;
155 Methods();
156 MethodMap m_;
157 FSMap f_;
158 MethodVec const & getMethods(std::string const & fstype) const;
159 };
160 static Methods const methods_;
161
162 int const sub_;
163
164 std::string const home_;
165
166 std::string method_;
167 unsigned long blockHL_;
168 unsigned long blockSL_;
169 unsigned long blocks_;
170
171 unsigned long inodeHL_;
172 unsigned long inodeSL_;
173 unsigned long inodes_;
174
175 time_t blockTL_;
176 time_t inodeTL_;
177 };
178
179
180 /** @brief Variant of QuotaInfo from any file in FS.
181 *
182 * @note: Constructor potentially is NOT thread-safe: @see file2fs.
183 *
184 * @note Usually, you instantiate one FS object when your program
185 * initializes, and then use that for all QuotaInfo() calls
186 * thereafter. This is just a shortcut that you should not use if you
187 * have several calls on the same FS.
188 */
189 class FQuotaInfo: public QuotaInfo
190 {
191 public:
192 /**
193 * @param fileName Any file names on the FS you want to run quota on.
194 * @param id ID as in quotactl(2), normally a user or group ID.
195 * @param type Type (user or group) of quota info to retrieve.
196 */
197 FQuotaInfo(std::string const & fileName, int const id=Sys::geteuid(), Type const type=Usr_)
198 :QuotaInfo(file2fs(fileName), id, type)
199 {}
200 };
201
202 }}
203 #endif
0 #include "config.h"
1
2 // Declaration
3 #include "Recoder.hpp"
4
5 // STDC++
6 #include <cassert>
7
8 // C libraries
9 #include <idna.h>
10
11 // C++ libraries
12 #include <cc++/url.h>
13
14 // Local
15 #include "Exception.hpp"
16 #include "Text.hpp"
17 #include "Misc.hpp"
18
19 namespace UI {
20 namespace Util {
21
22 Conversion::Conversion(char const * const cStr, size_t const cSize)
23 :cStr_(cStr)
24 ,cSize_(cSize)
25 {
26 assert(cStr);
27 }
28
29 Conversion::~Conversion()
30 {}
31
32 char const * Conversion::get() const
33 {
34 return cStr_;
35 }
36
37 size_t Conversion::getSize() const
38 {
39 return cSize_;
40 }
41
42 std::string Conversion::getString() const
43 {
44 return std::string(cStr_, cSize_);
45 }
46
47
48
49 StdFreeConversion::StdFreeConversion(char * cStr, size_t const cSize)
50 :Conversion(cStr, cSize)
51 ,freeObject_(cStr)
52 {}
53
54 StdFreeConversion::~StdFreeConversion()
55 {
56 Sys::free(freeObject_);
57 }
58
59 StringConversion::StringConversion(std::string * str)
60 :Conversion(str->c_str(), str->size())
61 ,delObject_(str)
62 {}
63
64 StringConversion::~StringConversion()
65 {
66 delete delObject_;
67 }
68
69 Converter::Converter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy)
70 :inEnc_(inEnc)
71 ,outEnc_(outEnc)
72 ,sloppy_(sloppy)
73 {}
74
75 Converter::~Converter()
76 {}
77
78 Conversion const * Converter::make(char const * cStr) const
79 {
80 return make(cStr, std::strlen(cStr));
81 }
82
83 Conversion const * Converter::make(std::string const & str) const
84 {
85 return make(str.c_str(), str.size());
86 }
87
88 std::string Converter::getID() const
89 {
90 return inEnc_ + ".." + outEnc_ + "(" + (sloppy_ ? "sloppy" : "precise") + ")";
91 }
92
93
94 #ifndef WIN32
95 LibRecodeConverter::LibRecodeConverter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy)
96 :Converter(inEnc, outEnc, sloppy)
97 ,outer_(0)
98 ,request_(0)
99 {
100 std::string const encInOut(inEnc + ".." + outEnc);
101
102 if (! ((outer_ = ::recode_new_outer(1)) &&
103 (request_ = ::recode_new_request(outer_)) &&
104 ::recode_scan_request(request_, encInOut.c_str())))
105 {
106 if (request_) { ::recode_delete_request(request_); };
107 if (outer_) { ::recode_delete_outer(outer_); };
108 UI_THROW_CODE(EncUnknown_, "LibRecodeConverter: Some encoding is unknown: " + getID());
109 }
110
111 // Non run-dependent task configuration
112 }
113
114 LibRecodeConverter::~LibRecodeConverter()
115 {
116 ::recode_delete_request(request_);
117 ::recode_delete_outer(outer_);
118 }
119
120 // Start: From librecode
121 /* Guarantee four NULs at the end of the output memory buffer for TASK, yet
122 not counting them as data. The number of NULs should depend on the goal
123 charset: often one, but two for UCS-2 and four for UCS-4. FIXME! */
124 void LibRecodeConverter::guarantee_nul_terminator(RECODE_TASK task)
125 {
126 if (task->output.cursor + 4 >= task->output.limit)
127 {
128 RECODE_OUTER outer = task->request->outer;
129 size_t old_size = task->output.cursor - task->output.buffer;
130 size_t new_size = task->output.cursor + 4 - task->output.buffer;
131
132 /* FIXME: Rethink about how the error should be reported. */
133 if (REALLOC (task->output.buffer, new_size, char))
134 {
135 task->output.cursor = task->output.buffer + old_size;
136 task->output.limit = task->output.buffer + new_size;
137 }
138 }
139 task->output.cursor[0] = NUL;
140 task->output.cursor[1] = NUL;
141 task->output.cursor[2] = NUL;
142 task->output.cursor[3] = NUL;
143 }
144 // End: From librecode
145
146 Conversion const * LibRecodeConverter::make(char const * const buf, size_t const bufSize) const
147 {
148 class Task
149 {
150 public:
151 Task(RECODE_REQUEST request, char const * const buf, size_t const bufSize, bool const & sloppy)
152 :task_(::recode_new_task(request))
153 {
154 // Task config
155 task_->strategy = RECODE_SEQUENCE_IN_MEMORY;
156 task_->fail_level = sloppy ? RECODE_INVALID_INPUT : RECODE_NOT_CANONICAL;
157
158 task_->input.buffer = buf;
159 task_->input.cursor = buf;
160 task_->input.limit = buf + bufSize;
161 task_->output.buffer = 0;
162 task_->output.cursor = 0;
163 task_->output.limit = 0;
164 }
165 ~Task()
166 {
167 ::recode_delete_task(task_);
168 }
169 Conversion const * make()
170 {
171 if (!::recode_perform_task(task_))
172 {
173 // So far allocated buffer must be freed
174 Sys::free(task_->output.buffer);
175 UI_THROW_CODE(ConversionErr_, "LibRecodeConverter: Task error, \"error_so_far\"=" + tos(task_->error_so_far));
176 }
177 guarantee_nul_terminator(task_);
178 return new StdFreeConversion(task_->output.buffer, task_->output.cursor-task_->output.buffer);
179 }
180 RECODE_TASK task_;
181 };
182 return Task(request_, buf, bufSize, sloppy_).make();
183 }
184 #endif
185
186
187 IConvConverter::IConvConverter(std::string const & inEnc, std::string const & outEnc, const bool & sloppy )
188 :Converter(inEnc, outEnc, sloppy)
189 ,conversion_(Sys::iconv_open(outEnc_.c_str(), inEnc_.c_str()))
190 {
191 // Linux uses gcc with iconv build-in. The non-standard iconvctl feature is in GNU libiconv only.
192 #ifndef __linux__
193 const int transliterate = (int)sloppy;
194 iconvctl( conversion_, ICONV_SET_TRANSLITERATE, (void *)&transliterate );
195 #endif
196 }
197
198 IConvConverter::~IConvConverter()
199 {
200 try { Sys::iconv_close(conversion_); }
201 catch (...) {}
202 }
203
204 Conversion const * IConvConverter::make(char const * const buf, size_t const bufSize) const
205 {
206 size_t nLength = bufSize;
207 const char* pInput = buf;
208 char * dest((char *) Sys::malloc(nLength + 1));
209
210 assert(dest);
211 size_t destSize(0);
212
213 int nIteration(1);
214 while (true)
215 {
216 const char* pIn = pInput;
217 char* pOut = dest;
218 size_t nIn = nLength;
219 size_t nOut = nLength * nIteration;
220
221 #ifdef WIN32
222 size_t code = iconv( conversion_, &pIn, &nIn, &pOut, &nOut );
223 #else
224 size_t code = iconv( conversion_, const_cast<char**>(&pIn), &nIn, &pOut, &nOut );
225 #endif
226 dest[nLength*nIteration-nOut] = 0;
227 if( ( (size_t)(-1) == code ) && ( E2BIG == errno ) )
228 {
229 if (NULL != dest)
230 {
231 // Huh?
232 Sys::free(dest);
233 dest = 0;
234 }
235 nIteration++;
236 dest = (char *) Sys::malloc(nLength * nIteration + 1);
237 }
238 else
239 {
240 if ((size_t)(-1) == code)
241 {
242 /** @bug memory leak (malloc)? */
243 UI_THROW_CODE(ConversionErr_,
244 "IConvConverter: Conversion error: " + getID());
245 }
246 destSize = nLength*nIteration-nOut;
247 break;
248 }
249 }
250
251 return new StdFreeConversion(dest, destSize);
252 }
253
254
255 URLConverter::URLConverter(bool const encode)
256 :Converter(encode ? "data" : "url", encode ? "url" : "data")
257 {}
258
259 Conversion const * URLConverter::make(char const * const buf, size_t const bufSize) const
260 {
261 // Note: Encoder and decoder directly from c-str would be nice for efficiency.
262 std::string src(buf, bufSize);
263 return new StringConversion(new std::string((inEnc_ == "data" ? encode(src) : decode(src))));
264 }
265
266 unsigned char URLConverter::number(unsigned char inNum)
267 {
268 unsigned char outNum = 0;
269
270 if ((inNum >= MinNum && inNum <= MaxNum) || (inNum >= MinAlp && inNum <= MaxAlp) || (inNum >= MinAlp2 && inNum <= MaxAlp2))
271 {
272 if (inNum > MaxNum)
273 {
274 if (inNum > MaxAlp)
275 {
276 outNum = inNum-AlpMod2;
277 }
278 else
279 {
280 outNum = inNum-AlpMod;
281 }
282 }
283 else
284 {
285 outNum = inNum-NumMod;
286 }
287 }
288 return outNum;
289 }
290
291 std::string URLConverter::encode(std::string const & url)
292 {
293 unsigned char check = 0;
294 char buf[4];
295 int i = 0;
296
297 std::string out("");
298
299 for (i=0 ; i < (int) url.size(); i++)
300 {
301 check = (url.data())[i];
302 switch ( check )
303 {
304 case 0x20: // "(space)"
305 out.append( 1, '+' );
306 break;
307 case 0x2a: // "*"
308 case 0x2d: // "-"
309 case 0x2e: // "."
310 case 0X5f: // "_"
311 out.append( 1, check );
312 break;
313 default:
314 if ((check >= 0x21 && check <= 0x2f) || // "!" - "/"
315 (check >= 0x3a && check <= 0x40) || // ":" - "@"
316 (check >= 0x5b && check <= 0x60) || // "[" - "'"
317 (check >= 0x7b && check <= 0x7f) || // "{" - "~"
318 (check > 0x7f)) // non-ASCII
319 {
320 std::sprintf(buf, "%%%X", check);
321 out.append(buf);
322 }
323 else
324 {
325 out.append(1, check);
326 }
327 }
328 }
329 return out;
330 }
331
332 std::string URLConverter::decode(std::string const & url)
333 {
334 unsigned char check = 0;
335 unsigned char low, high, ascii = 0;
336 int i = 0;
337
338 std::string out("");
339
340 for ( i=0 ; i< (int) url.size() ; i++ )
341 {
342 check = (url.data())[i];
343 switch (check)
344 {
345 case 0x2b: // "+"
346 out.append( 1, ' ' );
347 break;
348 case 0x25: // "%"
349 high = number((url.data())[i+1]);
350 low = number((url.data())[i+2]);
351 high = (high << 4);
352 ascii = (low | high);
353 out.append( 1, ascii );
354 i = i+2;
355 break;
356 default:
357 out.append( 1, check );
358 break;
359 }
360 }
361 return out;
362 }
363
364
365 Cpp2Base64Converter::Cpp2Base64Converter(bool const encode)
366 :Converter(encode ? "data" : "b64", encode ? "b64" : "data")
367 {}
368
369 Conversion const * Cpp2Base64Converter::make(char const * const buf, size_t const bufSize) const
370 {
371 char * dest(0);
372 size_t destSize(0);
373
374 if (inEnc_ == "data")
375 {
376 long lDestSize((bufSize+2) / 3*4 + 1);
377 dest = (char*) Sys::malloc(lDestSize);
378 destSize = ost::b64Encode((const unsigned char *)buf, bufSize, dest, lDestSize);
379 }
380 else
381 {
382 long lDestSize(bufSize / 4*3 + 1);
383 dest = (char*) Sys::malloc(lDestSize);
384 destSize = ost::b64Decode(buf, (unsigned char *)dest, lDestSize);
385 }
386 return new StdFreeConversion(dest, destSize);
387 }
388
389
390 Rfc2047Converter::Rfc2047Converter(std::string const & inCharEnc)
391 :Converter(inCharEnc, "rfc2047")
392 {}
393
394 Conversion const * Rfc2047Converter::make(char const * const buf, size_t const bufSize) const
395 {
396 std::string * result(new std::string());
397
398 try
399 {
400 /* Check if further encoding is neccessary */
401 bool noEncoding(true);
402 for (size_t i(0); noEncoding && i < bufSize; ++i)
403 {
404 noEncoding = noEncoding && ((unsigned char) buf[i] <= 127);
405 }
406
407 if (noEncoding)
408 {
409 *result = buf;
410 }
411 else
412 {
413 /* at least one special character (>127) occurred -> encode */
414 /* encoded characters look like this: =XX where XX is hexadecimal*/
415 /* this small buffer holds one encoded char.*/
416 char const * hexTable="0123456789ABCDEF";
417 char hex[4];
418 hex[0]='=';
419 hex[3]=0;
420 /* header with character encoding */
421 result->append("=?");
422 result->append(inEnc_);
423 result->append("?Q?");
424 /* and now the content */
425 for (size_t i(0); i < bufSize; ++i)
426 {
427 if (buf[i] == ' ')
428 {
429 *result += '_';
430 }
431 else if ((unsigned char) buf[i] > 127 || buf[i] == '\t' || buf[i] == '?' || buf[i] == '=' || buf[i] == '_')
432 {
433 hex[1]=hexTable[(unsigned char) buf[i] >> 4];
434 hex[2]=hexTable[(unsigned char) buf[i] &0xF];
435 result->append(hex);
436 }
437 else
438 {
439 *result += buf[i];
440 }
441 }
442 result->append("?=");
443 }
444 }
445 catch(...)
446 {
447 delete result;
448 throw;
449 }
450
451 return new StringConversion(result);
452 }
453
454
455 Rfc3490Utf8Converter::Rfc3490Utf8Converter(bool const encode)
456 :Converter(encode ? "UTF-8" : "idn", encode ? "idn" : "UTF-8")
457 {}
458
459 Conversion const * Rfc3490Utf8Converter::make(char const * const buf, size_t const bufSize) const
460 {
461 // bufSize not used by ::idna_* funcs (must be 0-terminated); this line avoids compiler warnings only
462 if (bufSize) {};
463
464 char * output(0);
465 int result;
466 if (inEnc_ == "UTF-8")
467 {
468 result = ::idna_to_ascii_8z(buf, &output, 0);
469 }
470 else
471 {
472 result = ::idna_to_unicode_8z8z(buf, &output, 0);
473 }
474 if (result != IDNA_SUCCESS)
475 {
476 std::free(output);
477 UI_THROW_CODE(ConversionErr_, "IDNA converter error: " + std::string(::idna_strerror((Idna_rc) result)));
478 }
479 return new StdFreeConversion(output, std::strlen(output));
480 }
481
482
483 IdnEMailConverter::IdnEMailConverter(std::string const & inEnc)
484 :Converter(inEnc, "idn-email")
485 {}
486
487 Conversion const * IdnEMailConverter::make(char const * const buf, size_t const bufSize) const
488 {
489 class T
490 {
491 public:
492 static bool isAllowedChar(char const & c)
493 {
494 unsigned short int const i(c);
495
496 return (i > 127) // Non-ASCII (UTF-8 multibyte)
497 || (i >= 48 && i <= 57) // ASCII: 0-9
498 || (i >= 65 && i <= 90) // ASCII: A-Z
499 || (i >= 97 && i <= 122) // ASCII: a-z
500 || (c == '-')
501 || (c == '.');
502 }
503 };
504
505 // First, we need UNICODE: UTF-8
506 std::string result(RecoderCache::get(inEnc_, "UTF-8", true).run(buf, bufSize));
507
508 // Find "@"
509 std::string::size_type atPos(result.find('@'));
510 while (atPos != std::string::npos)
511 {
512 std::string::size_type spacePos(atPos+1);
513 while (spacePos < result.size() && T::isAllowedChar(result[spacePos]))
514 {
515 ++spacePos;
516 }
517
518 std::string const domain(result.substr(atPos+1, spacePos == std::string::npos ? std::string::npos : spacePos-atPos));
519 std::string const idnDomain(RecoderCache::get("UTF-8", "idn").run(domain));
520 result.replace(atPos+1, domain.size(), idnDomain);
521 atPos = result.find('@', atPos+1);
522 }
523
524 // Lastly, re-encode into original char encoding
525 return new StringConversion(new std::string(RecoderCache::get("UTF-8", inEnc_, true).run(result)));
526 }
527
528
529 bool Recoder::isEnc(std::string const & enc, std::string const & encs) const
530 {
531 return isToken(enc, encs, ",", -1);
532 }
533
534 Recoder::Recoder(std::string const & inEnc, std::string const & outEnc, bool const & sloppy)
535 :converter_(0)
536 {
537 if (isEnc(inEnc, "data") && isEnc(outEnc, "base64,b64,64"))
538 {
539 converter_ = new Cpp2Base64Converter(true);
540 }
541 else if (isEnc(inEnc, "base64,b64,64") && isEnc(outEnc, "data"))
542 {
543 converter_ = new Cpp2Base64Converter(false);
544 }
545 else if (isEnc(inEnc, "data") && isEnc(outEnc, "url,urlenc"))
546 {
547 converter_ = new URLConverter(true);
548 }
549 else if (isEnc(inEnc, "url,urlenc") && isEnc(outEnc, "data"))
550 {
551 converter_ = new URLConverter(false);
552 }
553 else if (isEnc(outEnc, "rfc2047"))
554 {
555 converter_ = new Rfc2047Converter(inEnc);
556 }
557 else if (isEnc(inEnc, "utf-8,utf8") && isEnc(outEnc, "rfc3490,idn"))
558 {
559 converter_ = new Rfc3490Utf8Converter(true);
560 }
561 else if (isEnc(inEnc, "rfc3490,idn") && isEnc(outEnc, "utf-8,utf8"))
562 {
563 converter_ = new Rfc3490Utf8Converter(false);
564 }
565 else if (isEnc(outEnc, "idn-email"))
566 {
567 converter_ = new IdnEMailConverter(inEnc);
568 }
569 else
570 {
571 #ifdef WIN32
572 converter_ = new IConvConverter(inEnc, outEnc, sloppy);
573 #else
574 converter_ = new LibRecodeConverter(inEnc, outEnc, sloppy);
575 #endif
576 }
577 assert(converter_);
578 }
579
580 Recoder::~Recoder()
581 {
582 delete converter_;
583 }
584
585 Conversion const * Recoder::make(char const * src, size_t srcSize) const
586 {
587 return converter_->make(src, srcSize);
588 }
589
590 Conversion const * Recoder::make(char const * src) const
591 {
592 return make(src, std::strlen(src));
593 }
594
595 std::string Recoder::run(char const * const buf, size_t const bufSize) const
596 {
597 std::auto_ptr<Conversion const> conv(make(buf, bufSize));
598 return conv->getString();
599 }
600
601 std::string Recoder::run(char const * const src) const
602 {
603 std::auto_ptr<Conversion const> conv(make(src));
604 return conv->getString();
605 }
606
607 std::string Recoder::run(std::string const & src) const
608 {
609 std::auto_ptr<Conversion const> conv(make(src.c_str(), src.size()));
610 return conv->getString();
611 }
612
613 RecoderCache * RecoderCache::instance_(0);
614
615 Recoder const & RecoderCache::get(std::string const & inEnc, std::string const & outEnc, bool const & sloppy)
616 {
617 if (!instance_) { instance_ = new RecoderCache(); }
618 std::string const key(inEnc + ".." + outEnc + "/" + tos(sloppy));
619
620 RecoderMap::const_iterator i(instance_->cache_.find(key));
621
622 if (i == instance_->cache_.end())
623 {
624 instance_->cache_[key] = new Recoder(inEnc, outEnc, sloppy);
625 return *(instance_->cache_[key]);
626 }
627 else
628 {
629 return *i->second;
630 }
631 }
632
633 RecoderCache::~RecoderCache()
634 {
635 delStringMap(cache_);
636 }
637
638 }}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_RECODER_HPP
4 #define UI_UTIL_RECODER_HPP
5
6 // STDC++
7 #include <string>
8 #include <map>
9
10 // C libraries
11 #ifdef WIN32
12 #define PARAMS(Args) Args
13 #else
14 #include <recodext.h>
15 #endif
16
17 // C++ libraries
18 #include <ui-utilcpp/Exception.hpp>
19 #include <ui-utilcpp/Misc.hpp>
20
21 namespace UI {
22 namespace Util {
23
24 /** @brief Holder class for conversion results. */
25 class Conversion
26 {
27 private:
28 char const * const cStr_;
29 size_t const cSize_;
30
31 public:
32 /** @brief Constructor. */
33 Conversion(char const * const cStr, size_t const cSize);
34 virtual ~Conversion();
35
36 /** @brief Get conversion data.
37 *
38 * @note: This is a C-String, i.e., it always ends in a
39 * zero-byte. However, there also may be zero-bytes in between
40 * (depending on the encoding); you would also need getSize() in
41 * that case.
42 */
43 char const * get() const;
44
45 /** @brief Get size (in bytes) of conversion data. */
46 size_t getSize() const;
47
48 /** @brief Get std::string copy of conversion data.
49 *
50 * @note This copies the whole conversion (not only the C-String)
51 * into the std::string (@see get()).
52 */
53 std::string getString() const;
54 };
55
56
57 /** @brief Conversion w/ std::free call on the supplied C-String. */
58 class StdFreeConversion: public Conversion
59 {
60 private:
61 void * freeObject_;
62 public:
63 /** @brief Constructor. cStr will be std::free'd. */
64 StdFreeConversion(char * cStr, size_t const cSize);
65 virtual ~StdFreeConversion();
66 };
67
68 /** @brief Conversion w/ std::string holder. */
69 class StringConversion: public Conversion
70 {
71 private:
72 std::string * delObject_;
73 public:
74 /** @brief Constructor. str will be delete'd. */
75 StringConversion(std::string * str);
76 virtual ~StringConversion();
77 };
78
79
80 /** @brief Factory for Conversions. */
81 class Converter
82 {
83 public:
84 /** @brief Error codes for exceptions. */
85 enum ErrorCode
86 {
87 EncUnknown_,
88 ConversionErr_,
89 UnknownErr_
90 };
91 /** @brief Exceptions for this class. */
92 typedef CodeException<ErrorCode> Exception;
93
94 /** @brief Converter base constructor. */
95 Converter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false);
96 virtual ~Converter();
97
98 /** @brief Convert from byte buffer. */
99 virtual Conversion const * make(char const * const buf, size_t const bufSize) const = 0;
100
101 /** @brief Convert from C-String. */
102 Conversion const * make(char const * const cStr) const;
103
104 /** @brief Convert from std::string. */
105 Conversion const * make(std::string const & str) const;
106
107 /** @brief Get id (informational). */
108 std::string getID() const;
109
110 protected:
111 /** @name Input/output encoding and sloppy conversion flag.
112 * @{ */
113 std::string const inEnc_;
114 std::string const outEnc_;
115 bool const sloppy_;
116 //* @} */
117 };
118
119
120 #ifndef WIN32
121 /** @brief Converter based on librecode (see there). */
122 class LibRecodeConverter: public Converter
123 {
124 private:
125 RECODE_OUTER outer_;
126 RECODE_REQUEST request_;
127
128 /** @brief Verbatim from librecode. */
129 static void guarantee_nul_terminator(RECODE_TASK task);
130
131 public:
132 /** @brief Constructor; this supports sloppy encoding if desired. */
133 LibRecodeConverter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false);
134 virtual ~LibRecodeConverter();
135 Conversion const * make(char const * const buf, size_t const bufSize) const;
136 };
137 #endif
138
139
140 /** @brief Character set converter, using libc's "iconv" directly. */
141 class IConvConverter: public Converter
142 {
143 private:
144 iconv_t conversion_;
145
146 public:
147 /** @brief Constructor; this does not support sloppy encoding. */
148 IConvConverter(std::string const & inEnc, std::string const & outEnc, const bool & sloppy = false);
149 virtual ~IConvConverter();
150
151 Conversion const * make(char const * const buf, size_t const bufSize) const;
152 };
153
154
155 /** @brief Converter for URL-Encoding. */
156 class URLConverter: public Converter
157 {
158 public:
159 /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */
160 URLConverter(bool const encode=true);
161
162 Conversion const * make(char const * const buf, size_t const bufSize) const;
163
164 /** @note All below is copied 1-1 from the from URL class. */
165 private:
166 static const unsigned char MinNum = 0x30;
167 static const unsigned char MaxNum = 0x39;
168 static const unsigned char MinAlp = 0x41;
169 static const unsigned char MaxAlp = 0x46;
170 static const unsigned char NumMod = 0x30;
171 static const unsigned char AlpMod = 0x37;
172 static const unsigned char MinAlp2 = 0x61;
173 static const unsigned char MaxAlp2 = 0x66;
174 static const unsigned char AlpMod2 = 0x57;
175
176
177 /** @brief Convert an ASCII representation of a hex digit into its byte value e.g. : "b" = '00001011" = 11.
178 *
179 * @param in the hex digit ASCII code
180 *
181 * @returns the byte value of the hex digit
182 */
183 static unsigned char number(unsigned char in);
184
185 public:
186 /**@brief Encode an URL string.
187 *
188 * The following rules are applied in the conversion:
189 * The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9"
190 * remain the same.
191 * The special characters ".", "-", "*", and "_" remain the same.
192 * The space character " " is converted into a plus sign "+".
193 * The other special characters will be converted in a sequence of the form "%xy"
194 * which epresenting a byte where xy is the two-digit hexadecimal representation of
195 * the 8 bits.
196 *
197 * @param url the URL to encode
198 *
199 * @returns the encoded URL
200 */
201 static std::string encode(std::string const & url);
202
203 /** @brief Decode an URL encoded string.
204 *
205 * The following rules are applied in the conversion:
206 * The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9"
207 * remain the same.
208 * The special characters ".", "-", "*", and "_" remain the same.
209 * The plus sign "+" is converted into a space character " ".
210 * A sequence of the form "%xy" will be treated as representing a byte where xy is
211 * the two-digit hexadecimal representation of the 8 bits.
212 *
213 * @param url the encoded URL string
214 *
215 * @returns the decoded URL
216 */
217 static std::string decode(std::string const & url);
218 };
219
220
221 /** @brief Converter for Base64 encoding, using CommonCpp functions. */
222 class Cpp2Base64Converter: public Converter
223 {
224 public:
225 /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */
226 Cpp2Base64Converter(bool const encode=true);
227 Conversion const * make(char const * const buf, size_t const bufSize) const;
228 };
229
230
231 /** @brief Converter charEncoding -> rfc2047 (MIME). */
232 class Rfc2047Converter: public Converter
233 {
234 public:
235 /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */
236 Rfc2047Converter(std::string const & inCharEnc);
237 Conversion const * make(char const * const buf, size_t const bufSize) const;
238 };
239
240
241 /** @brief Converter UTF-8 <-> rfc3490 (IDN). */
242 class Rfc3490Utf8Converter: public Converter
243 {
244 public:
245 /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */
246 Rfc3490Utf8Converter(bool const encode=true);
247 Conversion const * make(char const * const buf, size_t const bufSize) const;
248 };
249
250
251 /** @brief Converter from an-char-encoded string with randomly placed email-adresse -> the same string w/ domain parts magically replaced with IDN-encoding. */
252 class IdnEMailConverter: public Converter
253 {
254 public:
255 /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */
256 IdnEMailConverter(std::string const & inEnc);
257 Conversion const * make(char const * const buf, size_t const bufSize) const;
258 };
259
260
261 /** @brief Meta converter class: converter switcher and generic interface. */
262 class Recoder
263 {
264 private:
265 bool isEnc(std::string const & enc, std::string const & encs) const;
266 Converter const * converter_;
267
268 public:
269 /** @brief Constructor; sloppy is only supported by some converters. */
270 Recoder(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false);
271 ~Recoder();
272
273 /** @name Run conversions.
274 *
275 * - Use non-factory methods "run" for temporary/small conversions.
276 * - Use factory methods "make" if results are kept, or your conversion
277 * is big and you want to optimize your code.
278 *
279 * @note Note again that Converter's are factories for
280 * Conversion's. If you use a methode here returning a Conversion
281 * pointer, you are reponsible for deletion as well.
282 *
283 * @{ */
284 Conversion const * make(char const * src, size_t srcSize) const;
285 Conversion const * make(char const * src) const;
286
287 std::string run(char const * const buf, size_t const bufSize) const;
288 std::string run(char const * const src) const;
289 std::string run(std::string const & src) const;
290 /** @} */
291 };
292
293
294 /** @brief This can be used to cache recoder instances.
295 *
296 * @note You really should use this instead of repeatedly creating
297 * temporary Recoder instances -- first, as it's expensive (at least
298 * for librecode), and second, librecode converters have a rather huge
299 * memory leak.
300 */
301
302 class RecoderCache
303 {
304 public:
305 static Recoder const & get(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false);
306 ~RecoderCache();
307
308 private:
309 typedef std::map<std::string, Recoder *> RecoderMap;
310 RecoderMap cache_;
311 static RecoderCache * instance_;
312 };
313
314 }}
315 #endif
0 /**
1 * @file SMLog.hpp
2 * @author Schlund + Partner AG
3 * @brief Syslog Macro Log: Simple logging based on compiler macros and syslog(3)
4 *
5 * Synopsis:
6 * @code
7 * #include <ui-utilcpp/SMLog.hpp>
8 * @endcode
9 *
10 * Each prirority level (see syslog(3)) gets its own compiler macro, which can be used
11 * rather straightforward in the source; the argument of the macro may include stream piping.
12 * For example:
13 *
14 * SM_LOGNOTICE("I have noticed something: " << something)
15 *
16 * Logs can be turned off at compile time (giving full run time advantage, as the code is removed)
17 * with a threshold. Additionally, you can give the facility, and additional text at compile time.
18 * For example:
19 *
20 * c++ ... -DSM_LOGLEVEL=5 -DSM_LOGADD="getpid()" -DSM_LOGFACILITY="ost::SLOG_USER"
21 *
22 * eliminates all log messages with priority higher than 5, giving the process id as additional
23 * information
24 *
25 * Logging itself is done CommonC++'s Slog. It is common to make the following
26 * configuration (Note: currently, the facility must be given when compiling):
27 *
28 * ost::slog.open(LOGPREFIX, FACILITY); // Set prefix and syslog(3) facility.
29 *
30 * ost::slog.clogEnable(true); // En- or disable logging to "clog"
31 *
32 * levels as defined in syslog(3).
33 *
34 * The log strings automatically get several additional information, like source file name,
35 * line number, process id, etc.
36 *
37 */
38
39 /** @example SMLog.cpp
40 *
41 * Example showing log messages in all levels. Should be installed as
42 * ui-utilcpp-smlog along with the library.
43 */
44
45 #ifndef UI_UTIL_SMLOG_HPP
46 #define UI_UTIL_SMLOG_HPP
47
48 // STDC++
49 #include <iostream>
50
51 // SYSTEM C
52 #include <syslog.h>
53
54 // C++ Libraries
55 #include <cc++/slog.h>
56
57
58 #ifndef SM_LOGLEVEL
59 /** @brief The Log Level; Log code under this level gets eliminated. */
60 #define SM_LOGLEVEL LOG_NOTICE
61 #endif
62
63 #ifndef SM_LOGADD
64 /** @brief Add this text to every log messages. */
65 #define SM_LOGADD __FILE__ << ":" << __LINE__
66 #endif
67
68 #ifndef SM_LOGFACILITY
69 /** @brief The Log Facility.
70 *
71 * Normally, it should be enough to configure this once via slog.open(); however,
72 * there is no really functional "<<(level)" method in Slog, while the "<<(level, facility)" method
73 * works fine.
74 */
75 #define SM_LOGFACILITY ost::Slog::classDaemon
76 #endif
77
78 #ifndef SM_LOG
79 /**
80 * @def SM_LOG(l, x)
81 *
82 * Master Macro (must not be used directly).
83 */
84 #ifdef SM_ENABLE_CLOG
85 #define SM_LOG(l, p, x) { ost::slog(l, SM_LOGFACILITY) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; std::clog << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; }
86 #else
87 #define SM_LOG(l, p, x) ost::slog(l, SM_LOGFACILITY) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl
88 #endif
89 #endif
90
91 /** @brief Macro for syslog(3) level EMERG. */
92 #if SM_LOGLEVEL >= LOG_EMERG
93 #define SM_LOGEMERG(x) SM_LOG(ost::Slog::levelEmergency, "EMG", x)
94 #else
95 #define SM_LOGEMERG(x)
96 #endif
97
98 /** @brief Macro for syslog(3) level ALERT. */
99 #if SM_LOGLEVEL >= LOG_ALERT
100 #define SM_LOGALERT(x) SM_LOG(ost::Slog::levelAlert, "ALT", x)
101 #else
102 #define SM_LOGALERT(x)
103 #endif
104
105 /** @brief Macro for syslog(3) level CRIT. */
106 #if SM_LOGLEVEL >= LOG_CRIT
107 #define SM_LOGCRIT(x) SM_LOG(ost::Slog::levelCritical, "CRT", x)
108 #else
109 #define SM_LOGCRIT(x)
110 #endif
111
112 /** @brief Macro for syslog(3) level ERR. */
113 #if SM_LOGLEVEL >= LOG_ERR
114 #define SM_LOGERR(x) SM_LOG(ost::Slog::levelError, "ERR", x)
115 #else
116 #define SM_LOGERR(x)
117 #endif
118
119 /** @brief Macro for syslog(3) level WARNING. */
120 #if SM_LOGLEVEL >= LOG_WARNING
121 #define SM_LOGWARNING(x) SM_LOG(ost::Slog::levelWarning, "WRN", x)
122 #else
123 #define SM_LOGWARNING(x)
124 #endif
125
126 /** @brief Macro for syslog(3) level NOTICE. */
127 #if SM_LOGLEVEL >= LOG_NOTICE
128 #define SM_LOGNOTICE(x) SM_LOG(ost::Slog::levelNotice, "ntc", x)
129 #else
130 #define SM_LOGNOTICE(x)
131 #endif
132
133 /** @brief Macro for syslog(3) level INFO. */
134 #if SM_LOGLEVEL >= LOG_INFO
135 #define SM_LOGINFO(x) SM_LOG(ost::Slog::levelInfo, "inf", x)
136 #else
137 #define SM_LOGINFO(x)
138 #endif
139
140 /** @brief Macro for syslog(3) level DEBUG. */
141 #if SM_LOGLEVEL >= LOG_DEBUG
142 #define SM_LOGDEBUG(x) SM_LOG(ost::Slog::levelDebug, "dbg", x)
143 #else
144 #define SM_LOGDEBUG(x)
145 #endif
146
147 /** @name Additional debug levels 8-11.
148 * @{ */
149 #if SM_LOGLEVEL >= 8
150 #define SM_LOGDEBUG1(x) SM_LOGDEBUG(x)
151 #else
152 #define SM_LOGDEBUG1(x)
153 #endif
154
155 #if SM_LOGLEVEL >= 9
156 #define SM_LOGDEBUG2(x) SM_LOGDEBUG(x)
157 #else
158 #define SM_LOGDEBUG2(x)
159 #endif
160
161 #if SM_LOGLEVEL >= 10
162 #define SM_LOGDEBUG3(x) SM_LOGDEBUG(x)
163 #else
164 #define SM_LOGDEBUG3(x)
165 #endif
166
167 #if SM_LOGLEVEL >= 11
168 #define SM_LOGDEBUG4(x) SM_LOGDEBUG(x)
169 #else
170 #define SM_LOGDEBUG4(x)
171 #endif
172 /** @} */
173
174 #endif
0 /**
1 * @file SMLogMono.hpp
2 * @author Schlund + Partner AG
3 * @brief Syslog Macro Log: Simple logging based on compiler macros and syslog(3) for mono-threaded aplications
4 * @see SMLog.hpp
5 *
6 * Synopsis:
7 * @code
8 * #include <ui-utilcpp/SMLogMono.hpp>
9 * @endcode
10 *
11 * This can be used as drop-in replacement for SMLog.hpp, i.e. the source using these
12 * logging macros does not need to be changed.
13 *
14 * Each prirority level (see syslog(3)) gets its own compiler macro, which can be used
15 * rather straightforward in the source; the argument of the macro may include stream piping.
16 * For example:
17 *
18 * SM_LOGNOTICE("I have noticed something: " << something)
19 *
20 * Logs can be turned off at compile time (giving full run time advantage, as the code is removed)
21 * with a threshold. Additionally, you can give the facility, and additional text at compile time.
22 * For example:
23 *
24 * c++ ... -DSM_LOGLEVEL=5 -DSM_LOGADD="getpid()" -DSM_LOGFACILITY="ost::SLOG_USER"
25 *
26 * eliminates all log messages with priority higher than 5, giving the process id as additional
27 * information
28 *
29 * Logging itself is done via SysLogMonoSingleton; it should be configured
30 * somewhere at the beginning of your program, for example like:
31 *
32 * @code
33 * UI::Util::SysLogMonoSingleton logger("dvdb", LOG_PERROR, LOG_DAEMON);
34 * @endcode
35 *
36 */
37
38 /**
39 * @example SMLogMono.cpp
40 * Example showing log messages in all levels.
41 * Should be installed as ui-utilcpp-smlogmono along with the library.
42 */
43
44 #ifndef UI_UTIL_SMLOGMONO_HPP
45 #define UI_UTIL_SMLOGMONO_HPP
46
47 // STDC++
48 #include <iostream>
49
50 // SYSTEM C
51 #include <syslog.h> // BSD
52
53 // Local
54 #include <ui-utilcpp/SysLogMono.hpp>
55
56 #ifndef SM_LOGLEVEL
57 /** @brief The Log Level; Log code under this level gets eliminated. */
58 #define SM_LOGLEVEL LOG_NOTICE
59 #endif
60
61 /** @brief Add this text to every log messages. */
62 #ifndef SM_LOGADD
63 #define SM_LOGADD __FILE__ << ":" << __LINE__
64 #endif
65
66 #ifndef SM_LOG
67 /** @brief Master Macro (must not be used directly). */
68 #ifdef SM_ENABLE_CLOG
69 #define SM_LOG(l, p, x) { UI::Util::SysLogMonoSingleton::log(l) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; std::clog << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; }
70 #else
71 #define SM_LOG(l, p, x) UI::Util::SysLogMonoSingleton::log(l) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl
72 #endif
73 #endif
74
75
76 /** @brief Macro for syslog(3) level EMERG. */
77 #if SM_LOGLEVEL >= LOG_EMERG
78 #define SM_LOGEMERG(x) SM_LOG(LOG_EMERG, "EMG", x)
79 #else
80 #define SM_LOGEMERG(x)
81 #endif
82
83 /** @brief Macro for syslog(3) level ALERT. */
84 #if SM_LOGLEVEL >= LOG_ALERT
85 #define SM_LOGALERT(x) SM_LOG(LOG_ALERT, "ALT", x)
86 #else
87 #define SM_LOGALERT(x)
88 #endif
89
90 /** @brief Macro for syslog(3) level CRIT. */
91 #if SM_LOGLEVEL >= LOG_CRIT
92 #define SM_LOGCRIT(x) SM_LOG(LOG_CRIT, "CRT", x)
93 #else
94 #define SM_LOGCRIT(x)
95 #endif
96
97 /** @brief Macro for syslog(3) level ERR. */
98 #if SM_LOGLEVEL >= LOG_ERR
99 #define SM_LOGERR(x) SM_LOG(LOG_ERR, "ERR", x)
100 #else
101 #define SM_LOGERR(x)
102 #endif
103
104 /** @brief Macro for syslog(3) level WARNING. */
105 #if SM_LOGLEVEL >= LOG_WARNING
106 #define SM_LOGWARNING(x) SM_LOG(LOG_WARNING, "WRN", x)
107 #else
108 #define SM_LOGWARNING(x)
109 #endif
110
111 /** @brief Macro for syslog(3) level NOTICE. */
112 #if SM_LOGLEVEL >= LOG_NOTICE
113 #define SM_LOGNOTICE(x) SM_LOG(LOG_NOTICE, "ntc", x)
114 #else
115 #define SM_LOGNOTICE(x)
116 #endif
117
118 /** @brief Macro for syslog(3) level INFO. */
119 #if SM_LOGLEVEL >= LOG_INFO
120 #define SM_LOGINFO(x) SM_LOG(LOG_INFO, "inf", x)
121 #else
122 #define SM_LOGINFO(x)
123 #endif
124
125 /** @brief Macro for syslog(3) level DEBUG. */
126 #if SM_LOGLEVEL >= LOG_DEBUG
127 #define SM_LOGDEBUG(x) SM_LOG(LOG_DEBUG, "dbg", x)
128 #else
129 #define SM_LOGDEBUG(x)
130 #endif
131
132 /** @name Additional debug levels 8-11.
133 * @{ */
134 #if SM_LOGLEVEL >= 8
135 #define SM_LOGDEBUG1(x) SM_LOGDEBUG(x)
136 #else
137 #define SM_LOGDEBUG1(x)
138 #endif
139
140 #if SM_LOGLEVEL >= 9
141 #define SM_LOGDEBUG2(x) SM_LOGDEBUG(x)
142 #else
143 #define SM_LOGDEBUG2(x)
144 #endif
145
146 #if SM_LOGLEVEL >= 10
147 #define SM_LOGDEBUG3(x) SM_LOGDEBUG(x)
148 #else
149 #define SM_LOGDEBUG3(x)
150 #endif
151
152 #if SM_LOGLEVEL >= 11
153 #define SM_LOGDEBUG4(x) SM_LOGDEBUG(x)
154 #else
155 #define SM_LOGDEBUG4(x)
156 #endif
157 /** @} */
158
159 #endif
0 /**
1 * @file
2 * @brief Include this to use the namespace shortcuts.
3 */
4 #ifndef UI_UTIL_SHORTCUTS_HPP
5 #define UI_UTIL_SHORTCUTS_HPP
6
7 namespace UI { namespace Util { namespace Sys {} namespace Http {} }}
8
9 namespace U = UI::Util;
10 namespace US = UI::Util::Sys;
11 namespace UH = UI::Util::Http;
12
13 #endif
0 #include "config.h"
1
2 // Implementation
3 #include "Socket.hpp"
4
5 // STDC++
6 #include <cassert>
7 #include <fstream>
8
9 // Local
10 #include "Text.hpp"
11
12 namespace UI {
13 namespace Util {
14
15 Socket::Socket(int fd, bool closeFd)
16 #ifndef WIN32
17 :FileDescriptor(fd, closeFd)
18 #else
19 :fd_(fd), closeFd_(closeFd)
20 #endif
21 {
22 #ifdef WIN32
23 // clear inner buffer
24 sendBuffer.clear();
25 #endif
26 }
27
28 #ifdef WIN32
29 void Socket::sendStoredBuffer()
30 {
31 // all stored data must be sent now
32 if(sendBuffer.size() > 0)
33 {
34 void *pBuffer = (void*)new char[sendBuffer.size()];
35 void *tmp = pBuffer;
36 for(size_t i = 0; i < sendBuffer.size(); i++)
37 ((char*)pBuffer)[i] = sendBuffer[i];
38
39 int nSent = 0;
40 int nRemaining = sendBuffer.size();
41 while( nRemaining > 0 )
42 {
43 nSent = ::send( fd_, (const char*)pBuffer, nRemaining, 0 );
44 if(nSent > 0)
45 {
46 pBuffer = (char*)pBuffer + nSent;
47 nRemaining -= nSent;
48 }
49 else
50 {
51 delete [] tmp;
52 UI_THROW_CODE(FileDescriptor::WriteErr_, "Error sending response, sent " + tos(sendBuffer.size() - nRemaining) + " out of " + tos(sendBuffer.size()));
53 }
54 }
55 delete [] tmp;
56
57 // clear buffer
58 sendBuffer.clear();
59 }
60 }
61
62 Socket::~Socket()
63 {
64 // send buffer if any
65 sendStoredBuffer();
66
67 if (closeFd_)
68 {
69 if (::shutdown(fd_, SD_SEND) != 0)
70 {
71 ::closesocket(fd_);
72 // No exception possible -- destructor.
73 }
74 }
75 }
76 #endif
77
78 std::string Socket::getId(bool const & peer) const
79 {
80 try
81 {
82 // Get addr struct from file descriptor
83 struct sockaddr_storage addr;
84 memset(&addr, 0, sizeof(addr));
85 socklen_t addrLen(sizeof(addr));;
86 peer ? Sys::getpeername(getFd(), (sockaddr *) &addr, &addrLen) : Sys::getsockname(getFd(), (sockaddr *) &addr, &addrLen);
87
88 // Get human-readable string
89 return Sys::getnameinfo((sockaddr *) &addr, addrLen);
90 }
91 catch (std::exception const & e)
92 {
93 return e.what();
94 }
95 }
96
97 std::string Socket::getPeerId() const
98 {
99 return getId(true);
100 }
101
102 Socket & Socket::setRcvTimeout(long int seconds, long int microseconds)
103 {
104 struct timeval const to = {seconds, microseconds}; // 1/1 seconds, 1/1000000 seconds
105 Sys::setsockopt_to(fd_, SOL_SOCKET, SO_RCVTIMEO, to);
106 return *this;
107 }
108
109 Socket & Socket::setSndTimeout(long int seconds, long int microseconds)
110 {
111 struct timeval const to = {seconds, microseconds}; // 1/1 seconds, 1/1000000 seconds
112 Sys::setsockopt_to(fd_, SOL_SOCKET, SO_SNDTIMEO, to);
113 return *this;
114 }
115
116
117 Socket & Socket::setUnblock(bool unblock)
118 {
119 try
120 {
121 if (unblock)
122 {
123 #ifndef WIN32
124 Sys::fcntl(fd_, F_SETFL, O_NONBLOCK);
125 #endif
126 }
127 return *this;
128 }
129 catch(std::exception const & e)
130 {
131 UI_THROW_CODE(FileDescriptor::UnblockErr_, "Can't unblock " + getId() + ": " + e.what());
132 }
133 }
134
135
136 Socket & Socket::bind()
137 {
138 UI_THROW_CODE(FileDescriptor::ConnectErr_, "Don't know how to bind socket " + getId());
139 }
140
141 Socket & Socket::connect()
142 {
143 UI_THROW_CODE(FileDescriptor::ConnectErr_, "Don't know how to connect socket " + getId());
144 }
145
146 Socket & Socket::listen(int backlog)
147 {
148 try
149 {
150 Sys::listen(fd_, backlog);
151 return *this;
152 }
153 catch(std::exception const & e)
154 {
155 UI_THROW_CODE(FileDescriptor::ListenErr_, "Can't set " + getId() + " to listen: " + e.what());
156 }
157 }
158
159 int Socket::accept(long int toSeconds, long int toMicroSeconds)
160 {
161 if (toSeconds == 0 && toMicroSeconds == 0)
162 {
163 return ::accept(fd_, 0, 0);
164 }
165 else
166 {
167 // We need to use select to set a timeout
168 fd_set fdSet;
169 FD_ZERO(&fdSet);
170 FD_SET(fd_, &fdSet);
171 struct timeval timeout = {toSeconds, toMicroSeconds}; // seconds, microseconds
172 int selectResult(::select(fd_+1, &fdSet, 0, 0, &timeout));
173 if (selectResult > 0)
174 {
175 assert(selectResult == 1);
176 return ::accept(fd_, 0, 0);
177 }
178 else
179 {
180 return selectResult;
181 }
182 }
183 }
184
185 int Socket::shutdown(int how, bool doThrow)
186 {
187 int const res(::shutdown(fd_, how));
188 if (res != 0 && doThrow)
189 {
190 UI_THROW_CODE(FileDescriptor::ShutdownErr_, "Error on shutdown(2) of fd " + tos(fd_));
191 }
192 return res;
193 }
194
195 ssize_t Socket::recv(void * const buf, size_t len, int flags)
196 {
197 #ifdef WIN32
198 // send stored buffer if any
199 sendStoredBuffer();
200 // receive something
201 size_t result(::recv(fd_, (char*)buf, len, flags));
202 if (result < 0) { throw UI::Exception("Error recv(2)ing from socket fd " + tos(fd_)); }
203 return result;
204 #else
205 return Sys::recv(fd_, buf, len, flags);
206 #endif
207 }
208
209 ssize_t Socket::send(void const * const msg, size_t len, int flags)
210 {
211 #ifdef WIN32
212 // put all data in the inner buffer and send nothing
213 for(size_t i = 0; i < len; i++)
214 sendBuffer.push_back(((char*)msg)[i]);
215 // send the data if around 64k
216 if(sendBuffer.size() > 60000)
217 sendStoredBuffer();
218 // return send OK
219 if (len < 0) { throw UI::Exception("Error send(2)ing to socket fd " + tos(fd_)); }
220 return len;
221 #else
222 return Sys::send(fd_, msg, len, flags);
223 #endif
224 }
225
226 std::streamsize Socket::read(void * const buf, std::streamsize count)
227 {
228 try { return static_cast<std::streamsize>(recv(buf, count)); }
229 catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::ReadErr_, "Error reading from socket " + getId() + ": " + e.what()); }
230 }
231
232 std::streamsize Socket::write(void const * const buf, std::streamsize count)
233 {
234 try { return static_cast<std::streamsize>(send(buf, count)); }
235 catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::WriteErr_, "Error writing to socket " + getId() + ": " + e.what()); }
236 }
237
238
239 INetSocket::INetSocket(std::string const & host, unsigned int port, bool closeFd, bool reuseAddr)
240 :Socket(-1, closeFd)
241 ,addrInfo_(0)
242 ,addr_(0)
243 {
244 try
245 {
246 // Generate hints struct (for getaddrinfolater).
247 struct addrinfo hints;
248 memset(&hints, 0, sizeof(struct addrinfo));
249 hints.ai_family = AF_UNSPEC; // IPv4 or IPv6
250 hints.ai_socktype = SOCK_STREAM; // TCP stream
251 hints.ai_flags = AI_PASSIVE;
252 hints.ai_protocol = 0;
253 hints.ai_canonname = 0;
254 hints.ai_addr = 0;
255 hints.ai_next = 0;
256
257 // Get addr info from host & port
258 std::string const service(tos(port));
259 Sys::getaddrinfo(host.c_str(), service.c_str(), &hints, &addrInfo_);
260
261 // Try open socket in the given order
262 addr_ = addrInfo_;
263 while (addr_ != 0 && (fd_ = ::socket(addr_->ai_family, addr_->ai_socktype, addr_->ai_protocol)) < 0)
264 {
265 addr_ = addr_->ai_next;
266 }
267 if (fd_ < 0) { UI_THROW_CODE(FileDescriptor::OpenErr_, "Can't open network address: " + host + ":" + service); }
268
269 // Optionally set SO_REUSEADDR flag
270 if (reuseAddr)
271 {
272 int const one(1);
273 Sys::setsockopt(fd_, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
274 }
275 }
276 catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::OpenErr_, e.what()); }
277 }
278
279 INetSocket::INetSocket(int fd, bool closeFd)
280 :Socket(fd, closeFd)
281 ,addrInfo_(0)
282 ,addr_(0)
283 {}
284
285 INetSocket::~INetSocket()
286 {
287 ::freeaddrinfo(addrInfo_);
288 }
289
290 INetSocket & INetSocket::bind()
291 {
292 try
293 {
294 Sys::bind(fd_, addr_->ai_addr, addr_->ai_addrlen);
295 return *this;
296 }
297 catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::BindErr_, e.what()); }
298 }
299
300 INetSocket & INetSocket::connect()
301 {
302 try
303 {
304 Sys::connect(fd_, addr_->ai_addr, addr_->ai_addrlen);
305 return *this;
306 }
307 catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::ConnectErr_, e.what()); }
308 }
309
310 #ifndef WIN32
311 UnixSocket::UnixSocket(std::string const & path, bool closeFd)
312 :Socket(-1, closeFd)
313 ,silentUnlink_(false)
314 {
315 try
316 {
317 // Create Socket
318 fd_ = Sys::socket(PF_UNIX, SOCK_STREAM, 0);
319
320 // Initialize Unix Address
321 if (strlen(path.c_str()) >= sizeof(unSa_.sun_path))
322 {
323 UI_THROW_CODE(OpenErr_, "Path name for unix socket too long");
324 }
325 unSa_.sun_family = AF_LOCAL;
326 std::strncpy(unSa_.sun_path, path.c_str(), sizeof(unSa_.sun_path));
327 }
328 catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::OpenErr_, "Can't open unix socket " + path + ": " + e.what()); }
329 }
330
331 UnixSocket::UnixSocket(int fd, bool closeFd)
332 :Socket(fd, closeFd)
333 ,silentUnlink_(false)
334 {
335 // We need to protect this from being undefined for getId().
336 unSa_.sun_path[0] = '\0';
337 }
338
339 UnixSocket::~UnixSocket()
340 {
341 if (silentUnlink_) { try { Sys::unlink(unSa_.sun_path); } catch(...) {}; }
342 }
343
344 UnixSocket & UnixSocket::bind()
345 {
346 return unixBind();
347 }
348
349 UnixSocket & UnixSocket::unixBind(uid_t uid, gid_t gid, mode_t mode, bool silentUnlink)
350 {
351 try
352 {
353 silentUnlink_ = silentUnlink;
354 if (silentUnlink_) { try { Sys::unlink(unSa_.sun_path); } catch(...) {}; }
355
356 // Bind Socket to Unix Address; this will, too, create the socket file in the filesystem
357 Sys::bind(fd_, (struct sockaddr *) &unSa_, sizeof(unSa_.sun_family) + (size_t) strlen(unSa_.sun_path));
358
359 // Set both uid and user's default group id
360 Sys::chown(unSa_.sun_path, uid, gid);
361
362 // Set permissions
363 Sys::chmod(unSa_.sun_path, mode);
364
365 return *this;
366 }
367 catch(std::exception const & e)
368 {
369 UI_THROW_CODE(FileDescriptor::BindErr_, "Can't bind " + getId() + ": " + e.what());
370 }
371 }
372
373 UnixSocket & UnixSocket::connect()
374 {
375 try
376 {
377 Sys::connect(fd_, (struct sockaddr *) &unSa_, sizeof(unSa_.sun_family) + (size_t) strlen(unSa_.sun_path));
378 return *this;
379 }
380 catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::ConnectErr_, "Can't connect " + getId() + ": " + e.what()); }
381 }
382 #endif
383
384 /** @brief socketpair(2) abstraction. */
385 SocketPair::SocketPair(bool const & closeFd)
386 :closeFd_(closeFd)
387 {
388 Sys::socketpair(AF_UNIX, SOCK_STREAM, 0, sv_);
389 }
390
391 SocketPair::~SocketPair()
392 {
393 FileDescriptor::fdClose(sv_[0], "SocketPair", closeFd_);
394 FileDescriptor::fdClose(sv_[1], "SocketPair", closeFd_);
395 }
396 int const & SocketPair::first() const { return sv_[0]; }
397 int const & SocketPair::second() const { return sv_[1]; }
398
399 }}
0 /**
1 * @file
2 * @brief Socket, descriptors and sockets.
3 */
4 #ifndef UI_UTIL_SOCKET_HPP
5 #define UI_UTIL_SOCKET_HPP
6
7 // STDC++
8 #include <string>
9 #include <iostream>
10 #include <vector>
11
12 // STDC
13 #include <ctime>
14 #include <cstring>
15
16 // C++ libraries
17 #include <ui-utilcpp/Exception.hpp>
18 #include <ui-utilcpp/Sys.hpp>
19 #include <ui-utilcpp/File.hpp>
20
21 namespace UI {
22 namespace Util {
23
24 /**
25 * @example EchoServer.cpp
26 * Example program for socket / socket streams implementation.
27 * Should be installed as ui-utilcpp-echoserver along with the library.
28 */
29
30 /** @brief Socket abstraction. */
31 class Socket
32 #ifndef WIN32
33 : public FileDescriptor
34 #endif
35 {
36 public:
37 /** @brief Construct socket. */
38 Socket(int fd=-1, bool closeFd=false);
39 #ifdef WIN32
40 ~Socket();
41
42 /** @brief Exceptions for this class. */
43 typedef CodeException<File::ErrorCode> Exception;
44 #endif
45
46 public:
47 /** @brief Get human-readable id string. */
48 std::string getId(bool const & peer=false) const;
49
50 /** @brief Get peer id. */
51 std::string getPeerId() const;
52
53 /** @name Configure socket behaviour.
54 * @{ */
55 Socket & setRcvTimeout(long int seconds, long int microseconds=0);
56 Socket & setSndTimeout(long int seconds, long int microseconds=0);
57 Socket & setUnblock(bool unblock=true);
58 /** @} */
59
60 /** @brief Connect this socket. */
61 virtual Socket & connect();
62
63 /** @brief Bind this socket. */
64 virtual Socket & bind();
65
66 /** @brief Start listening. */
67 Socket & listen(int backlog=16);
68
69 /** @brief Accept an incoming socket connection. */
70 int accept(long int toSeconds=0, long int toMicroSeconds=0);
71
72 /** @brief Shutdown socket. */
73 int shutdown(int how, bool doThrow=true);
74
75 /** @name Wrappers for recv(2) and send(2).
76 * @{ */
77 ssize_t recv(void * const buf, size_t len, int flags=0);
78 ssize_t send(void const * const msg, size_t len, int flags=0);
79 /** @} */
80
81 /** @brief C++-like virtual read method
82 *
83 * This implementation uses recv(2).
84 */
85 virtual std::streamsize read(void * const buf, std::streamsize count);
86
87 /** @brief C++-like virtual write method
88 *
89 * This implementation uses send(2).
90 */
91 virtual std::streamsize write(void const * const buf, std::streamsize count);
92 #ifdef WIN32
93 int getFd() const
94 {
95 return (int)fd_;
96 }
97 void sendStoredBuffer();
98
99 protected:
100 SOCKET fd_;
101 bool closeFd_;
102 std::vector<char> sendBuffer; // This buffer stores all data that is send using the stdSend() method;
103 // all stored data is actually send before destroying the object.
104 #endif
105 };
106
107
108 /** @brief INet Socket. */
109 class INetSocket: public Socket
110 {
111 private:
112 INetSocket(INetSocket const &);
113
114 public:
115 INetSocket(std::string const & host, unsigned int port, bool closeFd=true, bool reuseAddr=false);
116 INetSocket(int fd, bool closeFd=false);
117 ~INetSocket();
118
119 virtual INetSocket & bind();
120 virtual INetSocket & connect();
121 private:
122 struct addrinfo * addrInfo_;
123 struct addrinfo * addr_;
124 };
125
126 /** @brief Unix Socket. */
127 #ifndef WIN32
128 class UnixSocket: public Socket
129 {
130 public:
131 UnixSocket(std::string const & path, bool closeFd=true);
132 UnixSocket(int fd, bool closeFd=false);
133 ~UnixSocket();
134
135 /** @brief Bind this unix socket.
136 *
137 * @note Default permissions: "srw-------" (Only owner has rw-Access).
138 */
139 UnixSocket & unixBind(uid_t uid=::geteuid(), gid_t gid=::getegid(), mode_t mode=S_IRUSR | S_IWUSR, bool silentUnlink=true);
140 virtual UnixSocket & bind();
141 virtual UnixSocket & connect();
142
143 private:
144 struct sockaddr_un unSa_;
145 bool silentUnlink_;
146 };
147 #endif
148
149 /** @brief Template IO stream buffer for all file descriptors types. */
150 template <typename FDType>
151 class FDTypeBuf: public std::streambuf, private FDType
152 {
153 public:
154 /** @brief Constructor for file descriptor stream buffer. */
155 FDTypeBuf(int fd, bool closeFd=false, int bufPutbackSize=4, int bufDataSize=1024)
156 :FDType(fd, closeFd)
157 ,bufPutbackSize_(bufPutbackSize)
158 ,bufDataSize_(bufDataSize)
159 ,buf_(new char[bufPutbackSize_+bufDataSize_])
160 {
161 setg(buf_+bufPutbackSize, buf_+bufPutbackSize, buf_+bufPutbackSize);
162 }
163
164 ~FDTypeBuf()
165 {
166 delete[] buf_;
167 }
168
169 /** @brief Shortcut. */
170 typedef std::streambuf::traits_type traits;
171
172 protected:
173 /** @brief Buffer control variables. */
174 int bufPutbackSize_, bufDataSize_;
175 /** @brief Internal buffer. */
176 char * buf_;
177
178 /** @brief streambuf overflow overload. */
179 virtual int overflow(int c)
180 {
181 if (c != traits::eof())
182 {
183 char ch((char)c);
184 if (FDType::write(&ch, 1) != 1)
185 {
186 return traits::eof();
187 }
188 }
189 return c;
190 }
191
192 /** @brief streambuf xsputn overload. */
193 virtual std::streamsize xsputn(const char * s, std::streamsize n)
194 {
195 return FDType::write(s, n);
196 }
197
198 /** @brief streambuf underflow overload. */
199 virtual int underflow()
200 {
201 if (gptr() >= egptr())
202 {
203 int numPutback(gptr() - eback());
204 if (numPutback > bufPutbackSize_)
205 {
206 numPutback = bufPutbackSize_;
207 }
208
209 std::memmove(buf_+(bufPutbackSize_-numPutback), gptr()-numPutback, numPutback);
210
211 std::streamsize num(FDType::read(buf_+bufPutbackSize_, bufDataSize_));
212 if (num <= 0)
213 {
214 return traits::eof();
215 }
216
217 setg(buf_+(bufPutbackSize_-numPutback), buf_+bufPutbackSize_, buf_+bufPutbackSize_+num);
218 }
219
220 return traits::to_int_type(*gptr());
221 }
222 };
223
224 /** @brief IO stream for file descriptors. */
225 template <typename FDType>
226 class FDTypeStream: public std::iostream
227 {
228 public:
229 /** Constructor for file descriptor stream. */
230 FDTypeStream(int fd, bool closeFd=false)
231 :std::iostream(0)
232 ,buf_(fd, closeFd)
233 {
234 rdbuf(&buf_);
235 }
236
237 private:
238 FDTypeBuf<FDType> buf_;
239 };
240
241
242 /** @brief socketpair(2) abstraction. */
243 class SocketPair
244 {
245 private:
246 bool const closeFd_;
247 int sv_[2];
248
249 public:
250 SocketPair(bool const & closeFd=true);
251 ~SocketPair();
252 int const & first() const;
253 int const & second() const;
254 };
255
256 }}
257 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "Sys.hpp"
5
6 // STDC++
7 #include <string>
8 #include <fstream>
9
10 // POSIX C
11 #ifdef WIN32
12 #include <Windows.h>
13 #else
14 #include <sys/wait.h>
15 #include <sys/types.h>
16 #include <sys/syscall.h>
17 #endif
18
19 // System C
20 #ifdef __linux__
21 #include <sys/quota.h>
22 #include <sys/fsuid.h>
23 #ifdef HAVE_LIBPROC
24 #include <proc/readproc.h>
25 #endif
26 #endif
27
28 // C++ libraries
29 #include <ui-utilcpp/Text.hpp>
30 #include <ui-utilcpp/File.hpp>
31
32 namespace UI {
33 namespace Util {
34 namespace Sys {
35
36 #ifdef WIN32
37 // From MSDN:
38 // The WSAStartup function must be the first Windows Sockets function called by an application or DLL.
39 // It allows an application or DLL to specify the version of Windows Sockets required and retrieve details of the specific Windows Sockets implementation.
40 // The application or DLL can only issue further Windows Sockets functions after successfully calling WSAStartup.
41 void wsaStartup()
42 {
43 WSADATA wsaData = {};
44 int err = ::WSAStartup(MAKEWORD(2,2), &wsaData);
45 if (err != 0)
46 {
47 UI_THROW_ERRNO("WSAStartup failed with error " + tos(err));
48 }
49 // Confirm that the WinSock DLL supports 2.2.
50 // Note that if the DLL supports versions greater than 2.2 in addition to 2.2, it will still return
51 // 2.2 in wVersion since that is the version we requested.
52 if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2)
53 {
54 ::WSACleanup();
55 UI_THROW_ERRNO("Could not find a usable version of Winsock.dll");
56 }
57 }
58 void wsaCleanup()
59 {
60 ::WSACleanup();
61 }
62 std::string convertPath(std::string const & path)
63 {
64 // initialize result
65 CString strResult( path.c_str() );
66
67 // replace slashes with backslashes
68 strResult.Replace( "/", "\\" );
69
70 // remove slashes and backslashes (some paths have even 3 slashes at the end)
71 while( ( 1 < strResult.GetLength() ) &&
72 ( '\\' == strResult[strResult.GetLength()-1] ) )
73 strResult = strResult.Left( strResult.GetLength() - 1 );
74
75 while( -1 != strResult.Find( "\\\\" ) )
76 {
77 strResult.Replace( "\\\\", "\\" );
78 }
79
80 // return fixed path
81 return std::string( (LPCTSTR)strResult );
82 }
83 #endif
84
85 void * calloc(size_t nmemb, size_t size)
86 {
87 void * result(std::calloc(nmemb, size));
88 if (result == 0) { UI_THROW_ERRNO("Error calloc(3)ing " + tos(size) + " bytes: "); }
89 return result;
90 }
91
92 void * malloc(size_t size)
93 {
94 void * result(std::malloc(size));
95 if (result == 0) { UI_THROW_ERRNO("Error malloc(3)ing " + tos(size) + " bytes: "); }
96 return result;
97 }
98
99 void free(void *ptr)
100 {
101 std::free(ptr);
102 }
103
104 int system(char const * s)
105 {
106 int const result(std::system(s));
107 if (result < 0) { UI_THROW_ERRNO("Error system(3)ing: " + std::string(s)); }
108 return result;
109 }
110
111 char * getenv(char const * name)
112 {
113 char * result(::getenv(name));
114 if (result == 0) { UI_THROW("Error getenv(3)ing: No such environment variable \"" + std::string(name) + "\""); }
115 return result;
116 }
117
118 void realpath(char const * path, char * resolved_path)
119 {
120 if (::realpath(path, resolved_path) == 0) { UI_THROW_ERRNO("Error resolving realpath(3) for " + std::string(path) + ": "); }
121 }
122
123
124 FILE * fopen(char const * path, char const * mode)
125 {
126 FILE * result(std::fopen(path, mode));
127 if (result == 0) { UI_THROW_ERRNO("Error fopen(3)ing " + std::string(path) + ": "); }
128 return result;
129 }
130
131 FILE * freopen(char const * path, char const * mode, FILE * stream)
132 {
133 FILE * result(std::freopen(path, mode, stream));
134 if (result == 0) { UI_THROW_ERRNO("Error freopen(3)ing " + std::string(path) + ": "); }
135 return result;
136 }
137
138 void fclose(FILE * fp)
139 {
140 if (std::fclose(fp) != 0) { UI_THROW_ERRNO("Error fclosing(3)ing file ptr " + tos(fp) + ": "); }
141 }
142
143 mode_t umask(mode_t mask)
144 {
145 return ::umask(mask);
146 }
147
148 void chdir(char const * path)
149 {
150 if (::chdir(path) != 0) { UI_THROW_ERRNO("Error chdir(2)ing to " + std::string(path) + ": "); }
151 }
152
153 void chown(char const * path, uid_t owner, gid_t group)
154 {
155 #ifdef WIN32
156 // note SL: do not just throw an exception here because this will cause a lot of problems
157 // Windows doesn't have to change any ownership so just ignore this
158 //UI_THROW("No chown for WIN32");
159 #else
160 if (::chown(path, owner, group) != 0) { UI_THROW_ERRNO("Error chown(2)ing " + std::string(path) + ": "); }
161 #endif
162 }
163
164 void chmod(char const * path, mode_t mode)
165 {
166 if (::chmod(path, mode) != 0) { UI_THROW_ERRNO("Error chmod(2)ing " + std::string(path) + ": "); }
167 }
168
169 void stat(char const * file_name, struct stat * buf)
170 {
171 #ifdef WIN32
172 std::string strPath = convertPath( file_name );
173 if(::stat(strPath.c_str(), buf) != 0) { UI_THROW_ERRNO("Error stat(2)ing " + std::string(file_name) + ": "); }
174 #else
175 if(::stat(file_name, buf) != 0) { UI_THROW_ERRNO("Error stat(2)ing " + std::string(file_name) + ": "); }
176 #endif
177 }
178
179 void fstat(int filedes, struct stat * buf)
180 {
181 if (::fstat(filedes, buf) != 0) { UI_THROW_ERRNO("Error fstat(2)ing fd " + tos(filedes) + ": "); }
182 }
183
184 void lstat(char const * file_name, struct stat * buf)
185 {
186 #ifdef WIN32
187 // note SL: do not just throw an exception here because this will cause a lot of problems
188 //UI_THROW("No lstat for WIN32");
189 #else
190 if (::lstat(file_name, buf) != 0) { UI_THROW_ERRNO("Error lstat(2)ing " + std::string(file_name) + ": "); }
191 #endif
192 }
193
194 void statvfs(char const * path, struct statvfs * buf)
195 {
196 #ifdef WIN32
197 // note SL: do not just throw an exception here because this will cause a lot of problems
198 //UI_THROW("No statvfs for WIN32");
199 #else
200 if (::statvfs(path, buf) != 0) { UI_THROW_ERRNO("Error statvfs(2)ing " + std::string(path) + ": "); }
201 #endif
202 }
203
204
205 void unlink(char const * pathname)
206 {
207 if (::unlink(pathname) != 0) { UI_THROW_ERRNO("Error unlink(2)ing " + std::string(pathname) + ": "); }
208 }
209
210 void remove(char const * pathname)
211 {
212 if (::remove(pathname) != 0) { UI_THROW_ERRNO("Error remove(3)ing " + std::string(pathname) + ": "); }
213 }
214
215 void rename(char const * oldpath, char const * newpath)
216 {
217 #ifdef WIN32
218 if (fileExists(newpath))
219 {
220 if (::remove(newpath) == -1) {UI_THROW_ERRNO("Error removing " + std::string(newpath) + ": ");}
221 }
222 #endif
223
224 if (::rename(oldpath, newpath) != 0) { UI_THROW_ERRNO("Error rename(2)ing " + std::string(oldpath) + "->" + std::string(newpath) + ": "); }
225 }
226
227 int open(char const * pathname, int flags)
228 {
229 int const result(::open(pathname, flags));
230 if (result < 0) { UI_THROW_ERRNO("Error open(2)ing " + std::string(pathname) + ": "); }
231 return result;
232 }
233
234 int open(char const * pathname, int flags, mode_t mode)
235 {
236 int const result(::open(pathname, flags, mode));
237 if (result < 0) { UI_THROW_ERRNO("Error open(2)ing " + std::string(pathname) + " with mode " + tos(mode) + ": "); }
238 return result;
239 }
240
241 void close(int fd)
242 {
243 if (::close(fd) != 0) { UI_THROW_ERRNO("Error close(2)ing fd " + tos(fd) + ": "); }
244 }
245
246 void mkdir(char const * pathname, mode_t mode)
247 {
248 #ifdef WIN32
249 if (_mkdir(pathname) != 0) { UI_THROW_ERRNO("Cannot mkdir(2) " + std::string(pathname) + " w/ mode " + tos(mode) + ": "); }
250 #else
251 if (::mkdir(pathname, mode) != 0) { UI_THROW_ERRNO("Cannot mkdir(2) " + std::string(pathname) + " w/ mode " + tos(mode) + ": "); }
252 #endif
253 }
254
255 void rmdir(char const * pathname)
256 {
257 if (::rmdir(pathname) != 0) { UI_THROW_ERRNO("Cannot rmdir(2) " + std::string(pathname) + ": "); }
258 }
259
260 int dup(int oldfd)
261 {
262 int const result(::dup(oldfd));
263 if (result < 0) { UI_THROW_ERRNO("Error dup(2)ing oldfd " + tos(oldfd) + ": "); }
264 return result;
265 }
266
267 int dup2(int oldfd, int newfd)
268 {
269 int const result(::dup2(oldfd, newfd));
270 if (result < 0) { UI_THROW_ERRNO("Error dup2(2)ing oldfd " + tos(oldfd) + ": "); }
271 return result;
272 }
273
274 int fcntl(int fd, int cmd, long arg)
275 {
276 #ifdef WIN32
277 // note SL: do not just throw an exception here because this will cause a lot of problems
278 //UI_THROW("No fcntl for WIN32");
279 return -1;
280 #else
281 int const result(::fcntl(fd, cmd, arg));
282 if (result == -1) { UI_THROW_ERRNO("Error fcntl(2)ing cmd " + tos(cmd) + " on fd " + tos(fd) + ": "); }
283 return result;
284 #endif
285 }
286
287 int fcntl(int fd, int cmd, struct flock * lock)
288 {
289 #ifdef WIN32
290 // note SL: do not just throw an exception here because this will cause a lot of problems
291 //UI_THROW("No fcntl for WIN32");
292 return -1;
293 #else
294 int const result(::fcntl(fd, cmd, lock));
295 if (result == -1) { UI_THROW_ERRNO("Error fcntl(2)ing cmd " + tos(cmd) + " on fd " + tos(fd) + ": "); }
296 return result;
297 #endif
298 }
299
300 int flock(int fd, int operation)
301 {
302 #ifdef WIN32
303 UI_THROW("No flock(2) for WIN32");
304 return -1;
305 #else
306 int const result(::flock(fd, operation));
307 if (result != 0) { UI_THROW_ERRNO("Error flock(2)ing operation " + tos(operation) + " on fd " + tos(fd) + ": "); }
308 return result;
309 #endif
310 }
311
312 struct passwd * getpwnam(char const * name)
313 {
314 #ifdef WIN32
315 // note SL: do not just throw an exception here because this will cause a lot of problems
316 //UI_THROW("No getpwnam(3) for WIN32");
317 return NULL;
318 #else
319 struct passwd * result(::getpwnam(name));
320 if (!result) { UI_THROW_ERRNO("Cannot getpwnam(3) for \"" + std::string(name) + "\": "); }
321 return result;
322 #endif
323 }
324
325 struct group * getgrnam(char const * name)
326 {
327 #ifdef WIN32
328 // note SL: do not just throw an exception here because this will cause a lot of problems
329 //UI_THROW("No getgrnam(3) for WIN32");
330 return NULL;
331 #else
332 struct group * result(::getgrnam(name));
333 if (!result) { UI_THROW_ERRNO("Cannot getgrnam(3) for \"" + std::string(name) + "\": "); }
334 return result;
335 #endif
336 }
337
338 ssize_t write(int fd, void const * buf, size_t count)
339 {
340 int const result(::write(fd, buf, count));
341 if (result < 0) { UI_THROW_ERRNO("Error write(2)ing to fd " + tos(fd) + ": "); }
342 return result;
343 }
344
345 ssize_t read(int fd, void * buf, size_t count)
346 {
347 int const result(::read(fd, buf, count));
348 if (result < 0) { UI_THROW_ERRNO("Error read(2)ing from fd " + tos(fd) + ": "); }
349 return result;
350 }
351
352 #ifndef WIN32
353 pid_t fork(void)
354 {
355 pid_t const result(::fork());
356 if (result < 0) { UI_THROW_ERRNO("Error fork(2)ing: "); }
357 return result;
358 }
359 #endif
360
361 pid_t getpid()
362 {
363 return ::getpid();
364 }
365
366 pid_t gettid()
367 {
368 #ifdef __linux__
369 return ::syscall(SYS_gettid);
370 #else
371 return ::getpid();
372 #endif
373 }
374
375 pid_t getppid()
376 {
377 #ifdef WIN32
378 return ::_getpid();
379 #else
380 return ::getppid();
381 #endif
382 }
383
384 pid_t getpgid(pid_t pid)
385 {
386 #ifdef WIN32
387 return pid; // Does not seem to be s.th. like parent group
388 #else
389 pid_t const result(::getpgid(pid));
390 if (result < 0) { UI_THROW_ERRNO("Cannot getpgid(2) on " + tos(pid) + ": "); }
391 return result;
392 #endif
393 }
394
395 #ifndef WIN32
396 pid_t waitpid(pid_t pid, int * status, int options)
397 {
398 pid_t const result(::waitpid(pid, status, options));
399 if (result < 0) { UI_THROW_ERRNO("Error waitpid(2)ing on " + tos(pid) + ": "); }
400 return result;
401 }
402 #endif
403
404 pid_t setsid()
405 {
406 #if WIN32
407 return 0;
408 #else
409 pid_t const result(::setsid());
410 if (result < 0) { UI_THROW_ERRNO("Error setsid(2)ing: "); }
411 return result;
412 #endif
413 }
414
415 #ifndef WIN32
416 uid_t getuid() { return ::getuid(); }
417 gid_t getgid() { return ::getgid(); }
418 uid_t geteuid() { return ::geteuid(); }
419 gid_t getegid() { return ::getegid(); }
420
421 void seteuid(uid_t euid)
422 {
423 if (::seteuid(euid) < 0) { UI_THROW_ERRNO("Cannot seteuid(2) to " + tos(euid) + ": "); }
424 }
425
426 void setegid(gid_t egid)
427 {
428 if (::setegid(egid) < 0) { UI_THROW_ERRNO("Cannot setegid(2) to " + tos(egid) + ": "); }
429 }
430
431 void setuid(uid_t uid)
432 {
433 if (::setuid(uid) < 0) { UI_THROW_ERRNO("Cannot setuid(2) to " + tos(uid) + ": "); }
434 }
435
436 void setgid(gid_t gid)
437 {
438 if (::setgid(gid) < 0) { UI_THROW_ERRNO("Cannot setgid(2) to " + tos(gid) + ": "); }
439 }
440
441 #ifdef HAVE_LIBPROC
442 uid_t getfsuid(pid_t const pid)
443 {
444 proc_t p;
445 if (::get_proc_stats(pid, &p) != 0)
446 {
447 return p.fuid;
448 }
449 UI_THROW("Cannot getfsuid() [libproc] for pid=" + tos(pid));
450 }
451
452 gid_t getfsgid(pid_t const pid)
453 {
454 proc_t p;
455 if (::get_proc_stats(pid, &p) != 0)
456 {
457 return p.fgid;
458 }
459 UI_THROW("Cannot getfsgid() [libproc] for pid=" + tos(pid));
460 }
461
462 #else
463
464 uid_t fsidFromProcfs(pid_t const pid, std::string const & lineId)
465 {
466 try
467 {
468 // Get path in proc filesystem.
469 std::stringstream statPath;
470 statPath << "/proc/" << pid << "/status";
471
472 // Open status file
473 std::ifstream statFile;
474 statFile.exceptions(std::ios::eofbit|std::ios::failbit|std::ios::badbit);
475 statFile.open(statPath.str().c_str());
476
477 // Read status file line by line until Uid: line is found
478 std::string line;
479 while (std::getline(statFile, line))
480 {
481 if (line.compare(0, 4, lineId + ":") == 0)
482 {
483 // Tokenize tab-separated line: 'Uid: 1000 1000 1000 1000'
484 StrVec tok(strtok(line, "\t"));
485 return ato<uid_t>(tok.at(4));
486 }
487 }
488 }
489 catch (std::exception const & e)
490 {
491 UI_THROW("Cannot parse fsid \"" + lineId + "\" from procfs for pid=" + tos(pid) + ": " + e.what());
492 }
493 UI_THROW("Cannot parse fsid \"" + lineId + "\" from procfs for pid=" + tos(pid));
494 }
495
496 uid_t getfsuid(pid_t const pid)
497 {
498 return fsidFromProcfs(pid, "Uid");
499 }
500
501 gid_t getfsgid(pid_t const pid)
502 {
503 return fsidFromProcfs(pid, "Gid");
504 }
505 #endif
506
507 void setfsuid(uid_t fsuid)
508 {
509 // No real error handling for setfsuid, so we need an extra check
510 ::setfsuid(fsuid);
511 if (fsuid != getfsuid())
512 {
513 UI_THROW("Cannot setfsuid(2) to " + tos(fsuid) + ": Still " + tos(getfsuid()));
514 }
515 }
516
517 void setfsgid(gid_t fsgid)
518 {
519 // No real error handling for setfsgid, so we need an extra check
520 ::setfsgid(fsgid);
521 if (fsgid != getfsgid())
522 {
523 UI_THROW("Cannot setfsgid(2) to " + tos(fsgid) + ": Still " + tos(getfsgid()));
524 }
525 }
526
527 #else
528 // dummy implementation
529 uid_t getuid() { return ::getuid(); }
530 gid_t getgid() { return ::getuid(); }
531 uid_t geteuid() { return ::getuid(); }
532 gid_t getegid() { return ::getuid(); }
533 uid_t getfsuid(pid_t const) { return 0; }
534 void seteuid(uid_t) {}
535 void setegid(gid_t) {}
536 void setuid(uid_t) {}
537 void setgid(gid_t) {}
538 void setfsuid(uid_t fsuid) {}
539 void setfsgid(gid_t fsgid) {}
540 #endif
541
542 void getrlimit(int resource, struct rlimit * rlim)
543 {
544 #ifdef WIN32
545 // note SL: do not just throw an exception here because this will cause a lot of problems
546 //UI_THROW("No getrlimit for WIN32");
547 #else
548 if (::getrlimit(resource, rlim) == -1) { UI_THROW_ERRNO("Cannot getrlimit(2) from " + tos(resource) + ": "); }
549 #endif
550 }
551
552 void getrusage(int who, struct rusage * usage)
553 {
554 #ifdef WIN32
555 // note SL: do not just throw an exception here because this will cause a lot of problems
556 //UI_THROW("No getrusage for WIN32");
557 #else
558 if (::getrusage(who, usage) == -1) { UI_THROW_ERRNO("Cannot getrusage(2) from " + tos(who) + ": "); }
559 #endif
560 }
561
562 void setrlimit(int resource, struct rlimit const * rlim)
563 {
564 #ifdef WIN32
565 // note SL: do not just throw an exception here because this will cause a lot of problems
566 //UI_THROW("No setrlimit for WIN32");
567 #else
568 if (::setrlimit(resource, rlim) == -1) { UI_THROW_ERRNO("Cannot setrlimit(2) for " + tos(resource) + ": "); }
569 #endif
570 }
571
572
573 unsigned int sleep(unsigned int seconds)
574 {
575 #ifdef WIN32
576 Sleep(DWORD(seconds * 1000));
577 return 0;
578 #else
579 return ::sleep(seconds);
580 #endif
581 }
582
583
584 int socket(int domain, int type, int protocol)
585 {
586 int const result(::socket(domain, type, protocol));
587 if (result < 0) { UI_THROW_ERRNO("Error on socket(2): "); }
588 return result;
589 }
590
591 void getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
592 {
593 int const r(::getaddrinfo(node, service, hints, res));
594 if (r != 0) { UI_THROW(std::string("Cannot getaddrinfo(3) for '") + node + ":" + service + "': " + ::gai_strerror(r)); }
595 }
596
597 void getnameinfo(const struct sockaddr * sa, socklen_t salen, char * host, size_t hostlen, char * serv, size_t servlen, int flags)
598 {
599 int const res(::getnameinfo(sa, salen, host, hostlen, serv, servlen, flags));
600 if (res != 0) { UI_THROW(std::string("Cannot getnameinfo(3): ") + ::gai_strerror(res)); }
601 }
602
603 std::string getnameinfo(const struct sockaddr * sa, socklen_t salen)
604 {
605 char host[255];
606 char service[80];
607 Sys::getnameinfo(sa, salen, host, 254, service, 79, 0);
608 return std::string(host) + ":" + service;
609 }
610
611 void getpeername(int s, struct sockaddr * name, socklen_t * namelen)
612 {
613 if (::getpeername(s, name, namelen) != 0) { UI_THROW_ERRNO("Cannot getpeername(2) from socket fd " + tos(s) + ": "); }
614 }
615
616 void getsockname(int s, struct sockaddr * name, socklen_t * namelen)
617 {
618 if (::getsockname(s, name, namelen) != 0) { UI_THROW_ERRNO("Cannot getsockname(2) from socket fd " + tos(s) + ": "); }
619 }
620
621 void setsockopt(int s, int level, int optname, void const * optval, socklen_t optlen)
622 {
623 #ifdef WIN32
624 char const * my_optval((char const *)optval);
625 #else
626 void const * my_optval(optval);
627 #endif
628 if (::setsockopt(s, level, optname, my_optval, optlen) != 0) { UI_THROW_ERRNO("Cannot setsockopt(2) on socket fd " + tos(s) + ": "); }
629 }
630
631 void setsockopt_to(int s, int level, int optname, struct timeval const & tv)
632 {
633 #ifdef WIN32
634 //WinSock wants the timeout in milliseconds
635 int const millis(tv.tv_sec * 1000 + tv.tv_usec / 1000);
636 Sys::setsockopt(s, level, optname, (const char*)&millis, sizeof(millis));
637 #else
638 Sys::setsockopt(s, level, optname, &tv, sizeof(tv));
639 #endif
640 }
641
642
643 ssize_t recv(int s, void * buf, size_t len, int flags)
644 {
645 #ifdef WIN32
646 ssize_t const result(::recv(s, (char*)buf, len, flags));
647 #else
648 ssize_t const result(::recv(s, buf, len, flags));
649 #endif
650 if (result < 0) { UI_THROW_ERRNO("Error recv(2)ing from socket fd " + tos(s) + ": "); }
651 return result;
652 }
653
654 ssize_t send(int s, void const * buf, size_t len, int flags)
655 {
656 #ifdef WIN32
657 ssize_t const result(::send(s, (char*)buf, len, flags));
658 #else
659 ssize_t const result(::send(s, buf, len, flags));
660 #endif
661 if (result < 0) { UI_THROW_ERRNO("Error send(2)ing to socket fd " + tos(s) + ": "); }
662 return result;
663 }
664
665 void listen(int s, int backlog)
666 {
667 if (::listen(s, backlog) != 0) { UI_THROW_ERRNO("Cannot listen(2) on socket fd " + tos(s) + ": "); }
668 }
669
670 void bind(int sockfd, struct sockaddr * my_addr, socklen_t addrlen)
671 {
672 if (::bind(sockfd, my_addr, addrlen) != 0)
673 {
674 UI_THROW_ERRNO("Cannot bind(2) socket fd '" + tos(sockfd) + "' to '" + Sys::getnameinfo(my_addr, addrlen) + "': ");
675 }
676 }
677
678 void connect(int sockfd, const struct sockaddr * serv_addr, socklen_t addrlen)
679 {
680 if (::connect(sockfd, serv_addr, addrlen) != 0)
681 {
682 UI_THROW_ERRNO("Cannot connect(2) socket fd '" + tos(sockfd) + "' to '" + Sys::getnameinfo(serv_addr, addrlen) + "': ");
683 }
684 }
685
686 int select(int n, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval * timeout)
687 {
688 int const result(::select(n, readfds, writefds, exceptfds, timeout));
689 if (result < 0) { UI_THROW_ERRNO("Error on select(2): "); }
690 return result;
691 }
692
693 void socketpair(int d, int type, int protocol, int sv[2])
694 {
695 #ifdef WIN32
696 // note SL: do not just throw an exception here because this will cause a lot of problems
697 //UI_THROW("WIN32 has no socketpair call");
698 #else
699 if (::socketpair(d, type, protocol, sv) != 0) { UI_THROW_ERRNO("Cannot create socketpair(2): "); }
700 #endif
701 }
702
703
704 void gettimeofday(struct timeval * tv, struct timezone * tz)
705 {
706 if (::gettimeofday(tv, tz) < 0) { UI_THROW_ERRNO("Cannot gettimeofday(2): "); }
707 }
708
709 void settimeofday(struct timeval const * tv , struct timezone const * tz)
710 {
711 #ifdef WIN32
712 // note SL: do not just throw an exception here because this will cause a lot of problems
713 //UI_THROW("WIN32 has no settimeofday call");
714 #else
715 if (::settimeofday(tv, tz) < 0) { UI_THROW_ERRNO("Cannot settimeofday(2): "); }
716 #endif
717 }
718
719 iconv_t iconv_open(char const * tocode, char const * fromcode)
720 {
721 iconv_t const result(::iconv_open(tocode, fromcode));
722 if (result == (iconv_t) -1) { UI_THROW_ERRNO("Error iconv_open(3)ing: " + std::string(tocode) + "<-" + std::string(fromcode)); }
723 return result;
724 }
725
726 void iconv_close(iconv_t cd)
727 {
728 if (::iconv_close(cd) < 0) { UI_THROW_ERRNO("Cannot iconv_close(3) iconv_t " + tos(cd)); }
729 }
730
731 void quotactl(int cmd, char const * special, int id, caddr_t addr)
732 {
733 #ifdef WIN32
734 // note SL: do not just throw an exception here because this will cause a lot of problems
735 //UI_THROW("No quotactl for WIN32");
736 #else
737 if (::quotactl(cmd, special, id, addr) < 0) { UI_THROW_ERRNO("quotactl(2) failed for " + tos(id) + " on " + special + ": "); }
738 #endif
739 }
740
741 size_t confstr(int name, char * buf, size_t len)
742 {
743 #ifdef WIN32
744 return (size_t) 0;
745 #else
746 return ::confstr(name, buf, len);
747 #endif
748 }
749
750 std::string getconf(int id)
751 {
752 size_t n(confstr(id, 0, (size_t)0));
753 if (n == 0)
754 {
755 return EmptyString_;
756 }
757 else
758 {
759 std::vector<char> result(n);
760 confstr(id, &result[0], n);
761 return &result[0];
762 }
763 }
764
765 // POSIX1e Capapilities
766 #ifdef __linux__
767 cap_t cap_init(void)
768 {
769 cap_t c(::cap_init());
770 if (c == 0) { UI_THROW_ERRNO("cap_init(3) failed: "); }
771 return c;
772 }
773
774 void cap_free(void * obj)
775 {
776 if (::cap_free(obj) != 0) { UI_THROW_ERRNO("cap_free(3) failed: "); }
777 }
778
779 cap_t cap_dup(cap_t c)
780 {
781 cap_t cDup(::cap_dup(c));
782 if (cDup == 0) { UI_THROW_ERRNO("cap_dup(3) failed: "); }
783 return cDup;
784 }
785
786 cap_t cap_get_proc(void)
787 {
788 cap_t c(::cap_get_proc());
789 if (c == 0) { UI_THROW_ERRNO("cap_get_proc(3) failed: "); }
790 return c;
791 }
792
793 void cap_set_proc(cap_t c)
794 {
795 if (::cap_set_proc(c) != 0) { UI_THROW_ERRNO("cap_set_proc(3) failed: "); }
796 }
797
798 void cap_clear(cap_t c)
799 {
800 if (::cap_clear(c) != 0) { UI_THROW_ERRNO("cap_clear(3) failed: "); }
801 }
802
803 #ifdef HAVE_CAP_CLEAR_FLAG
804 void cap_clear_flag(cap_t c, cap_flag_t f)
805 {
806 if (::cap_clear_flag(c, f) != 0) { UI_THROW_ERRNO("cap_clear_flag(3) failed: "); }
807 }
808 #endif
809
810 void cap_get_flag(cap_t c, cap_value_t v, cap_flag_t f, cap_flag_value_t *vp)
811 {
812 if (::cap_get_flag(c, v, f, vp) != 0) { UI_THROW_ERRNO("cap_clear_flag(3) failed: "); }
813 }
814
815 void cap_set_flag(cap_t c, cap_flag_t f, int n, const cap_value_t * va, cap_flag_value_t v)
816 {
817 // @note: (cap_value_t *) non-const cast is compat for libcap1 only
818 if (::cap_set_flag(c, f, n, (cap_value_t *) va, v) != 0) { UI_THROW_ERRNO("cap_set_flag(3) failed: "); }
819 }
820
821 #ifdef HAVE_CAP_COMPARE
822 int cap_compare(cap_t c1, cap_t c2)
823 {
824 int result(::cap_compare(c1, c2));
825 if (result != 0) { UI_THROW_ERRNO("cap_compare(3) failed: "); }
826 return result;
827 }
828 #endif
829
830 cap_t cap_from_text(char const * s)
831 {
832 cap_t c(::cap_from_text(s));
833 if (c == 0) { UI_THROW_ERRNO("cap_from_text(3) failed: "); }
834 return c;
835 }
836
837 char * cap_to_text(cap_t c, ssize_t * l)
838 {
839 char * result(::cap_to_text(c, l));
840 if (result == 0) { UI_THROW_ERRNO("cap_to_text(3) failed: "); }
841 return result;
842 }
843
844 int prctl(int o, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5)
845 {
846 int result(::prctl(o, arg2, arg3, arg4, arg5));
847 if (result == -1) { UI_THROW_ERRNO("prctl(2) failed: "); }
848 return result;
849 }
850 #endif
851
852 }}}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_SYS_HPP
4 #define UI_UTIL_SYS_HPP
5
6 // STDC++
7 #include <cstdio>
8 #include <ctime>
9
10 // POSIX C
11 #include <sys/types.h>
12 #include <sys/stat.h>
13
14 #ifdef __linux__
15 #include <sys/statvfs.h>
16 #include <sys/capability.h>
17 #include <sys/prctl.h>
18 #endif
19
20 #ifdef WIN32
21 #include <atlstr.h>
22 #include "win32/UID.h"
23 // Get PATH_MAX per magic for WIN32
24 #if !defined( PATH_MAX )
25 #include <Windows.h>
26 #define PATH_MAX MAX_PATH
27 #endif
28 #if !defined( ssize_t )
29 typedef int ssize_t;
30 #endif
31 #if !defined( mode_t )
32 typedef unsigned int mode_t;
33 #endif
34 #if !defined( socklen_t )
35 typedef int socklen_t;
36 #endif
37 #if !defined( pid_t )
38 typedef int pid_t;
39 #endif
40 #if !defined( caddr_t )
41 typedef char* caddr_t;
42 #endif
43 #include <shlwapi.h>
44 #else
45 #include <unistd.h>
46 #include <sys/file.h> // BSD type locking
47 #endif
48
49 #ifndef WIN32
50 #include <pwd.h>
51 #include <grp.h>
52 #else
53 // dummy passwd struct *UNTESTED COMPAT FOR WIN32*
54 struct passwd {};
55 struct group {};
56 #endif
57
58 #ifndef WIN32
59 // System C: Resources
60 #include <sys/resource.h>
61
62 // System C: gettimeofday et.al
63 #include <sys/time.h>
64 #endif
65
66 // System C: Sockets
67 #ifdef WIN32
68 #define SD_RECEIVE 0x00
69 #define SD_SEND 0x01
70 #define SD_BOTH 0x02
71 #else
72 #include <sys/un.h>
73 #include <netinet/in.h>
74 #include <fcntl.h>
75 #include <netdb.h>
76 #include <sys/socket.h> // BSD sockets
77 #include <arpa/inet.h>
78 #endif
79
80 // System libraries
81 #include <iconv.h>
82
83 // C++ libraries
84 #include <ui-utilcpp/Exception.hpp>
85
86 namespace UI {
87 namespace Util {
88
89 /** @brief Namespace for system/library calls.
90 *
91 * @section Sys_Purpose Purpose
92 *
93 * - Error handling via exceptions (so no if-err-then-throw-style code needs to be repeated).
94 * - Automatically produce readable error strings from "errno" value in exception strings.
95 * - Transport a copy of the "errno" value up in exception object for detailed error handling if needed.
96 * - Configuration for different systems (linux,win32; ideally, there should be no ifdefs needed but in Sys.?pp).
97 *
98 * If you use a call that matches any of the points above, please include a wrapper here.
99 *
100 * @section Sys_Example Example usage
101 *
102 * Call any of the wrapper somewhere in your code:
103 @verbatim
104 ...
105 myStr = getPath();
106 UI::Util::Sys::remove(myStr);
107 // as usual, assume success
108 ...
109 @endverbatim
110 *
111 * Somewhere in your context-specific exception handler:
112 @verbatim
113 ...
114 catch (UI::Util::Sys::Exception const & e)
115 {
116 std::cerr << "System error : " << e.what() << std::endl;
117 std::cerr << "Errno error code was: " << e.getCode() << std::endl;
118 std::cerr << "Exception debug : " << e.getDebug() << std::endl;
119 }
120 ...
121 @endverbatim
122 *
123 * @section Sys_Dev_Howto How to add wrappers
124 *
125 * - Use syntax & name from the man page.
126 * - If return value is only used for error condition:yes/no: make it return void.
127 * - Just call the system/library function. On error condition (see man
128 * page), use UI_THROW_ERRNO("MY NICE PREFIX") to throw w/
129 * errno + errno text support in the exception.
130 */
131 namespace Sys {
132
133 /** @brief Use this exception class if you want to catch failures on system/library calls. */
134 class Exception: public UI::Util::Exception
135 {
136 public:
137 Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0)
138 :UI::Util::Exception(what, debug, errNo) {}
139 virtual ~Exception() throw() {};
140 };
141
142 #ifdef WIN32
143 void wsaStartup();
144 void wsaCleanup();
145 std::string convertPath(std::string const & path);
146 #endif
147
148 /** @name Drop-in replacements for system(2) and library(3) calls w/ exception handling on errors.
149 * @{ */
150 void * calloc(size_t nmemb, size_t size);
151 void * malloc(size_t size);
152 void free(void * ptr);
153
154 int system(char const * s);
155 char * getenv(char const * name);
156
157 void realpath(char const * path, char * resolved_path);
158
159 FILE * fopen(char const * path, char const * mode);
160 FILE * fdopen(int fildes, char const * mode);
161 FILE * freopen(char const * path, char const * mode, FILE * stream);
162 void fclose(FILE * fp);
163
164 mode_t umask(mode_t mask);
165 void chdir(char const * path);
166 void chown(char const * path, uid_t owner, gid_t group=-1);
167 void chmod(char const * path, mode_t mode);
168
169 void stat(char const * file_name, struct stat * buf);
170 void fstat(int filedes, struct stat *buf);
171 void lstat(char const * file_name, struct stat * buf);
172 void statvfs(char const * path, struct statvfs * buf);
173
174 void unlink(char const * pathname);
175 void remove(char const * pathname);
176 void rename(char const * oldpath, char const * newpath);
177
178 int open(char const * pathname, int flags);
179 int open(char const * pathname, int flags, mode_t mode);
180 void close(int fd);
181
182 void mkdir(char const * pathname, mode_t mode);
183 void rmdir(char const * pathname);
184
185 ssize_t write(int fd, void const * buf, size_t count);
186 ssize_t read(int fd, void * buf, size_t count);
187
188 int dup(int oldfd);
189 int dup2(int oldfd, int newfd);
190
191 int fcntl(int fd, int cmd, long arg);
192 int fcntl(int fd, int cmd, struct flock * lock);
193 int flock(int fd, int operation);
194
195 struct passwd * getpwnam(char const * name);
196 struct group * getgrnam(char const * name);
197
198 #ifndef WIN32
199 pid_t fork(void);
200 #endif
201 pid_t getpid();
202 pid_t gettid();
203 pid_t getppid();
204 pid_t getpgid(pid_t pid);
205 #ifndef WIN32
206 pid_t waitpid(pid_t pid, int * status, int options);
207 #endif
208 pid_t setsid();
209 uid_t getuid();
210 gid_t getgid();
211 uid_t geteuid();
212 gid_t getegid();
213 void seteuid(uid_t euid);
214 void setegid(gid_t egid);
215 void setuid(uid_t uid);
216 void setgid(gid_t gid);
217
218 uid_t getfsuid(pid_t const pid=gettid());
219 gid_t getfsgid(pid_t const pid=gettid());
220 void setfsuid(uid_t fsuid);
221 void setfsgid(gid_t fsgid);
222
223 void getrlimit(int resource, struct rlimit * rlim);
224 void getrusage(int who, struct rusage * usage);
225 void setrlimit(int resource, struct rlimit const * rlim);
226
227 unsigned int sleep(unsigned int seconds);
228
229 int socket(int domain, int type, int protocol);
230 void getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res);
231 void getnameinfo(const struct sockaddr * sa, socklen_t salen, char * host, size_t hostlen, char * serv, size_t servlen, int flags);
232 std::string getnameinfo(const struct sockaddr * sa, socklen_t salen);
233 void getpeername(int s, struct sockaddr * name, socklen_t * namelen);
234 void getsockname(int s, struct sockaddr * name, socklen_t * namelen);
235 void setsockopt(int s, int level, int optname, void const * optval, socklen_t optlen);
236 void setsockopt_to(int s, int level, int optname, struct timeval const & tv);
237
238 ssize_t recv(int s, void * buf, size_t len, int flags);
239 ssize_t send(int s, void const * buf, size_t len, int flags);
240 void listen(int s, int backlog);
241 void bind(int sockfd, struct sockaddr * my_addr, socklen_t addrlen);
242 void connect(int sockfd, const struct sockaddr * serv_addr, socklen_t addrlen);
243 int select(int n, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval * timeout);
244 void socketpair(int d, int type, int protocol, int sv[2]);
245
246 void gettimeofday(struct timeval * tv, struct timezone * tz);
247 void settimeofday(struct timeval const * tv , struct timezone const * tz);
248
249 iconv_t iconv_open(char const * tocode, char const * fromcode);
250 void iconv_close(iconv_t cd);
251
252 void quotactl(int cmd, char const * special, int id, caddr_t addr);
253
254 size_t confstr(int name, char * buf, size_t len);
255
256 /** @brief Loosely like the shell utility "getconf". */
257 std::string getconf(int id);
258
259 // POSIX Capapilities
260 #ifdef __linux__
261 cap_t cap_init(void);
262 void cap_free(void * obj);
263 cap_t cap_dup(cap_t c);
264
265 cap_t cap_get_proc(void);
266 void cap_set_proc(cap_t c);
267 void cap_clear(cap_t c);
268 #ifdef HAVE_CAP_CLEAR_FLAG
269 void cap_clear_flag(cap_t c, cap_flag_t f);
270 #endif
271 void cap_get_flag(cap_t c, cap_value_t v, cap_flag_t f, cap_flag_value_t *vp);
272 void cap_set_flag(cap_t c, cap_flag_t f, int n, const cap_value_t * va, cap_flag_value_t v);
273 #ifdef HAVE_CAP_COMPARE
274 int cap_compare(cap_t c1, cap_t c2);
275 #endif
276
277 cap_t cap_from_text(char const * s);
278 char * cap_to_text(cap_t c, ssize_t * l);
279 /** @} */
280
281 /** @brief Linux: prctl. */
282 int prctl(int option, unsigned long arg2=-1, unsigned long arg3=-1, unsigned long arg4=-1, unsigned long arg5=-1);
283 #endif
284
285 }}}
286 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "SysLogMono.hpp"
5
6 // STDC++
7 #include <cassert>
8
9 // C: Syslog
10 #include <syslog.h>
11
12 // Local
13 #include "Misc.hpp"
14
15
16 namespace UI {
17 namespace Util {
18
19 SysLogMono::SysLogMono(std::string const & ident, int option, int facility)
20 :std::streambuf()
21 ,std::ostream((std::streambuf *)this)
22 ,ident_(ident)
23 ,buf_("")
24 ,level_(LOG_DEBUG)
25 {
26 ::openlog(ident_.c_str(), option, facility);
27 }
28
29 SysLogMono::~SysLogMono(void)
30 {
31 ::closelog();
32 }
33
34 int SysLogMono::overflow(int c)
35 {
36 if (c == '\n' || c == '\0')
37 {
38 ::syslog(level_, "%s", buf_.c_str());
39 buf_ = "";
40 }
41 else
42 {
43 buf_ += (char)c;
44 }
45 return c;
46 }
47
48 SysLogMono & SysLogMono::operator()(int level)
49 {
50 level_ = level;
51 return *this;
52 }
53
54 SysLogMonoSingleton::SysLogMonoSingleton(std::string const & ident, int option, int facility)
55 {
56 assert(singleton_ == 0);
57 singleton_ = new SysLogMono(ident, option, facility);
58 }
59
60 SysLogMonoSingleton::~SysLogMonoSingleton()
61 {
62 assert(singleton_);
63 delete singleton_;
64 singleton_ = 0;
65 }
66
67 SysLogMono & SysLogMonoSingleton::log(int level)
68 {
69 assert(singleton_);
70 return (*singleton_)(level);
71 }
72
73 SysLogMono * SysLogMonoSingleton::singleton_(0);
74
75 }}
0 /**
1 * @file SysLogMono.hpp
2 * @author Schlund + Partner AG
3 * @brief Syslog Mono Log: Singleton logger using syslog() for mono threaded applications
4 * @see SMLogMono.hpp
5 *
6 * Synopsis:
7 * @code
8 * #include <ui-utilcpp/SMLogMono.hpp>
9 * @endcode
10 *
11 */
12 #ifndef UI_UTIL_SYSLOGMONO_HPP
13 #define UI_UTIL_SYSLOGMONO_HPP
14
15 // STDC++
16 #include <string>
17 #include <iostream>
18
19 // POSIX C
20 #include <syslog.h>
21
22 namespace UI {
23 namespace Util {
24
25 /** @brief C++ Abstraction of syslog(3) for mono threaded applications. */
26 class SysLogMono: public std::streambuf, public std::ostream
27 {
28 public:
29 /**
30 * @param ident Identifier (prefix) for the log lines.
31 * @param option Options as described in syslog(3).
32 * @param facility Facility as described in syslog(3).
33 */
34 SysLogMono(std::string const & ident, int option, int facility);
35
36 /** @brief Destructor. */
37 ~SysLogMono();
38
39 /** @brief Log operator.
40 *
41 * @param level Log level as described in syslog(3).
42 */
43 SysLogMono & operator() (int level);
44
45 private:
46 int overflow(int c);
47 std::string const ident_;
48 std::string buf_;
49 int level_;
50 };
51
52 /** @brief Singleton class holding one SysLogMono object. */
53 class SysLogMonoSingleton
54 {
55 public:
56 /**
57 * @param ident Identifier (prefix) for the log lines.
58 * @param option Options as described in syslog(3).
59 * @param facility Facility as described in syslog(3).
60 */
61 SysLogMonoSingleton(std::string const & ident, int option, int facility);
62
63 /** */
64 ~SysLogMonoSingleton();
65
66 /** @brief Log function; you may stream directly into the result.
67 *
68 * @param level Log level as described in syslog(3).
69 * @returns SysLogMono stream ready to stream into.
70 */
71 static SysLogMono & log(int level);
72 private:
73 static SysLogMono * singleton_;
74 };
75
76 }}
77 #endif
0 #include "config.h"
1
2 // Implementation
3 #include "Text.hpp"
4
5 // STDC++
6 #include <cstdio>
7 #include <iostream>
8
9 // C++ libraries
10 #include <cc++/digest.h>
11
12 // Local
13 #include "Time.hpp"
14 #include "Misc.hpp"
15
16 namespace UI {
17 namespace Util {
18
19 std::string strVec2Str(StrVec const & strVec, std::string const & sep)
20 {
21 return join(sep, strVec);
22 }
23
24 std::string strerror(int const & errNo)
25 {
26 std::string result;
27
28 #ifndef UI_UTILCPP_DISABLE_STRERROR
29 #ifdef WIN32
30 result = ::strerror(errNo);
31 #else
32 int const bufSize(80);
33 char buf[bufSize];
34 #ifdef STRERROR_R_CHAR_P
35 // Non-POSIX variant (like GNU libc). See AC_FUNC_STRERROR_R autotool test, and its comments.
36 // This "may or may not use the supplied buffer" [debian sarge dev. does not ].
37 char * ret(::strerror_r(errNo, buf, bufSize-1));
38 result = ret ? ret : "";
39 #else
40 // POSIX variant
41 ::strerror_r(errNo, buf, bufSize-1);
42 result = buf;
43 #endif
44 #endif
45 #endif
46
47 return result == "" ? "No errno error string available" : result;
48 }
49
50 std::string getlineCRLF(std::istream & s)
51 {
52 std::string line;
53 if (std::getline(s, line))
54 {
55 if (line.size() > 0 && *(--line.end()) == '\r')
56 {
57 line.erase(--line.end());
58 }
59 }
60
61 return line;
62 }
63
64 std::string asciiCAPS(std::string const & in, bool const upper)
65 {
66 std::string result;
67 result.resize(in.size());
68 for (unsigned i(0); i < in.size(); ++i)
69 {
70 result[i] = upper ? static_cast<char>(std::toupper(in[i])) :
71 static_cast<char>(std::tolower(in[i]));
72 }
73 return result;
74 }
75
76 std::string & str2Ascii(std::string & s)
77 {
78 for (std::string::iterator i(s.begin()); i != s.end(); ++i)
79 {
80 #ifdef WIN32
81 if (!isascii(*i)) { *i = '?'; }
82 #else
83 if (!::isascii(*i)) { *i = '?'; }
84 #endif
85 }
86 return s;
87 }
88
89 AlphaNumericKey::AlphaNumericKey()
90 :keyChars_("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
91 ,engine_(getTimeValUSec())
92 ,distribution_(0, keyChars_.size()-1)
93 ,generator_(engine_, distribution_)
94 {}
95
96 std::string AlphaNumericKey::get(int len)
97 {
98 std::string key;
99 key.resize(len);
100 for (int j(0); j < len; j++)
101 {
102 key[j] = keyChars_[generator_()];
103 }
104 return key;
105 }
106
107 std::string genAlphaNumericKey(int len)
108 {
109 return GlobalAlphaNumericKey_.get(len);
110 }
111
112 char * strdup(char const * s)
113 {
114 assert(s);
115
116 size_t const n(std::strlen(s) + 1);
117 char * const p((char *) std::malloc(n));
118 if (p)
119 {
120 std::memcpy(p, s, n);
121 }
122 return p;
123 }
124
125 CStrArray & CStrArray::add(std::string const & str)
126 {
127 assert(!arr_.empty());
128 // Push back, but before Null-Terminator
129 arr_.insert(arr_.end()-1, strdup(str.c_str()));
130 return *this;
131 }
132
133 CStrArray::CStrArray()
134 {
135 // Add Null-Terminator
136 arr_.push_back(0);
137 }
138
139 CStrArray::~CStrArray()
140 {
141 UI::Util::freeAnySeqContainer<char const>(arr_);
142 }
143
144 char const ** CStrArray::get() const
145 {
146 assert(!arr_.empty());
147 return (char const **) &arr_[0];
148 }
149
150
151 StrVec strtok(std::string const & s, std::string const & delim, std::string const & prefix, std::string const & postfix)
152 {
153 return strtok<StrVec >(s, delim, prefix, postfix);
154 }
155
156 StrVec strtoks(std::string const & s, std::string const & delims, std::string const & prefix, std::string const & postfix)
157 {
158 return strtoks<StrVec >(s, delims, prefix, postfix);
159 }
160
161 bool isToken(std::string const & token, StrVec const & tokensVec, int const match)
162 {
163 std::string const ltoken(match == 0 ? token : asciiCAPS(token, match > 0));
164
165 for (StrVec::const_iterator i(tokensVec.begin()); i != tokensVec.end(); ++i)
166 {
167 if (*i == ltoken) { return true; };
168 }
169 return false;
170 }
171
172 bool isToken(std::string const & token, std::string const & tokens, std::string const & delim, int const match)
173 {
174 StrVec const tokensVec(strtok(tokens, delim));
175 return isToken(token, tokensVec, match);
176 }
177
178 std::string & strrpl(std::string & source, std::string const & token, std::string const & reptoken)
179 {
180 assert(!token.empty());
181 std::string::size_type i(0);
182 while ((i = source.find(token, i)) != std::string::npos)
183 {
184 source.replace(i, token.size(), reptoken);
185 i += reptoken.size();
186 }
187 return source;
188 }
189
190 std::string strrpl(std::string const & source, std::string const & token, std::string const & reptoken)
191 {
192 std::string result(source);
193 strrpl(result, token, reptoken);
194 return result;
195 }
196
197 std::string istream2String(std::istream & f, int const blockSize)
198 {
199 std::string result;
200 std::vector<char> buffer(blockSize);
201
202 while (!f.eof())
203 {
204 f.read(&buffer[0], blockSize);
205 result.append(&buffer[0], f.gcount());
206 }
207 return result;
208 }
209
210 /* lookup table for base64 characters */
211 const unsigned char XConversion::alphabet[] = {'A','B','C','D','E','F','G','H','I','J',
212 'K','L','M','N','O','P','Q','R','S','T',
213 'U','V','W','X','Y','Z','a','b','c','d',
214 'e','f','g','h','i','j','k','l','m','n',
215 'o','p','q','r','s','t','u','v','w','x',
216 'y','z','0','1','2','3','4','5','6','7',
217 '8','9','+','/','=' };
218
219 unsigned char XConversion::codes[256] = "";
220 void XConversion::codesFill() {
221
222 int i = 0;
223
224 for (i=0; i<256; i++)
225 {
226 codes[i] = 0;
227 }
228 for (i = 'A'; i <= 'Z'; i++)
229 {
230 codes[i] = static_cast<unsigned char>( i - 'A');
231 }
232 for (i = 'a'; i <= 'z'; i++)
233 {
234 codes[i] = static_cast<unsigned char>(26 + i - 'a');
235 }
236 for (i = '0'; i <= '9'; i++)
237 {
238 codes[i] = static_cast<unsigned char>(52 + i - '0');
239 }
240
241 codes[(int) '+'] = 62;
242 codes[(int) '/'] = 63;
243 }
244
245 std::string XConversion::dec2Basis( int number, const int basis ) {
246
247 std::string out("");
248 char digits[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
249 int remainder = 0;
250
251 if ( basis >= bMin && basis <=bMax ) {
252 do {
253 remainder = number % basis;
254 out = digits[remainder] + out;
255 number = number / basis;
256 } while (number>0);
257 }
258 return out;
259 }
260
261 int XConversion::getInt( unsigned char hex ) {
262 int ret=0;
263 if ( hex >= 0x41 && hex <= 0x46 ) { // A-F
264 ret = (int)(hex-0x37);
265 }
266 if ( hex >= 0x61 && hex <= 0x66 ) { // a-f
267 ret = (int)(hex-0x57);
268 }
269 if ( hex >= 0x30 && hex <= 0x39 ) { // 1-9
270 ret = (int)(hex-0x30);
271 }
272 return ret;
273 }
274
275 int XConversion::basis2Dec( std::string number, int basis ) {
276
277 int ret = getInt( (unsigned char) number[0] );
278 for ( unsigned int i=1 ; i<number.length() ; i++ ) {
279 ret = ret * basis + getInt( (unsigned char) number[i] );
280 }
281 return ret;
282 }
283
284 std::auto_ptr<unsigned char> XConversion::xorEncrypt(std::string const& message, std::string const& key, int* length)
285 {
286 unsigned char* result=0;
287 int keyLen = key.size();
288 int messageLen = message.size();
289 int i=0;
290 int j=0;
291
292 result=new unsigned char[messageLen];
293 for ( i=0 ; i<messageLen ; i++ ) {
294 result[i] = (unsigned char)(message[i]^key[j]);
295 j++;
296 if (j>=keyLen) j=0;
297 }
298 *length=i;
299 return std::auto_ptr<unsigned char>(result);
300 }
301
302 std::string XConversion::xorDecrypt(const unsigned char* message, const int length, std::string const& key) {
303
304 std::stringstream result;
305 int keyLen = key.size();
306 int messageLen = length;
307 int i=0;
308 int j=0;
309
310 if ( message ) {
311 for ( i=0 ; i<messageLen ; i++ ) {
312 result<< (char) (message[i]^key[j]);
313 j++;
314 if (j>=keyLen) j=0;
315 }
316 }
317 return std::string(result.str());
318 }
319
320 std::string XConversion::base64Encode(const unsigned char* message, const int length)
321 {
322 int i = 0;
323 int index = 0;
324 int quad = 0;
325 int trip = 0;
326 int val = 0;
327 char r0, r1, r2, r3 = 0;
328 std::stringstream result;
329
330 for (i=0, index=0; i<length; i+=3, index+=4) {
331 quad = 0;
332 trip = 0;
333 val = (0xFF & (int) message[i]);
334 val <<= 8;
335 if ((i+1) < length) {
336 val |= (0xFF & (int) message[i+1]);
337 trip = 1;
338 }
339 val <<= 8;
340 if ((i+2) < length) {
341 val |= (0xFF & (int) message[i+2]);
342 quad = 1;
343 }
344 r3=alphabet[(quad? (val & 0x3F): 64)];
345 val >>= 6;
346 r2=alphabet[(trip? (val & 0x3F): 64)];
347 val >>= 6;
348 r1=alphabet[val & 0x3F];
349 val >>= 6;
350 r0=alphabet[val & 0x3F];
351 result<<r0<<r1<<r2<<r3;
352 }
353 return std::string(result.str());
354 }
355
356 std::auto_ptr<unsigned char> XConversion::base64Decode(std::string const& message, int* length) {
357
358 int ix = 0;
359
360 int shift = 0; /* # of excess bits stored in accum */
361 int accum = 0; /* excess bits */
362 int index = 0;
363 int value = 0;
364 int inLen = message.size();
365 unsigned char* result= NULL;
366 /* 4 chars decode to 3 bytes and input length is always an even */
367 codesFill(); /* multiple of 4 characters. */
368 /* -> output length is ((intput length / 4) *3) - Pads ! */
369 (*length) = ((inLen) / 4) * 3;
370
371 if (inLen>0 && message[inLen-1] == '=') (*length)--; /* ignore the Pads */
372 if (inLen>0 && message[inLen-2] == '=') (*length)--;
373
374 result = new unsigned char[(*length)];
375
376 for (ix=0; ix<inLen; ix++)
377 {
378 value = codes[ message[ix] & 0xFF ]; /* ignore high byte of char */
379 if ( value >= 0 ) { /* skip over non-code */
380 accum <<= 6; /* bits shift up by 6 each time thru */
381 shift += 6; /* loop, with new bits being put in */
382 accum |= value; /* at the bottom. */
383 if ( shift >= 8 ) { /* whenever there are 8 or more shifted in, */
384 shift -= 8; /* write them out (from the top, leaving any */
385 result[index++] = /* excess at the bottom for next iteration. */
386 ((accum >> shift) & 0xff);
387 }
388 }
389 }
390 return std::auto_ptr<unsigned char>(result);
391 }
392
393 std::string md5sum(std::string const & data)
394 {
395 ost::MD5Digest digest;
396 std::stringstream str;
397 digest << data;
398 str << digest;
399 return str.str();
400 }
401
402 }}
403
404 std::ostream & operator <<(std::ostream & os, UI::Util::StrVec const & sv)
405 {
406 os << UI::Util::join(",", sv);
407 return os;
408 }
409
410 std::ostream & operator <<(std::ostream & os, UI::Util::StrList const & sl)
411 {
412 os << UI::Util::join(",", sl);
413 return os;
414 }
0 /**
1 * @file
2 * @brief Text, descriptors and sockets.
3 */
4 #ifndef UI_UTIL_TEXT_HPP
5 #define UI_UTIL_TEXT_HPP
6
7 // STDC++
8 #include <string>
9 #include <vector>
10 #include <map>
11 #include <list>
12 #include <sstream>
13 #include <memory>
14 #include <cassert>
15 #include <iomanip>
16 #include <cerrno>
17
18 // C++ libraries
19 #include <ui-utilcpp/Exception.hpp>
20 #include <boost/random.hpp>
21
22 #ifdef WIN32
23 #if !defined( PATH_MAX )
24 #include <Windows.h>
25 #define PATH_MAX MAX_PATH
26 #endif
27 #endif
28
29 namespace UI {
30 namespace Util {
31
32 /** @name Shortcuts for often used types and convenience stream operators.
33 * @{ */
34 typedef std::vector<std::string> StrVec;
35 typedef std::list<std::string> StrList;
36 typedef std::map<std::string, std::string> StrMap;
37 /** @} */
38 }}
39
40 namespace UI {
41 namespace Util {
42
43 std::string strVec2Str(StrVec const & strVec, std::string const & sep=" ");
44
45 /** @brief You may use on as return value for an existing, but empty, string. */
46 static std::string const EmptyString_("");
47
48 /** @brief Save wrapper for ::strerror. Always use this instead of ::strerror directly. */
49 std::string strerror(int const & errNo=errno);
50
51 /** @brief Like std::getline, but also rips of trailing "CR" when line break was CRLF. */
52 std::string getlineCRLF(std::istream & s);
53
54 /** @brief ASCII CAPS converter for strings (using std::tolower|upper). */
55 std::string asciiCAPS(std::string const & in, bool const upper=true);
56
57 /** @brief Replace all non-ASCII characters to '?' in string. */
58 std::string & str2Ascii(std::string & s);
59
60 /** @brief Defaults values for some types via template specialization. */
61 template<typename T>
62 inline T Default() { return T(); }
63 /** @brief Default-Specialising. */
64 template<> inline int Default<int>() { return 0; }
65 /** @brief Default-Specialising. */
66 template<> inline float Default<float>() { return 0.0; }
67 /** @brief Default-Specialising. */
68 template<> inline double Default<double>() { return 0.0; }
69 /** @brief Default-Specialising. */
70 template<> inline long int Default<long int>() { return 0; }
71 /** @brief Default-Specialising. */
72 template<> inline bool Default<bool>() { return false; }
73 /** @brief Default-Specialising. */
74 template<> inline std::string Default<std::string>() { return ""; }
75
76 /** @brief Stream modifier function (is there a std:: type??). */
77 typedef std::ios_base & (* StreamModifier) (std::ios_base &);
78
79 /** @brief String-to-anything converter with error handling.
80 *
81 * @param t String to convert.
82 * @param m Optional stream modifier like std::hex.
83 * @returns Pair with conversion result and success; if false, result's value is undefinded.
84 */
85 template <typename out_type>
86 std::pair<out_type, bool> eato(std::string const & t, StreamModifier const m=0)
87 {
88 // Prepare converter stream
89 std::stringstream s(t);
90 if (m) { s << m; };
91
92 // Convert with error handling
93 std::pair<out_type, bool> result;
94 s >> result.first;
95 result.second = !s.fail();
96
97 return result;
98 }
99
100 /** @brief String-to-anything converter with default values on error. @see eato. */
101 template <typename out_type>
102 out_type ato(std::string const & t, StreamModifier const m=0)
103 {
104 std::pair<out_type, bool> const result(eato<out_type>(t, m));
105 return result.second ? result.first : Default<out_type>();
106 }
107
108 /** @brief Anything-to-string converter with error handling.
109 *
110 * @param t Value to convert.
111 * @param m Optional stream modifier like std::hex.
112 * @param w Argument for std::setw() modifier.
113 * @param f Argument for std::setfill() modifier.
114 * @returns Pair with conversion result and success; if false, result's value is undefinded.
115 */
116 template <typename in_type>
117 std::pair<std::string, bool> etos(in_type const & t, StreamModifier const m=0, int w=0, char f=' ')
118 {
119 // Prepare converter stream
120 std::stringstream s;
121 if (m) { s << m; }
122 if (w) { s << std::setw(w); }
123 if (f != ' ') { s << std::setfill(f); }
124
125 // Convert with error handling
126 std::pair<std::string, bool> result;
127 s << t;
128 result.first = s.str();
129 result.second = !s.fail();
130
131 return result;
132 }
133
134 /** @name Anything-to-string converter with empty string on error. @see etos.
135 * @{ */
136 template <typename in_type>
137 std::string tos(in_type const & t, StreamModifier const m=0, int w=0, char f=' ')
138 {
139 std::pair<std::string, bool> const result(etos<in_type>(t, m, w, f));
140 return result.second ? result.first : std::string("");
141 }
142
143 template <typename in_type>
144 std::string tos(in_type const & t, int w, char f=' ')
145 {
146 std::pair<std::string, bool> const result(etos<in_type>(t, 0, w, f));
147 return result.second ? result.first : std::string("");
148 }
149 /** @} */
150
151 /** @name Generate arbitrary length pseudo random keys with alphanumeric ASCII characters.
152 * @{ */
153 /** @brief Class using boost::mt19937 as random engine. */
154 class AlphaNumericKey
155 {
156 public:
157 /** @brief Construct; seed will be automatically set (once) via timestamp (for linux/unix: microseconds). */
158 AlphaNumericKey();
159 std::string get(int len=8);
160 private:
161 std::string const keyChars_;
162 boost::mt19937 engine_;
163 boost::uniform_int<> distribution_;
164 boost::variate_generator<boost::mt19937&, boost::uniform_int<> > generator_;
165 };
166
167 /** @brief You may just use this global generator for convenience.
168 * @note A singleton would be nicer, but imho not worth the effort, considering multi threading protection. */
169 static AlphaNumericKey GlobalAlphaNumericKey_;
170
171 /** @brief For compatibility only. */
172 std::string genAlphaNumericKey(int len=8);
173 /** @} */
174
175 /** @brief BSD style "strdup" implementation (is not C standard). See strdup(3). */
176 char * strdup(char const * s);
177
178 /** @brief Helper to construct/use C-String arrays ("char **"), occasionally needed by some c functions. */
179 class CStrArray
180 {
181 public:
182 /** @brief Add string to array. */
183 CStrArray & add(std::string const & str);
184 CStrArray();
185 ~CStrArray();
186 /** @brief Get C string array. */
187 char const ** get() const;
188 private:
189 std::vector<char const *> arr_;
190 };
191
192
193 /** @brief Generate any STL container of strings from a token string.
194 *
195 * @note There is a <tt>StrVec</tt> shortcut for
196 * this template. Doxygen seems to show only its syntax. @see
197 * Text.hpp source header for the template syntax.
198 */
199 template <typename C>
200 C strtok(std::string const & s, std::string const & delim=",", std::string const & prefix="", std::string const & postfix="")
201 {
202 C tokens;
203 std::string::size_type pos(0);
204 while (pos != std::string::npos)
205 {
206 std::string::size_type delimPos(s.find(delim, pos));
207 std::string::size_type tokLen(delimPos == std::string::npos ? std::string::npos : delimPos-pos);
208 std::string token(s.substr(pos, tokLen));
209 if (!token.empty())
210 {
211 tokens.push_back(prefix + token + postfix);
212 }
213 pos = delimPos == std::string::npos ? std::string::npos : delimPos+delim.size();
214 }
215 return tokens;
216 }
217
218 StrVec strtok(std::string const & s, std::string const & delim=",", std::string const & prefix="", std::string const & postfix="");
219
220 /** @brief Like strtok, but you can use a list of one-char delimiters
221 * (delims in strtoks) instead of a fixed delimiter string (delim in strtok). */
222 template <typename C>
223 C strtoks(std::string const & s, std::string const & delims=",", std::string const & prefix="", std::string const & postfix="")
224 {
225 C tokens;
226 std::string::size_type p0(0);
227 while (p0 != std::string::npos)
228 {
229 std::string::size_type const p1(s.find_first_of(delims, p0));
230 std::string const token(s.substr(p0, p1-p0));
231 if (!token.empty())
232 {
233 tokens.push_back(prefix + token + postfix);
234 }
235 p0 = s.find_first_not_of(delims, p1);
236 }
237 return tokens;
238 }
239
240 StrVec strtoks(std::string const & s, std::string const & delims=" \t\n\r", std::string const & prefix="", std::string const & postfix="");
241
242 /**
243 * @brief join a list,vector,set, ... with the connector string
244 *
245 * e.g. the string list 'a', 'b', 'c', 'd' joined with ',' will return 'a,b,c,d'
246 *
247 * As C needs to supply a C::const_iterator C.begin() C.end() and ++opertator
248 * e.g. std::vector<std::string>
249 */
250 template <typename C>
251 std::string join( std::string const & expr, C const & list )
252 {
253 std::string res;
254 typename C::const_iterator it( list.begin() );
255 if ( it != list.end() )
256 {
257 res = *it;
258 ++it;
259 for ( ; it != list.end(); ++it )
260 {
261 res += expr + *it;
262 }
263 }
264 return res;
265 }
266
267 /** @name Check whether token is in tokens. */
268 /** @{ */
269 bool isToken(std::string const & token, StrVec const & tokensVec, int const match=0);
270 bool isToken(std::string const & token, std::string const & tokens, std::string const & delim=",", int const match=0);
271 /** @} */
272
273 /** @name Mass string replace.
274 * @{ */
275 std::string & strrpl(std::string & source, std::string const & token, std::string const & reptoken);
276 std::string strrpl(std::string const & source, std::string const & token, std::string const & reptoken);
277 /** @} */
278
279 /** @brief Read any stream into any byte vector.
280 *
281 * @note std::istream::read() is not const, so the stream reference can't be const.
282 */
283 template <typename Byte>
284 std::vector<Byte> istream2Vector(std::istream & f, int const blockSize=1024)
285 {
286 // We rely on byte size
287 assert(sizeof(Byte) == 1);
288
289 // Pre: Set vector to size zero, no bytes read
290 std::vector<Byte> result(0);
291 long int bytesRead(0);
292
293 while (!f.eof())
294 {
295 // Prepare to read blockSize bytes from stream into vector
296 result.resize(bytesRead + blockSize);
297 // Read a block directly to vector memory (we cast here, but this should really work for any byte-sized type)
298 f.read((char *) &result[bytesRead], blockSize);
299 bytesRead += f.gcount();
300 }
301
302 // Resize down to readBytes size
303 result.resize(bytesRead);
304 return result;
305 }
306
307 /** @brief Istream-to-string converter.
308 *
309 * @note Works for "binary"-files as well, but istream2Vector might be a better choice.
310 */
311 std::string istream2String(std::istream & f, int const blockSize=1024);
312
313 /** @brief a class to convert between different systems.
314 *
315 * @deprecated All different conversions here should rather get a
316 * XXXConverter class in Recoder.?pp (and an appropriate switch in the
317 * Recoder class if needed).
318 */
319 class XConversion {
320
321 private:
322 /* lookup table for base64 characters */
323 static const unsigned char alphabet[];
324
325 /* lookup table for values 0..63 */
326 static unsigned char codes[];
327 static void codesFill();
328
329 static const int bMin = 2;
330 static const int bMax = 16;
331
332 static int getInt( unsigned char hex );
333 static std::string out;
334
335 public:
336 /**
337 * Convert a dezimal (10) represented number in a number<br>
338 * represented by any basis between 2 (Bin) and 16 (Hex)
339 *
340 * @param number the number to convert
341 * @param basis the basis to use
342 *
343 * @returns a number represented by the wanted basis<br>
344 * or an empty string
345 */
346 static std::string dec2Basis( int number, int basis );
347
348 /**
349 * Convert a number represented by any basis between<br>
350 * 2 (bin) and 16 (hex) to a dezimal number (10)
351 *
352 * @param number the numbet to convert
353 * @param basis the basis to use
354 *
355 * @returns a number represented in decimal (basis 10)
356 */
357 static int basis2Dec( std::string number, int basis );
358
359 /**
360 * encrypt a message using xor and the given key
361 *
362 * @param message the mesaage to encrypt
363 * @param key the key used to encrypt the message
364 * @param length number of encrypted chars (return)
365 *
366 * @returns the encrypted message (binary)
367 */
368 static std::auto_ptr<unsigned char> xorEncrypt(std::string const& message, std::string const& key, int* length);
369
370 /**
371 * decrypt a message using xor and the given key
372 *
373 * @param message the message to decrypt
374 * @param length the length of the message
375 * @param key the key used to decrypt the message
376 *
377 * @returns the decrypted message (ASCII)
378 */
379 static std::string xorDecrypt( const unsigned char* message, const int length, std::string const& key );
380
381 /**
382 * returns an array of base64-encoded characters to represent the
383 * passed data array.
384 *
385 * @param message the array of bytes to encode
386 * @param length length of the byte array
387 *
388 * @returns result base64 encoded message (ASCII)
389 */
390 static std::string base64Encode( const unsigned char* message, const int length );
391
392 /**
393 * returns an array of bytes which were encoded in the passed
394 * character array.
395 *
396 * @param message a base64 encoded message
397 * @param length used to store the result (Binary)
398 *
399 * @returns number decoded chars
400 */
401 static std::auto_ptr<unsigned char> base64Decode(std::string const& message, int* length);
402 };
403
404 std::string md5sum(std::string const & data);
405
406 }}
407
408 /** @name Some convenience stream operators.
409 * @{ */
410 std::ostream & operator <<(std::ostream & os, UI::Util::StrVec const & sv);
411 std::ostream & operator <<(std::ostream & os, UI::Util::StrList const & sl);
412 /** @} */
413
414 #endif
0 #include "config.h"
1
2 // Implementation
3 #include "Thread.hpp"
4
5 // STDC++
6 #include <cassert>
7 #include <cstdlib>
8
9 // Local
10 #include "Time.hpp"
11 #include "Text.hpp"
12
13 namespace UI {
14 namespace Util {
15
16 void fd2DevNull(int const & fd, mode_t const & mode)
17 {
18 Sys::close(fd);
19 int const newFd(Sys::open("/dev/null", mode));
20 if (newFd != fd)
21 {
22 Sys::dup2(newFd, fd);
23 Sys::close(newFd);
24 }
25 }
26
27 void daemonize(bool closeStdFds,
28 bool changeToRootdir,
29 bool resetUMask)
30 {
31 #ifndef WIN32
32 switch (Sys::fork())
33 {
34 case 0:
35 // We are in the new child
36 if (closeStdFds)
37 {
38 fd2DevNull(0, O_RDONLY);
39 fd2DevNull(1, O_WRONLY);
40 fd2DevNull(2, O_WRONLY);
41 }
42 if (changeToRootdir) { Sys::chdir("/"); }
43 if (resetUMask) { Sys::umask(0); }
44 Sys::setsid();
45 break;
46 default:
47 // Old pid, silently leave
48 std::exit(0);
49 }
50 #endif
51 }
52
53 #ifndef WIN32
54 ProcessThread::ProcessThread()
55 :pid_(-1)
56 ,status_(NotRunYet_)
57 {}
58
59 ProcessThread::~ProcessThread() {}
60
61 pid_t ProcessThread::getPID() const
62 {
63 return pid_;
64 }
65
66 void ProcessThread::checkStatus(bool wait)
67 {
68 if (status_ == Running_)
69 {
70 assert(pid_ != -1);
71
72 // Process is running, but might be finished (zombie)
73 int status;
74 switch (pid_t pid = Sys::waitpid(pid_, &status, wait ? 0 : WNOHANG))
75 {
76 case 0: // No child available; still running, nothing to do
77 break;
78 default: // Child exited; status_ becomes the process exit status
79 assert(pid == pid_);
80 if (WIFEXITED(status)) // Child exited normally
81 {
82 status_ = WEXITSTATUS(status);
83 }
84 else if (WIFSIGNALED(status))
85 {
86 status_ = KilledByUncatchedSignal_;
87 }
88 else
89 {
90 status_ = WaitpidErr_;
91 }
92 pid_ = -1;
93 }
94 }
95 }
96
97 int ProcessThread::getStatus() const
98 {
99 return status_;
100 }
101
102 bool ProcessThread::isRunning()
103 {
104 checkStatus(false);
105 return (status_ == Running_);
106 }
107
108 int ProcessThread::wait()
109 {
110 checkStatus(true);
111 return status_;
112 }
113
114
115 void ForkThread::start()
116 {
117 if (status_ != Running_) // Just be happy if we are already running
118 {
119 switch (int pid = Sys::fork())
120 {
121 case 0: // We are in the new child
122 // We do not share context, but at least local getPID() should work ... ;(
123 // getStatus() wont work, but is not needed in the child really ...
124 pid_ = Sys::getpid();
125 std::exit(run());
126 break;
127 default: // Ok, father process
128 status_ = Running_;
129 pid_ = pid;
130 }
131 }
132 }
133 #endif
134
135 }}
0 /**
1 * @file
2 * @brief Thread, descriptors and sockets.
3 */
4 #ifndef UI_UTIL_THREAD_HPP
5 #define UI_UTIL_THREAD_HPP
6
7 // C++ libraries
8 #include <ui-utilcpp/Exception.hpp>
9 #include <ui-utilcpp/Sys.hpp>
10
11 namespace UI {
12 namespace Util {
13
14 /** @brief Close fd and reopen on "/dev/null" using mode. */
15 void fd2DevNull(int const & fd, mode_t const & mode);
16
17 /** @brief Use fork(2) to daemonize current program in a new session id.
18 *
19 * @param closeStdFds Whether to close fd 0,1 and 2 (and re-open them to /dev/null). This is recommended for all production daemons.
20 * @param changeToRootdir Will do a chdir(2) to "/". This is to avoid all errors due to a later remove/change of the cwd.
21 * @param resetUMask Resets umask to "0".
22 * @return True, if we are in the new daemon child; the original process then exited with code 0. False if fork() failed.
23 * @see fork(2), setsid(2), chdir(2), umask(2).
24 */
25 void daemonize(bool closeStdFds=true,
26 bool changeToRootdir=true,
27 bool resetUMask=true);
28
29 /**
30 * @example Threads.cpp
31 * Example on how to employ "ProcessThread" threads.
32 */
33
34 /** @brief Simple encapsulation for any process based threading system.
35 *
36 * You need to overload "start" and "run".
37 */
38 #ifndef WIN32
39 class ProcessThread
40 {
41 public:
42 /** @brief Reserved exit status'. Do not use these as return codes in your run()-functions.
43 *
44 * Program exit status' are always between (including) 0..255; to be able to use
45 * the exit status directly in programs (e.g. for std::exit()), we reserve some
46 * values here (rather than using out-of-range values).
47 */
48 enum ReservedStatus
49 {
50 NotRunYet_ = 255,
51 Running_ = 254,
52 WaitpidErr_ = 253,
53 KilledByUncatchedSignal_ = 252
54 };
55
56 /** */
57 ProcessThread();
58 virtual ~ProcessThread();
59
60 /** @brief Start fork "thread". */
61 virtual void start() = 0;
62
63 /** Check if "thread" is running. */
64 bool isRunning();
65
66 /** @brief Get PID of running "thread". */
67 pid_t getPID() const;
68
69 /** @brief Wait for this "thread", and return the process' exit status.
70 *
71 * You must use this method to avoid zombies, or ignore all SIGCHLDs in the parent.
72 */
73 int wait();
74
75 /** @brief Get status of last run. */
76 int getStatus() const;
77
78 protected:
79 /** Process id of thread: Must be set properly by overloaded start method. */
80 pid_t pid_;
81 /** Status of thread: Must be set properly by overloaded start method. */
82 int status_;
83
84 /** Virtual function of thread's task. */
85 virtual int run() = 0;
86
87 private:
88 /** Internal function to check status using waitpid(2) */
89 void checkStatus(bool wait=false);
90 };
91
92 /**
93 * @class ForkThread
94 * @brief Simple encapsulation of fork(2) using common thread syntax.
95 * @attention This is not threading -- i.e. the "thread" does not share any execution
96 * context with its caller; it just uses "common thread class nomenclature", hence the name.
97 */
98 class ForkThread: public ProcessThread
99 {
100 public:
101 /** @brief Spawn thread. */
102 void start();
103 };
104 #endif
105
106 }}
107 #endif
0 #include "config.h"
1
2 // Implementation
3 #include "Time.hpp"
4
5 // STDC++
6 #include <cassert>
7 #include <limits>
8
9 // Local
10 #include "Sys.hpp"
11 #include "Text.hpp"
12
13 namespace UI {
14 namespace Util {
15
16 long int getTimeValSec()
17 {
18 struct timeval tv;
19 Sys::gettimeofday(&tv, 0);
20 return tv.tv_sec;
21 }
22
23 long int getTimeValUSec()
24 {
25 struct timeval tv;
26 Sys::gettimeofday(&tv, 0);
27 return tv.tv_usec;
28 }
29
30 unsigned int nanosleep(unsigned int seconds, long int nanoseconds)
31 {
32 assert(nanoseconds >= 0);
33 #ifndef WIN32
34 timespec sleep;
35 sleep.tv_sec = seconds;
36 sleep.tv_sec += nanoseconds / 1000000000;
37 sleep.tv_nsec = nanoseconds % 1000000000;
38 return ::nanosleep(&sleep, 0);
39 #else
40 int nMS = seconds * 1000 + nanoseconds / 1000000;
41 Sleep(nMS);
42 return 0;
43 #endif
44 }
45
46 unsigned int nssleep(unsigned int seconds)
47 {
48 return nanosleep(seconds, 0);
49 }
50
51 unsigned int nsnsleep(long int nanoseconds)
52 {
53 return nanosleep(0, nanoseconds);
54 }
55
56
57 long int const RealTimeStamp::tenExpSix_(1000000);
58
59 RealTimeStamp::RealTimeStamp(long int const & sec, long int const & usec)
60 {
61 set(sec, usec);
62 }
63
64 RealTimeStamp & RealTimeStamp::set(long int const & sec, long int const & usec)
65 {
66 sec_ = sec;
67 usec_ = usec;
68 normalize();
69 return *this;
70 }
71
72 RealTimeStamp & RealTimeStamp::setMax()
73 {
74 #if defined( max )
75 #undef max
76 #endif
77 sec_ = std::numeric_limits<long int>::max();
78 usec_ = std::numeric_limits<long int>::max();
79 return *this;
80 }
81
82 RealTimeStamp & RealTimeStamp::setMin()
83 {
84 set(0, 0);
85 return *this;
86 }
87
88 RealTimeStamp & RealTimeStamp::stamp()
89 {
90 struct timeval tv;
91 Sys::gettimeofday(&tv, 0);
92 sec_ = tv.tv_sec;
93 usec_ = tv.tv_usec;
94 return *this;
95 }
96
97 long int RealTimeStamp::getSec() const
98 {
99 return sec_;
100 }
101
102 long int RealTimeStamp::getUSec() const
103 {
104 return usec_;
105 }
106
107 long double RealTimeStamp::getSeconds() const
108 {
109 return (long double) sec_ + (long double) usec_ / tenExpSix_;
110 }
111
112 bool RealTimeStamp::operator == (RealTimeStamp const & rt) const
113 {
114 return sec_ == rt.getSec() && usec_ == rt.getUSec();
115 }
116
117 bool RealTimeStamp::operator < (RealTimeStamp const & rt) const
118 {
119 return sec_ < rt.sec_ || (sec_ == rt.sec_ && usec_ < rt.usec_);
120 }
121
122 bool RealTimeStamp::operator <= (RealTimeStamp const & rt) const
123 {
124 return sec_ < rt.sec_ || (sec_ == rt.sec_ && usec_ <= rt.usec_);
125 }
126
127 RealTimeStamp & RealTimeStamp::operator += (RealTimeStamp const & rt)
128 {
129 sec_ += rt.sec_;
130 usec_ += rt.usec_;
131 normalize();
132 return *this;
133 }
134
135 RealTimeStamp RealTimeStamp::operator + (RealTimeStamp const & rt) const
136 {
137 RealTimeStamp result(*this);
138 result += rt;
139 return result;
140 }
141
142 RealTimeStamp & RealTimeStamp::operator -= (RealTimeStamp const & rt)
143 {
144 sec_ -= rt.sec_;
145 usec_ -= rt.usec_;
146
147 if (usec_ < 0)
148 {
149 sec_ += usec_ / tenExpSix_;
150 usec_ = usec_ % tenExpSix_;
151 if (usec_ != 0)
152 {
153 --sec_;
154 usec_ += tenExpSix_;
155 }
156 }
157 normalize();
158 return *this;
159 }
160
161 RealTimeStamp RealTimeStamp::operator - (RealTimeStamp const & rt) const
162 {
163 RealTimeStamp result(*this);
164 result -= rt;
165 return result;
166 }
167
168 void RealTimeStamp::normalize()
169 {
170 sec_ += usec_ / tenExpSix_;
171 usec_ = usec_ % tenExpSix_;
172
173 // Never leave us with negative values; silently set to 0
174 //
175 // We are not imposing an exception here as this might happen
176 // with a diff (s1-s0) when the system time has changed between
177 // the two stamps (administrator, ntp, etc...).
178 sec_ = std::max<long int>(0, sec_);
179 usec_ = std::max<long int>(0, usec_);
180 }
181
182 std::ostream & operator << (std::ostream & os, RealTimeStamp const & rt)
183 {
184 os << rt.getSeconds() << " seconds";
185 return os;
186 }
187
188
189 ScopeRealTime::ScopeRealTime(std::ostream * const out)
190 :out_(out)
191 {
192 stamp();
193 }
194
195 ScopeRealTime::~ScopeRealTime()
196 {
197 if (out_) { *out_ << "Scope real time: " << get() << std::endl; }
198 }
199
200 RealTimeStamp ScopeRealTime::get() const
201 {
202 return RealTimeStamp().stamp() - *this;
203 }
204
205 }}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_TIME_HPP
4 #define UI_UTIL_TIME_HPP
5
6 // STDC++
7 #include <string>
8
9 // C++ libraries
10 #include <ui-utilcpp/Exception.hpp>
11
12 namespace UI {
13 namespace Util {
14
15 /** @brief Get "sec"-part from gettimeofday(2). */
16 long int getTimeValSec();
17
18 /** @brief Get "usec"-part from gettimeofday(2). */
19 long int getTimeValUSec();
20
21 /** @brief No Signal Sleep: Using POSIX nanosleep(2).
22 *
23 * @see nanosleep(2), POSIX.1.
24 *
25 * @return Return values of POSIX nanosleep(2) call (0 for no error).
26 *
27 */
28 unsigned int nanosleep(unsigned int seconds, long int nanoseconds);
29
30 /** @brief No Signal Seconds Sleep: Using POSIX nanosleep(2).
31 *
32 * You may use this as drop-in replacement for sleep(3) if you do
33 * not want any signals to be raised.
34 *
35 * @see nanosleep.
36 */
37 unsigned int nssleep(unsigned int seconds);
38
39 /** @brief No Signal Nano Sleep.
40 *
41 * @see nanosleep.
42 */
43 unsigned int nsnsleep(long int nanoseconds);
44
45
46 /** @brief RealTimeStamp class encapsulating "gettimeofday".
47 *
48 * @see time(2) (POSIX), gettimeofday(2) (BSD).
49 */
50 class RealTimeStamp
51 {
52 public:
53 /** @brief Error codes for exceptions. */
54 enum ErrorCode
55 {
56 NegativeStamp_=1
57 };
58 /** @brief This classes exceptions. */
59 typedef CodeException<ErrorCode> Exception;
60
61 /** @brief Standard constructor.
62 *
63 * @param sec Seconds since Epoch.
64 * @param usec Micro (10^-6) seconds since Epoch+sec.
65 * @note Values will be "normalised" (make microseconds < 10^6). Altogether, it must not
66 * be a negative date (before Epoch).
67 */
68 RealTimeStamp(long int const & sec=0, long int const & usec=0);
69
70 /** @brief Set time stamp manually.
71 *
72 * @param sec Seconds since Epoch.
73 * @param usec Micro (10^-6) seconds since Epoch+sec.
74 * @returns Reference to itself
75 */
76 RealTimeStamp & set(long int const & sec, long int const & usec);
77
78 /** @brief Set this stamp to maximum. */
79 RealTimeStamp & setMax();
80 /** @brief Set this stamp to minimum (Epoch) */
81 RealTimeStamp & setMin();
82
83 /** @brief Set time stamp from current time.
84 *
85 * @returns Reference to itself
86 */
87 RealTimeStamp & stamp();
88
89 /** @brief Get seconds since Epoch. */
90 long int getSec() const;
91 /** @brief Get micro seconds since Epoch+sec. */
92 long int getUSec() const;
93 /** @brief Get seconds (since Epoch) as real number (including micro seconds). */
94 long double getSeconds() const;
95
96 /** @brief Standard == operator. */
97 bool operator == (RealTimeStamp const & rt) const;
98 /** @brief Standard < operator. */
99 bool operator < (RealTimeStamp const & rt) const;
100 /** @brief Standard <= operator. */
101 bool operator <= (RealTimeStamp const & rt) const;
102 /** @brief Standard += operator. */
103 RealTimeStamp & operator += (RealTimeStamp const & rt);
104 /** @brief Standard + operator. */
105 RealTimeStamp operator + (RealTimeStamp const & rt) const;
106 /** @brief Standard -= operator. */
107 RealTimeStamp & operator -= (RealTimeStamp const & rt);
108 /** @brief Standard - operator. */
109 RealTimeStamp operator - (RealTimeStamp const & rt) const;
110
111 private:
112 long int sec_;
113 long int usec_;
114 static long int const tenExpSix_;
115
116 void normalize();
117 };
118
119 /** @brief Streaming operator for RealTimeStamp. */
120 std::ostream & operator << (std::ostream & os, RealTimeStamp const & rt);
121
122 /** @brief Log time used for a scope.
123 *
124 * - Usage as-is: Automatic logging to out stream (nothing if NULL).
125 * - Usage custom logging: Derive class, add custom logging to derived class' destructor, construct w/ out=0.
126 */
127 class ScopeRealTime: private RealTimeStamp
128 {
129 private:
130 std::ostream * const out_;
131 public:
132 ScopeRealTime(std::ostream * const out);
133 ~ScopeRealTime();
134 RealTimeStamp get() const;
135 };
136
137 }}
138 #endif
0 /*
1 * This is from file-4.12: An excerpt from "ascmagic.c", almost
2 * verbatim albeit for syntactic fixes to make it compile with g++
3 * -pedantic.
4 *
5 */
6
7 /*
8 * Copyright (c) Ian F. Darwin 1986-1995.
9 * Software written by Ian F. Darwin and others;
10 * maintained 1995-present by Christos Zoulas and others.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice immediately at the beginning of the file, without modification,
17 * this list of conditions, and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 */
34 /*
35 * ASCII magic -- file types that we know based on keywords
36 * that can appear anywhere in the file.
37 *
38 * Extensively modified by Eric Fischer <enf@pobox.com> in July, 2000,
39 * to handle character codes other than ASCII on a unified basis.
40 *
41 * Joerg Wunsch <joerg@freebsd.org> wrote the original support for 8-bit
42 * international characters, now subsumed into this file.
43 */
44
45 /*
46 * This table reflects a particular philosophy about what constitutes
47 * "text," and there is room for disagreement about it.
48 *
49 * Version 3.31 of the file command considered a file to be ASCII if
50 * each of its characters was approved by either the isascii() or
51 * isalpha() function. On most systems, this would mean that any
52 * file consisting only of characters in the range 0x00 ... 0x7F
53 * would be called ASCII text, but many systems might reasonably
54 * consider some characters outside this range to be alphabetic,
55 * so the file command would call such characters ASCII. It might
56 * have been more accurate to call this "considered textual on the
57 * local system" than "ASCII."
58 *
59 * It considered a file to be "International language text" if each
60 * of its characters was either an ASCII printing character (according
61 * to the real ASCII standard, not the above test), a character in
62 * the range 0x80 ... 0xFF, or one of the following control characters:
63 * backspace, tab, line feed, vertical tab, form feed, carriage return,
64 * escape. No attempt was made to determine the language in which files
65 * of this type were written.
66 *
67 *
68 * The table below considers a file to be ASCII if all of its characters
69 * are either ASCII printing characters (again, according to the X3.4
70 * standard, not isascii()) or any of the following controls: bell,
71 * backspace, tab, line feed, form feed, carriage return, esc, nextline.
72 *
73 * I include bell because some programs (particularly shell scripts)
74 * use it literally, even though it is rare in normal text. I exclude
75 * vertical tab because it never seems to be used in real text. I also
76 * include, with hesitation, the X3.64/ECMA-43 control nextline (0x85),
77 * because that's what the dd EBCDIC->ASCII table maps the EBCDIC newline
78 * character to. It might be more appropriate to include it in the 8859
79 * set instead of the ASCII set, but it's got to be included in *something*
80 * we recognize or EBCDIC files aren't going to be considered textual.
81 * Some old Unix source files use SO/SI (^N/^O) to shift between Greek
82 * and Latin characters, so these should possibly be allowed. But they
83 * make a real mess on VT100-style displays if they're not paired properly,
84 * so we are probably better off not calling them text.
85 *
86 * A file is considered to be ISO-8859 text if its characters are all
87 * either ASCII, according to the above definition, or printing characters
88 * from the ISO-8859 8-bit extension, characters 0xA0 ... 0xFF.
89 *
90 * Finally, a file is considered to be international text from some other
91 * character code if its characters are all either ISO-8859 (according to
92 * the above definition) or characters in the range 0x80 ... 0x9F, which
93 * ISO-8859 considers to be control characters but the IBM PC and Macintosh
94 * consider to be printing characters.
95 */
96
97 typedef unsigned long unichar;
98
99 #define F 0 /* character never appears in text */
100 #define T 1 /* character appears in plain ASCII text */
101 #define I 2 /* character appears in ISO-8859 text */
102 #define X 3 /* character appears in non-ISO extended ASCII (Mac, IBM PC) */
103
104 char text_chars[256] = {
105 /* BEL BS HT LF FF CR */
106 F, F, F, F, F, F, F, T, T, T, T, F, T, T, F, F, /* 0x0X */
107 /* ESC */
108 F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, /* 0x1X */
109 T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x2X */
110 T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x3X */
111 T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x4X */
112 T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x5X */
113 T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x6X */
114 T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, F, /* 0x7X */
115 /* NEL */
116 X, X, X, X, X, T, X, X, X, X, X, X, X, X, X, X, /* 0x8X */
117 X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, /* 0x9X */
118 I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xaX */
119 I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xbX */
120 I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xcX */
121 I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xdX */
122 I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xeX */
123 I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I /* 0xfX */
124 };
125
126 int
127 looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf,
128 size_t *ulen)
129 {
130 unsigned int i;
131
132 *ulen = 0;
133
134 for (i = 0; i < nbytes; i++) {
135 int t = text_chars[buf[i]];
136
137 if (t != T)
138 return 0;
139
140 ubuf[(*ulen)++] = buf[i];
141 }
142
143 return 1;
144 }
145
146 int
147 looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
148 {
149 unsigned int i;
150
151 *ulen = 0;
152
153 for (i = 0; i < nbytes; i++) {
154 int t = text_chars[buf[i]];
155
156 if (t != T && t != I)
157 return 0;
158
159 ubuf[(*ulen)++] = buf[i];
160 }
161
162 return 1;
163 }
164
165 int
166 looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf,
167 size_t *ulen)
168 {
169 unsigned int i;
170
171 *ulen = 0;
172
173 for (i = 0; i < nbytes; i++) {
174 int t = text_chars[buf[i]];
175
176 if (t != T && t != I && t != X)
177 return 0;
178
179 ubuf[(*ulen)++] = buf[i];
180 }
181
182 return 1;
183 }
184
185 int
186 looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen)
187 {
188 unsigned int i;
189 int n;
190 unichar c;
191 int gotone = 0;
192
193 *ulen = 0;
194
195 for (i = 0; i < nbytes; i++) {
196 if ((buf[i] & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */
197 /*
198 * Even if the whole file is valid UTF-8 sequences,
199 * still reject it if it uses weird control characters.
200 */
201
202 if (text_chars[buf[i]] != T)
203 return 0;
204
205 ubuf[(*ulen)++] = buf[i];
206 } else if ((buf[i] & 0x40) == 0) { /* 10xxxxxx never 1st byte */
207 return 0;
208 } else { /* 11xxxxxx begins UTF-8 */
209 int following;
210
211 if ((buf[i] & 0x20) == 0) { /* 110xxxxx */
212 c = buf[i] & 0x1f;
213 following = 1;
214 } else if ((buf[i] & 0x10) == 0) { /* 1110xxxx */
215 c = buf[i] & 0x0f;
216 following = 2;
217 } else if ((buf[i] & 0x08) == 0) { /* 11110xxx */
218 c = buf[i] & 0x07;
219 following = 3;
220 } else if ((buf[i] & 0x04) == 0) { /* 111110xx */
221 c = buf[i] & 0x03;
222 following = 4;
223 } else if ((buf[i] & 0x02) == 0) { /* 1111110x */
224 c = buf[i] & 0x01;
225 following = 5;
226 } else
227 return 0;
228
229 for (n = 0; n < following; n++) {
230 i++;
231 if (i >= nbytes)
232 goto done;
233
234 if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40))
235 return 0;
236
237 c = (c << 6) + (buf[i] & 0x3f);
238 }
239
240 ubuf[(*ulen)++] = c;
241 gotone = 1;
242 }
243 }
244 done:
245 return gotone; /* don't claim it's UTF-8 if it's all 7-bit */
246 }
247
248 int
249 looks_unicode(const unsigned char *buf, size_t nbytes, unichar *ubuf,
250 size_t *ulen)
251 {
252 int bigend;
253 unsigned int i;
254
255 if (nbytes < 2)
256 return 0;
257
258 if (buf[0] == 0xff && buf[1] == 0xfe)
259 bigend = 0;
260 else if (buf[0] == 0xfe && buf[1] == 0xff)
261 bigend = 1;
262 else
263 return 0;
264
265 *ulen = 0;
266
267 for (i = 2; i + 1 < nbytes; i += 2) {
268 /* XXX fix to properly handle chars > 65536 */
269
270 if (bigend)
271 ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i];
272 else
273 ubuf[(*ulen)++] = buf[i] + 256 * buf[i + 1];
274
275 if (ubuf[*ulen - 1] == 0xfffe)
276 return 0;
277 if (ubuf[*ulen - 1] < 128 &&
278 text_chars[(size_t)ubuf[*ulen - 1]] != T)
279 return 0;
280 }
281
282 return 1 + bigend;
283 }
284
285 #undef F
286 #undef T
287 #undef I
288 #undef X
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "Connection.hpp"
5
6 namespace UI {
7 namespace Util {
8 namespace Http {
9
10 void Connection::destroy()
11 {
12 if (!externalStream_) delete stream_;
13 delete socket_;
14 }
15
16 Connection::Connection(std::iostream & stream)
17 :socket_(0)
18 ,stream_(&stream)
19 ,externalStream_(true)
20 {}
21
22 Connection::Connection(int fd, bool closeFd,
23 long int rcvToSeconds, long int rcvToMicroseconds,
24 long int sndToSeconds, long int sndToMicroseconds,
25 bool noBlock)
26 :socket_(new Socket(fd, closeFd))
27 ,stream_(new FDTypeStream<Socket>(socket_->getFd()))
28 ,externalStream_(false)
29 {
30 try
31 {
32 socket_->
33 setRcvTimeout(rcvToSeconds, rcvToMicroseconds).
34 setSndTimeout(sndToSeconds, sndToMicroseconds).
35 setUnblock(noBlock);
36 }
37 catch (...)
38 {
39 destroy();
40 throw;
41 }
42 }
43
44 Connection::Connection(std::string const & host, unsigned int port,
45 long int rcvToSeconds, long int rcvToMicroseconds,
46 long int sndToSeconds, long int sndToMicroseconds,
47 bool noBlock)
48 :socket_(new INetSocket(host, port))
49 ,stream_(new FDTypeStream<INetSocket>(socket_->getFd()))
50 ,externalStream_(false)
51 {
52 try
53 {
54 socket_->
55 setRcvTimeout(rcvToSeconds, rcvToMicroseconds).
56 setSndTimeout(sndToSeconds, sndToMicroseconds).
57 setUnblock(noBlock).
58 connect();
59 }
60 catch (...)
61 {
62 destroy();
63 throw;
64 }
65 }
66
67 #ifndef WIN32
68 Connection::Connection(std::string const & path,
69 long int rcvToSeconds, long int rcvToMicroseconds,
70 long int sndToSeconds, long int sndToMicroseconds,
71 bool noBlock)
72 :socket_(new UnixSocket(path))
73 ,stream_(new FDTypeStream<UnixSocket>(socket_->getFd()))
74 ,externalStream_(false)
75 {
76 try
77 {
78 socket_->
79 setRcvTimeout(rcvToSeconds, rcvToMicroseconds).
80 setSndTimeout(sndToSeconds, sndToMicroseconds).
81 setUnblock(noBlock).
82 connect();
83 }
84 catch (...)
85 {
86 destroy();
87 throw;
88 }
89 }
90 #endif
91
92 Connection::~Connection()
93 {
94 destroy();
95 }
96
97 std::string Connection::getId() const { return socket_->getId(); }
98 std::string Connection::getPeerId() const { return socket_->getPeerId(); }
99 std::string Connection::getConnId() const { return "[" + getId() + "]<->[" + getPeerId() + "]"; }
100
101 std::iostream const & Connection::s() const { return *stream_; }
102 std::iostream & Connection::s() { return *stream_; }
103
104 // private: buf must be pre allocated to hold size bytes.
105 std::streamsize Connection::readBlock(char * const buf, std::streamsize const & size, bool doThrow)
106 {
107 s().read(buf, size);
108 if (doThrow && s().gcount() != size)
109 {
110 UI_THROW("Incomplete block read: " + tos(s().gcount()) + "/" + tos(size) + " bytes");
111 }
112 return s().gcount();
113 }
114
115 std::string Connection::readLine() { return getlineCRLF(s()); }
116
117 std::streamsize Connection::readBlock(std::string & block, std::streamsize const & size, bool doThrow)
118 {
119 block.resize(size);
120 return readBlock(&block[0], size, doThrow);
121 }
122
123 std::string Connection::readBlock(std::streamsize const & size)
124 {
125 std::string block;
126 block.resize(size);
127 readBlock(&block[0], size);
128 return block;
129 }
130
131 std::vector<char> Connection::readBlockVec(std::streamsize const & size)
132 {
133 std::vector<char> block(size);
134 readBlock(&block[0], size);
135 return block;
136 }
137
138 Header & Connection::readHeader(Header & header)
139 {
140 std::string line(readLine());
141 while (line != "")
142 {
143 header.add(line);
144 line = readLine();
145 }
146 return header;
147 }
148
149 Header Connection::readHeader()
150 {
151 Header header;
152 return readHeader(header);
153 }
154
155 Connection & Connection::writeLine(std::string const & line)
156 {
157 s() << line << "\r\n";
158 return *this;
159 }
160
161 Connection & Connection::write(std::string const & block)
162 {
163 s().write(&block[0], block.size());
164 return *this;
165 }
166
167 Connection & Connection::write(StatusLine const & statusLine)
168 {
169 writeLine(statusLine.get());
170 return *this;
171 }
172
173 Connection & Connection::write(RequestLine const & requestLine)
174 {
175 writeLine(requestLine.get());
176 return *this;
177 }
178
179 Connection & Connection::write(HeaderField const & oHeaderField, std::string const & prefix)
180 {
181 writeLine(prefix + oHeaderField.get());
182 return *this;
183 }
184
185 Connection & Connection::write(Header const & header, std::string const & prefix)
186 {
187 for (Header::const_iterator i(header.begin()); i != header.end(); ++i)
188 {
189 write(*i, prefix);
190 }
191 return *this;
192 }
193
194 std::string Connection::simpleHttpRequest(std::string const & body)
195 {
196 write(RequestLine());
197 write(Header().add("Content-Length", tos(body.size())));
198 writeLine();
199 write(body);
200 s().flush();
201
202 StatusLine status(readLine());
203 Header header(readHeader());
204 if (header.exists("Content-Length"))
205 {
206 std::string body(readBlock(header.get<std::streamsize>("Content-Length")));
207 return body;
208 }
209 return "";
210 }
211
212 }}}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_HTTP_CONNECTION_HPP
4 #define UI_UTIL_HTTP_CONNECTION_HPP
5
6 // STDC++
7 #include <iostream>
8 #include <string>
9 #include <vector>
10
11 // C++ Libraries
12 #include <ui-utilcpp/Socket.hpp>
13 #include <ui-utilcpp/http/Header.hpp>
14
15 namespace UI {
16 namespace Util {
17 namespace Http {
18
19 class Connection
20 {
21 private:
22 Socket * const socket_;
23 std::iostream * const stream_;
24 bool const externalStream_;
25
26 /** @brief Helper for constructors to destroy internal data on exception. */
27 void destroy();
28 public:
29 /** Connection w/ an existing stream. */
30 Connection(std::iostream & stream);
31
32 /** Connection w/ an open (socket) file descriptor. */
33 Connection(int fd, bool closeFd=false,
34 long int rcvToSeconds=0, long int rcvToMicroseconds=0,
35 long int sndToSeconds=0, long int sndToMicroseconds=0,
36 bool noBlock=false);
37
38 /** Connection w/ an INet peer. */
39 Connection(std::string const & host, unsigned int port,
40 long int rcvToSeconds=0, long int rcvToMicroseconds=0,
41 long int sndToSeconds=0, long int sndToMicroseconds=0,
42 bool noBlock=false);
43
44 #ifndef WIN32
45 /** Connection w/ an UNIX peer. */
46 Connection(std::string const & path,
47 long int rcvToSeconds=0, long int rcvToMicroseconds=0,
48 long int sndToSeconds=0, long int sndToMicroseconds=0,
49 bool noBlock=false);
50 #endif
51
52 ~Connection();
53
54 /** @name Get socket information.
55 * @{ */
56 std::string getId() const;
57 std::string getPeerId() const;
58 std::string getConnId() const;
59 /** @} */
60
61 /** @name Get stream for arbitrary use.
62 * @{ */
63 std::iostream const & s() const;
64 std::iostream & s();
65 /** @} */
66
67 private:
68 std::streamsize readBlock(char * const buf, std::streamsize const & size, bool doThrow=true);
69
70 public:
71 /** @name Read utilities.
72 * @{ */
73 std::string readLine();
74 std::streamsize readBlock(std::string & block, std::streamsize const & size, bool doThrow=true);
75 std::string readBlock(std::streamsize const & size);
76 std::vector<char> readBlockVec(std::streamsize const & size);
77 Header & readHeader(Header & header);
78 Header readHeader();
79 /** @} */
80
81 /** @name Write utilities.
82 * @{ */
83 Connection & writeLine(std::string const & line="");
84 Connection & write(std::string const & block);
85 Connection & write(StatusLine const & statusLine);
86 Connection & write(RequestLine const & requestLine);
87 Connection & write(HeaderField const & oHeaderField, std::string const & prefix="");
88 Connection & write(Header const & header, std::string const & prefix="");
89 /** @} */
90
91 /** @name A simple "default" http request. */
92 std::string simpleHttpRequest(std::string const & body);
93 };
94
95 }}}
96 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "Cookie.hpp"
5
6 // C++ Libraries
7 #include <ui-utilcpp/Text.hpp>
8
9 namespace UI {
10 namespace Util {
11 namespace Http {
12
13 // Cookie
14 Cookie::Cookie(std::string const & name, std::string const & value)
15 :std::pair<std::string, std::string>(name, value)
16 {}
17
18 std::string const & Cookie::getName() const { return first; }
19 std::string const & Cookie::getValue() const { return second; }
20
21
22 // Cookies
23 Cookies::Cookies(std::string const & line, std::string const & prefix)
24 {
25 addLine(line, prefix);
26 }
27
28 Cookies::Cookies(HeaderField const & field, std::string const & prefix)
29 {
30 if (field.getName() != "Cookie")
31 {
32 UI_THROW("Not a \"Cookie\" header field: " + field.getName());
33 }
34 addLine(field.getValue(), prefix);
35 }
36
37 Cookies::Cookies(Header const & header, std::string const & prefix)
38 {
39 add(header, prefix);
40 }
41
42 Cookies & Cookies::add(std::string const & name, std::string const & value)
43 {
44 push_back(Cookie(name, value));
45 return *this;
46 }
47
48 Cookies & Cookies::addLine(std::string const & line, std::string const & prefix)
49 {
50 std::string::size_type const size(line.size());
51 if (size)
52 {
53 std::string::size_type p0(0);
54 while (p0 != std::string::npos)
55 {
56 std::string::size_type const p1(line.find_first_of('=', p0));
57 if (p1 == std::string::npos)
58 {
59 break; // no name=value pair left
60 }
61
62 std::string::size_type p2(line.find_first_of(';', p1));
63 p2 = p2 == std::string::npos ? size : p2;
64
65 // accept only cookie names and values not containing " ,;="
66 std::string const name(line.substr(p0, p1-p0));
67 std::string const value(line.substr(p1+1, p2-p1-1));
68 if (name.find_first_of(" ,;") == std::string::npos &&
69 value.find_first_of(" ,=") == std::string::npos)
70 {
71 if (prefix.empty())
72 {
73 push_back(Cookie(name, value));
74 }
75 else if (name.compare(0, prefix.size(), prefix) == 0)
76 {
77 push_back(Cookie(name.substr(prefix.size()), value));
78 }
79 }
80
81 p0 = p2 == size ? std::string::npos : line.find_first_not_of(" \t", p2+1);
82 }
83 }
84 return *this;
85 }
86
87 Cookies & Cookies::add(Header const & header, std::string const & prefix)
88 {
89 return addLine(header.get("Cookie", false), prefix);
90 }
91
92
93 Cookies::const_iterator Cookies::find(std::string const & name) const
94 {
95 const_iterator i;
96 for (i = begin(); i != end() && i->getName() != name; ++i) {}
97 return i;
98 }
99
100 bool Cookies::exists(std::string const & name) const
101 {
102 return find(name) != end();
103 }
104
105 std::string const & Cookies::get(std::string const & name, bool doThrow) const
106 {
107 const_iterator i(find(name));
108 if (i == end() && doThrow)
109 {
110 UI_THROW("Cookie not found: " + name);
111 }
112 return (i == end() ? EmptyString_ : i->getValue());
113 }
114
115 std::string Cookies::getLine(std::string const & prefix) const
116 {
117 std::string result;
118 for (const_iterator i(begin()); i != end(); ++i)
119 {
120 result += prefix + i->getName() + "=" + i->getValue() + ((i+1) == end() ? "" : "; ");
121 }
122 return result;
123 }
124
125
126 // SetCookie
127 SetCookie::SetCookie(HeaderField const & field)
128 {
129 if (field.getName() != "SetCookie")
130 {
131 UI_THROW("Not a \"SetCookie\" header field: " + field.getName());
132 }
133 setLine(field.getValue());
134 }
135
136 SetCookie::SetCookie(std::string const & name, std::string const & value)
137 {
138 setName(name);
139 setValue(value);
140 setExpires("");
141 setDomain("");
142 setPath("");
143 setSecure(false);
144 }
145
146 SetCookie & SetCookie::setName(std::string const & name)
147 {
148 if (!name.size())
149 {
150 UI_THROW("Empty name for SetCookie");
151 }
152 name_ = name;
153 return *this;
154 }
155
156 SetCookie & SetCookie::setValue(std::string const & value)
157 {
158 value_ = value;
159 return *this;
160 }
161
162 SetCookie & SetCookie::setExpires(std::string const & expires)
163 {
164 expires_ = expires;
165 return *this;
166 }
167
168 SetCookie & SetCookie::setExpires(time_t const timestamp)
169 {
170 char buf[30];
171 struct tm t;
172 gmtime_r(&timestamp, &t);
173 strftime(buf, 30, "%a, %d-%b-%Y %H:%M:%S %Z", &t);
174 expires_ = buf;
175 return *this;
176 }
177
178 SetCookie & SetCookie::setPath(std::string const & path)
179 {
180 path_ = path;
181 return *this;
182 }
183
184 SetCookie & SetCookie::setDomain(std::string const & domain)
185 {
186 domain_ = domain;
187 return *this;
188 }
189
190 SetCookie & SetCookie::setSecure(bool const & secure)
191 {
192 secure_ = secure;
193 return *this;
194 }
195
196 SetCookie & SetCookie::setLine(std::string const & line)
197 {
198 // Defaults for new values
199 std::string newName("");
200 std::string newValue("");
201 std::string newExpires("");
202 std::string newPath("");
203 std::string newDomain("");
204 bool newSecure(false);
205
206 std::string::size_type const size(line.size());
207 if (size)
208 {
209 std::string::size_type p0(0);
210 while (p0 != std::string::npos)
211 {
212 std::string::size_type p1(line.find_first_of("=;", p0));
213 p1 = p1 == std::string::npos ? size : p1;
214
215 std::string const name(line.substr(p0, p1-p0));
216 if (name.find_first_of(" ,") != std::string::npos)
217 {
218 // don't care for names with evil characters in them
219 p0 = line.find_first_of(';', p1);
220 continue;
221 }
222
223 std::string::size_type p2(p1);
224 if (p1 != size && line.at(p1) == '=')
225 {
226 p2 = line.find_first_of(';', p1);
227 p2 = p2 == std::string::npos ? size : p2;
228
229 std::string const value(line.substr(p1+1, p2-p1-1));
230 if (name == "expires") newExpires = value;
231 else if (name == "domain") newDomain = value;
232 else if (name == "path") newPath = value;
233 else if (value.find(" ,") == std::string::npos)
234 {
235 newName = name;
236 newValue = value;
237 }
238 }
239 else if (name == "secure")
240 {
241 newSecure = true;
242 }
243
244 p0 = p2 == size ? std::string::npos : line.find_first_not_of(" \t", p2+1);
245 }
246 }
247
248 // Set new values
249 setName(newName);
250 setValue(newValue);
251 setExpires(newExpires);
252 setPath(newPath);
253 setDomain(newDomain);
254 setSecure(newSecure);
255
256 return *this;
257 }
258
259 std::string const & SetCookie::getName() const { return name_; }
260 std::string const & SetCookie::getValue() const { return value_; }
261 std::string const & SetCookie::getExpires() const { return expires_; }
262 std::string const & SetCookie::getPath() const { return path_; }
263 std::string const & SetCookie::getDomain() const { return domain_; }
264
265 void SetCookie::addTok(std::string & line, std::string const & name, std::string const & value) const
266 {
267 line += "; " + name + "=" + value;
268 }
269
270 void SetCookie::addTokDef(std::string & line, std::string const & name, std::string const & value, std::string const & defaultValue) const
271 {
272 if (value.size()) { addTok(line, name, value); }
273 else if (defaultValue.size()) { addTok(line, name, defaultValue); }
274 }
275
276 std::string SetCookie::getLine(std::string const & prefix,
277 std::string const & expiresDefault,
278 std::string const & pathDefault,
279 std::string const & domainDefault) const
280 {
281 std::string result(prefix + name_ + "=" + value_);
282 addTokDef(result, "expires", expires_, expiresDefault);
283 addTokDef(result, "path", path_, pathDefault);
284 addTokDef(result, "domain", domain_, domainDefault);
285 if (secure_) { result += "; secure"; };
286 return result;
287 }
288
289
290 // SetCookies
291 SetCookies::SetCookies()
292 {}
293
294 SetCookies::SetCookies(Header const & header)
295 {
296 for (Header::const_iterator i(header.begin()); i != header.end(); ++i)
297 {
298 if (i->getName() == "Set-Cookie")
299 {
300 push_back(SetCookie(*i));
301 }
302 }
303 }
304
305 SetCookie & SetCookies::add(std::string const & name, std::string const & value)
306 {
307 push_back(SetCookie(name, value));
308 return back();
309 }
310
311 SetCookies::const_iterator SetCookies::find(std::string const & name) const
312 {
313 const_iterator i;
314 for (i = begin(); i != end() && (*i).getName() != name; ++i) {}
315 return i;
316 }
317
318 bool SetCookies::exists(std::string const & name) const
319 {
320 return find(name) != end();
321 }
322
323 SetCookie const & SetCookies::get(std::string const & name) const
324 {
325 const_iterator i(find(name));
326 if (i == end())
327 {
328 UI_THROW("SetCookie not found : " + name);
329 }
330 return *i;
331 }
332
333 Header SetCookies::getHeader(std::string const & prefix,
334 std::string const & expiresDefault,
335 std::string const & pathDefault,
336 std::string const & domainDefault) const
337 {
338 Header result;
339 for (const_iterator i(begin()); i != end(); ++i)
340 {
341 result.add("Set-Cookie", i->getLine(prefix, expiresDefault, pathDefault, domainDefault));
342 }
343 return result;
344 }
345
346 }}}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_HTTP_COOKIE_HPP
4 #define UI_UTIL_HTTP_COOKIE_HPP
5
6 // STDC
7 #include <ctime>
8
9 // STDC++
10 #include <string>
11 #include <vector>
12
13 // C++ libraries
14 #include <ui-utilcpp/http/Header.hpp>
15
16 namespace UI {
17 namespace Util {
18 namespace Http {
19
20 /** @todo Parts marked "GENERIC PART" should be solved by a generic key/pair vector. */
21
22 class Cookie: private std::pair<std::string, std::string>
23 {
24 public:
25 Cookie(std::string const & name, std::string const & value);
26 std::string const & getName() const;
27 std::string const & getValue() const;
28 };
29
30 /** @brief Handle "Cookie" request header field values syntactically.
31 *
32 * @note Wording <em>line</em> means a string in "Cookie" header field
33 * value syntax ("a=b;c=d;e=f") as described
34 * http://wp.netscape.com/newsref/std/cookie_spec.html .
35 */
36 class Cookies: public std::vector<Cookie>
37 {
38 public:
39 Cookies(std::string const & line="", std::string const & prefix="");
40 Cookies(HeaderField const & field, std::string const & prefix="");
41 Cookies(Header const & header, std::string const & prefix="");
42
43 /** @name Modifiers (add cookies).
44 * @{ */
45 Cookies & add(std::string const & name, std::string const & value);
46 Cookies & addLine(std::string const & line, std::string const & prefix="");
47 Cookies & add(Header const & header, std::string const & prefix="");
48 /** @} */
49
50 /** @name Accessors.
51 * @{ */
52 // GENERIC PART
53 const_iterator find(std::string const & name) const;
54 bool exists(std::string const & name) const;
55 std::string const & get(std::string const & name, bool doThrow=true) const;
56 // END GENERIC PART
57 std::string getLine(std::string const & prefix="") const;
58 /** @} */
59 };
60
61 /** @brief Handle "SetCookie" request header field values syntactically.
62 *
63 * @note Wording <em>line</em> means a string in "SetCookie" header
64 * field value syntax ("NAME=a;expires=b;path=c;...") as described
65 * http://wp.netscape.com/newsref/std/cookie_spec.html .
66 *
67 * @todo Syntax integrity checks for setVALUE methods (expires, domain, path, ...).
68 */
69 class SetCookie
70 {
71 public:
72 SetCookie(HeaderField const & field);
73 SetCookie(std::string const & name, std::string const & value="");
74
75 /** @name Modifiers (set values).
76 * @{ */
77 SetCookie & setName(std::string const & name);
78 SetCookie & setValue(std::string const & value);
79 SetCookie & setExpires(std::string const & expires="Tue, 01-Jan-1980 00:00:00 GMT");
80 SetCookie & setExpires(time_t const timestamp);
81 SetCookie & setPath(std::string const & path);
82 SetCookie & setDomain(std::string const & domain);
83 SetCookie & setSecure(bool const & secure=true);
84
85 /** @brief This resets all values and sets the values in line. */
86 SetCookie & setLine(std::string const & line);
87 /** @} */
88
89 /** @name Accessors. */
90 /** @{ */
91 std::string const & getName() const;
92 std::string const & getValue() const;
93 std::string const & getExpires() const;
94 std::string const & getPath() const;
95 std::string const & getDomain() const;
96 /** @} */
97
98 private:
99 void addTok(std::string & line, std::string const & name, std::string const & value) const;
100 void addTokDef(std::string & line, std::string const & name, std::string const & value, std::string const & defaultValue) const;
101
102 public:
103 /** @brief Composition. */
104 std::string getLine(std::string const & prefix="",
105 std::string const & expiresDefault="",
106 std::string const & pathDefault="",
107 std::string const & domainDefault="") const;
108
109 private:
110 std::string name_;
111 std::string value_;
112 std::string expires_;
113 std::string path_;
114 std::string domain_;
115 bool secure_;
116 };
117
118
119 /** @brief Handle a vector of SetCookie's. */
120 class SetCookies: public std::vector<SetCookie>
121 {
122 public:
123 SetCookies();
124 SetCookies(Header const & header);
125
126 SetCookie & add(std::string const & name, std::string const & value="");
127
128 /** @name Accessors. */
129 /** @{ */
130 // GENERIC PART
131 const_iterator find(std::string const & name) const;
132 bool exists(std::string const & name) const;
133 SetCookie const & get(std::string const & name) const;
134 // END GENERIC PART
135
136 Header getHeader(std::string const & prefix="",
137 std::string const & expiresDefault="",
138 std::string const & pathDefault="",
139 std::string const & domainDefault="") const;
140 /** @} */
141 };
142
143 }}}
144 #endif
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "Header.hpp"
5
6 // STDC++
7 #include <sstream>
8
9 // Local
10 #include "Connection.hpp"
11
12 namespace UI {
13 namespace Util {
14 namespace Http {
15
16 Exception::Exception(std::string const & what, std::string const & debug)
17 :Util::Exception("HTTP error: " + what, debug)
18 {}
19
20 bool verifyVersion(std::string const & version, bool const & doThrow)
21 {
22 bool const result(isToken(version, "HTTP/1.1,HTTP/1.0"));
23 if (!result && doThrow)
24 {
25 UI_THROW("Unsupported version: " + version);
26 }
27 return result;
28 }
29
30
31 // RequestLine
32 RequestLine::MethodMap RequestLine::generateMethodMap()
33 {
34 MethodMap result;
35 result[Options_] = "OPTIONS";
36 result[Get_] = "GET";
37 result[Head_] = "HEAD";
38 result[Post_] = "POST";
39 result[Put_] = "PUT";
40 result[Delete_] = "DELETE";
41 result[Trace_] = "TRACE";
42 result[Connect_] = "CONNECT";
43 return result;
44 }
45
46 RequestLine::MethodMap const RequestLine::MethodMap_(RequestLine::generateMethodMap());
47
48 RequestLine::Method RequestLine::str2Method(std::string const & method)
49 {
50 for (MethodMap::const_iterator i(MethodMap_.begin()); i != MethodMap_.end(); ++i)
51 {
52 if (i->second == method) return i->first;
53 }
54 UI_THROW("Unsupported method: " + method);
55 }
56
57 RequestLine::RequestLine(Method const & method, std::string const & uri, std::string const & version)
58 {
59 setMethod(method);
60 setURI(uri);
61 setVersion(version);
62 }
63
64 RequestLine::RequestLine(std::string const & line)
65 {
66 std::vector<std::string> tokens(strtoks(line, " \t"));
67 if (tokens.size() != 3)
68 {
69 UI_THROW("Parsing request line failed: " + line);
70 }
71 setMethod(tokens[0]);
72 setURI(tokens[1]);
73 setVersion(tokens[2]);
74 }
75
76 RequestLine & RequestLine::setMethod(Method const & method)
77 {
78 method_ = method;
79 return *this;
80 }
81
82 RequestLine & RequestLine::setMethod(std::string const & method)
83 {
84 return setMethod(str2Method(method));
85 }
86
87 RequestLine & RequestLine::setURI(std::string const & uri)
88 {
89 uri_ = uri;
90 return *this;
91 }
92
93 RequestLine & RequestLine::setVersion(std::string const & version)
94 {
95 verifyVersion(version);
96 version_ = version;
97 return *this;
98 }
99
100 RequestLine::Method const & RequestLine::getMethod() const { return method_; }
101 std::string const & RequestLine::getMethodStr() const { return MethodMap_.find(method_)->second; }
102 std::string const & RequestLine::getURI() const { return uri_; }
103 std::string const & RequestLine::getVersion() const { return version_; }
104
105 std::string RequestLine::get() const
106 {
107 return getMethodStr() + " " + getURI() + " " + getVersion();
108 }
109
110
111 // StatusLine
112 StatusLine::StatusLine(Code const & code, std::string const & reason, std::string const & version)
113 {
114 setCode(code);
115 setReason(reason);
116 setVersion(version);
117 }
118
119 StatusLine::StatusLine(std::string const & line)
120 {
121 std::vector<std::string> tokens(strtoks(line, " \t"));
122 if (tokens.size() < 2)
123 {
124 UI_THROW("Parsing status line failed: " + line);
125 }
126 setCode(ato<Code>(tokens[1]));
127 setVersion(tokens[0]);
128
129 std::string reason;
130 for (unsigned int i(2); i < tokens.size(); ++i)
131 {
132 reason += (i == 2 ? "" : " ") + tokens[i];
133 }
134 setReason(reason);
135 }
136
137 StatusLine & StatusLine::setCode(Code const & code)
138 {
139 if (code < 100 || code >= 600)
140 {
141 UI_THROW("Invalid status code: " + tos(code));
142 }
143 code_ = code;
144 return *this;
145 }
146 StatusLine & StatusLine::setCode(std::string const & code)
147 {
148 return setCode(ato<Code>(code));
149 }
150 StatusLine & StatusLine::setReason(std::string const & reason)
151 {
152 reason_ = reason;
153 return *this;
154 }
155 StatusLine & StatusLine::setVersion(std::string const & version)
156 {
157 verifyVersion(version);
158 version_ = version;
159 return *this;
160 }
161
162 StatusLine::Code const & StatusLine::getCode() const { return code_; }
163 std::string StatusLine::getCodeStr() const { return tos(code_); }
164 std::string const & StatusLine::getReason() const { return reason_; }
165 std::string const & StatusLine::getVersion() const { return version_; }
166
167 std::string StatusLine::get() const { return getVersion() + " " + getCodeStr() + " " + getReason(); }
168
169
170 // HeaderField
171 HeaderField::HeaderField(std::string const & name, std::string const & value)
172 :std::pair<std::string, std::string>(name, value)
173 {
174 str2Ascii(second);
175 }
176
177 HeaderField::HeaderField(std::string const & line)
178 {
179 std::string::size_type const colonPos(line.find(':'));
180 /** @todo: Is it ok to allow empty names? */
181 if (colonPos == std::string::npos)
182 {
183 UI_THROW("Not a header field: " + line);
184 }
185 else
186 {
187 /** todo: What about spaces before colon (e.g. "Content-Length : 34")? */
188 first = line.substr(0, colonPos);
189
190 std::string::size_type const valuePos(line.find_first_not_of(" \t", colonPos+1));
191 second = valuePos == std::string::npos ? "" : line.substr(valuePos);
192 }
193 str2Ascii(second);
194 }
195
196 std::string const & HeaderField::getName() const { return first; }
197 std::string const & HeaderField::getValue() const { return second; }
198
199 std::string HeaderField::get() const { return first + ": " + second; }
200
201
202 // Header
203 Header::const_iterator Header::find(std::string const & name) const
204 {
205 const_iterator i;
206 for (i = begin(); i != end() && (*i).getName() != name; ++i)
207 {}
208 return i;
209 }
210 bool Header::exists(std::string const & name) const
211 {
212 return find(name) != end();
213 }
214 std::string const & Header::get(std::string const & name, bool doThrow) const
215 {
216 const_iterator i(find(name));
217 if (i == end() && doThrow)
218 {
219 UI_THROW("Header field not found: " + name);
220 }
221 return (i == end() ? EmptyString_ : i->getValue());
222 }
223
224 Header & Header::add(std::string const & key, std::string const & value)
225 {
226 push_back(HeaderField(key, value));
227 return *this;
228 }
229 Header & Header::add(std::string const & line)
230 {
231 push_back(HeaderField(line));
232 return *this;
233 }
234 Header Header::getMulti(std::string const & name) const
235 {
236 Header result;
237 for (Header::const_iterator i(begin()); i != end(); ++i)
238 {
239 if (i->getName() == name)
240 {
241 result.push_back(HeaderField(i->getName(), i->getValue()));
242 }
243 }
244 return result;
245 }
246 Header Header::getPrefix(std::string const & prefix) const
247 {
248 Header result;
249 for (Header::const_iterator i(begin()); i != end(); ++i)
250 {
251 if (i->getName().compare(0, prefix.size(), prefix) == 0)
252 {
253 result.push_back(HeaderField(i->getName().substr(prefix.size()), i->getValue()));
254 }
255 }
256 return result;
257 }
258
259 std::string Header::get() const
260 {
261 std::stringstream s;
262 Connection(s).write(*this);
263 return s.str();
264 }
265
266 }}}
0 /**
1 * @file
2 *
3 */
4 #ifndef UI_UTIL_HTTP_HEADER_HPP
5 #define UI_UTIL_HTTP_HEADER_HPP
6
7 // STDC++
8 #include <string>
9 #include <vector>
10 #include <map>
11
12 // C++ libraries
13 #include <ui-utilcpp/Exception.hpp>
14 #include <ui-utilcpp/Text.hpp>
15
16 namespace UI {
17 namespace Util {
18 /** @brief Namespace for all HTTP related code. */
19 namespace Http {
20
21 /** @brief Exception for Http namespace. */
22 class Exception: public Util::Exception
23 {
24 public:
25 Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_);
26 };
27
28 /** @brief Helper to verify a version string. */
29 bool verifyVersion(std::string const & version, bool const & doThrow=true);
30
31 /** @brief Parse and represent a request's request line. @see RFC 2616, 5.1.
32 * @see RFC 2616, 5.1.
33 *
34 * Example request lines: "POST / HTTP/1.1", "GET /humbug&a=auchHumbug HTTP/1.1".
35 */
36 class RequestLine
37 {
38 public:
39 /** @name HTTP 1.1 methods and string mappings.
40 *
41 * @note Be sure to always update both, Method and generateMethodMap().
42 */
43 enum Method
44 {
45 Options_,
46 Get_,
47 Head_,
48 Post_,
49 Put_,
50 Delete_,
51 Trace_,
52 Connect_
53 };
54 private:
55 typedef std::map<Method, std::string> MethodMap;
56 static MethodMap generateMethodMap();
57 static MethodMap const MethodMap_;
58
59 public:
60 static Method str2Method(std::string const & method);
61
62 /** @brief Construct from components. */
63 RequestLine(Method const & method=Post_, std::string const & uri="/", std::string const & version="HTTP/1.1");
64 /** @brief Construct from composition (parse). */
65 RequestLine(std::string const & line);
66
67 /** @name Set (and validate) components.
68 * @{ */
69 RequestLine & setMethod(Method const & method);
70 RequestLine & setMethod(std::string const & method);
71 RequestLine & setURI(std::string const & uri);
72 RequestLine & setVersion(std::string const & version);
73 /** @} */
74
75 /** @name Get components.
76 * @{ */
77 Method const & getMethod() const;
78 std::string const & getMethodStr() const;
79 std::string const & getURI() const;
80 std::string const & getVersion() const;
81 /** @} */
82
83 /** @brief Get composition. */
84 std::string get() const;
85
86 private:
87 Method method_;
88 std::string uri_;
89 std::string version_;
90 };
91
92
93 /** @brief Parse and represent a response's status line.
94 * @see RFC 2616, 6.1.
95 *
96 * Example status line: "HTTP/1.1 550 Internal Server Error"
97 */
98 class StatusLine
99 {
100 public:
101 typedef unsigned int Code;
102
103 /** @brief Construct from components. */
104 StatusLine(Code const & code=200, std::string const & reason="OK", std::string const & version="HTTP/1.1");
105
106 /** @brief Construct from composition (parse). */
107 StatusLine(std::string const & line);
108
109 /** @name Set (and validate) components.
110 * @{ */
111 StatusLine & setCode(Code const & code);
112 StatusLine & setCode(std::string const & code);
113 StatusLine & setReason(std::string const & reason);
114 StatusLine & setVersion(std::string const & version);
115 /** @} */
116
117 /** @name Get components.
118 * @{ */
119 Code const & getCode() const;
120 std::string getCodeStr() const;
121 std::string const & getReason() const;
122 std::string const & getVersion() const;
123 /** @} */
124
125 /** @brief Get composition. */
126 std::string get() const;
127
128 private:
129 Code code_;
130 std::string reason_;
131 std::string version_;
132 };
133
134 /** @brief Header field.
135 *
136 * Example header field: "ContentLength: 1234"
137 */
138 class HeaderField: private std::pair<std::string, std::string>
139 {
140 public:
141 /** @brief Construct from components. */
142 HeaderField(std::string const & name, std::string const & value);
143
144 /** @brief Construct from composition (parse). */
145 HeaderField(std::string const & line);
146
147 /** @name Get components.
148 * @{ */
149 std::string const & getName() const;
150 std::string const & getValue() const;
151 /** @} */
152
153 /** @brief Get composition. */
154 std::string get() const;
155 };
156
157 /** @brief Array of header fields. */
158 class Header: public std::vector<HeaderField>
159 {
160 public:
161 const_iterator find(std::string const & name) const;
162 bool exists(std::string const & name) const;
163 std::string const & get(std::string const & name, bool doThrow=true) const;
164 template <typename I>
165 I get(std::string const & name, bool doThrow=true) const
166 {
167 return ato<I>(get(name, doThrow));
168 }
169 Header & add(std::string const & key, std::string const & value);
170 Header & add(std::string const & line);
171 Header getMulti(std::string const & name) const;
172 Header getPrefix(std::string const & prefix) const;
173
174 /** @brief Get composition. */
175 std::string get() const;
176 };
177
178 }}}
179 #endif
0 AM_CPPFLAGS = -I$(top_srcdir)/src
1 AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS)
2
3 incdir = $(includedir)/$(PACKAGE)/http
4 inc_HEADERS = Header.hpp Cookie.hpp Connection.hpp URL.hpp
5
6 noinst_LTLIBRARIES = libui-utilcpp-http.la
7 libui_utilcpp_http_la_SOURCES = Header.cpp Cookie.cpp Connection.cpp URL.cpp
0 # Makefile.in generated by automake 1.14.1 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 VPATH = @srcdir@
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
31 case $$MAKEFLAGS in \
32 *\\[\ \ ]*) \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
36 esac; \
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
63 pkgdatadir = $(datadir)/@PACKAGE@
64 pkgincludedir = $(includedir)/@PACKAGE@
65 pkglibdir = $(libdir)/@PACKAGE@
66 pkglibexecdir = $(libexecdir)/@PACKAGE@
67 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
68 install_sh_DATA = $(install_sh) -c -m 644
69 install_sh_PROGRAM = $(install_sh) -c
70 install_sh_SCRIPT = $(install_sh) -c
71 INSTALL_HEADER = $(INSTALL_DATA)
72 transform = $(program_transform_name)
73 NORMAL_INSTALL = :
74 PRE_INSTALL = :
75 POST_INSTALL = :
76 NORMAL_UNINSTALL = :
77 PRE_UNINSTALL = :
78 POST_UNINSTALL = :
79 build_triplet = @build@
80 host_triplet = @host@
81 subdir = src/ui-utilcpp/http
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp $(inc_HEADERS)
84 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
85 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
86 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
87 $(ACLOCAL_M4)
88 mkinstalldirs = $(install_sh) -d
89 CONFIG_HEADER = $(top_builddir)/config.h
90 CONFIG_CLEAN_FILES =
91 CONFIG_CLEAN_VPATH_FILES =
92 LTLIBRARIES = $(noinst_LTLIBRARIES)
93 libui_utilcpp_http_la_LIBADD =
94 am_libui_utilcpp_http_la_OBJECTS = Header.lo Cookie.lo Connection.lo \
95 URL.lo
96 libui_utilcpp_http_la_OBJECTS = $(am_libui_utilcpp_http_la_OBJECTS)
97 AM_V_lt = $(am__v_lt_@AM_V@)
98 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
99 am__v_lt_0 = --silent
100 am__v_lt_1 =
101 AM_V_P = $(am__v_P_@AM_V@)
102 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
103 am__v_P_0 = false
104 am__v_P_1 = :
105 AM_V_GEN = $(am__v_GEN_@AM_V@)
106 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
107 am__v_GEN_0 = @echo " GEN " $@;
108 am__v_GEN_1 =
109 AM_V_at = $(am__v_at_@AM_V@)
110 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
111 am__v_at_0 = @
112 am__v_at_1 =
113 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
114 depcomp = $(SHELL) $(top_srcdir)/depcomp
115 am__depfiles_maybe = depfiles
116 am__mv = mv -f
117 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
118 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
119 LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
120 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
121 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
122 $(AM_CXXFLAGS) $(CXXFLAGS)
123 AM_V_CXX = $(am__v_CXX_@AM_V@)
124 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
125 am__v_CXX_0 = @echo " CXX " $@;
126 am__v_CXX_1 =
127 CXXLD = $(CXX)
128 CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
129 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
130 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
131 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
132 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
133 am__v_CXXLD_0 = @echo " CXXLD " $@;
134 am__v_CXXLD_1 =
135 SOURCES = $(libui_utilcpp_http_la_SOURCES)
136 DIST_SOURCES = $(libui_utilcpp_http_la_SOURCES)
137 am__can_run_installinfo = \
138 case $$AM_UPDATE_INFO_DIR in \
139 n|no|NO) false;; \
140 *) (install-info --version) >/dev/null 2>&1;; \
141 esac
142 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
143 am__vpath_adj = case $$p in \
144 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
145 *) f=$$p;; \
146 esac;
147 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
148 am__install_max = 40
149 am__nobase_strip_setup = \
150 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
151 am__nobase_strip = \
152 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
153 am__nobase_list = $(am__nobase_strip_setup); \
154 for p in $$list; do echo "$$p $$p"; done | \
155 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
156 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
157 if (++n[$$2] == $(am__install_max)) \
158 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
159 END { for (dir in files) print dir, files[dir] }'
160 am__base_list = \
161 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
162 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
163 am__uninstall_files_from_dir = { \
164 test -z "$$files" \
165 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
166 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
167 $(am__cd) "$$dir" && rm -f $$files; }; \
168 }
169 am__installdirs = "$(DESTDIR)$(incdir)"
170 HEADERS = $(inc_HEADERS)
171 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
172 # Read a list of newline-separated strings from the standard input,
173 # and print each of them once, without duplicates. Input order is
174 # *not* preserved.
175 am__uniquify_input = $(AWK) '\
176 BEGIN { nonempty = 0; } \
177 { items[$$0] = 1; nonempty = 1; } \
178 END { if (nonempty) { for (i in items) print i; }; } \
179 '
180 # Make sure the list of sources is unique. This is necessary because,
181 # e.g., the same source file might be shared among _SOURCES variables
182 # for different programs/libraries.
183 am__define_uniq_tagged_files = \
184 list='$(am__tagged_files)'; \
185 unique=`for i in $$list; do \
186 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
187 done | $(am__uniquify_input)`
188 ETAGS = etags
189 CTAGS = ctags
190 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
191 ACLOCAL = @ACLOCAL@
192 AMTAR = @AMTAR@
193 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
194 AR = @AR@
195 AUTOCONF = @AUTOCONF@
196 AUTOHEADER = @AUTOHEADER@
197 AUTOMAKE = @AUTOMAKE@
198 AWK = @AWK@
199 CC = @CC@
200 CCDEPMODE = @CCDEPMODE@
201 CCGNU2_CONFIG = @CCGNU2_CONFIG@
202 CFLAGS = @CFLAGS@
203 CPP = @CPP@
204 CPPFLAGS = @CPPFLAGS@
205 CXX = @CXX@
206 CXXCPP = @CXXCPP@
207 CXXDEPMODE = @CXXDEPMODE@
208 CXXFLAGS = @CXXFLAGS@
209 CYGPATH_W = @CYGPATH_W@
210 DEFS = @DEFS@
211 DEPDIR = @DEPDIR@
212 DLLTOOL = @DLLTOOL@
213 DOXYGEN = @DOXYGEN@
214 DSYMUTIL = @DSYMUTIL@
215 DUMPBIN = @DUMPBIN@
216 ECHO_C = @ECHO_C@
217 ECHO_N = @ECHO_N@
218 ECHO_T = @ECHO_T@
219 EGREP = @EGREP@
220 EXEEXT = @EXEEXT@
221 EXTLIBS = @EXTLIBS@
222 FGREP = @FGREP@
223 GNULIBS = @GNULIBS@
224 GREP = @GREP@
225 INSTALL = @INSTALL@
226 INSTALL_DATA = @INSTALL_DATA@
227 INSTALL_PROGRAM = @INSTALL_PROGRAM@
228 INSTALL_SCRIPT = @INSTALL_SCRIPT@
229 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
230 LD = @LD@
231 LDFLAGS = @LDFLAGS@
232 LIBOBJS = @LIBOBJS@
233 LIBS = @LIBS@
234 LIBTOOL = @LIBTOOL@
235 LIPO = @LIPO@
236 LN_S = @LN_S@
237 LTLIBOBJS = @LTLIBOBJS@
238 MAKEINFO = @MAKEINFO@
239 MANIFEST_TOOL = @MANIFEST_TOOL@
240 MKDIR_P = @MKDIR_P@
241 NM = @NM@
242 NMEDIT = @NMEDIT@
243 OBJDUMP = @OBJDUMP@
244 OBJEXT = @OBJEXT@
245 OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@
246 OST_CXXX2_LIBS = @OST_CXXX2_LIBS@
247 OTOOL = @OTOOL@
248 OTOOL64 = @OTOOL64@
249 PACKAGE = @PACKAGE@
250 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
251 PACKAGE_NAME = @PACKAGE_NAME@
252 PACKAGE_STRING = @PACKAGE_STRING@
253 PACKAGE_TARNAME = @PACKAGE_TARNAME@
254 PACKAGE_URL = @PACKAGE_URL@
255 PACKAGE_VERSION = @PACKAGE_VERSION@
256 PATH_SEPARATOR = @PATH_SEPARATOR@
257 PERL = @PERL@
258 RANLIB = @RANLIB@
259 SED = @SED@
260 SET_MAKE = @SET_MAKE@
261 SHELL = @SHELL@
262 SINGLE_FLAGS = @SINGLE_FLAGS@
263 SINGLE_LIBS = @SINGLE_LIBS@
264 SO_VERSION = @SO_VERSION@
265 STRIP = @STRIP@
266 UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@
267 VERSION = @VERSION@
268 abs_builddir = @abs_builddir@
269 abs_srcdir = @abs_srcdir@
270 abs_top_builddir = @abs_top_builddir@
271 abs_top_srcdir = @abs_top_srcdir@
272 ac_ct_AR = @ac_ct_AR@
273 ac_ct_CC = @ac_ct_CC@
274 ac_ct_CXX = @ac_ct_CXX@
275 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
276 am__include = @am__include@
277 am__leading_dot = @am__leading_dot@
278 am__quote = @am__quote@
279 am__tar = @am__tar@
280 am__untar = @am__untar@
281 bindir = @bindir@
282 build = @build@
283 build_alias = @build_alias@
284 build_cpu = @build_cpu@
285 build_os = @build_os@
286 build_vendor = @build_vendor@
287 builddir = @builddir@
288 datadir = @datadir@
289 datarootdir = @datarootdir@
290 docdir = @docdir@
291 dvidir = @dvidir@
292 exec_prefix = @exec_prefix@
293 host = @host@
294 host_alias = @host_alias@
295 host_cpu = @host_cpu@
296 host_os = @host_os@
297 host_vendor = @host_vendor@
298 htmldir = @htmldir@
299 includedir = @includedir@
300 infodir = @infodir@
301 install_sh = @install_sh@
302 libdir = @libdir@
303 libexecdir = @libexecdir@
304 localedir = @localedir@
305 localstatedir = @localstatedir@
306 mandir = @mandir@
307 mkdir_p = @mkdir_p@
308 oldincludedir = @oldincludedir@
309 pdfdir = @pdfdir@
310 prefix = @prefix@
311 program_transform_name = @program_transform_name@
312 psdir = @psdir@
313 sbindir = @sbindir@
314 sharedstatedir = @sharedstatedir@
315 srcdir = @srcdir@
316 sysconfdir = @sysconfdir@
317 target_alias = @target_alias@
318 top_build_prefix = @top_build_prefix@
319 top_builddir = @top_builddir@
320 top_srcdir = @top_srcdir@
321 AM_CPPFLAGS = -I$(top_srcdir)/src
322 AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS)
323 incdir = $(includedir)/$(PACKAGE)/http
324 inc_HEADERS = Header.hpp Cookie.hpp Connection.hpp URL.hpp
325 noinst_LTLIBRARIES = libui-utilcpp-http.la
326 libui_utilcpp_http_la_SOURCES = Header.cpp Cookie.cpp Connection.cpp URL.cpp
327 all: all-am
328
329 .SUFFIXES:
330 .SUFFIXES: .cpp .lo .o .obj
331 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
332 @for dep in $?; do \
333 case '$(am__configure_deps)' in \
334 *$$dep*) \
335 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
336 && { if test -f $@; then exit 0; else break; fi; }; \
337 exit 1;; \
338 esac; \
339 done; \
340 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ui-utilcpp/http/Makefile'; \
341 $(am__cd) $(top_srcdir) && \
342 $(AUTOMAKE) --gnu src/ui-utilcpp/http/Makefile
343 .PRECIOUS: Makefile
344 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
345 @case '$?' in \
346 *config.status*) \
347 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
348 *) \
349 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
350 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
351 esac;
352
353 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
354 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
355
356 $(top_srcdir)/configure: $(am__configure_deps)
357 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
358 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
359 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
360 $(am__aclocal_m4_deps):
361
362 clean-noinstLTLIBRARIES:
363 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
364 @list='$(noinst_LTLIBRARIES)'; \
365 locs=`for p in $$list; do echo $$p; done | \
366 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
367 sort -u`; \
368 test -z "$$locs" || { \
369 echo rm -f $${locs}; \
370 rm -f $${locs}; \
371 }
372
373 libui-utilcpp-http.la: $(libui_utilcpp_http_la_OBJECTS) $(libui_utilcpp_http_la_DEPENDENCIES) $(EXTRA_libui_utilcpp_http_la_DEPENDENCIES)
374 $(AM_V_CXXLD)$(CXXLINK) $(libui_utilcpp_http_la_OBJECTS) $(libui_utilcpp_http_la_LIBADD) $(LIBS)
375
376 mostlyclean-compile:
377 -rm -f *.$(OBJEXT)
378
379 distclean-compile:
380 -rm -f *.tab.c
381
382 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Connection.Plo@am__quote@
383 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cookie.Plo@am__quote@
384 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Header.Plo@am__quote@
385 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/URL.Plo@am__quote@
386
387 .cpp.o:
388 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
389 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
390 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
391 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
392 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
393
394 .cpp.obj:
395 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
396 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
397 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
398 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
399 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
400
401 .cpp.lo:
402 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
403 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
404 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
405 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
406 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
407
408 mostlyclean-libtool:
409 -rm -f *.lo
410
411 clean-libtool:
412 -rm -rf .libs _libs
413 install-incHEADERS: $(inc_HEADERS)
414 @$(NORMAL_INSTALL)
415 @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \
416 if test -n "$$list"; then \
417 echo " $(MKDIR_P) '$(DESTDIR)$(incdir)'"; \
418 $(MKDIR_P) "$(DESTDIR)$(incdir)" || exit 1; \
419 fi; \
420 for p in $$list; do \
421 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
422 echo "$$d$$p"; \
423 done | $(am__base_list) | \
424 while read files; do \
425 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(incdir)'"; \
426 $(INSTALL_HEADER) $$files "$(DESTDIR)$(incdir)" || exit $$?; \
427 done
428
429 uninstall-incHEADERS:
430 @$(NORMAL_UNINSTALL)
431 @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \
432 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
433 dir='$(DESTDIR)$(incdir)'; $(am__uninstall_files_from_dir)
434
435 ID: $(am__tagged_files)
436 $(am__define_uniq_tagged_files); mkid -fID $$unique
437 tags: tags-am
438 TAGS: tags
439
440 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
441 set x; \
442 here=`pwd`; \
443 $(am__define_uniq_tagged_files); \
444 shift; \
445 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
446 test -n "$$unique" || unique=$$empty_fix; \
447 if test $$# -gt 0; then \
448 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
449 "$$@" $$unique; \
450 else \
451 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
452 $$unique; \
453 fi; \
454 fi
455 ctags: ctags-am
456
457 CTAGS: ctags
458 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
459 $(am__define_uniq_tagged_files); \
460 test -z "$(CTAGS_ARGS)$$unique" \
461 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
462 $$unique
463
464 GTAGS:
465 here=`$(am__cd) $(top_builddir) && pwd` \
466 && $(am__cd) $(top_srcdir) \
467 && gtags -i $(GTAGS_ARGS) "$$here"
468 cscopelist: cscopelist-am
469
470 cscopelist-am: $(am__tagged_files)
471 list='$(am__tagged_files)'; \
472 case "$(srcdir)" in \
473 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
474 *) sdir=$(subdir)/$(srcdir) ;; \
475 esac; \
476 for i in $$list; do \
477 if test -f "$$i"; then \
478 echo "$(subdir)/$$i"; \
479 else \
480 echo "$$sdir/$$i"; \
481 fi; \
482 done >> $(top_builddir)/cscope.files
483
484 distclean-tags:
485 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
486
487 distdir: $(DISTFILES)
488 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
489 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
490 list='$(DISTFILES)'; \
491 dist_files=`for file in $$list; do echo $$file; done | \
492 sed -e "s|^$$srcdirstrip/||;t" \
493 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
494 case $$dist_files in \
495 */*) $(MKDIR_P) `echo "$$dist_files" | \
496 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
497 sort -u` ;; \
498 esac; \
499 for file in $$dist_files; do \
500 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
501 if test -d $$d/$$file; then \
502 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
503 if test -d "$(distdir)/$$file"; then \
504 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
505 fi; \
506 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
507 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
508 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
509 fi; \
510 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
511 else \
512 test -f "$(distdir)/$$file" \
513 || cp -p $$d/$$file "$(distdir)/$$file" \
514 || exit 1; \
515 fi; \
516 done
517 check-am: all-am
518 check: check-am
519 all-am: Makefile $(LTLIBRARIES) $(HEADERS)
520 installdirs:
521 for dir in "$(DESTDIR)$(incdir)"; do \
522 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
523 done
524 install: install-am
525 install-exec: install-exec-am
526 install-data: install-data-am
527 uninstall: uninstall-am
528
529 install-am: all-am
530 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
531
532 installcheck: installcheck-am
533 install-strip:
534 if test -z '$(STRIP)'; then \
535 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
536 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
537 install; \
538 else \
539 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
540 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
541 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
542 fi
543 mostlyclean-generic:
544
545 clean-generic:
546
547 distclean-generic:
548 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
549 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
550
551 maintainer-clean-generic:
552 @echo "This command is intended for maintainers to use"
553 @echo "it deletes files that may require special tools to rebuild."
554 clean: clean-am
555
556 clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
557 mostlyclean-am
558
559 distclean: distclean-am
560 -rm -rf ./$(DEPDIR)
561 -rm -f Makefile
562 distclean-am: clean-am distclean-compile distclean-generic \
563 distclean-tags
564
565 dvi: dvi-am
566
567 dvi-am:
568
569 html: html-am
570
571 html-am:
572
573 info: info-am
574
575 info-am:
576
577 install-data-am: install-incHEADERS
578
579 install-dvi: install-dvi-am
580
581 install-dvi-am:
582
583 install-exec-am:
584
585 install-html: install-html-am
586
587 install-html-am:
588
589 install-info: install-info-am
590
591 install-info-am:
592
593 install-man:
594
595 install-pdf: install-pdf-am
596
597 install-pdf-am:
598
599 install-ps: install-ps-am
600
601 install-ps-am:
602
603 installcheck-am:
604
605 maintainer-clean: maintainer-clean-am
606 -rm -rf ./$(DEPDIR)
607 -rm -f Makefile
608 maintainer-clean-am: distclean-am maintainer-clean-generic
609
610 mostlyclean: mostlyclean-am
611
612 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
613 mostlyclean-libtool
614
615 pdf: pdf-am
616
617 pdf-am:
618
619 ps: ps-am
620
621 ps-am:
622
623 uninstall-am: uninstall-incHEADERS
624
625 .MAKE: install-am install-strip
626
627 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
628 clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
629 ctags-am distclean distclean-compile distclean-generic \
630 distclean-libtool distclean-tags distdir dvi dvi-am html \
631 html-am info info-am install install-am install-data \
632 install-data-am install-dvi install-dvi-am install-exec \
633 install-exec-am install-html install-html-am \
634 install-incHEADERS install-info install-info-am install-man \
635 install-pdf install-pdf-am install-ps install-ps-am \
636 install-strip installcheck installcheck-am installdirs \
637 maintainer-clean maintainer-clean-generic mostlyclean \
638 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
639 pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
640 uninstall-incHEADERS
641
642
643 # Tell versions [3.59,3.63) of GNU make to not export all variables.
644 # Otherwise a system limit (for SysV at least) may be exceeded.
645 .NOEXPORT:
0 // Local configuration
1 #include "config.h"
2
3 // Implementation
4 #include "URL.hpp"
5
6 namespace UI {
7 namespace Util {
8 namespace Http {
9
10 URL::URL(std::string const & url)
11 :url_(url)
12 {
13 if (url.substr(0, 7) != "http://")
14 {
15 UI_THROW("Invalid http url syntax: " + url);
16 }
17 std::string::size_type pathPos(url.find_first_of("/?:", 7));
18
19 host_ = url.substr(7, pathPos == std::string::npos ? pathPos : pathPos-7);
20
21 port_ = 80;
22 if (pathPos != std::string::npos && url[pathPos] == ':')
23 {
24 std::string::size_type newPathPos(url.find_first_of("/?", pathPos+1));
25 port_ = ato<int>(url.substr(pathPos+1, newPathPos == std::string::npos ? newPathPos : newPathPos-pathPos-1));
26 port_ = port_ == 0 ? 80 : port_;
27 pathPos = newPathPos;
28 }
29 path_ = pathPos == std::string::npos || url[pathPos] != '/' ? "/" : "";
30 path_ += pathPos == std::string::npos ? "" : url.substr(pathPos);
31 }
32
33 URL & URL::addParam(std::string const & key, std::string const & value)
34 {
35 char const sep(path_.find_first_of('?') == std::string::npos ? '?' : '&');
36 path_ += sep + key + "=" + value;
37 return *this;
38 }
39
40 std::string const & URL::getHost() const { return host_; }
41 unsigned int const & URL::getPort() const { return port_; }
42 std::string const & URL::getPath() const { return path_; }
43 std::string const URL::getURL() const { return "http://" + host_ + (port_ == 80 ? "" : ":" + UI::Util::tos(port_)) + path_; }
44
45
46 URLGet::URLGet(std::string const & url, long int const & timeout)
47 :url_(url)
48 {
49 Connection c(url_.getHost(), url_.getPort(), timeout, 0, timeout, 0, false);
50
51 c.write(RequestLine(RequestLine::Get_, url_.getPath()));
52 c.write(Header().add("Host", url_.getHost()));
53 c.writeLine();
54 c.s().flush();
55
56 status_ = c.readLine();
57 header_ = c.readHeader();
58 if (header_.exists("Content-Length"))
59 {
60 body_ = c.readBlock(header_.get<std::streamsize>("Content-Length"));
61 }
62 }
63
64 URL const & URLGet::getURL() const { return url_; }
65 StatusLine const & URLGet::getStatus() const { return status_; }
66 Header const & URLGet::getHeader() const { return header_; }
67 std::string const & URLGet::getBody() const { return body_; }
68
69 }}}
0 /**
1 * @file
2 */
3 #ifndef UI_UTIL_HTTP_URL_HPP
4 #define UI_UTIL_HTTP_URL_HPP
5
6 // STDC++
7 #include <string>
8
9 // C++ Libraries
10 #include <ui-utilcpp/http/Connection.hpp>
11
12 namespace UI {
13 namespace Util {
14 namespace Http {
15
16 /** @brief HTTP URL parser. @see RFC 2616, 3.2.2. */
17 class URL
18 {
19 private:
20 std::string const url_;
21 std::string host_;
22 unsigned int port_;
23 std::string path_;
24
25 public:
26 URL(std::string const & url);
27 /** @brief Add param to query part (auto-adds query part if not already added) */
28 URL & addParam(std::string const & key, std::string const & value);
29
30 /** @name Get original url string, host, port and path.
31 *
32 * @note Path includes the optional "query" and is prepared to be
33 * used as request URI.
34 *
35 * @{ */
36 std::string const & getHost() const;
37 unsigned int const & getPort() const;
38 std::string const & getPath() const;
39 std::string const getURL() const;
40 /** @} */
41
42 };
43
44 class URLGet
45 {
46 private:
47 URL const url_;
48 StatusLine status_;
49 Header header_;
50 std::string body_;
51
52 public:
53 URLGet(std::string const & url, long int const & timeout=0);
54
55 URL const & getURL() const;
56 StatusLine const & getStatus() const;
57 Header const & getHeader() const;
58 std::string const & getBody() const;
59 };
60
61 }}}
62 #endif
0 #ifndef SWAB_H
1 #define SWAB_H
2
3 /* casts are necessary for constants, because we never know how for sure
4 * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
5 */
6 #define ___swab16(x) \
7 ({ \
8 __u16 __x = (x); \
9 ((__u16)( \
10 (((__u16)(__x) & (__u16)0x00ffU) << 8) | \
11 (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \
12 })
13
14 #define ___swab32(x) \
15 ({ \
16 __u32 __x = (x); \
17 ((__u32)( \
18 (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | \
19 (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | \
20 (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | \
21 (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); \
22 })
23
24 #define ___swab64(x) \
25 ({ \
26 __u64 __x = (x); \
27 ((__u64)( \
28 (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | \
29 (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | \
30 (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | \
31 (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | \
32 (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | \
33 (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
34 (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \
35 (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \
36 })
37
38 #define ___constant_swab16(x) \
39 ((__u16)( \
40 (((__u16)(x) & (__u16)0x00ffU) << 8) | \
41 (((__u16)(x) & (__u16)0xff00U) >> 8) ))
42 #define ___constant_swab32(x) \
43 ((__u32)( \
44 (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
45 (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
46 (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
47 (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
48 #define ___constant_swab64(x) \
49 ((__u64)( \
50 (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
51 (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
52 (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
53 (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
54 (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
55 (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
56 (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
57 (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
58
59 /*
60 * provide defaults when no architecture-specific optimization is detected
61 */
62 #ifndef __arch__swab16
63 # define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); })
64 #endif
65 #ifndef __arch__swab32
66 # define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); })
67 #endif
68 #ifndef __arch__swab64
69 # define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); })
70 #endif
71
72 #ifndef __arch__swab16p
73 # define __arch__swab16p(x) __arch__swab16(*(x))
74 #endif
75 #ifndef __arch__swab32p
76 # define __arch__swab32p(x) __arch__swab32(*(x))
77 #endif
78 #ifndef __arch__swab64p
79 # define __arch__swab64p(x) __arch__swab64(*(x))
80 #endif
81
82 #ifndef __arch__swab16s
83 # define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0)
84 #endif
85 #ifndef __arch__swab32s
86 # define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0)
87 #endif
88 #ifndef __arch__swab64s
89 # define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0)
90 #endif
91
92
93 /*
94 * Allow constant folding
95 */
96 # define __swab16(x) \
97 (__builtin_constant_p((__u16)(x)) ? \
98 ___swab16((x)) : \
99 __fswab16((x)))
100 # define __swab32(x) \
101 (__builtin_constant_p((__u32)(x)) ? \
102 ___swab32((x)) : \
103 __fswab32((x)))
104 # define __swab64(x) \
105 (__builtin_constant_p((__u64)(x)) ? \
106 ___swab64((x)) : \
107 __fswab64((x)))
108
109
110 static __inline__ __const__ __u16 __fswab16(__u16 x)
111 {
112 return (__extension__ __arch__swab16(x));
113 }
114 static __inline__ __u16 __swab16p(__u16 *x)
115 {
116 return (__extension__ __arch__swab16p(x));
117 }
118 static __inline__ void __swab16s(__u16 *addr)
119 {
120 (__extension__ ({__arch__swab16s(addr);}));
121 }
122
123 static __inline__ __const__ __u32 __fswab32(__u32 x)
124 {
125 return (__extension__ __arch__swab32(x));
126 }
127 static __inline__ __u32 __swab32p(__u32 *x)
128 {
129 return (__extension__ __arch__swab32p(x));
130 }
131 static __inline__ void __swab32s(__u32 *addr)
132 {
133 (__extension__ ({__arch__swab32s(addr);}));
134 }
135
136 static __inline__ __const__ __u64 __fswab64(__u64 x)
137 {
138 # ifdef __SWAB_64_THRU_32__
139 __u32 h = x >> 32;
140 __u32 l = x & ((1ULL<<32)-1);
141 return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));
142 # else
143 return (__extension__ __arch__swab64(x));
144 # endif
145 }
146 static __inline__ __u64 __swab64p(__u64 *x)
147 {
148 return (__extension__ __arch__swab64p(x));
149 }
150 static __inline__ void __swab64s(__u64 *addr)
151 {
152 (__extension__ ({__arch__swab64s(addr);}));
153 }
154
155 #endif /* SWAB_H */