aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eet
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/eet
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/eet')
-rw-r--r--libraries/eet/ABOUT-NLS0
-rw-r--r--libraries/eet/AUTHORS13
-rw-r--r--libraries/eet/COPYING25
-rw-r--r--libraries/eet/ChangeLog548
-rw-r--r--libraries/eet/INSTALL236
-rw-r--r--libraries/eet/Makefile.am101
-rw-r--r--libraries/eet/Makefile.in914
-rw-r--r--libraries/eet/NEWS28
-rw-r--r--libraries/eet/README69
-rw-r--r--libraries/eet/aclocal.m41185
-rwxr-xr-xlibraries/eet/autogen.sh38
-rwxr-xr-xlibraries/eet/compile143
-rwxr-xr-xlibraries/eet/config.guess1502
-rw-r--r--libraries/eet/config.h.in163
-rwxr-xr-xlibraries/eet/config.sub1714
-rwxr-xr-xlibraries/eet/configure16602
-rw-r--r--libraries/eet/configure.ac490
-rwxr-xr-xlibraries/eet/depcomp630
-rw-r--r--libraries/eet/doc/Doxyfile139
-rw-r--r--libraries/eet/doc/Doxyfile.in139
-rw-r--r--libraries/eet/doc/Makefile.am38
-rw-r--r--libraries/eet/doc/Makefile.in439
-rw-r--r--libraries/eet/doc/e.css436
-rw-r--r--libraries/eet/doc/eet.dox.in0
-rw-r--r--libraries/eet/doc/foot.html20
-rw-r--r--libraries/eet/doc/head.html65
-rwxr-xr-xlibraries/eet/doc/img/e.pngbin0 -> 3825 bytes
-rwxr-xr-xlibraries/eet/doc/img/e_big.pngbin0 -> 30052 bytes
-rwxr-xr-xlibraries/eet/doc/img/edoxy.css966
-rw-r--r--libraries/eet/doc/img/eet.pngbin0 -> 74944 bytes
-rwxr-xr-xlibraries/eet/doc/img/foot_bg.pngbin0 -> 173 bytes
-rwxr-xr-xlibraries/eet/doc/img/head_bg.pngbin0 -> 214 bytes
-rw-r--r--libraries/eet/doc/img/hilite.pngbin0 -> 6127 bytes
-rwxr-xr-xlibraries/eet/doc/img/menu_bg.pngbin0 -> 192 bytes
-rwxr-xr-xlibraries/eet/doc/img/menu_bg_current.pngbin0 -> 1200 bytes
-rwxr-xr-xlibraries/eet/doc/img/menu_bg_hover.pngbin0 -> 3278 bytes
-rwxr-xr-xlibraries/eet/doc/img/menu_bg_last.pngbin0 -> 637 bytes
-rwxr-xr-xlibraries/eet/doc/img/menu_bg_unsel.pngbin0 -> 1596 bytes
-rw-r--r--libraries/eet/eet.pc.in13
-rw-r--r--libraries/eet/eet.spec75
-rw-r--r--libraries/eet/eet.spec.in75
-rwxr-xr-xlibraries/eet/install-sh520
-rwxr-xr-xlibraries/eet/ltmain.sh8413
-rw-r--r--libraries/eet/m4/ac_attribute.m447
-rw-r--r--libraries/eet/m4/ac_path_generic.m4137
-rw-r--r--libraries/eet/m4/efl_binary.m479
-rw-r--r--libraries/eet/m4/efl_compiler_flag.m457
-rw-r--r--libraries/eet/m4/efl_coverage.m462
-rw-r--r--libraries/eet/m4/efl_doxygen.m494
-rw-r--r--libraries/eet/m4/efl_fnmatch.m431
-rw-r--r--libraries/eet/m4/efl_path_max.m436
-rw-r--r--libraries/eet/m4/efl_tests.m443
-rw-r--r--libraries/eet/m4/libtool.m47377
-rw-r--r--libraries/eet/m4/ltoptions.m4368
-rw-r--r--libraries/eet/m4/ltsugar.m4123
-rw-r--r--libraries/eet/m4/ltversion.m423
-rw-r--r--libraries/eet/m4/lt~obsolete.m492
-rwxr-xr-xlibraries/eet/missing376
-rw-r--r--libraries/eet/sha1-for-source.txt1
-rw-r--r--libraries/eet/src/Makefile.am3
-rw-r--r--libraries/eet/src/Makefile.in606
-rw-r--r--libraries/eet/src/bin/Makefile.am21
-rw-r--r--libraries/eet/src/bin/Makefile.in605
-rw-r--r--libraries/eet/src/bin/eet_main.c413
-rw-r--r--libraries/eet/src/examples/Makefile.am50
-rw-r--r--libraries/eet/src/examples/Makefile.in728
-rw-r--r--libraries/eet/src/examples/eet-basic.c40
-rw-r--r--libraries/eet/src/examples/eet-data-cipher_decipher.c119
-rw-r--r--libraries/eet/src/examples/eet-data-file_descriptor_01.c529
-rw-r--r--libraries/eet/src/examples/eet-data-file_descriptor_02.c944
-rw-r--r--libraries/eet/src/examples/eet-data-nested.c272
-rw-r--r--libraries/eet/src/examples/eet-data-simple.c224
-rw-r--r--libraries/eet/src/examples/eet-file.c127
-rw-r--r--libraries/eet/src/lib/Eet.h4156
-rw-r--r--libraries/eet/src/lib/Eet_private.h191
-rw-r--r--libraries/eet/src/lib/Makefile.am162
-rw-r--r--libraries/eet/src/lib/Makefile.in846
-rw-r--r--libraries/eet/src/lib/eet_cipher.c1342
-rw-r--r--libraries/eet/src/lib/eet_connection.c249
-rw-r--r--libraries/eet/src/lib/eet_data.c4999
-rw-r--r--libraries/eet/src/lib/eet_dictionary.c439
-rw-r--r--libraries/eet/src/lib/eet_image.c1820
-rw-r--r--libraries/eet/src/lib/eet_lib.c2648
-rw-r--r--libraries/eet/src/lib/eet_node.c797
-rw-r--r--libraries/eet/src/lib/eet_utils.c36
-rw-r--r--libraries/eet/src/tests/Makefile.am17
-rw-r--r--libraries/eet/src/tests/Makefile.in544
-rw-r--r--libraries/eet/src/tests/TODO3
-rw-r--r--libraries/eet/src/tests/cert.pem22
-rw-r--r--libraries/eet/src/tests/eet_data_suite.c73
-rw-r--r--libraries/eet/src/tests/eet_suite.c2777
-rw-r--r--libraries/eet/src/tests/eet_suite.h9
-rw-r--r--libraries/eet/src/tests/key.pem15
-rw-r--r--libraries/eet/src/tests/key_enc.pem17
-rw-r--r--libraries/eet/src/tests/key_enc_none.pem16
95 files changed, 70544 insertions, 0 deletions
diff --git a/libraries/eet/ABOUT-NLS b/libraries/eet/ABOUT-NLS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libraries/eet/ABOUT-NLS
diff --git a/libraries/eet/AUTHORS b/libraries/eet/AUTHORS
new file mode 100644
index 0000000..ebdd15f
--- /dev/null
+++ b/libraries/eet/AUTHORS
@@ -0,0 +1,13 @@
1The Rasterman (Carsten Haitzler) <raster@rasterman.com>
2David Goodlad <dgoodlad@gmail.com>
3Cedric Bail <cedric.bail@free.fr>
4Arnaud de Turckheim <quarium@gmail.com>
5Luis Felipe Strano Moraes <lfelipe@profusion.mobi>
6Chidambar Zinnoury <illogict@online.fr>
7Vincent Torri <vtorri@univ-evry.fr>
8Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
9Raphael Kubo da Costa <kubo@profusion.mobi>
10Mathieu Taillefumier <mathieu.taillefumier@free.fr>
11Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>
12Adam Simpkins <adam@adamsimpkins.net>
13Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
diff --git a/libraries/eet/COPYING b/libraries/eet/COPYING
new file mode 100644
index 0000000..296efe7
--- /dev/null
+++ b/libraries/eet/COPYING
@@ -0,0 +1,25 @@
1Copyright notice for Eet:
2
3Copyright (C) 2002-2011 Carsten Haitzler and various contributors (see AUTHORS)
4
5All rights reserved.
6
7Redistribution and use in source and binary forms, with or without
8modification, are permitted provided that the following conditions are met:
9
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
17INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
18FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/libraries/eet/ChangeLog b/libraries/eet/ChangeLog
new file mode 100644
index 0000000..0b3c5fb
--- /dev/null
+++ b/libraries/eet/ChangeLog
@@ -0,0 +1,548 @@
12008-04-20 Carsten Haitzler (The Rasterman)
2
3 1.0.0 release
4
52008-04-28 Carsten Haitzler (The Rasterman)
6
7 * Fixed allocation of a list (EET_G_LIST) of simple types
8 (IS_SIMPLE_TYPE) to alloc the correct amount (using the correct type
9 offset). Also fixed a hash (EET_G_HASH) of simple types too.
10
112008-05-14 Cedric BAIL
12
13 * Fix conversion from a text to a hash (EET_G_HASH).
14
15 * Fix inlined string (EET_T_INLINED_STRING) dump/undump by introducing
16 the new word for the parser 'inlined'.
17
182008-05-15 Cedric BAIL
19
20 * Fix a typo preventing the parsing of unsigned int (EET_T_UINT).
21
22 * Fix group of simple type by implicitly creating a structure with
23 the simple type in it.
24
25 * Remove dead code handling group of simple type and put assert
26 instead.
27
282008-05-16 Cedric BAIL
29
30 * Fix eet_data_descriptor3_new as it purpose was to introduce
31 str_direct_alloc/str_direct_free usage. Application should now receive
32 direct pointer to read only (mmaped) string.
33
34 * Fix EET_FILE_MODE_READ_WRITE when file doesn't exist.
35
36 * Fix some miss use of efn->offset.
37
38 * Introduce unit test in EFL. The current set provide an overall
39 coverage rate of 2111 of 2607 lines (81.0%) for eet. It helped
40 finding and fixing the bugs of the last three days.
41 The test suite is based on library check. At this time we need
42 cvs version, look at http://check.sourceforge.net/ to find it.
43 The covering is done by gcov
44 The html report is done by lcov version 1.6 or above.
45 You can found it at http://ltp.sourceforge.net/coverage/lcov.php.
46
472008-05-19 Cedric BAIL
48
49 * Old Eet file format is now marked as deprecated and accessing old
50 file will display a warning. You can already remove completely all
51 code related to it, but it's still enabled by default. We will later
52 disable it by default and at some point drop the support completely.
53
54 * Remove use of strcpy and sprintf definitively.
55
562008-06-02 Cedric BAIL
57
58 * Introduce tile support and the possibility to decompress eet
59 image inside an existing surface.
60
612008-06-26 Cedric BAIL
62
63 * Massiv code cleanup.
64 * Add EET_G_ARRAY and EET_G_VAR_ARRAY support.
65 * Plan for version 2.0 API break of eet_data_descriptor_element_add.
66
672008-07-17 Cedric BAIL
68
69 Implement various speed improvement :
70
71 * Use the precomputed hash value for Eet_Data_Chunk.
72 * Use a hash table instead of a list for pointer that need to be freed.
73 * Use directly the pointer from the dictionary to do a pointer
74 comparison instead of a strcmp.
75
762008-07-24 Cedric BAIL
77
78 * Fix wrongly stored image when compressed size is bigger than
79 uncompressed. Fix bug #523.
80
812008-07-24 Vincent Torri
82
83 * Add Visual Studio solution and vc projects to compile Eet
84 with Microsoft tools.
85
86 Written by Dmitriy Mazovka.
87
882008-08-20 Cedric BAIL
89
90 * Fix the dictionnary check during eet_open.
91
922008-08-22 Cedric BAIL
93
94 * Fix memory leaks in eet_data strings
95
962008-09-03 Cedric BAIL
97
98 * Fix inline-jpeg decode to use mem buf, not tmp-file on platforms that
99 don't support mem_open() etc.
100 * Add eet_memopen_read() to be able to open an eet file already
101 mapped in memory (eg compiled-in or mmaped some other way).
102
1032008-09-11 Cedric BAIL
104
105 * Improve hash generation speed for big files.
106 * Inline more functions explicitly for speed.
107
1082008-09-25 Carsten Haitzler (The Rasterman)
109
110 1.1.0 release
111
1122008-10-20 Cedric BAIL
113
114 * Make use of eina.
115
1162008-10-23 Cedric BAIL
117
118 * Fix string in list and hash.
119
1202008-10-24 Cedric BAIL
121
122 * Fix array in eet_data.
123
1242008-11-13 Cedric BAIL
125
126 * Add crypto support to eet with OpenSSL.
127
1282008-11-13 Arnaud de Turckheim
129
130 * Add GNUtls support to eet.
131
1322008-11-14 Cedric BAIL
133
134 * Make password callback work with GNUtls.
135
1362008-11-26 Cedric BAIL
137
138 * Add a function to retrieve raw signature.
139
1402009-01-30 Cedric BAIL
141
142 * Fix a corrupted pointer use in eet_cipher.c
143
1442009-02-09 Chidambar Zinnoury
145
146 * Add some missing __UNUSED__ flags.
147
1482009-02-26 Luis Felipe Strano Moraes
149
150 * Fix problem reported by llvm
151
1522009-03-09 Cedric BAIL
153
154 * Add sha1 retrieval for an Eet_File.
155
1562009-03-17 Gustavo Sverzut Barbieri
157
158 * Force fsync() after data is written to file, solve ext4 issues.
159
1602009-03-18 Carsten Haitzler (The Rasterman)
161
162 * Disable fsync. Edit the code if you need it.
163
1642009-03-19 Cedric BAIL
165
166 * Make eet_data thread safe.
167
1682009-03-25 Cedric BAIL
169
170 * Fix eet pkg-config dependencies.
171 * Fix double init of gcry.
172
1732009-04-22 Carsten Haitzler (The Rasterman)
174
175 * Release eet 1.2.0
176
1772009-05-18 Cedric BAIL
178
179 * Cleanup Eet_Data code.
180
1812009-06-02 Cedric BAIL
182
183 * Make eet_node API usable.
184
1852009-06-14 Carsten Haitzler (The Rasterman)
186
187 * Release eet 1.2.1
188
1892009-07-08 Cedric BAIL
190
191 * Reorder gcry init to be used during gnutls init.
192
1932009-07-11 Hanspeter Portner
194
195 * Improve docs/examples in Eet.h
196
1972009-07-23 Cedric BAIL
198
199 * Fix init on system without SECMEM.
200
2012009-07-29 Carsten Haitzler (The Rasterman)
202
203 * Release eet 1.2.2
204
2052009-08-13 Cedric BAIL
206
207 * Deprecating eet_data_descriptor*_new.
208 * Add eet_data_descriptor_stream_new and eet_data_descriptor_file_new.
209 * Add eina helper.
210 * Cleanup Eet_Data_Descriptor code.
211
2122009-08-16 Carsten Haitzler (The Rasterman)
213
214 * Fix eet data encode to encode empty structs etc. so save saves
215 something as opposed to nothing
216
2172009-08-16 Carsten Haitzler (The Rasterman)
218
219 * Fix documentation of eet_data_write() and eet_write() for return
220 value to return # of bytes written, not 1 or 0
221
2222009-08-16 Vincent Torri
223
224 * Fix build with suncc (missing alloca() declaration in eet_cipher.c)
225
2262009-09-15 Mathieu Taillefumier
227
228 * Use new Eina_Log infrastructure to report error.
229
2302009-09-15 Cedric BAIL
231
232 * Remove apparently useless eet_freeleak_* from eet_data.
233
2342009-09-29 Cedric BAIL
235
236 * Add Fixed Point support and make it possible to switch from float
237 and double to any fixed point variant supported by eina.
238
239 Note: File saved with fixed point could be read by older version of
240 eet library with EET_T_DOUBLE type.
241
2422009-10-01 Mathieu Taillefumier
243
244 * remove useless Eina_Log macros.
245
2462009-10-01 Vincent Torri
247
248 * Check the returned value of eet_init() in the binary.
249 * Use binary mode of fopen() in eet_main() for Windows compatibility.
250
2512009-10-09 Vincent Torri
252
253 * initialize eina first in eet_init().
254
2552009-11-02 Vincent Torri
256
257 * allow generation of one single file with all source code in it.
258 See configure help to enable it (--enable-amalgamation).
259
2602009-11-11 Vincent Torri
261
262 * Add check on libgcrypt library in configure. Needed when GNUtls
263 support is enabled.
264
2652009-12-02 Carsten Haitzler (The Rasterman)
266
267 * Release eet 1.2.3
268
2692009-12-03 Cedric BAIL
270
271 * Make all operation on Eet_File thread safe.
272
2732009-12-07 Cedric BAIL
274
275 * Fix error when retrieving a different float type than the stored one.
276 * Reduce conversion with a little memory overhead.
277
2782009-12-07 Vincent Torri
279
280 * Include winsock2.h in eet_image.c for htonl definition on Windows.
281 * Fix Visual Studio project files
282
2832009-12-11 Cedric BAIL
284
285 * Make eet_data_descriptor_free safe to call on NULL pointer.
286
2872009-12-21 Cedric BAIL
288
289 * More work on eet_node dump code.
290
2912009-12-28 Cedric BAIL
292
293 * Add fully functionnal eet_node dump code.
294
2952009-12-29 Cedric BAIL
296
297 * Don't mess up when memory realloc failed during data descriptor creation.
298
2992010-01-04 Carsten Haitzler (The Rasterman)
300
301 * Fix another thread deadlock in mutex handling even in a single-threaded app.
302
3032010-01-12 Cedric BAIL
304
305 * Rewrite Eet_Data. Now you can do list/hash/array of strings and all
306 the test suite is passing.
307 * Add eet_data_node_decode_cipher and eet_data_node_read_cipher.
308
3092010-01-15 Cedric BAIL
310
311 * Fix amalgamation.
312
3132010-01-16 Vincent Torri
314
315 * eet_cipher.c: Fix arithmetic pointer on void *
316
3172010-01-17 Cedric BAIL
318
319 * Add a mempool for Eet_Node.
320
3212010-01-21 Cedric BAIL
322
323 * Add experimental API to walk Eet_Node tree.
324
3252010-01-22 Cedric BAIL
326
327 * Add VAR_ARRAY tests.
328
3292010-01-27 Cedric BAIL
330
331 * Improve security by zeroying cipher material as soon as possible.
332
3332010-01-27 Cedric BAIL
334
335 * Improve security by zeroying cipher material as soon as possible.
336
3372010-03-01 Albin Tonnerre
338
339 * Fix override of global symbols.
340
3412010-03-15 Adam Simpkins / Cedric BAIL
342
343 * Fix clearcache race condition.
344
3452010-04-02 Cedric BAIL
346
347 * Fix eet_data_node_read_cipher return type.
348 * Add Eet_Connection.
349
3502010-04-07 Cedric BAIL
351
352 * Improve eet_eina_file_data_descriptor_class_set by using
353 eina_hash_direct_add to avoid duplication hash key string.
354
3552010-04-08 Cedric BAIL
356
357 * Fix file corruption reported by Tiago Falcao <tiago@profusion.mobi>
358
3592010-04-09 Cedric BAIL
360
361 * Add eet_sync.
362 * Only delete the file at the last possible time.
363 * Reduce open file descriptor.
364
3652010-04-16 Cedric BAIL
366
367 * Handle fixed point in data stream.
368
3692010-04-21 Cedric BAIL
370
371 * Add EET_G_UNION and EET_G_VARIANT.
372
3732010-05-29 Carsten Haitzler (The Rasterman)
374
375 * Add EET_VERSION_MAJOR, EET_VERSION_MINOR.
376 * Add Eet_Version, eet_version.
377 * Make configure.ac use m4 defines for version
378 * Support SVN revision in version check
379
3802010-06-07 Carsten Haitzler (The Rasterman)
381
382 * Release eet 1.3.0
383
3842010-06-27 Carsten Haitzler (The Rasterman)
385
386 * Release eet 1.3.2
387
3882010-06-29 Vincent Torri
389
390 * On Windows 64, long is of size 32 bits and not 64 bits. Also
391 LONG_BIT is not defined on Windows.
392
3932010-06-29 Cedric BAIL
394
395 * Add eet_alias support.
396 * Fix possible dead lock in eet_write_cipher.
397
3982010-07-08 Carsten Haitzler (The Rasterman)
399
400 * Moved Eet.h into $includedir/eet-MAJOR_VERSION/
401
4022010-07-15 Vincent Torri
403
404 * Add native Windows thread support instead of using pthread
405 (less overhead). On other OS, pthread is still used by default.
406 Pass --enable-win32-threads to activate thread support on
407 Windows.
408
4092010-07-20 Cedric BAIL
410
411 * Improve file change detection in eet_open by checking size also.
412
4132010-08-02 Cedric BAIL
414
415 * Fix bug in eet_connection code when running on 32bits machine.
416
4172010-08-06 Cedric BAIL
418
419 * Add EET_DATA_DESCRIPTOR_ADD_HASH_STRING.
420
4212010-08-06 Cedric BAIL
422
423 * Break eet_eina_* function helper to provide a clean API/ABI to
424 prevent futur break. This should prevent the ABI break that was
425 introduced with release 1.3.0.
426
427 * Add a specific allocator for array. This should fix wrong allocation
428 case discovered with recent edje file format change.
429
4302010-08-23 Carsten Haitzler (The Rasterman)
431
432 * Fix some cppcheck complaints - all of them bogus though.
433 Nothing actually fixed.
434
4352010-08-27 Cedric BAIL
436
437 * Prevent the build of eet data structure that doesn't match what
438 the application is expecting.
439
4402010-09-02 Cedric BAIL
441
442 * Fix bug of ever growing dictionnary and improve strcmp comparison.
443
4442010-11-12 Cedric BAIL
445
446 * Don't try to read broken file when open in READ_WRITE mode.
447
4482010-11-14 Cedric BAIL
449
450 * Fix bug with cypher and compression used together.
451
4522010-11-21 Carsten Haitzler (The Rasterman)
453
454 * Fix another bug related to cipher and compression (leak and
455 bad free)
456
4572010-11-25 Cedric BAIL
458
459 * Add EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY_STRING.
460
4612010-11-26 Cedric BAIL
462
463 * Reduce memory used by Eet dictionary.
464
4652010-11-29 Cedric BAIL
466
467 * Improve speed of Eet_String users. It does impact all string
468 encoding/decoding, but even faster for stringshare encoding.
469
470 * Improve speed when decoding mostly array with eet_data_read.
471
4722010-12-03 Cedric BAIL
473
474 * Improve portability.
475
4762010-12-07 Carsten Haitzler (The Rasterman)
477
478 * Move raw function pointer defs to typedefs in public API for
479 readability improvements.
480
4812011-01-29 Carsten Haitzler (The Rasterman)
482
483 * 1.4.0 release
484
4852011-01-29 Vincent Torri
486
487 * Use eina_stringshare_add() instead of strdup() on mmaped file names
488 on Windows. This fix eet shut down on Windows.
489
4902011-02-14 Cedric BAIL
491
492 * Improve Eet_Data to make decoding of EET_G_UNION and EET_G_*ARRAY
493 faster and less memory heavy.
494
4952011-05-14 Cedric BAIL
496
497 * Use Eina_Lock.
498 * Sync GNUTLS initialisation with Eina.
499
5002011-05-17 Cedric BAIL
501
502 * Use Eina_File.
503 * Fix test forgetting to initialize eet.
504
5052011-05-23 Vincent Torri
506
507 * Fix compilation with libjpeg 8 on Windows.
508
5092011-06-10 Cedric BAIL
510
511 * Add EET_DATA_DESCRIPTOR_ADD_LIST_STRING helper to define List of char *.
512
5132011-07-04 Mike Blumenkrantz
514
515 * Add functions to manipulate nodes:
516 eet_node_children_get, eet_node_next_get, eet_node_parent_get,
517 eet_node_type_get, eet_node_value_get, eet_node_name_get
518 * Fix segmentation faults in several eet_node functions
519
5202011-07-16 Vincent Torri
521
522 * On Windows, open() in text mode followed by fdopen() in
523 binary mode does not create a stream in binary mode.
524 So add O_BINARY to open().
525
5262011-07-29 Mike Blumenkrantz
527
528 * Add eet_alias_get to return the destination name of an alias
529
5302011-09-15 Cedric Bail
531
532 * Add eet_data_xattr_cipher_get and eet_data_xattr_cipher_set.
533
5342011-10-04 Carsten Haitzler (The Rasterman)
535
536 * Fix issue where an empty eet file (no keys) is not openable
537 for read/write anymore. Allow it.
538
5392011-10-28 David Seikel (onefang)
540
541 * Added a new macro for adding arrays of basic types.
542 EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY
543
5442011-11-16 Carsten Haitzler (The Rasterman)
545
546 * JPEG encode and decode in eet now uses ISLOW (not IFAST) due to
547 noticable quality losses in the chase for speed. It will use
548 IFAST for quality less than 60 when encoding
diff --git a/libraries/eet/INSTALL b/libraries/eet/INSTALL
new file mode 100644
index 0000000..23e5f25
--- /dev/null
+++ b/libraries/eet/INSTALL
@@ -0,0 +1,236 @@
1Installation Instructions
2*************************
3
4Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
5Software Foundation, Inc.
6
7This file is free documentation; the Free Software Foundation gives
8unlimited permission to copy, distribute and modify it.
9
10Basic Installation
11==================
12
13These are generic installation instructions.
14
15 The `configure' shell script attempts to guess correct values for
16various system-dependent variables used during compilation. It uses
17those values to create a `Makefile' in each directory of the package.
18It may also create one or more `.h' files containing system-dependent
19definitions. Finally, it creates a shell script `config.status' that
20you can run in the future to recreate the current configuration, and a
21file `config.log' containing compiler output (useful mainly for
22debugging `configure').
23
24 It can also use an optional file (typically called `config.cache'
25and enabled with `--cache-file=config.cache' or simply `-C') that saves
26the results of its tests to speed up reconfiguring. (Caching is
27disabled by default to prevent problems with accidental use of stale
28cache files.)
29
30 If you need to do unusual things to compile the package, please try
31to figure out how `configure' could check whether to do them, and mail
32diffs or instructions to the address given in the `README' so they can
33be considered for the next release. If you are using the cache, and at
34some point `config.cache' contains results you don't want to keep, you
35may remove or edit it.
36
37 The file `configure.ac' (or `configure.in') is used to create
38`configure' by a program called `autoconf'. You only need
39`configure.ac' if you want to change it or regenerate `configure' using
40a newer version of `autoconf'.
41
42The simplest way to compile this package is:
43
44 1. `cd' to the directory containing the package's source code and type
45 `./configure' to configure the package for your system. If you're
46 using `csh' on an old version of System V, you might need to type
47 `sh ./configure' instead to prevent `csh' from trying to execute
48 `configure' itself.
49
50 Running `configure' takes awhile. While running, it prints some
51 messages telling which features it is checking for.
52
53 2. Type `make' to compile the package.
54
55 3. Optionally, type `make check' to run any self-tests that come with
56 the package.
57
58 4. Type `make install' to install the programs and any data files and
59 documentation.
60
61 5. You can remove the program binaries and object files from the
62 source code directory by typing `make clean'. To also remove the
63 files that `configure' created (so you can compile the package for
64 a different kind of computer), type `make distclean'. There is
65 also a `make maintainer-clean' target, but that is intended mainly
66 for the package's developers. If you use it, you may have to get
67 all sorts of other programs in order to regenerate files that came
68 with the distribution.
69
70Compilers and Options
71=====================
72
73Some systems require unusual options for compilation or linking that the
74`configure' script does not know about. Run `./configure --help' for
75details on some of the pertinent environment variables.
76
77 You can give `configure' initial values for configuration parameters
78by setting variables in the command line or in the environment. Here
79is an example:
80
81 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
82
83 *Note Defining Variables::, for more details.
84
85Compiling For Multiple Architectures
86====================================
87
88You can compile the package for more than one kind of computer at the
89same time, by placing the object files for each architecture in their
90own directory. To do this, you must use a version of `make' that
91supports the `VPATH' variable, such as GNU `make'. `cd' to the
92directory where you want the object files and executables to go and run
93the `configure' script. `configure' automatically checks for the
94source code in the directory that `configure' is in and in `..'.
95
96 If you have to use a `make' that does not support the `VPATH'
97variable, you have to compile the package for one architecture at a
98time in the source code directory. After you have installed the
99package for one architecture, use `make distclean' before reconfiguring
100for another architecture.
101
102Installation Names
103==================
104
105By default, `make install' installs the package's commands under
106`/usr/local/bin', include files under `/usr/local/include', etc. You
107can specify an installation prefix other than `/usr/local' by giving
108`configure' the option `--prefix=PREFIX'.
109
110 You can specify separate installation prefixes for
111architecture-specific files and architecture-independent files. If you
112pass the option `--exec-prefix=PREFIX' to `configure', the package uses
113PREFIX as the prefix for installing programs and libraries.
114Documentation and other data files still use the regular prefix.
115
116 In addition, if you use an unusual directory layout you can give
117options like `--bindir=DIR' to specify different values for particular
118kinds of files. Run `configure --help' for a list of the directories
119you can set and what kinds of files go in them.
120
121 If the package supports it, you can cause programs to be installed
122with an extra prefix or suffix on their names by giving `configure' the
123option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
124
125Optional Features
126=================
127
128Some packages pay attention to `--enable-FEATURE' options to
129`configure', where FEATURE indicates an optional part of the package.
130They may also pay attention to `--with-PACKAGE' options, where PACKAGE
131is something like `gnu-as' or `x' (for the X Window System). The
132`README' should mention any `--enable-' and `--with-' options that the
133package recognizes.
134
135 For packages that use the X Window System, `configure' can usually
136find the X include and library files automatically, but if it doesn't,
137you can use the `configure' options `--x-includes=DIR' and
138`--x-libraries=DIR' to specify their locations.
139
140Specifying the System Type
141==========================
142
143There may be some features `configure' cannot figure out automatically,
144but needs to determine by the type of machine the package will run on.
145Usually, assuming the package is built to be run on the _same_
146architectures, `configure' can figure that out, but if it prints a
147message saying it cannot guess the machine type, give it the
148`--build=TYPE' option. TYPE can either be a short name for the system
149type, such as `sun4', or a canonical name which has the form:
150
151 CPU-COMPANY-SYSTEM
152
153where SYSTEM can have one of these forms:
154
155 OS KERNEL-OS
156
157 See the file `config.sub' for the possible values of each field. If
158`config.sub' isn't included in this package, then this package doesn't
159need to know the machine type.
160
161 If you are _building_ compiler tools for cross-compiling, you should
162use the option `--target=TYPE' to select the type of system they will
163produce code for.
164
165 If you want to _use_ a cross compiler, that generates code for a
166platform different from the build platform, you should specify the
167"host" platform (i.e., that on which the generated programs will
168eventually be run) with `--host=TYPE'.
169
170Sharing Defaults
171================
172
173If you want to set default values for `configure' scripts to share, you
174can create a site shell script called `config.site' that gives default
175values for variables like `CC', `cache_file', and `prefix'.
176`configure' looks for `PREFIX/share/config.site' if it exists, then
177`PREFIX/etc/config.site' if it exists. Or, you can set the
178`CONFIG_SITE' environment variable to the location of the site script.
179A warning: not all `configure' scripts look for a site script.
180
181Defining Variables
182==================
183
184Variables not defined in a site shell script can be set in the
185environment passed to `configure'. However, some packages may run
186configure again during the build, and the customized values of these
187variables may be lost. In order to avoid this problem, you should set
188them in the `configure' command line, using `VAR=value'. For example:
189
190 ./configure CC=/usr/local2/bin/gcc
191
192causes the specified `gcc' to be used as the C compiler (unless it is
193overridden in the site shell script). Here is a another example:
194
195 /bin/bash ./configure CONFIG_SHELL=/bin/bash
196
197Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
198configuration-related scripts to be executed by `/bin/bash'.
199
200`configure' Invocation
201======================
202
203`configure' recognizes the following options to control how it operates.
204
205`--help'
206`-h'
207 Print a summary of the options to `configure', and exit.
208
209`--version'
210`-V'
211 Print the version of Autoconf used to generate the `configure'
212 script, and exit.
213
214`--cache-file=FILE'
215 Enable the cache: use and save the results of the tests in FILE,
216 traditionally `config.cache'. FILE defaults to `/dev/null' to
217 disable caching.
218
219`--config-cache'
220`-C'
221 Alias for `--cache-file=config.cache'.
222
223`--quiet'
224`--silent'
225`-q'
226 Do not print messages saying which checks are being made. To
227 suppress all normal output, redirect it to `/dev/null' (any error
228 messages will still be shown).
229
230`--srcdir=DIR'
231 Look for the package's source code in directory DIR. Usually
232 `configure' can determine that directory automatically.
233
234`configure' also accepts some other, not widely useful, options. Run
235`configure --help' for more details.
236
diff --git a/libraries/eet/Makefile.am b/libraries/eet/Makefile.am
new file mode 100644
index 0000000..bc6e99a
--- /dev/null
+++ b/libraries/eet/Makefile.am
@@ -0,0 +1,101 @@
1ACLOCAL_AMFLAGS = -I m4
2
3SUBDIRS = src doc
4
5MAINTAINERCLEANFILES = \
6Makefile.in \
7aclocal.m4 \
8compile \
9config.guess \
10config.h.in \
11config.h.in~ \
12config.sub \
13configure \
14depcomp \
15install-sh \
16ltmain.sh \
17missing \
18$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
19$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
20$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \
21m4/libtool.m4 \
22m4/lt~obsolete.m4 \
23m4/ltoptions.m4 \
24m4/ltsugar.m4 \
25m4/ltversion.m4
26
27EXTRA_DIST = \
28AUTHORS \
29COPYING \
30autogen.sh \
31eet.pc.in \
32eet.spec.in \
33eet.spec \
34m4/ac_attribute.m4 \
35m4/ac_path_generic.m4 \
36m4/efl_binary.m4 \
37m4/efl_coverage.m4 \
38m4/efl_doxygen.m4 \
39m4/efl_fnmatch.m4 \
40m4/efl_tests.m4 \
41m4/efl_path_max.m4
42
43pkgconfigdir = $(libdir)/pkgconfig
44pkgconfig_DATA = eet.pc
45
46.PHONY: doc coverage
47
48# Documentation
49
50doc:
51 @echo "entering doc/"
52 make -C doc doc
53
54# Unit tests
55
56if EFL_ENABLE_TESTS
57
58check-local:
59 @./src/tests/eet_suite
60
61else
62
63check-local:
64 @echo "reconfigure with --enable-tests"
65
66endif
67
68# Coverage report
69
70if EFL_ENABLE_COVERAGE
71lcov-reset:
72 @rm -rf coverage
73 @find . -name "*.gcda" -exec rm {} \;
74 @lcov --directory . --zerocounters
75
76lcov-report:
77 @mkdir coverage
78 @lcov --compat-libtool --directory . --capture --output-file coverage/coverage.info
79 @lcov -l coverage/coverage.info |grep "\\.h" |cut -d " " -f 2 > coverage/remove
80 @lcov -r coverage/coverage.info `cat coverage/remove` > coverage/coverage.cleaned.info
81 @rm coverage/remove
82 @mv coverage/coverage.cleaned.info coverage/coverage.info
83 @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
84
85coverage:
86 @make lcov-reset
87 @make check
88 @make lcov-report
89
90clean-local:
91 @rm -rf coverage
92else
93lcov-reset:
94 @echo "reconfigure with --enable-coverage"
95
96lcov-report:
97 @echo "reconfigure with --enable-coverage"
98
99coverage:
100 @echo "reconfigure with --enable-tests --enable-coverage"
101endif
diff --git a/libraries/eet/Makefile.in b/libraries/eet/Makefile.in
new file mode 100644
index 0000000..4daff0f
--- /dev/null
+++ b/libraries/eet/Makefile.in
@@ -0,0 +1,914 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = .
38DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
39 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
40 $(srcdir)/eet.pc.in $(srcdir)/eet.spec.in \
41 $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
42 INSTALL NEWS compile config.guess config.sub depcomp \
43 install-sh ltmain.sh missing
44ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
45am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
46 $(top_srcdir)/m4/ac_path_generic.m4 \
47 $(top_srcdir)/m4/efl_binary.m4 \
48 $(top_srcdir)/m4/efl_compiler_flag.m4 \
49 $(top_srcdir)/m4/efl_coverage.m4 \
50 $(top_srcdir)/m4/efl_doxygen.m4 \
51 $(top_srcdir)/m4/efl_fnmatch.m4 \
52 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
53 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
54 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
55 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
56am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
57 $(ACLOCAL_M4)
58am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
59 configure.lineno config.status.lineno
60mkinstalldirs = $(install_sh) -d
61CONFIG_HEADER = config.h
62CONFIG_CLEAN_FILES = eet.pc eet.spec
63CONFIG_CLEAN_VPATH_FILES =
64AM_V_GEN = $(am__v_GEN_$(V))
65am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
66am__v_GEN_0 = @echo " GEN " $@;
67AM_V_at = $(am__v_at_$(V))
68am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
69am__v_at_0 = @
70SOURCES =
71DIST_SOURCES =
72RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
73 html-recursive info-recursive install-data-recursive \
74 install-dvi-recursive install-exec-recursive \
75 install-html-recursive install-info-recursive \
76 install-pdf-recursive install-ps-recursive install-recursive \
77 installcheck-recursive installdirs-recursive pdf-recursive \
78 ps-recursive uninstall-recursive
79am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
80am__vpath_adj = case $$p in \
81 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
82 *) f=$$p;; \
83 esac;
84am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
85am__install_max = 40
86am__nobase_strip_setup = \
87 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
88am__nobase_strip = \
89 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
90am__nobase_list = $(am__nobase_strip_setup); \
91 for p in $$list; do echo "$$p $$p"; done | \
92 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
93 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
94 if (++n[$$2] == $(am__install_max)) \
95 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
96 END { for (dir in files) print dir, files[dir] }'
97am__base_list = \
98 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
99 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
100am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
101DATA = $(pkgconfig_DATA)
102RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
103 distclean-recursive maintainer-clean-recursive
104AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
105 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
106 distdir dist dist-all distcheck
107ETAGS = etags
108CTAGS = ctags
109DIST_SUBDIRS = $(SUBDIRS)
110DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
111distdir = $(PACKAGE)-$(VERSION)
112top_distdir = $(distdir)
113am__remove_distdir = \
114 { test ! -d "$(distdir)" \
115 || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
116 && rm -fr "$(distdir)"; }; }
117am__relativize = \
118 dir0=`pwd`; \
119 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
120 sed_rest='s,^[^/]*/*,,'; \
121 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
122 sed_butlast='s,/*[^/]*$$,,'; \
123 while test -n "$$dir1"; do \
124 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
125 if test "$$first" != "."; then \
126 if test "$$first" = ".."; then \
127 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
128 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
129 else \
130 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
131 if test "$$first2" = "$$first"; then \
132 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
133 else \
134 dir2="../$$dir2"; \
135 fi; \
136 dir0="$$dir0"/"$$first"; \
137 fi; \
138 fi; \
139 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
140 done; \
141 reldir="$$dir2"
142DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
143GZIP_ENV = --best
144distuninstallcheck_listfiles = find . -type f -print
145distcleancheck_listfiles = find . -type f -print
146ACLOCAL = @ACLOCAL@
147ALLOCA = @ALLOCA@
148AMTAR = @AMTAR@
149AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
150AR = @AR@
151AS = @AS@
152AUTOCONF = @AUTOCONF@
153AUTOHEADER = @AUTOHEADER@
154AUTOMAKE = @AUTOMAKE@
155AWK = @AWK@
156CC = @CC@
157CCDEPMODE = @CCDEPMODE@
158CFLAGS = @CFLAGS@
159CHECK_CFLAGS = @CHECK_CFLAGS@
160CHECK_LIBS = @CHECK_LIBS@
161CPP = @CPP@
162CPPFLAGS = @CPPFLAGS@
163CYGPATH_W = @CYGPATH_W@
164DEBUG_CFLAGS = @DEBUG_CFLAGS@
165DEFS = @DEFS@
166DEPDIR = @DEPDIR@
167DLLTOOL = @DLLTOOL@
168DSYMUTIL = @DSYMUTIL@
169DUMPBIN = @DUMPBIN@
170ECHO_C = @ECHO_C@
171ECHO_N = @ECHO_N@
172ECHO_T = @ECHO_T@
173EET_CFLAGS = @EET_CFLAGS@
174EET_CPPFLAGS = @EET_CPPFLAGS@
175EET_LIBS = @EET_LIBS@
176EET_PRG = @EET_PRG@
177EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
178EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
179EFL_EET_BUILD = @EFL_EET_BUILD@
180EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
181EGREP = @EGREP@
182EINA_CFLAGS = @EINA_CFLAGS@
183EINA_LIBS = @EINA_LIBS@
184EVIL_CFLAGS = @EVIL_CFLAGS@
185EVIL_LIBS = @EVIL_LIBS@
186EXEEXT = @EXEEXT@
187FGREP = @FGREP@
188GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
189GNUTLS_LIBS = @GNUTLS_LIBS@
190GREP = @GREP@
191INSTALL = @INSTALL@
192INSTALL_DATA = @INSTALL_DATA@
193INSTALL_PROGRAM = @INSTALL_PROGRAM@
194INSTALL_SCRIPT = @INSTALL_SCRIPT@
195INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
196LD = @LD@
197LDFLAGS = @LDFLAGS@
198LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
199LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
200LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
201LIBOBJS = @LIBOBJS@
202LIBS = @LIBS@
203LIBTOOL = @LIBTOOL@
204LIPO = @LIPO@
205LN_S = @LN_S@
206LTLIBOBJS = @LTLIBOBJS@
207MAKEINFO = @MAKEINFO@
208MKDIR_P = @MKDIR_P@
209NM = @NM@
210NMEDIT = @NMEDIT@
211OBJDUMP = @OBJDUMP@
212OBJEXT = @OBJEXT@
213OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
214OPENSSL_LIBS = @OPENSSL_LIBS@
215OTOOL = @OTOOL@
216OTOOL64 = @OTOOL64@
217PACKAGE = @PACKAGE@
218PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
219PACKAGE_NAME = @PACKAGE_NAME@
220PACKAGE_STRING = @PACKAGE_STRING@
221PACKAGE_TARNAME = @PACKAGE_TARNAME@
222PACKAGE_URL = @PACKAGE_URL@
223PACKAGE_VERSION = @PACKAGE_VERSION@
224PATH_SEPARATOR = @PATH_SEPARATOR@
225PKG_CONFIG = @PKG_CONFIG@
226PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
227PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
228RANLIB = @RANLIB@
229SED = @SED@
230SET_MAKE = @SET_MAKE@
231SHELL = @SHELL@
232STRIP = @STRIP@
233VERSION = @VERSION@
234VMAJ = @VMAJ@
235abs_builddir = @abs_builddir@
236abs_srcdir = @abs_srcdir@
237abs_top_builddir = @abs_top_builddir@
238abs_top_srcdir = @abs_top_srcdir@
239ac_ct_CC = @ac_ct_CC@
240ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
241am__include = @am__include@
242am__leading_dot = @am__leading_dot@
243am__quote = @am__quote@
244am__tar = @am__tar@
245am__untar = @am__untar@
246bindir = @bindir@
247build = @build@
248build_alias = @build_alias@
249build_cpu = @build_cpu@
250build_os = @build_os@
251build_vendor = @build_vendor@
252builddir = @builddir@
253datadir = @datadir@
254datarootdir = @datarootdir@
255docdir = @docdir@
256dvidir = @dvidir@
257efl_doxygen = @efl_doxygen@
258efl_have_doxygen = @efl_have_doxygen@
259exec_prefix = @exec_prefix@
260have_lcov = @have_lcov@
261host = @host@
262host_alias = @host_alias@
263host_cpu = @host_cpu@
264host_os = @host_os@
265host_vendor = @host_vendor@
266htmldir = @htmldir@
267includedir = @includedir@
268infodir = @infodir@
269install_sh = @install_sh@
270libdir = @libdir@
271libexecdir = @libexecdir@
272localedir = @localedir@
273localstatedir = @localstatedir@
274lt_ECHO = @lt_ECHO@
275lt_enable_auto_import = @lt_enable_auto_import@
276mandir = @mandir@
277mkdir_p = @mkdir_p@
278oldincludedir = @oldincludedir@
279pdfdir = @pdfdir@
280pkgconfig_requires_private = @pkgconfig_requires_private@
281prefix = @prefix@
282program_transform_name = @program_transform_name@
283psdir = @psdir@
284release_info = @release_info@
285requirement_eet = @requirement_eet@
286sbindir = @sbindir@
287sharedstatedir = @sharedstatedir@
288srcdir = @srcdir@
289sysconfdir = @sysconfdir@
290target_alias = @target_alias@
291top_build_prefix = @top_build_prefix@
292top_builddir = @top_builddir@
293top_srcdir = @top_srcdir@
294version_info = @version_info@
295ACLOCAL_AMFLAGS = -I m4
296SUBDIRS = src doc
297MAINTAINERCLEANFILES = \
298Makefile.in \
299aclocal.m4 \
300compile \
301config.guess \
302config.h.in \
303config.h.in~ \
304config.sub \
305configure \
306depcomp \
307install-sh \
308ltmain.sh \
309missing \
310$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
311$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
312$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \
313m4/libtool.m4 \
314m4/lt~obsolete.m4 \
315m4/ltoptions.m4 \
316m4/ltsugar.m4 \
317m4/ltversion.m4
318
319EXTRA_DIST = \
320AUTHORS \
321COPYING \
322autogen.sh \
323eet.pc.in \
324eet.spec.in \
325eet.spec \
326m4/ac_attribute.m4 \
327m4/ac_path_generic.m4 \
328m4/efl_binary.m4 \
329m4/efl_coverage.m4 \
330m4/efl_doxygen.m4 \
331m4/efl_fnmatch.m4 \
332m4/efl_tests.m4 \
333m4/efl_path_max.m4
334
335pkgconfigdir = $(libdir)/pkgconfig
336pkgconfig_DATA = eet.pc
337all: config.h
338 $(MAKE) $(AM_MAKEFLAGS) all-recursive
339
340.SUFFIXES:
341am--refresh:
342 @:
343$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
344 @for dep in $?; do \
345 case '$(am__configure_deps)' in \
346 *$$dep*) \
347 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
348 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
349 && exit 0; \
350 exit 1;; \
351 esac; \
352 done; \
353 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
354 $(am__cd) $(top_srcdir) && \
355 $(AUTOMAKE) --gnu Makefile
356.PRECIOUS: Makefile
357Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
358 @case '$?' in \
359 *config.status*) \
360 echo ' $(SHELL) ./config.status'; \
361 $(SHELL) ./config.status;; \
362 *) \
363 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
364 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
365 esac;
366
367$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
368 $(SHELL) ./config.status --recheck
369
370$(top_srcdir)/configure: $(am__configure_deps)
371 $(am__cd) $(srcdir) && $(AUTOCONF)
372$(ACLOCAL_M4): $(am__aclocal_m4_deps)
373 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
374$(am__aclocal_m4_deps):
375
376config.h: stamp-h1
377 @if test ! -f $@; then \
378 rm -f stamp-h1; \
379 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
380 else :; fi
381
382stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
383 @rm -f stamp-h1
384 cd $(top_builddir) && $(SHELL) ./config.status config.h
385$(srcdir)/config.h.in: $(am__configure_deps)
386 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
387 rm -f stamp-h1
388 touch $@
389
390distclean-hdr:
391 -rm -f config.h stamp-h1
392eet.pc: $(top_builddir)/config.status $(srcdir)/eet.pc.in
393 cd $(top_builddir) && $(SHELL) ./config.status $@
394eet.spec: $(top_builddir)/config.status $(srcdir)/eet.spec.in
395 cd $(top_builddir) && $(SHELL) ./config.status $@
396
397mostlyclean-libtool:
398 -rm -f *.lo
399
400clean-libtool:
401 -rm -rf .libs _libs
402
403distclean-libtool:
404 -rm -f libtool config.lt
405install-pkgconfigDATA: $(pkgconfig_DATA)
406 @$(NORMAL_INSTALL)
407 test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
408 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
409 for p in $$list; do \
410 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
411 echo "$$d$$p"; \
412 done | $(am__base_list) | \
413 while read files; do \
414 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
415 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
416 done
417
418uninstall-pkgconfigDATA:
419 @$(NORMAL_UNINSTALL)
420 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
421 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
422 test -n "$$files" || exit 0; \
423 echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
424 cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
425
426# This directory's subdirectories are mostly independent; you can cd
427# into them and run `make' without going through this Makefile.
428# To change the values of `make' variables: instead of editing Makefiles,
429# (1) if the variable is set in `config.status', edit `config.status'
430# (which will cause the Makefiles to be regenerated when you run `make');
431# (2) otherwise, pass the desired values on the `make' command line.
432$(RECURSIVE_TARGETS):
433 @fail= failcom='exit 1'; \
434 for f in x $$MAKEFLAGS; do \
435 case $$f in \
436 *=* | --[!k]*);; \
437 *k*) failcom='fail=yes';; \
438 esac; \
439 done; \
440 dot_seen=no; \
441 target=`echo $@ | sed s/-recursive//`; \
442 list='$(SUBDIRS)'; for subdir in $$list; do \
443 echo "Making $$target in $$subdir"; \
444 if test "$$subdir" = "."; then \
445 dot_seen=yes; \
446 local_target="$$target-am"; \
447 else \
448 local_target="$$target"; \
449 fi; \
450 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
451 || eval $$failcom; \
452 done; \
453 if test "$$dot_seen" = "no"; then \
454 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
455 fi; test -z "$$fail"
456
457$(RECURSIVE_CLEAN_TARGETS):
458 @fail= failcom='exit 1'; \
459 for f in x $$MAKEFLAGS; do \
460 case $$f in \
461 *=* | --[!k]*);; \
462 *k*) failcom='fail=yes';; \
463 esac; \
464 done; \
465 dot_seen=no; \
466 case "$@" in \
467 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
468 *) list='$(SUBDIRS)' ;; \
469 esac; \
470 rev=''; for subdir in $$list; do \
471 if test "$$subdir" = "."; then :; else \
472 rev="$$subdir $$rev"; \
473 fi; \
474 done; \
475 rev="$$rev ."; \
476 target=`echo $@ | sed s/-recursive//`; \
477 for subdir in $$rev; do \
478 echo "Making $$target in $$subdir"; \
479 if test "$$subdir" = "."; then \
480 local_target="$$target-am"; \
481 else \
482 local_target="$$target"; \
483 fi; \
484 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
485 || eval $$failcom; \
486 done && test -z "$$fail"
487tags-recursive:
488 list='$(SUBDIRS)'; for subdir in $$list; do \
489 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
490 done
491ctags-recursive:
492 list='$(SUBDIRS)'; for subdir in $$list; do \
493 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
494 done
495
496ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
497 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
498 unique=`for i in $$list; do \
499 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
500 done | \
501 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
502 END { if (nonempty) { for (i in files) print i; }; }'`; \
503 mkid -fID $$unique
504tags: TAGS
505
506TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
507 $(TAGS_FILES) $(LISP)
508 set x; \
509 here=`pwd`; \
510 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
511 include_option=--etags-include; \
512 empty_fix=.; \
513 else \
514 include_option=--include; \
515 empty_fix=; \
516 fi; \
517 list='$(SUBDIRS)'; for subdir in $$list; do \
518 if test "$$subdir" = .; then :; else \
519 test ! -f $$subdir/TAGS || \
520 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
521 fi; \
522 done; \
523 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
524 unique=`for i in $$list; do \
525 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
526 done | \
527 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
528 END { if (nonempty) { for (i in files) print i; }; }'`; \
529 shift; \
530 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
531 test -n "$$unique" || unique=$$empty_fix; \
532 if test $$# -gt 0; then \
533 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
534 "$$@" $$unique; \
535 else \
536 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
537 $$unique; \
538 fi; \
539 fi
540ctags: CTAGS
541CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
542 $(TAGS_FILES) $(LISP)
543 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
544 unique=`for i in $$list; do \
545 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
546 done | \
547 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
548 END { if (nonempty) { for (i in files) print i; }; }'`; \
549 test -z "$(CTAGS_ARGS)$$unique" \
550 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
551 $$unique
552
553GTAGS:
554 here=`$(am__cd) $(top_builddir) && pwd` \
555 && $(am__cd) $(top_srcdir) \
556 && gtags -i $(GTAGS_ARGS) "$$here"
557
558distclean-tags:
559 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
560
561distdir: $(DISTFILES)
562 $(am__remove_distdir)
563 test -d "$(distdir)" || mkdir "$(distdir)"
564 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
565 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
566 list='$(DISTFILES)'; \
567 dist_files=`for file in $$list; do echo $$file; done | \
568 sed -e "s|^$$srcdirstrip/||;t" \
569 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
570 case $$dist_files in \
571 */*) $(MKDIR_P) `echo "$$dist_files" | \
572 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
573 sort -u` ;; \
574 esac; \
575 for file in $$dist_files; do \
576 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
577 if test -d $$d/$$file; then \
578 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
579 if test -d "$(distdir)/$$file"; then \
580 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
581 fi; \
582 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
583 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
584 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
585 fi; \
586 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
587 else \
588 test -f "$(distdir)/$$file" \
589 || cp -p $$d/$$file "$(distdir)/$$file" \
590 || exit 1; \
591 fi; \
592 done
593 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
594 if test "$$subdir" = .; then :; else \
595 test -d "$(distdir)/$$subdir" \
596 || $(MKDIR_P) "$(distdir)/$$subdir" \
597 || exit 1; \
598 fi; \
599 done
600 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
601 if test "$$subdir" = .; then :; else \
602 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
603 $(am__relativize); \
604 new_distdir=$$reldir; \
605 dir1=$$subdir; dir2="$(top_distdir)"; \
606 $(am__relativize); \
607 new_top_distdir=$$reldir; \
608 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
609 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
610 ($(am__cd) $$subdir && \
611 $(MAKE) $(AM_MAKEFLAGS) \
612 top_distdir="$$new_top_distdir" \
613 distdir="$$new_distdir" \
614 am__remove_distdir=: \
615 am__skip_length_check=: \
616 am__skip_mode_fix=: \
617 distdir) \
618 || exit 1; \
619 fi; \
620 done
621 -test -n "$(am__skip_mode_fix)" \
622 || find "$(distdir)" -type d ! -perm -755 \
623 -exec chmod u+rwx,go+rx {} \; -o \
624 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
625 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
626 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
627 || chmod -R a+r "$(distdir)"
628dist-gzip: distdir
629 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
630 $(am__remove_distdir)
631dist-bzip2: distdir
632 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
633 $(am__remove_distdir)
634
635dist-lzma: distdir
636 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
637 $(am__remove_distdir)
638
639dist-xz: distdir
640 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
641 $(am__remove_distdir)
642
643dist-tarZ: distdir
644 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
645 $(am__remove_distdir)
646
647dist-shar: distdir
648 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
649 $(am__remove_distdir)
650
651dist-zip: distdir
652 -rm -f $(distdir).zip
653 zip -rq $(distdir).zip $(distdir)
654 $(am__remove_distdir)
655
656dist dist-all: distdir
657 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
658 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
659 $(am__remove_distdir)
660
661# This target untars the dist file and tries a VPATH configuration. Then
662# it guarantees that the distribution is self-contained by making another
663# tarfile.
664distcheck: dist
665 case '$(DIST_ARCHIVES)' in \
666 *.tar.gz*) \
667 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
668 *.tar.bz2*) \
669 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
670 *.tar.lzma*) \
671 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
672 *.tar.xz*) \
673 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
674 *.tar.Z*) \
675 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
676 *.shar.gz*) \
677 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
678 *.zip*) \
679 unzip $(distdir).zip ;;\
680 esac
681 chmod -R a-w $(distdir); chmod a+w $(distdir)
682 mkdir $(distdir)/_build
683 mkdir $(distdir)/_inst
684 chmod a-w $(distdir)
685 test -d $(distdir)/_build || exit 0; \
686 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
687 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
688 && am__cwd=`pwd` \
689 && $(am__cd) $(distdir)/_build \
690 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
691 $(DISTCHECK_CONFIGURE_FLAGS) \
692 && $(MAKE) $(AM_MAKEFLAGS) \
693 && $(MAKE) $(AM_MAKEFLAGS) dvi \
694 && $(MAKE) $(AM_MAKEFLAGS) check \
695 && $(MAKE) $(AM_MAKEFLAGS) install \
696 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
697 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
698 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
699 distuninstallcheck \
700 && chmod -R a-w "$$dc_install_base" \
701 && ({ \
702 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
703 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
704 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
705 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
706 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
707 } || { rm -rf "$$dc_destdir"; exit 1; }) \
708 && rm -rf "$$dc_destdir" \
709 && $(MAKE) $(AM_MAKEFLAGS) dist \
710 && rm -rf $(DIST_ARCHIVES) \
711 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
712 && cd "$$am__cwd" \
713 || exit 1
714 $(am__remove_distdir)
715 @(echo "$(distdir) archives ready for distribution: "; \
716 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
717 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
718distuninstallcheck:
719 @$(am__cd) '$(distuninstallcheck_dir)' \
720 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
721 || { echo "ERROR: files left after uninstall:" ; \
722 if test -n "$(DESTDIR)"; then \
723 echo " (check DESTDIR support)"; \
724 fi ; \
725 $(distuninstallcheck_listfiles) ; \
726 exit 1; } >&2
727distcleancheck: distclean
728 @if test '$(srcdir)' = . ; then \
729 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
730 exit 1 ; \
731 fi
732 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
733 || { echo "ERROR: files left in build directory after distclean:" ; \
734 $(distcleancheck_listfiles) ; \
735 exit 1; } >&2
736check-am: all-am
737 $(MAKE) $(AM_MAKEFLAGS) check-local
738check: check-recursive
739all-am: Makefile $(DATA) config.h
740installdirs: installdirs-recursive
741installdirs-am:
742 for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
743 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
744 done
745install: install-recursive
746install-exec: install-exec-recursive
747install-data: install-data-recursive
748uninstall: uninstall-recursive
749
750install-am: all-am
751 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
752
753installcheck: installcheck-recursive
754install-strip:
755 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
756 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
757 `test -z '$(STRIP)' || \
758 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
759mostlyclean-generic:
760
761clean-generic:
762
763distclean-generic:
764 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
765 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
766
767maintainer-clean-generic:
768 @echo "This command is intended for maintainers to use"
769 @echo "it deletes files that may require special tools to rebuild."
770 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
771@EFL_ENABLE_COVERAGE_FALSE@clean-local:
772clean: clean-recursive
773
774clean-am: clean-generic clean-libtool clean-local mostlyclean-am
775
776distclean: distclean-recursive
777 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
778 -rm -f Makefile
779distclean-am: clean-am distclean-generic distclean-hdr \
780 distclean-libtool distclean-tags
781
782dvi: dvi-recursive
783
784dvi-am:
785
786html: html-recursive
787
788html-am:
789
790info: info-recursive
791
792info-am:
793
794install-data-am: install-pkgconfigDATA
795
796install-dvi: install-dvi-recursive
797
798install-dvi-am:
799
800install-exec-am:
801
802install-html: install-html-recursive
803
804install-html-am:
805
806install-info: install-info-recursive
807
808install-info-am:
809
810install-man:
811
812install-pdf: install-pdf-recursive
813
814install-pdf-am:
815
816install-ps: install-ps-recursive
817
818install-ps-am:
819
820installcheck-am:
821
822maintainer-clean: maintainer-clean-recursive
823 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
824 -rm -rf $(top_srcdir)/autom4te.cache
825 -rm -f Makefile
826maintainer-clean-am: distclean-am maintainer-clean-generic
827
828mostlyclean: mostlyclean-recursive
829
830mostlyclean-am: mostlyclean-generic mostlyclean-libtool
831
832pdf: pdf-recursive
833
834pdf-am:
835
836ps: ps-recursive
837
838ps-am:
839
840uninstall-am: uninstall-pkgconfigDATA
841
842.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \
843 ctags-recursive install-am install-strip tags-recursive
844
845.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
846 all all-am am--refresh check check-am check-local clean \
847 clean-generic clean-libtool clean-local ctags ctags-recursive \
848 dist dist-all dist-bzip2 dist-gzip dist-lzma dist-shar \
849 dist-tarZ dist-xz dist-zip distcheck distclean \
850 distclean-generic distclean-hdr distclean-libtool \
851 distclean-tags distcleancheck distdir distuninstallcheck dvi \
852 dvi-am html html-am info info-am install install-am \
853 install-data install-data-am install-dvi install-dvi-am \
854 install-exec install-exec-am install-html install-html-am \
855 install-info install-info-am install-man install-pdf \
856 install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
857 install-strip installcheck installcheck-am installdirs \
858 installdirs-am maintainer-clean maintainer-clean-generic \
859 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
860 ps ps-am tags tags-recursive uninstall uninstall-am \
861 uninstall-pkgconfigDATA
862
863
864.PHONY: doc coverage
865
866# Documentation
867
868doc:
869 @echo "entering doc/"
870 make -C doc doc
871
872# Unit tests
873
874@EFL_ENABLE_TESTS_TRUE@check-local:
875@EFL_ENABLE_TESTS_TRUE@ @./src/tests/eet_suite
876
877@EFL_ENABLE_TESTS_FALSE@check-local:
878@EFL_ENABLE_TESTS_FALSE@ @echo "reconfigure with --enable-tests"
879
880# Coverage report
881
882@EFL_ENABLE_COVERAGE_TRUE@lcov-reset:
883@EFL_ENABLE_COVERAGE_TRUE@ @rm -rf coverage
884@EFL_ENABLE_COVERAGE_TRUE@ @find . -name "*.gcda" -exec rm {} \;
885@EFL_ENABLE_COVERAGE_TRUE@ @lcov --directory . --zerocounters
886
887@EFL_ENABLE_COVERAGE_TRUE@lcov-report:
888@EFL_ENABLE_COVERAGE_TRUE@ @mkdir coverage
889@EFL_ENABLE_COVERAGE_TRUE@ @lcov --compat-libtool --directory . --capture --output-file coverage/coverage.info
890@EFL_ENABLE_COVERAGE_TRUE@ @lcov -l coverage/coverage.info |grep "\\.h" |cut -d " " -f 2 > coverage/remove
891@EFL_ENABLE_COVERAGE_TRUE@ @lcov -r coverage/coverage.info `cat coverage/remove` > coverage/coverage.cleaned.info
892@EFL_ENABLE_COVERAGE_TRUE@ @rm coverage/remove
893@EFL_ENABLE_COVERAGE_TRUE@ @mv coverage/coverage.cleaned.info coverage/coverage.info
894@EFL_ENABLE_COVERAGE_TRUE@ @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
895
896@EFL_ENABLE_COVERAGE_TRUE@coverage:
897@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-reset
898@EFL_ENABLE_COVERAGE_TRUE@ @make check
899@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-report
900
901@EFL_ENABLE_COVERAGE_TRUE@clean-local:
902@EFL_ENABLE_COVERAGE_TRUE@ @rm -rf coverage
903@EFL_ENABLE_COVERAGE_FALSE@lcov-reset:
904@EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-coverage"
905
906@EFL_ENABLE_COVERAGE_FALSE@lcov-report:
907@EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-coverage"
908
909@EFL_ENABLE_COVERAGE_FALSE@coverage:
910@EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-tests --enable-coverage"
911
912# Tell versions [3.59,3.63) of GNU make to not export all variables.
913# Otherwise a system limit (for SysV at least) may be exceeded.
914.NOEXPORT:
diff --git a/libraries/eet/NEWS b/libraries/eet/NEWS
new file mode 100644
index 0000000..43118b0
--- /dev/null
+++ b/libraries/eet/NEWS
@@ -0,0 +1,28 @@
1Eet 1.5.0
2
3Changes since Eet 1.4.0:
4--------------------------
5
6Additions:
7
8 * EET_DATA_DESCRIPTOR_ADD_LIST_STRING API for string lists
9 * eet_node API's to manipulate nodes
10 * eet_alias_get API
11 * eet_data_xattr_cipher_get and eet_data_xattr_cipher_set APIs
12 * EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY API
13
14Fixes:
15
16 * eet shutdown on windows
17 * test case to init eet
18 * compilation against libjpeg 8 on windows
19 * binary open on windows
20 * unopenable empty eet file for read/write
21
22Improvements:
23
24 * better speed and memory footprint of EET_G_UNION and EET_G_ARRAY
25 * use stringshare for mmaped file names
26 * use eina locking wrappers
27 * use eina_file for file IO
28 * jpeg encode and decode quality improved at expense of speed
diff --git a/libraries/eet/README b/libraries/eet/README
new file mode 100644
index 0000000..48be3e5
--- /dev/null
+++ b/libraries/eet/README
@@ -0,0 +1,69 @@
1Eet 1.1.0
2
3******************************************************************************
4
5 FOR ANY ISSUES PLEASE EMAIL:
6 enlightenment-devel@lists.sourceforge.net
7
8******************************************************************************
9
10Requirements:
11-------------
12Must have:
13 libc
14 libm
15 zlib
16 libjpeg
17 eina (1.1.0 or better)
18 (For windows you also need: evil)
19
20Optional requirements:
21 gnutls (1.7.6 or better)
22 openssl
23
24Eet is a tiny library designed to write an arbitrary set of chunks of
25data to a file and optionally compress each chunk (very much like a
26zip file) and allow fast random-access reading of the file later
27on. It does not do zip as a zip itself has more complexity than is
28needed, and it was much simpler to implement this once here.
29
30It also can encode and decode data structures in memory, as well as
31image data for saving to eet files or sending across the network to
32other machines, or just writing to arbitrary files on the system. All
33data is encoded in a platform independent way and can be written and
34read by any architecture. This data once encoded can be sent to
35another process or machine and decoded on the other end without
36needing to go into an eet file. Eet can also optionally encrypt files
37and use digital signatures (with gnutls or openssl support).
38
39------------------------------------------------------------------------------
40COMPILING AND INSTALLING:
41
42 ./configure
43 make
44(do this as root unless you are installing in your users directories):
45 make install
46
47To get the coverage report:
48 make coverage
49The report is created in the coverage/ subdir
50If you want to be able to run coverage test over eet, you will need gcov
51(usually any distro provides it) and lcov from:
52 http://ltp.sourceforge.net/coverage/lcov.php.
53For coverage support you also need "make check" support with the check
54library (see below).
55
56For compilation with MinGW, fnmatch.h is probably missing. That file can be
57found here:
58 http://www.koders.com/c/fid2B518462CB1EED3D4E31E271DB83CD1582F6EEBE.aspx
59It should be installed in the mingw include directory.
60
61For compilation with mingw32ce, run configure with the option
62 --host=arm-wince-mingw32ce
63
64For compilation with cegcc, follow the wiki:
65 http://wiki.enlightenment.org/index.php/Category:EFL_Windows_CE
66
67If you want to be able to run "make check", you need library check
68 from http://check.sourceforge.net/
69
diff --git a/libraries/eet/aclocal.m4 b/libraries/eet/aclocal.m4
new file mode 100644
index 0000000..1d329e5
--- /dev/null
+++ b/libraries/eet/aclocal.m4
@@ -0,0 +1,1185 @@
1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17[m4_warning([this file was generated for autoconf 2.67.
18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23# serial 1 (pkg-config-0.24)
24#
25# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26#
27# This program is free software; you can redistribute it and/or modify
28# it under the terms of the GNU General Public License as published by
29# the Free Software Foundation; either version 2 of the License, or
30# (at your option) any later version.
31#
32# This program is distributed in the hope that it will be useful, but
33# WITHOUT ANY WARRANTY; without even the implied warranty of
34# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35# General Public License for more details.
36#
37# You should have received a copy of the GNU General Public License
38# along with this program; if not, write to the Free Software
39# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40#
41# As a special exception to the GNU General Public License, if you
42# distribute this file as part of a program that contains a
43# configuration script generated by Autoconf, you may include it under
44# the same distribution terms that you use for the rest of that program.
45
46# PKG_PROG_PKG_CONFIG([MIN-VERSION])
47# ----------------------------------
48AC_DEFUN([PKG_PROG_PKG_CONFIG],
49[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
50m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
51AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
52AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
53AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
54
55if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
56 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
57fi
58if test -n "$PKG_CONFIG"; then
59 _pkg_min_version=m4_default([$1], [0.9.0])
60 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
61 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
62 AC_MSG_RESULT([yes])
63 else
64 AC_MSG_RESULT([no])
65 PKG_CONFIG=""
66 fi
67fi[]dnl
68])# PKG_PROG_PKG_CONFIG
69
70# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
71#
72# Check to see whether a particular set of modules exists. Similar
73# to PKG_CHECK_MODULES(), but does not set variables or print errors.
74#
75# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
76# only at the first occurence in configure.ac, so if the first place
77# it's called might be skipped (such as if it is within an "if", you
78# have to call PKG_CHECK_EXISTS manually
79# --------------------------------------------------------------
80AC_DEFUN([PKG_CHECK_EXISTS],
81[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
82if test -n "$PKG_CONFIG" && \
83 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
84 m4_default([$2], [:])
85m4_ifvaln([$3], [else
86 $3])dnl
87fi])
88
89# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
90# ---------------------------------------------
91m4_define([_PKG_CONFIG],
92[if test -n "$$1"; then
93 pkg_cv_[]$1="$$1"
94 elif test -n "$PKG_CONFIG"; then
95 PKG_CHECK_EXISTS([$3],
96 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
97 [pkg_failed=yes])
98 else
99 pkg_failed=untried
100fi[]dnl
101])# _PKG_CONFIG
102
103# _PKG_SHORT_ERRORS_SUPPORTED
104# -----------------------------
105AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
106[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
107if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
108 _pkg_short_errors_supported=yes
109else
110 _pkg_short_errors_supported=no
111fi[]dnl
112])# _PKG_SHORT_ERRORS_SUPPORTED
113
114
115# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
116# [ACTION-IF-NOT-FOUND])
117#
118#
119# Note that if there is a possibility the first call to
120# PKG_CHECK_MODULES might not happen, you should be sure to include an
121# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
122#
123#
124# --------------------------------------------------------------
125AC_DEFUN([PKG_CHECK_MODULES],
126[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
127AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
128AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
129
130pkg_failed=no
131AC_MSG_CHECKING([for $1])
132
133_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
134_PKG_CONFIG([$1][_LIBS], [libs], [$2])
135
136m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
137and $1[]_LIBS to avoid the need to call pkg-config.
138See the pkg-config man page for more details.])
139
140if test $pkg_failed = yes; then
141 AC_MSG_RESULT([no])
142 _PKG_SHORT_ERRORS_SUPPORTED
143 if test $_pkg_short_errors_supported = yes; then
144 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
145 else
146 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
147 fi
148 # Put the nasty error message in config.log where it belongs
149 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
150
151 m4_default([$4], [AC_MSG_ERROR(
152[Package requirements ($2) were not met:
153
154$$1_PKG_ERRORS
155
156Consider adjusting the PKG_CONFIG_PATH environment variable if you
157installed software in a non-standard prefix.
158
159_PKG_TEXT])[]dnl
160 ])
161elif test $pkg_failed = untried; then
162 AC_MSG_RESULT([no])
163 m4_default([$4], [AC_MSG_FAILURE(
164[The pkg-config script could not be found or is too old. Make sure it
165is in your PATH or set the PKG_CONFIG environment variable to the full
166path to pkg-config.
167
168_PKG_TEXT
169
170To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
171 ])
172else
173 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
174 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
175 AC_MSG_RESULT([yes])
176 $3
177fi[]dnl
178])# PKG_CHECK_MODULES
179
180# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
181#
182# This file is free software; the Free Software Foundation
183# gives unlimited permission to copy and/or distribute it,
184# with or without modifications, as long as this notice is preserved.
185
186# AM_AUTOMAKE_VERSION(VERSION)
187# ----------------------------
188# Automake X.Y traces this macro to ensure aclocal.m4 has been
189# generated from the m4 files accompanying Automake X.Y.
190# (This private macro should not be called outside this file.)
191AC_DEFUN([AM_AUTOMAKE_VERSION],
192[am__api_version='1.11'
193dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
194dnl require some minimum version. Point them to the right macro.
195m4_if([$1], [1.11.1], [],
196 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
197])
198
199# _AM_AUTOCONF_VERSION(VERSION)
200# -----------------------------
201# aclocal traces this macro to find the Autoconf version.
202# This is a private macro too. Using m4_define simplifies
203# the logic in aclocal, which can simply ignore this definition.
204m4_define([_AM_AUTOCONF_VERSION], [])
205
206# AM_SET_CURRENT_AUTOMAKE_VERSION
207# -------------------------------
208# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
209# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
210AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
211[AM_AUTOMAKE_VERSION([1.11.1])dnl
212m4_ifndef([AC_AUTOCONF_VERSION],
213 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
214_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
215
216# AM_AUX_DIR_EXPAND -*- Autoconf -*-
217
218# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
219#
220# This file is free software; the Free Software Foundation
221# gives unlimited permission to copy and/or distribute it,
222# with or without modifications, as long as this notice is preserved.
223
224# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
225# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
226# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
227#
228# Of course, Automake must honor this variable whenever it calls a
229# tool from the auxiliary directory. The problem is that $srcdir (and
230# therefore $ac_aux_dir as well) can be either absolute or relative,
231# depending on how configure is run. This is pretty annoying, since
232# it makes $ac_aux_dir quite unusable in subdirectories: in the top
233# source directory, any form will work fine, but in subdirectories a
234# relative path needs to be adjusted first.
235#
236# $ac_aux_dir/missing
237# fails when called from a subdirectory if $ac_aux_dir is relative
238# $top_srcdir/$ac_aux_dir/missing
239# fails if $ac_aux_dir is absolute,
240# fails when called from a subdirectory in a VPATH build with
241# a relative $ac_aux_dir
242#
243# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
244# are both prefixed by $srcdir. In an in-source build this is usually
245# harmless because $srcdir is `.', but things will broke when you
246# start a VPATH build or use an absolute $srcdir.
247#
248# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
249# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
250# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
251# and then we would define $MISSING as
252# MISSING="\${SHELL} $am_aux_dir/missing"
253# This will work as long as MISSING is not called from configure, because
254# unfortunately $(top_srcdir) has no meaning in configure.
255# However there are other variables, like CC, which are often used in
256# configure, and could therefore not use this "fixed" $ac_aux_dir.
257#
258# Another solution, used here, is to always expand $ac_aux_dir to an
259# absolute PATH. The drawback is that using absolute paths prevent a
260# configured tree to be moved without reconfiguration.
261
262AC_DEFUN([AM_AUX_DIR_EXPAND],
263[dnl Rely on autoconf to set up CDPATH properly.
264AC_PREREQ([2.50])dnl
265# expand $ac_aux_dir to an absolute path
266am_aux_dir=`cd $ac_aux_dir && pwd`
267])
268
269# AM_CONDITIONAL -*- Autoconf -*-
270
271# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
272# Free Software Foundation, Inc.
273#
274# This file is free software; the Free Software Foundation
275# gives unlimited permission to copy and/or distribute it,
276# with or without modifications, as long as this notice is preserved.
277
278# serial 9
279
280# AM_CONDITIONAL(NAME, SHELL-CONDITION)
281# -------------------------------------
282# Define a conditional.
283AC_DEFUN([AM_CONDITIONAL],
284[AC_PREREQ(2.52)dnl
285 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
286 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
287AC_SUBST([$1_TRUE])dnl
288AC_SUBST([$1_FALSE])dnl
289_AM_SUBST_NOTMAKE([$1_TRUE])dnl
290_AM_SUBST_NOTMAKE([$1_FALSE])dnl
291m4_define([_AM_COND_VALUE_$1], [$2])dnl
292if $2; then
293 $1_TRUE=
294 $1_FALSE='#'
295else
296 $1_TRUE='#'
297 $1_FALSE=
298fi
299AC_CONFIG_COMMANDS_PRE(
300[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
301 AC_MSG_ERROR([[conditional "$1" was never defined.
302Usually this means the macro was only invoked conditionally.]])
303fi])])
304
305# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
306# Free Software Foundation, Inc.
307#
308# This file is free software; the Free Software Foundation
309# gives unlimited permission to copy and/or distribute it,
310# with or without modifications, as long as this notice is preserved.
311
312# serial 10
313
314# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
315# written in clear, in which case automake, when reading aclocal.m4,
316# will think it sees a *use*, and therefore will trigger all it's
317# C support machinery. Also note that it means that autoscan, seeing
318# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
319
320
321# _AM_DEPENDENCIES(NAME)
322# ----------------------
323# See how the compiler implements dependency checking.
324# NAME is "CC", "CXX", "GCJ", or "OBJC".
325# We try a few techniques and use that to set a single cache variable.
326#
327# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
328# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
329# dependency, and given that the user is not expected to run this macro,
330# just rely on AC_PROG_CC.
331AC_DEFUN([_AM_DEPENDENCIES],
332[AC_REQUIRE([AM_SET_DEPDIR])dnl
333AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
334AC_REQUIRE([AM_MAKE_INCLUDE])dnl
335AC_REQUIRE([AM_DEP_TRACK])dnl
336
337ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
338 [$1], CXX, [depcc="$CXX" am_compiler_list=],
339 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
340 [$1], UPC, [depcc="$UPC" am_compiler_list=],
341 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
342 [depcc="$$1" am_compiler_list=])
343
344AC_CACHE_CHECK([dependency style of $depcc],
345 [am_cv_$1_dependencies_compiler_type],
346[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
347 # We make a subdir and do the tests there. Otherwise we can end up
348 # making bogus files that we don't know about and never remove. For
349 # instance it was reported that on HP-UX the gcc test will end up
350 # making a dummy file named `D' -- because `-MD' means `put the output
351 # in D'.
352 mkdir conftest.dir
353 # Copy depcomp to subdir because otherwise we won't find it if we're
354 # using a relative directory.
355 cp "$am_depcomp" conftest.dir
356 cd conftest.dir
357 # We will build objects and dependencies in a subdirectory because
358 # it helps to detect inapplicable dependency modes. For instance
359 # both Tru64's cc and ICC support -MD to output dependencies as a
360 # side effect of compilation, but ICC will put the dependencies in
361 # the current directory while Tru64 will put them in the object
362 # directory.
363 mkdir sub
364
365 am_cv_$1_dependencies_compiler_type=none
366 if test "$am_compiler_list" = ""; then
367 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
368 fi
369 am__universal=false
370 m4_case([$1], [CC],
371 [case " $depcc " in #(
372 *\ -arch\ *\ -arch\ *) am__universal=true ;;
373 esac],
374 [CXX],
375 [case " $depcc " in #(
376 *\ -arch\ *\ -arch\ *) am__universal=true ;;
377 esac])
378
379 for depmode in $am_compiler_list; do
380 # Setup a source with many dependencies, because some compilers
381 # like to wrap large dependency lists on column 80 (with \), and
382 # we should not choose a depcomp mode which is confused by this.
383 #
384 # We need to recreate these files for each test, as the compiler may
385 # overwrite some of them when testing with obscure command lines.
386 # This happens at least with the AIX C compiler.
387 : > sub/conftest.c
388 for i in 1 2 3 4 5 6; do
389 echo '#include "conftst'$i'.h"' >> sub/conftest.c
390 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
391 # Solaris 8's {/usr,}/bin/sh.
392 touch sub/conftst$i.h
393 done
394 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
395
396 # We check with `-c' and `-o' for the sake of the "dashmstdout"
397 # mode. It turns out that the SunPro C++ compiler does not properly
398 # handle `-M -o', and we need to detect this. Also, some Intel
399 # versions had trouble with output in subdirs
400 am__obj=sub/conftest.${OBJEXT-o}
401 am__minus_obj="-o $am__obj"
402 case $depmode in
403 gcc)
404 # This depmode causes a compiler race in universal mode.
405 test "$am__universal" = false || continue
406 ;;
407 nosideeffect)
408 # after this tag, mechanisms are not by side-effect, so they'll
409 # only be used when explicitly requested
410 if test "x$enable_dependency_tracking" = xyes; then
411 continue
412 else
413 break
414 fi
415 ;;
416 msvisualcpp | msvcmsys)
417 # This compiler won't grok `-c -o', but also, the minuso test has
418 # not run yet. These depmodes are late enough in the game, and
419 # so weak that their functioning should not be impacted.
420 am__obj=conftest.${OBJEXT-o}
421 am__minus_obj=
422 ;;
423 none) break ;;
424 esac
425 if depmode=$depmode \
426 source=sub/conftest.c object=$am__obj \
427 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
428 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
429 >/dev/null 2>conftest.err &&
430 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
431 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
432 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
433 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
434 # icc doesn't choke on unknown options, it will just issue warnings
435 # or remarks (even with -Werror). So we grep stderr for any message
436 # that says an option was ignored or not supported.
437 # When given -MP, icc 7.0 and 7.1 complain thusly:
438 # icc: Command line warning: ignoring option '-M'; no argument required
439 # The diagnosis changed in icc 8.0:
440 # icc: Command line remark: option '-MP' not supported
441 if (grep 'ignoring option' conftest.err ||
442 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
443 am_cv_$1_dependencies_compiler_type=$depmode
444 break
445 fi
446 fi
447 done
448
449 cd ..
450 rm -rf conftest.dir
451else
452 am_cv_$1_dependencies_compiler_type=none
453fi
454])
455AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
456AM_CONDITIONAL([am__fastdep$1], [
457 test "x$enable_dependency_tracking" != xno \
458 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
459])
460
461
462# AM_SET_DEPDIR
463# -------------
464# Choose a directory name for dependency files.
465# This macro is AC_REQUIREd in _AM_DEPENDENCIES
466AC_DEFUN([AM_SET_DEPDIR],
467[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
468AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
469])
470
471
472# AM_DEP_TRACK
473# ------------
474AC_DEFUN([AM_DEP_TRACK],
475[AC_ARG_ENABLE(dependency-tracking,
476[ --disable-dependency-tracking speeds up one-time build
477 --enable-dependency-tracking do not reject slow dependency extractors])
478if test "x$enable_dependency_tracking" != xno; then
479 am_depcomp="$ac_aux_dir/depcomp"
480 AMDEPBACKSLASH='\'
481fi
482AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
483AC_SUBST([AMDEPBACKSLASH])dnl
484_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
485])
486
487# Generate code to set up dependency tracking. -*- Autoconf -*-
488
489# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
490# Free Software Foundation, Inc.
491#
492# This file is free software; the Free Software Foundation
493# gives unlimited permission to copy and/or distribute it,
494# with or without modifications, as long as this notice is preserved.
495
496#serial 5
497
498# _AM_OUTPUT_DEPENDENCY_COMMANDS
499# ------------------------------
500AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
501[{
502 # Autoconf 2.62 quotes --file arguments for eval, but not when files
503 # are listed without --file. Let's play safe and only enable the eval
504 # if we detect the quoting.
505 case $CONFIG_FILES in
506 *\'*) eval set x "$CONFIG_FILES" ;;
507 *) set x $CONFIG_FILES ;;
508 esac
509 shift
510 for mf
511 do
512 # Strip MF so we end up with the name of the file.
513 mf=`echo "$mf" | sed -e 's/:.*$//'`
514 # Check whether this is an Automake generated Makefile or not.
515 # We used to match only the files named `Makefile.in', but
516 # some people rename them; so instead we look at the file content.
517 # Grep'ing the first line is not enough: some people post-process
518 # each Makefile.in and add a new line on top of each file to say so.
519 # Grep'ing the whole file is not good either: AIX grep has a line
520 # limit of 2048, but all sed's we know have understand at least 4000.
521 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
522 dirpart=`AS_DIRNAME("$mf")`
523 else
524 continue
525 fi
526 # Extract the definition of DEPDIR, am__include, and am__quote
527 # from the Makefile without running `make'.
528 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
529 test -z "$DEPDIR" && continue
530 am__include=`sed -n 's/^am__include = //p' < "$mf"`
531 test -z "am__include" && continue
532 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
533 # When using ansi2knr, U may be empty or an underscore; expand it
534 U=`sed -n 's/^U = //p' < "$mf"`
535 # Find all dependency output files, they are included files with
536 # $(DEPDIR) in their names. We invoke sed twice because it is the
537 # simplest approach to changing $(DEPDIR) to its actual value in the
538 # expansion.
539 for file in `sed -n "
540 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
541 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
542 # Make sure the directory exists.
543 test -f "$dirpart/$file" && continue
544 fdir=`AS_DIRNAME(["$file"])`
545 AS_MKDIR_P([$dirpart/$fdir])
546 # echo "creating $dirpart/$file"
547 echo '# dummy' > "$dirpart/$file"
548 done
549 done
550}
551])# _AM_OUTPUT_DEPENDENCY_COMMANDS
552
553
554# AM_OUTPUT_DEPENDENCY_COMMANDS
555# -----------------------------
556# This macro should only be invoked once -- use via AC_REQUIRE.
557#
558# This code is only required when automatic dependency tracking
559# is enabled. FIXME. This creates each `.P' file that we will
560# need in order to bootstrap the dependency handling code.
561AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
562[AC_CONFIG_COMMANDS([depfiles],
563 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
564 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
565])
566
567# Do all the work for Automake. -*- Autoconf -*-
568
569# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
570# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
571#
572# This file is free software; the Free Software Foundation
573# gives unlimited permission to copy and/or distribute it,
574# with or without modifications, as long as this notice is preserved.
575
576# serial 16
577
578# This macro actually does too much. Some checks are only needed if
579# your package does certain things. But this isn't really a big deal.
580
581# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
582# AM_INIT_AUTOMAKE([OPTIONS])
583# -----------------------------------------------
584# The call with PACKAGE and VERSION arguments is the old style
585# call (pre autoconf-2.50), which is being phased out. PACKAGE
586# and VERSION should now be passed to AC_INIT and removed from
587# the call to AM_INIT_AUTOMAKE.
588# We support both call styles for the transition. After
589# the next Automake release, Autoconf can make the AC_INIT
590# arguments mandatory, and then we can depend on a new Autoconf
591# release and drop the old call support.
592AC_DEFUN([AM_INIT_AUTOMAKE],
593[AC_PREREQ([2.62])dnl
594dnl Autoconf wants to disallow AM_ names. We explicitly allow
595dnl the ones we care about.
596m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
597AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
598AC_REQUIRE([AC_PROG_INSTALL])dnl
599if test "`cd $srcdir && pwd`" != "`pwd`"; then
600 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
601 # is not polluted with repeated "-I."
602 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
603 # test to see if srcdir already configured
604 if test -f $srcdir/config.status; then
605 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
606 fi
607fi
608
609# test whether we have cygpath
610if test -z "$CYGPATH_W"; then
611 if (cygpath --version) >/dev/null 2>/dev/null; then
612 CYGPATH_W='cygpath -w'
613 else
614 CYGPATH_W=echo
615 fi
616fi
617AC_SUBST([CYGPATH_W])
618
619# Define the identity of the package.
620dnl Distinguish between old-style and new-style calls.
621m4_ifval([$2],
622[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
623 AC_SUBST([PACKAGE], [$1])dnl
624 AC_SUBST([VERSION], [$2])],
625[_AM_SET_OPTIONS([$1])dnl
626dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
627m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
628 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
629 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
630 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
631
632_AM_IF_OPTION([no-define],,
633[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
634 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
635
636# Some tools Automake needs.
637AC_REQUIRE([AM_SANITY_CHECK])dnl
638AC_REQUIRE([AC_ARG_PROGRAM])dnl
639AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
640AM_MISSING_PROG(AUTOCONF, autoconf)
641AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
642AM_MISSING_PROG(AUTOHEADER, autoheader)
643AM_MISSING_PROG(MAKEINFO, makeinfo)
644AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
645AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
646AC_REQUIRE([AM_PROG_MKDIR_P])dnl
647# We need awk for the "check" target. The system "awk" is bad on
648# some platforms.
649AC_REQUIRE([AC_PROG_AWK])dnl
650AC_REQUIRE([AC_PROG_MAKE_SET])dnl
651AC_REQUIRE([AM_SET_LEADING_DOT])dnl
652_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
653 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
654 [_AM_PROG_TAR([v7])])])
655_AM_IF_OPTION([no-dependencies],,
656[AC_PROVIDE_IFELSE([AC_PROG_CC],
657 [_AM_DEPENDENCIES(CC)],
658 [define([AC_PROG_CC],
659 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
660AC_PROVIDE_IFELSE([AC_PROG_CXX],
661 [_AM_DEPENDENCIES(CXX)],
662 [define([AC_PROG_CXX],
663 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
664AC_PROVIDE_IFELSE([AC_PROG_OBJC],
665 [_AM_DEPENDENCIES(OBJC)],
666 [define([AC_PROG_OBJC],
667 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
668])
669_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
670dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
671dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
672dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
673AC_CONFIG_COMMANDS_PRE(dnl
674[m4_provide_if([_AM_COMPILER_EXEEXT],
675 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
676])
677
678dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
679dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
680dnl mangled by Autoconf and run in a shell conditional statement.
681m4_define([_AC_COMPILER_EXEEXT],
682m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
683
684
685# When config.status generates a header, we must update the stamp-h file.
686# This file resides in the same directory as the config header
687# that is generated. The stamp files are numbered to have different names.
688
689# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
690# loop where config.status creates the headers, so we can generate
691# our stamp files there.
692AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
693[# Compute $1's index in $config_headers.
694_am_arg=$1
695_am_stamp_count=1
696for _am_header in $config_headers :; do
697 case $_am_header in
698 $_am_arg | $_am_arg:* )
699 break ;;
700 * )
701 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
702 esac
703done
704echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
705
706# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
707#
708# This file is free software; the Free Software Foundation
709# gives unlimited permission to copy and/or distribute it,
710# with or without modifications, as long as this notice is preserved.
711
712# AM_PROG_INSTALL_SH
713# ------------------
714# Define $install_sh.
715AC_DEFUN([AM_PROG_INSTALL_SH],
716[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
717if test x"${install_sh}" != xset; then
718 case $am_aux_dir in
719 *\ * | *\ *)
720 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
721 *)
722 install_sh="\${SHELL} $am_aux_dir/install-sh"
723 esac
724fi
725AC_SUBST(install_sh)])
726
727# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
728#
729# This file is free software; the Free Software Foundation
730# gives unlimited permission to copy and/or distribute it,
731# with or without modifications, as long as this notice is preserved.
732
733# serial 2
734
735# Check whether the underlying file-system supports filenames
736# with a leading dot. For instance MS-DOS doesn't.
737AC_DEFUN([AM_SET_LEADING_DOT],
738[rm -rf .tst 2>/dev/null
739mkdir .tst 2>/dev/null
740if test -d .tst; then
741 am__leading_dot=.
742else
743 am__leading_dot=_
744fi
745rmdir .tst 2>/dev/null
746AC_SUBST([am__leading_dot])])
747
748# Check to see how 'make' treats includes. -*- Autoconf -*-
749
750# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
751#
752# This file is free software; the Free Software Foundation
753# gives unlimited permission to copy and/or distribute it,
754# with or without modifications, as long as this notice is preserved.
755
756# serial 4
757
758# AM_MAKE_INCLUDE()
759# -----------------
760# Check to see how make treats includes.
761AC_DEFUN([AM_MAKE_INCLUDE],
762[am_make=${MAKE-make}
763cat > confinc << 'END'
764am__doit:
765 @echo this is the am__doit target
766.PHONY: am__doit
767END
768# If we don't find an include directive, just comment out the code.
769AC_MSG_CHECKING([for style of include used by $am_make])
770am__include="#"
771am__quote=
772_am_result=none
773# First try GNU make style include.
774echo "include confinc" > confmf
775# Ignore all kinds of additional output from `make'.
776case `$am_make -s -f confmf 2> /dev/null` in #(
777*the\ am__doit\ target*)
778 am__include=include
779 am__quote=
780 _am_result=GNU
781 ;;
782esac
783# Now try BSD make style include.
784if test "$am__include" = "#"; then
785 echo '.include "confinc"' > confmf
786 case `$am_make -s -f confmf 2> /dev/null` in #(
787 *the\ am__doit\ target*)
788 am__include=.include
789 am__quote="\""
790 _am_result=BSD
791 ;;
792 esac
793fi
794AC_SUBST([am__include])
795AC_SUBST([am__quote])
796AC_MSG_RESULT([$_am_result])
797rm -f confinc confmf
798])
799
800# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
801# Free Software Foundation, Inc.
802#
803# This file is free software; the Free Software Foundation
804# gives unlimited permission to copy and/or distribute it,
805# with or without modifications, as long as this notice is preserved.
806
807# serial 6
808
809# AM_PROG_CC_C_O
810# --------------
811# Like AC_PROG_CC_C_O, but changed for automake.
812AC_DEFUN([AM_PROG_CC_C_O],
813[AC_REQUIRE([AC_PROG_CC_C_O])dnl
814AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
815AC_REQUIRE_AUX_FILE([compile])dnl
816# FIXME: we rely on the cache variable name because
817# there is no other way.
818set dummy $CC
819am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
820eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
821if test "$am_t" != yes; then
822 # Losing compiler, so override with the script.
823 # FIXME: It is wrong to rewrite CC.
824 # But if we don't then we get into trouble of one sort or another.
825 # A longer-term fix would be to have automake use am__CC in this case,
826 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
827 CC="$am_aux_dir/compile $CC"
828fi
829dnl Make sure AC_PROG_CC is never called again, or it will override our
830dnl setting of CC.
831m4_define([AC_PROG_CC],
832 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
833])
834
835# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
836
837# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
838# Free Software Foundation, Inc.
839#
840# This file is free software; the Free Software Foundation
841# gives unlimited permission to copy and/or distribute it,
842# with or without modifications, as long as this notice is preserved.
843
844# serial 6
845
846# AM_MISSING_PROG(NAME, PROGRAM)
847# ------------------------------
848AC_DEFUN([AM_MISSING_PROG],
849[AC_REQUIRE([AM_MISSING_HAS_RUN])
850$1=${$1-"${am_missing_run}$2"}
851AC_SUBST($1)])
852
853
854# AM_MISSING_HAS_RUN
855# ------------------
856# Define MISSING if not defined so far and test if it supports --run.
857# If it does, set am_missing_run to use it, otherwise, to nothing.
858AC_DEFUN([AM_MISSING_HAS_RUN],
859[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
860AC_REQUIRE_AUX_FILE([missing])dnl
861if test x"${MISSING+set}" != xset; then
862 case $am_aux_dir in
863 *\ * | *\ *)
864 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
865 *)
866 MISSING="\${SHELL} $am_aux_dir/missing" ;;
867 esac
868fi
869# Use eval to expand $SHELL
870if eval "$MISSING --run true"; then
871 am_missing_run="$MISSING --run "
872else
873 am_missing_run=
874 AC_MSG_WARN([`missing' script is too old or missing])
875fi
876])
877
878# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
879#
880# This file is free software; the Free Software Foundation
881# gives unlimited permission to copy and/or distribute it,
882# with or without modifications, as long as this notice is preserved.
883
884# AM_PROG_MKDIR_P
885# ---------------
886# Check for `mkdir -p'.
887AC_DEFUN([AM_PROG_MKDIR_P],
888[AC_PREREQ([2.60])dnl
889AC_REQUIRE([AC_PROG_MKDIR_P])dnl
890dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
891dnl while keeping a definition of mkdir_p for backward compatibility.
892dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
893dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
894dnl Makefile.ins that do not define MKDIR_P, so we do our own
895dnl adjustment using top_builddir (which is defined more often than
896dnl MKDIR_P).
897AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
898case $mkdir_p in
899 [[\\/$]]* | ?:[[\\/]]*) ;;
900 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
901esac
902])
903
904# Helper functions for option handling. -*- Autoconf -*-
905
906# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
907#
908# This file is free software; the Free Software Foundation
909# gives unlimited permission to copy and/or distribute it,
910# with or without modifications, as long as this notice is preserved.
911
912# serial 4
913
914# _AM_MANGLE_OPTION(NAME)
915# -----------------------
916AC_DEFUN([_AM_MANGLE_OPTION],
917[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
918
919# _AM_SET_OPTION(NAME)
920# ------------------------------
921# Set option NAME. Presently that only means defining a flag for this option.
922AC_DEFUN([_AM_SET_OPTION],
923[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
924
925# _AM_SET_OPTIONS(OPTIONS)
926# ----------------------------------
927# OPTIONS is a space-separated list of Automake options.
928AC_DEFUN([_AM_SET_OPTIONS],
929[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
930
931# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
932# -------------------------------------------
933# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
934AC_DEFUN([_AM_IF_OPTION],
935[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
936
937# Check to make sure that the build environment is sane. -*- Autoconf -*-
938
939# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
940# Free Software Foundation, Inc.
941#
942# This file is free software; the Free Software Foundation
943# gives unlimited permission to copy and/or distribute it,
944# with or without modifications, as long as this notice is preserved.
945
946# serial 5
947
948# AM_SANITY_CHECK
949# ---------------
950AC_DEFUN([AM_SANITY_CHECK],
951[AC_MSG_CHECKING([whether build environment is sane])
952# Just in case
953sleep 1
954echo timestamp > conftest.file
955# Reject unsafe characters in $srcdir or the absolute working directory
956# name. Accept space and tab only in the latter.
957am_lf='
958'
959case `pwd` in
960 *[[\\\"\#\$\&\'\`$am_lf]]*)
961 AC_MSG_ERROR([unsafe absolute working directory name]);;
962esac
963case $srcdir in
964 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
965 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
966esac
967
968# Do `set' in a subshell so we don't clobber the current shell's
969# arguments. Must try -L first in case configure is actually a
970# symlink; some systems play weird games with the mod time of symlinks
971# (eg FreeBSD returns the mod time of the symlink's containing
972# directory).
973if (
974 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
975 if test "$[*]" = "X"; then
976 # -L didn't work.
977 set X `ls -t "$srcdir/configure" conftest.file`
978 fi
979 rm -f conftest.file
980 if test "$[*]" != "X $srcdir/configure conftest.file" \
981 && test "$[*]" != "X conftest.file $srcdir/configure"; then
982
983 # If neither matched, then we have a broken ls. This can happen
984 # if, for instance, CONFIG_SHELL is bash and it inherits a
985 # broken ls alias from the environment. This has actually
986 # happened. Such a system could not be considered "sane".
987 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
988alias in your environment])
989 fi
990
991 test "$[2]" = conftest.file
992 )
993then
994 # Ok.
995 :
996else
997 AC_MSG_ERROR([newly created file is older than distributed files!
998Check your system clock])
999fi
1000AC_MSG_RESULT(yes)])
1001
1002# Copyright (C) 2009 Free Software Foundation, Inc.
1003#
1004# This file is free software; the Free Software Foundation
1005# gives unlimited permission to copy and/or distribute it,
1006# with or without modifications, as long as this notice is preserved.
1007
1008# serial 1
1009
1010# AM_SILENT_RULES([DEFAULT])
1011# --------------------------
1012# Enable less verbose build rules; with the default set to DEFAULT
1013# (`yes' being less verbose, `no' or empty being verbose).
1014AC_DEFUN([AM_SILENT_RULES],
1015[AC_ARG_ENABLE([silent-rules],
1016[ --enable-silent-rules less verbose build output (undo: `make V=1')
1017 --disable-silent-rules verbose build output (undo: `make V=0')])
1018case $enable_silent_rules in
1019yes) AM_DEFAULT_VERBOSITY=0;;
1020no) AM_DEFAULT_VERBOSITY=1;;
1021*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1022esac
1023AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1024AM_BACKSLASH='\'
1025AC_SUBST([AM_BACKSLASH])dnl
1026_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1027])
1028
1029# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1030#
1031# This file is free software; the Free Software Foundation
1032# gives unlimited permission to copy and/or distribute it,
1033# with or without modifications, as long as this notice is preserved.
1034
1035# AM_PROG_INSTALL_STRIP
1036# ---------------------
1037# One issue with vendor `install' (even GNU) is that you can't
1038# specify the program used to strip binaries. This is especially
1039# annoying in cross-compiling environments, where the build's strip
1040# is unlikely to handle the host's binaries.
1041# Fortunately install-sh will honor a STRIPPROG variable, so we
1042# always use install-sh in `make install-strip', and initialize
1043# STRIPPROG with the value of the STRIP variable (set by the user).
1044AC_DEFUN([AM_PROG_INSTALL_STRIP],
1045[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1046# Installed binaries are usually stripped using `strip' when the user
1047# run `make install-strip'. However `strip' might not be the right
1048# tool to use in cross-compilation environments, therefore Automake
1049# will honor the `STRIP' environment variable to overrule this program.
1050dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1051if test "$cross_compiling" != no; then
1052 AC_CHECK_TOOL([STRIP], [strip], :)
1053fi
1054INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1055AC_SUBST([INSTALL_STRIP_PROGRAM])])
1056
1057# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1058#
1059# This file is free software; the Free Software Foundation
1060# gives unlimited permission to copy and/or distribute it,
1061# with or without modifications, as long as this notice is preserved.
1062
1063# serial 2
1064
1065# _AM_SUBST_NOTMAKE(VARIABLE)
1066# ---------------------------
1067# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1068# This macro is traced by Automake.
1069AC_DEFUN([_AM_SUBST_NOTMAKE])
1070
1071# AM_SUBST_NOTMAKE(VARIABLE)
1072# ---------------------------
1073# Public sister of _AM_SUBST_NOTMAKE.
1074AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1075
1076# Check how to create a tarball. -*- Autoconf -*-
1077
1078# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1079#
1080# This file is free software; the Free Software Foundation
1081# gives unlimited permission to copy and/or distribute it,
1082# with or without modifications, as long as this notice is preserved.
1083
1084# serial 2
1085
1086# _AM_PROG_TAR(FORMAT)
1087# --------------------
1088# Check how to create a tarball in format FORMAT.
1089# FORMAT should be one of `v7', `ustar', or `pax'.
1090#
1091# Substitute a variable $(am__tar) that is a command
1092# writing to stdout a FORMAT-tarball containing the directory
1093# $tardir.
1094# tardir=directory && $(am__tar) > result.tar
1095#
1096# Substitute a variable $(am__untar) that extract such
1097# a tarball read from stdin.
1098# $(am__untar) < result.tar
1099AC_DEFUN([_AM_PROG_TAR],
1100[# Always define AMTAR for backward compatibility.
1101AM_MISSING_PROG([AMTAR], [tar])
1102m4_if([$1], [v7],
1103 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1104 [m4_case([$1], [ustar],, [pax],,
1105 [m4_fatal([Unknown tar format])])
1106AC_MSG_CHECKING([how to create a $1 tar archive])
1107# Loop over all known methods to create a tar archive until one works.
1108_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1109_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1110# Do not fold the above two line into one, because Tru64 sh and
1111# Solaris sh will not grok spaces in the rhs of `-'.
1112for _am_tool in $_am_tools
1113do
1114 case $_am_tool in
1115 gnutar)
1116 for _am_tar in tar gnutar gtar;
1117 do
1118 AM_RUN_LOG([$_am_tar --version]) && break
1119 done
1120 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1121 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1122 am__untar="$_am_tar -xf -"
1123 ;;
1124 plaintar)
1125 # Must skip GNU tar: if it does not support --format= it doesn't create
1126 # ustar tarball either.
1127 (tar --version) >/dev/null 2>&1 && continue
1128 am__tar='tar chf - "$$tardir"'
1129 am__tar_='tar chf - "$tardir"'
1130 am__untar='tar xf -'
1131 ;;
1132 pax)
1133 am__tar='pax -L -x $1 -w "$$tardir"'
1134 am__tar_='pax -L -x $1 -w "$tardir"'
1135 am__untar='pax -r'
1136 ;;
1137 cpio)
1138 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1139 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1140 am__untar='cpio -i -H $1 -d'
1141 ;;
1142 none)
1143 am__tar=false
1144 am__tar_=false
1145 am__untar=false
1146 ;;
1147 esac
1148
1149 # If the value was cached, stop now. We just wanted to have am__tar
1150 # and am__untar set.
1151 test -n "${am_cv_prog_tar_$1}" && break
1152
1153 # tar/untar a dummy directory, and stop if the command works
1154 rm -rf conftest.dir
1155 mkdir conftest.dir
1156 echo GrepMe > conftest.dir/file
1157 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1158 rm -rf conftest.dir
1159 if test -s conftest.tar; then
1160 AM_RUN_LOG([$am__untar <conftest.tar])
1161 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1162 fi
1163done
1164rm -rf conftest.dir
1165
1166AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1167AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1168AC_SUBST([am__tar])
1169AC_SUBST([am__untar])
1170]) # _AM_PROG_TAR
1171
1172m4_include([m4/ac_attribute.m4])
1173m4_include([m4/ac_path_generic.m4])
1174m4_include([m4/efl_binary.m4])
1175m4_include([m4/efl_compiler_flag.m4])
1176m4_include([m4/efl_coverage.m4])
1177m4_include([m4/efl_doxygen.m4])
1178m4_include([m4/efl_fnmatch.m4])
1179m4_include([m4/efl_path_max.m4])
1180m4_include([m4/efl_tests.m4])
1181m4_include([m4/libtool.m4])
1182m4_include([m4/ltoptions.m4])
1183m4_include([m4/ltsugar.m4])
1184m4_include([m4/ltversion.m4])
1185m4_include([m4/lt~obsolete.m4])
diff --git a/libraries/eet/autogen.sh b/libraries/eet/autogen.sh
new file mode 100755
index 0000000..72e1033
--- /dev/null
+++ b/libraries/eet/autogen.sh
@@ -0,0 +1,38 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6touch ABOUT-NLS
7
8echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
9echo "Running autoheader..." ; autoheader || exit 1
10echo "Running autoconf..." ; autoconf || exit 1
11echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
12echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
13
14W=0
15
16rm -f config.cache-env.tmp
17echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
18echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
19echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
20echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
21echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
22
23cmp config.cache-env.tmp config.cache-env >> /dev/null
24if [ $? -ne 0 ]; then
25 W=1;
26fi
27
28if [ $W -ne 0 ]; then
29 echo "Cleaning configure cache...";
30 rm -f config.cache config.cache-env
31 mv config.cache-env.tmp config.cache-env
32else
33 rm -f config.cache-env.tmp
34fi
35
36if [ -z "$NOCONFIGURE" ]; then
37 ./configure -C "$@"
38fi
diff --git a/libraries/eet/compile b/libraries/eet/compile
new file mode 100755
index 0000000..c0096a7
--- /dev/null
+++ b/libraries/eet/compile
@@ -0,0 +1,143 @@
1#! /bin/sh
2# Wrapper for compilers which do not understand `-c -o'.
3
4scriptversion=2009-10-06.20; # UTC
5
6# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
7# Foundation, Inc.
8# Written by Tom Tromey <tromey@cygnus.com>.
9#
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2, or (at your option)
13# any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23# As a special exception to the GNU General Public License, if you
24# distribute this file as part of a program that contains a
25# configuration script generated by Autoconf, you may include it under
26# the same distribution terms that you use for the rest of that program.
27
28# This file is maintained in Automake, please report
29# bugs to <bug-automake@gnu.org> or send patches to
30# <automake-patches@gnu.org>.
31
32case $1 in
33 '')
34 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
35 exit 1;
36 ;;
37 -h | --h*)
38 cat <<\EOF
39Usage: compile [--help] [--version] PROGRAM [ARGS]
40
41Wrapper for compilers which do not understand `-c -o'.
42Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
43arguments, and rename the output as expected.
44
45If you are trying to build a whole package this is not the
46right script to run: please start by reading the file `INSTALL'.
47
48Report bugs to <bug-automake@gnu.org>.
49EOF
50 exit $?
51 ;;
52 -v | --v*)
53 echo "compile $scriptversion"
54 exit $?
55 ;;
56esac
57
58ofile=
59cfile=
60eat=
61
62for arg
63do
64 if test -n "$eat"; then
65 eat=
66 else
67 case $1 in
68 -o)
69 # configure might choose to run compile as `compile cc -o foo foo.c'.
70 # So we strip `-o arg' only if arg is an object.
71 eat=1
72 case $2 in
73 *.o | *.obj)
74 ofile=$2
75 ;;
76 *)
77 set x "$@" -o "$2"
78 shift
79 ;;
80 esac
81 ;;
82 *.c)
83 cfile=$1
84 set x "$@" "$1"
85 shift
86 ;;
87 *)
88 set x "$@" "$1"
89 shift
90 ;;
91 esac
92 fi
93 shift
94done
95
96if test -z "$ofile" || test -z "$cfile"; then
97 # If no `-o' option was seen then we might have been invoked from a
98 # pattern rule where we don't need one. That is ok -- this is a
99 # normal compilation that the losing compiler can handle. If no
100 # `.c' file was seen then we are probably linking. That is also
101 # ok.
102 exec "$@"
103fi
104
105# Name of file we expect compiler to create.
106cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
107
108# Create the lock directory.
109# Note: use `[/\\:.-]' here to ensure that we don't use the same name
110# that we are using for the .o file. Also, base the name on the expected
111# object file name, since that is what matters with a parallel build.
112lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
113while true; do
114 if mkdir "$lockdir" >/dev/null 2>&1; then
115 break
116 fi
117 sleep 1
118done
119# FIXME: race condition here if user kills between mkdir and trap.
120trap "rmdir '$lockdir'; exit 1" 1 2 15
121
122# Run the compile.
123"$@"
124ret=$?
125
126if test -f "$cofile"; then
127 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
128elif test -f "${cofile}bj"; then
129 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
130fi
131
132rmdir "$lockdir"
133exit $ret
134
135# Local Variables:
136# mode: shell-script
137# sh-indentation: 2
138# eval: (add-hook 'write-file-hooks 'time-stamp)
139# time-stamp-start: "scriptversion="
140# time-stamp-format: "%:y-%02m-%02d.%02H"
141# time-stamp-time-zone: "UTC"
142# time-stamp-end: "; # UTC"
143# End:
diff --git a/libraries/eet/config.guess b/libraries/eet/config.guess
new file mode 100755
index 0000000..c2246a4
--- /dev/null
+++ b/libraries/eet/config.guess
@@ -0,0 +1,1502 @@
1#! /bin/sh
2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc.
6
7timestamp='2009-12-30'
8
9# This file is free software; you can redistribute it and/or modify it
10# 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# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22# 02110-1301, USA.
23#
24# As a special exception to the GNU General Public License, if you
25# distribute this file as part of a program that contains a
26# configuration script generated by Autoconf, you may include it under
27# the same distribution terms that you use for the rest of that program.
28
29
30# Originally written by Per Bothner. Please send patches (context
31# diff format) to <config-patches@gnu.org> and include a ChangeLog
32# entry.
33#
34# This script attempts to guess a canonical system name similar to
35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1.
37#
38# You can get the latest version of this script from:
39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40
41me=`echo "$0" | sed -e 's,.*/,,'`
42
43usage="\
44Usage: $0 [OPTION]
45
46Output the configuration name of the system \`$me' is run on.
47
48Operation modes:
49 -h, --help print this help, then exit
50 -t, --time-stamp print date of last modification, then exit
51 -v, --version print version number, then exit
52
53Report bugs and patches to <config-patches@gnu.org>."
54
55version="\
56GNU config.guess ($timestamp)
57
58Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61Software Foundation, Inc.
62
63This is free software; see the source for copying conditions. There is NO
64warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65
66help="
67Try \`$me --help' for more information."
68
69# Parse command line
70while test $# -gt 0 ; do
71 case $1 in
72 --time-stamp | --time* | -t )
73 echo "$timestamp" ; exit ;;
74 --version | -v )
75 echo "$version" ; exit ;;
76 --help | --h* | -h )
77 echo "$usage"; exit ;;
78 -- ) # Stop option processing
79 shift; break ;;
80 - ) # Use stdin as input.
81 break ;;
82 -* )
83 echo "$me: invalid option $1$help" >&2
84 exit 1 ;;
85 * )
86 break ;;
87 esac
88done
89
90if test $# != 0; then
91 echo "$me: too many arguments$help" >&2
92 exit 1
93fi
94
95trap 'exit 1' 1 2 15
96
97# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
98# compiler to aid in system detection is discouraged as it requires
99# temporary files to be created and, as you can see below, it is a
100# headache to deal with in a portable fashion.
101
102# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
103# use `HOST_CC' if defined, but it is deprecated.
104
105# Portable tmp directory creation inspired by the Autoconf team.
106
107set_cc_for_build='
108trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
109trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
110: ${TMPDIR=/tmp} ;
111 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
112 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
113 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
114 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
115dummy=$tmp/dummy ;
116tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
117case $CC_FOR_BUILD,$HOST_CC,$CC in
118 ,,) echo "int x;" > $dummy.c ;
119 for c in cc gcc c89 c99 ; do
120 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
121 CC_FOR_BUILD="$c"; break ;
122 fi ;
123 done ;
124 if test x"$CC_FOR_BUILD" = x ; then
125 CC_FOR_BUILD=no_compiler_found ;
126 fi
127 ;;
128 ,,*) CC_FOR_BUILD=$CC ;;
129 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
130esac ; set_cc_for_build= ;'
131
132# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
133# (ghazi@noc.rutgers.edu 1994-08-24)
134if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
135 PATH=$PATH:/.attbin ; export PATH
136fi
137
138UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
139UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
140UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
141UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142
143# Note: order is significant - the case branches are not exclusive.
144
145case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146 *:NetBSD:*:*)
147 # NetBSD (nbsd) targets should (where applicable) match one or
148 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
149 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
150 # switched to ELF, *-*-netbsd* would select the old
151 # object file format. This provides both forward
152 # compatibility and a consistent mechanism for selecting the
153 # object file format.
154 #
155 # Note: NetBSD doesn't particularly care about the vendor
156 # portion of the name. We always set it to "unknown".
157 sysctl="sysctl -n hw.machine_arch"
158 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
159 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
160 case "${UNAME_MACHINE_ARCH}" in
161 armeb) machine=armeb-unknown ;;
162 arm*) machine=arm-unknown ;;
163 sh3el) machine=shl-unknown ;;
164 sh3eb) machine=sh-unknown ;;
165 sh5el) machine=sh5le-unknown ;;
166 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
167 esac
168 # The Operating System including object format, if it has switched
169 # to ELF recently, or will in the future.
170 case "${UNAME_MACHINE_ARCH}" in
171 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
172 eval $set_cc_for_build
173 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
174 | grep -q __ELF__
175 then
176 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
177 # Return netbsd for either. FIX?
178 os=netbsd
179 else
180 os=netbsdelf
181 fi
182 ;;
183 *)
184 os=netbsd
185 ;;
186 esac
187 # The OS release
188 # Debian GNU/NetBSD machines have a different userland, and
189 # thus, need a distinct triplet. However, they do not need
190 # kernel version information, so it can be replaced with a
191 # suitable tag, in the style of linux-gnu.
192 case "${UNAME_VERSION}" in
193 Debian*)
194 release='-gnu'
195 ;;
196 *)
197 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
198 ;;
199 esac
200 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
201 # contains redundant information, the shorter form:
202 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203 echo "${machine}-${os}${release}"
204 exit ;;
205 *:OpenBSD:*:*)
206 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
208 exit ;;
209 *:ekkoBSD:*:*)
210 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
211 exit ;;
212 *:SolidBSD:*:*)
213 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
214 exit ;;
215 macppc:MirBSD:*:*)
216 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
217 exit ;;
218 *:MirBSD:*:*)
219 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
220 exit ;;
221 alpha:OSF1:*:*)
222 case $UNAME_RELEASE in
223 *4.0)
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
225 ;;
226 *5.*)
227 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
228 ;;
229 esac
230 # According to Compaq, /usr/sbin/psrinfo has been available on
231 # OSF/1 and Tru64 systems produced since 1995. I hope that
232 # covers most systems running today. This code pipes the CPU
233 # types through head -n 1, so we only detect the type of CPU 0.
234 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
235 case "$ALPHA_CPU_TYPE" in
236 "EV4 (21064)")
237 UNAME_MACHINE="alpha" ;;
238 "EV4.5 (21064)")
239 UNAME_MACHINE="alpha" ;;
240 "LCA4 (21066/21068)")
241 UNAME_MACHINE="alpha" ;;
242 "EV5 (21164)")
243 UNAME_MACHINE="alphaev5" ;;
244 "EV5.6 (21164A)")
245 UNAME_MACHINE="alphaev56" ;;
246 "EV5.6 (21164PC)")
247 UNAME_MACHINE="alphapca56" ;;
248 "EV5.7 (21164PC)")
249 UNAME_MACHINE="alphapca57" ;;
250 "EV6 (21264)")
251 UNAME_MACHINE="alphaev6" ;;
252 "EV6.7 (21264A)")
253 UNAME_MACHINE="alphaev67" ;;
254 "EV6.8CB (21264C)")
255 UNAME_MACHINE="alphaev68" ;;
256 "EV6.8AL (21264B)")
257 UNAME_MACHINE="alphaev68" ;;
258 "EV6.8CX (21264D)")
259 UNAME_MACHINE="alphaev68" ;;
260 "EV6.9A (21264/EV69A)")
261 UNAME_MACHINE="alphaev69" ;;
262 "EV7 (21364)")
263 UNAME_MACHINE="alphaev7" ;;
264 "EV7.9 (21364A)")
265 UNAME_MACHINE="alphaev79" ;;
266 esac
267 # A Pn.n version is a patched version.
268 # A Vn.n version is a released version.
269 # A Tn.n version is a released field test version.
270 # A Xn.n version is an unreleased experimental baselevel.
271 # 1.2 uses "1.2" for uname -r.
272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273 exit ;;
274 Alpha\ *:Windows_NT*:*)
275 # How do we know it's Interix rather than the generic POSIX subsystem?
276 # Should we change UNAME_MACHINE based on the output of uname instead
277 # of the specific Alpha model?
278 echo alpha-pc-interix
279 exit ;;
280 21064:Windows_NT:50:3)
281 echo alpha-dec-winnt3.5
282 exit ;;
283 Amiga*:UNIX_System_V:4.0:*)
284 echo m68k-unknown-sysv4
285 exit ;;
286 *:[Aa]miga[Oo][Ss]:*:*)
287 echo ${UNAME_MACHINE}-unknown-amigaos
288 exit ;;
289 *:[Mm]orph[Oo][Ss]:*:*)
290 echo ${UNAME_MACHINE}-unknown-morphos
291 exit ;;
292 *:OS/390:*:*)
293 echo i370-ibm-openedition
294 exit ;;
295 *:z/VM:*:*)
296 echo s390-ibm-zvmoe
297 exit ;;
298 *:OS400:*:*)
299 echo powerpc-ibm-os400
300 exit ;;
301 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302 echo arm-acorn-riscix${UNAME_RELEASE}
303 exit ;;
304 arm:riscos:*:*|arm:RISCOS:*:*)
305 echo arm-unknown-riscos
306 exit ;;
307 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
308 echo hppa1.1-hitachi-hiuxmpp
309 exit ;;
310 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
311 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
312 if test "`(/bin/universe) 2>/dev/null`" = att ; then
313 echo pyramid-pyramid-sysv3
314 else
315 echo pyramid-pyramid-bsd
316 fi
317 exit ;;
318 NILE*:*:*:dcosx)
319 echo pyramid-pyramid-svr4
320 exit ;;
321 DRS?6000:unix:4.0:6*)
322 echo sparc-icl-nx6
323 exit ;;
324 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
325 case `/usr/bin/uname -p` in
326 sparc) echo sparc-icl-nx7; exit ;;
327 esac ;;
328 s390x:SunOS:*:*)
329 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 exit ;;
331 sun4H:SunOS:5.*:*)
332 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
333 exit ;;
334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
341 eval $set_cc_for_build
342 SUN_ARCH="i386"
343 # If there is a compiler, see if it is configured for 64-bit objects.
344 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
345 # This test works for both compilers.
346 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
347 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
348 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
349 grep IS_64BIT_ARCH >/dev/null
350 then
351 SUN_ARCH="x86_64"
352 fi
353 fi
354 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355 exit ;;
356 sun4*:SunOS:6*:*)
357 # According to config.sub, this is the proper way to canonicalize
358 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
359 # it's likely to be more like Solaris than SunOS4.
360 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
361 exit ;;
362 sun4*:SunOS:*:*)
363 case "`/usr/bin/arch -k`" in
364 Series*|S4*)
365 UNAME_RELEASE=`uname -v`
366 ;;
367 esac
368 # Japanese Language versions have a version number like `4.1.3-JL'.
369 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
370 exit ;;
371 sun3*:SunOS:*:*)
372 echo m68k-sun-sunos${UNAME_RELEASE}
373 exit ;;
374 sun*:*:4.2BSD:*)
375 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
376 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
377 case "`/bin/arch`" in
378 sun3)
379 echo m68k-sun-sunos${UNAME_RELEASE}
380 ;;
381 sun4)
382 echo sparc-sun-sunos${UNAME_RELEASE}
383 ;;
384 esac
385 exit ;;
386 aushp:SunOS:*:*)
387 echo sparc-auspex-sunos${UNAME_RELEASE}
388 exit ;;
389 # The situation for MiNT is a little confusing. The machine name
390 # can be virtually everything (everything which is not
391 # "atarist" or "atariste" at least should have a processor
392 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
393 # to the lowercase version "mint" (or "freemint"). Finally
394 # the system name "TOS" denotes a system which is actually not
395 # MiNT. But MiNT is downward compatible to TOS, so this should
396 # be no problem.
397 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398 echo m68k-atari-mint${UNAME_RELEASE}
399 exit ;;
400 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401 echo m68k-atari-mint${UNAME_RELEASE}
402 exit ;;
403 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404 echo m68k-atari-mint${UNAME_RELEASE}
405 exit ;;
406 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407 echo m68k-milan-mint${UNAME_RELEASE}
408 exit ;;
409 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410 echo m68k-hades-mint${UNAME_RELEASE}
411 exit ;;
412 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413 echo m68k-unknown-mint${UNAME_RELEASE}
414 exit ;;
415 m68k:machten:*:*)
416 echo m68k-apple-machten${UNAME_RELEASE}
417 exit ;;
418 powerpc:machten:*:*)
419 echo powerpc-apple-machten${UNAME_RELEASE}
420 exit ;;
421 RISC*:Mach:*:*)
422 echo mips-dec-mach_bsd4.3
423 exit ;;
424 RISC*:ULTRIX:*:*)
425 echo mips-dec-ultrix${UNAME_RELEASE}
426 exit ;;
427 VAX*:ULTRIX*:*:*)
428 echo vax-dec-ultrix${UNAME_RELEASE}
429 exit ;;
430 2020:CLIX:*:* | 2430:CLIX:*:*)
431 echo clipper-intergraph-clix${UNAME_RELEASE}
432 exit ;;
433 mips:*:*:UMIPS | mips:*:*:RISCos)
434 eval $set_cc_for_build
435 sed 's/^ //' << EOF >$dummy.c
436#ifdef __cplusplus
437#include <stdio.h> /* for printf() prototype */
438 int main (int argc, char *argv[]) {
439#else
440 int main (argc, argv) int argc; char *argv[]; {
441#endif
442 #if defined (host_mips) && defined (MIPSEB)
443 #if defined (SYSTYPE_SYSV)
444 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
445 #endif
446 #if defined (SYSTYPE_SVR4)
447 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
448 #endif
449 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
450 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
451 #endif
452 #endif
453 exit (-1);
454 }
455EOF
456 $CC_FOR_BUILD -o $dummy $dummy.c &&
457 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
458 SYSTEM_NAME=`$dummy $dummyarg` &&
459 { echo "$SYSTEM_NAME"; exit; }
460 echo mips-mips-riscos${UNAME_RELEASE}
461 exit ;;
462 Motorola:PowerMAX_OS:*:*)
463 echo powerpc-motorola-powermax
464 exit ;;
465 Motorola:*:4.3:PL8-*)
466 echo powerpc-harris-powermax
467 exit ;;
468 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
469 echo powerpc-harris-powermax
470 exit ;;
471 Night_Hawk:Power_UNIX:*:*)
472 echo powerpc-harris-powerunix
473 exit ;;
474 m88k:CX/UX:7*:*)
475 echo m88k-harris-cxux7
476 exit ;;
477 m88k:*:4*:R4*)
478 echo m88k-motorola-sysv4
479 exit ;;
480 m88k:*:3*:R3*)
481 echo m88k-motorola-sysv3
482 exit ;;
483 AViiON:dgux:*:*)
484 # DG/UX returns AViiON for all architectures
485 UNAME_PROCESSOR=`/usr/bin/uname -p`
486 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487 then
488 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489 [ ${TARGET_BINARY_INTERFACE}x = x ]
490 then
491 echo m88k-dg-dgux${UNAME_RELEASE}
492 else
493 echo m88k-dg-dguxbcs${UNAME_RELEASE}
494 fi
495 else
496 echo i586-dg-dgux${UNAME_RELEASE}
497 fi
498 exit ;;
499 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500 echo m88k-dolphin-sysv3
501 exit ;;
502 M88*:*:R3*:*)
503 # Delta 88k system running SVR3
504 echo m88k-motorola-sysv3
505 exit ;;
506 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
507 echo m88k-tektronix-sysv3
508 exit ;;
509 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
510 echo m68k-tektronix-bsd
511 exit ;;
512 *:IRIX*:*:*)
513 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
514 exit ;;
515 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
516 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
517 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
518 i*86:AIX:*:*)
519 echo i386-ibm-aix
520 exit ;;
521 ia64:AIX:*:*)
522 if [ -x /usr/bin/oslevel ] ; then
523 IBM_REV=`/usr/bin/oslevel`
524 else
525 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
526 fi
527 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
528 exit ;;
529 *:AIX:2:3)
530 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
531 eval $set_cc_for_build
532 sed 's/^ //' << EOF >$dummy.c
533 #include <sys/systemcfg.h>
534
535 main()
536 {
537 if (!__power_pc())
538 exit(1);
539 puts("powerpc-ibm-aix3.2.5");
540 exit(0);
541 }
542EOF
543 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
544 then
545 echo "$SYSTEM_NAME"
546 else
547 echo rs6000-ibm-aix3.2.5
548 fi
549 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
550 echo rs6000-ibm-aix3.2.4
551 else
552 echo rs6000-ibm-aix3.2
553 fi
554 exit ;;
555 *:AIX:*:[456])
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558 IBM_ARCH=rs6000
559 else
560 IBM_ARCH=powerpc
561 fi
562 if [ -x /usr/bin/oslevel ] ; then
563 IBM_REV=`/usr/bin/oslevel`
564 else
565 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
566 fi
567 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
568 exit ;;
569 *:AIX:*:*)
570 echo rs6000-ibm-aix
571 exit ;;
572 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
573 echo romp-ibm-bsd4.4
574 exit ;;
575 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
576 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
577 exit ;; # report: romp-ibm BSD 4.3
578 *:BOSX:*:*)
579 echo rs6000-bull-bosx
580 exit ;;
581 DPX/2?00:B.O.S.:*:*)
582 echo m68k-bull-sysv3
583 exit ;;
584 9000/[34]??:4.3bsd:1.*:*)
585 echo m68k-hp-bsd
586 exit ;;
587 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
588 echo m68k-hp-bsd4.4
589 exit ;;
590 9000/[34678]??:HP-UX:*:*)
591 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
592 case "${UNAME_MACHINE}" in
593 9000/31? ) HP_ARCH=m68000 ;;
594 9000/[34]?? ) HP_ARCH=m68k ;;
595 9000/[678][0-9][0-9])
596 if [ -x /usr/bin/getconf ]; then
597 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599 case "${sc_cpu_version}" in
600 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602 532) # CPU_PA_RISC2_0
603 case "${sc_kernel_bits}" in
604 32) HP_ARCH="hppa2.0n" ;;
605 64) HP_ARCH="hppa2.0w" ;;
606 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
607 esac ;;
608 esac
609 fi
610 if [ "${HP_ARCH}" = "" ]; then
611 eval $set_cc_for_build
612 sed 's/^ //' << EOF >$dummy.c
613
614 #define _HPUX_SOURCE
615 #include <stdlib.h>
616 #include <unistd.h>
617
618 int main ()
619 {
620 #if defined(_SC_KERNEL_BITS)
621 long bits = sysconf(_SC_KERNEL_BITS);
622 #endif
623 long cpu = sysconf (_SC_CPU_VERSION);
624
625 switch (cpu)
626 {
627 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629 case CPU_PA_RISC2_0:
630 #if defined(_SC_KERNEL_BITS)
631 switch (bits)
632 {
633 case 64: puts ("hppa2.0w"); break;
634 case 32: puts ("hppa2.0n"); break;
635 default: puts ("hppa2.0"); break;
636 } break;
637 #else /* !defined(_SC_KERNEL_BITS) */
638 puts ("hppa2.0"); break;
639 #endif
640 default: puts ("hppa1.0"); break;
641 }
642 exit (0);
643 }
644EOF
645 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646 test -z "$HP_ARCH" && HP_ARCH=hppa
647 fi ;;
648 esac
649 if [ ${HP_ARCH} = "hppa2.0w" ]
650 then
651 eval $set_cc_for_build
652
653 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
654 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
655 # generating 64-bit code. GNU and HP use different nomenclature:
656 #
657 # $ CC_FOR_BUILD=cc ./config.guess
658 # => hppa2.0w-hp-hpux11.23
659 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
660 # => hppa64-hp-hpux11.23
661
662 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
663 grep -q __LP64__
664 then
665 HP_ARCH="hppa2.0w"
666 else
667 HP_ARCH="hppa64"
668 fi
669 fi
670 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
671 exit ;;
672 ia64:HP-UX:*:*)
673 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
674 echo ia64-hp-hpux${HPUX_REV}
675 exit ;;
676 3050*:HI-UX:*:*)
677 eval $set_cc_for_build
678 sed 's/^ //' << EOF >$dummy.c
679 #include <unistd.h>
680 int
681 main ()
682 {
683 long cpu = sysconf (_SC_CPU_VERSION);
684 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
685 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
686 results, however. */
687 if (CPU_IS_PA_RISC (cpu))
688 {
689 switch (cpu)
690 {
691 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
692 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
693 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
694 default: puts ("hppa-hitachi-hiuxwe2"); break;
695 }
696 }
697 else if (CPU_IS_HP_MC68K (cpu))
698 puts ("m68k-hitachi-hiuxwe2");
699 else puts ("unknown-hitachi-hiuxwe2");
700 exit (0);
701 }
702EOF
703 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
704 { echo "$SYSTEM_NAME"; exit; }
705 echo unknown-hitachi-hiuxwe2
706 exit ;;
707 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
708 echo hppa1.1-hp-bsd
709 exit ;;
710 9000/8??:4.3bsd:*:*)
711 echo hppa1.0-hp-bsd
712 exit ;;
713 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
714 echo hppa1.0-hp-mpeix
715 exit ;;
716 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
717 echo hppa1.1-hp-osf
718 exit ;;
719 hp8??:OSF1:*:*)
720 echo hppa1.0-hp-osf
721 exit ;;
722 i*86:OSF1:*:*)
723 if [ -x /usr/sbin/sysversion ] ; then
724 echo ${UNAME_MACHINE}-unknown-osf1mk
725 else
726 echo ${UNAME_MACHINE}-unknown-osf1
727 fi
728 exit ;;
729 parisc*:Lites*:*:*)
730 echo hppa1.1-hp-lites
731 exit ;;
732 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733 echo c1-convex-bsd
734 exit ;;
735 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736 if getsysinfo -f scalar_acc
737 then echo c32-convex-bsd
738 else echo c2-convex-bsd
739 fi
740 exit ;;
741 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742 echo c34-convex-bsd
743 exit ;;
744 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745 echo c38-convex-bsd
746 exit ;;
747 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748 echo c4-convex-bsd
749 exit ;;
750 CRAY*Y-MP:*:*:*)
751 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752 exit ;;
753 CRAY*[A-Z]90:*:*:*)
754 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
755 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
756 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
757 -e 's/\.[^.]*$/.X/'
758 exit ;;
759 CRAY*TS:*:*:*)
760 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
761 exit ;;
762 CRAY*T3E:*:*:*)
763 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
764 exit ;;
765 CRAY*SV1:*:*:*)
766 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
767 exit ;;
768 *:UNICOS/mp:*:*)
769 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770 exit ;;
771 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776 exit ;;
777 5000:UNIX_System_V:4.*:*)
778 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781 exit ;;
782 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784 exit ;;
785 sparc*:BSD/OS:*:*)
786 echo sparc-unknown-bsdi${UNAME_RELEASE}
787 exit ;;
788 *:BSD/OS:*:*)
789 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
790 exit ;;
791 *:FreeBSD:*:*)
792 case ${UNAME_MACHINE} in
793 pc98)
794 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795 amd64)
796 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797 *)
798 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799 esac
800 exit ;;
801 i*:CYGWIN*:*)
802 echo ${UNAME_MACHINE}-pc-cygwin
803 exit ;;
804 *:MINGW*:*)
805 echo ${UNAME_MACHINE}-pc-mingw32
806 exit ;;
807 i*:windows32*:*)
808 # uname -m includes "-pc" on this system.
809 echo ${UNAME_MACHINE}-mingw32
810 exit ;;
811 i*:PW*:*)
812 echo ${UNAME_MACHINE}-pc-pw32
813 exit ;;
814 *:Interix*:*)
815 case ${UNAME_MACHINE} in
816 x86)
817 echo i586-pc-interix${UNAME_RELEASE}
818 exit ;;
819 authenticamd | genuineintel | EM64T)
820 echo x86_64-unknown-interix${UNAME_RELEASE}
821 exit ;;
822 IA64)
823 echo ia64-unknown-interix${UNAME_RELEASE}
824 exit ;;
825 esac ;;
826 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
827 echo i${UNAME_MACHINE}-pc-mks
828 exit ;;
829 8664:Windows_NT:*)
830 echo x86_64-pc-mks
831 exit ;;
832 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
833 # How do we know it's Interix rather than the generic POSIX subsystem?
834 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
835 # UNAME_MACHINE based on the output of uname instead of i386?
836 echo i586-pc-interix
837 exit ;;
838 i*:UWIN*:*)
839 echo ${UNAME_MACHINE}-pc-uwin
840 exit ;;
841 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
842 echo x86_64-unknown-cygwin
843 exit ;;
844 p*:CYGWIN*:*)
845 echo powerpcle-unknown-cygwin
846 exit ;;
847 prep*:SunOS:5.*:*)
848 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
849 exit ;;
850 *:GNU:*:*)
851 # the GNU system
852 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
853 exit ;;
854 *:GNU/*:*:*)
855 # other systems with GNU libc and userland
856 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
857 exit ;;
858 i*86:Minix:*:*)
859 echo ${UNAME_MACHINE}-pc-minix
860 exit ;;
861 alpha:Linux:*:*)
862 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863 EV5) UNAME_MACHINE=alphaev5 ;;
864 EV56) UNAME_MACHINE=alphaev56 ;;
865 PCA56) UNAME_MACHINE=alphapca56 ;;
866 PCA57) UNAME_MACHINE=alphapca56 ;;
867 EV6) UNAME_MACHINE=alphaev6 ;;
868 EV67) UNAME_MACHINE=alphaev67 ;;
869 EV68*) UNAME_MACHINE=alphaev68 ;;
870 esac
871 objdump --private-headers /bin/sh | grep -q ld.so.1
872 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
874 exit ;;
875 arm*:Linux:*:*)
876 eval $set_cc_for_build
877 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
878 | grep -q __ARM_EABI__
879 then
880 echo ${UNAME_MACHINE}-unknown-linux-gnu
881 else
882 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
883 fi
884 exit ;;
885 avr32*:Linux:*:*)
886 echo ${UNAME_MACHINE}-unknown-linux-gnu
887 exit ;;
888 cris:Linux:*:*)
889 echo cris-axis-linux-gnu
890 exit ;;
891 crisv32:Linux:*:*)
892 echo crisv32-axis-linux-gnu
893 exit ;;
894 frv:Linux:*:*)
895 echo frv-unknown-linux-gnu
896 exit ;;
897 i*86:Linux:*:*)
898 LIBC=gnu
899 eval $set_cc_for_build
900 sed 's/^ //' << EOF >$dummy.c
901 #ifdef __dietlibc__
902 LIBC=dietlibc
903 #endif
904EOF
905 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
907 exit ;;
908 ia64:Linux:*:*)
909 echo ${UNAME_MACHINE}-unknown-linux-gnu
910 exit ;;
911 m32r*:Linux:*:*)
912 echo ${UNAME_MACHINE}-unknown-linux-gnu
913 exit ;;
914 m68*:Linux:*:*)
915 echo ${UNAME_MACHINE}-unknown-linux-gnu
916 exit ;;
917 mips:Linux:*:* | mips64:Linux:*:*)
918 eval $set_cc_for_build
919 sed 's/^ //' << EOF >$dummy.c
920 #undef CPU
921 #undef ${UNAME_MACHINE}
922 #undef ${UNAME_MACHINE}el
923 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
924 CPU=${UNAME_MACHINE}el
925 #else
926 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
927 CPU=${UNAME_MACHINE}
928 #else
929 CPU=
930 #endif
931 #endif
932EOF
933 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
934 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
935 ;;
936 or32:Linux:*:*)
937 echo or32-unknown-linux-gnu
938 exit ;;
939 padre:Linux:*:*)
940 echo sparc-unknown-linux-gnu
941 exit ;;
942 parisc64:Linux:*:* | hppa64:Linux:*:*)
943 echo hppa64-unknown-linux-gnu
944 exit ;;
945 parisc:Linux:*:* | hppa:Linux:*:*)
946 # Look for CPU level
947 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
948 PA7*) echo hppa1.1-unknown-linux-gnu ;;
949 PA8*) echo hppa2.0-unknown-linux-gnu ;;
950 *) echo hppa-unknown-linux-gnu ;;
951 esac
952 exit ;;
953 ppc64:Linux:*:*)
954 echo powerpc64-unknown-linux-gnu
955 exit ;;
956 ppc:Linux:*:*)
957 echo powerpc-unknown-linux-gnu
958 exit ;;
959 s390:Linux:*:* | s390x:Linux:*:*)
960 echo ${UNAME_MACHINE}-ibm-linux
961 exit ;;
962 sh64*:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-gnu
964 exit ;;
965 sh*:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-gnu
967 exit ;;
968 sparc:Linux:*:* | sparc64:Linux:*:*)
969 echo ${UNAME_MACHINE}-unknown-linux-gnu
970 exit ;;
971 vax:Linux:*:*)
972 echo ${UNAME_MACHINE}-dec-linux-gnu
973 exit ;;
974 x86_64:Linux:*:*)
975 echo x86_64-unknown-linux-gnu
976 exit ;;
977 xtensa*:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-gnu
979 exit ;;
980 i*86:DYNIX/ptx:4*:*)
981 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
982 # earlier versions are messed up and put the nodename in both
983 # sysname and nodename.
984 echo i386-sequent-sysv4
985 exit ;;
986 i*86:UNIX_SV:4.2MP:2.*)
987 # Unixware is an offshoot of SVR4, but it has its own version
988 # number series starting with 2...
989 # I am not positive that other SVR4 systems won't match this,
990 # I just have to hope. -- rms.
991 # Use sysv4.2uw... so that sysv4* matches it.
992 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
993 exit ;;
994 i*86:OS/2:*:*)
995 # If we were able to find `uname', then EMX Unix compatibility
996 # is probably installed.
997 echo ${UNAME_MACHINE}-pc-os2-emx
998 exit ;;
999 i*86:XTS-300:*:STOP)
1000 echo ${UNAME_MACHINE}-unknown-stop
1001 exit ;;
1002 i*86:atheos:*:*)
1003 echo ${UNAME_MACHINE}-unknown-atheos
1004 exit ;;
1005 i*86:syllable:*:*)
1006 echo ${UNAME_MACHINE}-pc-syllable
1007 exit ;;
1008 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1009 echo i386-unknown-lynxos${UNAME_RELEASE}
1010 exit ;;
1011 i*86:*DOS:*:*)
1012 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1013 exit ;;
1014 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1015 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1016 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1017 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1018 else
1019 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1020 fi
1021 exit ;;
1022 i*86:*:5:[678]*)
1023 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1024 case `/bin/uname -X | grep "^Machine"` in
1025 *486*) UNAME_MACHINE=i486 ;;
1026 *Pentium) UNAME_MACHINE=i586 ;;
1027 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1028 esac
1029 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1030 exit ;;
1031 i*86:*:3.2:*)
1032 if test -f /usr/options/cb.name; then
1033 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1034 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1035 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1036 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1037 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1038 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1039 && UNAME_MACHINE=i586
1040 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1041 && UNAME_MACHINE=i686
1042 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1043 && UNAME_MACHINE=i686
1044 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1045 else
1046 echo ${UNAME_MACHINE}-pc-sysv32
1047 fi
1048 exit ;;
1049 pc:*:*:*)
1050 # Left here for compatibility:
1051 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1052 # the processor, so we play safe by assuming i586.
1053 # Note: whatever this is, it MUST be the same as what config.sub
1054 # prints for the "djgpp" host, or else GDB configury will decide that
1055 # this is a cross-build.
1056 echo i586-pc-msdosdjgpp
1057 exit ;;
1058 Intel:Mach:3*:*)
1059 echo i386-pc-mach3
1060 exit ;;
1061 paragon:*:*:*)
1062 echo i860-intel-osf1
1063 exit ;;
1064 i860:*:4.*:*) # i860-SVR4
1065 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1066 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1067 else # Add other i860-SVR4 vendors below as they are discovered.
1068 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1069 fi
1070 exit ;;
1071 mini*:CTIX:SYS*5:*)
1072 # "miniframe"
1073 echo m68010-convergent-sysv
1074 exit ;;
1075 mc68k:UNIX:SYSTEM5:3.51m)
1076 echo m68k-convergent-sysv
1077 exit ;;
1078 M680?0:D-NIX:5.3:*)
1079 echo m68k-diab-dnix
1080 exit ;;
1081 M68*:*:R3V[5678]*:*)
1082 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1083 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1084 OS_REL=''
1085 test -r /etc/.relid \
1086 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1087 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1088 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1089 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1090 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1091 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1092 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1093 && { echo i486-ncr-sysv4; exit; } ;;
1094 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095 OS_REL='.3'
1096 test -r /etc/.relid \
1097 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1098 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1099 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1100 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1101 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1102 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1103 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1104 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1105 echo m68k-unknown-lynxos${UNAME_RELEASE}
1106 exit ;;
1107 mc68030:UNIX_System_V:4.*:*)
1108 echo m68k-atari-sysv4
1109 exit ;;
1110 TSUNAMI:LynxOS:2.*:*)
1111 echo sparc-unknown-lynxos${UNAME_RELEASE}
1112 exit ;;
1113 rs6000:LynxOS:2.*:*)
1114 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1115 exit ;;
1116 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1117 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1118 exit ;;
1119 SM[BE]S:UNIX_SV:*:*)
1120 echo mips-dde-sysv${UNAME_RELEASE}
1121 exit ;;
1122 RM*:ReliantUNIX-*:*:*)
1123 echo mips-sni-sysv4
1124 exit ;;
1125 RM*:SINIX-*:*:*)
1126 echo mips-sni-sysv4
1127 exit ;;
1128 *:SINIX-*:*:*)
1129 if uname -p 2>/dev/null >/dev/null ; then
1130 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1131 echo ${UNAME_MACHINE}-sni-sysv4
1132 else
1133 echo ns32k-sni-sysv
1134 fi
1135 exit ;;
1136 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1137 # says <Richard.M.Bartel@ccMail.Census.GOV>
1138 echo i586-unisys-sysv4
1139 exit ;;
1140 *:UNIX_System_V:4*:FTX*)
1141 # From Gerald Hewes <hewes@openmarket.com>.
1142 # How about differentiating between stratus architectures? -djm
1143 echo hppa1.1-stratus-sysv4
1144 exit ;;
1145 *:*:*:FTX*)
1146 # From seanf@swdc.stratus.com.
1147 echo i860-stratus-sysv4
1148 exit ;;
1149 i*86:VOS:*:*)
1150 # From Paul.Green@stratus.com.
1151 echo ${UNAME_MACHINE}-stratus-vos
1152 exit ;;
1153 *:VOS:*:*)
1154 # From Paul.Green@stratus.com.
1155 echo hppa1.1-stratus-vos
1156 exit ;;
1157 mc68*:A/UX:*:*)
1158 echo m68k-apple-aux${UNAME_RELEASE}
1159 exit ;;
1160 news*:NEWS-OS:6*:*)
1161 echo mips-sony-newsos6
1162 exit ;;
1163 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1164 if [ -d /usr/nec ]; then
1165 echo mips-nec-sysv${UNAME_RELEASE}
1166 else
1167 echo mips-unknown-sysv${UNAME_RELEASE}
1168 fi
1169 exit ;;
1170 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1171 echo powerpc-be-beos
1172 exit ;;
1173 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1174 echo powerpc-apple-beos
1175 exit ;;
1176 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1177 echo i586-pc-beos
1178 exit ;;
1179 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1180 echo i586-pc-haiku
1181 exit ;;
1182 SX-4:SUPER-UX:*:*)
1183 echo sx4-nec-superux${UNAME_RELEASE}
1184 exit ;;
1185 SX-5:SUPER-UX:*:*)
1186 echo sx5-nec-superux${UNAME_RELEASE}
1187 exit ;;
1188 SX-6:SUPER-UX:*:*)
1189 echo sx6-nec-superux${UNAME_RELEASE}
1190 exit ;;
1191 SX-7:SUPER-UX:*:*)
1192 echo sx7-nec-superux${UNAME_RELEASE}
1193 exit ;;
1194 SX-8:SUPER-UX:*:*)
1195 echo sx8-nec-superux${UNAME_RELEASE}
1196 exit ;;
1197 SX-8R:SUPER-UX:*:*)
1198 echo sx8r-nec-superux${UNAME_RELEASE}
1199 exit ;;
1200 Power*:Rhapsody:*:*)
1201 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1202 exit ;;
1203 *:Rhapsody:*:*)
1204 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1205 exit ;;
1206 *:Darwin:*:*)
1207 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1208 case $UNAME_PROCESSOR in
1209 i386)
1210 eval $set_cc_for_build
1211 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1212 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1213 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1214 grep IS_64BIT_ARCH >/dev/null
1215 then
1216 UNAME_PROCESSOR="x86_64"
1217 fi
1218 fi ;;
1219 unknown) UNAME_PROCESSOR=powerpc ;;
1220 esac
1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1222 exit ;;
1223 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1224 UNAME_PROCESSOR=`uname -p`
1225 if test "$UNAME_PROCESSOR" = "x86"; then
1226 UNAME_PROCESSOR=i386
1227 UNAME_MACHINE=pc
1228 fi
1229 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1230 exit ;;
1231 *:QNX:*:4*)
1232 echo i386-pc-qnx
1233 exit ;;
1234 NSE-?:NONSTOP_KERNEL:*:*)
1235 echo nse-tandem-nsk${UNAME_RELEASE}
1236 exit ;;
1237 NSR-?:NONSTOP_KERNEL:*:*)
1238 echo nsr-tandem-nsk${UNAME_RELEASE}
1239 exit ;;
1240 *:NonStop-UX:*:*)
1241 echo mips-compaq-nonstopux
1242 exit ;;
1243 BS2000:POSIX*:*:*)
1244 echo bs2000-siemens-sysv
1245 exit ;;
1246 DS/*:UNIX_System_V:*:*)
1247 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1248 exit ;;
1249 *:Plan9:*:*)
1250 # "uname -m" is not consistent, so use $cputype instead. 386
1251 # is converted to i386 for consistency with other x86
1252 # operating systems.
1253 if test "$cputype" = "386"; then
1254 UNAME_MACHINE=i386
1255 else
1256 UNAME_MACHINE="$cputype"
1257 fi
1258 echo ${UNAME_MACHINE}-unknown-plan9
1259 exit ;;
1260 *:TOPS-10:*:*)
1261 echo pdp10-unknown-tops10
1262 exit ;;
1263 *:TENEX:*:*)
1264 echo pdp10-unknown-tenex
1265 exit ;;
1266 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1267 echo pdp10-dec-tops20
1268 exit ;;
1269 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1270 echo pdp10-xkl-tops20
1271 exit ;;
1272 *:TOPS-20:*:*)
1273 echo pdp10-unknown-tops20
1274 exit ;;
1275 *:ITS:*:*)
1276 echo pdp10-unknown-its
1277 exit ;;
1278 SEI:*:*:SEIUX)
1279 echo mips-sei-seiux${UNAME_RELEASE}
1280 exit ;;
1281 *:DragonFly:*:*)
1282 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1283 exit ;;
1284 *:*VMS:*:*)
1285 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1286 case "${UNAME_MACHINE}" in
1287 A*) echo alpha-dec-vms ; exit ;;
1288 I*) echo ia64-dec-vms ; exit ;;
1289 V*) echo vax-dec-vms ; exit ;;
1290 esac ;;
1291 *:XENIX:*:SysV)
1292 echo i386-pc-xenix
1293 exit ;;
1294 i*86:skyos:*:*)
1295 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1296 exit ;;
1297 i*86:rdos:*:*)
1298 echo ${UNAME_MACHINE}-pc-rdos
1299 exit ;;
1300 i*86:AROS:*:*)
1301 echo ${UNAME_MACHINE}-pc-aros
1302 exit ;;
1303esac
1304
1305#echo '(No uname command or uname output not recognized.)' 1>&2
1306#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1307
1308eval $set_cc_for_build
1309cat >$dummy.c <<EOF
1310#ifdef _SEQUENT_
1311# include <sys/types.h>
1312# include <sys/utsname.h>
1313#endif
1314main ()
1315{
1316#if defined (sony)
1317#if defined (MIPSEB)
1318 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1319 I don't know.... */
1320 printf ("mips-sony-bsd\n"); exit (0);
1321#else
1322#include <sys/param.h>
1323 printf ("m68k-sony-newsos%s\n",
1324#ifdef NEWSOS4
1325 "4"
1326#else
1327 ""
1328#endif
1329 ); exit (0);
1330#endif
1331#endif
1332
1333#if defined (__arm) && defined (__acorn) && defined (__unix)
1334 printf ("arm-acorn-riscix\n"); exit (0);
1335#endif
1336
1337#if defined (hp300) && !defined (hpux)
1338 printf ("m68k-hp-bsd\n"); exit (0);
1339#endif
1340
1341#if defined (NeXT)
1342#if !defined (__ARCHITECTURE__)
1343#define __ARCHITECTURE__ "m68k"
1344#endif
1345 int version;
1346 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1347 if (version < 4)
1348 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1349 else
1350 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1351 exit (0);
1352#endif
1353
1354#if defined (MULTIMAX) || defined (n16)
1355#if defined (UMAXV)
1356 printf ("ns32k-encore-sysv\n"); exit (0);
1357#else
1358#if defined (CMU)
1359 printf ("ns32k-encore-mach\n"); exit (0);
1360#else
1361 printf ("ns32k-encore-bsd\n"); exit (0);
1362#endif
1363#endif
1364#endif
1365
1366#if defined (__386BSD__)
1367 printf ("i386-pc-bsd\n"); exit (0);
1368#endif
1369
1370#if defined (sequent)
1371#if defined (i386)
1372 printf ("i386-sequent-dynix\n"); exit (0);
1373#endif
1374#if defined (ns32000)
1375 printf ("ns32k-sequent-dynix\n"); exit (0);
1376#endif
1377#endif
1378
1379#if defined (_SEQUENT_)
1380 struct utsname un;
1381
1382 uname(&un);
1383
1384 if (strncmp(un.version, "V2", 2) == 0) {
1385 printf ("i386-sequent-ptx2\n"); exit (0);
1386 }
1387 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1388 printf ("i386-sequent-ptx1\n"); exit (0);
1389 }
1390 printf ("i386-sequent-ptx\n"); exit (0);
1391
1392#endif
1393
1394#if defined (vax)
1395# if !defined (ultrix)
1396# include <sys/param.h>
1397# if defined (BSD)
1398# if BSD == 43
1399 printf ("vax-dec-bsd4.3\n"); exit (0);
1400# else
1401# if BSD == 199006
1402 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1403# else
1404 printf ("vax-dec-bsd\n"); exit (0);
1405# endif
1406# endif
1407# else
1408 printf ("vax-dec-bsd\n"); exit (0);
1409# endif
1410# else
1411 printf ("vax-dec-ultrix\n"); exit (0);
1412# endif
1413#endif
1414
1415#if defined (alliant) && defined (i860)
1416 printf ("i860-alliant-bsd\n"); exit (0);
1417#endif
1418
1419 exit (1);
1420}
1421EOF
1422
1423$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1424 { echo "$SYSTEM_NAME"; exit; }
1425
1426# Apollos put the system type in the environment.
1427
1428test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1429
1430# Convex versions that predate uname can use getsysinfo(1)
1431
1432if [ -x /usr/convex/getsysinfo ]
1433then
1434 case `getsysinfo -f cpu_type` in
1435 c1*)
1436 echo c1-convex-bsd
1437 exit ;;
1438 c2*)
1439 if getsysinfo -f scalar_acc
1440 then echo c32-convex-bsd
1441 else echo c2-convex-bsd
1442 fi
1443 exit ;;
1444 c34*)
1445 echo c34-convex-bsd
1446 exit ;;
1447 c38*)
1448 echo c38-convex-bsd
1449 exit ;;
1450 c4*)
1451 echo c4-convex-bsd
1452 exit ;;
1453 esac
1454fi
1455
1456cat >&2 <<EOF
1457$0: unable to guess system type
1458
1459This script, last modified $timestamp, has failed to recognize
1460the operating system you are using. It is advised that you
1461download the most up to date version of the config scripts from
1462
1463 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1464and
1465 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1466
1467If the version you run ($0) is already up to date, please
1468send the following data and any information you think might be
1469pertinent to <config-patches@gnu.org> in order to provide the needed
1470information to handle your system.
1471
1472config.guess timestamp = $timestamp
1473
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1481
1482hostinfo = `(hostinfo) 2>/dev/null`
1483/bin/universe = `(/bin/universe) 2>/dev/null`
1484/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1485/bin/arch = `(/bin/arch) 2>/dev/null`
1486/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1488
1489UNAME_MACHINE = ${UNAME_MACHINE}
1490UNAME_RELEASE = ${UNAME_RELEASE}
1491UNAME_SYSTEM = ${UNAME_SYSTEM}
1492UNAME_VERSION = ${UNAME_VERSION}
1493EOF
1494
1495exit 1
1496
1497# Local variables:
1498# eval: (add-hook 'write-file-hooks 'time-stamp)
1499# time-stamp-start: "timestamp='"
1500# time-stamp-format: "%:y-%02m-%02d"
1501# time-stamp-end: "'"
1502# End:
diff --git a/libraries/eet/config.h.in b/libraries/eet/config.h.in
new file mode 100644
index 0000000..02ec411
--- /dev/null
+++ b/libraries/eet/config.h.in
@@ -0,0 +1,163 @@
1/* config.h.in. Generated from configure.ac by autoheader. */
2
3
4#ifndef EFL_CONFIG_H__
5#define EFL_CONFIG_H__
6
7
8/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
9 systems. This function is required for `alloca.c' support on those systems.
10 */
11#undef CRAY_STACKSEG_END
12
13/* Define to 1 if using `alloca.c'. */
14#undef C_ALLOCA
15
16/* support old eet file format */
17#undef EET_OLD_EET_FILE_FORMAT
18
19/* use gnutls_x509_crt_verify_hash */
20#undef EET_USE_NEW_GNUTLS_API
21
22/* Define to 1 if you have `alloca', as a function or macro. */
23#undef HAVE_ALLOCA
24
25/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
26 */
27#undef HAVE_ALLOCA_H
28
29/* Have cipher support built in eet */
30#undef HAVE_CIPHER
31
32/* Define to 1 if you have the <dlfcn.h> header file. */
33#undef HAVE_DLFCN_H
34
35/* Set to 1 if Evil library is installed */
36#undef HAVE_EVIL
37
38/* Define to 1 if you have the `fmemopen' function. */
39#undef HAVE_FMEMOPEN
40
41/* Have Gnutls support */
42#undef HAVE_GNUTLS
43
44/* Define to 1 if you have the <inttypes.h> header file. */
45#undef HAVE_INTTYPES_H
46
47/* Define to 1 if you have the <memory.h> header file. */
48#undef HAVE_MEMORY_H
49
50/* Define to 1 if you have the <netinet/in.h> header file. */
51#undef HAVE_NETINET_IN_H
52
53/* Have Openssl support */
54#undef HAVE_OPENSSL
55
56/* Define to 1 if you have the `open_memstream' function. */
57#undef HAVE_OPEN_MEMSTREAM
58
59/* Define to 1 if you have the `realpath' function. */
60#undef HAVE_REALPATH
61
62/* Have signature support for eet file */
63#undef HAVE_SIGNATURE
64
65/* Define to 1 if you have the <stdint.h> header file. */
66#undef HAVE_STDINT_H
67
68/* Define to 1 if you have the <stdlib.h> header file. */
69#undef HAVE_STDLIB_H
70
71/* Define to 1 if you have the <strings.h> header file. */
72#undef HAVE_STRINGS_H
73
74/* Define to 1 if you have the <string.h> header file. */
75#undef HAVE_STRING_H
76
77/* Define to 1 if you have the <sys/stat.h> header file. */
78#undef HAVE_SYS_STAT_H
79
80/* Define to 1 if you have the <sys/types.h> header file. */
81#undef HAVE_SYS_TYPES_H
82
83/* Define to 1 if you have the <unistd.h> header file. */
84#undef HAVE_UNISTD_H
85
86/* Define to 1 if your compiler has __attribute__ */
87#undef HAVE___ATTRIBUTE__
88
89/* Define to the sub-directory in which libtool stores uninstalled libraries.
90 */
91#undef LT_OBJDIR
92
93/* Define to 1 if your C compiler doesn't accept -c and -o together. */
94#undef NO_MINUS_C_MINUS_O
95
96/* Name of package */
97#undef PACKAGE
98
99/* Define to the address where bug reports for this package should be sent. */
100#undef PACKAGE_BUGREPORT
101
102/* Define to the full name of this package. */
103#undef PACKAGE_NAME
104
105/* Define to the full name and version of this package. */
106#undef PACKAGE_STRING
107
108/* Define to the one symbol short name of this package. */
109#undef PACKAGE_TARNAME
110
111/* Define to the home page for this package. */
112#undef PACKAGE_URL
113
114/* Define to the version of this package. */
115#undef PACKAGE_VERSION
116
117/* default value since PATH_MAX is not defined */
118#undef PATH_MAX
119
120/* If using the C implementation of alloca, define if you know the
121 direction of stack growth for your system; otherwise it will be
122 automatically deduced at runtime.
123 STACK_DIRECTION > 0 => grows toward higher addresses
124 STACK_DIRECTION < 0 => grows toward lower addresses
125 STACK_DIRECTION = 0 => direction of growth unknown */
126#undef STACK_DIRECTION
127
128/* Define to 1 if you have the ANSI C header files. */
129#undef STDC_HEADERS
130
131/* Version number of package */
132#undef VERSION
133
134/* Major version */
135#undef VMAJ
136
137/* Micro version */
138#undef VMIC
139
140/* Minor version */
141#undef VMIN
142
143/* Revison */
144#undef VREV
145
146/* Enable GNU extensions */
147#undef _GNU_SOURCE
148
149/* Macro declaring a function argument to be unused */
150#undef __UNUSED__
151
152/* Define to empty if `const' does not conform to ANSI C. */
153#undef const
154
155/* Define to `__inline__' or `__inline' if that's what the C compiler
156 calls it, or to nothing if 'inline' is not supported under any name. */
157#ifndef __cplusplus
158#undef inline
159#endif
160
161
162#endif /* EFL_CONFIG_H__ */
163
diff --git a/libraries/eet/config.sub b/libraries/eet/config.sub
new file mode 100755
index 0000000..c2d1257
--- /dev/null
+++ b/libraries/eet/config.sub
@@ -0,0 +1,1714 @@
1#! /bin/sh
2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc.
6
7timestamp='2010-01-22'
8
9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software
11# can handle that machine. It does not imply ALL GNU software can.
12#
13# This file is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, write to the Free Software
25# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26# 02110-1301, USA.
27#
28# As a special exception to the GNU General Public License, if you
29# distribute this file as part of a program that contains a
30# configuration script generated by Autoconf, you may include it under
31# the same distribution terms that you use for the rest of that program.
32
33
34# Please send patches to <config-patches@gnu.org>. Submit a context
35# diff and a properly formatted GNU ChangeLog entry.
36#
37# Configuration subroutine to validate and canonicalize a configuration type.
38# Supply the specified configuration type as an argument.
39# If it is invalid, we print an error message on stderr and exit with code 1.
40# Otherwise, we print the canonical config type on stdout and succeed.
41
42# You can get the latest version of this script from:
43# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
44
45# This file is supposed to be the same for all GNU packages
46# and recognize all the CPU types, system types and aliases
47# that are meaningful with *any* GNU software.
48# Each package is responsible for reporting which valid configurations
49# it does not support. The user should be able to distinguish
50# a failure to support a valid configuration from a meaningless
51# configuration.
52
53# The goal of this file is to map all the various variations of a given
54# machine specification into a single specification in the form:
55# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
56# or in some cases, the newer four-part form:
57# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
58# It is wrong to echo any other type of specification.
59
60me=`echo "$0" | sed -e 's,.*/,,'`
61
62usage="\
63Usage: $0 [OPTION] CPU-MFR-OPSYS
64 $0 [OPTION] ALIAS
65
66Canonicalize a configuration name.
67
68Operation modes:
69 -h, --help print this help, then exit
70 -t, --time-stamp print date of last modification, then exit
71 -v, --version print version number, then exit
72
73Report bugs and patches to <config-patches@gnu.org>."
74
75version="\
76GNU config.sub ($timestamp)
77
78Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
792001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
80Software Foundation, Inc.
81
82This is free software; see the source for copying conditions. There is NO
83warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
84
85help="
86Try \`$me --help' for more information."
87
88# Parse command line
89while test $# -gt 0 ; do
90 case $1 in
91 --time-stamp | --time* | -t )
92 echo "$timestamp" ; exit ;;
93 --version | -v )
94 echo "$version" ; exit ;;
95 --help | --h* | -h )
96 echo "$usage"; exit ;;
97 -- ) # Stop option processing
98 shift; break ;;
99 - ) # Use stdin as input.
100 break ;;
101 -* )
102 echo "$me: invalid option $1$help"
103 exit 1 ;;
104
105 *local*)
106 # First pass through any local machine types.
107 echo $1
108 exit ;;
109
110 * )
111 break ;;
112 esac
113done
114
115case $# in
116 0) echo "$me: missing argument$help" >&2
117 exit 1;;
118 1) ;;
119 *) echo "$me: too many arguments$help" >&2
120 exit 1;;
121esac
122
123# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
124# Here we must recognize all the valid KERNEL-OS combinations.
125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
126case $maybe_os in
127 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
128 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
129 kopensolaris*-gnu* | \
130 storm-chaos* | os2-emx* | rtmk-nova*)
131 os=-$maybe_os
132 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
133 ;;
134 *)
135 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
136 if [ $basic_machine != $1 ]
137 then os=`echo $1 | sed 's/.*-/-/'`
138 else os=; fi
139 ;;
140esac
141
142### Let's recognize common machines as not being operating systems so
143### that things like config.sub decstation-3100 work. We also
144### recognize some manufacturers as not being operating systems, so we
145### can provide default operating systems below.
146case $os in
147 -sun*os*)
148 # Prevent following clause from handling this invalid input.
149 ;;
150 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
151 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
152 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
153 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
156 -apple | -axis | -knuth | -cray | -microblaze)
157 os=
158 basic_machine=$1
159 ;;
160 -bluegene*)
161 os=-cnk
162 ;;
163 -sim | -cisco | -oki | -wec | -winbond)
164 os=
165 basic_machine=$1
166 ;;
167 -scout)
168 ;;
169 -wrs)
170 os=-vxworks
171 basic_machine=$1
172 ;;
173 -chorusos*)
174 os=-chorusos
175 basic_machine=$1
176 ;;
177 -chorusrdb)
178 os=-chorusrdb
179 basic_machine=$1
180 ;;
181 -hiux*)
182 os=-hiuxwe2
183 ;;
184 -sco6)
185 os=-sco5v6
186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 ;;
188 -sco5)
189 os=-sco3.2v5
190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 ;;
192 -sco4)
193 os=-sco3.2v4
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 ;;
196 -sco3.2.[4-9]*)
197 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 ;;
200 -sco3.2v[4-9]*)
201 # Don't forget version if it is 3.2v4 or newer.
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -sco5v6*)
205 # Don't forget version if it is 3.2v4 or newer.
206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 ;;
208 -sco*)
209 os=-sco3.2v2
210 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
211 ;;
212 -udk*)
213 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214 ;;
215 -isc)
216 os=-isc2.2
217 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -clix*)
220 basic_machine=clipper-intergraph
221 ;;
222 -isc*)
223 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -windowsnt*)
232 os=`echo $os | sed -e 's/windowsnt/winnt/'`
233 ;;
234 -psos*)
235 os=-psos
236 ;;
237 -mint | -mint[0-9]*)
238 basic_machine=m68k-atari
239 os=-mint
240 ;;
241esac
242
243# Decode aliases for certain CPU-COMPANY combinations.
244case $basic_machine in
245 # Recognize the basic CPU types without company name.
246 # Some are omitted here because they have special meanings below.
247 1750a | 580 \
248 | a29k \
249 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
250 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
251 | am33_2.0 \
252 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
253 | bfin \
254 | c4x | clipper \
255 | d10v | d30v | dlx | dsp16xx \
256 | fido | fr30 | frv \
257 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
258 | i370 | i860 | i960 | ia64 \
259 | ip2k | iq2000 \
260 | lm32 \
261 | m32c | m32r | m32rle | m68000 | m68k | m88k \
262 | maxq | mb | microblaze | mcore | mep | metag \
263 | mips | mipsbe | mipseb | mipsel | mipsle \
264 | mips16 \
265 | mips64 | mips64el \
266 | mips64octeon | mips64octeonel \
267 | mips64orion | mips64orionel \
268 | mips64r5900 | mips64r5900el \
269 | mips64vr | mips64vrel \
270 | mips64vr4100 | mips64vr4100el \
271 | mips64vr4300 | mips64vr4300el \
272 | mips64vr5000 | mips64vr5000el \
273 | mips64vr5900 | mips64vr5900el \
274 | mipsisa32 | mipsisa32el \
275 | mipsisa32r2 | mipsisa32r2el \
276 | mipsisa64 | mipsisa64el \
277 | mipsisa64r2 | mipsisa64r2el \
278 | mipsisa64sb1 | mipsisa64sb1el \
279 | mipsisa64sr71k | mipsisa64sr71kel \
280 | mipstx39 | mipstx39el \
281 | mn10200 | mn10300 \
282 | moxie \
283 | mt \
284 | msp430 \
285 | nios | nios2 \
286 | ns16k | ns32k \
287 | or32 \
288 | pdp10 | pdp11 | pj | pjl \
289 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
290 | pyramid \
291 | rx \
292 | score \
293 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
294 | sh64 | sh64le \
295 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
296 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
297 | spu | strongarm \
298 | tahoe | thumb | tic4x | tic80 | tron \
299 | ubicom32 \
300 | v850 | v850e \
301 | we32k \
302 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
303 | z8k | z80)
304 basic_machine=$basic_machine-unknown
305 ;;
306 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
307 # Motorola 68HC11/12.
308 basic_machine=$basic_machine-unknown
309 os=-none
310 ;;
311 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
312 ;;
313 ms1)
314 basic_machine=mt-unknown
315 ;;
316
317 # We use `pc' rather than `unknown'
318 # because (1) that's what they normally are, and
319 # (2) the word "unknown" tends to confuse beginning users.
320 i*86 | x86_64)
321 basic_machine=$basic_machine-pc
322 ;;
323 # Object if more than one company name word.
324 *-*-*)
325 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
326 exit 1
327 ;;
328 # Recognize the basic CPU types with company name.
329 580-* \
330 | a29k-* \
331 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
332 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
333 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
334 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
335 | avr-* | avr32-* \
336 | bfin-* | bs2000-* \
337 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
338 | clipper-* | craynv-* | cydra-* \
339 | d10v-* | d30v-* | dlx-* \
340 | elxsi-* \
341 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
342 | h8300-* | h8500-* \
343 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
344 | i*86-* | i860-* | i960-* | ia64-* \
345 | ip2k-* | iq2000-* \
346 | lm32-* \
347 | m32c-* | m32r-* | m32rle-* \
348 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
349 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
350 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
351 | mips16-* \
352 | mips64-* | mips64el-* \
353 | mips64octeon-* | mips64octeonel-* \
354 | mips64orion-* | mips64orionel-* \
355 | mips64r5900-* | mips64r5900el-* \
356 | mips64vr-* | mips64vrel-* \
357 | mips64vr4100-* | mips64vr4100el-* \
358 | mips64vr4300-* | mips64vr4300el-* \
359 | mips64vr5000-* | mips64vr5000el-* \
360 | mips64vr5900-* | mips64vr5900el-* \
361 | mipsisa32-* | mipsisa32el-* \
362 | mipsisa32r2-* | mipsisa32r2el-* \
363 | mipsisa64-* | mipsisa64el-* \
364 | mipsisa64r2-* | mipsisa64r2el-* \
365 | mipsisa64sb1-* | mipsisa64sb1el-* \
366 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
367 | mipstx39-* | mipstx39el-* \
368 | mmix-* \
369 | mt-* \
370 | msp430-* \
371 | nios-* | nios2-* \
372 | none-* | np1-* | ns16k-* | ns32k-* \
373 | orion-* \
374 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
375 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
376 | pyramid-* \
377 | romp-* | rs6000-* | rx-* \
378 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
379 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
380 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
381 | sparclite-* \
382 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
383 | tahoe-* | thumb-* \
384 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
385 | tile-* | tilegx-* \
386 | tron-* \
387 | ubicom32-* \
388 | v850-* | v850e-* | vax-* \
389 | we32k-* \
390 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
391 | xstormy16-* | xtensa*-* \
392 | ymp-* \
393 | z8k-* | z80-*)
394 ;;
395 # Recognize the basic CPU types without company name, with glob match.
396 xtensa*)
397 basic_machine=$basic_machine-unknown
398 ;;
399 # Recognize the various machine names and aliases which stand
400 # for a CPU type and a company and sometimes even an OS.
401 386bsd)
402 basic_machine=i386-unknown
403 os=-bsd
404 ;;
405 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
406 basic_machine=m68000-att
407 ;;
408 3b*)
409 basic_machine=we32k-att
410 ;;
411 a29khif)
412 basic_machine=a29k-amd
413 os=-udi
414 ;;
415 abacus)
416 basic_machine=abacus-unknown
417 ;;
418 adobe68k)
419 basic_machine=m68010-adobe
420 os=-scout
421 ;;
422 alliant | fx80)
423 basic_machine=fx80-alliant
424 ;;
425 altos | altos3068)
426 basic_machine=m68k-altos
427 ;;
428 am29k)
429 basic_machine=a29k-none
430 os=-bsd
431 ;;
432 amd64)
433 basic_machine=x86_64-pc
434 ;;
435 amd64-*)
436 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
437 ;;
438 amdahl)
439 basic_machine=580-amdahl
440 os=-sysv
441 ;;
442 amiga | amiga-*)
443 basic_machine=m68k-unknown
444 ;;
445 amigaos | amigados)
446 basic_machine=m68k-unknown
447 os=-amigaos
448 ;;
449 amigaunix | amix)
450 basic_machine=m68k-unknown
451 os=-sysv4
452 ;;
453 apollo68)
454 basic_machine=m68k-apollo
455 os=-sysv
456 ;;
457 apollo68bsd)
458 basic_machine=m68k-apollo
459 os=-bsd
460 ;;
461 aros)
462 basic_machine=i386-pc
463 os=-aros
464 ;;
465 aux)
466 basic_machine=m68k-apple
467 os=-aux
468 ;;
469 balance)
470 basic_machine=ns32k-sequent
471 os=-dynix
472 ;;
473 blackfin)
474 basic_machine=bfin-unknown
475 os=-linux
476 ;;
477 blackfin-*)
478 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
479 os=-linux
480 ;;
481 bluegene*)
482 basic_machine=powerpc-ibm
483 os=-cnk
484 ;;
485 c90)
486 basic_machine=c90-cray
487 os=-unicos
488 ;;
489 cegcc)
490 basic_machine=arm-unknown
491 os=-cegcc
492 ;;
493 convex-c1)
494 basic_machine=c1-convex
495 os=-bsd
496 ;;
497 convex-c2)
498 basic_machine=c2-convex
499 os=-bsd
500 ;;
501 convex-c32)
502 basic_machine=c32-convex
503 os=-bsd
504 ;;
505 convex-c34)
506 basic_machine=c34-convex
507 os=-bsd
508 ;;
509 convex-c38)
510 basic_machine=c38-convex
511 os=-bsd
512 ;;
513 cray | j90)
514 basic_machine=j90-cray
515 os=-unicos
516 ;;
517 craynv)
518 basic_machine=craynv-cray
519 os=-unicosmp
520 ;;
521 cr16)
522 basic_machine=cr16-unknown
523 os=-elf
524 ;;
525 crds | unos)
526 basic_machine=m68k-crds
527 ;;
528 crisv32 | crisv32-* | etraxfs*)
529 basic_machine=crisv32-axis
530 ;;
531 cris | cris-* | etrax*)
532 basic_machine=cris-axis
533 ;;
534 crx)
535 basic_machine=crx-unknown
536 os=-elf
537 ;;
538 da30 | da30-*)
539 basic_machine=m68k-da30
540 ;;
541 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
542 basic_machine=mips-dec
543 ;;
544 decsystem10* | dec10*)
545 basic_machine=pdp10-dec
546 os=-tops10
547 ;;
548 decsystem20* | dec20*)
549 basic_machine=pdp10-dec
550 os=-tops20
551 ;;
552 delta | 3300 | motorola-3300 | motorola-delta \
553 | 3300-motorola | delta-motorola)
554 basic_machine=m68k-motorola
555 ;;
556 delta88)
557 basic_machine=m88k-motorola
558 os=-sysv3
559 ;;
560 dicos)
561 basic_machine=i686-pc
562 os=-dicos
563 ;;
564 djgpp)
565 basic_machine=i586-pc
566 os=-msdosdjgpp
567 ;;
568 dpx20 | dpx20-*)
569 basic_machine=rs6000-bull
570 os=-bosx
571 ;;
572 dpx2* | dpx2*-bull)
573 basic_machine=m68k-bull
574 os=-sysv3
575 ;;
576 ebmon29k)
577 basic_machine=a29k-amd
578 os=-ebmon
579 ;;
580 elxsi)
581 basic_machine=elxsi-elxsi
582 os=-bsd
583 ;;
584 encore | umax | mmax)
585 basic_machine=ns32k-encore
586 ;;
587 es1800 | OSE68k | ose68k | ose | OSE)
588 basic_machine=m68k-ericsson
589 os=-ose
590 ;;
591 fx2800)
592 basic_machine=i860-alliant
593 ;;
594 genix)
595 basic_machine=ns32k-ns
596 ;;
597 gmicro)
598 basic_machine=tron-gmicro
599 os=-sysv
600 ;;
601 go32)
602 basic_machine=i386-pc
603 os=-go32
604 ;;
605 h3050r* | hiux*)
606 basic_machine=hppa1.1-hitachi
607 os=-hiuxwe2
608 ;;
609 h8300hms)
610 basic_machine=h8300-hitachi
611 os=-hms
612 ;;
613 h8300xray)
614 basic_machine=h8300-hitachi
615 os=-xray
616 ;;
617 h8500hms)
618 basic_machine=h8500-hitachi
619 os=-hms
620 ;;
621 harris)
622 basic_machine=m88k-harris
623 os=-sysv3
624 ;;
625 hp300-*)
626 basic_machine=m68k-hp
627 ;;
628 hp300bsd)
629 basic_machine=m68k-hp
630 os=-bsd
631 ;;
632 hp300hpux)
633 basic_machine=m68k-hp
634 os=-hpux
635 ;;
636 hp3k9[0-9][0-9] | hp9[0-9][0-9])
637 basic_machine=hppa1.0-hp
638 ;;
639 hp9k2[0-9][0-9] | hp9k31[0-9])
640 basic_machine=m68000-hp
641 ;;
642 hp9k3[2-9][0-9])
643 basic_machine=m68k-hp
644 ;;
645 hp9k6[0-9][0-9] | hp6[0-9][0-9])
646 basic_machine=hppa1.0-hp
647 ;;
648 hp9k7[0-79][0-9] | hp7[0-79][0-9])
649 basic_machine=hppa1.1-hp
650 ;;
651 hp9k78[0-9] | hp78[0-9])
652 # FIXME: really hppa2.0-hp
653 basic_machine=hppa1.1-hp
654 ;;
655 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
656 # FIXME: really hppa2.0-hp
657 basic_machine=hppa1.1-hp
658 ;;
659 hp9k8[0-9][13679] | hp8[0-9][13679])
660 basic_machine=hppa1.1-hp
661 ;;
662 hp9k8[0-9][0-9] | hp8[0-9][0-9])
663 basic_machine=hppa1.0-hp
664 ;;
665 hppa-next)
666 os=-nextstep3
667 ;;
668 hppaosf)
669 basic_machine=hppa1.1-hp
670 os=-osf
671 ;;
672 hppro)
673 basic_machine=hppa1.1-hp
674 os=-proelf
675 ;;
676 i370-ibm* | ibm*)
677 basic_machine=i370-ibm
678 ;;
679# I'm not sure what "Sysv32" means. Should this be sysv3.2?
680 i*86v32)
681 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
682 os=-sysv32
683 ;;
684 i*86v4*)
685 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
686 os=-sysv4
687 ;;
688 i*86v)
689 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
690 os=-sysv
691 ;;
692 i*86sol2)
693 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
694 os=-solaris2
695 ;;
696 i386mach)
697 basic_machine=i386-mach
698 os=-mach
699 ;;
700 i386-vsta | vsta)
701 basic_machine=i386-unknown
702 os=-vsta
703 ;;
704 iris | iris4d)
705 basic_machine=mips-sgi
706 case $os in
707 -irix*)
708 ;;
709 *)
710 os=-irix4
711 ;;
712 esac
713 ;;
714 isi68 | isi)
715 basic_machine=m68k-isi
716 os=-sysv
717 ;;
718 m68knommu)
719 basic_machine=m68k-unknown
720 os=-linux
721 ;;
722 m68knommu-*)
723 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
724 os=-linux
725 ;;
726 m88k-omron*)
727 basic_machine=m88k-omron
728 ;;
729 magnum | m3230)
730 basic_machine=mips-mips
731 os=-sysv
732 ;;
733 merlin)
734 basic_machine=ns32k-utek
735 os=-sysv
736 ;;
737 microblaze)
738 basic_machine=microblaze-xilinx
739 ;;
740 mingw32)
741 basic_machine=i386-pc
742 os=-mingw32
743 ;;
744 mingw32ce)
745 basic_machine=arm-unknown
746 os=-mingw32ce
747 ;;
748 miniframe)
749 basic_machine=m68000-convergent
750 ;;
751 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
752 basic_machine=m68k-atari
753 os=-mint
754 ;;
755 mips3*-*)
756 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
757 ;;
758 mips3*)
759 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
760 ;;
761 monitor)
762 basic_machine=m68k-rom68k
763 os=-coff
764 ;;
765 morphos)
766 basic_machine=powerpc-unknown
767 os=-morphos
768 ;;
769 msdos)
770 basic_machine=i386-pc
771 os=-msdos
772 ;;
773 ms1-*)
774 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
775 ;;
776 mvs)
777 basic_machine=i370-ibm
778 os=-mvs
779 ;;
780 ncr3000)
781 basic_machine=i486-ncr
782 os=-sysv4
783 ;;
784 netbsd386)
785 basic_machine=i386-unknown
786 os=-netbsd
787 ;;
788 netwinder)
789 basic_machine=armv4l-rebel
790 os=-linux
791 ;;
792 news | news700 | news800 | news900)
793 basic_machine=m68k-sony
794 os=-newsos
795 ;;
796 news1000)
797 basic_machine=m68030-sony
798 os=-newsos
799 ;;
800 news-3600 | risc-news)
801 basic_machine=mips-sony
802 os=-newsos
803 ;;
804 necv70)
805 basic_machine=v70-nec
806 os=-sysv
807 ;;
808 next | m*-next )
809 basic_machine=m68k-next
810 case $os in
811 -nextstep* )
812 ;;
813 -ns2*)
814 os=-nextstep2
815 ;;
816 *)
817 os=-nextstep3
818 ;;
819 esac
820 ;;
821 nh3000)
822 basic_machine=m68k-harris
823 os=-cxux
824 ;;
825 nh[45]000)
826 basic_machine=m88k-harris
827 os=-cxux
828 ;;
829 nindy960)
830 basic_machine=i960-intel
831 os=-nindy
832 ;;
833 mon960)
834 basic_machine=i960-intel
835 os=-mon960
836 ;;
837 nonstopux)
838 basic_machine=mips-compaq
839 os=-nonstopux
840 ;;
841 np1)
842 basic_machine=np1-gould
843 ;;
844 nsr-tandem)
845 basic_machine=nsr-tandem
846 ;;
847 op50n-* | op60c-*)
848 basic_machine=hppa1.1-oki
849 os=-proelf
850 ;;
851 openrisc | openrisc-*)
852 basic_machine=or32-unknown
853 ;;
854 os400)
855 basic_machine=powerpc-ibm
856 os=-os400
857 ;;
858 OSE68000 | ose68000)
859 basic_machine=m68000-ericsson
860 os=-ose
861 ;;
862 os68k)
863 basic_machine=m68k-none
864 os=-os68k
865 ;;
866 pa-hitachi)
867 basic_machine=hppa1.1-hitachi
868 os=-hiuxwe2
869 ;;
870 paragon)
871 basic_machine=i860-intel
872 os=-osf
873 ;;
874 parisc)
875 basic_machine=hppa-unknown
876 os=-linux
877 ;;
878 parisc-*)
879 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
880 os=-linux
881 ;;
882 pbd)
883 basic_machine=sparc-tti
884 ;;
885 pbb)
886 basic_machine=m68k-tti
887 ;;
888 pc532 | pc532-*)
889 basic_machine=ns32k-pc532
890 ;;
891 pc98)
892 basic_machine=i386-pc
893 ;;
894 pc98-*)
895 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
896 ;;
897 pentium | p5 | k5 | k6 | nexgen | viac3)
898 basic_machine=i586-pc
899 ;;
900 pentiumpro | p6 | 6x86 | athlon | athlon_*)
901 basic_machine=i686-pc
902 ;;
903 pentiumii | pentium2 | pentiumiii | pentium3)
904 basic_machine=i686-pc
905 ;;
906 pentium4)
907 basic_machine=i786-pc
908 ;;
909 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
910 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
911 ;;
912 pentiumpro-* | p6-* | 6x86-* | athlon-*)
913 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
914 ;;
915 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
916 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
917 ;;
918 pentium4-*)
919 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
920 ;;
921 pn)
922 basic_machine=pn-gould
923 ;;
924 power) basic_machine=power-ibm
925 ;;
926 ppc) basic_machine=powerpc-unknown
927 ;;
928 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
929 ;;
930 ppcle | powerpclittle | ppc-le | powerpc-little)
931 basic_machine=powerpcle-unknown
932 ;;
933 ppcle-* | powerpclittle-*)
934 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
935 ;;
936 ppc64) basic_machine=powerpc64-unknown
937 ;;
938 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
939 ;;
940 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
941 basic_machine=powerpc64le-unknown
942 ;;
943 ppc64le-* | powerpc64little-*)
944 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
945 ;;
946 ps2)
947 basic_machine=i386-ibm
948 ;;
949 pw32)
950 basic_machine=i586-unknown
951 os=-pw32
952 ;;
953 rdos)
954 basic_machine=i386-pc
955 os=-rdos
956 ;;
957 rom68k)
958 basic_machine=m68k-rom68k
959 os=-coff
960 ;;
961 rm[46]00)
962 basic_machine=mips-siemens
963 ;;
964 rtpc | rtpc-*)
965 basic_machine=romp-ibm
966 ;;
967 s390 | s390-*)
968 basic_machine=s390-ibm
969 ;;
970 s390x | s390x-*)
971 basic_machine=s390x-ibm
972 ;;
973 sa29200)
974 basic_machine=a29k-amd
975 os=-udi
976 ;;
977 sb1)
978 basic_machine=mipsisa64sb1-unknown
979 ;;
980 sb1el)
981 basic_machine=mipsisa64sb1el-unknown
982 ;;
983 sde)
984 basic_machine=mipsisa32-sde
985 os=-elf
986 ;;
987 sei)
988 basic_machine=mips-sei
989 os=-seiux
990 ;;
991 sequent)
992 basic_machine=i386-sequent
993 ;;
994 sh)
995 basic_machine=sh-hitachi
996 os=-hms
997 ;;
998 sh5el)
999 basic_machine=sh5le-unknown
1000 ;;
1001 sh64)
1002 basic_machine=sh64-unknown
1003 ;;
1004 sparclite-wrs | simso-wrs)
1005 basic_machine=sparclite-wrs
1006 os=-vxworks
1007 ;;
1008 sps7)
1009 basic_machine=m68k-bull
1010 os=-sysv2
1011 ;;
1012 spur)
1013 basic_machine=spur-unknown
1014 ;;
1015 st2000)
1016 basic_machine=m68k-tandem
1017 ;;
1018 stratus)
1019 basic_machine=i860-stratus
1020 os=-sysv4
1021 ;;
1022 sun2)
1023 basic_machine=m68000-sun
1024 ;;
1025 sun2os3)
1026 basic_machine=m68000-sun
1027 os=-sunos3
1028 ;;
1029 sun2os4)
1030 basic_machine=m68000-sun
1031 os=-sunos4
1032 ;;
1033 sun3os3)
1034 basic_machine=m68k-sun
1035 os=-sunos3
1036 ;;
1037 sun3os4)
1038 basic_machine=m68k-sun
1039 os=-sunos4
1040 ;;
1041 sun4os3)
1042 basic_machine=sparc-sun
1043 os=-sunos3
1044 ;;
1045 sun4os4)
1046 basic_machine=sparc-sun
1047 os=-sunos4
1048 ;;
1049 sun4sol2)
1050 basic_machine=sparc-sun
1051 os=-solaris2
1052 ;;
1053 sun3 | sun3-*)
1054 basic_machine=m68k-sun
1055 ;;
1056 sun4)
1057 basic_machine=sparc-sun
1058 ;;
1059 sun386 | sun386i | roadrunner)
1060 basic_machine=i386-sun
1061 ;;
1062 sv1)
1063 basic_machine=sv1-cray
1064 os=-unicos
1065 ;;
1066 symmetry)
1067 basic_machine=i386-sequent
1068 os=-dynix
1069 ;;
1070 t3e)
1071 basic_machine=alphaev5-cray
1072 os=-unicos
1073 ;;
1074 t90)
1075 basic_machine=t90-cray
1076 os=-unicos
1077 ;;
1078 tic54x | c54x*)
1079 basic_machine=tic54x-unknown
1080 os=-coff
1081 ;;
1082 tic55x | c55x*)
1083 basic_machine=tic55x-unknown
1084 os=-coff
1085 ;;
1086 tic6x | c6x*)
1087 basic_machine=tic6x-unknown
1088 os=-coff
1089 ;;
1090 # This must be matched before tile*.
1091 tilegx*)
1092 basic_machine=tilegx-unknown
1093 os=-linux-gnu
1094 ;;
1095 tile*)
1096 basic_machine=tile-unknown
1097 os=-linux-gnu
1098 ;;
1099 tx39)
1100 basic_machine=mipstx39-unknown
1101 ;;
1102 tx39el)
1103 basic_machine=mipstx39el-unknown
1104 ;;
1105 toad1)
1106 basic_machine=pdp10-xkl
1107 os=-tops20
1108 ;;
1109 tower | tower-32)
1110 basic_machine=m68k-ncr
1111 ;;
1112 tpf)
1113 basic_machine=s390x-ibm
1114 os=-tpf
1115 ;;
1116 udi29k)
1117 basic_machine=a29k-amd
1118 os=-udi
1119 ;;
1120 ultra3)
1121 basic_machine=a29k-nyu
1122 os=-sym1
1123 ;;
1124 v810 | necv810)
1125 basic_machine=v810-nec
1126 os=-none
1127 ;;
1128 vaxv)
1129 basic_machine=vax-dec
1130 os=-sysv
1131 ;;
1132 vms)
1133 basic_machine=vax-dec
1134 os=-vms
1135 ;;
1136 vpp*|vx|vx-*)
1137 basic_machine=f301-fujitsu
1138 ;;
1139 vxworks960)
1140 basic_machine=i960-wrs
1141 os=-vxworks
1142 ;;
1143 vxworks68)
1144 basic_machine=m68k-wrs
1145 os=-vxworks
1146 ;;
1147 vxworks29k)
1148 basic_machine=a29k-wrs
1149 os=-vxworks
1150 ;;
1151 w65*)
1152 basic_machine=w65-wdc
1153 os=-none
1154 ;;
1155 w89k-*)
1156 basic_machine=hppa1.1-winbond
1157 os=-proelf
1158 ;;
1159 xbox)
1160 basic_machine=i686-pc
1161 os=-mingw32
1162 ;;
1163 xps | xps100)
1164 basic_machine=xps100-honeywell
1165 ;;
1166 ymp)
1167 basic_machine=ymp-cray
1168 os=-unicos
1169 ;;
1170 z8k-*-coff)
1171 basic_machine=z8k-unknown
1172 os=-sim
1173 ;;
1174 z80-*-coff)
1175 basic_machine=z80-unknown
1176 os=-sim
1177 ;;
1178 none)
1179 basic_machine=none-none
1180 os=-none
1181 ;;
1182
1183# Here we handle the default manufacturer of certain CPU types. It is in
1184# some cases the only manufacturer, in others, it is the most popular.
1185 w89k)
1186 basic_machine=hppa1.1-winbond
1187 ;;
1188 op50n)
1189 basic_machine=hppa1.1-oki
1190 ;;
1191 op60c)
1192 basic_machine=hppa1.1-oki
1193 ;;
1194 romp)
1195 basic_machine=romp-ibm
1196 ;;
1197 mmix)
1198 basic_machine=mmix-knuth
1199 ;;
1200 rs6000)
1201 basic_machine=rs6000-ibm
1202 ;;
1203 vax)
1204 basic_machine=vax-dec
1205 ;;
1206 pdp10)
1207 # there are many clones, so DEC is not a safe bet
1208 basic_machine=pdp10-unknown
1209 ;;
1210 pdp11)
1211 basic_machine=pdp11-dec
1212 ;;
1213 we32k)
1214 basic_machine=we32k-att
1215 ;;
1216 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1217 basic_machine=sh-unknown
1218 ;;
1219 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1220 basic_machine=sparc-sun
1221 ;;
1222 cydra)
1223 basic_machine=cydra-cydrome
1224 ;;
1225 orion)
1226 basic_machine=orion-highlevel
1227 ;;
1228 orion105)
1229 basic_machine=clipper-highlevel
1230 ;;
1231 mac | mpw | mac-mpw)
1232 basic_machine=m68k-apple
1233 ;;
1234 pmac | pmac-mpw)
1235 basic_machine=powerpc-apple
1236 ;;
1237 *-unknown)
1238 # Make sure to match an already-canonicalized machine name.
1239 ;;
1240 *)
1241 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1242 exit 1
1243 ;;
1244esac
1245
1246# Here we canonicalize certain aliases for manufacturers.
1247case $basic_machine in
1248 *-digital*)
1249 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1250 ;;
1251 *-commodore*)
1252 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1253 ;;
1254 *)
1255 ;;
1256esac
1257
1258# Decode manufacturer-specific aliases for certain operating systems.
1259
1260if [ x"$os" != x"" ]
1261then
1262case $os in
1263 # First match some system type aliases
1264 # that might get confused with valid system types.
1265 # -solaris* is a basic system type, with this one exception.
1266 -auroraux)
1267 os=-auroraux
1268 ;;
1269 -solaris1 | -solaris1.*)
1270 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1271 ;;
1272 -solaris)
1273 os=-solaris2
1274 ;;
1275 -svr4*)
1276 os=-sysv4
1277 ;;
1278 -unixware*)
1279 os=-sysv4.2uw
1280 ;;
1281 -gnu/linux*)
1282 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1283 ;;
1284 # First accept the basic system types.
1285 # The portable systems comes first.
1286 # Each alternative MUST END IN A *, to match a version number.
1287 # -sysv* is not here because it comes later, after sysvr4.
1288 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1289 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1290 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1291 | -sym* | -kopensolaris* \
1292 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1293 | -aos* | -aros* \
1294 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1295 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1296 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1297 | -openbsd* | -solidbsd* \
1298 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1299 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1300 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1301 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1302 | -chorusos* | -chorusrdb* | -cegcc* \
1303 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1304 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1305 | -uxpv* | -beos* | -mpeix* | -udk* \
1306 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1307 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1308 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1309 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1310 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1311 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1312 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1313 # Remember, each alternative MUST END IN *, to match a version number.
1314 ;;
1315 -qnx*)
1316 case $basic_machine in
1317 x86-* | i*86-*)
1318 ;;
1319 *)
1320 os=-nto$os
1321 ;;
1322 esac
1323 ;;
1324 -nto-qnx*)
1325 ;;
1326 -nto*)
1327 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1328 ;;
1329 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1330 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1331 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1332 ;;
1333 -mac*)
1334 os=`echo $os | sed -e 's|mac|macos|'`
1335 ;;
1336 -linux-dietlibc)
1337 os=-linux-dietlibc
1338 ;;
1339 -linux*)
1340 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1341 ;;
1342 -sunos5*)
1343 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1344 ;;
1345 -sunos6*)
1346 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1347 ;;
1348 -opened*)
1349 os=-openedition
1350 ;;
1351 -os400*)
1352 os=-os400
1353 ;;
1354 -wince*)
1355 os=-wince
1356 ;;
1357 -osfrose*)
1358 os=-osfrose
1359 ;;
1360 -osf*)
1361 os=-osf
1362 ;;
1363 -utek*)
1364 os=-bsd
1365 ;;
1366 -dynix*)
1367 os=-bsd
1368 ;;
1369 -acis*)
1370 os=-aos
1371 ;;
1372 -atheos*)
1373 os=-atheos
1374 ;;
1375 -syllable*)
1376 os=-syllable
1377 ;;
1378 -386bsd)
1379 os=-bsd
1380 ;;
1381 -ctix* | -uts*)
1382 os=-sysv
1383 ;;
1384 -nova*)
1385 os=-rtmk-nova
1386 ;;
1387 -ns2 )
1388 os=-nextstep2
1389 ;;
1390 -nsk*)
1391 os=-nsk
1392 ;;
1393 # Preserve the version number of sinix5.
1394 -sinix5.*)
1395 os=`echo $os | sed -e 's|sinix|sysv|'`
1396 ;;
1397 -sinix*)
1398 os=-sysv4
1399 ;;
1400 -tpf*)
1401 os=-tpf
1402 ;;
1403 -triton*)
1404 os=-sysv3
1405 ;;
1406 -oss*)
1407 os=-sysv3
1408 ;;
1409 -svr4)
1410 os=-sysv4
1411 ;;
1412 -svr3)
1413 os=-sysv3
1414 ;;
1415 -sysvr4)
1416 os=-sysv4
1417 ;;
1418 # This must come after -sysvr4.
1419 -sysv*)
1420 ;;
1421 -ose*)
1422 os=-ose
1423 ;;
1424 -es1800*)
1425 os=-ose
1426 ;;
1427 -xenix)
1428 os=-xenix
1429 ;;
1430 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1431 os=-mint
1432 ;;
1433 -aros*)
1434 os=-aros
1435 ;;
1436 -kaos*)
1437 os=-kaos
1438 ;;
1439 -zvmoe)
1440 os=-zvmoe
1441 ;;
1442 -dicos*)
1443 os=-dicos
1444 ;;
1445 -nacl*)
1446 ;;
1447 -none)
1448 ;;
1449 *)
1450 # Get rid of the `-' at the beginning of $os.
1451 os=`echo $os | sed 's/[^-]*-//'`
1452 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1453 exit 1
1454 ;;
1455esac
1456else
1457
1458# Here we handle the default operating systems that come with various machines.
1459# The value should be what the vendor currently ships out the door with their
1460# machine or put another way, the most popular os provided with the machine.
1461
1462# Note that if you're going to try to match "-MANUFACTURER" here (say,
1463# "-sun"), then you have to tell the case statement up towards the top
1464# that MANUFACTURER isn't an operating system. Otherwise, code above
1465# will signal an error saying that MANUFACTURER isn't an operating
1466# system, and we'll never get to this point.
1467
1468case $basic_machine in
1469 score-*)
1470 os=-elf
1471 ;;
1472 spu-*)
1473 os=-elf
1474 ;;
1475 *-acorn)
1476 os=-riscix1.2
1477 ;;
1478 arm*-rebel)
1479 os=-linux
1480 ;;
1481 arm*-semi)
1482 os=-aout
1483 ;;
1484 c4x-* | tic4x-*)
1485 os=-coff
1486 ;;
1487 # This must come before the *-dec entry.
1488 pdp10-*)
1489 os=-tops20
1490 ;;
1491 pdp11-*)
1492 os=-none
1493 ;;
1494 *-dec | vax-*)
1495 os=-ultrix4.2
1496 ;;
1497 m68*-apollo)
1498 os=-domain
1499 ;;
1500 i386-sun)
1501 os=-sunos4.0.2
1502 ;;
1503 m68000-sun)
1504 os=-sunos3
1505 # This also exists in the configure program, but was not the
1506 # default.
1507 # os=-sunos4
1508 ;;
1509 m68*-cisco)
1510 os=-aout
1511 ;;
1512 mep-*)
1513 os=-elf
1514 ;;
1515 mips*-cisco)
1516 os=-elf
1517 ;;
1518 mips*-*)
1519 os=-elf
1520 ;;
1521 or32-*)
1522 os=-coff
1523 ;;
1524 *-tti) # must be before sparc entry or we get the wrong os.
1525 os=-sysv3
1526 ;;
1527 sparc-* | *-sun)
1528 os=-sunos4.1.1
1529 ;;
1530 *-be)
1531 os=-beos
1532 ;;
1533 *-haiku)
1534 os=-haiku
1535 ;;
1536 *-ibm)
1537 os=-aix
1538 ;;
1539 *-knuth)
1540 os=-mmixware
1541 ;;
1542 *-wec)
1543 os=-proelf
1544 ;;
1545 *-winbond)
1546 os=-proelf
1547 ;;
1548 *-oki)
1549 os=-proelf
1550 ;;
1551 *-hp)
1552 os=-hpux
1553 ;;
1554 *-hitachi)
1555 os=-hiux
1556 ;;
1557 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1558 os=-sysv
1559 ;;
1560 *-cbm)
1561 os=-amigaos
1562 ;;
1563 *-dg)
1564 os=-dgux
1565 ;;
1566 *-dolphin)
1567 os=-sysv3
1568 ;;
1569 m68k-ccur)
1570 os=-rtu
1571 ;;
1572 m88k-omron*)
1573 os=-luna
1574 ;;
1575 *-next )
1576 os=-nextstep
1577 ;;
1578 *-sequent)
1579 os=-ptx
1580 ;;
1581 *-crds)
1582 os=-unos
1583 ;;
1584 *-ns)
1585 os=-genix
1586 ;;
1587 i370-*)
1588 os=-mvs
1589 ;;
1590 *-next)
1591 os=-nextstep3
1592 ;;
1593 *-gould)
1594 os=-sysv
1595 ;;
1596 *-highlevel)
1597 os=-bsd
1598 ;;
1599 *-encore)
1600 os=-bsd
1601 ;;
1602 *-sgi)
1603 os=-irix
1604 ;;
1605 *-siemens)
1606 os=-sysv4
1607 ;;
1608 *-masscomp)
1609 os=-rtu
1610 ;;
1611 f30[01]-fujitsu | f700-fujitsu)
1612 os=-uxpv
1613 ;;
1614 *-rom68k)
1615 os=-coff
1616 ;;
1617 *-*bug)
1618 os=-coff
1619 ;;
1620 *-apple)
1621 os=-macos
1622 ;;
1623 *-atari*)
1624 os=-mint
1625 ;;
1626 *)
1627 os=-none
1628 ;;
1629esac
1630fi
1631
1632# Here we handle the case where we know the os, and the CPU type, but not the
1633# manufacturer. We pick the logical manufacturer.
1634vendor=unknown
1635case $basic_machine in
1636 *-unknown)
1637 case $os in
1638 -riscix*)
1639 vendor=acorn
1640 ;;
1641 -sunos*)
1642 vendor=sun
1643 ;;
1644 -cnk*|-aix*)
1645 vendor=ibm
1646 ;;
1647 -beos*)
1648 vendor=be
1649 ;;
1650 -hpux*)
1651 vendor=hp
1652 ;;
1653 -mpeix*)
1654 vendor=hp
1655 ;;
1656 -hiux*)
1657 vendor=hitachi
1658 ;;
1659 -unos*)
1660 vendor=crds
1661 ;;
1662 -dgux*)
1663 vendor=dg
1664 ;;
1665 -luna*)
1666 vendor=omron
1667 ;;
1668 -genix*)
1669 vendor=ns
1670 ;;
1671 -mvs* | -opened*)
1672 vendor=ibm
1673 ;;
1674 -os400*)
1675 vendor=ibm
1676 ;;
1677 -ptx*)
1678 vendor=sequent
1679 ;;
1680 -tpf*)
1681 vendor=ibm
1682 ;;
1683 -vxsim* | -vxworks* | -windiss*)
1684 vendor=wrs
1685 ;;
1686 -aux*)
1687 vendor=apple
1688 ;;
1689 -hms*)
1690 vendor=hitachi
1691 ;;
1692 -mpw* | -macos*)
1693 vendor=apple
1694 ;;
1695 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1696 vendor=atari
1697 ;;
1698 -vos*)
1699 vendor=stratus
1700 ;;
1701 esac
1702 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1703 ;;
1704esac
1705
1706echo $basic_machine$os
1707exit
1708
1709# Local variables:
1710# eval: (add-hook 'write-file-hooks 'time-stamp)
1711# time-stamp-start: "timestamp='"
1712# time-stamp-format: "%:y-%02m-%02d"
1713# time-stamp-end: "'"
1714# End:
diff --git a/libraries/eet/configure b/libraries/eet/configure
new file mode 100755
index 0000000..a3dddde
--- /dev/null
+++ b/libraries/eet/configure
@@ -0,0 +1,16602 @@
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for eet 1.5.0.
4#
5# Report bugs to <enlightenment-devel@lists.sourceforge.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
94case $0 in #((
95 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
103IFS=$as_save_IFS
104
105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140 emulate sh
141 NULLCMD=:
142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 # is contrary to our usage. Disable this feature.
144 alias -g '\${1+\"\$@\"}'='\"\$@\"'
145 setopt NO_GLOB_SUBST
146else
147 case \`(set -o) 2>/dev/null\` in #(
148 *posix*) :
149 set -o posix ;; #(
150 *) :
151 ;;
152esac
153fi
154"
155 as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169 exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177 if (eval "$as_required") 2>/dev/null; then :
178 as_have_required=yes
179else
180 as_have_required=no
181fi
182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189 IFS=$as_save_IFS
190 test -z "$as_dir" && as_dir=.
191 as_found=:
192 case $as_dir in #(
193 /*)
194 for as_base in sh bash ksh sh5; do
195 # Try only shells that exist, to save several forks.
196 as_shell=$as_dir/$as_base
197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 CONFIG_SHELL=$as_shell as_have_required=yes
200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 break 2
202fi
203fi
204 done;;
205 esac
206 as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215 if test "x$CONFIG_SHELL" != x; then :
216 # We cannot yet assume a decent shell, so we have to provide a
217 # neutralization value for shells without unset; and this also
218 # works around shells that cannot unset nonexistent variables.
219 BASH_ENV=/dev/null
220 ENV=/dev/null
221 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222 export CONFIG_SHELL
223 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226 if test x$as_have_required = xno; then :
227 $as_echo "$0: This script requires a shell more modern than all"
228 $as_echo "$0: the shells that I found on your system."
229 if test x${ZSH_VERSION+set} = xset ; then
230 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232 else
233 $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: enlightenment-devel@lists.sourceforge.net about your
235$0: system, including any error possibly output before this
236$0: message. Then install a modern shell, or manually run
237$0: the script under such a shell if you do have one."
238 fi
239 exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257 { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266 return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274 set +e
275 as_fn_set_status $1
276 exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285 case $as_dir in #(
286 -*) as_dir=./$as_dir;;
287 esac
288 test -d "$as_dir" || eval $as_mkdir_p || {
289 as_dirs=
290 while :; do
291 case $as_dir in #(
292 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293 *) as_qdir=$as_dir;;
294 esac
295 as_dirs="'$as_qdir' $as_dirs"
296 as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298 X"$as_dir" : 'X\(//\)[^/]' \| \
299 X"$as_dir" : 'X\(//\)$' \| \
300 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303 s//\1/
304 q
305 }
306 /^X\(\/\/\)[^/].*/{
307 s//\1/
308 q
309 }
310 /^X\(\/\/\)$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\).*/{
315 s//\1/
316 q
317 }
318 s/.*/./; q'`
319 test -d "$as_dir" && break
320 done
321 test -z "$as_dirs" || eval "mkdir $as_dirs"
322 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333 eval 'as_fn_append ()
334 {
335 eval $1+=\$2
336 }'
337else
338 as_fn_append ()
339 {
340 eval $1=\$$1\$2
341 }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350 eval 'as_fn_arith ()
351 {
352 as_val=$(( $* ))
353 }'
354else
355 as_fn_arith ()
356 {
357 as_val=`expr "$@" || test $? -eq 1`
358 }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369 as_status=$1; test $as_status -eq 0 && as_status=1
370 if test "$4"; then
371 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373 fi
374 $as_echo "$as_me: error: $2" >&2
375 as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379 test "X`expr 00001 : '.*\(...\)'`" = X001; then
380 as_expr=expr
381else
382 as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386 as_basename=basename
387else
388 as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392 as_dirname=dirname
393else
394 as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399 X"$0" : 'X\(//\)$' \| \
400 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402 sed '/^.*\/\([^/][^/]*\)\/*$/{
403 s//\1/
404 q
405 }
406 /^X\/\(\/\/\)$/{
407 s//\1/
408 q
409 }
410 /^X\/\(\/\).*/{
411 s//\1/
412 q
413 }
414 s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424 as_lineno_1=$LINENO as_lineno_1a=$LINENO
425 as_lineno_2=$LINENO as_lineno_2a=$LINENO
426 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
429 sed -n '
430 p
431 /[$]LINENO/=
432 ' <$as_myself |
433 sed '
434 s/[$]LINENO.*/&-/
435 t lineno
436 b
437 :lineno
438 N
439 :loop
440 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441 t loop
442 s/-\n.*//
443 ' >$as_me.lineno &&
444 chmod +x "$as_me.lineno" ||
445 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447 # Don't try to exec as it changes $[0], causing all sort of problems
448 # (the dirname of $[0] is not the place where we might find the
449 # original and so on. Autoconf is especially sensitive to this).
450 . "./$as_me.lineno"
451 # Exit status is that of the last command.
452 exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458 case `echo 'xy\c'` in
459 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
460 xy) ECHO_C='\c';;
461 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
462 ECHO_T=' ';;
463 esac;;
464*)
465 ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470 rm -f conf$$.dir/conf$$.file
471else
472 rm -f conf$$.dir
473 mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476 if ln -s conf$$.file conf$$ 2>/dev/null; then
477 as_ln_s='ln -s'
478 # ... but there are two gotchas:
479 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481 # In both cases, we have to default to `cp -p'.
482 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483 as_ln_s='cp -p'
484 elif ln conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s=ln
486 else
487 as_ln_s='cp -p'
488 fi
489else
490 as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496 as_mkdir_p='mkdir -p "$as_dir"'
497else
498 test -d ./-p && rmdir ./-p
499 as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503 as_test_x='test -x'
504else
505 if ls -dL / >/dev/null 2>&1; then
506 as_ls_L_option=L
507 else
508 as_ls_L_option=
509 fi
510 as_test_x='
511 eval sh -c '\''
512 if test -d "$1"; then
513 test -d "$1/.";
514 else
515 case $1 in #(
516 -*)set "./$1";;
517 esac;
518 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519 ???[sx]*):;;*)false;;esac;fi
520 '\'' sh
521 '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532
533# Check that we are running under the correct shell.
534SHELL=${CONFIG_SHELL-/bin/sh}
535
536case X$lt_ECHO in
537X*--fallback-echo)
538 # Remove one level of quotation (which was required for Make).
539 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
540 ;;
541esac
542
543ECHO=${lt_ECHO-echo}
544if test "X$1" = X--no-reexec; then
545 # Discard the --no-reexec flag, and continue.
546 shift
547elif test "X$1" = X--fallback-echo; then
548 # Avoid inline document here, it may be left over
549 :
550elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
551 # Yippee, $ECHO works!
552 :
553else
554 # Restart under the correct shell.
555 exec $SHELL "$0" --no-reexec ${1+"$@"}
556fi
557
558if test "X$1" = X--fallback-echo; then
559 # used as fallback echo
560 shift
561 cat <<_LT_EOF
562$*
563_LT_EOF
564 exit 0
565fi
566
567# The HP-UX ksh and POSIX shell print the target directory to stdout
568# if CDPATH is set.
569(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
570
571if test -z "$lt_ECHO"; then
572 if test "X${echo_test_string+set}" != Xset; then
573 # find a string as large as possible, as long as the shell can cope with it
574 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
575 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
576 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
577 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
578 then
579 break
580 fi
581 done
582 fi
583
584 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
585 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
586 test "X$echo_testing_string" = "X$echo_test_string"; then
587 :
588 else
589 # The Solaris, AIX, and Digital Unix default echo programs unquote
590 # backslashes. This makes it impossible to quote backslashes using
591 # echo "$something" | sed 's/\\/\\\\/g'
592 #
593 # So, first we look for a working echo in the user's PATH.
594
595 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
596 for dir in $PATH /usr/ucb; do
597 IFS="$lt_save_ifs"
598 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
599 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
600 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
601 test "X$echo_testing_string" = "X$echo_test_string"; then
602 ECHO="$dir/echo"
603 break
604 fi
605 done
606 IFS="$lt_save_ifs"
607
608 if test "X$ECHO" = Xecho; then
609 # We didn't find a better echo, so look for alternatives.
610 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
611 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
612 test "X$echo_testing_string" = "X$echo_test_string"; then
613 # This shell has a builtin print -r that does the trick.
614 ECHO='print -r'
615 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
616 test "X$CONFIG_SHELL" != X/bin/ksh; then
617 # If we have ksh, try running configure again with it.
618 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
619 export ORIGINAL_CONFIG_SHELL
620 CONFIG_SHELL=/bin/ksh
621 export CONFIG_SHELL
622 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
623 else
624 # Try using printf.
625 ECHO='printf %s\n'
626 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
627 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
628 test "X$echo_testing_string" = "X$echo_test_string"; then
629 # Cool, printf works
630 :
631 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
632 test "X$echo_testing_string" = 'X\t' &&
633 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
634 test "X$echo_testing_string" = "X$echo_test_string"; then
635 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
636 export CONFIG_SHELL
637 SHELL="$CONFIG_SHELL"
638 export SHELL
639 ECHO="$CONFIG_SHELL $0 --fallback-echo"
640 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
641 test "X$echo_testing_string" = 'X\t' &&
642 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
643 test "X$echo_testing_string" = "X$echo_test_string"; then
644 ECHO="$CONFIG_SHELL $0 --fallback-echo"
645 else
646 # maybe with a smaller string...
647 prev=:
648
649 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
650 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
651 then
652 break
653 fi
654 prev="$cmd"
655 done
656
657 if test "$prev" != 'sed 50q "$0"'; then
658 echo_test_string=`eval $prev`
659 export echo_test_string
660 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
661 else
662 # Oops. We lost completely, so just stick with echo.
663 ECHO=echo
664 fi
665 fi
666 fi
667 fi
668 fi
669fi
670
671# Copy echo and quote the copy suitably for passing to libtool from
672# the Makefile, instead of quoting the original, which is used later.
673lt_ECHO=$ECHO
674if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
675 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
676fi
677
678
679
680
681test -n "$DJDIR" || exec 7<&0 </dev/null
682exec 6>&1
683
684# Name of the host.
685# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
686# so uname gets run too.
687ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
688
689#
690# Initializations.
691#
692ac_default_prefix=/usr/local
693ac_clean_files=
694ac_config_libobj_dir=.
695LIBOBJS=
696cross_compiling=no
697subdirs=
698MFLAGS=
699MAKEFLAGS=
700
701# Identity of this package.
702PACKAGE_NAME='eet'
703PACKAGE_TARNAME='eet'
704PACKAGE_VERSION='1.5.0'
705PACKAGE_STRING='eet 1.5.0'
706PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net'
707PACKAGE_URL=''
708
709ac_unique_file="configure.ac"
710# Factoring default headers for most tests.
711ac_includes_default="\
712#include <stdio.h>
713#ifdef HAVE_SYS_TYPES_H
714# include <sys/types.h>
715#endif
716#ifdef HAVE_SYS_STAT_H
717# include <sys/stat.h>
718#endif
719#ifdef STDC_HEADERS
720# include <stdlib.h>
721# include <stddef.h>
722#else
723# ifdef HAVE_STDLIB_H
724# include <stdlib.h>
725# endif
726#endif
727#ifdef HAVE_STRING_H
728# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
729# include <memory.h>
730# endif
731# include <string.h>
732#endif
733#ifdef HAVE_STRINGS_H
734# include <strings.h>
735#endif
736#ifdef HAVE_INTTYPES_H
737# include <inttypes.h>
738#endif
739#ifdef HAVE_STDINT_H
740# include <stdint.h>
741#endif
742#ifdef HAVE_UNISTD_H
743# include <unistd.h>
744#endif"
745
746ac_subst_vars='am__EXEEXT_FALSE
747am__EXEEXT_TRUE
748LTLIBOBJS
749LIBOBJS
750requirement_eet
751EFL_FNMATCH_LIBS
752ALLOCA
753lt_enable_auto_import
754EET_CFLAGS
755EET_CPPFLAGS
756OPENSSL_LIBS
757OPENSSL_CFLAGS
758LIBGCRYPT_LIBS
759LIBGCRYPT_CFLAGS
760LIBGCRYPT_CONFIG
761GNUTLS_LIBS
762GNUTLS_CFLAGS
763EINA_LIBS
764EINA_CFLAGS
765EET_LIBS
766EFL_EET_BUILD
767EVIL_LIBS
768EVIL_CFLAGS
769EFL_BUILD_DOC_FALSE
770EFL_BUILD_DOC_TRUE
771efl_doxygen
772efl_have_doxygen
773pkgconfig_requires_private
774DEBUG_CFLAGS
775EFL_ENABLE_COVERAGE_FALSE
776EFL_ENABLE_COVERAGE_TRUE
777EFL_COVERAGE_LIBS
778EFL_COVERAGE_CFLAGS
779have_lcov
780EFL_ENABLE_TESTS_FALSE
781EFL_ENABLE_TESTS_TRUE
782CHECK_LIBS
783CHECK_CFLAGS
784PKG_CONFIG_LIBDIR
785PKG_CONFIG_PATH
786PKG_CONFIG
787BUILD_EXAMPLES_FALSE
788BUILD_EXAMPLES_TRUE
789INSTALL_EXAMPLES_FALSE
790INSTALL_EXAMPLES_TRUE
791BUILD_EET_FALSE
792BUILD_EET_TRUE
793EET_PRG
794EET_AMALGAMATION_FALSE
795EET_AMALGAMATION_TRUE
796VMAJ
797release_info
798version_info
799CPP
800OTOOL64
801OTOOL
802LIPO
803NMEDIT
804DSYMUTIL
805lt_ECHO
806RANLIB
807AR
808LN_S
809NM
810ac_ct_DUMPBIN
811DUMPBIN
812LD
813FGREP
814EGREP
815GREP
816SED
817am__fastdepCC_FALSE
818am__fastdepCC_TRUE
819CCDEPMODE
820AMDEPBACKSLASH
821AMDEP_FALSE
822AMDEP_TRUE
823am__quote
824am__include
825DEPDIR
826OBJEXT
827EXEEXT
828ac_ct_CC
829CPPFLAGS
830LDFLAGS
831CFLAGS
832CC
833LIBTOOL
834OBJDUMP
835DLLTOOL
836AS
837host_os
838host_vendor
839host_cpu
840host
841build_os
842build_vendor
843build_cpu
844build
845AM_BACKSLASH
846AM_DEFAULT_VERBOSITY
847am__untar
848am__tar
849AMTAR
850am__leading_dot
851SET_MAKE
852AWK
853mkdir_p
854MKDIR_P
855INSTALL_STRIP_PROGRAM
856STRIP
857install_sh
858MAKEINFO
859AUTOHEADER
860AUTOMAKE
861AUTOCONF
862ACLOCAL
863VERSION
864PACKAGE
865CYGPATH_W
866am__isrc
867INSTALL_DATA
868INSTALL_SCRIPT
869INSTALL_PROGRAM
870target_alias
871host_alias
872build_alias
873LIBS
874ECHO_T
875ECHO_N
876ECHO_C
877DEFS
878mandir
879localedir
880libdir
881psdir
882pdfdir
883dvidir
884htmldir
885infodir
886docdir
887oldincludedir
888includedir
889localstatedir
890sharedstatedir
891sysconfdir
892datadir
893datarootdir
894libexecdir
895sbindir
896bindir
897program_transform_name
898prefix
899exec_prefix
900PACKAGE_URL
901PACKAGE_BUGREPORT
902PACKAGE_STRING
903PACKAGE_VERSION
904PACKAGE_TARNAME
905PACKAGE_NAME
906PATH_SEPARATOR
907SHELL'
908ac_subst_files=''
909ac_user_opts='
910enable_option_checking
911enable_silent_rules
912enable_shared
913enable_static
914with_pic
915enable_fast_install
916enable_dependency_tracking
917with_gnu_ld
918enable_libtool_lock
919enable_amalgamation
920enable_eet
921enable_old_eet_file_format
922enable_gnutls
923enable_new_gnutls_api
924enable_openssl
925enable_cipher
926enable_signature
927enable_assert
928enable_install_examples
929enable_build_examples
930enable_tests
931enable_coverage
932enable_doc
933with_doxygen
934with_libgcrypt_prefix
935with_libgcrypt_exec_prefix
936'
937 ac_precious_vars='build_alias
938host_alias
939target_alias
940CC
941CFLAGS
942LDFLAGS
943LIBS
944CPPFLAGS
945CPP
946PKG_CONFIG
947PKG_CONFIG_PATH
948PKG_CONFIG_LIBDIR
949CHECK_CFLAGS
950CHECK_LIBS
951EVIL_CFLAGS
952EVIL_LIBS
953EINA_CFLAGS
954EINA_LIBS
955GNUTLS_CFLAGS
956GNUTLS_LIBS
957OPENSSL_CFLAGS
958OPENSSL_LIBS'
959
960
961# Initialize some variables set by options.
962ac_init_help=
963ac_init_version=false
964ac_unrecognized_opts=
965ac_unrecognized_sep=
966# The variables have the same names as the options, with
967# dashes changed to underlines.
968cache_file=/dev/null
969exec_prefix=NONE
970no_create=
971no_recursion=
972prefix=NONE
973program_prefix=NONE
974program_suffix=NONE
975program_transform_name=s,x,x,
976silent=
977site=
978srcdir=
979verbose=
980x_includes=NONE
981x_libraries=NONE
982
983# Installation directory options.
984# These are left unexpanded so users can "make install exec_prefix=/foo"
985# and all the variables that are supposed to be based on exec_prefix
986# by default will actually change.
987# Use braces instead of parens because sh, perl, etc. also accept them.
988# (The list follows the same order as the GNU Coding Standards.)
989bindir='${exec_prefix}/bin'
990sbindir='${exec_prefix}/sbin'
991libexecdir='${exec_prefix}/libexec'
992datarootdir='${prefix}/share'
993datadir='${datarootdir}'
994sysconfdir='${prefix}/etc'
995sharedstatedir='${prefix}/com'
996localstatedir='${prefix}/var'
997includedir='${prefix}/include'
998oldincludedir='/usr/include'
999docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1000infodir='${datarootdir}/info'
1001htmldir='${docdir}'
1002dvidir='${docdir}'
1003pdfdir='${docdir}'
1004psdir='${docdir}'
1005libdir='${exec_prefix}/lib'
1006localedir='${datarootdir}/locale'
1007mandir='${datarootdir}/man'
1008
1009ac_prev=
1010ac_dashdash=
1011for ac_option
1012do
1013 # If the previous option needs an argument, assign it.
1014 if test -n "$ac_prev"; then
1015 eval $ac_prev=\$ac_option
1016 ac_prev=
1017 continue
1018 fi
1019
1020 case $ac_option in
1021 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1022 *=) ac_optarg= ;;
1023 *) ac_optarg=yes ;;
1024 esac
1025
1026 # Accept the important Cygnus configure options, so we can diagnose typos.
1027
1028 case $ac_dashdash$ac_option in
1029 --)
1030 ac_dashdash=yes ;;
1031
1032 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1033 ac_prev=bindir ;;
1034 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1035 bindir=$ac_optarg ;;
1036
1037 -build | --build | --buil | --bui | --bu)
1038 ac_prev=build_alias ;;
1039 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1040 build_alias=$ac_optarg ;;
1041
1042 -cache-file | --cache-file | --cache-fil | --cache-fi \
1043 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1044 ac_prev=cache_file ;;
1045 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1046 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1047 cache_file=$ac_optarg ;;
1048
1049 --config-cache | -C)
1050 cache_file=config.cache ;;
1051
1052 -datadir | --datadir | --datadi | --datad)
1053 ac_prev=datadir ;;
1054 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1055 datadir=$ac_optarg ;;
1056
1057 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1058 | --dataroo | --dataro | --datar)
1059 ac_prev=datarootdir ;;
1060 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1061 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1062 datarootdir=$ac_optarg ;;
1063
1064 -disable-* | --disable-*)
1065 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1066 # Reject names that are not valid shell variable names.
1067 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1068 as_fn_error $? "invalid feature name: $ac_useropt"
1069 ac_useropt_orig=$ac_useropt
1070 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1071 case $ac_user_opts in
1072 *"
1073"enable_$ac_useropt"
1074"*) ;;
1075 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1076 ac_unrecognized_sep=', ';;
1077 esac
1078 eval enable_$ac_useropt=no ;;
1079
1080 -docdir | --docdir | --docdi | --doc | --do)
1081 ac_prev=docdir ;;
1082 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1083 docdir=$ac_optarg ;;
1084
1085 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1086 ac_prev=dvidir ;;
1087 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1088 dvidir=$ac_optarg ;;
1089
1090 -enable-* | --enable-*)
1091 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1092 # Reject names that are not valid shell variable names.
1093 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1094 as_fn_error $? "invalid feature name: $ac_useropt"
1095 ac_useropt_orig=$ac_useropt
1096 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1097 case $ac_user_opts in
1098 *"
1099"enable_$ac_useropt"
1100"*) ;;
1101 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1102 ac_unrecognized_sep=', ';;
1103 esac
1104 eval enable_$ac_useropt=\$ac_optarg ;;
1105
1106 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1107 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1108 | --exec | --exe | --ex)
1109 ac_prev=exec_prefix ;;
1110 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1111 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1112 | --exec=* | --exe=* | --ex=*)
1113 exec_prefix=$ac_optarg ;;
1114
1115 -gas | --gas | --ga | --g)
1116 # Obsolete; use --with-gas.
1117 with_gas=yes ;;
1118
1119 -help | --help | --hel | --he | -h)
1120 ac_init_help=long ;;
1121 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1122 ac_init_help=recursive ;;
1123 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1124 ac_init_help=short ;;
1125
1126 -host | --host | --hos | --ho)
1127 ac_prev=host_alias ;;
1128 -host=* | --host=* | --hos=* | --ho=*)
1129 host_alias=$ac_optarg ;;
1130
1131 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1132 ac_prev=htmldir ;;
1133 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1134 | --ht=*)
1135 htmldir=$ac_optarg ;;
1136
1137 -includedir | --includedir | --includedi | --included | --include \
1138 | --includ | --inclu | --incl | --inc)
1139 ac_prev=includedir ;;
1140 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1141 | --includ=* | --inclu=* | --incl=* | --inc=*)
1142 includedir=$ac_optarg ;;
1143
1144 -infodir | --infodir | --infodi | --infod | --info | --inf)
1145 ac_prev=infodir ;;
1146 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1147 infodir=$ac_optarg ;;
1148
1149 -libdir | --libdir | --libdi | --libd)
1150 ac_prev=libdir ;;
1151 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1152 libdir=$ac_optarg ;;
1153
1154 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1155 | --libexe | --libex | --libe)
1156 ac_prev=libexecdir ;;
1157 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1158 | --libexe=* | --libex=* | --libe=*)
1159 libexecdir=$ac_optarg ;;
1160
1161 -localedir | --localedir | --localedi | --localed | --locale)
1162 ac_prev=localedir ;;
1163 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1164 localedir=$ac_optarg ;;
1165
1166 -localstatedir | --localstatedir | --localstatedi | --localstated \
1167 | --localstate | --localstat | --localsta | --localst | --locals)
1168 ac_prev=localstatedir ;;
1169 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1170 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1171 localstatedir=$ac_optarg ;;
1172
1173 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1174 ac_prev=mandir ;;
1175 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1176 mandir=$ac_optarg ;;
1177
1178 -nfp | --nfp | --nf)
1179 # Obsolete; use --without-fp.
1180 with_fp=no ;;
1181
1182 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1183 | --no-cr | --no-c | -n)
1184 no_create=yes ;;
1185
1186 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1187 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1188 no_recursion=yes ;;
1189
1190 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1191 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1192 | --oldin | --oldi | --old | --ol | --o)
1193 ac_prev=oldincludedir ;;
1194 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1195 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1196 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1197 oldincludedir=$ac_optarg ;;
1198
1199 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1200 ac_prev=prefix ;;
1201 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1202 prefix=$ac_optarg ;;
1203
1204 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1205 | --program-pre | --program-pr | --program-p)
1206 ac_prev=program_prefix ;;
1207 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1208 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1209 program_prefix=$ac_optarg ;;
1210
1211 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1212 | --program-suf | --program-su | --program-s)
1213 ac_prev=program_suffix ;;
1214 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1215 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1216 program_suffix=$ac_optarg ;;
1217
1218 -program-transform-name | --program-transform-name \
1219 | --program-transform-nam | --program-transform-na \
1220 | --program-transform-n | --program-transform- \
1221 | --program-transform | --program-transfor \
1222 | --program-transfo | --program-transf \
1223 | --program-trans | --program-tran \
1224 | --progr-tra | --program-tr | --program-t)
1225 ac_prev=program_transform_name ;;
1226 -program-transform-name=* | --program-transform-name=* \
1227 | --program-transform-nam=* | --program-transform-na=* \
1228 | --program-transform-n=* | --program-transform-=* \
1229 | --program-transform=* | --program-transfor=* \
1230 | --program-transfo=* | --program-transf=* \
1231 | --program-trans=* | --program-tran=* \
1232 | --progr-tra=* | --program-tr=* | --program-t=*)
1233 program_transform_name=$ac_optarg ;;
1234
1235 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1236 ac_prev=pdfdir ;;
1237 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1238 pdfdir=$ac_optarg ;;
1239
1240 -psdir | --psdir | --psdi | --psd | --ps)
1241 ac_prev=psdir ;;
1242 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1243 psdir=$ac_optarg ;;
1244
1245 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1246 | -silent | --silent | --silen | --sile | --sil)
1247 silent=yes ;;
1248
1249 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1250 ac_prev=sbindir ;;
1251 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1252 | --sbi=* | --sb=*)
1253 sbindir=$ac_optarg ;;
1254
1255 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1256 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1257 | --sharedst | --shareds | --shared | --share | --shar \
1258 | --sha | --sh)
1259 ac_prev=sharedstatedir ;;
1260 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1261 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1262 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1263 | --sha=* | --sh=*)
1264 sharedstatedir=$ac_optarg ;;
1265
1266 -site | --site | --sit)
1267 ac_prev=site ;;
1268 -site=* | --site=* | --sit=*)
1269 site=$ac_optarg ;;
1270
1271 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1272 ac_prev=srcdir ;;
1273 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1274 srcdir=$ac_optarg ;;
1275
1276 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1277 | --syscon | --sysco | --sysc | --sys | --sy)
1278 ac_prev=sysconfdir ;;
1279 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1280 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1281 sysconfdir=$ac_optarg ;;
1282
1283 -target | --target | --targe | --targ | --tar | --ta | --t)
1284 ac_prev=target_alias ;;
1285 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1286 target_alias=$ac_optarg ;;
1287
1288 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1289 verbose=yes ;;
1290
1291 -version | --version | --versio | --versi | --vers | -V)
1292 ac_init_version=: ;;
1293
1294 -with-* | --with-*)
1295 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1296 # Reject names that are not valid shell variable names.
1297 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1298 as_fn_error $? "invalid package name: $ac_useropt"
1299 ac_useropt_orig=$ac_useropt
1300 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1301 case $ac_user_opts in
1302 *"
1303"with_$ac_useropt"
1304"*) ;;
1305 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1306 ac_unrecognized_sep=', ';;
1307 esac
1308 eval with_$ac_useropt=\$ac_optarg ;;
1309
1310 -without-* | --without-*)
1311 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1312 # Reject names that are not valid shell variable names.
1313 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1314 as_fn_error $? "invalid package name: $ac_useropt"
1315 ac_useropt_orig=$ac_useropt
1316 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1317 case $ac_user_opts in
1318 *"
1319"with_$ac_useropt"
1320"*) ;;
1321 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1322 ac_unrecognized_sep=', ';;
1323 esac
1324 eval with_$ac_useropt=no ;;
1325
1326 --x)
1327 # Obsolete; use --with-x.
1328 with_x=yes ;;
1329
1330 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1331 | --x-incl | --x-inc | --x-in | --x-i)
1332 ac_prev=x_includes ;;
1333 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1334 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1335 x_includes=$ac_optarg ;;
1336
1337 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1338 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1339 ac_prev=x_libraries ;;
1340 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1341 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1342 x_libraries=$ac_optarg ;;
1343
1344 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1345Try \`$0 --help' for more information"
1346 ;;
1347
1348 *=*)
1349 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1350 # Reject names that are not valid shell variable names.
1351 case $ac_envvar in #(
1352 '' | [0-9]* | *[!_$as_cr_alnum]* )
1353 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1354 esac
1355 eval $ac_envvar=\$ac_optarg
1356 export $ac_envvar ;;
1357
1358 *)
1359 # FIXME: should be removed in autoconf 3.0.
1360 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1361 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1362 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1363 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1364 ;;
1365
1366 esac
1367done
1368
1369if test -n "$ac_prev"; then
1370 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1371 as_fn_error $? "missing argument to $ac_option"
1372fi
1373
1374if test -n "$ac_unrecognized_opts"; then
1375 case $enable_option_checking in
1376 no) ;;
1377 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1378 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1379 esac
1380fi
1381
1382# Check all directory arguments for consistency.
1383for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1384 datadir sysconfdir sharedstatedir localstatedir includedir \
1385 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1386 libdir localedir mandir
1387do
1388 eval ac_val=\$$ac_var
1389 # Remove trailing slashes.
1390 case $ac_val in
1391 */ )
1392 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1393 eval $ac_var=\$ac_val;;
1394 esac
1395 # Be sure to have absolute directory names.
1396 case $ac_val in
1397 [\\/$]* | ?:[\\/]* ) continue;;
1398 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1399 esac
1400 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1401done
1402
1403# There might be people who depend on the old broken behavior: `$host'
1404# used to hold the argument of --host etc.
1405# FIXME: To remove some day.
1406build=$build_alias
1407host=$host_alias
1408target=$target_alias
1409
1410# FIXME: To remove some day.
1411if test "x$host_alias" != x; then
1412 if test "x$build_alias" = x; then
1413 cross_compiling=maybe
1414 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1415 If a cross compiler is detected then cross compile mode will be used" >&2
1416 elif test "x$build_alias" != "x$host_alias"; then
1417 cross_compiling=yes
1418 fi
1419fi
1420
1421ac_tool_prefix=
1422test -n "$host_alias" && ac_tool_prefix=$host_alias-
1423
1424test "$silent" = yes && exec 6>/dev/null
1425
1426
1427ac_pwd=`pwd` && test -n "$ac_pwd" &&
1428ac_ls_di=`ls -di .` &&
1429ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1430 as_fn_error $? "working directory cannot be determined"
1431test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1432 as_fn_error $? "pwd does not report name of working directory"
1433
1434
1435# Find the source files, if location was not specified.
1436if test -z "$srcdir"; then
1437 ac_srcdir_defaulted=yes
1438 # Try the directory containing this script, then the parent directory.
1439 ac_confdir=`$as_dirname -- "$as_myself" ||
1440$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1441 X"$as_myself" : 'X\(//\)[^/]' \| \
1442 X"$as_myself" : 'X\(//\)$' \| \
1443 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1444$as_echo X"$as_myself" |
1445 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1446 s//\1/
1447 q
1448 }
1449 /^X\(\/\/\)[^/].*/{
1450 s//\1/
1451 q
1452 }
1453 /^X\(\/\/\)$/{
1454 s//\1/
1455 q
1456 }
1457 /^X\(\/\).*/{
1458 s//\1/
1459 q
1460 }
1461 s/.*/./; q'`
1462 srcdir=$ac_confdir
1463 if test ! -r "$srcdir/$ac_unique_file"; then
1464 srcdir=..
1465 fi
1466else
1467 ac_srcdir_defaulted=no
1468fi
1469if test ! -r "$srcdir/$ac_unique_file"; then
1470 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1471 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1472fi
1473ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1474ac_abs_confdir=`(
1475 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1476 pwd)`
1477# When building in place, set srcdir=.
1478if test "$ac_abs_confdir" = "$ac_pwd"; then
1479 srcdir=.
1480fi
1481# Remove unnecessary trailing slashes from srcdir.
1482# Double slashes in file names in object file debugging info
1483# mess up M-x gdb in Emacs.
1484case $srcdir in
1485*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1486esac
1487for ac_var in $ac_precious_vars; do
1488 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1489 eval ac_env_${ac_var}_value=\$${ac_var}
1490 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1491 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1492done
1493
1494#
1495# Report the --help message.
1496#
1497if test "$ac_init_help" = "long"; then
1498 # Omit some internal or obsolete options to make the list less imposing.
1499 # This message is too long to be a string in the A/UX 3.1 sh.
1500 cat <<_ACEOF
1501\`configure' configures eet 1.5.0 to adapt to many kinds of systems.
1502
1503Usage: $0 [OPTION]... [VAR=VALUE]...
1504
1505To assign environment variables (e.g., CC, CFLAGS...), specify them as
1506VAR=VALUE. See below for descriptions of some of the useful variables.
1507
1508Defaults for the options are specified in brackets.
1509
1510Configuration:
1511 -h, --help display this help and exit
1512 --help=short display options specific to this package
1513 --help=recursive display the short help of all the included packages
1514 -V, --version display version information and exit
1515 -q, --quiet, --silent do not print \`checking ...' messages
1516 --cache-file=FILE cache test results in FILE [disabled]
1517 -C, --config-cache alias for \`--cache-file=config.cache'
1518 -n, --no-create do not create output files
1519 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1520
1521Installation directories:
1522 --prefix=PREFIX install architecture-independent files in PREFIX
1523 [$ac_default_prefix]
1524 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1525 [PREFIX]
1526
1527By default, \`make install' will install all the files in
1528\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1529an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1530for instance \`--prefix=\$HOME'.
1531
1532For better control, use the options below.
1533
1534Fine tuning of the installation directories:
1535 --bindir=DIR user executables [EPREFIX/bin]
1536 --sbindir=DIR system admin executables [EPREFIX/sbin]
1537 --libexecdir=DIR program executables [EPREFIX/libexec]
1538 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1539 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1540 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1541 --libdir=DIR object code libraries [EPREFIX/lib]
1542 --includedir=DIR C header files [PREFIX/include]
1543 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1544 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1545 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1546 --infodir=DIR info documentation [DATAROOTDIR/info]
1547 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1548 --mandir=DIR man documentation [DATAROOTDIR/man]
1549 --docdir=DIR documentation root [DATAROOTDIR/doc/eet]
1550 --htmldir=DIR html documentation [DOCDIR]
1551 --dvidir=DIR dvi documentation [DOCDIR]
1552 --pdfdir=DIR pdf documentation [DOCDIR]
1553 --psdir=DIR ps documentation [DOCDIR]
1554_ACEOF
1555
1556 cat <<\_ACEOF
1557
1558Program names:
1559 --program-prefix=PREFIX prepend PREFIX to installed program names
1560 --program-suffix=SUFFIX append SUFFIX to installed program names
1561 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1562
1563System types:
1564 --build=BUILD configure for building on BUILD [guessed]
1565 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1566_ACEOF
1567fi
1568
1569if test -n "$ac_init_help"; then
1570 case $ac_init_help in
1571 short | recursive ) echo "Configuration of eet 1.5.0:";;
1572 esac
1573 cat <<\_ACEOF
1574
1575Optional Features:
1576 --disable-option-checking ignore unrecognized --enable/--with options
1577 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1578 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1579 --enable-silent-rules less verbose build output (undo: `make V=1')
1580 --disable-silent-rules verbose build output (undo: `make V=0')
1581 --enable-shared[=PKGS] build shared libraries [default=yes]
1582 --enable-static[=PKGS] build static libraries [default=yes]
1583 --enable-fast-install[=PKGS]
1584 optimize for fast installation [default=yes]
1585 --disable-dependency-tracking speeds up one-time build
1586 --enable-dependency-tracking do not reject slow dependency extractors
1587 --disable-libtool-lock avoid locking (might break parallel builds)
1588 --enable-amalgamation enable generation of one single file with all source
1589 code in it, helps compiler optimizations.
1590 --disable-eet disable building of eet
1591 --disable-old-eet-file-format
1592 disable old eet file format support.
1593 [[default=enabled]]
1594 --disable-gnutls disable gnutls eet support
1595 --disable-new-gnutls-api
1596 enable use of gnutls_x509_crt_verify_hash.
1597 [[default=enable]]
1598 --disable-openssl disable openssl eet support
1599 --disable-cipher disable cipher support for eet API
1600 --disable-signature disable signature file support for eet
1601 --enable-assert enable assert, [[default=disabled]]
1602 --disable-install-examples
1603 disable installing examples (compiled or just
1604 source). [default==enabled]
1605 --enable-build-examples enable building examples. [default==disabled]
1606 --enable-tests enable tests [default=disabled]
1607 --enable-coverage enable coverage profiling instrumentation
1608 [default=disabled]
1609 --disable-doc Disable documentation build [default=enabled]
1610
1611Optional Packages:
1612 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1613 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1614 --with-pic try to use only PIC/non-PIC objects [default=use
1615 both]
1616 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1617 --with-doxygen=FILE doxygen program to use [default=doxygen]
1618 --with-libgcrypt-prefix=PFX Prefix where libgcrypt is installed (optional)
1619 --with-libgcrypt-exec-prefix=PFX Exec prefix where libgcrypt is installed (optional)
1620
1621Some influential environment variables:
1622 CC C compiler command
1623 CFLAGS C compiler flags
1624 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1625 nonstandard directory <lib dir>
1626 LIBS libraries to pass to the linker, e.g. -l<library>
1627 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1628 you have headers in a nonstandard directory <include dir>
1629 CPP C preprocessor
1630 PKG_CONFIG path to pkg-config utility
1631 PKG_CONFIG_PATH
1632 directories to add to pkg-config's search path
1633 PKG_CONFIG_LIBDIR
1634 path overriding pkg-config's built-in search path
1635 CHECK_CFLAGS
1636 C compiler flags for CHECK, overriding pkg-config
1637 CHECK_LIBS linker flags for CHECK, overriding pkg-config
1638 EVIL_CFLAGS C compiler flags for EVIL, overriding pkg-config
1639 EVIL_LIBS linker flags for EVIL, overriding pkg-config
1640 EINA_CFLAGS C compiler flags for EINA, overriding pkg-config
1641 EINA_LIBS linker flags for EINA, overriding pkg-config
1642 GNUTLS_CFLAGS
1643 C compiler flags for GNUTLS, overriding pkg-config
1644 GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
1645 OPENSSL_CFLAGS
1646 C compiler flags for OPENSSL, overriding pkg-config
1647 OPENSSL_LIBS
1648 linker flags for OPENSSL, overriding pkg-config
1649
1650Use these variables to override the choices made by `configure' or to help
1651it to find libraries and programs with nonstandard names/locations.
1652
1653Report bugs to <enlightenment-devel@lists.sourceforge.net>.
1654_ACEOF
1655ac_status=$?
1656fi
1657
1658if test "$ac_init_help" = "recursive"; then
1659 # If there are subdirs, report their specific --help.
1660 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1661 test -d "$ac_dir" ||
1662 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1663 continue
1664 ac_builddir=.
1665
1666case "$ac_dir" in
1667.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1668*)
1669 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1670 # A ".." for each directory in $ac_dir_suffix.
1671 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1672 case $ac_top_builddir_sub in
1673 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1674 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1675 esac ;;
1676esac
1677ac_abs_top_builddir=$ac_pwd
1678ac_abs_builddir=$ac_pwd$ac_dir_suffix
1679# for backward compatibility:
1680ac_top_builddir=$ac_top_build_prefix
1681
1682case $srcdir in
1683 .) # We are building in place.
1684 ac_srcdir=.
1685 ac_top_srcdir=$ac_top_builddir_sub
1686 ac_abs_top_srcdir=$ac_pwd ;;
1687 [\\/]* | ?:[\\/]* ) # Absolute name.
1688 ac_srcdir=$srcdir$ac_dir_suffix;
1689 ac_top_srcdir=$srcdir
1690 ac_abs_top_srcdir=$srcdir ;;
1691 *) # Relative name.
1692 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1693 ac_top_srcdir=$ac_top_build_prefix$srcdir
1694 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1695esac
1696ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1697
1698 cd "$ac_dir" || { ac_status=$?; continue; }
1699 # Check for guested configure.
1700 if test -f "$ac_srcdir/configure.gnu"; then
1701 echo &&
1702 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1703 elif test -f "$ac_srcdir/configure"; then
1704 echo &&
1705 $SHELL "$ac_srcdir/configure" --help=recursive
1706 else
1707 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1708 fi || ac_status=$?
1709 cd "$ac_pwd" || { ac_status=$?; break; }
1710 done
1711fi
1712
1713test -n "$ac_init_help" && exit $ac_status
1714if $ac_init_version; then
1715 cat <<\_ACEOF
1716eet configure 1.5.0
1717generated by GNU Autoconf 2.67
1718
1719Copyright (C) 2010 Free Software Foundation, Inc.
1720This configure script is free software; the Free Software Foundation
1721gives unlimited permission to copy, distribute and modify it.
1722_ACEOF
1723 exit
1724fi
1725
1726## ------------------------ ##
1727## Autoconf initialization. ##
1728## ------------------------ ##
1729
1730# ac_fn_c_try_compile LINENO
1731# --------------------------
1732# Try to compile conftest.$ac_ext, and return whether this succeeded.
1733ac_fn_c_try_compile ()
1734{
1735 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1736 rm -f conftest.$ac_objext
1737 if { { ac_try="$ac_compile"
1738case "(($ac_try" in
1739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1740 *) ac_try_echo=$ac_try;;
1741esac
1742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1743$as_echo "$ac_try_echo"; } >&5
1744 (eval "$ac_compile") 2>conftest.err
1745 ac_status=$?
1746 if test -s conftest.err; then
1747 grep -v '^ *+' conftest.err >conftest.er1
1748 cat conftest.er1 >&5
1749 mv -f conftest.er1 conftest.err
1750 fi
1751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1752 test $ac_status = 0; } && {
1753 test -z "$ac_c_werror_flag" ||
1754 test ! -s conftest.err
1755 } && test -s conftest.$ac_objext; then :
1756 ac_retval=0
1757else
1758 $as_echo "$as_me: failed program was:" >&5
1759sed 's/^/| /' conftest.$ac_ext >&5
1760
1761 ac_retval=1
1762fi
1763 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_compile
1767
1768# ac_fn_c_try_link LINENO
1769# -----------------------
1770# Try to link conftest.$ac_ext, and return whether this succeeded.
1771ac_fn_c_try_link ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1774 rm -f conftest.$ac_objext conftest$ac_exeext
1775 if { { ac_try="$ac_link"
1776case "(($ac_try" in
1777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778 *) ac_try_echo=$ac_try;;
1779esac
1780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781$as_echo "$ac_try_echo"; } >&5
1782 (eval "$ac_link") 2>conftest.err
1783 ac_status=$?
1784 if test -s conftest.err; then
1785 grep -v '^ *+' conftest.err >conftest.er1
1786 cat conftest.er1 >&5
1787 mv -f conftest.er1 conftest.err
1788 fi
1789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1790 test $ac_status = 0; } && {
1791 test -z "$ac_c_werror_flag" ||
1792 test ! -s conftest.err
1793 } && test -s conftest$ac_exeext && {
1794 test "$cross_compiling" = yes ||
1795 $as_test_x conftest$ac_exeext
1796 }; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
1801
1802 ac_retval=1
1803fi
1804 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1805 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1806 # interfere with the next link command; also delete a directory that is
1807 # left behind by Apple's compiler. We do this before executing the actions.
1808 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1809 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1810 as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_link
1813
1814# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1815# -------------------------------------------------------
1816# Tests whether HEADER exists and can be compiled using the include files in
1817# INCLUDES, setting the cache variable VAR accordingly.
1818ac_fn_c_check_header_compile ()
1819{
1820 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822$as_echo_n "checking for $2... " >&6; }
1823if eval "test \"\${$3+set}\"" = set; then :
1824 $as_echo_n "(cached) " >&6
1825else
1826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1827/* end confdefs.h. */
1828$4
1829#include <$2>
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 eval "$3=yes"
1833else
1834 eval "$3=no"
1835fi
1836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1837fi
1838eval ac_res=\$$3
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1840$as_echo "$ac_res" >&6; }
1841 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1842
1843} # ac_fn_c_check_header_compile
1844
1845# ac_fn_c_try_cpp LINENO
1846# ----------------------
1847# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1848ac_fn_c_try_cpp ()
1849{
1850 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851 if { { ac_try="$ac_cpp conftest.$ac_ext"
1852case "(($ac_try" in
1853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1854 *) ac_try_echo=$ac_try;;
1855esac
1856eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1857$as_echo "$ac_try_echo"; } >&5
1858 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1859 ac_status=$?
1860 if test -s conftest.err; then
1861 grep -v '^ *+' conftest.err >conftest.er1
1862 cat conftest.er1 >&5
1863 mv -f conftest.er1 conftest.err
1864 fi
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } > conftest.i && {
1867 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1868 test ! -s conftest.err
1869 }; then :
1870 ac_retval=0
1871else
1872 $as_echo "$as_me: failed program was:" >&5
1873sed 's/^/| /' conftest.$ac_ext >&5
1874
1875 ac_retval=1
1876fi
1877 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1878 as_fn_set_status $ac_retval
1879
1880} # ac_fn_c_try_cpp
1881
1882# ac_fn_c_try_run LINENO
1883# ----------------------
1884# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1885# that executables *can* be run.
1886ac_fn_c_try_run ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 if { { ac_try="$ac_link"
1890case "(($ac_try" in
1891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892 *) ac_try_echo=$ac_try;;
1893esac
1894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895$as_echo "$ac_try_echo"; } >&5
1896 (eval "$ac_link") 2>&5
1897 ac_status=$?
1898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1899 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1900 { { case "(($ac_try" in
1901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1902 *) ac_try_echo=$ac_try;;
1903esac
1904eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1905$as_echo "$ac_try_echo"; } >&5
1906 (eval "$ac_try") 2>&5
1907 ac_status=$?
1908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1909 test $ac_status = 0; }; }; then :
1910 ac_retval=0
1911else
1912 $as_echo "$as_me: program exited with status $ac_status" >&5
1913 $as_echo "$as_me: failed program was:" >&5
1914sed 's/^/| /' conftest.$ac_ext >&5
1915
1916 ac_retval=$ac_status
1917fi
1918 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1919 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1920 as_fn_set_status $ac_retval
1921
1922} # ac_fn_c_try_run
1923
1924# ac_fn_c_check_func LINENO FUNC VAR
1925# ----------------------------------
1926# Tests whether FUNC exists, setting the cache variable VAR accordingly
1927ac_fn_c_check_func ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
1932if eval "test \"\${$3+set}\"" = set; then :
1933 $as_echo_n "(cached) " >&6
1934else
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1938 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1939#define $2 innocuous_$2
1940
1941/* System header to define __stub macros and hopefully few prototypes,
1942 which can conflict with char $2 (); below.
1943 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1944 <limits.h> exists even on freestanding compilers. */
1945
1946#ifdef __STDC__
1947# include <limits.h>
1948#else
1949# include <assert.h>
1950#endif
1951
1952#undef $2
1953
1954/* Override any GCC internal prototype to avoid an error.
1955 Use char because int might match the return type of a GCC
1956 builtin and then its argument prototype would still apply. */
1957#ifdef __cplusplus
1958extern "C"
1959#endif
1960char $2 ();
1961/* The GNU C library defines this for functions which it implements
1962 to always fail with ENOSYS. Some functions are actually named
1963 something starting with __ and the normal name is an alias. */
1964#if defined __stub_$2 || defined __stub___$2
1965choke me
1966#endif
1967
1968int
1969main ()
1970{
1971return $2 ();
1972 ;
1973 return 0;
1974}
1975_ACEOF
1976if ac_fn_c_try_link "$LINENO"; then :
1977 eval "$3=yes"
1978else
1979 eval "$3=no"
1980fi
1981rm -f core conftest.err conftest.$ac_objext \
1982 conftest$ac_exeext conftest.$ac_ext
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
1987 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1988
1989} # ac_fn_c_check_func
1990
1991# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1992# -------------------------------------------------------
1993# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1994# the include files in INCLUDES and setting the cache variable VAR
1995# accordingly.
1996ac_fn_c_check_header_mongrel ()
1997{
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if eval "test \"\${$3+set}\"" = set; then :
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2001$as_echo_n "checking for $2... " >&6; }
2002if eval "test \"\${$3+set}\"" = set; then :
2003 $as_echo_n "(cached) " >&6
2004fi
2005eval ac_res=\$$3
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2007$as_echo "$ac_res" >&6; }
2008else
2009 # Is the header compilable?
2010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2011$as_echo_n "checking $2 usability... " >&6; }
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015#include <$2>
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_header_compiler=yes
2019else
2020 ac_header_compiler=no
2021fi
2022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2024$as_echo "$ac_header_compiler" >&6; }
2025
2026# Is the header present?
2027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2028$as_echo_n "checking $2 presence... " >&6; }
2029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031#include <$2>
2032_ACEOF
2033if ac_fn_c_try_cpp "$LINENO"; then :
2034 ac_header_preproc=yes
2035else
2036 ac_header_preproc=no
2037fi
2038rm -f conftest.err conftest.i conftest.$ac_ext
2039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2040$as_echo "$ac_header_preproc" >&6; }
2041
2042# So? What about this header?
2043case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2044 yes:no: )
2045 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2046$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2048$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2049 ;;
2050 no:yes:* )
2051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2052$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2054$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2056$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2058$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2060$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2061( $as_echo "## -------------------------------------------------------- ##
2062## Report this to enlightenment-devel@lists.sourceforge.net ##
2063## -------------------------------------------------------- ##"
2064 ) | sed "s/^/$as_me: WARNING: /" >&2
2065 ;;
2066esac
2067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2068$as_echo_n "checking for $2... " >&6; }
2069if eval "test \"\${$3+set}\"" = set; then :
2070 $as_echo_n "(cached) " >&6
2071else
2072 eval "$3=\$ac_header_compiler"
2073fi
2074eval ac_res=\$$3
2075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2076$as_echo "$ac_res" >&6; }
2077fi
2078 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2079
2080} # ac_fn_c_check_header_mongrel
2081cat >config.log <<_ACEOF
2082This file contains any messages produced by compilers while
2083running configure, to aid debugging if configure makes a mistake.
2084
2085It was created by eet $as_me 1.5.0, which was
2086generated by GNU Autoconf 2.67. Invocation command line was
2087
2088 $ $0 $@
2089
2090_ACEOF
2091exec 5>>config.log
2092{
2093cat <<_ASUNAME
2094## --------- ##
2095## Platform. ##
2096## --------- ##
2097
2098hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2099uname -m = `(uname -m) 2>/dev/null || echo unknown`
2100uname -r = `(uname -r) 2>/dev/null || echo unknown`
2101uname -s = `(uname -s) 2>/dev/null || echo unknown`
2102uname -v = `(uname -v) 2>/dev/null || echo unknown`
2103
2104/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2105/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2106
2107/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2108/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2109/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2110/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2111/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2112/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2113/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2114
2115_ASUNAME
2116
2117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2118for as_dir in $PATH
2119do
2120 IFS=$as_save_IFS
2121 test -z "$as_dir" && as_dir=.
2122 $as_echo "PATH: $as_dir"
2123 done
2124IFS=$as_save_IFS
2125
2126} >&5
2127
2128cat >&5 <<_ACEOF
2129
2130
2131## ----------- ##
2132## Core tests. ##
2133## ----------- ##
2134
2135_ACEOF
2136
2137
2138# Keep a trace of the command line.
2139# Strip out --no-create and --no-recursion so they do not pile up.
2140# Strip out --silent because we don't want to record it for future runs.
2141# Also quote any args containing shell meta-characters.
2142# Make two passes to allow for proper duplicate-argument suppression.
2143ac_configure_args=
2144ac_configure_args0=
2145ac_configure_args1=
2146ac_must_keep_next=false
2147for ac_pass in 1 2
2148do
2149 for ac_arg
2150 do
2151 case $ac_arg in
2152 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2153 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2154 | -silent | --silent | --silen | --sile | --sil)
2155 continue ;;
2156 *\'*)
2157 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2158 esac
2159 case $ac_pass in
2160 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2161 2)
2162 as_fn_append ac_configure_args1 " '$ac_arg'"
2163 if test $ac_must_keep_next = true; then
2164 ac_must_keep_next=false # Got value, back to normal.
2165 else
2166 case $ac_arg in
2167 *=* | --config-cache | -C | -disable-* | --disable-* \
2168 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2169 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2170 | -with-* | --with-* | -without-* | --without-* | --x)
2171 case "$ac_configure_args0 " in
2172 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2173 esac
2174 ;;
2175 -* ) ac_must_keep_next=true ;;
2176 esac
2177 fi
2178 as_fn_append ac_configure_args " '$ac_arg'"
2179 ;;
2180 esac
2181 done
2182done
2183{ ac_configure_args0=; unset ac_configure_args0;}
2184{ ac_configure_args1=; unset ac_configure_args1;}
2185
2186# When interrupted or exit'd, cleanup temporary files, and complete
2187# config.log. We remove comments because anyway the quotes in there
2188# would cause problems or look ugly.
2189# WARNING: Use '\'' to represent an apostrophe within the trap.
2190# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2191trap 'exit_status=$?
2192 # Save into config.log some information that might help in debugging.
2193 {
2194 echo
2195
2196 $as_echo "## ---------------- ##
2197## Cache variables. ##
2198## ---------------- ##"
2199 echo
2200 # The following way of writing the cache mishandles newlines in values,
2201(
2202 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2203 eval ac_val=\$$ac_var
2204 case $ac_val in #(
2205 *${as_nl}*)
2206 case $ac_var in #(
2207 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2208$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2209 esac
2210 case $ac_var in #(
2211 _ | IFS | as_nl) ;; #(
2212 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2213 *) { eval $ac_var=; unset $ac_var;} ;;
2214 esac ;;
2215 esac
2216 done
2217 (set) 2>&1 |
2218 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2219 *${as_nl}ac_space=\ *)
2220 sed -n \
2221 "s/'\''/'\''\\\\'\'''\''/g;
2222 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2223 ;; #(
2224 *)
2225 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2226 ;;
2227 esac |
2228 sort
2229)
2230 echo
2231
2232 $as_echo "## ----------------- ##
2233## Output variables. ##
2234## ----------------- ##"
2235 echo
2236 for ac_var in $ac_subst_vars
2237 do
2238 eval ac_val=\$$ac_var
2239 case $ac_val in
2240 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2241 esac
2242 $as_echo "$ac_var='\''$ac_val'\''"
2243 done | sort
2244 echo
2245
2246 if test -n "$ac_subst_files"; then
2247 $as_echo "## ------------------- ##
2248## File substitutions. ##
2249## ------------------- ##"
2250 echo
2251 for ac_var in $ac_subst_files
2252 do
2253 eval ac_val=\$$ac_var
2254 case $ac_val in
2255 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2256 esac
2257 $as_echo "$ac_var='\''$ac_val'\''"
2258 done | sort
2259 echo
2260 fi
2261
2262 if test -s confdefs.h; then
2263 $as_echo "## ----------- ##
2264## confdefs.h. ##
2265## ----------- ##"
2266 echo
2267 cat confdefs.h
2268 echo
2269 fi
2270 test "$ac_signal" != 0 &&
2271 $as_echo "$as_me: caught signal $ac_signal"
2272 $as_echo "$as_me: exit $exit_status"
2273 } >&5
2274 rm -f core *.core core.conftest.* &&
2275 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2276 exit $exit_status
2277' 0
2278for ac_signal in 1 2 13 15; do
2279 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2280done
2281ac_signal=0
2282
2283# confdefs.h avoids OS command line length limits that DEFS can exceed.
2284rm -f -r conftest* confdefs.h
2285
2286$as_echo "/* confdefs.h */" > confdefs.h
2287
2288# Predefined preprocessor variables.
2289
2290cat >>confdefs.h <<_ACEOF
2291#define PACKAGE_NAME "$PACKAGE_NAME"
2292_ACEOF
2293
2294cat >>confdefs.h <<_ACEOF
2295#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2296_ACEOF
2297
2298cat >>confdefs.h <<_ACEOF
2299#define PACKAGE_VERSION "$PACKAGE_VERSION"
2300_ACEOF
2301
2302cat >>confdefs.h <<_ACEOF
2303#define PACKAGE_STRING "$PACKAGE_STRING"
2304_ACEOF
2305
2306cat >>confdefs.h <<_ACEOF
2307#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2308_ACEOF
2309
2310cat >>confdefs.h <<_ACEOF
2311#define PACKAGE_URL "$PACKAGE_URL"
2312_ACEOF
2313
2314
2315# Let the site file select an alternate cache file if it wants to.
2316# Prefer an explicitly selected file to automatically selected ones.
2317ac_site_file1=NONE
2318ac_site_file2=NONE
2319if test -n "$CONFIG_SITE"; then
2320 # We do not want a PATH search for config.site.
2321 case $CONFIG_SITE in #((
2322 -*) ac_site_file1=./$CONFIG_SITE;;
2323 */*) ac_site_file1=$CONFIG_SITE;;
2324 *) ac_site_file1=./$CONFIG_SITE;;
2325 esac
2326elif test "x$prefix" != xNONE; then
2327 ac_site_file1=$prefix/share/config.site
2328 ac_site_file2=$prefix/etc/config.site
2329else
2330 ac_site_file1=$ac_default_prefix/share/config.site
2331 ac_site_file2=$ac_default_prefix/etc/config.site
2332fi
2333for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2334do
2335 test "x$ac_site_file" = xNONE && continue
2336 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2338$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2339 sed 's/^/| /' "$ac_site_file" >&5
2340 . "$ac_site_file" \
2341 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2343as_fn_error $? "failed to load site script $ac_site_file
2344See \`config.log' for more details" "$LINENO" 5 ; }
2345 fi
2346done
2347
2348if test -r "$cache_file"; then
2349 # Some versions of bash will fail to source /dev/null (special files
2350 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2351 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2353$as_echo "$as_me: loading cache $cache_file" >&6;}
2354 case $cache_file in
2355 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2356 *) . "./$cache_file";;
2357 esac
2358 fi
2359else
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2361$as_echo "$as_me: creating cache $cache_file" >&6;}
2362 >$cache_file
2363fi
2364
2365# Check that the precious variables saved in the cache have kept the same
2366# value.
2367ac_cache_corrupted=false
2368for ac_var in $ac_precious_vars; do
2369 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2370 eval ac_new_set=\$ac_env_${ac_var}_set
2371 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2372 eval ac_new_val=\$ac_env_${ac_var}_value
2373 case $ac_old_set,$ac_new_set in
2374 set,)
2375 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2376$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2377 ac_cache_corrupted=: ;;
2378 ,set)
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2380$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2381 ac_cache_corrupted=: ;;
2382 ,);;
2383 *)
2384 if test "x$ac_old_val" != "x$ac_new_val"; then
2385 # differences in whitespace do not lead to failure.
2386 ac_old_val_w=`echo x $ac_old_val`
2387 ac_new_val_w=`echo x $ac_new_val`
2388 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2389 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2390$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2391 ac_cache_corrupted=:
2392 else
2393 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2394$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2395 eval $ac_var=\$ac_old_val
2396 fi
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2398$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2400$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2401 fi;;
2402 esac
2403 # Pass precious variables to config.status.
2404 if test "$ac_new_set" = set; then
2405 case $ac_new_val in
2406 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2407 *) ac_arg=$ac_var=$ac_new_val ;;
2408 esac
2409 case " $ac_configure_args " in
2410 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2411 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2412 esac
2413 fi
2414done
2415if $ac_cache_corrupted; then
2416 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2418 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2419$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2420 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2421fi
2422## -------------------- ##
2423## Main body of script. ##
2424## -------------------- ##
2425
2426ac_ext=c
2427ac_cpp='$CPP $CPPFLAGS'
2428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2430ac_compiler_gnu=$ac_cv_c_compiler_gnu
2431
2432
2433
2434
2435
2436
2437ac_config_headers="$ac_config_headers config.h"
2438
2439
2440
2441
2442am__api_version='1.11'
2443
2444ac_aux_dir=
2445for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2446 if test -f "$ac_dir/install-sh"; then
2447 ac_aux_dir=$ac_dir
2448 ac_install_sh="$ac_aux_dir/install-sh -c"
2449 break
2450 elif test -f "$ac_dir/install.sh"; then
2451 ac_aux_dir=$ac_dir
2452 ac_install_sh="$ac_aux_dir/install.sh -c"
2453 break
2454 elif test -f "$ac_dir/shtool"; then
2455 ac_aux_dir=$ac_dir
2456 ac_install_sh="$ac_aux_dir/shtool install -c"
2457 break
2458 fi
2459done
2460if test -z "$ac_aux_dir"; then
2461 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2462fi
2463
2464# These three variables are undocumented and unsupported,
2465# and are intended to be withdrawn in a future Autoconf release.
2466# They can cause serious problems if a builder's source tree is in a directory
2467# whose full name contains unusual characters.
2468ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2469ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2470ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2471
2472
2473# Find a good install program. We prefer a C program (faster),
2474# so one script is as good as another. But avoid the broken or
2475# incompatible versions:
2476# SysV /etc/install, /usr/sbin/install
2477# SunOS /usr/etc/install
2478# IRIX /sbin/install
2479# AIX /bin/install
2480# AmigaOS /C/install, which installs bootblocks on floppy discs
2481# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2482# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2483# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2484# OS/2's system install, which has a completely different semantic
2485# ./install, which can be erroneously created by make from ./install.sh.
2486# Reject install programs that cannot install multiple files.
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2488$as_echo_n "checking for a BSD-compatible install... " >&6; }
2489if test -z "$INSTALL"; then
2490if test "${ac_cv_path_install+set}" = set; then :
2491 $as_echo_n "(cached) " >&6
2492else
2493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496 IFS=$as_save_IFS
2497 test -z "$as_dir" && as_dir=.
2498 # Account for people who put trailing slashes in PATH elements.
2499case $as_dir/ in #((
2500 ./ | .// | /[cC]/* | \
2501 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2502 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2503 /usr/ucb/* ) ;;
2504 *)
2505 # OSF1 and SCO ODT 3.0 have their own names for install.
2506 # Don't use installbsd from OSF since it installs stuff as root
2507 # by default.
2508 for ac_prog in ginstall scoinst install; do
2509 for ac_exec_ext in '' $ac_executable_extensions; do
2510 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2511 if test $ac_prog = install &&
2512 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2513 # AIX install. It has an incompatible calling convention.
2514 :
2515 elif test $ac_prog = install &&
2516 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2517 # program-specific install script used by HP pwplus--don't use.
2518 :
2519 else
2520 rm -rf conftest.one conftest.two conftest.dir
2521 echo one > conftest.one
2522 echo two > conftest.two
2523 mkdir conftest.dir
2524 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2525 test -s conftest.one && test -s conftest.two &&
2526 test -s conftest.dir/conftest.one &&
2527 test -s conftest.dir/conftest.two
2528 then
2529 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2530 break 3
2531 fi
2532 fi
2533 fi
2534 done
2535 done
2536 ;;
2537esac
2538
2539 done
2540IFS=$as_save_IFS
2541
2542rm -rf conftest.one conftest.two conftest.dir
2543
2544fi
2545 if test "${ac_cv_path_install+set}" = set; then
2546 INSTALL=$ac_cv_path_install
2547 else
2548 # As a last resort, use the slow shell script. Don't cache a
2549 # value for INSTALL within a source directory, because that will
2550 # break other packages using the cache if that directory is
2551 # removed, or if the value is a relative name.
2552 INSTALL=$ac_install_sh
2553 fi
2554fi
2555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2556$as_echo "$INSTALL" >&6; }
2557
2558# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2559# It thinks the first close brace ends the variable substitution.
2560test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2561
2562test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2563
2564test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2565
2566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2567$as_echo_n "checking whether build environment is sane... " >&6; }
2568# Just in case
2569sleep 1
2570echo timestamp > conftest.file
2571# Reject unsafe characters in $srcdir or the absolute working directory
2572# name. Accept space and tab only in the latter.
2573am_lf='
2574'
2575case `pwd` in
2576 *[\\\"\#\$\&\'\`$am_lf]*)
2577 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
2578esac
2579case $srcdir in
2580 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2581 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
2582esac
2583
2584# Do `set' in a subshell so we don't clobber the current shell's
2585# arguments. Must try -L first in case configure is actually a
2586# symlink; some systems play weird games with the mod time of symlinks
2587# (eg FreeBSD returns the mod time of the symlink's containing
2588# directory).
2589if (
2590 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2591 if test "$*" = "X"; then
2592 # -L didn't work.
2593 set X `ls -t "$srcdir/configure" conftest.file`
2594 fi
2595 rm -f conftest.file
2596 if test "$*" != "X $srcdir/configure conftest.file" \
2597 && test "$*" != "X conftest.file $srcdir/configure"; then
2598
2599 # If neither matched, then we have a broken ls. This can happen
2600 # if, for instance, CONFIG_SHELL is bash and it inherits a
2601 # broken ls alias from the environment. This has actually
2602 # happened. Such a system could not be considered "sane".
2603 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2604alias in your environment" "$LINENO" 5
2605 fi
2606
2607 test "$2" = conftest.file
2608 )
2609then
2610 # Ok.
2611 :
2612else
2613 as_fn_error $? "newly created file is older than distributed files!
2614Check your system clock" "$LINENO" 5
2615fi
2616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2617$as_echo "yes" >&6; }
2618test "$program_prefix" != NONE &&
2619 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2620# Use a double $ so make ignores it.
2621test "$program_suffix" != NONE &&
2622 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2623# Double any \ or $.
2624# By default was `s,x,x', remove it if useless.
2625ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2626program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2627
2628# expand $ac_aux_dir to an absolute path
2629am_aux_dir=`cd $ac_aux_dir && pwd`
2630
2631if test x"${MISSING+set}" != xset; then
2632 case $am_aux_dir in
2633 *\ * | *\ *)
2634 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2635 *)
2636 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2637 esac
2638fi
2639# Use eval to expand $SHELL
2640if eval "$MISSING --run true"; then
2641 am_missing_run="$MISSING --run "
2642else
2643 am_missing_run=
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
2645$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2646fi
2647
2648if test x"${install_sh}" != xset; then
2649 case $am_aux_dir in
2650 *\ * | *\ *)
2651 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2652 *)
2653 install_sh="\${SHELL} $am_aux_dir/install-sh"
2654 esac
2655fi
2656
2657# Installed binaries are usually stripped using `strip' when the user
2658# run `make install-strip'. However `strip' might not be the right
2659# tool to use in cross-compilation environments, therefore Automake
2660# will honor the `STRIP' environment variable to overrule this program.
2661if test "$cross_compiling" != no; then
2662 if test -n "$ac_tool_prefix"; then
2663 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2664set dummy ${ac_tool_prefix}strip; ac_word=$2
2665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2666$as_echo_n "checking for $ac_word... " >&6; }
2667if test "${ac_cv_prog_STRIP+set}" = set; then :
2668 $as_echo_n "(cached) " >&6
2669else
2670 if test -n "$STRIP"; then
2671 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2672else
2673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2674for as_dir in $PATH
2675do
2676 IFS=$as_save_IFS
2677 test -z "$as_dir" && as_dir=.
2678 for ac_exec_ext in '' $ac_executable_extensions; do
2679 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2680 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2682 break 2
2683 fi
2684done
2685 done
2686IFS=$as_save_IFS
2687
2688fi
2689fi
2690STRIP=$ac_cv_prog_STRIP
2691if test -n "$STRIP"; then
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2693$as_echo "$STRIP" >&6; }
2694else
2695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2696$as_echo "no" >&6; }
2697fi
2698
2699
2700fi
2701if test -z "$ac_cv_prog_STRIP"; then
2702 ac_ct_STRIP=$STRIP
2703 # Extract the first word of "strip", so it can be a program name with args.
2704set dummy strip; ac_word=$2
2705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2706$as_echo_n "checking for $ac_word... " >&6; }
2707if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
2708 $as_echo_n "(cached) " >&6
2709else
2710 if test -n "$ac_ct_STRIP"; then
2711 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2712else
2713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2714for as_dir in $PATH
2715do
2716 IFS=$as_save_IFS
2717 test -z "$as_dir" && as_dir=.
2718 for ac_exec_ext in '' $ac_executable_extensions; do
2719 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2720 ac_cv_prog_ac_ct_STRIP="strip"
2721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2722 break 2
2723 fi
2724done
2725 done
2726IFS=$as_save_IFS
2727
2728fi
2729fi
2730ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2731if test -n "$ac_ct_STRIP"; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2733$as_echo "$ac_ct_STRIP" >&6; }
2734else
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2736$as_echo "no" >&6; }
2737fi
2738
2739 if test "x$ac_ct_STRIP" = x; then
2740 STRIP=":"
2741 else
2742 case $cross_compiling:$ac_tool_warned in
2743yes:)
2744{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2745$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2746ac_tool_warned=yes ;;
2747esac
2748 STRIP=$ac_ct_STRIP
2749 fi
2750else
2751 STRIP="$ac_cv_prog_STRIP"
2752fi
2753
2754fi
2755INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2756
2757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2758$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2759if test -z "$MKDIR_P"; then
2760 if test "${ac_cv_path_mkdir+set}" = set; then :
2761 $as_echo_n "(cached) " >&6
2762else
2763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2764for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2765do
2766 IFS=$as_save_IFS
2767 test -z "$as_dir" && as_dir=.
2768 for ac_prog in mkdir gmkdir; do
2769 for ac_exec_ext in '' $ac_executable_extensions; do
2770 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2771 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2772 'mkdir (GNU coreutils) '* | \
2773 'mkdir (coreutils) '* | \
2774 'mkdir (fileutils) '4.1*)
2775 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2776 break 3;;
2777 esac
2778 done
2779 done
2780 done
2781IFS=$as_save_IFS
2782
2783fi
2784
2785 test -d ./--version && rmdir ./--version
2786 if test "${ac_cv_path_mkdir+set}" = set; then
2787 MKDIR_P="$ac_cv_path_mkdir -p"
2788 else
2789 # As a last resort, use the slow shell script. Don't cache a
2790 # value for MKDIR_P within a source directory, because that will
2791 # break other packages using the cache if that directory is
2792 # removed, or if the value is a relative name.
2793 MKDIR_P="$ac_install_sh -d"
2794 fi
2795fi
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2797$as_echo "$MKDIR_P" >&6; }
2798
2799mkdir_p="$MKDIR_P"
2800case $mkdir_p in
2801 [\\/$]* | ?:[\\/]*) ;;
2802 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2803esac
2804
2805for ac_prog in gawk mawk nawk awk
2806do
2807 # Extract the first word of "$ac_prog", so it can be a program name with args.
2808set dummy $ac_prog; ac_word=$2
2809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2810$as_echo_n "checking for $ac_word... " >&6; }
2811if test "${ac_cv_prog_AWK+set}" = set; then :
2812 $as_echo_n "(cached) " >&6
2813else
2814 if test -n "$AWK"; then
2815 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2816else
2817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2818for as_dir in $PATH
2819do
2820 IFS=$as_save_IFS
2821 test -z "$as_dir" && as_dir=.
2822 for ac_exec_ext in '' $ac_executable_extensions; do
2823 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2824 ac_cv_prog_AWK="$ac_prog"
2825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2826 break 2
2827 fi
2828done
2829 done
2830IFS=$as_save_IFS
2831
2832fi
2833fi
2834AWK=$ac_cv_prog_AWK
2835if test -n "$AWK"; then
2836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2837$as_echo "$AWK" >&6; }
2838else
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2840$as_echo "no" >&6; }
2841fi
2842
2843
2844 test -n "$AWK" && break
2845done
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2848$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2849set x ${MAKE-make}
2850ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2851if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
2852 $as_echo_n "(cached) " >&6
2853else
2854 cat >conftest.make <<\_ACEOF
2855SHELL = /bin/sh
2856all:
2857 @echo '@@@%%%=$(MAKE)=@@@%%%'
2858_ACEOF
2859# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2860case `${MAKE-make} -f conftest.make 2>/dev/null` in
2861 *@@@%%%=?*=@@@%%%*)
2862 eval ac_cv_prog_make_${ac_make}_set=yes;;
2863 *)
2864 eval ac_cv_prog_make_${ac_make}_set=no;;
2865esac
2866rm -f conftest.make
2867fi
2868if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2870$as_echo "yes" >&6; }
2871 SET_MAKE=
2872else
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2874$as_echo "no" >&6; }
2875 SET_MAKE="MAKE=${MAKE-make}"
2876fi
2877
2878rm -rf .tst 2>/dev/null
2879mkdir .tst 2>/dev/null
2880if test -d .tst; then
2881 am__leading_dot=.
2882else
2883 am__leading_dot=_
2884fi
2885rmdir .tst 2>/dev/null
2886
2887if test "`cd $srcdir && pwd`" != "`pwd`"; then
2888 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2889 # is not polluted with repeated "-I."
2890 am__isrc=' -I$(srcdir)'
2891 # test to see if srcdir already configured
2892 if test -f $srcdir/config.status; then
2893 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2894 fi
2895fi
2896
2897# test whether we have cygpath
2898if test -z "$CYGPATH_W"; then
2899 if (cygpath --version) >/dev/null 2>/dev/null; then
2900 CYGPATH_W='cygpath -w'
2901 else
2902 CYGPATH_W=echo
2903 fi
2904fi
2905
2906
2907# Define the identity of the package.
2908 PACKAGE='eet'
2909 VERSION='1.5.0'
2910
2911
2912cat >>confdefs.h <<_ACEOF
2913#define PACKAGE "$PACKAGE"
2914_ACEOF
2915
2916
2917cat >>confdefs.h <<_ACEOF
2918#define VERSION "$VERSION"
2919_ACEOF
2920
2921# Some tools Automake needs.
2922
2923ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2924
2925
2926AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2927
2928
2929AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2930
2931
2932AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2933
2934
2935MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2936
2937# We need awk for the "check" target. The system "awk" is bad on
2938# some platforms.
2939# Always define AMTAR for backward compatibility.
2940
2941AMTAR=${AMTAR-"${am_missing_run}tar"}
2942
2943am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2944
2945
2946
2947
2948
2949# Check whether --enable-silent-rules was given.
2950if test "${enable_silent_rules+set}" = set; then :
2951 enableval=$enable_silent_rules;
2952fi
2953
2954case $enable_silent_rules in
2955yes) AM_DEFAULT_VERBOSITY=0;;
2956no) AM_DEFAULT_VERBOSITY=1;;
2957*) AM_DEFAULT_VERBOSITY=0;;
2958esac
2959AM_BACKSLASH='\'
2960
2961
2962# Make sure we can run config.sub.
2963$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2964 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2965
2966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2967$as_echo_n "checking build system type... " >&6; }
2968if test "${ac_cv_build+set}" = set; then :
2969 $as_echo_n "(cached) " >&6
2970else
2971 ac_build_alias=$build_alias
2972test "x$ac_build_alias" = x &&
2973 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2974test "x$ac_build_alias" = x &&
2975 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2976ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2977 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2978
2979fi
2980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2981$as_echo "$ac_cv_build" >&6; }
2982case $ac_cv_build in
2983*-*-*) ;;
2984*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
2985esac
2986build=$ac_cv_build
2987ac_save_IFS=$IFS; IFS='-'
2988set x $ac_cv_build
2989shift
2990build_cpu=$1
2991build_vendor=$2
2992shift; shift
2993# Remember, the first character of IFS is used to create $*,
2994# except with old shells:
2995build_os=$*
2996IFS=$ac_save_IFS
2997case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2998
2999
3000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3001$as_echo_n "checking host system type... " >&6; }
3002if test "${ac_cv_host+set}" = set; then :
3003 $as_echo_n "(cached) " >&6
3004else
3005 if test "x$host_alias" = x; then
3006 ac_cv_host=$ac_cv_build
3007else
3008 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3009 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3010fi
3011
3012fi
3013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3014$as_echo "$ac_cv_host" >&6; }
3015case $ac_cv_host in
3016*-*-*) ;;
3017*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
3018esac
3019host=$ac_cv_host
3020ac_save_IFS=$IFS; IFS='-'
3021set x $ac_cv_host
3022shift
3023host_cpu=$1
3024host_vendor=$2
3025shift; shift
3026# Remember, the first character of IFS is used to create $*,
3027# except with old shells:
3028host_os=$*
3029IFS=$ac_save_IFS
3030case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3031
3032
3033enable_win32_dll=yes
3034
3035case $host in
3036*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
3037 if test -n "$ac_tool_prefix"; then
3038 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
3039set dummy ${ac_tool_prefix}as; ac_word=$2
3040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3041$as_echo_n "checking for $ac_word... " >&6; }
3042if test "${ac_cv_prog_AS+set}" = set; then :
3043 $as_echo_n "(cached) " >&6
3044else
3045 if test -n "$AS"; then
3046 ac_cv_prog_AS="$AS" # Let the user override the test.
3047else
3048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3049for as_dir in $PATH
3050do
3051 IFS=$as_save_IFS
3052 test -z "$as_dir" && as_dir=.
3053 for ac_exec_ext in '' $ac_executable_extensions; do
3054 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3055 ac_cv_prog_AS="${ac_tool_prefix}as"
3056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3057 break 2
3058 fi
3059done
3060 done
3061IFS=$as_save_IFS
3062
3063fi
3064fi
3065AS=$ac_cv_prog_AS
3066if test -n "$AS"; then
3067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
3068$as_echo "$AS" >&6; }
3069else
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3071$as_echo "no" >&6; }
3072fi
3073
3074
3075fi
3076if test -z "$ac_cv_prog_AS"; then
3077 ac_ct_AS=$AS
3078 # Extract the first word of "as", so it can be a program name with args.
3079set dummy as; ac_word=$2
3080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3081$as_echo_n "checking for $ac_word... " >&6; }
3082if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
3083 $as_echo_n "(cached) " >&6
3084else
3085 if test -n "$ac_ct_AS"; then
3086 ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
3087else
3088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3089for as_dir in $PATH
3090do
3091 IFS=$as_save_IFS
3092 test -z "$as_dir" && as_dir=.
3093 for ac_exec_ext in '' $ac_executable_extensions; do
3094 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3095 ac_cv_prog_ac_ct_AS="as"
3096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3097 break 2
3098 fi
3099done
3100 done
3101IFS=$as_save_IFS
3102
3103fi
3104fi
3105ac_ct_AS=$ac_cv_prog_ac_ct_AS
3106if test -n "$ac_ct_AS"; then
3107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
3108$as_echo "$ac_ct_AS" >&6; }
3109else
3110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3111$as_echo "no" >&6; }
3112fi
3113
3114 if test "x$ac_ct_AS" = x; then
3115 AS="false"
3116 else
3117 case $cross_compiling:$ac_tool_warned in
3118yes:)
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3121ac_tool_warned=yes ;;
3122esac
3123 AS=$ac_ct_AS
3124 fi
3125else
3126 AS="$ac_cv_prog_AS"
3127fi
3128
3129 if test -n "$ac_tool_prefix"; then
3130 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3131set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3133$as_echo_n "checking for $ac_word... " >&6; }
3134if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
3135 $as_echo_n "(cached) " >&6
3136else
3137 if test -n "$DLLTOOL"; then
3138 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3139else
3140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3141for as_dir in $PATH
3142do
3143 IFS=$as_save_IFS
3144 test -z "$as_dir" && as_dir=.
3145 for ac_exec_ext in '' $ac_executable_extensions; do
3146 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3147 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3148 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3149 break 2
3150 fi
3151done
3152 done
3153IFS=$as_save_IFS
3154
3155fi
3156fi
3157DLLTOOL=$ac_cv_prog_DLLTOOL
3158if test -n "$DLLTOOL"; then
3159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
3160$as_echo "$DLLTOOL" >&6; }
3161else
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3163$as_echo "no" >&6; }
3164fi
3165
3166
3167fi
3168if test -z "$ac_cv_prog_DLLTOOL"; then
3169 ac_ct_DLLTOOL=$DLLTOOL
3170 # Extract the first word of "dlltool", so it can be a program name with args.
3171set dummy dlltool; ac_word=$2
3172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3173$as_echo_n "checking for $ac_word... " >&6; }
3174if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
3175 $as_echo_n "(cached) " >&6
3176else
3177 if test -n "$ac_ct_DLLTOOL"; then
3178 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
3179else
3180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3181for as_dir in $PATH
3182do
3183 IFS=$as_save_IFS
3184 test -z "$as_dir" && as_dir=.
3185 for ac_exec_ext in '' $ac_executable_extensions; do
3186 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3187 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
3188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3189 break 2
3190 fi
3191done
3192 done
3193IFS=$as_save_IFS
3194
3195fi
3196fi
3197ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
3198if test -n "$ac_ct_DLLTOOL"; then
3199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
3200$as_echo "$ac_ct_DLLTOOL" >&6; }
3201else
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3203$as_echo "no" >&6; }
3204fi
3205
3206 if test "x$ac_ct_DLLTOOL" = x; then
3207 DLLTOOL="false"
3208 else
3209 case $cross_compiling:$ac_tool_warned in
3210yes:)
3211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3213ac_tool_warned=yes ;;
3214esac
3215 DLLTOOL=$ac_ct_DLLTOOL
3216 fi
3217else
3218 DLLTOOL="$ac_cv_prog_DLLTOOL"
3219fi
3220
3221 if test -n "$ac_tool_prefix"; then
3222 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
3223set dummy ${ac_tool_prefix}objdump; ac_word=$2
3224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3225$as_echo_n "checking for $ac_word... " >&6; }
3226if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
3227 $as_echo_n "(cached) " >&6
3228else
3229 if test -n "$OBJDUMP"; then
3230 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
3231else
3232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233for as_dir in $PATH
3234do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
3237 for ac_exec_ext in '' $ac_executable_extensions; do
3238 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3239 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3241 break 2
3242 fi
3243done
3244 done
3245IFS=$as_save_IFS
3246
3247fi
3248fi
3249OBJDUMP=$ac_cv_prog_OBJDUMP
3250if test -n "$OBJDUMP"; then
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
3252$as_echo "$OBJDUMP" >&6; }
3253else
3254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3255$as_echo "no" >&6; }
3256fi
3257
3258
3259fi
3260if test -z "$ac_cv_prog_OBJDUMP"; then
3261 ac_ct_OBJDUMP=$OBJDUMP
3262 # Extract the first word of "objdump", so it can be a program name with args.
3263set dummy objdump; ac_word=$2
3264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3265$as_echo_n "checking for $ac_word... " >&6; }
3266if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
3267 $as_echo_n "(cached) " >&6
3268else
3269 if test -n "$ac_ct_OBJDUMP"; then
3270 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
3271else
3272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273for as_dir in $PATH
3274do
3275 IFS=$as_save_IFS
3276 test -z "$as_dir" && as_dir=.
3277 for ac_exec_ext in '' $ac_executable_extensions; do
3278 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3279 ac_cv_prog_ac_ct_OBJDUMP="objdump"
3280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3281 break 2
3282 fi
3283done
3284 done
3285IFS=$as_save_IFS
3286
3287fi
3288fi
3289ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
3290if test -n "$ac_ct_OBJDUMP"; then
3291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
3292$as_echo "$ac_ct_OBJDUMP" >&6; }
3293else
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3295$as_echo "no" >&6; }
3296fi
3297
3298 if test "x$ac_ct_OBJDUMP" = x; then
3299 OBJDUMP="false"
3300 else
3301 case $cross_compiling:$ac_tool_warned in
3302yes:)
3303{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3304$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3305ac_tool_warned=yes ;;
3306esac
3307 OBJDUMP=$ac_ct_OBJDUMP
3308 fi
3309else
3310 OBJDUMP="$ac_cv_prog_OBJDUMP"
3311fi
3312
3313 ;;
3314esac
3315
3316test -z "$AS" && AS=as
3317
3318
3319
3320
3321
3322test -z "$DLLTOOL" && DLLTOOL=dlltool
3323
3324
3325
3326
3327
3328test -z "$OBJDUMP" && OBJDUMP=objdump
3329
3330
3331
3332
3333
3334
3335
3336case `pwd` in
3337 *\ * | *\ *)
3338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
3339$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
3340esac
3341
3342
3343
3344macro_version='2.2.6b'
3345macro_revision='1.3017'
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359ltmain="$ac_aux_dir/ltmain.sh"
3360
3361DEPDIR="${am__leading_dot}deps"
3362
3363ac_config_commands="$ac_config_commands depfiles"
3364
3365
3366am_make=${MAKE-make}
3367cat > confinc << 'END'
3368am__doit:
3369 @echo this is the am__doit target
3370.PHONY: am__doit
3371END
3372# If we don't find an include directive, just comment out the code.
3373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3374$as_echo_n "checking for style of include used by $am_make... " >&6; }
3375am__include="#"
3376am__quote=
3377_am_result=none
3378# First try GNU make style include.
3379echo "include confinc" > confmf
3380# Ignore all kinds of additional output from `make'.
3381case `$am_make -s -f confmf 2> /dev/null` in #(
3382*the\ am__doit\ target*)
3383 am__include=include
3384 am__quote=
3385 _am_result=GNU
3386 ;;
3387esac
3388# Now try BSD make style include.
3389if test "$am__include" = "#"; then
3390 echo '.include "confinc"' > confmf
3391 case `$am_make -s -f confmf 2> /dev/null` in #(
3392 *the\ am__doit\ target*)
3393 am__include=.include
3394 am__quote="\""
3395 _am_result=BSD
3396 ;;
3397 esac
3398fi
3399
3400
3401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3402$as_echo "$_am_result" >&6; }
3403rm -f confinc confmf
3404
3405# Check whether --enable-dependency-tracking was given.
3406if test "${enable_dependency_tracking+set}" = set; then :
3407 enableval=$enable_dependency_tracking;
3408fi
3409
3410if test "x$enable_dependency_tracking" != xno; then
3411 am_depcomp="$ac_aux_dir/depcomp"
3412 AMDEPBACKSLASH='\'
3413fi
3414 if test "x$enable_dependency_tracking" != xno; then
3415 AMDEP_TRUE=
3416 AMDEP_FALSE='#'
3417else
3418 AMDEP_TRUE='#'
3419 AMDEP_FALSE=
3420fi
3421
3422
3423ac_ext=c
3424ac_cpp='$CPP $CPPFLAGS'
3425ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3426ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3427ac_compiler_gnu=$ac_cv_c_compiler_gnu
3428if test -n "$ac_tool_prefix"; then
3429 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3430set dummy ${ac_tool_prefix}gcc; ac_word=$2
3431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3432$as_echo_n "checking for $ac_word... " >&6; }
3433if test "${ac_cv_prog_CC+set}" = set; then :
3434 $as_echo_n "(cached) " >&6
3435else
3436 if test -n "$CC"; then
3437 ac_cv_prog_CC="$CC" # Let the user override the test.
3438else
3439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3440for as_dir in $PATH
3441do
3442 IFS=$as_save_IFS
3443 test -z "$as_dir" && as_dir=.
3444 for ac_exec_ext in '' $ac_executable_extensions; do
3445 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3446 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3447 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3448 break 2
3449 fi
3450done
3451 done
3452IFS=$as_save_IFS
3453
3454fi
3455fi
3456CC=$ac_cv_prog_CC
3457if test -n "$CC"; then
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3459$as_echo "$CC" >&6; }
3460else
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3462$as_echo "no" >&6; }
3463fi
3464
3465
3466fi
3467if test -z "$ac_cv_prog_CC"; then
3468 ac_ct_CC=$CC
3469 # Extract the first word of "gcc", so it can be a program name with args.
3470set dummy gcc; ac_word=$2
3471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3472$as_echo_n "checking for $ac_word... " >&6; }
3473if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3474 $as_echo_n "(cached) " >&6
3475else
3476 if test -n "$ac_ct_CC"; then
3477 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3478else
3479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480for as_dir in $PATH
3481do
3482 IFS=$as_save_IFS
3483 test -z "$as_dir" && as_dir=.
3484 for ac_exec_ext in '' $ac_executable_extensions; do
3485 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3486 ac_cv_prog_ac_ct_CC="gcc"
3487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3488 break 2
3489 fi
3490done
3491 done
3492IFS=$as_save_IFS
3493
3494fi
3495fi
3496ac_ct_CC=$ac_cv_prog_ac_ct_CC
3497if test -n "$ac_ct_CC"; then
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3499$as_echo "$ac_ct_CC" >&6; }
3500else
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3502$as_echo "no" >&6; }
3503fi
3504
3505 if test "x$ac_ct_CC" = x; then
3506 CC=""
3507 else
3508 case $cross_compiling:$ac_tool_warned in
3509yes:)
3510{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3511$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3512ac_tool_warned=yes ;;
3513esac
3514 CC=$ac_ct_CC
3515 fi
3516else
3517 CC="$ac_cv_prog_CC"
3518fi
3519
3520if test -z "$CC"; then
3521 if test -n "$ac_tool_prefix"; then
3522 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3523set dummy ${ac_tool_prefix}cc; ac_word=$2
3524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3525$as_echo_n "checking for $ac_word... " >&6; }
3526if test "${ac_cv_prog_CC+set}" = set; then :
3527 $as_echo_n "(cached) " >&6
3528else
3529 if test -n "$CC"; then
3530 ac_cv_prog_CC="$CC" # Let the user override the test.
3531else
3532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3533for as_dir in $PATH
3534do
3535 IFS=$as_save_IFS
3536 test -z "$as_dir" && as_dir=.
3537 for ac_exec_ext in '' $ac_executable_extensions; do
3538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3539 ac_cv_prog_CC="${ac_tool_prefix}cc"
3540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3541 break 2
3542 fi
3543done
3544 done
3545IFS=$as_save_IFS
3546
3547fi
3548fi
3549CC=$ac_cv_prog_CC
3550if test -n "$CC"; then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3552$as_echo "$CC" >&6; }
3553else
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3555$as_echo "no" >&6; }
3556fi
3557
3558
3559 fi
3560fi
3561if test -z "$CC"; then
3562 # Extract the first word of "cc", so it can be a program name with args.
3563set dummy cc; ac_word=$2
3564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
3566if test "${ac_cv_prog_CC+set}" = set; then :
3567 $as_echo_n "(cached) " >&6
3568else
3569 if test -n "$CC"; then
3570 ac_cv_prog_CC="$CC" # Let the user override the test.
3571else
3572 ac_prog_rejected=no
3573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574for as_dir in $PATH
3575do
3576 IFS=$as_save_IFS
3577 test -z "$as_dir" && as_dir=.
3578 for ac_exec_ext in '' $ac_executable_extensions; do
3579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3580 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3581 ac_prog_rejected=yes
3582 continue
3583 fi
3584 ac_cv_prog_CC="cc"
3585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3586 break 2
3587 fi
3588done
3589 done
3590IFS=$as_save_IFS
3591
3592if test $ac_prog_rejected = yes; then
3593 # We found a bogon in the path, so make sure we never use it.
3594 set dummy $ac_cv_prog_CC
3595 shift
3596 if test $# != 0; then
3597 # We chose a different compiler from the bogus one.
3598 # However, it has the same basename, so the bogon will be chosen
3599 # first if we set CC to just the basename; use the full file name.
3600 shift
3601 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3602 fi
3603fi
3604fi
3605fi
3606CC=$ac_cv_prog_CC
3607if test -n "$CC"; then
3608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3609$as_echo "$CC" >&6; }
3610else
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
3613fi
3614
3615
3616fi
3617if test -z "$CC"; then
3618 if test -n "$ac_tool_prefix"; then
3619 for ac_prog in cl.exe
3620 do
3621 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3622set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3624$as_echo_n "checking for $ac_word... " >&6; }
3625if test "${ac_cv_prog_CC+set}" = set; then :
3626 $as_echo_n "(cached) " >&6
3627else
3628 if test -n "$CC"; then
3629 ac_cv_prog_CC="$CC" # Let the user override the test.
3630else
3631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3632for as_dir in $PATH
3633do
3634 IFS=$as_save_IFS
3635 test -z "$as_dir" && as_dir=.
3636 for ac_exec_ext in '' $ac_executable_extensions; do
3637 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3638 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3640 break 2
3641 fi
3642done
3643 done
3644IFS=$as_save_IFS
3645
3646fi
3647fi
3648CC=$ac_cv_prog_CC
3649if test -n "$CC"; then
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3651$as_echo "$CC" >&6; }
3652else
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3654$as_echo "no" >&6; }
3655fi
3656
3657
3658 test -n "$CC" && break
3659 done
3660fi
3661if test -z "$CC"; then
3662 ac_ct_CC=$CC
3663 for ac_prog in cl.exe
3664do
3665 # Extract the first word of "$ac_prog", so it can be a program name with args.
3666set dummy $ac_prog; ac_word=$2
3667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3668$as_echo_n "checking for $ac_word... " >&6; }
3669if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3670 $as_echo_n "(cached) " >&6
3671else
3672 if test -n "$ac_ct_CC"; then
3673 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3674else
3675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3676for as_dir in $PATH
3677do
3678 IFS=$as_save_IFS
3679 test -z "$as_dir" && as_dir=.
3680 for ac_exec_ext in '' $ac_executable_extensions; do
3681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3682 ac_cv_prog_ac_ct_CC="$ac_prog"
3683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3684 break 2
3685 fi
3686done
3687 done
3688IFS=$as_save_IFS
3689
3690fi
3691fi
3692ac_ct_CC=$ac_cv_prog_ac_ct_CC
3693if test -n "$ac_ct_CC"; then
3694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3695$as_echo "$ac_ct_CC" >&6; }
3696else
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3698$as_echo "no" >&6; }
3699fi
3700
3701
3702 test -n "$ac_ct_CC" && break
3703done
3704
3705 if test "x$ac_ct_CC" = x; then
3706 CC=""
3707 else
3708 case $cross_compiling:$ac_tool_warned in
3709yes:)
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3711$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3712ac_tool_warned=yes ;;
3713esac
3714 CC=$ac_ct_CC
3715 fi
3716fi
3717
3718fi
3719
3720
3721test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3723as_fn_error $? "no acceptable C compiler found in \$PATH
3724See \`config.log' for more details" "$LINENO" 5 ; }
3725
3726# Provide some information about the compiler.
3727$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3728set X $ac_compile
3729ac_compiler=$2
3730for ac_option in --version -v -V -qversion; do
3731 { { ac_try="$ac_compiler $ac_option >&5"
3732case "(($ac_try" in
3733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3734 *) ac_try_echo=$ac_try;;
3735esac
3736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3737$as_echo "$ac_try_echo"; } >&5
3738 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3739 ac_status=$?
3740 if test -s conftest.err; then
3741 sed '10a\
3742... rest of stderr output deleted ...
3743 10q' conftest.err >conftest.er1
3744 cat conftest.er1 >&5
3745 fi
3746 rm -f conftest.er1 conftest.err
3747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3748 test $ac_status = 0; }
3749done
3750
3751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3752/* end confdefs.h. */
3753
3754int
3755main ()
3756{
3757
3758 ;
3759 return 0;
3760}
3761_ACEOF
3762ac_clean_files_save=$ac_clean_files
3763ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3764# Try to create an executable without -o first, disregard a.out.
3765# It will help us diagnose broken compilers, and finding out an intuition
3766# of exeext.
3767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3768$as_echo_n "checking whether the C compiler works... " >&6; }
3769ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3770
3771# The possible output files:
3772ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3773
3774ac_rmfiles=
3775for ac_file in $ac_files
3776do
3777 case $ac_file in
3778 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3779 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3780 esac
3781done
3782rm -f $ac_rmfiles
3783
3784if { { ac_try="$ac_link_default"
3785case "(($ac_try" in
3786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3787 *) ac_try_echo=$ac_try;;
3788esac
3789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3790$as_echo "$ac_try_echo"; } >&5
3791 (eval "$ac_link_default") 2>&5
3792 ac_status=$?
3793 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3794 test $ac_status = 0; }; then :
3795 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3796# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3797# in a Makefile. We should not override ac_cv_exeext if it was cached,
3798# so that the user can short-circuit this test for compilers unknown to
3799# Autoconf.
3800for ac_file in $ac_files ''
3801do
3802 test -f "$ac_file" || continue
3803 case $ac_file in
3804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3805 ;;
3806 [ab].out )
3807 # We found the default executable, but exeext='' is most
3808 # certainly right.
3809 break;;
3810 *.* )
3811 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3812 then :; else
3813 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3814 fi
3815 # We set ac_cv_exeext here because the later test for it is not
3816 # safe: cross compilers may not add the suffix if given an `-o'
3817 # argument, so we may need to know it at that point already.
3818 # Even if this section looks crufty: it has the advantage of
3819 # actually working.
3820 break;;
3821 * )
3822 break;;
3823 esac
3824done
3825test "$ac_cv_exeext" = no && ac_cv_exeext=
3826
3827else
3828 ac_file=''
3829fi
3830if test -z "$ac_file"; then :
3831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3832$as_echo "no" >&6; }
3833$as_echo "$as_me: failed program was:" >&5
3834sed 's/^/| /' conftest.$ac_ext >&5
3835
3836{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3838as_fn_error 77 "C compiler cannot create executables
3839See \`config.log' for more details" "$LINENO" 5 ; }
3840else
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3842$as_echo "yes" >&6; }
3843fi
3844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3845$as_echo_n "checking for C compiler default output file name... " >&6; }
3846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3847$as_echo "$ac_file" >&6; }
3848ac_exeext=$ac_cv_exeext
3849
3850rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3851ac_clean_files=$ac_clean_files_save
3852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3853$as_echo_n "checking for suffix of executables... " >&6; }
3854if { { ac_try="$ac_link"
3855case "(($ac_try" in
3856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3857 *) ac_try_echo=$ac_try;;
3858esac
3859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3860$as_echo "$ac_try_echo"; } >&5
3861 (eval "$ac_link") 2>&5
3862 ac_status=$?
3863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3864 test $ac_status = 0; }; then :
3865 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3866# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3867# work properly (i.e., refer to `conftest.exe'), while it won't with
3868# `rm'.
3869for ac_file in conftest.exe conftest conftest.*; do
3870 test -f "$ac_file" || continue
3871 case $ac_file in
3872 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3873 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3874 break;;
3875 * ) break;;
3876 esac
3877done
3878else
3879 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3881as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3882See \`config.log' for more details" "$LINENO" 5 ; }
3883fi
3884rm -f conftest conftest$ac_cv_exeext
3885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3886$as_echo "$ac_cv_exeext" >&6; }
3887
3888rm -f conftest.$ac_ext
3889EXEEXT=$ac_cv_exeext
3890ac_exeext=$EXEEXT
3891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3892/* end confdefs.h. */
3893#include <stdio.h>
3894int
3895main ()
3896{
3897FILE *f = fopen ("conftest.out", "w");
3898 return ferror (f) || fclose (f) != 0;
3899
3900 ;
3901 return 0;
3902}
3903_ACEOF
3904ac_clean_files="$ac_clean_files conftest.out"
3905# Check that the compiler produces executables we can run. If not, either
3906# the compiler is broken, or we cross compile.
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3908$as_echo_n "checking whether we are cross compiling... " >&6; }
3909if test "$cross_compiling" != yes; then
3910 { { ac_try="$ac_link"
3911case "(($ac_try" in
3912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3913 *) ac_try_echo=$ac_try;;
3914esac
3915eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3916$as_echo "$ac_try_echo"; } >&5
3917 (eval "$ac_link") 2>&5
3918 ac_status=$?
3919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3920 test $ac_status = 0; }
3921 if { ac_try='./conftest$ac_cv_exeext'
3922 { { case "(($ac_try" in
3923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3924 *) ac_try_echo=$ac_try;;
3925esac
3926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3927$as_echo "$ac_try_echo"; } >&5
3928 (eval "$ac_try") 2>&5
3929 ac_status=$?
3930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3931 test $ac_status = 0; }; }; then
3932 cross_compiling=no
3933 else
3934 if test "$cross_compiling" = maybe; then
3935 cross_compiling=yes
3936 else
3937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3939as_fn_error $? "cannot run C compiled programs.
3940If you meant to cross compile, use \`--host'.
3941See \`config.log' for more details" "$LINENO" 5 ; }
3942 fi
3943 fi
3944fi
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3946$as_echo "$cross_compiling" >&6; }
3947
3948rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3949ac_clean_files=$ac_clean_files_save
3950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3951$as_echo_n "checking for suffix of object files... " >&6; }
3952if test "${ac_cv_objext+set}" = set; then :
3953 $as_echo_n "(cached) " >&6
3954else
3955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3956/* end confdefs.h. */
3957
3958int
3959main ()
3960{
3961
3962 ;
3963 return 0;
3964}
3965_ACEOF
3966rm -f conftest.o conftest.obj
3967if { { ac_try="$ac_compile"
3968case "(($ac_try" in
3969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3970 *) ac_try_echo=$ac_try;;
3971esac
3972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3973$as_echo "$ac_try_echo"; } >&5
3974 (eval "$ac_compile") 2>&5
3975 ac_status=$?
3976 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3977 test $ac_status = 0; }; then :
3978 for ac_file in conftest.o conftest.obj conftest.*; do
3979 test -f "$ac_file" || continue;
3980 case $ac_file in
3981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3982 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3983 break;;
3984 esac
3985done
3986else
3987 $as_echo "$as_me: failed program was:" >&5
3988sed 's/^/| /' conftest.$ac_ext >&5
3989
3990{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3992as_fn_error $? "cannot compute suffix of object files: cannot compile
3993See \`config.log' for more details" "$LINENO" 5 ; }
3994fi
3995rm -f conftest.$ac_cv_objext conftest.$ac_ext
3996fi
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3998$as_echo "$ac_cv_objext" >&6; }
3999OBJEXT=$ac_cv_objext
4000ac_objext=$OBJEXT
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4002$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4003if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4004 $as_echo_n "(cached) " >&6
4005else
4006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4007/* end confdefs.h. */
4008
4009int
4010main ()
4011{
4012#ifndef __GNUC__
4013 choke me
4014#endif
4015
4016 ;
4017 return 0;
4018}
4019_ACEOF
4020if ac_fn_c_try_compile "$LINENO"; then :
4021 ac_compiler_gnu=yes
4022else
4023 ac_compiler_gnu=no
4024fi
4025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4026ac_cv_c_compiler_gnu=$ac_compiler_gnu
4027
4028fi
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4030$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4031if test $ac_compiler_gnu = yes; then
4032 GCC=yes
4033else
4034 GCC=
4035fi
4036ac_test_CFLAGS=${CFLAGS+set}
4037ac_save_CFLAGS=$CFLAGS
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4039$as_echo_n "checking whether $CC accepts -g... " >&6; }
4040if test "${ac_cv_prog_cc_g+set}" = set; then :
4041 $as_echo_n "(cached) " >&6
4042else
4043 ac_save_c_werror_flag=$ac_c_werror_flag
4044 ac_c_werror_flag=yes
4045 ac_cv_prog_cc_g=no
4046 CFLAGS="-g"
4047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4048/* end confdefs.h. */
4049
4050int
4051main ()
4052{
4053
4054 ;
4055 return 0;
4056}
4057_ACEOF
4058if ac_fn_c_try_compile "$LINENO"; then :
4059 ac_cv_prog_cc_g=yes
4060else
4061 CFLAGS=""
4062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063/* end confdefs.h. */
4064
4065int
4066main ()
4067{
4068
4069 ;
4070 return 0;
4071}
4072_ACEOF
4073if ac_fn_c_try_compile "$LINENO"; then :
4074
4075else
4076 ac_c_werror_flag=$ac_save_c_werror_flag
4077 CFLAGS="-g"
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4079/* end confdefs.h. */
4080
4081int
4082main ()
4083{
4084
4085 ;
4086 return 0;
4087}
4088_ACEOF
4089if ac_fn_c_try_compile "$LINENO"; then :
4090 ac_cv_prog_cc_g=yes
4091fi
4092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4093fi
4094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4095fi
4096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4097 ac_c_werror_flag=$ac_save_c_werror_flag
4098fi
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4100$as_echo "$ac_cv_prog_cc_g" >&6; }
4101if test "$ac_test_CFLAGS" = set; then
4102 CFLAGS=$ac_save_CFLAGS
4103elif test $ac_cv_prog_cc_g = yes; then
4104 if test "$GCC" = yes; then
4105 CFLAGS="-g -O2"
4106 else
4107 CFLAGS="-g"
4108 fi
4109else
4110 if test "$GCC" = yes; then
4111 CFLAGS="-O2"
4112 else
4113 CFLAGS=
4114 fi
4115fi
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4117$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4118if test "${ac_cv_prog_cc_c89+set}" = set; then :
4119 $as_echo_n "(cached) " >&6
4120else
4121 ac_cv_prog_cc_c89=no
4122ac_save_CC=$CC
4123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4124/* end confdefs.h. */
4125#include <stdarg.h>
4126#include <stdio.h>
4127#include <sys/types.h>
4128#include <sys/stat.h>
4129/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4130struct buf { int x; };
4131FILE * (*rcsopen) (struct buf *, struct stat *, int);
4132static char *e (p, i)
4133 char **p;
4134 int i;
4135{
4136 return p[i];
4137}
4138static char *f (char * (*g) (char **, int), char **p, ...)
4139{
4140 char *s;
4141 va_list v;
4142 va_start (v,p);
4143 s = g (p, va_arg (v,int));
4144 va_end (v);
4145 return s;
4146}
4147
4148/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4149 function prototypes and stuff, but not '\xHH' hex character constants.
4150 These don't provoke an error unfortunately, instead are silently treated
4151 as 'x'. The following induces an error, until -std is added to get
4152 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4153 array size at least. It's necessary to write '\x00'==0 to get something
4154 that's true only with -std. */
4155int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4156
4157/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4158 inside strings and character constants. */
4159#define FOO(x) 'x'
4160int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4161
4162int test (int i, double x);
4163struct s1 {int (*f) (int a);};
4164struct s2 {int (*f) (double a);};
4165int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4166int argc;
4167char **argv;
4168int
4169main ()
4170{
4171return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4172 ;
4173 return 0;
4174}
4175_ACEOF
4176for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4177 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4178do
4179 CC="$ac_save_CC $ac_arg"
4180 if ac_fn_c_try_compile "$LINENO"; then :
4181 ac_cv_prog_cc_c89=$ac_arg
4182fi
4183rm -f core conftest.err conftest.$ac_objext
4184 test "x$ac_cv_prog_cc_c89" != "xno" && break
4185done
4186rm -f conftest.$ac_ext
4187CC=$ac_save_CC
4188
4189fi
4190# AC_CACHE_VAL
4191case "x$ac_cv_prog_cc_c89" in
4192 x)
4193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4194$as_echo "none needed" >&6; } ;;
4195 xno)
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4197$as_echo "unsupported" >&6; } ;;
4198 *)
4199 CC="$CC $ac_cv_prog_cc_c89"
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4201$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4202esac
4203if test "x$ac_cv_prog_cc_c89" != xno; then :
4204
4205fi
4206
4207ac_ext=c
4208ac_cpp='$CPP $CPPFLAGS'
4209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4211ac_compiler_gnu=$ac_cv_c_compiler_gnu
4212
4213depcc="$CC" am_compiler_list=
4214
4215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4216$as_echo_n "checking dependency style of $depcc... " >&6; }
4217if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4218 $as_echo_n "(cached) " >&6
4219else
4220 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4221 # We make a subdir and do the tests there. Otherwise we can end up
4222 # making bogus files that we don't know about and never remove. For
4223 # instance it was reported that on HP-UX the gcc test will end up
4224 # making a dummy file named `D' -- because `-MD' means `put the output
4225 # in D'.
4226 mkdir conftest.dir
4227 # Copy depcomp to subdir because otherwise we won't find it if we're
4228 # using a relative directory.
4229 cp "$am_depcomp" conftest.dir
4230 cd conftest.dir
4231 # We will build objects and dependencies in a subdirectory because
4232 # it helps to detect inapplicable dependency modes. For instance
4233 # both Tru64's cc and ICC support -MD to output dependencies as a
4234 # side effect of compilation, but ICC will put the dependencies in
4235 # the current directory while Tru64 will put them in the object
4236 # directory.
4237 mkdir sub
4238
4239 am_cv_CC_dependencies_compiler_type=none
4240 if test "$am_compiler_list" = ""; then
4241 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4242 fi
4243 am__universal=false
4244 case " $depcc " in #(
4245 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4246 esac
4247
4248 for depmode in $am_compiler_list; do
4249 # Setup a source with many dependencies, because some compilers
4250 # like to wrap large dependency lists on column 80 (with \), and
4251 # we should not choose a depcomp mode which is confused by this.
4252 #
4253 # We need to recreate these files for each test, as the compiler may
4254 # overwrite some of them when testing with obscure command lines.
4255 # This happens at least with the AIX C compiler.
4256 : > sub/conftest.c
4257 for i in 1 2 3 4 5 6; do
4258 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4259 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4260 # Solaris 8's {/usr,}/bin/sh.
4261 touch sub/conftst$i.h
4262 done
4263 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4264
4265 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4266 # mode. It turns out that the SunPro C++ compiler does not properly
4267 # handle `-M -o', and we need to detect this. Also, some Intel
4268 # versions had trouble with output in subdirs
4269 am__obj=sub/conftest.${OBJEXT-o}
4270 am__minus_obj="-o $am__obj"
4271 case $depmode in
4272 gcc)
4273 # This depmode causes a compiler race in universal mode.
4274 test "$am__universal" = false || continue
4275 ;;
4276 nosideeffect)
4277 # after this tag, mechanisms are not by side-effect, so they'll
4278 # only be used when explicitly requested
4279 if test "x$enable_dependency_tracking" = xyes; then
4280 continue
4281 else
4282 break
4283 fi
4284 ;;
4285 msvisualcpp | msvcmsys)
4286 # This compiler won't grok `-c -o', but also, the minuso test has
4287 # not run yet. These depmodes are late enough in the game, and
4288 # so weak that their functioning should not be impacted.
4289 am__obj=conftest.${OBJEXT-o}
4290 am__minus_obj=
4291 ;;
4292 none) break ;;
4293 esac
4294 if depmode=$depmode \
4295 source=sub/conftest.c object=$am__obj \
4296 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4297 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4298 >/dev/null 2>conftest.err &&
4299 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4300 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4301 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4302 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4303 # icc doesn't choke on unknown options, it will just issue warnings
4304 # or remarks (even with -Werror). So we grep stderr for any message
4305 # that says an option was ignored or not supported.
4306 # When given -MP, icc 7.0 and 7.1 complain thusly:
4307 # icc: Command line warning: ignoring option '-M'; no argument required
4308 # The diagnosis changed in icc 8.0:
4309 # icc: Command line remark: option '-MP' not supported
4310 if (grep 'ignoring option' conftest.err ||
4311 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4312 am_cv_CC_dependencies_compiler_type=$depmode
4313 break
4314 fi
4315 fi
4316 done
4317
4318 cd ..
4319 rm -rf conftest.dir
4320else
4321 am_cv_CC_dependencies_compiler_type=none
4322fi
4323
4324fi
4325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4326$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4327CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4328
4329 if
4330 test "x$enable_dependency_tracking" != xno \
4331 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4332 am__fastdepCC_TRUE=
4333 am__fastdepCC_FALSE='#'
4334else
4335 am__fastdepCC_TRUE='#'
4336 am__fastdepCC_FALSE=
4337fi
4338
4339
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4341$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4342if test "${ac_cv_path_SED+set}" = set; then :
4343 $as_echo_n "(cached) " >&6
4344else
4345 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4346 for ac_i in 1 2 3 4 5 6 7; do
4347 ac_script="$ac_script$as_nl$ac_script"
4348 done
4349 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4350 { ac_script=; unset ac_script;}
4351 if test -z "$SED"; then
4352 ac_path_SED_found=false
4353 # Loop through the user's path and test for each of PROGNAME-LIST
4354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355for as_dir in $PATH
4356do
4357 IFS=$as_save_IFS
4358 test -z "$as_dir" && as_dir=.
4359 for ac_prog in sed gsed; do
4360 for ac_exec_ext in '' $ac_executable_extensions; do
4361 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4362 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
4363# Check for GNU ac_path_SED and select it if it is found.
4364 # Check for GNU $ac_path_SED
4365case `"$ac_path_SED" --version 2>&1` in
4366*GNU*)
4367 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4368*)
4369 ac_count=0
4370 $as_echo_n 0123456789 >"conftest.in"
4371 while :
4372 do
4373 cat "conftest.in" "conftest.in" >"conftest.tmp"
4374 mv "conftest.tmp" "conftest.in"
4375 cp "conftest.in" "conftest.nl"
4376 $as_echo '' >> "conftest.nl"
4377 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4378 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4379 as_fn_arith $ac_count + 1 && ac_count=$as_val
4380 if test $ac_count -gt ${ac_path_SED_max-0}; then
4381 # Best one so far, save it but keep looking for a better one
4382 ac_cv_path_SED="$ac_path_SED"
4383 ac_path_SED_max=$ac_count
4384 fi
4385 # 10*(2^10) chars as input seems more than enough
4386 test $ac_count -gt 10 && break
4387 done
4388 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4389esac
4390
4391 $ac_path_SED_found && break 3
4392 done
4393 done
4394 done
4395IFS=$as_save_IFS
4396 if test -z "$ac_cv_path_SED"; then
4397 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4398 fi
4399else
4400 ac_cv_path_SED=$SED
4401fi
4402
4403fi
4404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4405$as_echo "$ac_cv_path_SED" >&6; }
4406 SED="$ac_cv_path_SED"
4407 rm -f conftest.sed
4408
4409test -z "$SED" && SED=sed
4410Xsed="$SED -e 1s/^X//"
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4423$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4424if test "${ac_cv_path_GREP+set}" = set; then :
4425 $as_echo_n "(cached) " >&6
4426else
4427 if test -z "$GREP"; then
4428 ac_path_GREP_found=false
4429 # Loop through the user's path and test for each of PROGNAME-LIST
4430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4431for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4432do
4433 IFS=$as_save_IFS
4434 test -z "$as_dir" && as_dir=.
4435 for ac_prog in grep ggrep; do
4436 for ac_exec_ext in '' $ac_executable_extensions; do
4437 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4438 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4439# Check for GNU ac_path_GREP and select it if it is found.
4440 # Check for GNU $ac_path_GREP
4441case `"$ac_path_GREP" --version 2>&1` in
4442*GNU*)
4443 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4444*)
4445 ac_count=0
4446 $as_echo_n 0123456789 >"conftest.in"
4447 while :
4448 do
4449 cat "conftest.in" "conftest.in" >"conftest.tmp"
4450 mv "conftest.tmp" "conftest.in"
4451 cp "conftest.in" "conftest.nl"
4452 $as_echo 'GREP' >> "conftest.nl"
4453 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4454 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4455 as_fn_arith $ac_count + 1 && ac_count=$as_val
4456 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4457 # Best one so far, save it but keep looking for a better one
4458 ac_cv_path_GREP="$ac_path_GREP"
4459 ac_path_GREP_max=$ac_count
4460 fi
4461 # 10*(2^10) chars as input seems more than enough
4462 test $ac_count -gt 10 && break
4463 done
4464 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4465esac
4466
4467 $ac_path_GREP_found && break 3
4468 done
4469 done
4470 done
4471IFS=$as_save_IFS
4472 if test -z "$ac_cv_path_GREP"; then
4473 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4474 fi
4475else
4476 ac_cv_path_GREP=$GREP
4477fi
4478
4479fi
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4481$as_echo "$ac_cv_path_GREP" >&6; }
4482 GREP="$ac_cv_path_GREP"
4483
4484
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4486$as_echo_n "checking for egrep... " >&6; }
4487if test "${ac_cv_path_EGREP+set}" = set; then :
4488 $as_echo_n "(cached) " >&6
4489else
4490 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4491 then ac_cv_path_EGREP="$GREP -E"
4492 else
4493 if test -z "$EGREP"; then
4494 ac_path_EGREP_found=false
4495 # Loop through the user's path and test for each of PROGNAME-LIST
4496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4498do
4499 IFS=$as_save_IFS
4500 test -z "$as_dir" && as_dir=.
4501 for ac_prog in egrep; do
4502 for ac_exec_ext in '' $ac_executable_extensions; do
4503 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4504 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4505# Check for GNU ac_path_EGREP and select it if it is found.
4506 # Check for GNU $ac_path_EGREP
4507case `"$ac_path_EGREP" --version 2>&1` in
4508*GNU*)
4509 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4510*)
4511 ac_count=0
4512 $as_echo_n 0123456789 >"conftest.in"
4513 while :
4514 do
4515 cat "conftest.in" "conftest.in" >"conftest.tmp"
4516 mv "conftest.tmp" "conftest.in"
4517 cp "conftest.in" "conftest.nl"
4518 $as_echo 'EGREP' >> "conftest.nl"
4519 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4520 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4521 as_fn_arith $ac_count + 1 && ac_count=$as_val
4522 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4523 # Best one so far, save it but keep looking for a better one
4524 ac_cv_path_EGREP="$ac_path_EGREP"
4525 ac_path_EGREP_max=$ac_count
4526 fi
4527 # 10*(2^10) chars as input seems more than enough
4528 test $ac_count -gt 10 && break
4529 done
4530 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4531esac
4532
4533 $ac_path_EGREP_found && break 3
4534 done
4535 done
4536 done
4537IFS=$as_save_IFS
4538 if test -z "$ac_cv_path_EGREP"; then
4539 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4540 fi
4541else
4542 ac_cv_path_EGREP=$EGREP
4543fi
4544
4545 fi
4546fi
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4548$as_echo "$ac_cv_path_EGREP" >&6; }
4549 EGREP="$ac_cv_path_EGREP"
4550
4551
4552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4553$as_echo_n "checking for fgrep... " >&6; }
4554if test "${ac_cv_path_FGREP+set}" = set; then :
4555 $as_echo_n "(cached) " >&6
4556else
4557 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4558 then ac_cv_path_FGREP="$GREP -F"
4559 else
4560 if test -z "$FGREP"; then
4561 ac_path_FGREP_found=false
4562 # Loop through the user's path and test for each of PROGNAME-LIST
4563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4564for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4565do
4566 IFS=$as_save_IFS
4567 test -z "$as_dir" && as_dir=.
4568 for ac_prog in fgrep; do
4569 for ac_exec_ext in '' $ac_executable_extensions; do
4570 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
4571 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
4572# Check for GNU ac_path_FGREP and select it if it is found.
4573 # Check for GNU $ac_path_FGREP
4574case `"$ac_path_FGREP" --version 2>&1` in
4575*GNU*)
4576 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4577*)
4578 ac_count=0
4579 $as_echo_n 0123456789 >"conftest.in"
4580 while :
4581 do
4582 cat "conftest.in" "conftest.in" >"conftest.tmp"
4583 mv "conftest.tmp" "conftest.in"
4584 cp "conftest.in" "conftest.nl"
4585 $as_echo 'FGREP' >> "conftest.nl"
4586 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4587 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4588 as_fn_arith $ac_count + 1 && ac_count=$as_val
4589 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4590 # Best one so far, save it but keep looking for a better one
4591 ac_cv_path_FGREP="$ac_path_FGREP"
4592 ac_path_FGREP_max=$ac_count
4593 fi
4594 # 10*(2^10) chars as input seems more than enough
4595 test $ac_count -gt 10 && break
4596 done
4597 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4598esac
4599
4600 $ac_path_FGREP_found && break 3
4601 done
4602 done
4603 done
4604IFS=$as_save_IFS
4605 if test -z "$ac_cv_path_FGREP"; then
4606 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4607 fi
4608else
4609 ac_cv_path_FGREP=$FGREP
4610fi
4611
4612 fi
4613fi
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4615$as_echo "$ac_cv_path_FGREP" >&6; }
4616 FGREP="$ac_cv_path_FGREP"
4617
4618
4619test -z "$GREP" && GREP=grep
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639# Check whether --with-gnu-ld was given.
4640if test "${with_gnu_ld+set}" = set; then :
4641 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4642else
4643 with_gnu_ld=no
4644fi
4645
4646ac_prog=ld
4647if test "$GCC" = yes; then
4648 # Check if gcc -print-prog-name=ld gives a path.
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
4650$as_echo_n "checking for ld used by $CC... " >&6; }
4651 case $host in
4652 *-*-mingw*)
4653 # gcc leaves a trailing carriage return which upsets mingw
4654 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4655 *)
4656 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4657 esac
4658 case $ac_prog in
4659 # Accept absolute paths.
4660 [\\/]* | ?:[\\/]*)
4661 re_direlt='/[^/][^/]*/\.\./'
4662 # Canonicalize the pathname of ld
4663 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4664 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4665 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4666 done
4667 test -z "$LD" && LD="$ac_prog"
4668 ;;
4669 "")
4670 # If it fails, then pretend we aren't using GCC.
4671 ac_prog=ld
4672 ;;
4673 *)
4674 # If it is relative, then search for the first ld in PATH.
4675 with_gnu_ld=unknown
4676 ;;
4677 esac
4678elif test "$with_gnu_ld" = yes; then
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4680$as_echo_n "checking for GNU ld... " >&6; }
4681else
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
4683$as_echo_n "checking for non-GNU ld... " >&6; }
4684fi
4685if test "${lt_cv_path_LD+set}" = set; then :
4686 $as_echo_n "(cached) " >&6
4687else
4688 if test -z "$LD"; then
4689 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4690 for ac_dir in $PATH; do
4691 IFS="$lt_save_ifs"
4692 test -z "$ac_dir" && ac_dir=.
4693 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4694 lt_cv_path_LD="$ac_dir/$ac_prog"
4695 # Check to see if the program is GNU ld. I'd rather use --version,
4696 # but apparently some variants of GNU ld only accept -v.
4697 # Break only if it was the GNU/non-GNU ld that we prefer.
4698 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4699 *GNU* | *'with BFD'*)
4700 test "$with_gnu_ld" != no && break
4701 ;;
4702 *)
4703 test "$with_gnu_ld" != yes && break
4704 ;;
4705 esac
4706 fi
4707 done
4708 IFS="$lt_save_ifs"
4709else
4710 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4711fi
4712fi
4713
4714LD="$lt_cv_path_LD"
4715if test -n "$LD"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4717$as_echo "$LD" >&6; }
4718else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
4724$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4725if test "${lt_cv_prog_gnu_ld+set}" = set; then :
4726 $as_echo_n "(cached) " >&6
4727else
4728 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4729case `$LD -v 2>&1 </dev/null` in
4730*GNU* | *'with BFD'*)
4731 lt_cv_prog_gnu_ld=yes
4732 ;;
4733*)
4734 lt_cv_prog_gnu_ld=no
4735 ;;
4736esac
4737fi
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
4739$as_echo "$lt_cv_prog_gnu_ld" >&6; }
4740with_gnu_ld=$lt_cv_prog_gnu_ld
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
4751$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
4752if test "${lt_cv_path_NM+set}" = set; then :
4753 $as_echo_n "(cached) " >&6
4754else
4755 if test -n "$NM"; then
4756 # Let the user override the test.
4757 lt_cv_path_NM="$NM"
4758else
4759 lt_nm_to_check="${ac_tool_prefix}nm"
4760 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4761 lt_nm_to_check="$lt_nm_to_check nm"
4762 fi
4763 for lt_tmp_nm in $lt_nm_to_check; do
4764 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4765 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4766 IFS="$lt_save_ifs"
4767 test -z "$ac_dir" && ac_dir=.
4768 tmp_nm="$ac_dir/$lt_tmp_nm"
4769 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4770 # Check to see if the nm accepts a BSD-compat flag.
4771 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4772 # nm: unknown option "B" ignored
4773 # Tru64's nm complains that /dev/null is an invalid object file
4774 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4775 */dev/null* | *'Invalid file or object type'*)
4776 lt_cv_path_NM="$tmp_nm -B"
4777 break
4778 ;;
4779 *)
4780 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4781 */dev/null*)
4782 lt_cv_path_NM="$tmp_nm -p"
4783 break
4784 ;;
4785 *)
4786 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4787 continue # so that we can try to find one that supports BSD flags
4788 ;;
4789 esac
4790 ;;
4791 esac
4792 fi
4793 done
4794 IFS="$lt_save_ifs"
4795 done
4796 : ${lt_cv_path_NM=no}
4797fi
4798fi
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
4800$as_echo "$lt_cv_path_NM" >&6; }
4801if test "$lt_cv_path_NM" != "no"; then
4802 NM="$lt_cv_path_NM"
4803else
4804 # Didn't find any BSD compatible name lister, look for dumpbin.
4805 if test -n "$ac_tool_prefix"; then
4806 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4807 do
4808 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4811$as_echo_n "checking for $ac_word... " >&6; }
4812if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
4813 $as_echo_n "(cached) " >&6
4814else
4815 if test -n "$DUMPBIN"; then
4816 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
4817else
4818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in $PATH
4820do
4821 IFS=$as_save_IFS
4822 test -z "$as_dir" && as_dir=.
4823 for ac_exec_ext in '' $ac_executable_extensions; do
4824 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4825 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
4826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827 break 2
4828 fi
4829done
4830 done
4831IFS=$as_save_IFS
4832
4833fi
4834fi
4835DUMPBIN=$ac_cv_prog_DUMPBIN
4836if test -n "$DUMPBIN"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
4838$as_echo "$DUMPBIN" >&6; }
4839else
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841$as_echo "no" >&6; }
4842fi
4843
4844
4845 test -n "$DUMPBIN" && break
4846 done
4847fi
4848if test -z "$DUMPBIN"; then
4849 ac_ct_DUMPBIN=$DUMPBIN
4850 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4851do
4852 # Extract the first word of "$ac_prog", so it can be a program name with args.
4853set dummy $ac_prog; ac_word=$2
4854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4855$as_echo_n "checking for $ac_word... " >&6; }
4856if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
4857 $as_echo_n "(cached) " >&6
4858else
4859 if test -n "$ac_ct_DUMPBIN"; then
4860 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
4861else
4862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4863for as_dir in $PATH
4864do
4865 IFS=$as_save_IFS
4866 test -z "$as_dir" && as_dir=.
4867 for ac_exec_ext in '' $ac_executable_extensions; do
4868 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4869 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
4870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4871 break 2
4872 fi
4873done
4874 done
4875IFS=$as_save_IFS
4876
4877fi
4878fi
4879ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
4880if test -n "$ac_ct_DUMPBIN"; then
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
4882$as_echo "$ac_ct_DUMPBIN" >&6; }
4883else
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4885$as_echo "no" >&6; }
4886fi
4887
4888
4889 test -n "$ac_ct_DUMPBIN" && break
4890done
4891
4892 if test "x$ac_ct_DUMPBIN" = x; then
4893 DUMPBIN=":"
4894 else
4895 case $cross_compiling:$ac_tool_warned in
4896yes:)
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4899ac_tool_warned=yes ;;
4900esac
4901 DUMPBIN=$ac_ct_DUMPBIN
4902 fi
4903fi
4904
4905
4906 if test "$DUMPBIN" != ":"; then
4907 NM="$DUMPBIN"
4908 fi
4909fi
4910test -z "$NM" && NM=nm
4911
4912
4913
4914
4915
4916
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
4918$as_echo_n "checking the name lister ($NM) interface... " >&6; }
4919if test "${lt_cv_nm_interface+set}" = set; then :
4920 $as_echo_n "(cached) " >&6
4921else
4922 lt_cv_nm_interface="BSD nm"
4923 echo "int some_variable = 0;" > conftest.$ac_ext
4924 (eval echo "\"\$as_me:4924: $ac_compile\"" >&5)
4925 (eval "$ac_compile" 2>conftest.err)
4926 cat conftest.err >&5
4927 (eval echo "\"\$as_me:4927: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4928 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4929 cat conftest.err >&5
4930 (eval echo "\"\$as_me:4930: output\"" >&5)
4931 cat conftest.out >&5
4932 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4933 lt_cv_nm_interface="MS dumpbin"
4934 fi
4935 rm -f conftest*
4936fi
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
4938$as_echo "$lt_cv_nm_interface" >&6; }
4939
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
4941$as_echo_n "checking whether ln -s works... " >&6; }
4942LN_S=$as_ln_s
4943if test "$LN_S" = "ln -s"; then
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4945$as_echo "yes" >&6; }
4946else
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
4948$as_echo "no, using $LN_S" >&6; }
4949fi
4950
4951# find the maximum length of command line arguments
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
4953$as_echo_n "checking the maximum length of command line arguments... " >&6; }
4954if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
4955 $as_echo_n "(cached) " >&6
4956else
4957 i=0
4958 teststring="ABCD"
4959
4960 case $build_os in
4961 msdosdjgpp*)
4962 # On DJGPP, this test can blow up pretty badly due to problems in libc
4963 # (any single argument exceeding 2000 bytes causes a buffer overrun
4964 # during glob expansion). Even if it were fixed, the result of this
4965 # check would be larger than it should be.
4966 lt_cv_sys_max_cmd_len=12288; # 12K is about right
4967 ;;
4968
4969 gnu*)
4970 # Under GNU Hurd, this test is not required because there is
4971 # no limit to the length of command line arguments.
4972 # Libtool will interpret -1 as no limit whatsoever
4973 lt_cv_sys_max_cmd_len=-1;
4974 ;;
4975
4976 cygwin* | mingw* | cegcc*)
4977 # On Win9x/ME, this test blows up -- it succeeds, but takes
4978 # about 5 minutes as the teststring grows exponentially.
4979 # Worse, since 9x/ME are not pre-emptively multitasking,
4980 # you end up with a "frozen" computer, even though with patience
4981 # the test eventually succeeds (with a max line length of 256k).
4982 # Instead, let's just punt: use the minimum linelength reported by
4983 # all of the supported platforms: 8192 (on NT/2K/XP).
4984 lt_cv_sys_max_cmd_len=8192;
4985 ;;
4986
4987 amigaos*)
4988 # On AmigaOS with pdksh, this test takes hours, literally.
4989 # So we just punt and use a minimum line length of 8192.
4990 lt_cv_sys_max_cmd_len=8192;
4991 ;;
4992
4993 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
4994 # This has been around since 386BSD, at least. Likely further.
4995 if test -x /sbin/sysctl; then
4996 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4997 elif test -x /usr/sbin/sysctl; then
4998 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4999 else
5000 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
5001 fi
5002 # And add a safety zone
5003 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5004 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5005 ;;
5006
5007 interix*)
5008 # We know the value 262144 and hardcode it with a safety zone (like BSD)
5009 lt_cv_sys_max_cmd_len=196608
5010 ;;
5011
5012 osf*)
5013 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5014 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5015 # nice to cause kernel panics so lets avoid the loop below.
5016 # First set a reasonable default.
5017 lt_cv_sys_max_cmd_len=16384
5018 #
5019 if test -x /sbin/sysconfig; then
5020 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5021 *1*) lt_cv_sys_max_cmd_len=-1 ;;
5022 esac
5023 fi
5024 ;;
5025 sco3.2v5*)
5026 lt_cv_sys_max_cmd_len=102400
5027 ;;
5028 sysv5* | sco5v6* | sysv4.2uw2*)
5029 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5030 if test -n "$kargmax"; then
5031 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
5032 else
5033 lt_cv_sys_max_cmd_len=32768
5034 fi
5035 ;;
5036 *)
5037 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5038 if test -n "$lt_cv_sys_max_cmd_len"; then
5039 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5040 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5041 else
5042 # Make teststring a little bigger before we do anything with it.
5043 # a 1K string should be a reasonable start.
5044 for i in 1 2 3 4 5 6 7 8 ; do
5045 teststring=$teststring$teststring
5046 done
5047 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5048 # If test is not a shell built-in, we'll probably end up computing a
5049 # maximum length that is only half of the actual maximum length, but
5050 # we can't tell.
5051 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
5052 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
5053 test $i != 17 # 1/2 MB should be enough
5054 do
5055 i=`expr $i + 1`
5056 teststring=$teststring$teststring
5057 done
5058 # Only check the string length outside the loop.
5059 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5060 teststring=
5061 # Add a significant safety factor because C++ compilers can tack on
5062 # massive amounts of additional arguments before passing them to the
5063 # linker. It appears as though 1/2 is a usable value.
5064 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5065 fi
5066 ;;
5067 esac
5068
5069fi
5070
5071if test -n $lt_cv_sys_max_cmd_len ; then
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
5073$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
5074else
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5076$as_echo "none" >&6; }
5077fi
5078max_cmd_len=$lt_cv_sys_max_cmd_len
5079
5080
5081
5082
5083
5084
5085: ${CP="cp -f"}
5086: ${MV="mv -f"}
5087: ${RM="rm -f"}
5088
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
5090$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
5091# Try some XSI features
5092xsi_shell=no
5093( _lt_dummy="a/b/c"
5094 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
5095 = c,a/b,, \
5096 && eval 'test $(( 1 + 1 )) -eq 2 \
5097 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
5098 && xsi_shell=yes
5099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
5100$as_echo "$xsi_shell" >&6; }
5101
5102
5103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
5104$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
5105lt_shell_append=no
5106( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
5107 >/dev/null 2>&1 \
5108 && lt_shell_append=yes
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
5110$as_echo "$lt_shell_append" >&6; }
5111
5112
5113if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
5114 lt_unset=unset
5115else
5116 lt_unset=false
5117fi
5118
5119
5120
5121
5122
5123# test EBCDIC or ASCII
5124case `echo X|tr X '\101'` in
5125 A) # ASCII based system
5126 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
5127 lt_SP2NL='tr \040 \012'
5128 lt_NL2SP='tr \015\012 \040\040'
5129 ;;
5130 *) # EBCDIC based system
5131 lt_SP2NL='tr \100 \n'
5132 lt_NL2SP='tr \r\n \100\100'
5133 ;;
5134esac
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
5145$as_echo_n "checking for $LD option to reload object files... " >&6; }
5146if test "${lt_cv_ld_reload_flag+set}" = set; then :
5147 $as_echo_n "(cached) " >&6
5148else
5149 lt_cv_ld_reload_flag='-r'
5150fi
5151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
5152$as_echo "$lt_cv_ld_reload_flag" >&6; }
5153reload_flag=$lt_cv_ld_reload_flag
5154case $reload_flag in
5155"" | " "*) ;;
5156*) reload_flag=" $reload_flag" ;;
5157esac
5158reload_cmds='$LD$reload_flag -o $output$reload_objs'
5159case $host_os in
5160 darwin*)
5161 if test "$GCC" = yes; then
5162 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5163 else
5164 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5165 fi
5166 ;;
5167esac
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177if test -n "$ac_tool_prefix"; then
5178 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5179set dummy ${ac_tool_prefix}objdump; ac_word=$2
5180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5181$as_echo_n "checking for $ac_word... " >&6; }
5182if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
5183 $as_echo_n "(cached) " >&6
5184else
5185 if test -n "$OBJDUMP"; then
5186 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
5187else
5188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5189for as_dir in $PATH
5190do
5191 IFS=$as_save_IFS
5192 test -z "$as_dir" && as_dir=.
5193 for ac_exec_ext in '' $ac_executable_extensions; do
5194 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5195 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5197 break 2
5198 fi
5199done
5200 done
5201IFS=$as_save_IFS
5202
5203fi
5204fi
5205OBJDUMP=$ac_cv_prog_OBJDUMP
5206if test -n "$OBJDUMP"; then
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
5208$as_echo "$OBJDUMP" >&6; }
5209else
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5211$as_echo "no" >&6; }
5212fi
5213
5214
5215fi
5216if test -z "$ac_cv_prog_OBJDUMP"; then
5217 ac_ct_OBJDUMP=$OBJDUMP
5218 # Extract the first word of "objdump", so it can be a program name with args.
5219set dummy objdump; ac_word=$2
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5221$as_echo_n "checking for $ac_word... " >&6; }
5222if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
5223 $as_echo_n "(cached) " >&6
5224else
5225 if test -n "$ac_ct_OBJDUMP"; then
5226 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
5227else
5228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229for as_dir in $PATH
5230do
5231 IFS=$as_save_IFS
5232 test -z "$as_dir" && as_dir=.
5233 for ac_exec_ext in '' $ac_executable_extensions; do
5234 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5235 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5236 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5237 break 2
5238 fi
5239done
5240 done
5241IFS=$as_save_IFS
5242
5243fi
5244fi
5245ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
5246if test -n "$ac_ct_OBJDUMP"; then
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
5248$as_echo "$ac_ct_OBJDUMP" >&6; }
5249else
5250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5251$as_echo "no" >&6; }
5252fi
5253
5254 if test "x$ac_ct_OBJDUMP" = x; then
5255 OBJDUMP="false"
5256 else
5257 case $cross_compiling:$ac_tool_warned in
5258yes:)
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5261ac_tool_warned=yes ;;
5262esac
5263 OBJDUMP=$ac_ct_OBJDUMP
5264 fi
5265else
5266 OBJDUMP="$ac_cv_prog_OBJDUMP"
5267fi
5268
5269test -z "$OBJDUMP" && OBJDUMP=objdump
5270
5271
5272
5273
5274
5275
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
5277$as_echo_n "checking how to recognize dependent libraries... " >&6; }
5278if test "${lt_cv_deplibs_check_method+set}" = set; then :
5279 $as_echo_n "(cached) " >&6
5280else
5281 lt_cv_file_magic_cmd='$MAGIC_CMD'
5282lt_cv_file_magic_test_file=
5283lt_cv_deplibs_check_method='unknown'
5284# Need to set the preceding variable on all platforms that support
5285# interlibrary dependencies.
5286# 'none' -- dependencies not supported.
5287# `unknown' -- same as none, but documents that we really don't know.
5288# 'pass_all' -- all dependencies passed with no checks.
5289# 'test_compile' -- check by making test program.
5290# 'file_magic [[regex]]' -- check by looking for files in library path
5291# which responds to the $file_magic_cmd with a given extended regex.
5292# If you have `file' or equivalent on your system and you're not sure
5293# whether `pass_all' will *always* work, you probably want this one.
5294
5295case $host_os in
5296aix[4-9]*)
5297 lt_cv_deplibs_check_method=pass_all
5298 ;;
5299
5300beos*)
5301 lt_cv_deplibs_check_method=pass_all
5302 ;;
5303
5304bsdi[45]*)
5305 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5306 lt_cv_file_magic_cmd='/usr/bin/file -L'
5307 lt_cv_file_magic_test_file=/shlib/libc.so
5308 ;;
5309
5310cygwin*)
5311 # func_win32_libid is a shell function defined in ltmain.sh
5312 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5313 lt_cv_file_magic_cmd='func_win32_libid'
5314 ;;
5315
5316mingw* | pw32*)
5317 # Base MSYS/MinGW do not provide the 'file' command needed by
5318 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5319 # unless we find 'file', for example because we are cross-compiling.
5320 if ( file / ) >/dev/null 2>&1; then
5321 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5322 lt_cv_file_magic_cmd='func_win32_libid'
5323 else
5324 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5325 lt_cv_file_magic_cmd='$OBJDUMP -f'
5326 fi
5327 ;;
5328
5329cegcc)
5330 # use the weaker test based on 'objdump'. See mingw*.
5331 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5332 lt_cv_file_magic_cmd='$OBJDUMP -f'
5333 ;;
5334
5335darwin* | rhapsody*)
5336 lt_cv_deplibs_check_method=pass_all
5337 ;;
5338
5339freebsd* | dragonfly*)
5340 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5341 case $host_cpu in
5342 i*86 )
5343 # Not sure whether the presence of OpenBSD here was a mistake.
5344 # Let's accept both of them until this is cleared up.
5345 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5346 lt_cv_file_magic_cmd=/usr/bin/file
5347 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5348 ;;
5349 esac
5350 else
5351 lt_cv_deplibs_check_method=pass_all
5352 fi
5353 ;;
5354
5355gnu*)
5356 lt_cv_deplibs_check_method=pass_all
5357 ;;
5358
5359hpux10.20* | hpux11*)
5360 lt_cv_file_magic_cmd=/usr/bin/file
5361 case $host_cpu in
5362 ia64*)
5363 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5364 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5365 ;;
5366 hppa*64*)
5367 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
5368 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5369 ;;
5370 *)
5371 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5372 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5373 ;;
5374 esac
5375 ;;
5376
5377interix[3-9]*)
5378 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5379 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
5380 ;;
5381
5382irix5* | irix6* | nonstopux*)
5383 case $LD in
5384 *-32|*"-32 ") libmagic=32-bit;;
5385 *-n32|*"-n32 ") libmagic=N32;;
5386 *-64|*"-64 ") libmagic=64-bit;;
5387 *) libmagic=never-match;;
5388 esac
5389 lt_cv_deplibs_check_method=pass_all
5390 ;;
5391
5392# This must be Linux ELF.
5393linux* | k*bsd*-gnu | kopensolaris*-gnu)
5394 lt_cv_deplibs_check_method=pass_all
5395 ;;
5396
5397netbsd* | netbsdelf*-gnu)
5398 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5399 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5400 else
5401 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5402 fi
5403 ;;
5404
5405newos6*)
5406 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5407 lt_cv_file_magic_cmd=/usr/bin/file
5408 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5409 ;;
5410
5411*nto* | *qnx*)
5412 lt_cv_deplibs_check_method=pass_all
5413 ;;
5414
5415openbsd*)
5416 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5417 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5418 else
5419 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5420 fi
5421 ;;
5422
5423osf3* | osf4* | osf5*)
5424 lt_cv_deplibs_check_method=pass_all
5425 ;;
5426
5427rdos*)
5428 lt_cv_deplibs_check_method=pass_all
5429 ;;
5430
5431solaris*)
5432 lt_cv_deplibs_check_method=pass_all
5433 ;;
5434
5435sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5436 lt_cv_deplibs_check_method=pass_all
5437 ;;
5438
5439sysv4 | sysv4.3*)
5440 case $host_vendor in
5441 motorola)
5442 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]'
5443 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5444 ;;
5445 ncr)
5446 lt_cv_deplibs_check_method=pass_all
5447 ;;
5448 sequent)
5449 lt_cv_file_magic_cmd='/bin/file'
5450 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5451 ;;
5452 sni)
5453 lt_cv_file_magic_cmd='/bin/file'
5454 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5455 lt_cv_file_magic_test_file=/lib/libc.so
5456 ;;
5457 siemens)
5458 lt_cv_deplibs_check_method=pass_all
5459 ;;
5460 pc)
5461 lt_cv_deplibs_check_method=pass_all
5462 ;;
5463 esac
5464 ;;
5465
5466tpf*)
5467 lt_cv_deplibs_check_method=pass_all
5468 ;;
5469esac
5470
5471fi
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
5473$as_echo "$lt_cv_deplibs_check_method" >&6; }
5474file_magic_cmd=$lt_cv_file_magic_cmd
5475deplibs_check_method=$lt_cv_deplibs_check_method
5476test -z "$deplibs_check_method" && deplibs_check_method=unknown
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489if test -n "$ac_tool_prefix"; then
5490 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5491set dummy ${ac_tool_prefix}ar; ac_word=$2
5492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5493$as_echo_n "checking for $ac_word... " >&6; }
5494if test "${ac_cv_prog_AR+set}" = set; then :
5495 $as_echo_n "(cached) " >&6
5496else
5497 if test -n "$AR"; then
5498 ac_cv_prog_AR="$AR" # Let the user override the test.
5499else
5500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501for as_dir in $PATH
5502do
5503 IFS=$as_save_IFS
5504 test -z "$as_dir" && as_dir=.
5505 for ac_exec_ext in '' $ac_executable_extensions; do
5506 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5507 ac_cv_prog_AR="${ac_tool_prefix}ar"
5508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5509 break 2
5510 fi
5511done
5512 done
5513IFS=$as_save_IFS
5514
5515fi
5516fi
5517AR=$ac_cv_prog_AR
5518if test -n "$AR"; then
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5520$as_echo "$AR" >&6; }
5521else
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5523$as_echo "no" >&6; }
5524fi
5525
5526
5527fi
5528if test -z "$ac_cv_prog_AR"; then
5529 ac_ct_AR=$AR
5530 # Extract the first word of "ar", so it can be a program name with args.
5531set dummy ar; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5535 $as_echo_n "(cached) " >&6
5536else
5537 if test -n "$ac_ct_AR"; then
5538 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5539else
5540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5541for as_dir in $PATH
5542do
5543 IFS=$as_save_IFS
5544 test -z "$as_dir" && as_dir=.
5545 for ac_exec_ext in '' $ac_executable_extensions; do
5546 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5547 ac_cv_prog_ac_ct_AR="ar"
5548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5549 break 2
5550 fi
5551done
5552 done
5553IFS=$as_save_IFS
5554
5555fi
5556fi
5557ac_ct_AR=$ac_cv_prog_ac_ct_AR
5558if test -n "$ac_ct_AR"; then
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5560$as_echo "$ac_ct_AR" >&6; }
5561else
5562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563$as_echo "no" >&6; }
5564fi
5565
5566 if test "x$ac_ct_AR" = x; then
5567 AR="false"
5568 else
5569 case $cross_compiling:$ac_tool_warned in
5570yes:)
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5573ac_tool_warned=yes ;;
5574esac
5575 AR=$ac_ct_AR
5576 fi
5577else
5578 AR="$ac_cv_prog_AR"
5579fi
5580
5581test -z "$AR" && AR=ar
5582test -z "$AR_FLAGS" && AR_FLAGS=cru
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594if test -n "$ac_tool_prefix"; then
5595 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5596set dummy ${ac_tool_prefix}strip; ac_word=$2
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5598$as_echo_n "checking for $ac_word... " >&6; }
5599if test "${ac_cv_prog_STRIP+set}" = set; then :
5600 $as_echo_n "(cached) " >&6
5601else
5602 if test -n "$STRIP"; then
5603 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5604else
5605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606for as_dir in $PATH
5607do
5608 IFS=$as_save_IFS
5609 test -z "$as_dir" && as_dir=.
5610 for ac_exec_ext in '' $ac_executable_extensions; do
5611 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5612 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614 break 2
5615 fi
5616done
5617 done
5618IFS=$as_save_IFS
5619
5620fi
5621fi
5622STRIP=$ac_cv_prog_STRIP
5623if test -n "$STRIP"; then
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5625$as_echo "$STRIP" >&6; }
5626else
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5628$as_echo "no" >&6; }
5629fi
5630
5631
5632fi
5633if test -z "$ac_cv_prog_STRIP"; then
5634 ac_ct_STRIP=$STRIP
5635 # Extract the first word of "strip", so it can be a program name with args.
5636set dummy strip; ac_word=$2
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5638$as_echo_n "checking for $ac_word... " >&6; }
5639if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
5640 $as_echo_n "(cached) " >&6
5641else
5642 if test -n "$ac_ct_STRIP"; then
5643 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5644else
5645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5646for as_dir in $PATH
5647do
5648 IFS=$as_save_IFS
5649 test -z "$as_dir" && as_dir=.
5650 for ac_exec_ext in '' $ac_executable_extensions; do
5651 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5652 ac_cv_prog_ac_ct_STRIP="strip"
5653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5654 break 2
5655 fi
5656done
5657 done
5658IFS=$as_save_IFS
5659
5660fi
5661fi
5662ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5663if test -n "$ac_ct_STRIP"; then
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5665$as_echo "$ac_ct_STRIP" >&6; }
5666else
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
5669fi
5670
5671 if test "x$ac_ct_STRIP" = x; then
5672 STRIP=":"
5673 else
5674 case $cross_compiling:$ac_tool_warned in
5675yes:)
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5678ac_tool_warned=yes ;;
5679esac
5680 STRIP=$ac_ct_STRIP
5681 fi
5682else
5683 STRIP="$ac_cv_prog_STRIP"
5684fi
5685
5686test -z "$STRIP" && STRIP=:
5687
5688
5689
5690
5691
5692
5693if test -n "$ac_tool_prefix"; then
5694 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5695set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5697$as_echo_n "checking for $ac_word... " >&6; }
5698if test "${ac_cv_prog_RANLIB+set}" = set; then :
5699 $as_echo_n "(cached) " >&6
5700else
5701 if test -n "$RANLIB"; then
5702 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5703else
5704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707 IFS=$as_save_IFS
5708 test -z "$as_dir" && as_dir=.
5709 for ac_exec_ext in '' $ac_executable_extensions; do
5710 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5711 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5713 break 2
5714 fi
5715done
5716 done
5717IFS=$as_save_IFS
5718
5719fi
5720fi
5721RANLIB=$ac_cv_prog_RANLIB
5722if test -n "$RANLIB"; then
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5724$as_echo "$RANLIB" >&6; }
5725else
5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
5728fi
5729
5730
5731fi
5732if test -z "$ac_cv_prog_RANLIB"; then
5733 ac_ct_RANLIB=$RANLIB
5734 # Extract the first word of "ranlib", so it can be a program name with args.
5735set dummy ranlib; ac_word=$2
5736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5737$as_echo_n "checking for $ac_word... " >&6; }
5738if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5739 $as_echo_n "(cached) " >&6
5740else
5741 if test -n "$ac_ct_RANLIB"; then
5742 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5743else
5744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5745for as_dir in $PATH
5746do
5747 IFS=$as_save_IFS
5748 test -z "$as_dir" && as_dir=.
5749 for ac_exec_ext in '' $ac_executable_extensions; do
5750 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5751 ac_cv_prog_ac_ct_RANLIB="ranlib"
5752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5753 break 2
5754 fi
5755done
5756 done
5757IFS=$as_save_IFS
5758
5759fi
5760fi
5761ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5762if test -n "$ac_ct_RANLIB"; then
5763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5764$as_echo "$ac_ct_RANLIB" >&6; }
5765else
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768fi
5769
5770 if test "x$ac_ct_RANLIB" = x; then
5771 RANLIB=":"
5772 else
5773 case $cross_compiling:$ac_tool_warned in
5774yes:)
5775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5777ac_tool_warned=yes ;;
5778esac
5779 RANLIB=$ac_ct_RANLIB
5780 fi
5781else
5782 RANLIB="$ac_cv_prog_RANLIB"
5783fi
5784
5785test -z "$RANLIB" && RANLIB=:
5786
5787
5788
5789
5790
5791
5792# Determine commands to create old-style static archives.
5793old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
5794old_postinstall_cmds='chmod 644 $oldlib'
5795old_postuninstall_cmds=
5796
5797if test -n "$RANLIB"; then
5798 case $host_os in
5799 openbsd*)
5800 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
5801 ;;
5802 *)
5803 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
5804 ;;
5805 esac
5806 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5807fi
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842# If no C compiler was specified, use CC.
5843LTCC=${LTCC-"$CC"}
5844
5845# If no C compiler flags were specified, use CFLAGS.
5846LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
5847
5848# Allow CC to be a program name with arguments.
5849compiler=$CC
5850
5851
5852# Check for command to grab the raw symbol name followed by C symbol from nm.
5853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
5854$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
5855if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
5856 $as_echo_n "(cached) " >&6
5857else
5858
5859# These are sane defaults that work on at least a few old systems.
5860# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5861
5862# Character class describing NM global symbol codes.
5863symcode='[BCDEGRST]'
5864
5865# Regexp to match symbols that can be accessed directly from C.
5866sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
5867
5868# Define system-specific variables.
5869case $host_os in
5870aix*)
5871 symcode='[BCDT]'
5872 ;;
5873cygwin* | mingw* | pw32* | cegcc*)
5874 symcode='[ABCDGISTW]'
5875 ;;
5876hpux*)
5877 if test "$host_cpu" = ia64; then
5878 symcode='[ABCDEGRST]'
5879 fi
5880 ;;
5881irix* | nonstopux*)
5882 symcode='[BCDEGRST]'
5883 ;;
5884osf*)
5885 symcode='[BCDEGQRST]'
5886 ;;
5887solaris*)
5888 symcode='[BDRT]'
5889 ;;
5890sco3.2v5*)
5891 symcode='[DT]'
5892 ;;
5893sysv4.2uw2*)
5894 symcode='[DT]'
5895 ;;
5896sysv5* | sco5v6* | unixware* | OpenUNIX*)
5897 symcode='[ABDT]'
5898 ;;
5899sysv4)
5900 symcode='[DFNSTU]'
5901 ;;
5902esac
5903
5904# If we're using GNU nm, then use its standard symbol codes.
5905case `$NM -V 2>&1` in
5906*GNU* | *'with BFD'*)
5907 symcode='[ABCDGIRSTW]' ;;
5908esac
5909
5910# Transform an extracted symbol line into a proper C declaration.
5911# Some systems (esp. on ia64) link data and code symbols differently,
5912# so use this general approach.
5913lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5914
5915# Transform an extracted symbol line into symbol name and symbol address
5916lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5917lt_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'"
5918
5919# Handle CRLF in mingw tool chain
5920opt_cr=
5921case $build_os in
5922mingw*)
5923 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5924 ;;
5925esac
5926
5927# Try without a prefix underscore, then with it.
5928for ac_symprfx in "" "_"; do
5929
5930 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5931 symxfrm="\\1 $ac_symprfx\\2 \\2"
5932
5933 # Write the raw and C identifiers.
5934 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5935 # Fake it for dumpbin and say T for any non-static function
5936 # and D for any global variable.
5937 # Also find C++ and __fastcall symbols from MSVC++,
5938 # which start with @ or ?.
5939 lt_cv_sys_global_symbol_pipe="$AWK '"\
5940" {last_section=section; section=\$ 3};"\
5941" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5942" \$ 0!~/External *\|/{next};"\
5943" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5944" {if(hide[section]) next};"\
5945" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5946" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5947" s[1]~/^[@?]/{print s[1], s[1]; next};"\
5948" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5949" ' prfx=^$ac_symprfx"
5950 else
5951 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5952 fi
5953
5954 # Check to see that the pipe works correctly.
5955 pipe_works=no
5956
5957 rm -f conftest*
5958 cat > conftest.$ac_ext <<_LT_EOF
5959#ifdef __cplusplus
5960extern "C" {
5961#endif
5962char nm_test_var;
5963void nm_test_func(void);
5964void nm_test_func(void){}
5965#ifdef __cplusplus
5966}
5967#endif
5968int main(){nm_test_var='a';nm_test_func();return(0);}
5969_LT_EOF
5970
5971 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
5972 (eval $ac_compile) 2>&5
5973 ac_status=$?
5974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5975 test $ac_status = 0; }; then
5976 # Now try to grab the symbols.
5977 nlist=conftest.nm
5978 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
5979 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
5980 ac_status=$?
5981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5982 test $ac_status = 0; } && test -s "$nlist"; then
5983 # Try sorting and uniquifying the output.
5984 if sort "$nlist" | uniq > "$nlist"T; then
5985 mv -f "$nlist"T "$nlist"
5986 else
5987 rm -f "$nlist"T
5988 fi
5989
5990 # Make sure that we snagged all the symbols we need.
5991 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5992 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5993 cat <<_LT_EOF > conftest.$ac_ext
5994#ifdef __cplusplus
5995extern "C" {
5996#endif
5997
5998_LT_EOF
5999 # Now generate the symbol file.
6000 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
6001
6002 cat <<_LT_EOF >> conftest.$ac_ext
6003
6004/* The mapping between symbol names and symbols. */
6005const struct {
6006 const char *name;
6007 void *address;
6008}
6009lt__PROGRAM__LTX_preloaded_symbols[] =
6010{
6011 { "@PROGRAM@", (void *) 0 },
6012_LT_EOF
6013 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
6014 cat <<\_LT_EOF >> conftest.$ac_ext
6015 {0, (void *) 0}
6016};
6017
6018/* This works around a problem in FreeBSD linker */
6019#ifdef FREEBSD_WORKAROUND
6020static const void *lt_preloaded_setup() {
6021 return lt__PROGRAM__LTX_preloaded_symbols;
6022}
6023#endif
6024
6025#ifdef __cplusplus
6026}
6027#endif
6028_LT_EOF
6029 # Now try linking the two files.
6030 mv conftest.$ac_objext conftstm.$ac_objext
6031 lt_save_LIBS="$LIBS"
6032 lt_save_CFLAGS="$CFLAGS"
6033 LIBS="conftstm.$ac_objext"
6034 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6035 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
6036 (eval $ac_link) 2>&5
6037 ac_status=$?
6038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6039 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
6040 pipe_works=yes
6041 fi
6042 LIBS="$lt_save_LIBS"
6043 CFLAGS="$lt_save_CFLAGS"
6044 else
6045 echo "cannot find nm_test_func in $nlist" >&5
6046 fi
6047 else
6048 echo "cannot find nm_test_var in $nlist" >&5
6049 fi
6050 else
6051 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6052 fi
6053 else
6054 echo "$progname: failed program was:" >&5
6055 cat conftest.$ac_ext >&5
6056 fi
6057 rm -rf conftest* conftst*
6058
6059 # Do not use the global_symbol_pipe unless it works.
6060 if test "$pipe_works" = yes; then
6061 break
6062 else
6063 lt_cv_sys_global_symbol_pipe=
6064 fi
6065done
6066
6067fi
6068
6069if test -z "$lt_cv_sys_global_symbol_pipe"; then
6070 lt_cv_sys_global_symbol_to_cdecl=
6071fi
6072if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
6074$as_echo "failed" >&6; }
6075else
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6077$as_echo "ok" >&6; }
6078fi
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102# Check whether --enable-libtool-lock was given.
6103if test "${enable_libtool_lock+set}" = set; then :
6104 enableval=$enable_libtool_lock;
6105fi
6106
6107test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6108
6109# Some flags need to be propagated to the compiler or linker for good
6110# libtool support.
6111case $host in
6112ia64-*-hpux*)
6113 # Find out which ABI we are using.
6114 echo 'int i;' > conftest.$ac_ext
6115 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6116 (eval $ac_compile) 2>&5
6117 ac_status=$?
6118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6119 test $ac_status = 0; }; then
6120 case `/usr/bin/file conftest.$ac_objext` in
6121 *ELF-32*)
6122 HPUX_IA64_MODE="32"
6123 ;;
6124 *ELF-64*)
6125 HPUX_IA64_MODE="64"
6126 ;;
6127 esac
6128 fi
6129 rm -rf conftest*
6130 ;;
6131*-*-irix6*)
6132 # Find out which ABI we are using.
6133 echo '#line 6133 "configure"' > conftest.$ac_ext
6134 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6135 (eval $ac_compile) 2>&5
6136 ac_status=$?
6137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6138 test $ac_status = 0; }; then
6139 if test "$lt_cv_prog_gnu_ld" = yes; then
6140 case `/usr/bin/file conftest.$ac_objext` in
6141 *32-bit*)
6142 LD="${LD-ld} -melf32bsmip"
6143 ;;
6144 *N32*)
6145 LD="${LD-ld} -melf32bmipn32"
6146 ;;
6147 *64-bit*)
6148 LD="${LD-ld} -melf64bmip"
6149 ;;
6150 esac
6151 else
6152 case `/usr/bin/file conftest.$ac_objext` in
6153 *32-bit*)
6154 LD="${LD-ld} -32"
6155 ;;
6156 *N32*)
6157 LD="${LD-ld} -n32"
6158 ;;
6159 *64-bit*)
6160 LD="${LD-ld} -64"
6161 ;;
6162 esac
6163 fi
6164 fi
6165 rm -rf conftest*
6166 ;;
6167
6168x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
6169s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
6170 # Find out which ABI we are using.
6171 echo 'int i;' > conftest.$ac_ext
6172 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6173 (eval $ac_compile) 2>&5
6174 ac_status=$?
6175 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6176 test $ac_status = 0; }; then
6177 case `/usr/bin/file conftest.o` in
6178 *32-bit*)
6179 case $host in
6180 x86_64-*kfreebsd*-gnu)
6181 LD="${LD-ld} -m elf_i386_fbsd"
6182 ;;
6183 x86_64-*linux*)
6184 LD="${LD-ld} -m elf_i386"
6185 ;;
6186 ppc64-*linux*|powerpc64-*linux*)
6187 LD="${LD-ld} -m elf32ppclinux"
6188 ;;
6189 s390x-*linux*)
6190 LD="${LD-ld} -m elf_s390"
6191 ;;
6192 sparc64-*linux*)
6193 LD="${LD-ld} -m elf32_sparc"
6194 ;;
6195 esac
6196 ;;
6197 *64-bit*)
6198 case $host in
6199 x86_64-*kfreebsd*-gnu)
6200 LD="${LD-ld} -m elf_x86_64_fbsd"
6201 ;;
6202 x86_64-*linux*)
6203 LD="${LD-ld} -m elf_x86_64"
6204 ;;
6205 ppc*-*linux*|powerpc*-*linux*)
6206 LD="${LD-ld} -m elf64ppc"
6207 ;;
6208 s390*-*linux*|s390*-*tpf*)
6209 LD="${LD-ld} -m elf64_s390"
6210 ;;
6211 sparc*-*linux*)
6212 LD="${LD-ld} -m elf64_sparc"
6213 ;;
6214 esac
6215 ;;
6216 esac
6217 fi
6218 rm -rf conftest*
6219 ;;
6220
6221*-*-sco3.2v5*)
6222 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6223 SAVE_CFLAGS="$CFLAGS"
6224 CFLAGS="$CFLAGS -belf"
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
6226$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
6227if test "${lt_cv_cc_needs_belf+set}" = set; then :
6228 $as_echo_n "(cached) " >&6
6229else
6230 ac_ext=c
6231ac_cpp='$CPP $CPPFLAGS'
6232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6234ac_compiler_gnu=$ac_cv_c_compiler_gnu
6235
6236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6237/* end confdefs.h. */
6238
6239int
6240main ()
6241{
6242
6243 ;
6244 return 0;
6245}
6246_ACEOF
6247if ac_fn_c_try_link "$LINENO"; then :
6248 lt_cv_cc_needs_belf=yes
6249else
6250 lt_cv_cc_needs_belf=no
6251fi
6252rm -f core conftest.err conftest.$ac_objext \
6253 conftest$ac_exeext conftest.$ac_ext
6254 ac_ext=c
6255ac_cpp='$CPP $CPPFLAGS'
6256ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6257ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6258ac_compiler_gnu=$ac_cv_c_compiler_gnu
6259
6260fi
6261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
6262$as_echo "$lt_cv_cc_needs_belf" >&6; }
6263 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6264 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6265 CFLAGS="$SAVE_CFLAGS"
6266 fi
6267 ;;
6268sparc*-*solaris*)
6269 # Find out which ABI we are using.
6270 echo 'int i;' > conftest.$ac_ext
6271 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6272 (eval $ac_compile) 2>&5
6273 ac_status=$?
6274 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6275 test $ac_status = 0; }; then
6276 case `/usr/bin/file conftest.o` in
6277 *64-bit*)
6278 case $lt_cv_prog_gnu_ld in
6279 yes*) LD="${LD-ld} -m elf64_sparc" ;;
6280 *)
6281 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6282 LD="${LD-ld} -64"
6283 fi
6284 ;;
6285 esac
6286 ;;
6287 esac
6288 fi
6289 rm -rf conftest*
6290 ;;
6291esac
6292
6293need_locks="$enable_libtool_lock"
6294
6295
6296 case $host_os in
6297 rhapsody* | darwin*)
6298 if test -n "$ac_tool_prefix"; then
6299 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
6300set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6302$as_echo_n "checking for $ac_word... " >&6; }
6303if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
6304 $as_echo_n "(cached) " >&6
6305else
6306 if test -n "$DSYMUTIL"; then
6307 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
6308else
6309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312 IFS=$as_save_IFS
6313 test -z "$as_dir" && as_dir=.
6314 for ac_exec_ext in '' $ac_executable_extensions; do
6315 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6316 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
6317 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318 break 2
6319 fi
6320done
6321 done
6322IFS=$as_save_IFS
6323
6324fi
6325fi
6326DSYMUTIL=$ac_cv_prog_DSYMUTIL
6327if test -n "$DSYMUTIL"; then
6328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
6329$as_echo "$DSYMUTIL" >&6; }
6330else
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332$as_echo "no" >&6; }
6333fi
6334
6335
6336fi
6337if test -z "$ac_cv_prog_DSYMUTIL"; then
6338 ac_ct_DSYMUTIL=$DSYMUTIL
6339 # Extract the first word of "dsymutil", so it can be a program name with args.
6340set dummy dsymutil; ac_word=$2
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6342$as_echo_n "checking for $ac_word... " >&6; }
6343if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
6344 $as_echo_n "(cached) " >&6
6345else
6346 if test -n "$ac_ct_DSYMUTIL"; then
6347 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
6348else
6349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6350for as_dir in $PATH
6351do
6352 IFS=$as_save_IFS
6353 test -z "$as_dir" && as_dir=.
6354 for ac_exec_ext in '' $ac_executable_extensions; do
6355 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6356 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
6357 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6358 break 2
6359 fi
6360done
6361 done
6362IFS=$as_save_IFS
6363
6364fi
6365fi
6366ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
6367if test -n "$ac_ct_DSYMUTIL"; then
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
6369$as_echo "$ac_ct_DSYMUTIL" >&6; }
6370else
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6372$as_echo "no" >&6; }
6373fi
6374
6375 if test "x$ac_ct_DSYMUTIL" = x; then
6376 DSYMUTIL=":"
6377 else
6378 case $cross_compiling:$ac_tool_warned in
6379yes:)
6380{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6381$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6382ac_tool_warned=yes ;;
6383esac
6384 DSYMUTIL=$ac_ct_DSYMUTIL
6385 fi
6386else
6387 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
6388fi
6389
6390 if test -n "$ac_tool_prefix"; then
6391 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
6392set dummy ${ac_tool_prefix}nmedit; ac_word=$2
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6394$as_echo_n "checking for $ac_word... " >&6; }
6395if test "${ac_cv_prog_NMEDIT+set}" = set; then :
6396 $as_echo_n "(cached) " >&6
6397else
6398 if test -n "$NMEDIT"; then
6399 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
6400else
6401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH
6403do
6404 IFS=$as_save_IFS
6405 test -z "$as_dir" && as_dir=.
6406 for ac_exec_ext in '' $ac_executable_extensions; do
6407 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6408 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
6409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410 break 2
6411 fi
6412done
6413 done
6414IFS=$as_save_IFS
6415
6416fi
6417fi
6418NMEDIT=$ac_cv_prog_NMEDIT
6419if test -n "$NMEDIT"; then
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
6421$as_echo "$NMEDIT" >&6; }
6422else
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428fi
6429if test -z "$ac_cv_prog_NMEDIT"; then
6430 ac_ct_NMEDIT=$NMEDIT
6431 # Extract the first word of "nmedit", so it can be a program name with args.
6432set dummy nmedit; ac_word=$2
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434$as_echo_n "checking for $ac_word... " >&6; }
6435if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
6436 $as_echo_n "(cached) " >&6
6437else
6438 if test -n "$ac_ct_NMEDIT"; then
6439 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
6440else
6441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6442for as_dir in $PATH
6443do
6444 IFS=$as_save_IFS
6445 test -z "$as_dir" && as_dir=.
6446 for ac_exec_ext in '' $ac_executable_extensions; do
6447 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6448 ac_cv_prog_ac_ct_NMEDIT="nmedit"
6449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6450 break 2
6451 fi
6452done
6453 done
6454IFS=$as_save_IFS
6455
6456fi
6457fi
6458ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
6459if test -n "$ac_ct_NMEDIT"; then
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
6461$as_echo "$ac_ct_NMEDIT" >&6; }
6462else
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467 if test "x$ac_ct_NMEDIT" = x; then
6468 NMEDIT=":"
6469 else
6470 case $cross_compiling:$ac_tool_warned in
6471yes:)
6472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6474ac_tool_warned=yes ;;
6475esac
6476 NMEDIT=$ac_ct_NMEDIT
6477 fi
6478else
6479 NMEDIT="$ac_cv_prog_NMEDIT"
6480fi
6481
6482 if test -n "$ac_tool_prefix"; then
6483 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
6484set dummy ${ac_tool_prefix}lipo; ac_word=$2
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486$as_echo_n "checking for $ac_word... " >&6; }
6487if test "${ac_cv_prog_LIPO+set}" = set; then :
6488 $as_echo_n "(cached) " >&6
6489else
6490 if test -n "$LIPO"; then
6491 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
6492else
6493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494for as_dir in $PATH
6495do
6496 IFS=$as_save_IFS
6497 test -z "$as_dir" && as_dir=.
6498 for ac_exec_ext in '' $ac_executable_extensions; do
6499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6500 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
6501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6502 break 2
6503 fi
6504done
6505 done
6506IFS=$as_save_IFS
6507
6508fi
6509fi
6510LIPO=$ac_cv_prog_LIPO
6511if test -n "$LIPO"; then
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
6513$as_echo "$LIPO" >&6; }
6514else
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6516$as_echo "no" >&6; }
6517fi
6518
6519
6520fi
6521if test -z "$ac_cv_prog_LIPO"; then
6522 ac_ct_LIPO=$LIPO
6523 # Extract the first word of "lipo", so it can be a program name with args.
6524set dummy lipo; ac_word=$2
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526$as_echo_n "checking for $ac_word... " >&6; }
6527if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
6528 $as_echo_n "(cached) " >&6
6529else
6530 if test -n "$ac_ct_LIPO"; then
6531 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
6532else
6533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534for as_dir in $PATH
6535do
6536 IFS=$as_save_IFS
6537 test -z "$as_dir" && as_dir=.
6538 for ac_exec_ext in '' $ac_executable_extensions; do
6539 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6540 ac_cv_prog_ac_ct_LIPO="lipo"
6541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542 break 2
6543 fi
6544done
6545 done
6546IFS=$as_save_IFS
6547
6548fi
6549fi
6550ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
6551if test -n "$ac_ct_LIPO"; then
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
6553$as_echo "$ac_ct_LIPO" >&6; }
6554else
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556$as_echo "no" >&6; }
6557fi
6558
6559 if test "x$ac_ct_LIPO" = x; then
6560 LIPO=":"
6561 else
6562 case $cross_compiling:$ac_tool_warned in
6563yes:)
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6565$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6566ac_tool_warned=yes ;;
6567esac
6568 LIPO=$ac_ct_LIPO
6569 fi
6570else
6571 LIPO="$ac_cv_prog_LIPO"
6572fi
6573
6574 if test -n "$ac_tool_prefix"; then
6575 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
6576set dummy ${ac_tool_prefix}otool; ac_word=$2
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6578$as_echo_n "checking for $ac_word... " >&6; }
6579if test "${ac_cv_prog_OTOOL+set}" = set; then :
6580 $as_echo_n "(cached) " >&6
6581else
6582 if test -n "$OTOOL"; then
6583 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
6584else
6585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6586for as_dir in $PATH
6587do
6588 IFS=$as_save_IFS
6589 test -z "$as_dir" && as_dir=.
6590 for ac_exec_ext in '' $ac_executable_extensions; do
6591 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6592 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
6593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6594 break 2
6595 fi
6596done
6597 done
6598IFS=$as_save_IFS
6599
6600fi
6601fi
6602OTOOL=$ac_cv_prog_OTOOL
6603if test -n "$OTOOL"; then
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
6605$as_echo "$OTOOL" >&6; }
6606else
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608$as_echo "no" >&6; }
6609fi
6610
6611
6612fi
6613if test -z "$ac_cv_prog_OTOOL"; then
6614 ac_ct_OTOOL=$OTOOL
6615 # Extract the first word of "otool", so it can be a program name with args.
6616set dummy otool; ac_word=$2
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6618$as_echo_n "checking for $ac_word... " >&6; }
6619if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
6620 $as_echo_n "(cached) " >&6
6621else
6622 if test -n "$ac_ct_OTOOL"; then
6623 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
6624else
6625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626for as_dir in $PATH
6627do
6628 IFS=$as_save_IFS
6629 test -z "$as_dir" && as_dir=.
6630 for ac_exec_ext in '' $ac_executable_extensions; do
6631 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6632 ac_cv_prog_ac_ct_OTOOL="otool"
6633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634 break 2
6635 fi
6636done
6637 done
6638IFS=$as_save_IFS
6639
6640fi
6641fi
6642ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
6643if test -n "$ac_ct_OTOOL"; then
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
6645$as_echo "$ac_ct_OTOOL" >&6; }
6646else
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6648$as_echo "no" >&6; }
6649fi
6650
6651 if test "x$ac_ct_OTOOL" = x; then
6652 OTOOL=":"
6653 else
6654 case $cross_compiling:$ac_tool_warned in
6655yes:)
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6658ac_tool_warned=yes ;;
6659esac
6660 OTOOL=$ac_ct_OTOOL
6661 fi
6662else
6663 OTOOL="$ac_cv_prog_OTOOL"
6664fi
6665
6666 if test -n "$ac_tool_prefix"; then
6667 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
6668set dummy ${ac_tool_prefix}otool64; ac_word=$2
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6670$as_echo_n "checking for $ac_word... " >&6; }
6671if test "${ac_cv_prog_OTOOL64+set}" = set; then :
6672 $as_echo_n "(cached) " >&6
6673else
6674 if test -n "$OTOOL64"; then
6675 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
6676else
6677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678for as_dir in $PATH
6679do
6680 IFS=$as_save_IFS
6681 test -z "$as_dir" && as_dir=.
6682 for ac_exec_ext in '' $ac_executable_extensions; do
6683 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6684 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
6685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686 break 2
6687 fi
6688done
6689 done
6690IFS=$as_save_IFS
6691
6692fi
6693fi
6694OTOOL64=$ac_cv_prog_OTOOL64
6695if test -n "$OTOOL64"; then
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
6697$as_echo "$OTOOL64" >&6; }
6698else
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6700$as_echo "no" >&6; }
6701fi
6702
6703
6704fi
6705if test -z "$ac_cv_prog_OTOOL64"; then
6706 ac_ct_OTOOL64=$OTOOL64
6707 # Extract the first word of "otool64", so it can be a program name with args.
6708set dummy otool64; ac_word=$2
6709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6710$as_echo_n "checking for $ac_word... " >&6; }
6711if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
6712 $as_echo_n "(cached) " >&6
6713else
6714 if test -n "$ac_ct_OTOOL64"; then
6715 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
6716else
6717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6718for as_dir in $PATH
6719do
6720 IFS=$as_save_IFS
6721 test -z "$as_dir" && as_dir=.
6722 for ac_exec_ext in '' $ac_executable_extensions; do
6723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6724 ac_cv_prog_ac_ct_OTOOL64="otool64"
6725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6726 break 2
6727 fi
6728done
6729 done
6730IFS=$as_save_IFS
6731
6732fi
6733fi
6734ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
6735if test -n "$ac_ct_OTOOL64"; then
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
6737$as_echo "$ac_ct_OTOOL64" >&6; }
6738else
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742
6743 if test "x$ac_ct_OTOOL64" = x; then
6744 OTOOL64=":"
6745 else
6746 case $cross_compiling:$ac_tool_warned in
6747yes:)
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6750ac_tool_warned=yes ;;
6751esac
6752 OTOOL64=$ac_ct_OTOOL64
6753 fi
6754else
6755 OTOOL64="$ac_cv_prog_OTOOL64"
6756fi
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
6785$as_echo_n "checking for -single_module linker flag... " >&6; }
6786if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
6787 $as_echo_n "(cached) " >&6
6788else
6789 lt_cv_apple_cc_single_mod=no
6790 if test -z "${LT_MULTI_MODULE}"; then
6791 # By default we will add the -single_module flag. You can override
6792 # by either setting the environment variable LT_MULTI_MODULE
6793 # non-empty at configure time, or by adding -multi_module to the
6794 # link flags.
6795 rm -rf libconftest.dylib*
6796 echo "int foo(void){return 1;}" > conftest.c
6797 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6798-dynamiclib -Wl,-single_module conftest.c" >&5
6799 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6800 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
6801 _lt_result=$?
6802 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
6803 lt_cv_apple_cc_single_mod=yes
6804 else
6805 cat conftest.err >&5
6806 fi
6807 rm -rf libconftest.dylib*
6808 rm -f conftest.*
6809 fi
6810fi
6811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
6812$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
6814$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
6815if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
6816 $as_echo_n "(cached) " >&6
6817else
6818 lt_cv_ld_exported_symbols_list=no
6819 save_LDFLAGS=$LDFLAGS
6820 echo "_main" > conftest.sym
6821 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
6822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6823/* end confdefs.h. */
6824
6825int
6826main ()
6827{
6828
6829 ;
6830 return 0;
6831}
6832_ACEOF
6833if ac_fn_c_try_link "$LINENO"; then :
6834 lt_cv_ld_exported_symbols_list=yes
6835else
6836 lt_cv_ld_exported_symbols_list=no
6837fi
6838rm -f core conftest.err conftest.$ac_objext \
6839 conftest$ac_exeext conftest.$ac_ext
6840 LDFLAGS="$save_LDFLAGS"
6841
6842fi
6843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
6844$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
6845 case $host_os in
6846 rhapsody* | darwin1.[012])
6847 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
6848 darwin1.*)
6849 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
6850 darwin*) # darwin 5.x on
6851 # if running on 10.5 or later, the deployment target defaults
6852 # to the OS version, if on x86, and 10.4, the deployment
6853 # target defaults to 10.4. Don't you love it?
6854 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
6855 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
6856 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6857 10.[012]*)
6858 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
6859 10.*)
6860 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6861 esac
6862 ;;
6863 esac
6864 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
6865 _lt_dar_single_mod='$single_module'
6866 fi
6867 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
6868 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
6869 else
6870 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
6871 fi
6872 if test "$DSYMUTIL" != ":"; then
6873 _lt_dsymutil='~$DSYMUTIL $lib || :'
6874 else
6875 _lt_dsymutil=
6876 fi
6877 ;;
6878 esac
6879
6880ac_ext=c
6881ac_cpp='$CPP $CPPFLAGS'
6882ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6883ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6884ac_compiler_gnu=$ac_cv_c_compiler_gnu
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6886$as_echo_n "checking how to run the C preprocessor... " >&6; }
6887# On Suns, sometimes $CPP names a directory.
6888if test -n "$CPP" && test -d "$CPP"; then
6889 CPP=
6890fi
6891if test -z "$CPP"; then
6892 if test "${ac_cv_prog_CPP+set}" = set; then :
6893 $as_echo_n "(cached) " >&6
6894else
6895 # Double quotes because CPP needs to be expanded
6896 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6897 do
6898 ac_preproc_ok=false
6899for ac_c_preproc_warn_flag in '' yes
6900do
6901 # Use a header file that comes with gcc, so configuring glibc
6902 # with a fresh cross-compiler works.
6903 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6904 # <limits.h> exists even on freestanding compilers.
6905 # On the NeXT, cc -E runs the code through the compiler's parser,
6906 # not just through cpp. "Syntax error" is here to catch this case.
6907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6908/* end confdefs.h. */
6909#ifdef __STDC__
6910# include <limits.h>
6911#else
6912# include <assert.h>
6913#endif
6914 Syntax error
6915_ACEOF
6916if ac_fn_c_try_cpp "$LINENO"; then :
6917
6918else
6919 # Broken: fails on valid input.
6920continue
6921fi
6922rm -f conftest.err conftest.i conftest.$ac_ext
6923
6924 # OK, works on sane cases. Now check whether nonexistent headers
6925 # can be detected and how.
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927/* end confdefs.h. */
6928#include <ac_nonexistent.h>
6929_ACEOF
6930if ac_fn_c_try_cpp "$LINENO"; then :
6931 # Broken: success on invalid input.
6932continue
6933else
6934 # Passes both tests.
6935ac_preproc_ok=:
6936break
6937fi
6938rm -f conftest.err conftest.i conftest.$ac_ext
6939
6940done
6941# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6942rm -f conftest.i conftest.err conftest.$ac_ext
6943if $ac_preproc_ok; then :
6944 break
6945fi
6946
6947 done
6948 ac_cv_prog_CPP=$CPP
6949
6950fi
6951 CPP=$ac_cv_prog_CPP
6952else
6953 ac_cv_prog_CPP=$CPP
6954fi
6955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6956$as_echo "$CPP" >&6; }
6957ac_preproc_ok=false
6958for ac_c_preproc_warn_flag in '' yes
6959do
6960 # Use a header file that comes with gcc, so configuring glibc
6961 # with a fresh cross-compiler works.
6962 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6963 # <limits.h> exists even on freestanding compilers.
6964 # On the NeXT, cc -E runs the code through the compiler's parser,
6965 # not just through cpp. "Syntax error" is here to catch this case.
6966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6967/* end confdefs.h. */
6968#ifdef __STDC__
6969# include <limits.h>
6970#else
6971# include <assert.h>
6972#endif
6973 Syntax error
6974_ACEOF
6975if ac_fn_c_try_cpp "$LINENO"; then :
6976
6977else
6978 # Broken: fails on valid input.
6979continue
6980fi
6981rm -f conftest.err conftest.i conftest.$ac_ext
6982
6983 # OK, works on sane cases. Now check whether nonexistent headers
6984 # can be detected and how.
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986/* end confdefs.h. */
6987#include <ac_nonexistent.h>
6988_ACEOF
6989if ac_fn_c_try_cpp "$LINENO"; then :
6990 # Broken: success on invalid input.
6991continue
6992else
6993 # Passes both tests.
6994ac_preproc_ok=:
6995break
6996fi
6997rm -f conftest.err conftest.i conftest.$ac_ext
6998
6999done
7000# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7001rm -f conftest.i conftest.err conftest.$ac_ext
7002if $ac_preproc_ok; then :
7003
7004else
7005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7007as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7008See \`config.log' for more details" "$LINENO" 5 ; }
7009fi
7010
7011ac_ext=c
7012ac_cpp='$CPP $CPPFLAGS'
7013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7015ac_compiler_gnu=$ac_cv_c_compiler_gnu
7016
7017
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7019$as_echo_n "checking for ANSI C header files... " >&6; }
7020if test "${ac_cv_header_stdc+set}" = set; then :
7021 $as_echo_n "(cached) " >&6
7022else
7023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7024/* end confdefs.h. */
7025#include <stdlib.h>
7026#include <stdarg.h>
7027#include <string.h>
7028#include <float.h>
7029
7030int
7031main ()
7032{
7033
7034 ;
7035 return 0;
7036}
7037_ACEOF
7038if ac_fn_c_try_compile "$LINENO"; then :
7039 ac_cv_header_stdc=yes
7040else
7041 ac_cv_header_stdc=no
7042fi
7043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7044
7045if test $ac_cv_header_stdc = yes; then
7046 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7048/* end confdefs.h. */
7049#include <string.h>
7050
7051_ACEOF
7052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7053 $EGREP "memchr" >/dev/null 2>&1; then :
7054
7055else
7056 ac_cv_header_stdc=no
7057fi
7058rm -f conftest*
7059
7060fi
7061
7062if test $ac_cv_header_stdc = yes; then
7063 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7065/* end confdefs.h. */
7066#include <stdlib.h>
7067
7068_ACEOF
7069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7070 $EGREP "free" >/dev/null 2>&1; then :
7071
7072else
7073 ac_cv_header_stdc=no
7074fi
7075rm -f conftest*
7076
7077fi
7078
7079if test $ac_cv_header_stdc = yes; then
7080 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7081 if test "$cross_compiling" = yes; then :
7082 :
7083else
7084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7085/* end confdefs.h. */
7086#include <ctype.h>
7087#include <stdlib.h>
7088#if ((' ' & 0x0FF) == 0x020)
7089# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7090# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7091#else
7092# define ISLOWER(c) \
7093 (('a' <= (c) && (c) <= 'i') \
7094 || ('j' <= (c) && (c) <= 'r') \
7095 || ('s' <= (c) && (c) <= 'z'))
7096# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7097#endif
7098
7099#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7100int
7101main ()
7102{
7103 int i;
7104 for (i = 0; i < 256; i++)
7105 if (XOR (islower (i), ISLOWER (i))
7106 || toupper (i) != TOUPPER (i))
7107 return 2;
7108 return 0;
7109}
7110_ACEOF
7111if ac_fn_c_try_run "$LINENO"; then :
7112
7113else
7114 ac_cv_header_stdc=no
7115fi
7116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7117 conftest.$ac_objext conftest.beam conftest.$ac_ext
7118fi
7119
7120fi
7121fi
7122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7123$as_echo "$ac_cv_header_stdc" >&6; }
7124if test $ac_cv_header_stdc = yes; then
7125
7126$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7127
7128fi
7129
7130# On IRIX 5.3, sys/types and inttypes.h are conflicting.
7131for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7132 inttypes.h stdint.h unistd.h
7133do :
7134 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7135ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7136"
7137if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7138 cat >>confdefs.h <<_ACEOF
7139#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7140_ACEOF
7141
7142fi
7143
7144done
7145
7146
7147for ac_header in dlfcn.h
7148do :
7149 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
7150"
7151if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7152 cat >>confdefs.h <<_ACEOF
7153#define HAVE_DLFCN_H 1
7154_ACEOF
7155
7156fi
7157
7158done
7159
7160
7161
7162# Set options
7163
7164
7165
7166 enable_dlopen=no
7167
7168
7169
7170 # Check whether --enable-shared was given.
7171if test "${enable_shared+set}" = set; then :
7172 enableval=$enable_shared; p=${PACKAGE-default}
7173 case $enableval in
7174 yes) enable_shared=yes ;;
7175 no) enable_shared=no ;;
7176 *)
7177 enable_shared=no
7178 # Look at the argument we got. We use all the common list separators.
7179 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7180 for pkg in $enableval; do
7181 IFS="$lt_save_ifs"
7182 if test "X$pkg" = "X$p"; then
7183 enable_shared=yes
7184 fi
7185 done
7186 IFS="$lt_save_ifs"
7187 ;;
7188 esac
7189else
7190 enable_shared=yes
7191fi
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201 # Check whether --enable-static was given.
7202if test "${enable_static+set}" = set; then :
7203 enableval=$enable_static; p=${PACKAGE-default}
7204 case $enableval in
7205 yes) enable_static=yes ;;
7206 no) enable_static=no ;;
7207 *)
7208 enable_static=no
7209 # Look at the argument we got. We use all the common list separators.
7210 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7211 for pkg in $enableval; do
7212 IFS="$lt_save_ifs"
7213 if test "X$pkg" = "X$p"; then
7214 enable_static=yes
7215 fi
7216 done
7217 IFS="$lt_save_ifs"
7218 ;;
7219 esac
7220else
7221 enable_static=yes
7222fi
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233# Check whether --with-pic was given.
7234if test "${with_pic+set}" = set; then :
7235 withval=$with_pic; pic_mode="$withval"
7236else
7237 pic_mode=default
7238fi
7239
7240
7241test -z "$pic_mode" && pic_mode=default
7242
7243
7244
7245
7246
7247
7248
7249 # Check whether --enable-fast-install was given.
7250if test "${enable_fast_install+set}" = set; then :
7251 enableval=$enable_fast_install; p=${PACKAGE-default}
7252 case $enableval in
7253 yes) enable_fast_install=yes ;;
7254 no) enable_fast_install=no ;;
7255 *)
7256 enable_fast_install=no
7257 # Look at the argument we got. We use all the common list separators.
7258 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7259 for pkg in $enableval; do
7260 IFS="$lt_save_ifs"
7261 if test "X$pkg" = "X$p"; then
7262 enable_fast_install=yes
7263 fi
7264 done
7265 IFS="$lt_save_ifs"
7266 ;;
7267 esac
7268else
7269 enable_fast_install=yes
7270fi
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282# This can be used to rebuild libtool when needed
7283LIBTOOL_DEPS="$ltmain"
7284
7285# Always use our own libtool.
7286LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312test -z "$LN_S" && LN_S="ln -s"
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327if test -n "${ZSH_VERSION+set}" ; then
7328 setopt NO_GLOB_SUBST
7329fi
7330
7331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7332$as_echo_n "checking for objdir... " >&6; }
7333if test "${lt_cv_objdir+set}" = set; then :
7334 $as_echo_n "(cached) " >&6
7335else
7336 rm -f .libs 2>/dev/null
7337mkdir .libs 2>/dev/null
7338if test -d .libs; then
7339 lt_cv_objdir=.libs
7340else
7341 # MS-DOS does not allow filenames that begin with a dot.
7342 lt_cv_objdir=_libs
7343fi
7344rmdir .libs 2>/dev/null
7345fi
7346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7347$as_echo "$lt_cv_objdir" >&6; }
7348objdir=$lt_cv_objdir
7349
7350
7351
7352
7353
7354cat >>confdefs.h <<_ACEOF
7355#define LT_OBJDIR "$lt_cv_objdir/"
7356_ACEOF
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374case $host_os in
7375aix3*)
7376 # AIX sometimes has problems with the GCC collect2 program. For some
7377 # reason, if we set the COLLECT_NAMES environment variable, the problems
7378 # vanish in a puff of smoke.
7379 if test "X${COLLECT_NAMES+set}" != Xset; then
7380 COLLECT_NAMES=
7381 export COLLECT_NAMES
7382 fi
7383 ;;
7384esac
7385
7386# Sed substitution that helps us do robust quoting. It backslashifies
7387# metacharacters that are still active within double-quoted strings.
7388sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7389
7390# Same as above, but do not quote variable references.
7391double_quote_subst='s/\(["`\\]\)/\\\1/g'
7392
7393# Sed substitution to delay expansion of an escaped shell variable in a
7394# double_quote_subst'ed string.
7395delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7396
7397# Sed substitution to delay expansion of an escaped single quote.
7398delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7399
7400# Sed substitution to avoid accidental globbing in evaled expressions
7401no_glob_subst='s/\*/\\\*/g'
7402
7403# Global variables:
7404ofile=libtool
7405can_build_shared=yes
7406
7407# All known linkers require a `.a' archive for static linking (except MSVC,
7408# which needs '.lib').
7409libext=a
7410
7411with_gnu_ld="$lt_cv_prog_gnu_ld"
7412
7413old_CC="$CC"
7414old_CFLAGS="$CFLAGS"
7415
7416# Set sane defaults for various variables
7417test -z "$CC" && CC=cc
7418test -z "$LTCC" && LTCC=$CC
7419test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
7420test -z "$LD" && LD=ld
7421test -z "$ac_objext" && ac_objext=o
7422
7423for cc_temp in $compiler""; do
7424 case $cc_temp in
7425 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7426 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7427 \-*) ;;
7428 *) break;;
7429 esac
7430done
7431cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7432
7433
7434# Only perform the check for file, if the check method requires it
7435test -z "$MAGIC_CMD" && MAGIC_CMD=file
7436case $deplibs_check_method in
7437file_magic*)
7438 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
7440$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
7441if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7442 $as_echo_n "(cached) " >&6
7443else
7444 case $MAGIC_CMD in
7445[\\/*] | ?:[\\/]*)
7446 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7447 ;;
7448*)
7449 lt_save_MAGIC_CMD="$MAGIC_CMD"
7450 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7451 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7452 for ac_dir in $ac_dummy; do
7453 IFS="$lt_save_ifs"
7454 test -z "$ac_dir" && ac_dir=.
7455 if test -f $ac_dir/${ac_tool_prefix}file; then
7456 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7457 if test -n "$file_magic_test_file"; then
7458 case $deplibs_check_method in
7459 "file_magic "*)
7460 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7461 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7462 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7463 $EGREP "$file_magic_regex" > /dev/null; then
7464 :
7465 else
7466 cat <<_LT_EOF 1>&2
7467
7468*** Warning: the command libtool uses to detect shared libraries,
7469*** $file_magic_cmd, produces output that libtool cannot recognize.
7470*** The result is that libtool may fail to recognize shared libraries
7471*** as such. This will affect the creation of libtool libraries that
7472*** depend on shared libraries, but programs linked with such libtool
7473*** libraries will work regardless of this problem. Nevertheless, you
7474*** may want to report the problem to your system manager and/or to
7475*** bug-libtool@gnu.org
7476
7477_LT_EOF
7478 fi ;;
7479 esac
7480 fi
7481 break
7482 fi
7483 done
7484 IFS="$lt_save_ifs"
7485 MAGIC_CMD="$lt_save_MAGIC_CMD"
7486 ;;
7487esac
7488fi
7489
7490MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7491if test -n "$MAGIC_CMD"; then
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7493$as_echo "$MAGIC_CMD" >&6; }
7494else
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7496$as_echo "no" >&6; }
7497fi
7498
7499
7500
7501
7502
7503if test -z "$lt_cv_path_MAGIC_CMD"; then
7504 if test -n "$ac_tool_prefix"; then
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
7506$as_echo_n "checking for file... " >&6; }
7507if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7508 $as_echo_n "(cached) " >&6
7509else
7510 case $MAGIC_CMD in
7511[\\/*] | ?:[\\/]*)
7512 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7513 ;;
7514*)
7515 lt_save_MAGIC_CMD="$MAGIC_CMD"
7516 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7517 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7518 for ac_dir in $ac_dummy; do
7519 IFS="$lt_save_ifs"
7520 test -z "$ac_dir" && ac_dir=.
7521 if test -f $ac_dir/file; then
7522 lt_cv_path_MAGIC_CMD="$ac_dir/file"
7523 if test -n "$file_magic_test_file"; then
7524 case $deplibs_check_method in
7525 "file_magic "*)
7526 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7527 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7528 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7529 $EGREP "$file_magic_regex" > /dev/null; then
7530 :
7531 else
7532 cat <<_LT_EOF 1>&2
7533
7534*** Warning: the command libtool uses to detect shared libraries,
7535*** $file_magic_cmd, produces output that libtool cannot recognize.
7536*** The result is that libtool may fail to recognize shared libraries
7537*** as such. This will affect the creation of libtool libraries that
7538*** depend on shared libraries, but programs linked with such libtool
7539*** libraries will work regardless of this problem. Nevertheless, you
7540*** may want to report the problem to your system manager and/or to
7541*** bug-libtool@gnu.org
7542
7543_LT_EOF
7544 fi ;;
7545 esac
7546 fi
7547 break
7548 fi
7549 done
7550 IFS="$lt_save_ifs"
7551 MAGIC_CMD="$lt_save_MAGIC_CMD"
7552 ;;
7553esac
7554fi
7555
7556MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7557if test -n "$MAGIC_CMD"; then
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
7559$as_echo "$MAGIC_CMD" >&6; }
7560else
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7562$as_echo "no" >&6; }
7563fi
7564
7565
7566 else
7567 MAGIC_CMD=:
7568 fi
7569fi
7570
7571 fi
7572 ;;
7573esac
7574
7575# Use C for the default configuration in the libtool script
7576
7577lt_save_CC="$CC"
7578ac_ext=c
7579ac_cpp='$CPP $CPPFLAGS'
7580ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7581ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7582ac_compiler_gnu=$ac_cv_c_compiler_gnu
7583
7584
7585# Source file extension for C test sources.
7586ac_ext=c
7587
7588# Object file extension for compiled C test sources.
7589objext=o
7590objext=$objext
7591
7592# Code to be used in simple compile tests
7593lt_simple_compile_test_code="int some_variable = 0;"
7594
7595# Code to be used in simple link tests
7596lt_simple_link_test_code='int main(){return(0);}'
7597
7598
7599
7600
7601
7602
7603
7604# If no C compiler was specified, use CC.
7605LTCC=${LTCC-"$CC"}
7606
7607# If no C compiler flags were specified, use CFLAGS.
7608LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7609
7610# Allow CC to be a program name with arguments.
7611compiler=$CC
7612
7613# Save the default compiler, since it gets overwritten when the other
7614# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7615compiler_DEFAULT=$CC
7616
7617# save warnings/boilerplate of simple test code
7618ac_outfile=conftest.$ac_objext
7619echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7620eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7621_lt_compiler_boilerplate=`cat conftest.err`
7622$RM conftest*
7623
7624ac_outfile=conftest.$ac_objext
7625echo "$lt_simple_link_test_code" >conftest.$ac_ext
7626eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7627_lt_linker_boilerplate=`cat conftest.err`
7628$RM -r conftest*
7629
7630
7631## CAVEAT EMPTOR:
7632## There is no encapsulation within the following macros, do not change
7633## the running order or otherwise move them around unless you know exactly
7634## what you are doing...
7635if test -n "$compiler"; then
7636
7637lt_prog_compiler_no_builtin_flag=
7638
7639if test "$GCC" = yes; then
7640 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7641
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7643$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
7644if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
7645 $as_echo_n "(cached) " >&6
7646else
7647 lt_cv_prog_compiler_rtti_exceptions=no
7648 ac_outfile=conftest.$ac_objext
7649 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7650 lt_compiler_flag="-fno-rtti -fno-exceptions"
7651 # Insert the option either (1) after the last *FLAGS variable, or
7652 # (2) before a word containing "conftest.", or (3) at the end.
7653 # Note that $ac_compile itself does not contain backslashes and begins
7654 # with a dollar sign (not a hyphen), so the echo should work correctly.
7655 # The option is referenced via a variable to avoid confusing sed.
7656 lt_compile=`echo "$ac_compile" | $SED \
7657 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7658 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7659 -e 's:$: $lt_compiler_flag:'`
7660 (eval echo "\"\$as_me:7660: $lt_compile\"" >&5)
7661 (eval "$lt_compile" 2>conftest.err)
7662 ac_status=$?
7663 cat conftest.err >&5
7664 echo "$as_me:7664: \$? = $ac_status" >&5
7665 if (exit $ac_status) && test -s "$ac_outfile"; then
7666 # The compiler can only warn and ignore the option if not recognized
7667 # So say no if there are warnings other than the usual output.
7668 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7669 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7670 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7671 lt_cv_prog_compiler_rtti_exceptions=yes
7672 fi
7673 fi
7674 $RM conftest*
7675
7676fi
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7678$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7679
7680if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7681 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7682else
7683 :
7684fi
7685
7686fi
7687
7688
7689
7690
7691
7692
7693 lt_prog_compiler_wl=
7694lt_prog_compiler_pic=
7695lt_prog_compiler_static=
7696
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7698$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
7699
7700 if test "$GCC" = yes; then
7701 lt_prog_compiler_wl='-Wl,'
7702 lt_prog_compiler_static='-static'
7703
7704 case $host_os in
7705 aix*)
7706 # All AIX code is PIC.
7707 if test "$host_cpu" = ia64; then
7708 # AIX 5 now supports IA64 processor
7709 lt_prog_compiler_static='-Bstatic'
7710 fi
7711 ;;
7712
7713 amigaos*)
7714 case $host_cpu in
7715 powerpc)
7716 # see comment about AmigaOS4 .so support
7717 lt_prog_compiler_pic='-fPIC'
7718 ;;
7719 m68k)
7720 # FIXME: we need at least 68020 code to build shared libraries, but
7721 # adding the `-m68020' flag to GCC prevents building anything better,
7722 # like `-m68040'.
7723 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7724 ;;
7725 esac
7726 ;;
7727
7728 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7729 # PIC is the default for these OSes.
7730 ;;
7731
7732 mingw* | cygwin* | pw32* | os2* | cegcc*)
7733 # This hack is so that the source file can tell whether it is being
7734 # built for inclusion in a dll (and should export symbols for example).
7735 # Although the cygwin gcc ignores -fPIC, still need this for old-style
7736 # (--disable-auto-import) libraries
7737 lt_prog_compiler_pic='-DDLL_EXPORT'
7738 ;;
7739
7740 darwin* | rhapsody*)
7741 # PIC is the default on this platform
7742 # Common symbols not allowed in MH_DYLIB files
7743 lt_prog_compiler_pic='-fno-common'
7744 ;;
7745
7746 hpux*)
7747 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7748 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
7749 # sets the default TLS model and affects inlining.
7750 case $host_cpu in
7751 hppa*64*)
7752 # +Z the default
7753 ;;
7754 *)
7755 lt_prog_compiler_pic='-fPIC'
7756 ;;
7757 esac
7758 ;;
7759
7760 interix[3-9]*)
7761 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7762 # Instead, we relocate shared libraries at runtime.
7763 ;;
7764
7765 msdosdjgpp*)
7766 # Just because we use GCC doesn't mean we suddenly get shared libraries
7767 # on systems that don't support them.
7768 lt_prog_compiler_can_build_shared=no
7769 enable_shared=no
7770 ;;
7771
7772 *nto* | *qnx*)
7773 # QNX uses GNU C++, but need to define -shared option too, otherwise
7774 # it will coredump.
7775 lt_prog_compiler_pic='-fPIC -shared'
7776 ;;
7777
7778 sysv4*MP*)
7779 if test -d /usr/nec; then
7780 lt_prog_compiler_pic=-Kconform_pic
7781 fi
7782 ;;
7783
7784 *)
7785 lt_prog_compiler_pic='-fPIC'
7786 ;;
7787 esac
7788 else
7789 # PORTME Check for flag to pass linker flags through the system compiler.
7790 case $host_os in
7791 aix*)
7792 lt_prog_compiler_wl='-Wl,'
7793 if test "$host_cpu" = ia64; then
7794 # AIX 5 now supports IA64 processor
7795 lt_prog_compiler_static='-Bstatic'
7796 else
7797 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7798 fi
7799 ;;
7800
7801 mingw* | cygwin* | pw32* | os2* | cegcc*)
7802 # This hack is so that the source file can tell whether it is being
7803 # built for inclusion in a dll (and should export symbols for example).
7804 lt_prog_compiler_pic='-DDLL_EXPORT'
7805 ;;
7806
7807 hpux9* | hpux10* | hpux11*)
7808 lt_prog_compiler_wl='-Wl,'
7809 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7810 # not for PA HP-UX.
7811 case $host_cpu in
7812 hppa*64*|ia64*)
7813 # +Z the default
7814 ;;
7815 *)
7816 lt_prog_compiler_pic='+Z'
7817 ;;
7818 esac
7819 # Is there a better lt_prog_compiler_static that works with the bundled CC?
7820 lt_prog_compiler_static='${wl}-a ${wl}archive'
7821 ;;
7822
7823 irix5* | irix6* | nonstopux*)
7824 lt_prog_compiler_wl='-Wl,'
7825 # PIC (with -KPIC) is the default.
7826 lt_prog_compiler_static='-non_shared'
7827 ;;
7828
7829 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7830 case $cc_basename in
7831 # old Intel for x86_64 which still supported -KPIC.
7832 ecc*)
7833 lt_prog_compiler_wl='-Wl,'
7834 lt_prog_compiler_pic='-KPIC'
7835 lt_prog_compiler_static='-static'
7836 ;;
7837 # icc used to be incompatible with GCC.
7838 # ICC 10 doesn't accept -KPIC any more.
7839 icc* | ifort*)
7840 lt_prog_compiler_wl='-Wl,'
7841 lt_prog_compiler_pic='-fPIC'
7842 lt_prog_compiler_static='-static'
7843 ;;
7844 # Lahey Fortran 8.1.
7845 lf95*)
7846 lt_prog_compiler_wl='-Wl,'
7847 lt_prog_compiler_pic='--shared'
7848 lt_prog_compiler_static='--static'
7849 ;;
7850 pgcc* | pgf77* | pgf90* | pgf95*)
7851 # Portland Group compilers (*not* the Pentium gcc compiler,
7852 # which looks to be a dead project)
7853 lt_prog_compiler_wl='-Wl,'
7854 lt_prog_compiler_pic='-fpic'
7855 lt_prog_compiler_static='-Bstatic'
7856 ;;
7857 ccc*)
7858 lt_prog_compiler_wl='-Wl,'
7859 # All Alpha code is PIC.
7860 lt_prog_compiler_static='-non_shared'
7861 ;;
7862 xl*)
7863 # IBM XL C 8.0/Fortran 10.1 on PPC
7864 lt_prog_compiler_wl='-Wl,'
7865 lt_prog_compiler_pic='-qpic'
7866 lt_prog_compiler_static='-qstaticlink'
7867 ;;
7868 *)
7869 case `$CC -V 2>&1 | sed 5q` in
7870 *Sun\ C*)
7871 # Sun C 5.9
7872 lt_prog_compiler_pic='-KPIC'
7873 lt_prog_compiler_static='-Bstatic'
7874 lt_prog_compiler_wl='-Wl,'
7875 ;;
7876 *Sun\ F*)
7877 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7878 lt_prog_compiler_pic='-KPIC'
7879 lt_prog_compiler_static='-Bstatic'
7880 lt_prog_compiler_wl=''
7881 ;;
7882 esac
7883 ;;
7884 esac
7885 ;;
7886
7887 newsos6)
7888 lt_prog_compiler_pic='-KPIC'
7889 lt_prog_compiler_static='-Bstatic'
7890 ;;
7891
7892 *nto* | *qnx*)
7893 # QNX uses GNU C++, but need to define -shared option too, otherwise
7894 # it will coredump.
7895 lt_prog_compiler_pic='-fPIC -shared'
7896 ;;
7897
7898 osf3* | osf4* | osf5*)
7899 lt_prog_compiler_wl='-Wl,'
7900 # All OSF/1 code is PIC.
7901 lt_prog_compiler_static='-non_shared'
7902 ;;
7903
7904 rdos*)
7905 lt_prog_compiler_static='-non_shared'
7906 ;;
7907
7908 solaris*)
7909 lt_prog_compiler_pic='-KPIC'
7910 lt_prog_compiler_static='-Bstatic'
7911 case $cc_basename in
7912 f77* | f90* | f95*)
7913 lt_prog_compiler_wl='-Qoption ld ';;
7914 *)
7915 lt_prog_compiler_wl='-Wl,';;
7916 esac
7917 ;;
7918
7919 sunos4*)
7920 lt_prog_compiler_wl='-Qoption ld '
7921 lt_prog_compiler_pic='-PIC'
7922 lt_prog_compiler_static='-Bstatic'
7923 ;;
7924
7925 sysv4 | sysv4.2uw2* | sysv4.3*)
7926 lt_prog_compiler_wl='-Wl,'
7927 lt_prog_compiler_pic='-KPIC'
7928 lt_prog_compiler_static='-Bstatic'
7929 ;;
7930
7931 sysv4*MP*)
7932 if test -d /usr/nec ;then
7933 lt_prog_compiler_pic='-Kconform_pic'
7934 lt_prog_compiler_static='-Bstatic'
7935 fi
7936 ;;
7937
7938 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7939 lt_prog_compiler_wl='-Wl,'
7940 lt_prog_compiler_pic='-KPIC'
7941 lt_prog_compiler_static='-Bstatic'
7942 ;;
7943
7944 unicos*)
7945 lt_prog_compiler_wl='-Wl,'
7946 lt_prog_compiler_can_build_shared=no
7947 ;;
7948
7949 uts4*)
7950 lt_prog_compiler_pic='-pic'
7951 lt_prog_compiler_static='-Bstatic'
7952 ;;
7953
7954 *)
7955 lt_prog_compiler_can_build_shared=no
7956 ;;
7957 esac
7958 fi
7959
7960case $host_os in
7961 # For platforms which do not support PIC, -DPIC is meaningless:
7962 *djgpp*)
7963 lt_prog_compiler_pic=
7964 ;;
7965 *)
7966 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7967 ;;
7968esac
7969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
7970$as_echo "$lt_prog_compiler_pic" >&6; }
7971
7972
7973
7974
7975
7976
7977#
7978# Check to make sure the PIC flag actually works.
7979#
7980if test -n "$lt_prog_compiler_pic"; then
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7982$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
7983if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
7984 $as_echo_n "(cached) " >&6
7985else
7986 lt_cv_prog_compiler_pic_works=no
7987 ac_outfile=conftest.$ac_objext
7988 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7989 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7990 # Insert the option either (1) after the last *FLAGS variable, or
7991 # (2) before a word containing "conftest.", or (3) at the end.
7992 # Note that $ac_compile itself does not contain backslashes and begins
7993 # with a dollar sign (not a hyphen), so the echo should work correctly.
7994 # The option is referenced via a variable to avoid confusing sed.
7995 lt_compile=`echo "$ac_compile" | $SED \
7996 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7997 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7998 -e 's:$: $lt_compiler_flag:'`
7999 (eval echo "\"\$as_me:7999: $lt_compile\"" >&5)
8000 (eval "$lt_compile" 2>conftest.err)
8001 ac_status=$?
8002 cat conftest.err >&5
8003 echo "$as_me:8003: \$? = $ac_status" >&5
8004 if (exit $ac_status) && test -s "$ac_outfile"; then
8005 # The compiler can only warn and ignore the option if not recognized
8006 # So say no if there are warnings other than the usual output.
8007 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
8008 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8009 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8010 lt_cv_prog_compiler_pic_works=yes
8011 fi
8012 fi
8013 $RM conftest*
8014
8015fi
8016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
8017$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
8018
8019if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
8020 case $lt_prog_compiler_pic in
8021 "" | " "*) ;;
8022 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8023 esac
8024else
8025 lt_prog_compiler_pic=
8026 lt_prog_compiler_can_build_shared=no
8027fi
8028
8029fi
8030
8031
8032
8033
8034
8035
8036#
8037# Check to make sure the static flag actually works.
8038#
8039wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
8040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
8041$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
8042if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
8043 $as_echo_n "(cached) " >&6
8044else
8045 lt_cv_prog_compiler_static_works=no
8046 save_LDFLAGS="$LDFLAGS"
8047 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
8048 echo "$lt_simple_link_test_code" > conftest.$ac_ext
8049 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8050 # The linker can only warn and ignore the option if not recognized
8051 # So say no if there are warnings
8052 if test -s conftest.err; then
8053 # Append any errors to the config.log.
8054 cat conftest.err 1>&5
8055 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
8056 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8057 if diff conftest.exp conftest.er2 >/dev/null; then
8058 lt_cv_prog_compiler_static_works=yes
8059 fi
8060 else
8061 lt_cv_prog_compiler_static_works=yes
8062 fi
8063 fi
8064 $RM -r conftest*
8065 LDFLAGS="$save_LDFLAGS"
8066
8067fi
8068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
8069$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8070
8071if test x"$lt_cv_prog_compiler_static_works" = xyes; then
8072 :
8073else
8074 lt_prog_compiler_static=
8075fi
8076
8077
8078
8079
8080
8081
8082
8083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8084$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8085if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8086 $as_echo_n "(cached) " >&6
8087else
8088 lt_cv_prog_compiler_c_o=no
8089 $RM -r conftest 2>/dev/null
8090 mkdir conftest
8091 cd conftest
8092 mkdir out
8093 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8094
8095 lt_compiler_flag="-o out/conftest2.$ac_objext"
8096 # Insert the option either (1) after the last *FLAGS variable, or
8097 # (2) before a word containing "conftest.", or (3) at the end.
8098 # Note that $ac_compile itself does not contain backslashes and begins
8099 # with a dollar sign (not a hyphen), so the echo should work correctly.
8100 lt_compile=`echo "$ac_compile" | $SED \
8101 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8102 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8103 -e 's:$: $lt_compiler_flag:'`
8104 (eval echo "\"\$as_me:8104: $lt_compile\"" >&5)
8105 (eval "$lt_compile" 2>out/conftest.err)
8106 ac_status=$?
8107 cat out/conftest.err >&5
8108 echo "$as_me:8108: \$? = $ac_status" >&5
8109 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8110 then
8111 # The compiler can only warn and ignore the option if not recognized
8112 # So say no if there are warnings
8113 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8114 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8115 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8116 lt_cv_prog_compiler_c_o=yes
8117 fi
8118 fi
8119 chmod u+w . 2>&5
8120 $RM conftest*
8121 # SGI C++ compiler will create directory out/ii_files/ for
8122 # template instantiation
8123 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8124 $RM out/* && rmdir out
8125 cd ..
8126 $RM -r conftest
8127 $RM conftest*
8128
8129fi
8130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8131$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8132
8133
8134
8135
8136
8137
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8139$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8140if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8141 $as_echo_n "(cached) " >&6
8142else
8143 lt_cv_prog_compiler_c_o=no
8144 $RM -r conftest 2>/dev/null
8145 mkdir conftest
8146 cd conftest
8147 mkdir out
8148 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8149
8150 lt_compiler_flag="-o out/conftest2.$ac_objext"
8151 # Insert the option either (1) after the last *FLAGS variable, or
8152 # (2) before a word containing "conftest.", or (3) at the end.
8153 # Note that $ac_compile itself does not contain backslashes and begins
8154 # with a dollar sign (not a hyphen), so the echo should work correctly.
8155 lt_compile=`echo "$ac_compile" | $SED \
8156 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8157 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8158 -e 's:$: $lt_compiler_flag:'`
8159 (eval echo "\"\$as_me:8159: $lt_compile\"" >&5)
8160 (eval "$lt_compile" 2>out/conftest.err)
8161 ac_status=$?
8162 cat out/conftest.err >&5
8163 echo "$as_me:8163: \$? = $ac_status" >&5
8164 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8165 then
8166 # The compiler can only warn and ignore the option if not recognized
8167 # So say no if there are warnings
8168 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8169 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8170 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8171 lt_cv_prog_compiler_c_o=yes
8172 fi
8173 fi
8174 chmod u+w . 2>&5
8175 $RM conftest*
8176 # SGI C++ compiler will create directory out/ii_files/ for
8177 # template instantiation
8178 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8179 $RM out/* && rmdir out
8180 cd ..
8181 $RM -r conftest
8182 $RM conftest*
8183
8184fi
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8186$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8187
8188
8189
8190
8191hard_links="nottested"
8192if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8193 # do not overwrite the value of need_locks provided by the user
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8195$as_echo_n "checking if we can lock with hard links... " >&6; }
8196 hard_links=yes
8197 $RM conftest*
8198 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8199 touch conftest.a
8200 ln conftest.a conftest.b 2>&5 || hard_links=no
8201 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8203$as_echo "$hard_links" >&6; }
8204 if test "$hard_links" = no; then
8205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8206$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8207 need_locks=warn
8208 fi
8209else
8210 need_locks=no
8211fi
8212
8213
8214
8215
8216
8217
8218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8219$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8220
8221 runpath_var=
8222 allow_undefined_flag=
8223 always_export_symbols=no
8224 archive_cmds=
8225 archive_expsym_cmds=
8226 compiler_needs_object=no
8227 enable_shared_with_static_runtimes=no
8228 export_dynamic_flag_spec=
8229 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8230 hardcode_automatic=no
8231 hardcode_direct=no
8232 hardcode_direct_absolute=no
8233 hardcode_libdir_flag_spec=
8234 hardcode_libdir_flag_spec_ld=
8235 hardcode_libdir_separator=
8236 hardcode_minus_L=no
8237 hardcode_shlibpath_var=unsupported
8238 inherit_rpath=no
8239 link_all_deplibs=unknown
8240 module_cmds=
8241 module_expsym_cmds=
8242 old_archive_from_new_cmds=
8243 old_archive_from_expsyms_cmds=
8244 thread_safe_flag_spec=
8245 whole_archive_flag_spec=
8246 # include_expsyms should be a list of space-separated symbols to be *always*
8247 # included in the symbol list
8248 include_expsyms=
8249 # exclude_expsyms can be an extended regexp of symbols to exclude
8250 # it will be wrapped by ` (' and `)$', so one must not match beginning or
8251 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8252 # as well as any symbol that contains `d'.
8253 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
8254 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8255 # platforms (ab)use it in PIC code, but their linkers get confused if
8256 # the symbol is explicitly referenced. Since portable code cannot
8257 # rely on this symbol name, it's probably fine to never include it in
8258 # preloaded symbol tables.
8259 # Exclude shared library initialization/finalization symbols.
8260 extract_expsyms_cmds=
8261
8262 case $host_os in
8263 cygwin* | mingw* | pw32* | cegcc*)
8264 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8265 # When not using gcc, we currently assume that we are using
8266 # Microsoft Visual C++.
8267 if test "$GCC" != yes; then
8268 with_gnu_ld=no
8269 fi
8270 ;;
8271 interix*)
8272 # we just hope/assume this is gcc and not c89 (= MSVC++)
8273 with_gnu_ld=yes
8274 ;;
8275 openbsd*)
8276 with_gnu_ld=no
8277 ;;
8278 linux* | k*bsd*-gnu)
8279 link_all_deplibs=no
8280 ;;
8281 esac
8282
8283 ld_shlibs=yes
8284 if test "$with_gnu_ld" = yes; then
8285 # If archive_cmds runs LD, not CC, wlarc should be empty
8286 wlarc='${wl}'
8287
8288 # Set some defaults for GNU ld with shared library support. These
8289 # are reset later if shared libraries are not supported. Putting them
8290 # here allows them to be overridden if necessary.
8291 runpath_var=LD_RUN_PATH
8292 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8293 export_dynamic_flag_spec='${wl}--export-dynamic'
8294 # ancient GNU ld didn't support --whole-archive et. al.
8295 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
8296 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8297 else
8298 whole_archive_flag_spec=
8299 fi
8300 supports_anon_versioning=no
8301 case `$LD -v 2>&1` in
8302 *GNU\ gold*) supports_anon_versioning=yes ;;
8303 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8304 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8305 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8306 *\ 2.11.*) ;; # other 2.11 versions
8307 *) supports_anon_versioning=yes ;;
8308 esac
8309
8310 # See if GNU ld supports shared libraries.
8311 case $host_os in
8312 aix[3-9]*)
8313 # On AIX/PPC, the GNU linker is very broken
8314 if test "$host_cpu" != ia64; then
8315 ld_shlibs=no
8316 cat <<_LT_EOF 1>&2
8317
8318*** Warning: the GNU linker, at least up to release 2.9.1, is reported
8319*** to be unable to reliably create shared libraries on AIX.
8320*** Therefore, libtool is disabling shared libraries support. If you
8321*** really care for shared libraries, you may want to modify your PATH
8322*** so that a non-GNU linker is found, and then restart.
8323
8324_LT_EOF
8325 fi
8326 ;;
8327
8328 amigaos*)
8329 case $host_cpu in
8330 powerpc)
8331 # see comment about AmigaOS4 .so support
8332 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8333 archive_expsym_cmds=''
8334 ;;
8335 m68k)
8336 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)'
8337 hardcode_libdir_flag_spec='-L$libdir'
8338 hardcode_minus_L=yes
8339 ;;
8340 esac
8341 ;;
8342
8343 beos*)
8344 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8345 allow_undefined_flag=unsupported
8346 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8347 # support --undefined. This deserves some investigation. FIXME
8348 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8349 else
8350 ld_shlibs=no
8351 fi
8352 ;;
8353
8354 cygwin* | mingw* | pw32* | cegcc*)
8355 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8356 # as there is no search path for DLLs.
8357 hardcode_libdir_flag_spec='-L$libdir'
8358 allow_undefined_flag=unsupported
8359 always_export_symbols=no
8360 enable_shared_with_static_runtimes=yes
8361 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8362
8363 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8364 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8365 # If the export-symbols file already is a .def file (1st line
8366 # is EXPORTS), use it as is; otherwise, prepend...
8367 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8368 cp $export_symbols $output_objdir/$soname.def;
8369 else
8370 echo EXPORTS > $output_objdir/$soname.def;
8371 cat $export_symbols >> $output_objdir/$soname.def;
8372 fi~
8373 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8374 else
8375 ld_shlibs=no
8376 fi
8377 ;;
8378
8379 interix[3-9]*)
8380 hardcode_direct=no
8381 hardcode_shlibpath_var=no
8382 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8383 export_dynamic_flag_spec='${wl}-E'
8384 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8385 # Instead, shared libraries are loaded at an image base (0x10000000 by
8386 # default) and relocated if they conflict, which is a slow very memory
8387 # consuming and fragmenting process. To avoid this, we pick a random,
8388 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8389 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8390 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8391 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'
8392 ;;
8393
8394 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8395 tmp_diet=no
8396 if test "$host_os" = linux-dietlibc; then
8397 case $cc_basename in
8398 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
8399 esac
8400 fi
8401 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
8402 && test "$tmp_diet" = no
8403 then
8404 tmp_addflag=
8405 tmp_sharedflag='-shared'
8406 case $cc_basename,$host_cpu in
8407 pgcc*) # Portland Group C compiler
8408 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8409 tmp_addflag=' $pic_flag'
8410 ;;
8411 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8412 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8413 tmp_addflag=' $pic_flag -Mnomain' ;;
8414 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8415 tmp_addflag=' -i_dynamic' ;;
8416 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8417 tmp_addflag=' -i_dynamic -nofor_main' ;;
8418 ifc* | ifort*) # Intel Fortran compiler
8419 tmp_addflag=' -nofor_main' ;;
8420 lf95*) # Lahey Fortran 8.1
8421 whole_archive_flag_spec=
8422 tmp_sharedflag='--shared' ;;
8423 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8424 tmp_sharedflag='-qmkshrobj'
8425 tmp_addflag= ;;
8426 esac
8427 case `$CC -V 2>&1 | sed 5q` in
8428 *Sun\ C*) # Sun C 5.9
8429 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8430 compiler_needs_object=yes
8431 tmp_sharedflag='-G' ;;
8432 *Sun\ F*) # Sun Fortran 8.3
8433 tmp_sharedflag='-G' ;;
8434 esac
8435 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8436
8437 if test "x$supports_anon_versioning" = xyes; then
8438 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8439 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8440 echo "local: *; };" >> $output_objdir/$libname.ver~
8441 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8442 fi
8443
8444 case $cc_basename in
8445 xlf*)
8446 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8447 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
8448 hardcode_libdir_flag_spec=
8449 hardcode_libdir_flag_spec_ld='-rpath $libdir'
8450 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
8451 if test "x$supports_anon_versioning" = xyes; then
8452 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
8453 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8454 echo "local: *; };" >> $output_objdir/$libname.ver~
8455 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8456 fi
8457 ;;
8458 esac
8459 else
8460 ld_shlibs=no
8461 fi
8462 ;;
8463
8464 netbsd* | netbsdelf*-gnu)
8465 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8466 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8467 wlarc=
8468 else
8469 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8470 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8471 fi
8472 ;;
8473
8474 solaris*)
8475 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
8476 ld_shlibs=no
8477 cat <<_LT_EOF 1>&2
8478
8479*** Warning: The releases 2.8.* of the GNU linker cannot reliably
8480*** create shared libraries on Solaris systems. Therefore, libtool
8481*** is disabling shared libraries support. We urge you to upgrade GNU
8482*** binutils to release 2.9.1 or newer. Another option is to modify
8483*** your PATH or compiler configuration so that the native linker is
8484*** used, and then restart.
8485
8486_LT_EOF
8487 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8488 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8489 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8490 else
8491 ld_shlibs=no
8492 fi
8493 ;;
8494
8495 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8496 case `$LD -v 2>&1` in
8497 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
8498 ld_shlibs=no
8499 cat <<_LT_EOF 1>&2
8500
8501*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
8502*** reliably create shared libraries on SCO systems. Therefore, libtool
8503*** is disabling shared libraries support. We urge you to upgrade GNU
8504*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8505*** your PATH or compiler configuration so that the native linker is
8506*** used, and then restart.
8507
8508_LT_EOF
8509 ;;
8510 *)
8511 # For security reasons, it is highly recommended that you always
8512 # use absolute paths for naming shared libraries, and exclude the
8513 # DT_RUNPATH tag from executables and libraries. But doing so
8514 # requires that you compile everything twice, which is a pain.
8515 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8516 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8517 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8518 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8519 else
8520 ld_shlibs=no
8521 fi
8522 ;;
8523 esac
8524 ;;
8525
8526 sunos4*)
8527 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8528 wlarc=
8529 hardcode_direct=yes
8530 hardcode_shlibpath_var=no
8531 ;;
8532
8533 *)
8534 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8535 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8536 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8537 else
8538 ld_shlibs=no
8539 fi
8540 ;;
8541 esac
8542
8543 if test "$ld_shlibs" = no; then
8544 runpath_var=
8545 hardcode_libdir_flag_spec=
8546 export_dynamic_flag_spec=
8547 whole_archive_flag_spec=
8548 fi
8549 else
8550 # PORTME fill in a description of your system's linker (not GNU ld)
8551 case $host_os in
8552 aix3*)
8553 allow_undefined_flag=unsupported
8554 always_export_symbols=yes
8555 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'
8556 # Note: this linker hardcodes the directories in LIBPATH if there
8557 # are no directories specified by -L.
8558 hardcode_minus_L=yes
8559 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8560 # Neither direct hardcoding nor static linking is supported with a
8561 # broken collect2.
8562 hardcode_direct=unsupported
8563 fi
8564 ;;
8565
8566 aix[4-9]*)
8567 if test "$host_cpu" = ia64; then
8568 # On IA64, the linker does run time linking by default, so we don't
8569 # have to do anything special.
8570 aix_use_runtimelinking=no
8571 exp_sym_flag='-Bexport'
8572 no_entry_flag=""
8573 else
8574 # If we're using GNU nm, then we don't want the "-C" option.
8575 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8576 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8577 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
8578 else
8579 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'
8580 fi
8581 aix_use_runtimelinking=no
8582
8583 # Test if we are trying to use run time linking or normal
8584 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8585 # need to do runtime linking.
8586 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
8587 for ld_flag in $LDFLAGS; do
8588 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8589 aix_use_runtimelinking=yes
8590 break
8591 fi
8592 done
8593 ;;
8594 esac
8595
8596 exp_sym_flag='-bexport'
8597 no_entry_flag='-bnoentry'
8598 fi
8599
8600 # When large executables or shared objects are built, AIX ld can
8601 # have problems creating the table of contents. If linking a library
8602 # or program results in "error TOC overflow" add -mminimal-toc to
8603 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8604 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8605
8606 archive_cmds=''
8607 hardcode_direct=yes
8608 hardcode_direct_absolute=yes
8609 hardcode_libdir_separator=':'
8610 link_all_deplibs=yes
8611 file_list_spec='${wl}-f,'
8612
8613 if test "$GCC" = yes; then
8614 case $host_os in aix4.[012]|aix4.[012].*)
8615 # We only want to do this on AIX 4.2 and lower, the check
8616 # below for broken collect2 doesn't work under 4.3+
8617 collect2name=`${CC} -print-prog-name=collect2`
8618 if test -f "$collect2name" &&
8619 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8620 then
8621 # We have reworked collect2
8622 :
8623 else
8624 # We have old collect2
8625 hardcode_direct=unsupported
8626 # It fails to find uninstalled libraries when the uninstalled
8627 # path is not listed in the libpath. Setting hardcode_minus_L
8628 # to unsupported forces relinking
8629 hardcode_minus_L=yes
8630 hardcode_libdir_flag_spec='-L$libdir'
8631 hardcode_libdir_separator=
8632 fi
8633 ;;
8634 esac
8635 shared_flag='-shared'
8636 if test "$aix_use_runtimelinking" = yes; then
8637 shared_flag="$shared_flag "'${wl}-G'
8638 fi
8639 link_all_deplibs=no
8640 else
8641 # not using gcc
8642 if test "$host_cpu" = ia64; then
8643 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8644 # chokes on -Wl,-G. The following line is correct:
8645 shared_flag='-G'
8646 else
8647 if test "$aix_use_runtimelinking" = yes; then
8648 shared_flag='${wl}-G'
8649 else
8650 shared_flag='${wl}-bM:SRE'
8651 fi
8652 fi
8653 fi
8654
8655 export_dynamic_flag_spec='${wl}-bexpall'
8656 # It seems that -bexpall does not export symbols beginning with
8657 # underscore (_), so it is better to generate a list of symbols to export.
8658 always_export_symbols=yes
8659 if test "$aix_use_runtimelinking" = yes; then
8660 # Warning - without using the other runtime loading flags (-brtl),
8661 # -berok will link without error, but may produce a broken library.
8662 allow_undefined_flag='-berok'
8663 # Determine the default libpath from the value encoded in an
8664 # empty executable.
8665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8666/* end confdefs.h. */
8667
8668int
8669main ()
8670{
8671
8672 ;
8673 return 0;
8674}
8675_ACEOF
8676if ac_fn_c_try_link "$LINENO"; then :
8677
8678lt_aix_libpath_sed='
8679 /Import File Strings/,/^$/ {
8680 /^0/ {
8681 s/^0 *\(.*\)$/\1/
8682 p
8683 }
8684 }'
8685aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8686# Check for a 64-bit object if we didn't find anything.
8687if test -z "$aix_libpath"; then
8688 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8689fi
8690fi
8691rm -f core conftest.err conftest.$ac_objext \
8692 conftest$ac_exeext conftest.$ac_ext
8693if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8694
8695 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8696 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8697 else
8698 if test "$host_cpu" = ia64; then
8699 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8700 allow_undefined_flag="-z nodefs"
8701 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"
8702 else
8703 # Determine the default libpath from the value encoded in an
8704 # empty executable.
8705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8706/* end confdefs.h. */
8707
8708int
8709main ()
8710{
8711
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716if ac_fn_c_try_link "$LINENO"; then :
8717
8718lt_aix_libpath_sed='
8719 /Import File Strings/,/^$/ {
8720 /^0/ {
8721 s/^0 *\(.*\)$/\1/
8722 p
8723 }
8724 }'
8725aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8726# Check for a 64-bit object if we didn't find anything.
8727if test -z "$aix_libpath"; then
8728 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8729fi
8730fi
8731rm -f core conftest.err conftest.$ac_objext \
8732 conftest$ac_exeext conftest.$ac_ext
8733if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8734
8735 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8736 # Warning - without using the other run time loading flags,
8737 # -berok will link without error, but may produce a broken library.
8738 no_undefined_flag=' ${wl}-bernotok'
8739 allow_undefined_flag=' ${wl}-berok'
8740 # Exported symbols can be pulled into shared objects from archives
8741 whole_archive_flag_spec='$convenience'
8742 archive_cmds_need_lc=yes
8743 # This is similar to how AIX traditionally builds its shared libraries.
8744 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'
8745 fi
8746 fi
8747 ;;
8748
8749 amigaos*)
8750 case $host_cpu in
8751 powerpc)
8752 # see comment about AmigaOS4 .so support
8753 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8754 archive_expsym_cmds=''
8755 ;;
8756 m68k)
8757 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)'
8758 hardcode_libdir_flag_spec='-L$libdir'
8759 hardcode_minus_L=yes
8760 ;;
8761 esac
8762 ;;
8763
8764 bsdi[45]*)
8765 export_dynamic_flag_spec=-rdynamic
8766 ;;
8767
8768 cygwin* | mingw* | pw32* | cegcc*)
8769 # When not using gcc, we currently assume that we are using
8770 # Microsoft Visual C++.
8771 # hardcode_libdir_flag_spec is actually meaningless, as there is
8772 # no search path for DLLs.
8773 hardcode_libdir_flag_spec=' '
8774 allow_undefined_flag=unsupported
8775 # Tell ltmain to make .lib files, not .a files.
8776 libext=lib
8777 # Tell ltmain to make .dll files, not .so files.
8778 shrext_cmds=".dll"
8779 # FIXME: Setting linknames here is a bad hack.
8780 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
8781 # The linker will automatically build a .lib file if we build a DLL.
8782 old_archive_from_new_cmds='true'
8783 # FIXME: Should let the user specify the lib program.
8784 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8785 fix_srcfile_path='`cygpath -w "$srcfile"`'
8786 enable_shared_with_static_runtimes=yes
8787 ;;
8788
8789 darwin* | rhapsody*)
8790
8791
8792 archive_cmds_need_lc=no
8793 hardcode_direct=no
8794 hardcode_automatic=yes
8795 hardcode_shlibpath_var=unsupported
8796 whole_archive_flag_spec=''
8797 link_all_deplibs=yes
8798 allow_undefined_flag="$_lt_dar_allow_undefined"
8799 case $cc_basename in
8800 ifort*) _lt_dar_can_shared=yes ;;
8801 *) _lt_dar_can_shared=$GCC ;;
8802 esac
8803 if test "$_lt_dar_can_shared" = "yes"; then
8804 output_verbose_link_cmd=echo
8805 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
8806 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
8807 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}"
8808 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}"
8809
8810 else
8811 ld_shlibs=no
8812 fi
8813
8814 ;;
8815
8816 dgux*)
8817 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8818 hardcode_libdir_flag_spec='-L$libdir'
8819 hardcode_shlibpath_var=no
8820 ;;
8821
8822 freebsd1*)
8823 ld_shlibs=no
8824 ;;
8825
8826 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8827 # support. Future versions do this automatically, but an explicit c++rt0.o
8828 # does not break anything, and helps significantly (at the cost of a little
8829 # extra space).
8830 freebsd2.2*)
8831 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8832 hardcode_libdir_flag_spec='-R$libdir'
8833 hardcode_direct=yes
8834 hardcode_shlibpath_var=no
8835 ;;
8836
8837 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8838 freebsd2*)
8839 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8840 hardcode_direct=yes
8841 hardcode_minus_L=yes
8842 hardcode_shlibpath_var=no
8843 ;;
8844
8845 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8846 freebsd* | dragonfly*)
8847 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8848 hardcode_libdir_flag_spec='-R$libdir'
8849 hardcode_direct=yes
8850 hardcode_shlibpath_var=no
8851 ;;
8852
8853 hpux9*)
8854 if test "$GCC" = yes; then
8855 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8856 else
8857 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'
8858 fi
8859 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8860 hardcode_libdir_separator=:
8861 hardcode_direct=yes
8862
8863 # hardcode_minus_L: Not really in the search PATH,
8864 # but as the default location of the library.
8865 hardcode_minus_L=yes
8866 export_dynamic_flag_spec='${wl}-E'
8867 ;;
8868
8869 hpux10*)
8870 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8871 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8872 else
8873 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8874 fi
8875 if test "$with_gnu_ld" = no; then
8876 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8877 hardcode_libdir_flag_spec_ld='+b $libdir'
8878 hardcode_libdir_separator=:
8879 hardcode_direct=yes
8880 hardcode_direct_absolute=yes
8881 export_dynamic_flag_spec='${wl}-E'
8882 # hardcode_minus_L: Not really in the search PATH,
8883 # but as the default location of the library.
8884 hardcode_minus_L=yes
8885 fi
8886 ;;
8887
8888 hpux11*)
8889 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8890 case $host_cpu in
8891 hppa*64*)
8892 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8893 ;;
8894 ia64*)
8895 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8896 ;;
8897 *)
8898 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8899 ;;
8900 esac
8901 else
8902 case $host_cpu in
8903 hppa*64*)
8904 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8905 ;;
8906 ia64*)
8907 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8908 ;;
8909 *)
8910 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8911 ;;
8912 esac
8913 fi
8914 if test "$with_gnu_ld" = no; then
8915 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8916 hardcode_libdir_separator=:
8917
8918 case $host_cpu in
8919 hppa*64*|ia64*)
8920 hardcode_direct=no
8921 hardcode_shlibpath_var=no
8922 ;;
8923 *)
8924 hardcode_direct=yes
8925 hardcode_direct_absolute=yes
8926 export_dynamic_flag_spec='${wl}-E'
8927
8928 # hardcode_minus_L: Not really in the search PATH,
8929 # but as the default location of the library.
8930 hardcode_minus_L=yes
8931 ;;
8932 esac
8933 fi
8934 ;;
8935
8936 irix5* | irix6* | nonstopux*)
8937 if test "$GCC" = yes; then
8938 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8939 # Try to use the -exported_symbol ld option, if it does not
8940 # work, assume that -exports_file does not work either and
8941 # implicitly export all symbols.
8942 save_LDFLAGS="$LDFLAGS"
8943 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
8944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8945/* end confdefs.h. */
8946int foo(void) {}
8947_ACEOF
8948if ac_fn_c_try_link "$LINENO"; then :
8949 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
8950
8951fi
8952rm -f core conftest.err conftest.$ac_objext \
8953 conftest$ac_exeext conftest.$ac_ext
8954 LDFLAGS="$save_LDFLAGS"
8955 else
8956 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8957 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
8958 fi
8959 archive_cmds_need_lc='no'
8960 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8961 hardcode_libdir_separator=:
8962 inherit_rpath=yes
8963 link_all_deplibs=yes
8964 ;;
8965
8966 netbsd* | netbsdelf*-gnu)
8967 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8968 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8969 else
8970 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8971 fi
8972 hardcode_libdir_flag_spec='-R$libdir'
8973 hardcode_direct=yes
8974 hardcode_shlibpath_var=no
8975 ;;
8976
8977 newsos6)
8978 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8979 hardcode_direct=yes
8980 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8981 hardcode_libdir_separator=:
8982 hardcode_shlibpath_var=no
8983 ;;
8984
8985 *nto* | *qnx*)
8986 ;;
8987
8988 openbsd*)
8989 if test -f /usr/libexec/ld.so; then
8990 hardcode_direct=yes
8991 hardcode_shlibpath_var=no
8992 hardcode_direct_absolute=yes
8993 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8994 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8995 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8996 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8997 export_dynamic_flag_spec='${wl}-E'
8998 else
8999 case $host_os in
9000 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9001 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9002 hardcode_libdir_flag_spec='-R$libdir'
9003 ;;
9004 *)
9005 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9006 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9007 ;;
9008 esac
9009 fi
9010 else
9011 ld_shlibs=no
9012 fi
9013 ;;
9014
9015 os2*)
9016 hardcode_libdir_flag_spec='-L$libdir'
9017 hardcode_minus_L=yes
9018 allow_undefined_flag=unsupported
9019 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'
9020 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9021 ;;
9022
9023 osf3*)
9024 if test "$GCC" = yes; then
9025 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9026 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9027 else
9028 allow_undefined_flag=' -expect_unresolved \*'
9029 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9030 fi
9031 archive_cmds_need_lc='no'
9032 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9033 hardcode_libdir_separator=:
9034 ;;
9035
9036 osf4* | osf5*) # as osf3* with the addition of -msym flag
9037 if test "$GCC" = yes; then
9038 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9039 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9040 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9041 else
9042 allow_undefined_flag=' -expect_unresolved \*'
9043 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9044 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~
9045 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
9046
9047 # Both c and cxx compiler support -rpath directly
9048 hardcode_libdir_flag_spec='-rpath $libdir'
9049 fi
9050 archive_cmds_need_lc='no'
9051 hardcode_libdir_separator=:
9052 ;;
9053
9054 solaris*)
9055 no_undefined_flag=' -z defs'
9056 if test "$GCC" = yes; then
9057 wlarc='${wl}'
9058 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9059 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9060 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9061 else
9062 case `$CC -V 2>&1` in
9063 *"Compilers 5.0"*)
9064 wlarc=''
9065 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9066 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9067 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9068 ;;
9069 *)
9070 wlarc='${wl}'
9071 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9072 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9073 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9074 ;;
9075 esac
9076 fi
9077 hardcode_libdir_flag_spec='-R$libdir'
9078 hardcode_shlibpath_var=no
9079 case $host_os in
9080 solaris2.[0-5] | solaris2.[0-5].*) ;;
9081 *)
9082 # The compiler driver will combine and reorder linker options,
9083 # but understands `-z linker_flag'. GCC discards it without `$wl',
9084 # but is careful enough not to reorder.
9085 # Supported since Solaris 2.6 (maybe 2.5.1?)
9086 if test "$GCC" = yes; then
9087 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9088 else
9089 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
9090 fi
9091 ;;
9092 esac
9093 link_all_deplibs=yes
9094 ;;
9095
9096 sunos4*)
9097 if test "x$host_vendor" = xsequent; then
9098 # Use $CC to link under sequent, because it throws in some extra .o
9099 # files that make .init and .fini sections work.
9100 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9101 else
9102 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9103 fi
9104 hardcode_libdir_flag_spec='-L$libdir'
9105 hardcode_direct=yes
9106 hardcode_minus_L=yes
9107 hardcode_shlibpath_var=no
9108 ;;
9109
9110 sysv4)
9111 case $host_vendor in
9112 sni)
9113 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9114 hardcode_direct=yes # is this really true???
9115 ;;
9116 siemens)
9117 ## LD is ld it makes a PLAMLIB
9118 ## CC just makes a GrossModule.
9119 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9120 reload_cmds='$CC -r -o $output$reload_objs'
9121 hardcode_direct=no
9122 ;;
9123 motorola)
9124 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9125 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9126 ;;
9127 esac
9128 runpath_var='LD_RUN_PATH'
9129 hardcode_shlibpath_var=no
9130 ;;
9131
9132 sysv4.3*)
9133 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9134 hardcode_shlibpath_var=no
9135 export_dynamic_flag_spec='-Bexport'
9136 ;;
9137
9138 sysv4*MP*)
9139 if test -d /usr/nec; then
9140 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9141 hardcode_shlibpath_var=no
9142 runpath_var=LD_RUN_PATH
9143 hardcode_runpath_var=yes
9144 ld_shlibs=yes
9145 fi
9146 ;;
9147
9148 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
9149 no_undefined_flag='${wl}-z,text'
9150 archive_cmds_need_lc=no
9151 hardcode_shlibpath_var=no
9152 runpath_var='LD_RUN_PATH'
9153
9154 if test "$GCC" = yes; then
9155 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9156 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9157 else
9158 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9159 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9160 fi
9161 ;;
9162
9163 sysv5* | sco3.2v5* | sco5v6*)
9164 # Note: We can NOT use -z defs as we might desire, because we do not
9165 # link with -lc, and that would cause any symbols used from libc to
9166 # always be unresolved, which means just about no library would
9167 # ever link correctly. If we're not using GNU ld we use -z text
9168 # though, which does catch some bad symbols but isn't as heavy-handed
9169 # as -z defs.
9170 no_undefined_flag='${wl}-z,text'
9171 allow_undefined_flag='${wl}-z,nodefs'
9172 archive_cmds_need_lc=no
9173 hardcode_shlibpath_var=no
9174 hardcode_libdir_flag_spec='${wl}-R,$libdir'
9175 hardcode_libdir_separator=':'
9176 link_all_deplibs=yes
9177 export_dynamic_flag_spec='${wl}-Bexport'
9178 runpath_var='LD_RUN_PATH'
9179
9180 if test "$GCC" = yes; then
9181 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9182 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9183 else
9184 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9185 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9186 fi
9187 ;;
9188
9189 uts4*)
9190 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9191 hardcode_libdir_flag_spec='-L$libdir'
9192 hardcode_shlibpath_var=no
9193 ;;
9194
9195 *)
9196 ld_shlibs=no
9197 ;;
9198 esac
9199
9200 if test x$host_vendor = xsni; then
9201 case $host in
9202 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9203 export_dynamic_flag_spec='${wl}-Blargedynsym'
9204 ;;
9205 esac
9206 fi
9207 fi
9208
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9210$as_echo "$ld_shlibs" >&6; }
9211test "$ld_shlibs" = no && can_build_shared=no
9212
9213with_gnu_ld=$with_gnu_ld
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229#
9230# Do we need to explicitly link libc?
9231#
9232case "x$archive_cmds_need_lc" in
9233x|xyes)
9234 # Assume -lc should be added
9235 archive_cmds_need_lc=yes
9236
9237 if test "$enable_shared" = yes && test "$GCC" = yes; then
9238 case $archive_cmds in
9239 *'~'*)
9240 # FIXME: we may have to deal with multi-command sequences.
9241 ;;
9242 '$CC '*)
9243 # Test whether the compiler implicitly links with -lc since on some
9244 # systems, -lgcc has to come before -lc. If gcc already passes -lc
9245 # to ld, don't add -lc before -lgcc.
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9247$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9248 $RM conftest*
9249 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9250
9251 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9252 (eval $ac_compile) 2>&5
9253 ac_status=$?
9254 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9255 test $ac_status = 0; } 2>conftest.err; then
9256 soname=conftest
9257 lib=conftest
9258 libobjs=conftest.$ac_objext
9259 deplibs=
9260 wl=$lt_prog_compiler_wl
9261 pic_flag=$lt_prog_compiler_pic
9262 compiler_flags=-v
9263 linker_flags=-v
9264 verstring=
9265 output_objdir=.
9266 libname=conftest
9267 lt_save_allow_undefined_flag=$allow_undefined_flag
9268 allow_undefined_flag=
9269 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9270 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
9271 ac_status=$?
9272 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9273 test $ac_status = 0; }
9274 then
9275 archive_cmds_need_lc=no
9276 else
9277 archive_cmds_need_lc=yes
9278 fi
9279 allow_undefined_flag=$lt_save_allow_undefined_flag
9280 else
9281 cat conftest.err 1>&5
9282 fi
9283 $RM conftest*
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9285$as_echo "$archive_cmds_need_lc" >&6; }
9286 ;;
9287 esac
9288 fi
9289 ;;
9290esac
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9449$as_echo_n "checking dynamic linker characteristics... " >&6; }
9450
9451if test "$GCC" = yes; then
9452 case $host_os in
9453 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
9454 *) lt_awk_arg="/^libraries:/" ;;
9455 esac
9456 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9457 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
9458 # if the path contains ";" then we assume it to be the separator
9459 # otherwise default to the standard path separator (i.e. ":") - it is
9460 # assumed that no part of a normal pathname contains ";" but that should
9461 # okay in the real world where ";" in dirpaths is itself problematic.
9462 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
9463 else
9464 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9465 fi
9466 # Ok, now we have the path, separated by spaces, we can step through it
9467 # and add multilib dir if necessary.
9468 lt_tmp_lt_search_path_spec=
9469 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
9470 for lt_sys_path in $lt_search_path_spec; do
9471 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
9472 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
9473 else
9474 test -d "$lt_sys_path" && \
9475 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
9476 fi
9477 done
9478 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
9479BEGIN {RS=" "; FS="/|\n";} {
9480 lt_foo="";
9481 lt_count=0;
9482 for (lt_i = NF; lt_i > 0; lt_i--) {
9483 if ($lt_i != "" && $lt_i != ".") {
9484 if ($lt_i == "..") {
9485 lt_count++;
9486 } else {
9487 if (lt_count == 0) {
9488 lt_foo="/" $lt_i lt_foo;
9489 } else {
9490 lt_count--;
9491 }
9492 }
9493 }
9494 }
9495 if (lt_foo != "") { lt_freq[lt_foo]++; }
9496 if (lt_freq[lt_foo] == 1) { print lt_foo; }
9497}'`
9498 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
9499else
9500 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9501fi
9502library_names_spec=
9503libname_spec='lib$name'
9504soname_spec=
9505shrext_cmds=".so"
9506postinstall_cmds=
9507postuninstall_cmds=
9508finish_cmds=
9509finish_eval=
9510shlibpath_var=
9511shlibpath_overrides_runpath=unknown
9512version_type=none
9513dynamic_linker="$host_os ld.so"
9514sys_lib_dlsearch_path_spec="/lib /usr/lib"
9515need_lib_prefix=unknown
9516hardcode_into_libs=no
9517
9518# when you set need_version to no, make sure it does not cause -set_version
9519# flags to be left without arguments
9520need_version=unknown
9521
9522case $host_os in
9523aix3*)
9524 version_type=linux
9525 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9526 shlibpath_var=LIBPATH
9527
9528 # AIX 3 has no versioning support, so we append a major version to the name.
9529 soname_spec='${libname}${release}${shared_ext}$major'
9530 ;;
9531
9532aix[4-9]*)
9533 version_type=linux
9534 need_lib_prefix=no
9535 need_version=no
9536 hardcode_into_libs=yes
9537 if test "$host_cpu" = ia64; then
9538 # AIX 5 supports IA64
9539 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9540 shlibpath_var=LD_LIBRARY_PATH
9541 else
9542 # With GCC up to 2.95.x, collect2 would create an import file
9543 # for dependence libraries. The import file would start with
9544 # the line `#! .'. This would cause the generated library to
9545 # depend on `.', always an invalid library. This was fixed in
9546 # development snapshots of GCC prior to 3.0.
9547 case $host_os in
9548 aix4 | aix4.[01] | aix4.[01].*)
9549 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9550 echo ' yes '
9551 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
9552 :
9553 else
9554 can_build_shared=no
9555 fi
9556 ;;
9557 esac
9558 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9559 # soname into executable. Probably we can add versioning support to
9560 # collect2, so additional links can be useful in future.
9561 if test "$aix_use_runtimelinking" = yes; then
9562 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9563 # instead of lib<name>.a to let people know that these are not
9564 # typical AIX shared libraries.
9565 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9566 else
9567 # We preserve .a as extension for shared libraries through AIX4.2
9568 # and later when we are not doing run time linking.
9569 library_names_spec='${libname}${release}.a $libname.a'
9570 soname_spec='${libname}${release}${shared_ext}$major'
9571 fi
9572 shlibpath_var=LIBPATH
9573 fi
9574 ;;
9575
9576amigaos*)
9577 case $host_cpu in
9578 powerpc)
9579 # Since July 2007 AmigaOS4 officially supports .so libraries.
9580 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
9581 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9582 ;;
9583 m68k)
9584 library_names_spec='$libname.ixlibrary $libname.a'
9585 # Create ${libname}_ixlibrary.a entries in /sys/libs.
9586 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
9587 ;;
9588 esac
9589 ;;
9590
9591beos*)
9592 library_names_spec='${libname}${shared_ext}'
9593 dynamic_linker="$host_os ld.so"
9594 shlibpath_var=LIBRARY_PATH
9595 ;;
9596
9597bsdi[45]*)
9598 version_type=linux
9599 need_version=no
9600 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9601 soname_spec='${libname}${release}${shared_ext}$major'
9602 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9603 shlibpath_var=LD_LIBRARY_PATH
9604 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9605 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9606 # the default ld.so.conf also contains /usr/contrib/lib and
9607 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9608 # libtool to hard-code these into programs
9609 ;;
9610
9611cygwin* | mingw* | pw32* | cegcc*)
9612 version_type=windows
9613 shrext_cmds=".dll"
9614 need_version=no
9615 need_lib_prefix=no
9616
9617 case $GCC,$host_os in
9618 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
9619 library_names_spec='$libname.dll.a'
9620 # DLL is installed to $(libdir)/../bin by postinstall_cmds
9621 postinstall_cmds='base_file=`basename \${file}`~
9622 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
9623 dldir=$destdir/`dirname \$dlpath`~
9624 test -d \$dldir || mkdir -p \$dldir~
9625 $install_prog $dir/$dlname \$dldir/$dlname~
9626 chmod a+x \$dldir/$dlname~
9627 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
9628 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
9629 fi'
9630 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9631 dlpath=$dir/\$dldll~
9632 $RM \$dlpath'
9633 shlibpath_overrides_runpath=yes
9634
9635 case $host_os in
9636 cygwin*)
9637 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9638 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9639 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9640 ;;
9641 mingw* | cegcc*)
9642 # MinGW DLLs use traditional 'lib' prefix
9643 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9644 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9645 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
9646 # It is most probably a Windows format PATH printed by
9647 # mingw gcc, but we are running on Cygwin. Gcc prints its search
9648 # path with ; separators, and with drive letters. We can handle the
9649 # drive letters (cygwin fileutils understands them), so leave them,
9650 # especially as we might pass files found there to a mingw objdump,
9651 # which wouldn't understand a cygwinified path. Ahh.
9652 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9653 else
9654 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9655 fi
9656 ;;
9657 pw32*)
9658 # pw32 DLLs use 'pw' prefix rather than 'lib'
9659 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9660 ;;
9661 esac
9662 ;;
9663
9664 *)
9665 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9666 ;;
9667 esac
9668 dynamic_linker='Win32 ld.exe'
9669 # FIXME: first we should search . and the directory the executable is in
9670 shlibpath_var=PATH
9671 ;;
9672
9673darwin* | rhapsody*)
9674 dynamic_linker="$host_os dyld"
9675 version_type=darwin
9676 need_lib_prefix=no
9677 need_version=no
9678 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9679 soname_spec='${libname}${release}${major}$shared_ext'
9680 shlibpath_overrides_runpath=yes
9681 shlibpath_var=DYLD_LIBRARY_PATH
9682 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9683
9684 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
9685 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9686 ;;
9687
9688dgux*)
9689 version_type=linux
9690 need_lib_prefix=no
9691 need_version=no
9692 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9693 soname_spec='${libname}${release}${shared_ext}$major'
9694 shlibpath_var=LD_LIBRARY_PATH
9695 ;;
9696
9697freebsd1*)
9698 dynamic_linker=no
9699 ;;
9700
9701freebsd* | dragonfly*)
9702 # DragonFly does not have aout. When/if they implement a new
9703 # versioning mechanism, adjust this.
9704 if test -x /usr/bin/objformat; then
9705 objformat=`/usr/bin/objformat`
9706 else
9707 case $host_os in
9708 freebsd[123]*) objformat=aout ;;
9709 *) objformat=elf ;;
9710 esac
9711 fi
9712 version_type=freebsd-$objformat
9713 case $version_type in
9714 freebsd-elf*)
9715 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9716 need_version=no
9717 need_lib_prefix=no
9718 ;;
9719 freebsd-*)
9720 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9721 need_version=yes
9722 ;;
9723 esac
9724 shlibpath_var=LD_LIBRARY_PATH
9725 case $host_os in
9726 freebsd2*)
9727 shlibpath_overrides_runpath=yes
9728 ;;
9729 freebsd3.[01]* | freebsdelf3.[01]*)
9730 shlibpath_overrides_runpath=yes
9731 hardcode_into_libs=yes
9732 ;;
9733 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
9734 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
9735 shlibpath_overrides_runpath=no
9736 hardcode_into_libs=yes
9737 ;;
9738 *) # from 4.6 on, and DragonFly
9739 shlibpath_overrides_runpath=yes
9740 hardcode_into_libs=yes
9741 ;;
9742 esac
9743 ;;
9744
9745gnu*)
9746 version_type=linux
9747 need_lib_prefix=no
9748 need_version=no
9749 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9750 soname_spec='${libname}${release}${shared_ext}$major'
9751 shlibpath_var=LD_LIBRARY_PATH
9752 hardcode_into_libs=yes
9753 ;;
9754
9755hpux9* | hpux10* | hpux11*)
9756 # Give a soname corresponding to the major version so that dld.sl refuses to
9757 # link against other versions.
9758 version_type=sunos
9759 need_lib_prefix=no
9760 need_version=no
9761 case $host_cpu in
9762 ia64*)
9763 shrext_cmds='.so'
9764 hardcode_into_libs=yes
9765 dynamic_linker="$host_os dld.so"
9766 shlibpath_var=LD_LIBRARY_PATH
9767 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9768 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9769 soname_spec='${libname}${release}${shared_ext}$major'
9770 if test "X$HPUX_IA64_MODE" = X32; then
9771 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9772 else
9773 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9774 fi
9775 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9776 ;;
9777 hppa*64*)
9778 shrext_cmds='.sl'
9779 hardcode_into_libs=yes
9780 dynamic_linker="$host_os dld.sl"
9781 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9782 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9783 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9784 soname_spec='${libname}${release}${shared_ext}$major'
9785 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9786 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9787 ;;
9788 *)
9789 shrext_cmds='.sl'
9790 dynamic_linker="$host_os dld.sl"
9791 shlibpath_var=SHLIB_PATH
9792 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9794 soname_spec='${libname}${release}${shared_ext}$major'
9795 ;;
9796 esac
9797 # HP-UX runs *really* slowly unless shared libraries are mode 555.
9798 postinstall_cmds='chmod 555 $lib'
9799 ;;
9800
9801interix[3-9]*)
9802 version_type=linux
9803 need_lib_prefix=no
9804 need_version=no
9805 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9806 soname_spec='${libname}${release}${shared_ext}$major'
9807 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
9808 shlibpath_var=LD_LIBRARY_PATH
9809 shlibpath_overrides_runpath=no
9810 hardcode_into_libs=yes
9811 ;;
9812
9813irix5* | irix6* | nonstopux*)
9814 case $host_os in
9815 nonstopux*) version_type=nonstopux ;;
9816 *)
9817 if test "$lt_cv_prog_gnu_ld" = yes; then
9818 version_type=linux
9819 else
9820 version_type=irix
9821 fi ;;
9822 esac
9823 need_lib_prefix=no
9824 need_version=no
9825 soname_spec='${libname}${release}${shared_ext}$major'
9826 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9827 case $host_os in
9828 irix5* | nonstopux*)
9829 libsuff= shlibsuff=
9830 ;;
9831 *)
9832 case $LD in # libtool.m4 will add one of these switches to LD
9833 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9834 libsuff= shlibsuff= libmagic=32-bit;;
9835 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9836 libsuff=32 shlibsuff=N32 libmagic=N32;;
9837 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9838 libsuff=64 shlibsuff=64 libmagic=64-bit;;
9839 *) libsuff= shlibsuff= libmagic=never-match;;
9840 esac
9841 ;;
9842 esac
9843 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9844 shlibpath_overrides_runpath=no
9845 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9846 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9847 hardcode_into_libs=yes
9848 ;;
9849
9850# No shared lib support for Linux oldld, aout, or coff.
9851linux*oldld* | linux*aout* | linux*coff*)
9852 dynamic_linker=no
9853 ;;
9854
9855# This must be Linux ELF.
9856linux* | k*bsd*-gnu | kopensolaris*-gnu)
9857 version_type=linux
9858 need_lib_prefix=no
9859 need_version=no
9860 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9861 soname_spec='${libname}${release}${shared_ext}$major'
9862 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9863 shlibpath_var=LD_LIBRARY_PATH
9864 shlibpath_overrides_runpath=no
9865 # Some binutils ld are patched to set DT_RUNPATH
9866 save_LDFLAGS=$LDFLAGS
9867 save_libdir=$libdir
9868 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
9869 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
9870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9871/* end confdefs.h. */
9872
9873int
9874main ()
9875{
9876
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881if ac_fn_c_try_link "$LINENO"; then :
9882 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
9883 shlibpath_overrides_runpath=yes
9884fi
9885fi
9886rm -f core conftest.err conftest.$ac_objext \
9887 conftest$ac_exeext conftest.$ac_ext
9888 LDFLAGS=$save_LDFLAGS
9889 libdir=$save_libdir
9890
9891 # This implies no fast_install, which is unacceptable.
9892 # Some rework will be needed to allow for fast_install
9893 # before this can be enabled.
9894 hardcode_into_libs=yes
9895
9896 # Append ld.so.conf contents to the search path
9897 if test -f /etc/ld.so.conf; then
9898 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;/^$/d' | tr '\n' ' '`
9899 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9900 fi
9901
9902 # We used to test for /lib/ld.so.1 and disable shared libraries on
9903 # powerpc, because MkLinux only supported shared libraries with the
9904 # GNU dynamic linker. Since this was broken with cross compilers,
9905 # most powerpc-linux boxes support dynamic linking these days and
9906 # people can always --disable-shared, the test was removed, and we
9907 # assume the GNU/Linux dynamic linker is in use.
9908 dynamic_linker='GNU/Linux ld.so'
9909 ;;
9910
9911netbsdelf*-gnu)
9912 version_type=linux
9913 need_lib_prefix=no
9914 need_version=no
9915 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9916 soname_spec='${libname}${release}${shared_ext}$major'
9917 shlibpath_var=LD_LIBRARY_PATH
9918 shlibpath_overrides_runpath=no
9919 hardcode_into_libs=yes
9920 dynamic_linker='NetBSD ld.elf_so'
9921 ;;
9922
9923netbsd*)
9924 version_type=sunos
9925 need_lib_prefix=no
9926 need_version=no
9927 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9928 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9929 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9930 dynamic_linker='NetBSD (a.out) ld.so'
9931 else
9932 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9933 soname_spec='${libname}${release}${shared_ext}$major'
9934 dynamic_linker='NetBSD ld.elf_so'
9935 fi
9936 shlibpath_var=LD_LIBRARY_PATH
9937 shlibpath_overrides_runpath=yes
9938 hardcode_into_libs=yes
9939 ;;
9940
9941newsos6)
9942 version_type=linux
9943 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9944 shlibpath_var=LD_LIBRARY_PATH
9945 shlibpath_overrides_runpath=yes
9946 ;;
9947
9948*nto* | *qnx*)
9949 version_type=qnx
9950 need_lib_prefix=no
9951 need_version=no
9952 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9953 soname_spec='${libname}${release}${shared_ext}$major'
9954 shlibpath_var=LD_LIBRARY_PATH
9955 shlibpath_overrides_runpath=no
9956 hardcode_into_libs=yes
9957 dynamic_linker='ldqnx.so'
9958 ;;
9959
9960openbsd*)
9961 version_type=sunos
9962 sys_lib_dlsearch_path_spec="/usr/lib"
9963 need_lib_prefix=no
9964 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9965 case $host_os in
9966 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9967 *) need_version=no ;;
9968 esac
9969 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9970 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9971 shlibpath_var=LD_LIBRARY_PATH
9972 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9973 case $host_os in
9974 openbsd2.[89] | openbsd2.[89].*)
9975 shlibpath_overrides_runpath=no
9976 ;;
9977 *)
9978 shlibpath_overrides_runpath=yes
9979 ;;
9980 esac
9981 else
9982 shlibpath_overrides_runpath=yes
9983 fi
9984 ;;
9985
9986os2*)
9987 libname_spec='$name'
9988 shrext_cmds=".dll"
9989 need_lib_prefix=no
9990 library_names_spec='$libname${shared_ext} $libname.a'
9991 dynamic_linker='OS/2 ld.exe'
9992 shlibpath_var=LIBPATH
9993 ;;
9994
9995osf3* | osf4* | osf5*)
9996 version_type=osf
9997 need_lib_prefix=no
9998 need_version=no
9999 soname_spec='${libname}${release}${shared_ext}$major'
10000 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10001 shlibpath_var=LD_LIBRARY_PATH
10002 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10003 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10004 ;;
10005
10006rdos*)
10007 dynamic_linker=no
10008 ;;
10009
10010solaris*)
10011 version_type=linux
10012 need_lib_prefix=no
10013 need_version=no
10014 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10015 soname_spec='${libname}${release}${shared_ext}$major'
10016 shlibpath_var=LD_LIBRARY_PATH
10017 shlibpath_overrides_runpath=yes
10018 hardcode_into_libs=yes
10019 # ldd complains unless libraries are executable
10020 postinstall_cmds='chmod +x $lib'
10021 ;;
10022
10023sunos4*)
10024 version_type=sunos
10025 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10026 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10027 shlibpath_var=LD_LIBRARY_PATH
10028 shlibpath_overrides_runpath=yes
10029 if test "$with_gnu_ld" = yes; then
10030 need_lib_prefix=no
10031 fi
10032 need_version=yes
10033 ;;
10034
10035sysv4 | sysv4.3*)
10036 version_type=linux
10037 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10038 soname_spec='${libname}${release}${shared_ext}$major'
10039 shlibpath_var=LD_LIBRARY_PATH
10040 case $host_vendor in
10041 sni)
10042 shlibpath_overrides_runpath=no
10043 need_lib_prefix=no
10044 runpath_var=LD_RUN_PATH
10045 ;;
10046 siemens)
10047 need_lib_prefix=no
10048 ;;
10049 motorola)
10050 need_lib_prefix=no
10051 need_version=no
10052 shlibpath_overrides_runpath=no
10053 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10054 ;;
10055 esac
10056 ;;
10057
10058sysv4*MP*)
10059 if test -d /usr/nec ;then
10060 version_type=linux
10061 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10062 soname_spec='$libname${shared_ext}.$major'
10063 shlibpath_var=LD_LIBRARY_PATH
10064 fi
10065 ;;
10066
10067sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
10068 version_type=freebsd-elf
10069 need_lib_prefix=no
10070 need_version=no
10071 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10072 soname_spec='${libname}${release}${shared_ext}$major'
10073 shlibpath_var=LD_LIBRARY_PATH
10074 shlibpath_overrides_runpath=yes
10075 hardcode_into_libs=yes
10076 if test "$with_gnu_ld" = yes; then
10077 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
10078 else
10079 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
10080 case $host_os in
10081 sco3.2v5*)
10082 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
10083 ;;
10084 esac
10085 fi
10086 sys_lib_dlsearch_path_spec='/usr/lib'
10087 ;;
10088
10089tpf*)
10090 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
10091 version_type=linux
10092 need_lib_prefix=no
10093 need_version=no
10094 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10095 shlibpath_var=LD_LIBRARY_PATH
10096 shlibpath_overrides_runpath=no
10097 hardcode_into_libs=yes
10098 ;;
10099
10100uts4*)
10101 version_type=linux
10102 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10103 soname_spec='${libname}${release}${shared_ext}$major'
10104 shlibpath_var=LD_LIBRARY_PATH
10105 ;;
10106
10107*)
10108 dynamic_linker=no
10109 ;;
10110esac
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10112$as_echo "$dynamic_linker" >&6; }
10113test "$dynamic_linker" = no && can_build_shared=no
10114
10115variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10116if test "$GCC" = yes; then
10117 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10118fi
10119
10120if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
10121 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
10122fi
10123if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
10124 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
10125fi
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10214$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10215hardcode_action=
10216if test -n "$hardcode_libdir_flag_spec" ||
10217 test -n "$runpath_var" ||
10218 test "X$hardcode_automatic" = "Xyes" ; then
10219
10220 # We can hardcode non-existent directories.
10221 if test "$hardcode_direct" != no &&
10222 # If the only mechanism to avoid hardcoding is shlibpath_var, we
10223 # have to relink, otherwise we might link with an installed library
10224 # when we should be linking with a yet-to-be-installed one
10225 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
10226 test "$hardcode_minus_L" != no; then
10227 # Linking always hardcodes the temporary library directory.
10228 hardcode_action=relink
10229 else
10230 # We can link without hardcoding, and we can hardcode nonexisting dirs.
10231 hardcode_action=immediate
10232 fi
10233else
10234 # We cannot hardcode anything, or else we can only hardcode existing
10235 # directories.
10236 hardcode_action=unsupported
10237fi
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10239$as_echo "$hardcode_action" >&6; }
10240
10241if test "$hardcode_action" = relink ||
10242 test "$inherit_rpath" = yes; then
10243 # Fast installation is not supported
10244 enable_fast_install=no
10245elif test "$shlibpath_overrides_runpath" = yes ||
10246 test "$enable_shared" = no; then
10247 # Fast installation is not necessary
10248 enable_fast_install=needless
10249fi
10250
10251
10252
10253
10254
10255
10256 if test "x$enable_dlopen" != xyes; then
10257 enable_dlopen=unknown
10258 enable_dlopen_self=unknown
10259 enable_dlopen_self_static=unknown
10260else
10261 lt_cv_dlopen=no
10262 lt_cv_dlopen_libs=
10263
10264 case $host_os in
10265 beos*)
10266 lt_cv_dlopen="load_add_on"
10267 lt_cv_dlopen_libs=
10268 lt_cv_dlopen_self=yes
10269 ;;
10270
10271 mingw* | pw32* | cegcc*)
10272 lt_cv_dlopen="LoadLibrary"
10273 lt_cv_dlopen_libs=
10274 ;;
10275
10276 cygwin*)
10277 lt_cv_dlopen="dlopen"
10278 lt_cv_dlopen_libs=
10279 ;;
10280
10281 darwin*)
10282 # if libdl is installed we need to link against it
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10284$as_echo_n "checking for dlopen in -ldl... " >&6; }
10285if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10286 $as_echo_n "(cached) " >&6
10287else
10288 ac_check_lib_save_LIBS=$LIBS
10289LIBS="-ldl $LIBS"
10290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10291/* end confdefs.h. */
10292
10293/* Override any GCC internal prototype to avoid an error.
10294 Use char because int might match the return type of a GCC
10295 builtin and then its argument prototype would still apply. */
10296#ifdef __cplusplus
10297extern "C"
10298#endif
10299char dlopen ();
10300int
10301main ()
10302{
10303return dlopen ();
10304 ;
10305 return 0;
10306}
10307_ACEOF
10308if ac_fn_c_try_link "$LINENO"; then :
10309 ac_cv_lib_dl_dlopen=yes
10310else
10311 ac_cv_lib_dl_dlopen=no
10312fi
10313rm -f core conftest.err conftest.$ac_objext \
10314 conftest$ac_exeext conftest.$ac_ext
10315LIBS=$ac_check_lib_save_LIBS
10316fi
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10318$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10319if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10320 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10321else
10322
10323 lt_cv_dlopen="dyld"
10324 lt_cv_dlopen_libs=
10325 lt_cv_dlopen_self=yes
10326
10327fi
10328
10329 ;;
10330
10331 *)
10332 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10333if test "x$ac_cv_func_shl_load" = x""yes; then :
10334 lt_cv_dlopen="shl_load"
10335else
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10337$as_echo_n "checking for shl_load in -ldld... " >&6; }
10338if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10339 $as_echo_n "(cached) " >&6
10340else
10341 ac_check_lib_save_LIBS=$LIBS
10342LIBS="-ldld $LIBS"
10343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344/* end confdefs.h. */
10345
10346/* Override any GCC internal prototype to avoid an error.
10347 Use char because int might match the return type of a GCC
10348 builtin and then its argument prototype would still apply. */
10349#ifdef __cplusplus
10350extern "C"
10351#endif
10352char shl_load ();
10353int
10354main ()
10355{
10356return shl_load ();
10357 ;
10358 return 0;
10359}
10360_ACEOF
10361if ac_fn_c_try_link "$LINENO"; then :
10362 ac_cv_lib_dld_shl_load=yes
10363else
10364 ac_cv_lib_dld_shl_load=no
10365fi
10366rm -f core conftest.err conftest.$ac_objext \
10367 conftest$ac_exeext conftest.$ac_ext
10368LIBS=$ac_check_lib_save_LIBS
10369fi
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10371$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10372if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10373 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
10374else
10375 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10376if test "x$ac_cv_func_dlopen" = x""yes; then :
10377 lt_cv_dlopen="dlopen"
10378else
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10380$as_echo_n "checking for dlopen in -ldl... " >&6; }
10381if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10382 $as_echo_n "(cached) " >&6
10383else
10384 ac_check_lib_save_LIBS=$LIBS
10385LIBS="-ldl $LIBS"
10386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10387/* end confdefs.h. */
10388
10389/* Override any GCC internal prototype to avoid an error.
10390 Use char because int might match the return type of a GCC
10391 builtin and then its argument prototype would still apply. */
10392#ifdef __cplusplus
10393extern "C"
10394#endif
10395char dlopen ();
10396int
10397main ()
10398{
10399return dlopen ();
10400 ;
10401 return 0;
10402}
10403_ACEOF
10404if ac_fn_c_try_link "$LINENO"; then :
10405 ac_cv_lib_dl_dlopen=yes
10406else
10407 ac_cv_lib_dl_dlopen=no
10408fi
10409rm -f core conftest.err conftest.$ac_objext \
10410 conftest$ac_exeext conftest.$ac_ext
10411LIBS=$ac_check_lib_save_LIBS
10412fi
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10414$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10415if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10416 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10417else
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10419$as_echo_n "checking for dlopen in -lsvld... " >&6; }
10420if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10421 $as_echo_n "(cached) " >&6
10422else
10423 ac_check_lib_save_LIBS=$LIBS
10424LIBS="-lsvld $LIBS"
10425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10426/* end confdefs.h. */
10427
10428/* Override any GCC internal prototype to avoid an error.
10429 Use char because int might match the return type of a GCC
10430 builtin and then its argument prototype would still apply. */
10431#ifdef __cplusplus
10432extern "C"
10433#endif
10434char dlopen ();
10435int
10436main ()
10437{
10438return dlopen ();
10439 ;
10440 return 0;
10441}
10442_ACEOF
10443if ac_fn_c_try_link "$LINENO"; then :
10444 ac_cv_lib_svld_dlopen=yes
10445else
10446 ac_cv_lib_svld_dlopen=no
10447fi
10448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
10450LIBS=$ac_check_lib_save_LIBS
10451fi
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10453$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10454if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10455 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10456else
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10458$as_echo_n "checking for dld_link in -ldld... " >&6; }
10459if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10460 $as_echo_n "(cached) " >&6
10461else
10462 ac_check_lib_save_LIBS=$LIBS
10463LIBS="-ldld $LIBS"
10464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10465/* end confdefs.h. */
10466
10467/* Override any GCC internal prototype to avoid an error.
10468 Use char because int might match the return type of a GCC
10469 builtin and then its argument prototype would still apply. */
10470#ifdef __cplusplus
10471extern "C"
10472#endif
10473char dld_link ();
10474int
10475main ()
10476{
10477return dld_link ();
10478 ;
10479 return 0;
10480}
10481_ACEOF
10482if ac_fn_c_try_link "$LINENO"; then :
10483 ac_cv_lib_dld_dld_link=yes
10484else
10485 ac_cv_lib_dld_dld_link=no
10486fi
10487rm -f core conftest.err conftest.$ac_objext \
10488 conftest$ac_exeext conftest.$ac_ext
10489LIBS=$ac_check_lib_save_LIBS
10490fi
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10492$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10493if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10494 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
10495fi
10496
10497
10498fi
10499
10500
10501fi
10502
10503
10504fi
10505
10506
10507fi
10508
10509
10510fi
10511
10512 ;;
10513 esac
10514
10515 if test "x$lt_cv_dlopen" != xno; then
10516 enable_dlopen=yes
10517 else
10518 enable_dlopen=no
10519 fi
10520
10521 case $lt_cv_dlopen in
10522 dlopen)
10523 save_CPPFLAGS="$CPPFLAGS"
10524 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10525
10526 save_LDFLAGS="$LDFLAGS"
10527 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10528
10529 save_LIBS="$LIBS"
10530 LIBS="$lt_cv_dlopen_libs $LIBS"
10531
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10533$as_echo_n "checking whether a program can dlopen itself... " >&6; }
10534if test "${lt_cv_dlopen_self+set}" = set; then :
10535 $as_echo_n "(cached) " >&6
10536else
10537 if test "$cross_compiling" = yes; then :
10538 lt_cv_dlopen_self=cross
10539else
10540 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10541 lt_status=$lt_dlunknown
10542 cat > conftest.$ac_ext <<_LT_EOF
10543#line 10543 "configure"
10544#include "confdefs.h"
10545
10546#if HAVE_DLFCN_H
10547#include <dlfcn.h>
10548#endif
10549
10550#include <stdio.h>
10551
10552#ifdef RTLD_GLOBAL
10553# define LT_DLGLOBAL RTLD_GLOBAL
10554#else
10555# ifdef DL_GLOBAL
10556# define LT_DLGLOBAL DL_GLOBAL
10557# else
10558# define LT_DLGLOBAL 0
10559# endif
10560#endif
10561
10562/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10563 find out it does not work in some platform. */
10564#ifndef LT_DLLAZY_OR_NOW
10565# ifdef RTLD_LAZY
10566# define LT_DLLAZY_OR_NOW RTLD_LAZY
10567# else
10568# ifdef DL_LAZY
10569# define LT_DLLAZY_OR_NOW DL_LAZY
10570# else
10571# ifdef RTLD_NOW
10572# define LT_DLLAZY_OR_NOW RTLD_NOW
10573# else
10574# ifdef DL_NOW
10575# define LT_DLLAZY_OR_NOW DL_NOW
10576# else
10577# define LT_DLLAZY_OR_NOW 0
10578# endif
10579# endif
10580# endif
10581# endif
10582#endif
10583
10584void fnord() { int i=42;}
10585int main ()
10586{
10587 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10588 int status = $lt_dlunknown;
10589
10590 if (self)
10591 {
10592 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10593 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10594 /* dlclose (self); */
10595 }
10596 else
10597 puts (dlerror ());
10598
10599 return status;
10600}
10601_LT_EOF
10602 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10603 (eval $ac_link) 2>&5
10604 ac_status=$?
10605 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10606 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10607 (./conftest; exit; ) >&5 2>/dev/null
10608 lt_status=$?
10609 case x$lt_status in
10610 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10611 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10612 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
10613 esac
10614 else :
10615 # compilation failed
10616 lt_cv_dlopen_self=no
10617 fi
10618fi
10619rm -fr conftest*
10620
10621
10622fi
10623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10624$as_echo "$lt_cv_dlopen_self" >&6; }
10625
10626 if test "x$lt_cv_dlopen_self" = xyes; then
10627 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10629$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10630if test "${lt_cv_dlopen_self_static+set}" = set; then :
10631 $as_echo_n "(cached) " >&6
10632else
10633 if test "$cross_compiling" = yes; then :
10634 lt_cv_dlopen_self_static=cross
10635else
10636 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10637 lt_status=$lt_dlunknown
10638 cat > conftest.$ac_ext <<_LT_EOF
10639#line 10639 "configure"
10640#include "confdefs.h"
10641
10642#if HAVE_DLFCN_H
10643#include <dlfcn.h>
10644#endif
10645
10646#include <stdio.h>
10647
10648#ifdef RTLD_GLOBAL
10649# define LT_DLGLOBAL RTLD_GLOBAL
10650#else
10651# ifdef DL_GLOBAL
10652# define LT_DLGLOBAL DL_GLOBAL
10653# else
10654# define LT_DLGLOBAL 0
10655# endif
10656#endif
10657
10658/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10659 find out it does not work in some platform. */
10660#ifndef LT_DLLAZY_OR_NOW
10661# ifdef RTLD_LAZY
10662# define LT_DLLAZY_OR_NOW RTLD_LAZY
10663# else
10664# ifdef DL_LAZY
10665# define LT_DLLAZY_OR_NOW DL_LAZY
10666# else
10667# ifdef RTLD_NOW
10668# define LT_DLLAZY_OR_NOW RTLD_NOW
10669# else
10670# ifdef DL_NOW
10671# define LT_DLLAZY_OR_NOW DL_NOW
10672# else
10673# define LT_DLLAZY_OR_NOW 0
10674# endif
10675# endif
10676# endif
10677# endif
10678#endif
10679
10680void fnord() { int i=42;}
10681int main ()
10682{
10683 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10684 int status = $lt_dlunknown;
10685
10686 if (self)
10687 {
10688 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10689 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10690 /* dlclose (self); */
10691 }
10692 else
10693 puts (dlerror ());
10694
10695 return status;
10696}
10697_LT_EOF
10698 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10699 (eval $ac_link) 2>&5
10700 ac_status=$?
10701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10702 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10703 (./conftest; exit; ) >&5 2>/dev/null
10704 lt_status=$?
10705 case x$lt_status in
10706 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10707 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10708 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
10709 esac
10710 else :
10711 # compilation failed
10712 lt_cv_dlopen_self_static=no
10713 fi
10714fi
10715rm -fr conftest*
10716
10717
10718fi
10719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
10720$as_echo "$lt_cv_dlopen_self_static" >&6; }
10721 fi
10722
10723 CPPFLAGS="$save_CPPFLAGS"
10724 LDFLAGS="$save_LDFLAGS"
10725 LIBS="$save_LIBS"
10726 ;;
10727 esac
10728
10729 case $lt_cv_dlopen_self in
10730 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10731 *) enable_dlopen_self=unknown ;;
10732 esac
10733
10734 case $lt_cv_dlopen_self_static in
10735 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10736 *) enable_dlopen_self_static=unknown ;;
10737 esac
10738fi
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756striplib=
10757old_striplib=
10758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10759$as_echo_n "checking whether stripping libraries is possible... " >&6; }
10760if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
10761 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10762 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10764$as_echo "yes" >&6; }
10765else
10766# FIXME - insert some real tests, host_os isn't really good enough
10767 case $host_os in
10768 darwin*)
10769 if test -n "$STRIP" ; then
10770 striplib="$STRIP -x"
10771 old_striplib="$STRIP -S"
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10773$as_echo "yes" >&6; }
10774 else
10775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777 fi
10778 ;;
10779 *)
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10781$as_echo "no" >&6; }
10782 ;;
10783 esac
10784fi
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797 # Report which library types will actually be built
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
10799$as_echo_n "checking if libtool supports shared libraries... " >&6; }
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
10801$as_echo "$can_build_shared" >&6; }
10802
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
10804$as_echo_n "checking whether to build shared libraries... " >&6; }
10805 test "$can_build_shared" = "no" && enable_shared=no
10806
10807 # On AIX, shared libraries and static libraries use the same namespace, and
10808 # are all built from PIC.
10809 case $host_os in
10810 aix3*)
10811 test "$enable_shared" = yes && enable_static=no
10812 if test -n "$RANLIB"; then
10813 archive_cmds="$archive_cmds~\$RANLIB \$lib"
10814 postinstall_cmds='$RANLIB $lib'
10815 fi
10816 ;;
10817
10818 aix[4-9]*)
10819 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10820 test "$enable_shared" = yes && enable_static=no
10821 fi
10822 ;;
10823 esac
10824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
10825$as_echo "$enable_shared" >&6; }
10826
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
10828$as_echo_n "checking whether to build static libraries... " >&6; }
10829 # Make sure either enable_shared or enable_static is yes.
10830 test "$enable_shared" = yes || enable_static=yes
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
10832$as_echo "$enable_static" >&6; }
10833
10834
10835
10836
10837fi
10838ac_ext=c
10839ac_cpp='$CPP $CPPFLAGS'
10840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10842ac_compiler_gnu=$ac_cv_c_compiler_gnu
10843
10844CC="$lt_save_CC"
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858 ac_config_commands="$ac_config_commands libtool"
10859
10860
10861
10862
10863# Only expand once:
10864
10865
10866
10867##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10868##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10869
10870
10871
10872cat >>confdefs.h <<_ACEOF
10873#define VMAJ 1
10874_ACEOF
10875
10876
10877cat >>confdefs.h <<_ACEOF
10878#define VMIN 5
10879_ACEOF
10880
10881
10882cat >>confdefs.h <<_ACEOF
10883#define VMIC 0
10884_ACEOF
10885
10886
10887cat >>confdefs.h <<_ACEOF
10888#define VREV 0
10889_ACEOF
10890
10891version_info="6:0:5"
10892release_info=""
10893
10894
10895##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10896##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
10897VMAJ=1
10898
10899
10900
10901### Needed information
10902
10903
10904
10905
10906### Default options with respect to host
10907
10908want_gnutls="auto"
10909want_openssl="auto"
10910want_cipher="yes"
10911want_signature="yes"
10912
10913requirement_eet=""
10914
10915
10916### Additional options to configure
10917
10918# Amalgamation
10919
10920# Check whether --enable-amalgamation was given.
10921if test "${enable_amalgamation+set}" = set; then :
10922 enableval=$enable_amalgamation; if test "x${enableval}" = "xyes"; then
10923 do_amalgamation="yes"
10924 else
10925 do_amalgamation="no"
10926 fi
10927
10928else
10929 do_amalgamation="no"
10930
10931fi
10932
10933 if test "x${do_amalgamation}" = "xyes"; then
10934 EET_AMALGAMATION_TRUE=
10935 EET_AMALGAMATION_FALSE='#'
10936else
10937 EET_AMALGAMATION_TRUE='#'
10938 EET_AMALGAMATION_FALSE=
10939fi
10940
10941
10942
10943
10944
10945have_eet="yes"
10946
10947
10948# Check whether --enable-eet was given.
10949if test "${enable_eet+set}" = set; then :
10950 enableval=$enable_eet;
10951 if test "x${enableval}" = "xyes" ; then
10952 have_eet="yes"
10953 else
10954 have_eet="no"
10955 fi
10956
10957fi
10958
10959
10960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build eet binary" >&5
10961$as_echo_n "checking whether to build eet binary... " >&6; }
10962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_eet" >&5
10963$as_echo "$have_eet" >&6; }
10964
10965if test "x$have_eet" = "xyes"; then
10966 EET_PRG=eet${EXEEXT}
10967fi
10968
10969
10970
10971 if test "x$have_eet" = "xyes"; then
10972 BUILD_EET_TRUE=
10973 BUILD_EET_FALSE='#'
10974else
10975 BUILD_EET_TRUE='#'
10976 BUILD_EET_FALSE=
10977fi
10978
10979
10980if test "x$have_eet" = "xyes"; then :
10981
10982fi
10983
10984
10985
10986# Old eet file format support
10987
10988old_eet_file_format="yes"
10989# Check whether --enable-old-eet-file-format was given.
10990if test "${enable_old_eet_file_format+set}" = set; then :
10991 enableval=$enable_old_eet_file_format; old_eet_file_format=$enableval
10992
10993fi
10994
10995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support old eet file format" >&5
10996$as_echo_n "checking whether to support old eet file format... " >&6; }
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${old_eet_file_format}" >&5
10998$as_echo "${old_eet_file_format}" >&6; }
10999
11000if test "x${old_eet_file_format}" = "xyes" ; then
11001
11002$as_echo "#define EET_OLD_EET_FILE_FORMAT 1" >>confdefs.h
11003
11004else
11005
11006$as_echo "#define EET_OLD_EET_FILE_FORMAT 0" >>confdefs.h
11007
11008fi
11009
11010# Gnutls support
11011
11012# Check whether --enable-gnutls was given.
11013if test "${enable_gnutls+set}" = set; then :
11014 enableval=$enable_gnutls; want_gnutls=$enableval
11015
11016fi
11017
11018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Gnutls" >&5
11019$as_echo_n "checking whether to use Gnutls... " >&6; }
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_gnutls}" >&5
11021$as_echo "${want_gnutls}" >&6; }
11022
11023# Specific GNUTLS improvement
11024
11025new_gnutls_api="yes"
11026# Check whether --enable-new-gnutls-api was given.
11027if test "${enable_new_gnutls_api+set}" = set; then :
11028 enableval=$enable_new_gnutls_api; new_gnutls_api=$enableval
11029
11030fi
11031
11032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use gnutls_x509_crt_verify_hash" >&5
11033$as_echo_n "checking whether to use gnutls_x509_crt_verify_hash... " >&6; }
11034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${new_gnutls_api}" >&5
11035$as_echo "${new_gnutls_api}" >&6; }
11036
11037if test "x${new_gnutls_api}" = "xyes" ; then
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_x509_crt_verify_hash in -lgnutls" >&5
11039$as_echo_n "checking for gnutls_x509_crt_verify_hash in -lgnutls... " >&6; }
11040if test "${ac_cv_lib_gnutls_gnutls_x509_crt_verify_hash+set}" = set; then :
11041 $as_echo_n "(cached) " >&6
11042else
11043 ac_check_lib_save_LIBS=$LIBS
11044LIBS="-lgnutls $LIBS"
11045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11046/* end confdefs.h. */
11047
11048/* Override any GCC internal prototype to avoid an error.
11049 Use char because int might match the return type of a GCC
11050 builtin and then its argument prototype would still apply. */
11051#ifdef __cplusplus
11052extern "C"
11053#endif
11054char gnutls_x509_crt_verify_hash ();
11055int
11056main ()
11057{
11058return gnutls_x509_crt_verify_hash ();
11059 ;
11060 return 0;
11061}
11062_ACEOF
11063if ac_fn_c_try_link "$LINENO"; then :
11064 ac_cv_lib_gnutls_gnutls_x509_crt_verify_hash=yes
11065else
11066 ac_cv_lib_gnutls_gnutls_x509_crt_verify_hash=no
11067fi
11068rm -f core conftest.err conftest.$ac_objext \
11069 conftest$ac_exeext conftest.$ac_ext
11070LIBS=$ac_check_lib_save_LIBS
11071fi
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_x509_crt_verify_hash" >&5
11073$as_echo "$ac_cv_lib_gnutls_gnutls_x509_crt_verify_hash" >&6; }
11074if test "x$ac_cv_lib_gnutls_gnutls_x509_crt_verify_hash" = x""yes; then :
11075 new_gnutls_api="yes"
11076else
11077 new_gnutls_api="no"
11078
11079fi
11080
11081
11082 if test "x${new_gnutls_api}" = "xyes"; then
11083
11084$as_echo "#define EET_USE_NEW_GNUTLS_API 1" >>confdefs.h
11085
11086 fi
11087fi
11088
11089# Openssl support
11090
11091# Check whether --enable-openssl was given.
11092if test "${enable_openssl+set}" = set; then :
11093 enableval=$enable_openssl; want_openssl=$enableval
11094
11095fi
11096
11097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL" >&5
11098$as_echo_n "checking whether to use OpenSSL... " >&6; }
11099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_openssl}" >&5
11100$as_echo "${want_openssl}" >&6; }
11101
11102# Cryptography support
11103
11104# Check whether --enable-cipher was given.
11105if test "${enable_cipher+set}" = set; then :
11106 enableval=$enable_cipher; want_cipher=$enableval
11107
11108fi
11109
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use cipher" >&5
11111$as_echo_n "checking whether to use cipher... " >&6; }
11112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_cipher}" >&5
11113$as_echo "${want_cipher}" >&6; }
11114
11115# Check whether --enable-signature was given.
11116if test "${enable_signature+set}" = set; then :
11117 enableval=$enable_signature; want_signature=$enableval
11118
11119fi
11120
11121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use signature" >&5
11122$as_echo_n "checking whether to use signature... " >&6; }
11123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_signature}" >&5
11124$as_echo "${want_signature}" >&6; }
11125
11126# Assert or fail.
11127prefer_assert="no"
11128# Check whether --enable-assert was given.
11129if test "${enable_assert+set}" = set; then :
11130 enableval=$enable_assert; prefer_assert=$enableval
11131
11132fi
11133
11134
11135# Examples
11136
11137# Check whether --enable-install-examples was given.
11138if test "${enable_install_examples+set}" = set; then :
11139 enableval=$enable_install_examples;
11140 if test "x${enableval}" = "xyes" ; then
11141 install_examples="yes"
11142 else
11143 install_examples="no"
11144 fi
11145
11146else
11147 install_examples="yes"
11148fi
11149
11150 if test "x${install_examples}" = "xyes"; then
11151 INSTALL_EXAMPLES_TRUE=
11152 INSTALL_EXAMPLES_FALSE='#'
11153else
11154 INSTALL_EXAMPLES_TRUE='#'
11155 INSTALL_EXAMPLES_FALSE=
11156fi
11157
11158
11159# Check whether --enable-build-examples was given.
11160if test "${enable_build_examples+set}" = set; then :
11161 enableval=$enable_build_examples;
11162 if test "x${enableval}" = "xyes" ; then
11163 build_examples="yes"
11164 else
11165 build_examples="no"
11166 fi
11167
11168else
11169 build_examples="no"
11170fi
11171
11172 if test "x${build_examples}" = "xyes"; then
11173 BUILD_EXAMPLES_TRUE=
11174 BUILD_EXAMPLES_FALSE='#'
11175else
11176 BUILD_EXAMPLES_TRUE='#'
11177 BUILD_EXAMPLES_FALSE=
11178fi
11179
11180
11181# Unit tests, coverage and benchmarking
11182
11183
11184
11185
11186
11187
11188
11189if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11190 if test -n "$ac_tool_prefix"; then
11191 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11192set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11194$as_echo_n "checking for $ac_word... " >&6; }
11195if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11196 $as_echo_n "(cached) " >&6
11197else
11198 case $PKG_CONFIG in
11199 [\\/]* | ?:[\\/]*)
11200 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11201 ;;
11202 *)
11203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11204for as_dir in $PATH
11205do
11206 IFS=$as_save_IFS
11207 test -z "$as_dir" && as_dir=.
11208 for ac_exec_ext in '' $ac_executable_extensions; do
11209 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11210 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11211 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11212 break 2
11213 fi
11214done
11215 done
11216IFS=$as_save_IFS
11217
11218 ;;
11219esac
11220fi
11221PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11222if test -n "$PKG_CONFIG"; then
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11224$as_echo "$PKG_CONFIG" >&6; }
11225else
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11227$as_echo "no" >&6; }
11228fi
11229
11230
11231fi
11232if test -z "$ac_cv_path_PKG_CONFIG"; then
11233 ac_pt_PKG_CONFIG=$PKG_CONFIG
11234 # Extract the first word of "pkg-config", so it can be a program name with args.
11235set dummy pkg-config; ac_word=$2
11236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11237$as_echo_n "checking for $ac_word... " >&6; }
11238if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
11239 $as_echo_n "(cached) " >&6
11240else
11241 case $ac_pt_PKG_CONFIG in
11242 [\\/]* | ?:[\\/]*)
11243 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11244 ;;
11245 *)
11246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11247for as_dir in $PATH
11248do
11249 IFS=$as_save_IFS
11250 test -z "$as_dir" && as_dir=.
11251 for ac_exec_ext in '' $ac_executable_extensions; do
11252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11253 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11254 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11255 break 2
11256 fi
11257done
11258 done
11259IFS=$as_save_IFS
11260
11261 ;;
11262esac
11263fi
11264ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11265if test -n "$ac_pt_PKG_CONFIG"; then
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
11267$as_echo "$ac_pt_PKG_CONFIG" >&6; }
11268else
11269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11270$as_echo "no" >&6; }
11271fi
11272
11273 if test "x$ac_pt_PKG_CONFIG" = x; then
11274 PKG_CONFIG=""
11275 else
11276 case $cross_compiling:$ac_tool_warned in
11277yes:)
11278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11280ac_tool_warned=yes ;;
11281esac
11282 PKG_CONFIG=$ac_pt_PKG_CONFIG
11283 fi
11284else
11285 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11286fi
11287
11288fi
11289if test -n "$PKG_CONFIG"; then
11290 _pkg_min_version=0.9.0
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
11292$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
11293 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11295$as_echo "yes" >&6; }
11296 else
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298$as_echo "no" >&6; }
11299 PKG_CONFIG=""
11300 fi
11301fi
11302
11303
11304
11305# Check whether --enable-tests was given.
11306if test "${enable_tests+set}" = set; then :
11307 enableval=$enable_tests;
11308 if test "x${enableval}" = "xyes" ; then
11309 _efl_enable_tests="yes"
11310 else
11311 _efl_enable_tests="no"
11312 fi
11313
11314else
11315 _efl_enable_tests="no"
11316fi
11317
11318
11319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tests are built" >&5
11320$as_echo_n "checking whether tests are built... " >&6; }
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_efl_enable_tests}" >&5
11322$as_echo "${_efl_enable_tests}" >&6; }
11323
11324
11325
11326if test "x${_efl_enable_tests}" = "xyes" ; then
11327
11328pkg_failed=no
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5
11330$as_echo_n "checking for CHECK... " >&6; }
11331
11332if test -n "$CHECK_CFLAGS"; then
11333 pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS"
11334 elif test -n "$PKG_CONFIG"; then
11335 if test -n "$PKG_CONFIG" && \
11336 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5
11337 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5
11338 ac_status=$?
11339 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11340 test $ac_status = 0; }; then
11341 pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.9.5" 2>/dev/null`
11342else
11343 pkg_failed=yes
11344fi
11345 else
11346 pkg_failed=untried
11347fi
11348if test -n "$CHECK_LIBS"; then
11349 pkg_cv_CHECK_LIBS="$CHECK_LIBS"
11350 elif test -n "$PKG_CONFIG"; then
11351 if test -n "$PKG_CONFIG" && \
11352 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5
11353 ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5
11354 ac_status=$?
11355 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11356 test $ac_status = 0; }; then
11357 pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check >= 0.9.5" 2>/dev/null`
11358else
11359 pkg_failed=yes
11360fi
11361 else
11362 pkg_failed=untried
11363fi
11364
11365
11366
11367if test $pkg_failed = yes; then
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
11370
11371if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11372 _pkg_short_errors_supported=yes
11373else
11374 _pkg_short_errors_supported=no
11375fi
11376 if test $_pkg_short_errors_supported = yes; then
11377 CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "check >= 0.9.5" 2>&1`
11378 else
11379 CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1`
11380 fi
11381 # Put the nasty error message in config.log where it belongs
11382 echo "$CHECK_PKG_ERRORS" >&5
11383
11384 _efl_enable_tests="no"
11385elif test $pkg_failed = untried; then
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11387$as_echo "no" >&6; }
11388 _efl_enable_tests="no"
11389else
11390 CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS
11391 CHECK_LIBS=$pkg_cv_CHECK_LIBS
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11393$as_echo "yes" >&6; }
11394 dummy="yes"
11395fi
11396fi
11397
11398 if test "x${_efl_enable_tests}" = "xyes"; then
11399 EFL_ENABLE_TESTS_TRUE=
11400 EFL_ENABLE_TESTS_FALSE='#'
11401else
11402 EFL_ENABLE_TESTS_TRUE='#'
11403 EFL_ENABLE_TESTS_FALSE=
11404fi
11405
11406
11407if test "x$_efl_enable_tests" = "xyes"; then :
11408 enable_tests="yes"
11409else
11410 enable_tests="no"
11411fi
11412
11413
11414
11415
11416# Check whether --enable-coverage was given.
11417if test "${enable_coverage+set}" = set; then :
11418 enableval=$enable_coverage;
11419 if test "x${enableval}" = "xyes" ; then
11420 _efl_enable_coverage="yes"
11421 else
11422 _efl_enable_coverage="no"
11423 fi
11424
11425else
11426 _efl_enable_coverage="no"
11427fi
11428
11429
11430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use profiling instrumentation" >&5
11431$as_echo_n "checking whether to use profiling instrumentation... " >&6; }
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_efl_enable_coverage" >&5
11433$as_echo "$_efl_enable_coverage" >&6; }
11434
11435
11436if test "x$_efl_enable_coverage" = "xyes" && test ! "x${enable_tests}" = "xyes" ; then
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Coverage report requested but tests not being built, disable profiling instrumentation." >&5
11438$as_echo "$as_me: WARNING: Coverage report requested but tests not being built, disable profiling instrumentation." >&2;}
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Run configure with --enable-tests" >&5
11440$as_echo "$as_me: WARNING: Run configure with --enable-tests" >&2;}
11441 _efl_enable_coverage="no"
11442fi
11443
11444if test "x$_efl_enable_coverage" = "xyes" ; then
11445 # Extract the first word of "lcov", so it can be a program name with args.
11446set dummy lcov; ac_word=$2
11447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11448$as_echo_n "checking for $ac_word... " >&6; }
11449if test "${ac_cv_prog_have_lcov+set}" = set; then :
11450 $as_echo_n "(cached) " >&6
11451else
11452 if test -n "$have_lcov"; then
11453 ac_cv_prog_have_lcov="$have_lcov" # Let the user override the test.
11454else
11455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11456for as_dir in $PATH
11457do
11458 IFS=$as_save_IFS
11459 test -z "$as_dir" && as_dir=.
11460 for ac_exec_ext in '' $ac_executable_extensions; do
11461 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11462 ac_cv_prog_have_lcov="yes"
11463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11464 break 2
11465 fi
11466done
11467 done
11468IFS=$as_save_IFS
11469
11470 test -z "$ac_cv_prog_have_lcov" && ac_cv_prog_have_lcov="no"
11471fi
11472fi
11473have_lcov=$ac_cv_prog_have_lcov
11474if test -n "$have_lcov"; then
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_lcov" >&5
11476$as_echo "$have_lcov" >&6; }
11477else
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480fi
11481
11482
11483 if test "x$have_lcov" = "xyes" ; then
11484 EFL_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
11485 EFL_COVERAGE_LIBS="-lgcov"
11486# remove any optimisation flag and force debug symbols
11487 EFL_DEBUG_CFLAGS="-g -O0 -DDEBUG"
11488 else
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lcov is not found, disable profiling instrumentation" >&5
11490$as_echo "$as_me: WARNING: lcov is not found, disable profiling instrumentation" >&2;}
11491 _efl_enable_coverage="no"
11492 fi
11493fi
11494
11495
11496
11497
11498 if test "x${_efl_enable_coverage}" = "xyes"; then
11499 EFL_ENABLE_COVERAGE_TRUE=
11500 EFL_ENABLE_COVERAGE_FALSE='#'
11501else
11502 EFL_ENABLE_COVERAGE_TRUE='#'
11503 EFL_ENABLE_COVERAGE_FALSE=
11504fi
11505
11506
11507if test "x$_efl_enable_coverage" = "xyes"; then :
11508 enable_coverage="yes"
11509else
11510 enable_coverage="no"
11511fi
11512
11513
11514if test "x${prefer_assert}" = "xno"; then
11515 DEBUG_CFLAGS="-DNDEBUG"
11516else
11517# use debug symbols and set DEBUG if coverage support is enabled
11518 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
11519fi
11520
11521
11522
11523### Checks for programs
11524ac_ext=c
11525ac_cpp='$CPP $CPPFLAGS'
11526ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11527ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11528ac_compiler_gnu=$ac_cv_c_compiler_gnu
11529if test -n "$ac_tool_prefix"; then
11530 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
11531set dummy ${ac_tool_prefix}gcc; ac_word=$2
11532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11533$as_echo_n "checking for $ac_word... " >&6; }
11534if test "${ac_cv_prog_CC+set}" = set; then :
11535 $as_echo_n "(cached) " >&6
11536else
11537 if test -n "$CC"; then
11538 ac_cv_prog_CC="$CC" # Let the user override the test.
11539else
11540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11541for as_dir in $PATH
11542do
11543 IFS=$as_save_IFS
11544 test -z "$as_dir" && as_dir=.
11545 for ac_exec_ext in '' $ac_executable_extensions; do
11546 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11547 ac_cv_prog_CC="${ac_tool_prefix}gcc"
11548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11549 break 2
11550 fi
11551done
11552 done
11553IFS=$as_save_IFS
11554
11555fi
11556fi
11557CC=$ac_cv_prog_CC
11558if test -n "$CC"; then
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11560$as_echo "$CC" >&6; }
11561else
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11563$as_echo "no" >&6; }
11564fi
11565
11566
11567fi
11568if test -z "$ac_cv_prog_CC"; then
11569 ac_ct_CC=$CC
11570 # Extract the first word of "gcc", so it can be a program name with args.
11571set dummy gcc; ac_word=$2
11572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11573$as_echo_n "checking for $ac_word... " >&6; }
11574if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
11575 $as_echo_n "(cached) " >&6
11576else
11577 if test -n "$ac_ct_CC"; then
11578 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11579else
11580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11581for as_dir in $PATH
11582do
11583 IFS=$as_save_IFS
11584 test -z "$as_dir" && as_dir=.
11585 for ac_exec_ext in '' $ac_executable_extensions; do
11586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11587 ac_cv_prog_ac_ct_CC="gcc"
11588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11589 break 2
11590 fi
11591done
11592 done
11593IFS=$as_save_IFS
11594
11595fi
11596fi
11597ac_ct_CC=$ac_cv_prog_ac_ct_CC
11598if test -n "$ac_ct_CC"; then
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
11600$as_echo "$ac_ct_CC" >&6; }
11601else
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11603$as_echo "no" >&6; }
11604fi
11605
11606 if test "x$ac_ct_CC" = x; then
11607 CC=""
11608 else
11609 case $cross_compiling:$ac_tool_warned in
11610yes:)
11611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11613ac_tool_warned=yes ;;
11614esac
11615 CC=$ac_ct_CC
11616 fi
11617else
11618 CC="$ac_cv_prog_CC"
11619fi
11620
11621if test -z "$CC"; then
11622 if test -n "$ac_tool_prefix"; then
11623 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
11624set dummy ${ac_tool_prefix}cc; ac_word=$2
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
11627if test "${ac_cv_prog_CC+set}" = set; then :
11628 $as_echo_n "(cached) " >&6
11629else
11630 if test -n "$CC"; then
11631 ac_cv_prog_CC="$CC" # Let the user override the test.
11632else
11633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11634for as_dir in $PATH
11635do
11636 IFS=$as_save_IFS
11637 test -z "$as_dir" && as_dir=.
11638 for ac_exec_ext in '' $ac_executable_extensions; do
11639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11640 ac_cv_prog_CC="${ac_tool_prefix}cc"
11641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11642 break 2
11643 fi
11644done
11645 done
11646IFS=$as_save_IFS
11647
11648fi
11649fi
11650CC=$ac_cv_prog_CC
11651if test -n "$CC"; then
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11653$as_echo "$CC" >&6; }
11654else
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11656$as_echo "no" >&6; }
11657fi
11658
11659
11660 fi
11661fi
11662if test -z "$CC"; then
11663 # Extract the first word of "cc", so it can be a program name with args.
11664set dummy cc; ac_word=$2
11665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11666$as_echo_n "checking for $ac_word... " >&6; }
11667if test "${ac_cv_prog_CC+set}" = set; then :
11668 $as_echo_n "(cached) " >&6
11669else
11670 if test -n "$CC"; then
11671 ac_cv_prog_CC="$CC" # Let the user override the test.
11672else
11673 ac_prog_rejected=no
11674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11675for as_dir in $PATH
11676do
11677 IFS=$as_save_IFS
11678 test -z "$as_dir" && as_dir=.
11679 for ac_exec_ext in '' $ac_executable_extensions; do
11680 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11681 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
11682 ac_prog_rejected=yes
11683 continue
11684 fi
11685 ac_cv_prog_CC="cc"
11686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11687 break 2
11688 fi
11689done
11690 done
11691IFS=$as_save_IFS
11692
11693if test $ac_prog_rejected = yes; then
11694 # We found a bogon in the path, so make sure we never use it.
11695 set dummy $ac_cv_prog_CC
11696 shift
11697 if test $# != 0; then
11698 # We chose a different compiler from the bogus one.
11699 # However, it has the same basename, so the bogon will be chosen
11700 # first if we set CC to just the basename; use the full file name.
11701 shift
11702 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
11703 fi
11704fi
11705fi
11706fi
11707CC=$ac_cv_prog_CC
11708if test -n "$CC"; then
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11710$as_echo "$CC" >&6; }
11711else
11712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713$as_echo "no" >&6; }
11714fi
11715
11716
11717fi
11718if test -z "$CC"; then
11719 if test -n "$ac_tool_prefix"; then
11720 for ac_prog in cl.exe
11721 do
11722 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11723set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11725$as_echo_n "checking for $ac_word... " >&6; }
11726if test "${ac_cv_prog_CC+set}" = set; then :
11727 $as_echo_n "(cached) " >&6
11728else
11729 if test -n "$CC"; then
11730 ac_cv_prog_CC="$CC" # Let the user override the test.
11731else
11732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11733for as_dir in $PATH
11734do
11735 IFS=$as_save_IFS
11736 test -z "$as_dir" && as_dir=.
11737 for ac_exec_ext in '' $ac_executable_extensions; do
11738 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11739 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
11740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11741 break 2
11742 fi
11743done
11744 done
11745IFS=$as_save_IFS
11746
11747fi
11748fi
11749CC=$ac_cv_prog_CC
11750if test -n "$CC"; then
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11752$as_echo "$CC" >&6; }
11753else
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11755$as_echo "no" >&6; }
11756fi
11757
11758
11759 test -n "$CC" && break
11760 done
11761fi
11762if test -z "$CC"; then
11763 ac_ct_CC=$CC
11764 for ac_prog in cl.exe
11765do
11766 # Extract the first word of "$ac_prog", so it can be a program name with args.
11767set dummy $ac_prog; ac_word=$2
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11769$as_echo_n "checking for $ac_word... " >&6; }
11770if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
11771 $as_echo_n "(cached) " >&6
11772else
11773 if test -n "$ac_ct_CC"; then
11774 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11775else
11776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11777for as_dir in $PATH
11778do
11779 IFS=$as_save_IFS
11780 test -z "$as_dir" && as_dir=.
11781 for ac_exec_ext in '' $ac_executable_extensions; do
11782 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11783 ac_cv_prog_ac_ct_CC="$ac_prog"
11784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11785 break 2
11786 fi
11787done
11788 done
11789IFS=$as_save_IFS
11790
11791fi
11792fi
11793ac_ct_CC=$ac_cv_prog_ac_ct_CC
11794if test -n "$ac_ct_CC"; then
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
11796$as_echo "$ac_ct_CC" >&6; }
11797else
11798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799$as_echo "no" >&6; }
11800fi
11801
11802
11803 test -n "$ac_ct_CC" && break
11804done
11805
11806 if test "x$ac_ct_CC" = x; then
11807 CC=""
11808 else
11809 case $cross_compiling:$ac_tool_warned in
11810yes:)
11811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11813ac_tool_warned=yes ;;
11814esac
11815 CC=$ac_ct_CC
11816 fi
11817fi
11818
11819fi
11820
11821
11822test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11824as_fn_error $? "no acceptable C compiler found in \$PATH
11825See \`config.log' for more details" "$LINENO" 5 ; }
11826
11827# Provide some information about the compiler.
11828$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
11829set X $ac_compile
11830ac_compiler=$2
11831for ac_option in --version -v -V -qversion; do
11832 { { ac_try="$ac_compiler $ac_option >&5"
11833case "(($ac_try" in
11834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11835 *) ac_try_echo=$ac_try;;
11836esac
11837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11838$as_echo "$ac_try_echo"; } >&5
11839 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
11840 ac_status=$?
11841 if test -s conftest.err; then
11842 sed '10a\
11843... rest of stderr output deleted ...
11844 10q' conftest.err >conftest.er1
11845 cat conftest.er1 >&5
11846 fi
11847 rm -f conftest.er1 conftest.err
11848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11849 test $ac_status = 0; }
11850done
11851
11852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
11853$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
11854if test "${ac_cv_c_compiler_gnu+set}" = set; then :
11855 $as_echo_n "(cached) " >&6
11856else
11857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11858/* end confdefs.h. */
11859
11860int
11861main ()
11862{
11863#ifndef __GNUC__
11864 choke me
11865#endif
11866
11867 ;
11868 return 0;
11869}
11870_ACEOF
11871if ac_fn_c_try_compile "$LINENO"; then :
11872 ac_compiler_gnu=yes
11873else
11874 ac_compiler_gnu=no
11875fi
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877ac_cv_c_compiler_gnu=$ac_compiler_gnu
11878
11879fi
11880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
11881$as_echo "$ac_cv_c_compiler_gnu" >&6; }
11882if test $ac_compiler_gnu = yes; then
11883 GCC=yes
11884else
11885 GCC=
11886fi
11887ac_test_CFLAGS=${CFLAGS+set}
11888ac_save_CFLAGS=$CFLAGS
11889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
11890$as_echo_n "checking whether $CC accepts -g... " >&6; }
11891if test "${ac_cv_prog_cc_g+set}" = set; then :
11892 $as_echo_n "(cached) " >&6
11893else
11894 ac_save_c_werror_flag=$ac_c_werror_flag
11895 ac_c_werror_flag=yes
11896 ac_cv_prog_cc_g=no
11897 CFLAGS="-g"
11898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899/* end confdefs.h. */
11900
11901int
11902main ()
11903{
11904
11905 ;
11906 return 0;
11907}
11908_ACEOF
11909if ac_fn_c_try_compile "$LINENO"; then :
11910 ac_cv_prog_cc_g=yes
11911else
11912 CFLAGS=""
11913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914/* end confdefs.h. */
11915
11916int
11917main ()
11918{
11919
11920 ;
11921 return 0;
11922}
11923_ACEOF
11924if ac_fn_c_try_compile "$LINENO"; then :
11925
11926else
11927 ac_c_werror_flag=$ac_save_c_werror_flag
11928 CFLAGS="-g"
11929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11930/* end confdefs.h. */
11931
11932int
11933main ()
11934{
11935
11936 ;
11937 return 0;
11938}
11939_ACEOF
11940if ac_fn_c_try_compile "$LINENO"; then :
11941 ac_cv_prog_cc_g=yes
11942fi
11943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11944fi
11945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11946fi
11947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11948 ac_c_werror_flag=$ac_save_c_werror_flag
11949fi
11950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
11951$as_echo "$ac_cv_prog_cc_g" >&6; }
11952if test "$ac_test_CFLAGS" = set; then
11953 CFLAGS=$ac_save_CFLAGS
11954elif test $ac_cv_prog_cc_g = yes; then
11955 if test "$GCC" = yes; then
11956 CFLAGS="-g -O2"
11957 else
11958 CFLAGS="-g"
11959 fi
11960else
11961 if test "$GCC" = yes; then
11962 CFLAGS="-O2"
11963 else
11964 CFLAGS=
11965 fi
11966fi
11967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
11968$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
11969if test "${ac_cv_prog_cc_c89+set}" = set; then :
11970 $as_echo_n "(cached) " >&6
11971else
11972 ac_cv_prog_cc_c89=no
11973ac_save_CC=$CC
11974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11975/* end confdefs.h. */
11976#include <stdarg.h>
11977#include <stdio.h>
11978#include <sys/types.h>
11979#include <sys/stat.h>
11980/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
11981struct buf { int x; };
11982FILE * (*rcsopen) (struct buf *, struct stat *, int);
11983static char *e (p, i)
11984 char **p;
11985 int i;
11986{
11987 return p[i];
11988}
11989static char *f (char * (*g) (char **, int), char **p, ...)
11990{
11991 char *s;
11992 va_list v;
11993 va_start (v,p);
11994 s = g (p, va_arg (v,int));
11995 va_end (v);
11996 return s;
11997}
11998
11999/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
12000 function prototypes and stuff, but not '\xHH' hex character constants.
12001 These don't provoke an error unfortunately, instead are silently treated
12002 as 'x'. The following induces an error, until -std is added to get
12003 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
12004 array size at least. It's necessary to write '\x00'==0 to get something
12005 that's true only with -std. */
12006int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12007
12008/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12009 inside strings and character constants. */
12010#define FOO(x) 'x'
12011int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12012
12013int test (int i, double x);
12014struct s1 {int (*f) (int a);};
12015struct s2 {int (*f) (double a);};
12016int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12017int argc;
12018char **argv;
12019int
12020main ()
12021{
12022return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
12023 ;
12024 return 0;
12025}
12026_ACEOF
12027for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12028 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12029do
12030 CC="$ac_save_CC $ac_arg"
12031 if ac_fn_c_try_compile "$LINENO"; then :
12032 ac_cv_prog_cc_c89=$ac_arg
12033fi
12034rm -f core conftest.err conftest.$ac_objext
12035 test "x$ac_cv_prog_cc_c89" != "xno" && break
12036done
12037rm -f conftest.$ac_ext
12038CC=$ac_save_CC
12039
12040fi
12041# AC_CACHE_VAL
12042case "x$ac_cv_prog_cc_c89" in
12043 x)
12044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12045$as_echo "none needed" >&6; } ;;
12046 xno)
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12048$as_echo "unsupported" >&6; } ;;
12049 *)
12050 CC="$CC $ac_cv_prog_cc_c89"
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12052$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12053esac
12054if test "x$ac_cv_prog_cc_c89" != xno; then :
12055
12056fi
12057
12058ac_ext=c
12059ac_cpp='$CPP $CPPFLAGS'
12060ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12061ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12062ac_compiler_gnu=$ac_cv_c_compiler_gnu
12063
12064depcc="$CC" am_compiler_list=
12065
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12067$as_echo_n "checking dependency style of $depcc... " >&6; }
12068if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
12069 $as_echo_n "(cached) " >&6
12070else
12071 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12072 # We make a subdir and do the tests there. Otherwise we can end up
12073 # making bogus files that we don't know about and never remove. For
12074 # instance it was reported that on HP-UX the gcc test will end up
12075 # making a dummy file named `D' -- because `-MD' means `put the output
12076 # in D'.
12077 mkdir conftest.dir
12078 # Copy depcomp to subdir because otherwise we won't find it if we're
12079 # using a relative directory.
12080 cp "$am_depcomp" conftest.dir
12081 cd conftest.dir
12082 # We will build objects and dependencies in a subdirectory because
12083 # it helps to detect inapplicable dependency modes. For instance
12084 # both Tru64's cc and ICC support -MD to output dependencies as a
12085 # side effect of compilation, but ICC will put the dependencies in
12086 # the current directory while Tru64 will put them in the object
12087 # directory.
12088 mkdir sub
12089
12090 am_cv_CC_dependencies_compiler_type=none
12091 if test "$am_compiler_list" = ""; then
12092 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12093 fi
12094 am__universal=false
12095 case " $depcc " in #(
12096 *\ -arch\ *\ -arch\ *) am__universal=true ;;
12097 esac
12098
12099 for depmode in $am_compiler_list; do
12100 # Setup a source with many dependencies, because some compilers
12101 # like to wrap large dependency lists on column 80 (with \), and
12102 # we should not choose a depcomp mode which is confused by this.
12103 #
12104 # We need to recreate these files for each test, as the compiler may
12105 # overwrite some of them when testing with obscure command lines.
12106 # This happens at least with the AIX C compiler.
12107 : > sub/conftest.c
12108 for i in 1 2 3 4 5 6; do
12109 echo '#include "conftst'$i'.h"' >> sub/conftest.c
12110 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12111 # Solaris 8's {/usr,}/bin/sh.
12112 touch sub/conftst$i.h
12113 done
12114 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12115
12116 # We check with `-c' and `-o' for the sake of the "dashmstdout"
12117 # mode. It turns out that the SunPro C++ compiler does not properly
12118 # handle `-M -o', and we need to detect this. Also, some Intel
12119 # versions had trouble with output in subdirs
12120 am__obj=sub/conftest.${OBJEXT-o}
12121 am__minus_obj="-o $am__obj"
12122 case $depmode in
12123 gcc)
12124 # This depmode causes a compiler race in universal mode.
12125 test "$am__universal" = false || continue
12126 ;;
12127 nosideeffect)
12128 # after this tag, mechanisms are not by side-effect, so they'll
12129 # only be used when explicitly requested
12130 if test "x$enable_dependency_tracking" = xyes; then
12131 continue
12132 else
12133 break
12134 fi
12135 ;;
12136 msvisualcpp | msvcmsys)
12137 # This compiler won't grok `-c -o', but also, the minuso test has
12138 # not run yet. These depmodes are late enough in the game, and
12139 # so weak that their functioning should not be impacted.
12140 am__obj=conftest.${OBJEXT-o}
12141 am__minus_obj=
12142 ;;
12143 none) break ;;
12144 esac
12145 if depmode=$depmode \
12146 source=sub/conftest.c object=$am__obj \
12147 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12148 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
12149 >/dev/null 2>conftest.err &&
12150 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
12151 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12152 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
12153 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12154 # icc doesn't choke on unknown options, it will just issue warnings
12155 # or remarks (even with -Werror). So we grep stderr for any message
12156 # that says an option was ignored or not supported.
12157 # When given -MP, icc 7.0 and 7.1 complain thusly:
12158 # icc: Command line warning: ignoring option '-M'; no argument required
12159 # The diagnosis changed in icc 8.0:
12160 # icc: Command line remark: option '-MP' not supported
12161 if (grep 'ignoring option' conftest.err ||
12162 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12163 am_cv_CC_dependencies_compiler_type=$depmode
12164 break
12165 fi
12166 fi
12167 done
12168
12169 cd ..
12170 rm -rf conftest.dir
12171else
12172 am_cv_CC_dependencies_compiler_type=none
12173fi
12174
12175fi
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
12177$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
12178CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12179
12180 if
12181 test "x$enable_dependency_tracking" != xno \
12182 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12183 am__fastdepCC_TRUE=
12184 am__fastdepCC_FALSE='#'
12185else
12186 am__fastdepCC_TRUE='#'
12187 am__fastdepCC_FALSE=
12188fi
12189
12190
12191
12192# pkg-config
12193
12194
12195
12196
12197
12198
12199if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12200 if test -n "$ac_tool_prefix"; then
12201 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
12202set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
12203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12204$as_echo_n "checking for $ac_word... " >&6; }
12205if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
12206 $as_echo_n "(cached) " >&6
12207else
12208 case $PKG_CONFIG in
12209 [\\/]* | ?:[\\/]*)
12210 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12211 ;;
12212 *)
12213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12214for as_dir in $PATH
12215do
12216 IFS=$as_save_IFS
12217 test -z "$as_dir" && as_dir=.
12218 for ac_exec_ext in '' $ac_executable_extensions; do
12219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12220 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12222 break 2
12223 fi
12224done
12225 done
12226IFS=$as_save_IFS
12227
12228 ;;
12229esac
12230fi
12231PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12232if test -n "$PKG_CONFIG"; then
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12234$as_echo "$PKG_CONFIG" >&6; }
12235else
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12237$as_echo "no" >&6; }
12238fi
12239
12240
12241fi
12242if test -z "$ac_cv_path_PKG_CONFIG"; then
12243 ac_pt_PKG_CONFIG=$PKG_CONFIG
12244 # Extract the first word of "pkg-config", so it can be a program name with args.
12245set dummy pkg-config; ac_word=$2
12246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12247$as_echo_n "checking for $ac_word... " >&6; }
12248if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
12249 $as_echo_n "(cached) " >&6
12250else
12251 case $ac_pt_PKG_CONFIG in
12252 [\\/]* | ?:[\\/]*)
12253 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12254 ;;
12255 *)
12256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12257for as_dir in $PATH
12258do
12259 IFS=$as_save_IFS
12260 test -z "$as_dir" && as_dir=.
12261 for ac_exec_ext in '' $ac_executable_extensions; do
12262 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12263 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12265 break 2
12266 fi
12267done
12268 done
12269IFS=$as_save_IFS
12270
12271 ;;
12272esac
12273fi
12274ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12275if test -n "$ac_pt_PKG_CONFIG"; then
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
12277$as_echo "$ac_pt_PKG_CONFIG" >&6; }
12278else
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12280$as_echo "no" >&6; }
12281fi
12282
12283 if test "x$ac_pt_PKG_CONFIG" = x; then
12284 PKG_CONFIG=""
12285 else
12286 case $cross_compiling:$ac_tool_warned in
12287yes:)
12288{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12289$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12290ac_tool_warned=yes ;;
12291esac
12292 PKG_CONFIG=$ac_pt_PKG_CONFIG
12293 fi
12294else
12295 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12296fi
12297
12298fi
12299if test -n "$PKG_CONFIG"; then
12300 _pkg_min_version=0.9.0
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12302$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12303 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12305$as_echo "yes" >&6; }
12306 else
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12308$as_echo "no" >&6; }
12309 PKG_CONFIG=""
12310 fi
12311fi
12312
12313# Check whether pkg-config supports Requires.private
12314if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
12315 pkgconfig_requires_private="Requires.private"
12316else
12317 pkgconfig_requires_private="Requires"
12318fi
12319
12320
12321
12322# doxygen program for documentation building
12323
12324
12325
12326# Check whether --enable-doc was given.
12327if test "${enable_doc+set}" = set; then :
12328 enableval=$enable_doc;
12329 if test "x${enableval}" = "xyes" ; then
12330 efl_enable_doc="yes"
12331 else
12332 efl_enable_doc="no"
12333 fi
12334
12335else
12336 efl_enable_doc="yes"
12337fi
12338
12339
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5
12341$as_echo_n "checking whether to build documentation... " >&6; }
12342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${efl_enable_doc}" >&5
12343$as_echo "${efl_enable_doc}" >&6; }
12344
12345if test "x${efl_enable_doc}" = "xyes" ; then
12346
12347
12348 efl_doxygen="doxygen"
12349
12350
12351# Check whether --with-doxygen was given.
12352if test "${with_doxygen+set}" = set; then :
12353 withval=$with_doxygen;
12354 efl_doxygen=${withval}
12355 # Extract the first word of "${efl_doxygen}", so it can be a program name with args.
12356set dummy ${efl_doxygen}; ac_word=$2
12357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12358$as_echo_n "checking for $ac_word... " >&6; }
12359if test "${ac_cv_prog_efl_have_doxygen+set}" = set; then :
12360 $as_echo_n "(cached) " >&6
12361else
12362 if test -n "$efl_have_doxygen"; then
12363 ac_cv_prog_efl_have_doxygen="$efl_have_doxygen" # Let the user override the test.
12364else
12365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12366for as_dir in $PATH
12367do
12368 IFS=$as_save_IFS
12369 test -z "$as_dir" && as_dir=.
12370 for ac_exec_ext in '' $ac_executable_extensions; do
12371 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12372 ac_cv_prog_efl_have_doxygen="yes"
12373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12374 break 2
12375 fi
12376done
12377 done
12378IFS=$as_save_IFS
12379
12380 test -z "$ac_cv_prog_efl_have_doxygen" && ac_cv_prog_efl_have_doxygen="no"
12381fi
12382fi
12383efl_have_doxygen=$ac_cv_prog_efl_have_doxygen
12384if test -n "$efl_have_doxygen"; then
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $efl_have_doxygen" >&5
12386$as_echo "$efl_have_doxygen" >&6; }
12387else
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12389$as_echo "no" >&6; }
12390fi
12391
12392
12393 if test "x${efl_have_doxygen}" = "xno" ; then
12394 echo "WARNING:"
12395 echo "The doxygen program you specified:"
12396 echo "${efl_doxygen}"
12397 echo "was not found. Please check the path and make sure "
12398 echo "the program exists and is executable."
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no doxygen detected. Documentation will not be built" >&5
12400$as_echo "$as_me: WARNING: no doxygen detected. Documentation will not be built" >&2;}
12401 fi
12402
12403else
12404 # Extract the first word of "${efl_doxygen}", so it can be a program name with args.
12405set dummy ${efl_doxygen}; ac_word=$2
12406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12407$as_echo_n "checking for $ac_word... " >&6; }
12408if test "${ac_cv_prog_efl_have_doxygen+set}" = set; then :
12409 $as_echo_n "(cached) " >&6
12410else
12411 if test -n "$efl_have_doxygen"; then
12412 ac_cv_prog_efl_have_doxygen="$efl_have_doxygen" # Let the user override the test.
12413else
12414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12415for as_dir in $PATH
12416do
12417 IFS=$as_save_IFS
12418 test -z "$as_dir" && as_dir=.
12419 for ac_exec_ext in '' $ac_executable_extensions; do
12420 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12421 ac_cv_prog_efl_have_doxygen="yes"
12422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12423 break 2
12424 fi
12425done
12426 done
12427IFS=$as_save_IFS
12428
12429 test -z "$ac_cv_prog_efl_have_doxygen" && ac_cv_prog_efl_have_doxygen="no"
12430fi
12431fi
12432efl_have_doxygen=$ac_cv_prog_efl_have_doxygen
12433if test -n "$efl_have_doxygen"; then
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $efl_have_doxygen" >&5
12435$as_echo "$efl_have_doxygen" >&6; }
12436else
12437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12438$as_echo "no" >&6; }
12439fi
12440
12441
12442 if test "x${efl_have_doxygen}" = "xno" ; then
12443 echo "WARNING:"
12444 echo "The doxygen program was not found in your execute path."
12445 echo "You may have doxygen installed somewhere not covered by your path."
12446 echo ""
12447 echo "If this is the case make sure you have the packages installed, AND"
12448 echo "that the doxygen program is in your execute path (see your"
12449 echo "shell manual page on setting the \$PATH environment variable), OR"
12450 echo "alternatively, specify the program to use with --with-doxygen."
12451 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no doxygen detected. Documentation will not be built" >&5
12452$as_echo "$as_me: WARNING: no doxygen detected. Documentation will not be built" >&2;}
12453 fi
12454
12455fi
12456
12457else
12458 efl_have_doxygen="no"
12459fi
12460
12461
12462
12463if ! test "x${efl_have_doxygen}" = "xyes" ; then
12464 efl_enable_doc="no"
12465fi
12466
12467 if test "x${efl_have_doxygen}" = "xyes"; then
12468 EFL_BUILD_DOC_TRUE=
12469 EFL_BUILD_DOC_FALSE='#'
12470else
12471 EFL_BUILD_DOC_TRUE='#'
12472 EFL_BUILD_DOC_FALSE=
12473fi
12474
12475
12476if test "x$efl_have_doxygen" = "xyes"; then :
12477 build_doc="yes"
12478else
12479 build_doc="no"
12480fi
12481
12482
12483### Checks for libraries
12484
12485# Evil library for compilation on Windows
12486
12487EFL_EET_BUILD=""
12488case "$host_os" in
12489 mingw*)
12490
12491pkg_failed=no
12492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5
12493$as_echo_n "checking for EVIL... " >&6; }
12494
12495if test -n "$EVIL_CFLAGS"; then
12496 pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS"
12497 elif test -n "$PKG_CONFIG"; then
12498 if test -n "$PKG_CONFIG" && \
12499 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5
12500 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5
12501 ac_status=$?
12502 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12503 test $ac_status = 0; }; then
12504 pkg_cv_EVIL_CFLAGS=`$PKG_CONFIG --cflags "evil >= 1.0.0" 2>/dev/null`
12505else
12506 pkg_failed=yes
12507fi
12508 else
12509 pkg_failed=untried
12510fi
12511if test -n "$EVIL_LIBS"; then
12512 pkg_cv_EVIL_LIBS="$EVIL_LIBS"
12513 elif test -n "$PKG_CONFIG"; then
12514 if test -n "$PKG_CONFIG" && \
12515 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5
12516 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5
12517 ac_status=$?
12518 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12519 test $ac_status = 0; }; then
12520 pkg_cv_EVIL_LIBS=`$PKG_CONFIG --libs "evil >= 1.0.0" 2>/dev/null`
12521else
12522 pkg_failed=yes
12523fi
12524 else
12525 pkg_failed=untried
12526fi
12527
12528
12529
12530if test $pkg_failed = yes; then
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12532$as_echo "no" >&6; }
12533
12534if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12535 _pkg_short_errors_supported=yes
12536else
12537 _pkg_short_errors_supported=no
12538fi
12539 if test $_pkg_short_errors_supported = yes; then
12540 EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1`
12541 else
12542 EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1`
12543 fi
12544 # Put the nasty error message in config.log where it belongs
12545 echo "$EVIL_PKG_ERRORS" >&5
12546
12547 as_fn_error $? "Package requirements (evil >= 1.0.0) were not met:
12548
12549$EVIL_PKG_ERRORS
12550
12551Consider adjusting the PKG_CONFIG_PATH environment variable if you
12552installed software in a non-standard prefix.
12553
12554Alternatively, you may set the environment variables EVIL_CFLAGS
12555and EVIL_LIBS to avoid the need to call pkg-config.
12556See the pkg-config man page for more details." "$LINENO" 5
12557elif test $pkg_failed = untried; then
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12559$as_echo "no" >&6; }
12560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12562as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
12563is in your PATH or set the PKG_CONFIG environment variable to the full
12564path to pkg-config.
12565
12566Alternatively, you may set the environment variables EVIL_CFLAGS
12567and EVIL_LIBS to avoid the need to call pkg-config.
12568See the pkg-config man page for more details.
12569
12570To get pkg-config, see <http://pkg-config.freedesktop.org/>.
12571See \`config.log' for more details" "$LINENO" 5 ; }
12572else
12573 EVIL_CFLAGS=$pkg_cv_EVIL_CFLAGS
12574 EVIL_LIBS=$pkg_cv_EVIL_LIBS
12575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12576$as_echo "yes" >&6; }
12577
12578fi
12579
12580$as_echo "#define HAVE_EVIL 1" >>confdefs.h
12581
12582 requirement_eet="evil ${requirement_eet}"
12583 EFL_EET_BUILD="-DEFL_EET_BUILD"
12584 ;;
12585esac
12586
12587
12588EET_LIBS=""
12589case "$host_os" in
12590 mingw32ce*)
12591 EET_LIBS="-lws2"
12592 ;;
12593 mingw*)
12594 EET_LIBS="-lws2_32"
12595 ;;
12596esac
12597
12598
12599# Eina library
12600
12601
12602pkg_failed=no
12603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5
12604$as_echo_n "checking for EINA... " >&6; }
12605
12606if test -n "$EINA_CFLAGS"; then
12607 pkg_cv_EINA_CFLAGS="$EINA_CFLAGS"
12608 elif test -n "$PKG_CONFIG"; then
12609 if test -n "$PKG_CONFIG" && \
12610 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.1.0\""; } >&5
12611 ($PKG_CONFIG --exists --print-errors "eina >= 1.1.0") 2>&5
12612 ac_status=$?
12613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12614 test $ac_status = 0; }; then
12615 pkg_cv_EINA_CFLAGS=`$PKG_CONFIG --cflags "eina >= 1.1.0" 2>/dev/null`
12616else
12617 pkg_failed=yes
12618fi
12619 else
12620 pkg_failed=untried
12621fi
12622if test -n "$EINA_LIBS"; then
12623 pkg_cv_EINA_LIBS="$EINA_LIBS"
12624 elif test -n "$PKG_CONFIG"; then
12625 if test -n "$PKG_CONFIG" && \
12626 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.1.0\""; } >&5
12627 ($PKG_CONFIG --exists --print-errors "eina >= 1.1.0") 2>&5
12628 ac_status=$?
12629 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12630 test $ac_status = 0; }; then
12631 pkg_cv_EINA_LIBS=`$PKG_CONFIG --libs "eina >= 1.1.0" 2>/dev/null`
12632else
12633 pkg_failed=yes
12634fi
12635 else
12636 pkg_failed=untried
12637fi
12638
12639
12640
12641if test $pkg_failed = yes; then
12642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12643$as_echo "no" >&6; }
12644
12645if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12646 _pkg_short_errors_supported=yes
12647else
12648 _pkg_short_errors_supported=no
12649fi
12650 if test $_pkg_short_errors_supported = yes; then
12651 EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.1.0" 2>&1`
12652 else
12653 EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.1.0" 2>&1`
12654 fi
12655 # Put the nasty error message in config.log where it belongs
12656 echo "$EINA_PKG_ERRORS" >&5
12657
12658 as_fn_error $? "Package requirements (eina >= 1.1.0) were not met:
12659
12660$EINA_PKG_ERRORS
12661
12662Consider adjusting the PKG_CONFIG_PATH environment variable if you
12663installed software in a non-standard prefix.
12664
12665Alternatively, you may set the environment variables EINA_CFLAGS
12666and EINA_LIBS to avoid the need to call pkg-config.
12667See the pkg-config man page for more details." "$LINENO" 5
12668elif test $pkg_failed = untried; then
12669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12673as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
12674is in your PATH or set the PKG_CONFIG environment variable to the full
12675path to pkg-config.
12676
12677Alternatively, you may set the environment variables EINA_CFLAGS
12678and EINA_LIBS to avoid the need to call pkg-config.
12679See the pkg-config man page for more details.
12680
12681To get pkg-config, see <http://pkg-config.freedesktop.org/>.
12682See \`config.log' for more details" "$LINENO" 5 ; }
12683else
12684 EINA_CFLAGS=$pkg_cv_EINA_CFLAGS
12685 EINA_LIBS=$pkg_cv_EINA_LIBS
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12687$as_echo "yes" >&6; }
12688
12689fi
12690requirement_eet="eina >= 1.1.0 ${requirement_eet}"
12691
12692# Gnutls library
12693have_gnutls="no"
12694if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
12695
12696pkg_failed=no
12697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNUTLS" >&5
12698$as_echo_n "checking for GNUTLS... " >&6; }
12699
12700if test -n "$GNUTLS_CFLAGS"; then
12701 pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS"
12702 elif test -n "$PKG_CONFIG"; then
12703 if test -n "$PKG_CONFIG" && \
12704 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 1.7.6\""; } >&5
12705 ($PKG_CONFIG --exists --print-errors "gnutls >= 1.7.6") 2>&5
12706 ac_status=$?
12707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12708 test $ac_status = 0; }; then
12709 pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 1.7.6" 2>/dev/null`
12710else
12711 pkg_failed=yes
12712fi
12713 else
12714 pkg_failed=untried
12715fi
12716if test -n "$GNUTLS_LIBS"; then
12717 pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS"
12718 elif test -n "$PKG_CONFIG"; then
12719 if test -n "$PKG_CONFIG" && \
12720 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 1.7.6\""; } >&5
12721 ($PKG_CONFIG --exists --print-errors "gnutls >= 1.7.6") 2>&5
12722 ac_status=$?
12723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12724 test $ac_status = 0; }; then
12725 pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 1.7.6" 2>/dev/null`
12726else
12727 pkg_failed=yes
12728fi
12729 else
12730 pkg_failed=untried
12731fi
12732
12733
12734
12735if test $pkg_failed = yes; then
12736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
12738
12739if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12740 _pkg_short_errors_supported=yes
12741else
12742 _pkg_short_errors_supported=no
12743fi
12744 if test $_pkg_short_errors_supported = yes; then
12745 GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls >= 1.7.6" 2>&1`
12746 else
12747 GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls >= 1.7.6" 2>&1`
12748 fi
12749 # Put the nasty error message in config.log where it belongs
12750 echo "$GNUTLS_PKG_ERRORS" >&5
12751
12752 have_gnutls="no"
12753elif test $pkg_failed = untried; then
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12755$as_echo "no" >&6; }
12756 have_gnutls="no"
12757else
12758 GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS
12759 GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12761$as_echo "yes" >&6; }
12762
12763 have_gnutls="yes"
12764 want_openssl="no"
12765
12766$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
12767
12768 requirement_eet="gnutls ${requirement_eet}"
12769
12770fi
12771 if test "x${have_gnutls}" = "xyes" ; then
12772
12773
12774# Check whether --with-libgcrypt-prefix was given.
12775if test "${with_libgcrypt_prefix+set}" = set; then :
12776 withval=$with_libgcrypt_prefix; libgcrypt_config_prefix="$withval"
12777else
12778 libgcrypt_config_prefix=""
12779fi
12780
12781
12782# Check whether --with-libgcrypt-exec-prefix was given.
12783if test "${with_libgcrypt_exec_prefix+set}" = set; then :
12784 withval=$with_libgcrypt_exec_prefix; libgcrypt_config_exec_prefix="$withval"
12785else
12786 libgcrypt_config_exec_prefix=""
12787fi
12788
12789
12790 if test x$libgcrypt_config_exec_prefix != x ; then
12791 libgcrypt_config_args="$libgcrypt_config_args --exec-prefix=$libgcrypt_config_exec_prefix"
12792 if test x${LIBGCRYPT_CONFIG+set} != xset ; then
12793 LIBGCRYPT_CONFIG=$libgcrypt_config_exec_prefix/bin/libgcrypt-config
12794 fi
12795 fi
12796 if test x$libgcrypt_config_prefix != x ; then
12797 libgcrypt_config_args="$libgcrypt_config_args --prefix=$libgcrypt_config_prefix"
12798 if test x${LIBGCRYPT_CONFIG+set} != xset ; then
12799 LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
12800 fi
12801 fi
12802
12803 # Extract the first word of "libgcrypt-config", so it can be a program name with args.
12804set dummy libgcrypt-config; ac_word=$2
12805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12806$as_echo_n "checking for $ac_word... " >&6; }
12807if test "${ac_cv_path_LIBGCRYPT_CONFIG+set}" = set; then :
12808 $as_echo_n "(cached) " >&6
12809else
12810 case $LIBGCRYPT_CONFIG in
12811 [\\/]* | ?:[\\/]*)
12812 ac_cv_path_LIBGCRYPT_CONFIG="$LIBGCRYPT_CONFIG" # Let the user override the test with a path.
12813 ;;
12814 *)
12815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12816for as_dir in $PATH
12817do
12818 IFS=$as_save_IFS
12819 test -z "$as_dir" && as_dir=.
12820 for ac_exec_ext in '' $ac_executable_extensions; do
12821 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12822 ac_cv_path_LIBGCRYPT_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12823 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12824 break 2
12825 fi
12826done
12827 done
12828IFS=$as_save_IFS
12829
12830 test -z "$ac_cv_path_LIBGCRYPT_CONFIG" && ac_cv_path_LIBGCRYPT_CONFIG="no"
12831 ;;
12832esac
12833fi
12834LIBGCRYPT_CONFIG=$ac_cv_path_LIBGCRYPT_CONFIG
12835if test -n "$LIBGCRYPT_CONFIG"; then
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPT_CONFIG" >&5
12837$as_echo "$LIBGCRYPT_CONFIG" >&6; }
12838else
12839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12840$as_echo "no" >&6; }
12841fi
12842
12843
12844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgcrypt" >&5
12845$as_echo_n "checking for libgcrypt... " >&6; }
12846 no_libgcrypt=""
12847 if test "$LIBGCRYPT_CONFIG" = "no" ; then
12848 no_libgcrypt=yes
12849 else
12850 LIBGCRYPT_CFLAGS="`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`"
12851 LIBGCRYPT_LIBS="`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`"
12852
12853 fi
12854 if test "x$no_libgcrypt" = x ; then
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12856$as_echo "yes" >&6; }
12857 have_gnutls="yes"
12858 else
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12860$as_echo "no" >&6; }
12861 if test "$LIBGCRYPT_CONFIG" = "no" ; then
12862 echo "*** The libgcrypt-config script installed by libgcrypt could not be found"
12863 echo "*** If libgcrypt was installed in PREFIX, make sure PREFIX/bin is in"
12864 echo "*** your path, or set the LIBGCRYPT_CONFIG environment variable to the"
12865 echo "*** full path to libgcrypt-config."
12866 fi
12867 LIBGCRYPT_CFLAGS=""
12868 LIBGCRYPT_LIBS=""
12869 have_gnutls="no"
12870 fi
12871
12872
12873
12874
12875
12876
12877 if test "x${have_gnutls}" = "xyes" ; then
12878 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
12879 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
12880 fi
12881 fi
12882fi
12883
12884# Openssl library
12885have_openssl="no"
12886if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
12887
12888pkg_failed=no
12889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
12890$as_echo_n "checking for OPENSSL... " >&6; }
12891
12892if test -n "$OPENSSL_CFLAGS"; then
12893 pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
12894 elif test -n "$PKG_CONFIG"; then
12895 if test -n "$PKG_CONFIG" && \
12896 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
12897 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
12898 ac_status=$?
12899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12900 test $ac_status = 0; }; then
12901 pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
12902else
12903 pkg_failed=yes
12904fi
12905 else
12906 pkg_failed=untried
12907fi
12908if test -n "$OPENSSL_LIBS"; then
12909 pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
12910 elif test -n "$PKG_CONFIG"; then
12911 if test -n "$PKG_CONFIG" && \
12912 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
12913 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
12914 ac_status=$?
12915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12916 test $ac_status = 0; }; then
12917 pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
12918else
12919 pkg_failed=yes
12920fi
12921 else
12922 pkg_failed=untried
12923fi
12924
12925
12926
12927if test $pkg_failed = yes; then
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12929$as_echo "no" >&6; }
12930
12931if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12932 _pkg_short_errors_supported=yes
12933else
12934 _pkg_short_errors_supported=no
12935fi
12936 if test $_pkg_short_errors_supported = yes; then
12937 OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "openssl" 2>&1`
12938 else
12939 OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "openssl" 2>&1`
12940 fi
12941 # Put the nasty error message in config.log where it belongs
12942 echo "$OPENSSL_PKG_ERRORS" >&5
12943
12944 have_openssl="no"
12945elif test $pkg_failed = untried; then
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12947$as_echo "no" >&6; }
12948 have_openssl="no"
12949else
12950 OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
12951 OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
12952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12953$as_echo "yes" >&6; }
12954
12955 have_openssl="yes"
12956
12957$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
12958
12959 requirement_eet="openssl ${requirement_eet}"
12960
12961fi
12962fi
12963
12964if test "x${have_gnutls}" = "xyes" ; then
12965 secure_layer="GnuTLS"
12966elif test "x${have_openssl}" = "xyes" ; then
12967 secure_layer="OpenSSL"
12968else
12969 secure_layer="no"
12970fi
12971
12972have_cipher="no"
12973if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
12974 have_cipher="yes"
12975
12976$as_echo "#define HAVE_CIPHER 1" >>confdefs.h
12977
12978elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
12979 have_cipher="yes"
12980
12981$as_echo "#define HAVE_CIPHER 1" >>confdefs.h
12982
12983fi
12984
12985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to activate cipher support in eet" >&5
12986$as_echo_n "checking whether to activate cipher support in eet... " >&6; }
12987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_cipher}" >&5
12988$as_echo "${have_cipher}" >&6; }
12989
12990have_signature="no"
12991if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
12992 have_signature="yes"
12993
12994$as_echo "#define HAVE_SIGNATURE 1" >>confdefs.h
12995
12996elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
12997 have_signature="yes"
12998
12999$as_echo "#define HAVE_SIGNATURE 1" >>confdefs.h
13000
13001fi
13002
13003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to activate signature support in eet" >&5
13004$as_echo_n "checking whether to activate signature support in eet... " >&6; }
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_signature}" >&5
13006$as_echo "${have_signature}" >&6; }
13007
13008### Checks for header files
13009
13010ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13011if test "x$ac_cv_header_zlib_h" = x""yes; then :
13012 dummy="yes"
13013else
13014 as_fn_error $? "\"Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file\"" "$LINENO" 5
13015fi
13016
13017
13018
13019ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
13020if test "x$ac_cv_header_jpeglib_h" = x""yes; then :
13021 dummy="yes"
13022else
13023 as_fn_error $? "\"Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file\"" "$LINENO" 5
13024fi
13025
13026
13027
13028for ac_header in netinet/in.h unistd.h
13029do :
13030 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13031ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13032if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13033 cat >>confdefs.h <<_ACEOF
13034#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13035_ACEOF
13036
13037fi
13038
13039done
13040
13041
13042
13043default_max="4096"
13044ac_ext=c
13045ac_cpp='$CPP $CPPFLAGS'
13046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13048ac_compiler_gnu=$ac_cv_c_compiler_gnu
13049
13050
13051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX in limits.h" >&5
13052$as_echo_n "checking for PATH_MAX in limits.h... " >&6; }
13053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13054/* end confdefs.h. */
13055
13056#include <limits.h>
13057
13058int
13059main ()
13060{
13061
13062int i = PATH_MAX;
13063
13064 ;
13065 return 0;
13066}
13067_ACEOF
13068if ac_fn_c_try_compile "$LINENO"; then :
13069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13070$as_echo "yes" >&6; }
13071else
13072
13073
13074cat >>confdefs.h <<_ACEOF
13075#define PATH_MAX ${default_max}
13076_ACEOF
13077
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: using ${default_max}" >&5
13079$as_echo "no: using ${default_max}" >&6; }
13080
13081fi
13082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13083
13084ac_ext=c
13085ac_cpp='$CPP $CPPFLAGS'
13086ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13087ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13088ac_compiler_gnu=$ac_cv_c_compiler_gnu
13089
13090
13091
13092
13093### Checks for types
13094
13095
13096### Checks for structures
13097
13098
13099### Checks for compiler characteristics
13100if test "x$CC" != xcc; then
13101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
13102$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
13103else
13104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
13105$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
13106fi
13107set dummy $CC; ac_cc=`$as_echo "$2" |
13108 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
13109if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
13110 $as_echo_n "(cached) " >&6
13111else
13112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13113/* end confdefs.h. */
13114
13115int
13116main ()
13117{
13118
13119 ;
13120 return 0;
13121}
13122_ACEOF
13123# Make sure it works both with $CC and with simple cc.
13124# We do the test twice because some compilers refuse to overwrite an
13125# existing .o file with -o, though they will create one.
13126ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13127rm -f conftest2.*
13128if { { case "(($ac_try" in
13129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13130 *) ac_try_echo=$ac_try;;
13131esac
13132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13133$as_echo "$ac_try_echo"; } >&5
13134 (eval "$ac_try") 2>&5
13135 ac_status=$?
13136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13137 test $ac_status = 0; } &&
13138 test -f conftest2.$ac_objext && { { case "(($ac_try" in
13139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13140 *) ac_try_echo=$ac_try;;
13141esac
13142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13143$as_echo "$ac_try_echo"; } >&5
13144 (eval "$ac_try") 2>&5
13145 ac_status=$?
13146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13147 test $ac_status = 0; };
13148then
13149 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
13150 if test "x$CC" != xcc; then
13151 # Test first that cc exists at all.
13152 if { ac_try='cc -c conftest.$ac_ext >&5'
13153 { { case "(($ac_try" in
13154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13155 *) ac_try_echo=$ac_try;;
13156esac
13157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13158$as_echo "$ac_try_echo"; } >&5
13159 (eval "$ac_try") 2>&5
13160 ac_status=$?
13161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13162 test $ac_status = 0; }; }; then
13163 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13164 rm -f conftest2.*
13165 if { { case "(($ac_try" in
13166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13167 *) ac_try_echo=$ac_try;;
13168esac
13169eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13170$as_echo "$ac_try_echo"; } >&5
13171 (eval "$ac_try") 2>&5
13172 ac_status=$?
13173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13174 test $ac_status = 0; } &&
13175 test -f conftest2.$ac_objext && { { case "(($ac_try" in
13176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13177 *) ac_try_echo=$ac_try;;
13178esac
13179eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13180$as_echo "$ac_try_echo"; } >&5
13181 (eval "$ac_try") 2>&5
13182 ac_status=$?
13183 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13184 test $ac_status = 0; };
13185 then
13186 # cc works too.
13187 :
13188 else
13189 # cc exists but doesn't like -o.
13190 eval ac_cv_prog_cc_${ac_cc}_c_o=no
13191 fi
13192 fi
13193 fi
13194else
13195 eval ac_cv_prog_cc_${ac_cc}_c_o=no
13196fi
13197rm -f core conftest*
13198
13199fi
13200if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
13201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13202$as_echo "yes" >&6; }
13203else
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13205$as_echo "no" >&6; }
13206
13207$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
13208
13209fi
13210
13211# FIXME: we rely on the cache variable name because
13212# there is no other way.
13213set dummy $CC
13214am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
13215eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
13216if test "$am_t" != yes; then
13217 # Losing compiler, so override with the script.
13218 # FIXME: It is wrong to rewrite CC.
13219 # But if we don't then we get into trouble of one sort or another.
13220 # A longer-term fix would be to have automake use am__CC in this case,
13221 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
13222 CC="$am_aux_dir/compile $CC"
13223fi
13224
13225
13226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13227$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
13228if test "${ac_cv_c_const+set}" = set; then :
13229 $as_echo_n "(cached) " >&6
13230else
13231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13232/* end confdefs.h. */
13233
13234int
13235main ()
13236{
13237/* FIXME: Include the comments suggested by Paul. */
13238#ifndef __cplusplus
13239 /* Ultrix mips cc rejects this. */
13240 typedef int charset[2];
13241 const charset cs;
13242 /* SunOS 4.1.1 cc rejects this. */
13243 char const *const *pcpcc;
13244 char **ppc;
13245 /* NEC SVR4.0.2 mips cc rejects this. */
13246 struct point {int x, y;};
13247 static struct point const zero = {0,0};
13248 /* AIX XL C 1.02.0.0 rejects this.
13249 It does not let you subtract one const X* pointer from another in
13250 an arm of an if-expression whose if-part is not a constant
13251 expression */
13252 const char *g = "string";
13253 pcpcc = &g + (g ? g-g : 0);
13254 /* HPUX 7.0 cc rejects these. */
13255 ++pcpcc;
13256 ppc = (char**) pcpcc;
13257 pcpcc = (char const *const *) ppc;
13258 { /* SCO 3.2v4 cc rejects this. */
13259 char *t;
13260 char const *s = 0 ? (char *) 0 : (char const *) 0;
13261
13262 *t++ = 0;
13263 if (s) return 0;
13264 }
13265 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13266 int x[] = {25, 17};
13267 const int *foo = &x[0];
13268 ++foo;
13269 }
13270 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13271 typedef const int *iptr;
13272 iptr p = 0;
13273 ++p;
13274 }
13275 { /* AIX XL C 1.02.0.0 rejects this saying
13276 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13277 struct s { int j; const int *ap[3]; };
13278 struct s *b; b->j = 5;
13279 }
13280 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13281 const int foo = 10;
13282 if (!foo) return 0;
13283 }
13284 return !cs[0] && !zero.x;
13285#endif
13286
13287 ;
13288 return 0;
13289}
13290_ACEOF
13291if ac_fn_c_try_compile "$LINENO"; then :
13292 ac_cv_c_const=yes
13293else
13294 ac_cv_c_const=no
13295fi
13296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297fi
13298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13299$as_echo "$ac_cv_c_const" >&6; }
13300if test $ac_cv_c_const = no; then
13301
13302$as_echo "#define const /**/" >>confdefs.h
13303
13304fi
13305
13306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13307$as_echo_n "checking for inline... " >&6; }
13308if test "${ac_cv_c_inline+set}" = set; then :
13309 $as_echo_n "(cached) " >&6
13310else
13311 ac_cv_c_inline=no
13312for ac_kw in inline __inline__ __inline; do
13313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13314/* end confdefs.h. */
13315#ifndef __cplusplus
13316typedef int foo_t;
13317static $ac_kw foo_t static_foo () {return 0; }
13318$ac_kw foo_t foo () {return 0; }
13319#endif
13320
13321_ACEOF
13322if ac_fn_c_try_compile "$LINENO"; then :
13323 ac_cv_c_inline=$ac_kw
13324fi
13325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13326 test "$ac_cv_c_inline" != no && break
13327done
13328
13329fi
13330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13331$as_echo "$ac_cv_c_inline" >&6; }
13332
13333case $ac_cv_c_inline in
13334 inline | yes) ;;
13335 *)
13336 case $ac_cv_c_inline in
13337 no) ac_val=;;
13338 *) ac_val=$ac_cv_c_inline;;
13339 esac
13340 cat >>confdefs.h <<_ACEOF
13341#ifndef __cplusplus
13342#define inline $ac_val
13343#endif
13344_ACEOF
13345 ;;
13346esac
13347
13348 case $ac_cv_prog_cc_stdc in #(
13349 no) :
13350 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
13351 *) :
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
13353$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
13354if test "${ac_cv_prog_cc_c99+set}" = set; then :
13355 $as_echo_n "(cached) " >&6
13356else
13357 ac_cv_prog_cc_c99=no
13358ac_save_CC=$CC
13359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13360/* end confdefs.h. */
13361#include <stdarg.h>
13362#include <stdbool.h>
13363#include <stdlib.h>
13364#include <wchar.h>
13365#include <stdio.h>
13366
13367// Check varargs macros. These examples are taken from C99 6.10.3.5.
13368#define debug(...) fprintf (stderr, __VA_ARGS__)
13369#define showlist(...) puts (#__VA_ARGS__)
13370#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
13371static void
13372test_varargs_macros (void)
13373{
13374 int x = 1234;
13375 int y = 5678;
13376 debug ("Flag");
13377 debug ("X = %d\n", x);
13378 showlist (The first, second, and third items.);
13379 report (x>y, "x is %d but y is %d", x, y);
13380}
13381
13382// Check long long types.
13383#define BIG64 18446744073709551615ull
13384#define BIG32 4294967295ul
13385#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
13386#if !BIG_OK
13387 your preprocessor is broken;
13388#endif
13389#if BIG_OK
13390#else
13391 your preprocessor is broken;
13392#endif
13393static long long int bignum = -9223372036854775807LL;
13394static unsigned long long int ubignum = BIG64;
13395
13396struct incomplete_array
13397{
13398 int datasize;
13399 double data[];
13400};
13401
13402struct named_init {
13403 int number;
13404 const wchar_t *name;
13405 double average;
13406};
13407
13408typedef const char *ccp;
13409
13410static inline int
13411test_restrict (ccp restrict text)
13412{
13413 // See if C++-style comments work.
13414 // Iterate through items via the restricted pointer.
13415 // Also check for declarations in for loops.
13416 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
13417 continue;
13418 return 0;
13419}
13420
13421// Check varargs and va_copy.
13422static void
13423test_varargs (const char *format, ...)
13424{
13425 va_list args;
13426 va_start (args, format);
13427 va_list args_copy;
13428 va_copy (args_copy, args);
13429
13430 const char *str;
13431 int number;
13432 float fnumber;
13433
13434 while (*format)
13435 {
13436 switch (*format++)
13437 {
13438 case 's': // string
13439 str = va_arg (args_copy, const char *);
13440 break;
13441 case 'd': // int
13442 number = va_arg (args_copy, int);
13443 break;
13444 case 'f': // float
13445 fnumber = va_arg (args_copy, double);
13446 break;
13447 default:
13448 break;
13449 }
13450 }
13451 va_end (args_copy);
13452 va_end (args);
13453}
13454
13455int
13456main ()
13457{
13458
13459 // Check bool.
13460 _Bool success = false;
13461
13462 // Check restrict.
13463 if (test_restrict ("String literal") == 0)
13464 success = true;
13465 char *restrict newvar = "Another string";
13466
13467 // Check varargs.
13468 test_varargs ("s, d' f .", "string", 65, 34.234);
13469 test_varargs_macros ();
13470
13471 // Check flexible array members.
13472 struct incomplete_array *ia =
13473 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
13474 ia->datasize = 10;
13475 for (int i = 0; i < ia->datasize; ++i)
13476 ia->data[i] = i * 1.234;
13477
13478 // Check named initializers.
13479 struct named_init ni = {
13480 .number = 34,
13481 .name = L"Test wide string",
13482 .average = 543.34343,
13483 };
13484
13485 ni.number = 58;
13486
13487 int dynamic_array[ni.number];
13488 dynamic_array[ni.number - 1] = 543;
13489
13490 // work around unused variable warnings
13491 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
13492 || dynamic_array[ni.number - 1] != 543);
13493
13494 ;
13495 return 0;
13496}
13497_ACEOF
13498for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
13499do
13500 CC="$ac_save_CC $ac_arg"
13501 if ac_fn_c_try_compile "$LINENO"; then :
13502 ac_cv_prog_cc_c99=$ac_arg
13503fi
13504rm -f core conftest.err conftest.$ac_objext
13505 test "x$ac_cv_prog_cc_c99" != "xno" && break
13506done
13507rm -f conftest.$ac_ext
13508CC=$ac_save_CC
13509
13510fi
13511# AC_CACHE_VAL
13512case "x$ac_cv_prog_cc_c99" in
13513 x)
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
13515$as_echo "none needed" >&6; } ;;
13516 xno)
13517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
13518$as_echo "unsupported" >&6; } ;;
13519 *)
13520 CC="$CC $ac_cv_prog_cc_c99"
13521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
13522$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
13523esac
13524if test "x$ac_cv_prog_cc_c99" != xno; then :
13525 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
13526else
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
13528$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
13529if test "${ac_cv_prog_cc_c89+set}" = set; then :
13530 $as_echo_n "(cached) " >&6
13531else
13532 ac_cv_prog_cc_c89=no
13533ac_save_CC=$CC
13534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13535/* end confdefs.h. */
13536#include <stdarg.h>
13537#include <stdio.h>
13538#include <sys/types.h>
13539#include <sys/stat.h>
13540/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13541struct buf { int x; };
13542FILE * (*rcsopen) (struct buf *, struct stat *, int);
13543static char *e (p, i)
13544 char **p;
13545 int i;
13546{
13547 return p[i];
13548}
13549static char *f (char * (*g) (char **, int), char **p, ...)
13550{
13551 char *s;
13552 va_list v;
13553 va_start (v,p);
13554 s = g (p, va_arg (v,int));
13555 va_end (v);
13556 return s;
13557}
13558
13559/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
13560 function prototypes and stuff, but not '\xHH' hex character constants.
13561 These don't provoke an error unfortunately, instead are silently treated
13562 as 'x'. The following induces an error, until -std is added to get
13563 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
13564 array size at least. It's necessary to write '\x00'==0 to get something
13565 that's true only with -std. */
13566int osf4_cc_array ['\x00' == 0 ? 1 : -1];
13567
13568/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
13569 inside strings and character constants. */
13570#define FOO(x) 'x'
13571int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
13572
13573int test (int i, double x);
13574struct s1 {int (*f) (int a);};
13575struct s2 {int (*f) (double a);};
13576int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13577int argc;
13578char **argv;
13579int
13580main ()
13581{
13582return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13583 ;
13584 return 0;
13585}
13586_ACEOF
13587for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
13588 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13589do
13590 CC="$ac_save_CC $ac_arg"
13591 if ac_fn_c_try_compile "$LINENO"; then :
13592 ac_cv_prog_cc_c89=$ac_arg
13593fi
13594rm -f core conftest.err conftest.$ac_objext
13595 test "x$ac_cv_prog_cc_c89" != "xno" && break
13596done
13597rm -f conftest.$ac_ext
13598CC=$ac_save_CC
13599
13600fi
13601# AC_CACHE_VAL
13602case "x$ac_cv_prog_cc_c89" in
13603 x)
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
13605$as_echo "none needed" >&6; } ;;
13606 xno)
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
13608$as_echo "unsupported" >&6; } ;;
13609 *)
13610 CC="$CC $ac_cv_prog_cc_c89"
13611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
13612$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
13613esac
13614if test "x$ac_cv_prog_cc_c89" != xno; then :
13615 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
13616else
13617 ac_cv_prog_cc_stdc=no
13618fi
13619
13620fi
13621 ;;
13622esac
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
13624$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
13625 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
13626 $as_echo_n "(cached) " >&6
13627fi
13628
13629 case $ac_cv_prog_cc_stdc in #(
13630 no) :
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
13632$as_echo "unsupported" >&6; } ;; #(
13633 '') :
13634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
13635$as_echo "none needed" >&6; } ;; #(
13636 *) :
13637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
13638$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
13639esac
13640
13641
13642
13643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
13644$as_echo_n "checking for __attribute__... " >&6; }
13645
13646if test "${ac_cv___attribute__+set}" = set; then :
13647 $as_echo_n "(cached) " >&6
13648else
13649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13650/* end confdefs.h. */
13651
13652#include <stdlib.h>
13653
13654int func(int x);
13655int foo(int x __attribute__ ((unused)))
13656{
13657 exit(1);
13658}
13659
13660int
13661main ()
13662{
13663
13664 ;
13665 return 0;
13666}
13667_ACEOF
13668if ac_fn_c_try_compile "$LINENO"; then :
13669 ac_cv___attribute__="yes"
13670else
13671 ac_cv___attribute__="no"
13672
13673fi
13674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13675fi
13676
13677
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
13679$as_echo "$ac_cv___attribute__" >&6; }
13680
13681if test "x${ac_cv___attribute__}" = "xyes" ; then
13682
13683$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
13684
13685
13686$as_echo "#define __UNUSED__ __attribute__((unused))" >>confdefs.h
13687
13688 else
13689
13690$as_echo "#define __UNUSED__ /**/" >>confdefs.h
13691
13692fi
13693
13694
13695
13696# Check whether the null pointer is zero on this arch
13697if test "$cross_compiling" = yes; then :
13698
13699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot check when cross-compiling -- assuming null is okay" >&5
13700$as_echo "$as_me: WARNING: Cannot check when cross-compiling -- assuming null is okay" >&2;}
13701 have_null="yes"
13702
13703else
13704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13705/* end confdefs.h. */
13706
13707#include <stdlib.h>
13708#include <inttypes.h>
13709int main (int argc, char **argv) {
13710 void *foo = NULL;
13711 uintptr_t bar = (uintptr_t)foo;
13712 return (uintptr_t)foo;
13713}
13714
13715_ACEOF
13716if ac_fn_c_try_run "$LINENO"; then :
13717 have_null="yes"
13718else
13719 have_null="no"
13720fi
13721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13722 conftest.$ac_objext conftest.beam conftest.$ac_ext
13723fi
13724
13725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking value of the null pointer" >&5
13726$as_echo_n "checking value of the null pointer... " >&6; }
13727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_null}" >&5
13728$as_echo "${have_null}" >&6; }
13729
13730if test ! "x${have_null}" = "xyes" ; then
13731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your system is a bit too funny, eet might not work properly" >&5
13732$as_echo "$as_me: WARNING: Your system is a bit too funny, eet might not work properly" >&2;}
13733fi
13734
13735# These are needed for fmemopen/open_memstream
13736
13737$as_echo "#define _GNU_SOURCE /**/" >>confdefs.h
13738
13739
13740EET_CPPFLAGS=""
13741EET_CFLAGS=""
13742case "$host_os" in
13743 mingw32ce*)
13744 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
13745 ;;
13746 mingw*)
13747 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
13748 ;;
13749esac
13750
13751
13752
13753
13754### Checks for linker characteristics
13755
13756# use --enable-auto-import on Windows
13757
13758lt_enable_auto_import=""
13759case "$host_os" in
13760 mingw*)
13761 lt_enable_auto_import="-Wl,--enable-auto-import"
13762 ;;
13763esac
13764
13765
13766case "${host_os}" in
13767 openbsd*)
13768 ;;
13769 *)
13770
13771
13772CFLAGS_save="${CFLAGS}"
13773CFLAGS="${CFLAGS} -Wl,--as-needed"
13774
13775ac_ext=c
13776ac_cpp='$CPP $CPPFLAGS'
13777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13779ac_compiler_gnu=$ac_cv_c_compiler_gnu
13780
13781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,--as-needed" >&5
13782$as_echo_n "checking whether the compiler supports -Wl,--as-needed... " >&6; }
13783
13784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785/* end confdefs.h. */
13786
13787int
13788main ()
13789{
13790
13791 ;
13792 return 0;
13793}
13794_ACEOF
13795if ac_fn_c_try_link "$LINENO"; then :
13796 have_flag="yes"
13797else
13798 have_flag="no"
13799fi
13800rm -f core conftest.err conftest.$ac_objext \
13801 conftest$ac_exeext conftest.$ac_ext
13802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_flag}" >&5
13803$as_echo "${have_flag}" >&6; }
13804
13805if test "x${have_flag}" = "xno" ; then
13806 CFLAGS="${CFLAGS_save}"
13807fi
13808ac_ext=c
13809ac_cpp='$CPP $CPPFLAGS'
13810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13812ac_compiler_gnu=$ac_cv_c_compiler_gnu
13813
13814
13815
13816 ;;
13817esac
13818
13819
13820### Checks for library functions
13821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
13822$as_echo_n "checking for library containing strerror... " >&6; }
13823if test "${ac_cv_search_strerror+set}" = set; then :
13824 $as_echo_n "(cached) " >&6
13825else
13826 ac_func_search_save_LIBS=$LIBS
13827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13828/* end confdefs.h. */
13829
13830/* Override any GCC internal prototype to avoid an error.
13831 Use char because int might match the return type of a GCC
13832 builtin and then its argument prototype would still apply. */
13833#ifdef __cplusplus
13834extern "C"
13835#endif
13836char strerror ();
13837int
13838main ()
13839{
13840return strerror ();
13841 ;
13842 return 0;
13843}
13844_ACEOF
13845for ac_lib in '' cposix; do
13846 if test -z "$ac_lib"; then
13847 ac_res="none required"
13848 else
13849 ac_res=-l$ac_lib
13850 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13851 fi
13852 if ac_fn_c_try_link "$LINENO"; then :
13853 ac_cv_search_strerror=$ac_res
13854fi
13855rm -f core conftest.err conftest.$ac_objext \
13856 conftest$ac_exeext
13857 if test "${ac_cv_search_strerror+set}" = set; then :
13858 break
13859fi
13860done
13861if test "${ac_cv_search_strerror+set}" = set; then :
13862
13863else
13864 ac_cv_search_strerror=no
13865fi
13866rm conftest.$ac_ext
13867LIBS=$ac_func_search_save_LIBS
13868fi
13869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
13870$as_echo "$ac_cv_search_strerror" >&6; }
13871ac_res=$ac_cv_search_strerror
13872if test "$ac_res" != no; then :
13873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13874
13875fi
13876
13877# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13878# for constant arguments. Useless!
13879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13880$as_echo_n "checking for working alloca.h... " >&6; }
13881if test "${ac_cv_working_alloca_h+set}" = set; then :
13882 $as_echo_n "(cached) " >&6
13883else
13884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13885/* end confdefs.h. */
13886#include <alloca.h>
13887int
13888main ()
13889{
13890char *p = (char *) alloca (2 * sizeof (int));
13891 if (p) return 0;
13892 ;
13893 return 0;
13894}
13895_ACEOF
13896if ac_fn_c_try_link "$LINENO"; then :
13897 ac_cv_working_alloca_h=yes
13898else
13899 ac_cv_working_alloca_h=no
13900fi
13901rm -f core conftest.err conftest.$ac_objext \
13902 conftest$ac_exeext conftest.$ac_ext
13903fi
13904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13905$as_echo "$ac_cv_working_alloca_h" >&6; }
13906if test $ac_cv_working_alloca_h = yes; then
13907
13908$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13909
13910fi
13911
13912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13913$as_echo_n "checking for alloca... " >&6; }
13914if test "${ac_cv_func_alloca_works+set}" = set; then :
13915 $as_echo_n "(cached) " >&6
13916else
13917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13918/* end confdefs.h. */
13919#ifdef __GNUC__
13920# define alloca __builtin_alloca
13921#else
13922# ifdef _MSC_VER
13923# include <malloc.h>
13924# define alloca _alloca
13925# else
13926# ifdef HAVE_ALLOCA_H
13927# include <alloca.h>
13928# else
13929# ifdef _AIX
13930 #pragma alloca
13931# else
13932# ifndef alloca /* predefined by HP cc +Olibcalls */
13933char *alloca ();
13934# endif
13935# endif
13936# endif
13937# endif
13938#endif
13939
13940int
13941main ()
13942{
13943char *p = (char *) alloca (1);
13944 if (p) return 0;
13945 ;
13946 return 0;
13947}
13948_ACEOF
13949if ac_fn_c_try_link "$LINENO"; then :
13950 ac_cv_func_alloca_works=yes
13951else
13952 ac_cv_func_alloca_works=no
13953fi
13954rm -f core conftest.err conftest.$ac_objext \
13955 conftest$ac_exeext conftest.$ac_ext
13956fi
13957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13958$as_echo "$ac_cv_func_alloca_works" >&6; }
13959
13960if test $ac_cv_func_alloca_works = yes; then
13961
13962$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13963
13964else
13965 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13966# that cause trouble. Some versions do not even contain alloca or
13967# contain a buggy version. If you still want to use their alloca,
13968# use ar to extract alloca.o from them instead of compiling alloca.c.
13969
13970ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13971
13972$as_echo "#define C_ALLOCA 1" >>confdefs.h
13973
13974
13975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13976$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13977if test "${ac_cv_os_cray+set}" = set; then :
13978 $as_echo_n "(cached) " >&6
13979else
13980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13981/* end confdefs.h. */
13982#if defined CRAY && ! defined CRAY2
13983webecray
13984#else
13985wenotbecray
13986#endif
13987
13988_ACEOF
13989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13990 $EGREP "webecray" >/dev/null 2>&1; then :
13991 ac_cv_os_cray=yes
13992else
13993 ac_cv_os_cray=no
13994fi
13995rm -f conftest*
13996
13997fi
13998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13999$as_echo "$ac_cv_os_cray" >&6; }
14000if test $ac_cv_os_cray = yes; then
14001 for ac_func in _getb67 GETB67 getb67; do
14002 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14003ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14004if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14005
14006cat >>confdefs.h <<_ACEOF
14007#define CRAY_STACKSEG_END $ac_func
14008_ACEOF
14009
14010 break
14011fi
14012
14013 done
14014fi
14015
14016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
14017$as_echo_n "checking stack direction for C alloca... " >&6; }
14018if test "${ac_cv_c_stack_direction+set}" = set; then :
14019 $as_echo_n "(cached) " >&6
14020else
14021 if test "$cross_compiling" = yes; then :
14022 ac_cv_c_stack_direction=0
14023else
14024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14025/* end confdefs.h. */
14026$ac_includes_default
14027int
14028find_stack_direction ()
14029{
14030 static char *addr = 0;
14031 auto char dummy;
14032 if (addr == 0)
14033 {
14034 addr = &dummy;
14035 return find_stack_direction ();
14036 }
14037 else
14038 return (&dummy > addr) ? 1 : -1;
14039}
14040
14041int
14042main ()
14043{
14044 return find_stack_direction () < 0;
14045}
14046_ACEOF
14047if ac_fn_c_try_run "$LINENO"; then :
14048 ac_cv_c_stack_direction=1
14049else
14050 ac_cv_c_stack_direction=-1
14051fi
14052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14053 conftest.$ac_objext conftest.beam conftest.$ac_ext
14054fi
14055
14056fi
14057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
14058$as_echo "$ac_cv_c_stack_direction" >&6; }
14059cat >>confdefs.h <<_ACEOF
14060#define STACK_DIRECTION $ac_cv_c_stack_direction
14061_ACEOF
14062
14063
14064fi
14065
14066
14067for ac_func in fmemopen open_memstream realpath
14068do :
14069 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14070ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14071if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14072 cat >>confdefs.h <<_ACEOF
14073#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14074_ACEOF
14075
14076fi
14077done
14078
14079
14080
14081
14082ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
14083if test "x$ac_cv_header_fnmatch_h" = x""yes; then :
14084 _efl_have_fnmatch="yes"
14085else
14086 _efl_have_fnmatch="no"
14087fi
14088
14089
14090
14091if test "x${_efl_have_fnmatch}" = "xyes" ; then
14092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fnmatch" >&5
14093$as_echo_n "checking for library containing fnmatch... " >&6; }
14094if test "${ac_cv_search_fnmatch+set}" = set; then :
14095 $as_echo_n "(cached) " >&6
14096else
14097 ac_func_search_save_LIBS=$LIBS
14098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14099/* end confdefs.h. */
14100
14101/* Override any GCC internal prototype to avoid an error.
14102 Use char because int might match the return type of a GCC
14103 builtin and then its argument prototype would still apply. */
14104#ifdef __cplusplus
14105extern "C"
14106#endif
14107char fnmatch ();
14108int
14109main ()
14110{
14111return fnmatch ();
14112 ;
14113 return 0;
14114}
14115_ACEOF
14116for ac_lib in '' fnmatch evil iberty; do
14117 if test -z "$ac_lib"; then
14118 ac_res="none required"
14119 else
14120 ac_res=-l$ac_lib
14121 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14122 fi
14123 if ac_fn_c_try_link "$LINENO"; then :
14124 ac_cv_search_fnmatch=$ac_res
14125fi
14126rm -f core conftest.err conftest.$ac_objext \
14127 conftest$ac_exeext
14128 if test "${ac_cv_search_fnmatch+set}" = set; then :
14129 break
14130fi
14131done
14132if test "${ac_cv_search_fnmatch+set}" = set; then :
14133
14134else
14135 ac_cv_search_fnmatch=no
14136fi
14137rm conftest.$ac_ext
14138LIBS=$ac_func_search_save_LIBS
14139fi
14140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fnmatch" >&5
14141$as_echo "$ac_cv_search_fnmatch" >&6; }
14142ac_res=$ac_cv_search_fnmatch
14143if test "$ac_res" != no; then :
14144 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14145 _efl_have_fnmatch="yes"
14146else
14147 _efl_have_fnmatch="no"
14148fi
14149
14150fi
14151
14152EFL_FNMATCH_LIBS=""
14153
14154if (! test "x${ac_cv_search_fnmatch}" = "xnone required") && (! test "x${ac_cv_search_fnmatch}" = "xno") && (! test "x${ac_cv_search_fnmatch}" = "x-levil") ; then
14155 EFL_FNMATCH_LIBS=${ac_cv_search_fnmatch}
14156fi
14157
14158
14159
14160if test "x$_efl_have_fnmatch" = "xyes"; then :
14161
14162else
14163 as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5
14164fi
14165
14166
14167
14168
14169
14170
14171ac_config_files="$ac_config_files Makefile eet.pc doc/Makefile doc/Doxyfile doc/eet.dox src/Makefile src/lib/Makefile src/bin/Makefile src/tests/Makefile src/examples/Makefile eet.spec"
14172
14173cat >confcache <<\_ACEOF
14174# This file is a shell script that caches the results of configure
14175# tests run on this system so they can be shared between configure
14176# scripts and configure runs, see configure's option --config-cache.
14177# It is not useful on other systems. If it contains results you don't
14178# want to keep, you may remove or edit it.
14179#
14180# config.status only pays attention to the cache file if you give it
14181# the --recheck option to rerun configure.
14182#
14183# `ac_cv_env_foo' variables (set or unset) will be overridden when
14184# loading this file, other *unset* `ac_cv_foo' will be assigned the
14185# following values.
14186
14187_ACEOF
14188
14189# The following way of writing the cache mishandles newlines in values,
14190# but we know of no workaround that is simple, portable, and efficient.
14191# So, we kill variables containing newlines.
14192# Ultrix sh set writes to stderr and can't be redirected directly,
14193# and sets the high bit in the cache file unless we assign to the vars.
14194(
14195 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14196 eval ac_val=\$$ac_var
14197 case $ac_val in #(
14198 *${as_nl}*)
14199 case $ac_var in #(
14200 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14201$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14202 esac
14203 case $ac_var in #(
14204 _ | IFS | as_nl) ;; #(
14205 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14206 *) { eval $ac_var=; unset $ac_var;} ;;
14207 esac ;;
14208 esac
14209 done
14210
14211 (set) 2>&1 |
14212 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14213 *${as_nl}ac_space=\ *)
14214 # `set' does not quote correctly, so add quotes: double-quote
14215 # substitution turns \\\\ into \\, and sed turns \\ into \.
14216 sed -n \
14217 "s/'/'\\\\''/g;
14218 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14219 ;; #(
14220 *)
14221 # `set' quotes correctly as required by POSIX, so do not add quotes.
14222 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14223 ;;
14224 esac |
14225 sort
14226) |
14227 sed '
14228 /^ac_cv_env_/b end
14229 t clear
14230 :clear
14231 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14232 t end
14233 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14234 :end' >>confcache
14235if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14236 if test -w "$cache_file"; then
14237 test "x$cache_file" != "x/dev/null" &&
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14239$as_echo "$as_me: updating cache $cache_file" >&6;}
14240 cat confcache >$cache_file
14241 else
14242 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14243$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14244 fi
14245fi
14246rm -f confcache
14247
14248test "x$prefix" = xNONE && prefix=$ac_default_prefix
14249# Let make expand exec_prefix.
14250test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14251
14252DEFS=-DHAVE_CONFIG_H
14253
14254ac_libobjs=
14255ac_ltlibobjs=
14256U=
14257for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14258 # 1. Remove the extension, and $U if already installed.
14259 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14260 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14261 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14262 # will be set to the directory where LIBOBJS objects are built.
14263 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14264 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14265done
14266LIBOBJS=$ac_libobjs
14267
14268LTLIBOBJS=$ac_ltlibobjs
14269
14270
14271 if test -n "$EXEEXT"; then
14272 am__EXEEXT_TRUE=
14273 am__EXEEXT_FALSE='#'
14274else
14275 am__EXEEXT_TRUE='#'
14276 am__EXEEXT_FALSE=
14277fi
14278
14279if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
14280 as_fn_error $? "conditional \"AMDEP\" was never defined.
14281Usually this means the macro was only invoked conditionally." "$LINENO" 5
14282fi
14283if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14284 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
14285Usually this means the macro was only invoked conditionally." "$LINENO" 5
14286fi
14287if test -z "${EET_AMALGAMATION_TRUE}" && test -z "${EET_AMALGAMATION_FALSE}"; then
14288 as_fn_error $? "conditional \"EET_AMALGAMATION\" was never defined.
14289Usually this means the macro was only invoked conditionally." "$LINENO" 5
14290fi
14291if test -z "${BUILD_EET_TRUE}" && test -z "${BUILD_EET_FALSE}"; then
14292 as_fn_error $? "conditional \"BUILD_EET\" was never defined.
14293Usually this means the macro was only invoked conditionally." "$LINENO" 5
14294fi
14295if test -z "${INSTALL_EXAMPLES_TRUE}" && test -z "${INSTALL_EXAMPLES_FALSE}"; then
14296 as_fn_error $? "conditional \"INSTALL_EXAMPLES\" was never defined.
14297Usually this means the macro was only invoked conditionally." "$LINENO" 5
14298fi
14299if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then
14300 as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined.
14301Usually this means the macro was only invoked conditionally." "$LINENO" 5
14302fi
14303if test -z "${EFL_ENABLE_TESTS_TRUE}" && test -z "${EFL_ENABLE_TESTS_FALSE}"; then
14304 as_fn_error $? "conditional \"EFL_ENABLE_TESTS\" was never defined.
14305Usually this means the macro was only invoked conditionally." "$LINENO" 5
14306fi
14307if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then
14308 as_fn_error $? "conditional \"EFL_ENABLE_COVERAGE\" was never defined.
14309Usually this means the macro was only invoked conditionally." "$LINENO" 5
14310fi
14311if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14312 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
14313Usually this means the macro was only invoked conditionally." "$LINENO" 5
14314fi
14315if test -z "${EFL_BUILD_DOC_TRUE}" && test -z "${EFL_BUILD_DOC_FALSE}"; then
14316 as_fn_error $? "conditional \"EFL_BUILD_DOC\" was never defined.
14317Usually this means the macro was only invoked conditionally." "$LINENO" 5
14318fi
14319
14320: ${CONFIG_STATUS=./config.status}
14321ac_write_fail=0
14322ac_clean_files_save=$ac_clean_files
14323ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14324{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14325$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14326as_write_fail=0
14327cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14328#! $SHELL
14329# Generated by $as_me.
14330# Run this file to recreate the current configuration.
14331# Compiler output produced by configure, useful for debugging
14332# configure, is in config.log if it exists.
14333
14334debug=false
14335ac_cs_recheck=false
14336ac_cs_silent=false
14337
14338SHELL=\${CONFIG_SHELL-$SHELL}
14339export SHELL
14340_ASEOF
14341cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14342## -------------------- ##
14343## M4sh Initialization. ##
14344## -------------------- ##
14345
14346# Be more Bourne compatible
14347DUALCASE=1; export DUALCASE # for MKS sh
14348if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14349 emulate sh
14350 NULLCMD=:
14351 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14352 # is contrary to our usage. Disable this feature.
14353 alias -g '${1+"$@"}'='"$@"'
14354 setopt NO_GLOB_SUBST
14355else
14356 case `(set -o) 2>/dev/null` in #(
14357 *posix*) :
14358 set -o posix ;; #(
14359 *) :
14360 ;;
14361esac
14362fi
14363
14364
14365as_nl='
14366'
14367export as_nl
14368# Printing a long string crashes Solaris 7 /usr/bin/printf.
14369as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14370as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14371as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14372# Prefer a ksh shell builtin over an external printf program on Solaris,
14373# but without wasting forks for bash or zsh.
14374if test -z "$BASH_VERSION$ZSH_VERSION" \
14375 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14376 as_echo='print -r --'
14377 as_echo_n='print -rn --'
14378elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14379 as_echo='printf %s\n'
14380 as_echo_n='printf %s'
14381else
14382 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14383 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14384 as_echo_n='/usr/ucb/echo -n'
14385 else
14386 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14387 as_echo_n_body='eval
14388 arg=$1;
14389 case $arg in #(
14390 *"$as_nl"*)
14391 expr "X$arg" : "X\\(.*\\)$as_nl";
14392 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14393 esac;
14394 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14395 '
14396 export as_echo_n_body
14397 as_echo_n='sh -c $as_echo_n_body as_echo'
14398 fi
14399 export as_echo_body
14400 as_echo='sh -c $as_echo_body as_echo'
14401fi
14402
14403# The user is always right.
14404if test "${PATH_SEPARATOR+set}" != set; then
14405 PATH_SEPARATOR=:
14406 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14407 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14408 PATH_SEPARATOR=';'
14409 }
14410fi
14411
14412
14413# IFS
14414# We need space, tab and new line, in precisely that order. Quoting is
14415# there to prevent editors from complaining about space-tab.
14416# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14417# splitting by setting IFS to empty value.)
14418IFS=" "" $as_nl"
14419
14420# Find who we are. Look in the path if we contain no directory separator.
14421case $0 in #((
14422 *[\\/]* ) as_myself=$0 ;;
14423 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14424for as_dir in $PATH
14425do
14426 IFS=$as_save_IFS
14427 test -z "$as_dir" && as_dir=.
14428 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14429 done
14430IFS=$as_save_IFS
14431
14432 ;;
14433esac
14434# We did not find ourselves, most probably we were run as `sh COMMAND'
14435# in which case we are not to be found in the path.
14436if test "x$as_myself" = x; then
14437 as_myself=$0
14438fi
14439if test ! -f "$as_myself"; then
14440 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14441 exit 1
14442fi
14443
14444# Unset variables that we do not need and which cause bugs (e.g. in
14445# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14446# suppresses any "Segmentation fault" message there. '((' could
14447# trigger a bug in pdksh 5.2.14.
14448for as_var in BASH_ENV ENV MAIL MAILPATH
14449do eval test x\${$as_var+set} = xset \
14450 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14451done
14452PS1='$ '
14453PS2='> '
14454PS4='+ '
14455
14456# NLS nuisances.
14457LC_ALL=C
14458export LC_ALL
14459LANGUAGE=C
14460export LANGUAGE
14461
14462# CDPATH.
14463(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14464
14465
14466# as_fn_error STATUS ERROR [LINENO LOG_FD]
14467# ----------------------------------------
14468# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14469# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14470# script with STATUS, using 1 if that was 0.
14471as_fn_error ()
14472{
14473 as_status=$1; test $as_status -eq 0 && as_status=1
14474 if test "$4"; then
14475 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14476 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14477 fi
14478 $as_echo "$as_me: error: $2" >&2
14479 as_fn_exit $as_status
14480} # as_fn_error
14481
14482
14483# as_fn_set_status STATUS
14484# -----------------------
14485# Set $? to STATUS, without forking.
14486as_fn_set_status ()
14487{
14488 return $1
14489} # as_fn_set_status
14490
14491# as_fn_exit STATUS
14492# -----------------
14493# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14494as_fn_exit ()
14495{
14496 set +e
14497 as_fn_set_status $1
14498 exit $1
14499} # as_fn_exit
14500
14501# as_fn_unset VAR
14502# ---------------
14503# Portably unset VAR.
14504as_fn_unset ()
14505{
14506 { eval $1=; unset $1;}
14507}
14508as_unset=as_fn_unset
14509# as_fn_append VAR VALUE
14510# ----------------------
14511# Append the text in VALUE to the end of the definition contained in VAR. Take
14512# advantage of any shell optimizations that allow amortized linear growth over
14513# repeated appends, instead of the typical quadratic growth present in naive
14514# implementations.
14515if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14516 eval 'as_fn_append ()
14517 {
14518 eval $1+=\$2
14519 }'
14520else
14521 as_fn_append ()
14522 {
14523 eval $1=\$$1\$2
14524 }
14525fi # as_fn_append
14526
14527# as_fn_arith ARG...
14528# ------------------
14529# Perform arithmetic evaluation on the ARGs, and store the result in the
14530# global $as_val. Take advantage of shells that can avoid forks. The arguments
14531# must be portable across $(()) and expr.
14532if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14533 eval 'as_fn_arith ()
14534 {
14535 as_val=$(( $* ))
14536 }'
14537else
14538 as_fn_arith ()
14539 {
14540 as_val=`expr "$@" || test $? -eq 1`
14541 }
14542fi # as_fn_arith
14543
14544
14545if expr a : '\(a\)' >/dev/null 2>&1 &&
14546 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14547 as_expr=expr
14548else
14549 as_expr=false
14550fi
14551
14552if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14553 as_basename=basename
14554else
14555 as_basename=false
14556fi
14557
14558if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14559 as_dirname=dirname
14560else
14561 as_dirname=false
14562fi
14563
14564as_me=`$as_basename -- "$0" ||
14565$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14566 X"$0" : 'X\(//\)$' \| \
14567 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14568$as_echo X/"$0" |
14569 sed '/^.*\/\([^/][^/]*\)\/*$/{
14570 s//\1/
14571 q
14572 }
14573 /^X\/\(\/\/\)$/{
14574 s//\1/
14575 q
14576 }
14577 /^X\/\(\/\).*/{
14578 s//\1/
14579 q
14580 }
14581 s/.*/./; q'`
14582
14583# Avoid depending upon Character Ranges.
14584as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14585as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14586as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14587as_cr_digits='0123456789'
14588as_cr_alnum=$as_cr_Letters$as_cr_digits
14589
14590ECHO_C= ECHO_N= ECHO_T=
14591case `echo -n x` in #(((((
14592-n*)
14593 case `echo 'xy\c'` in
14594 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14595 xy) ECHO_C='\c';;
14596 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14597 ECHO_T=' ';;
14598 esac;;
14599*)
14600 ECHO_N='-n';;
14601esac
14602
14603rm -f conf$$ conf$$.exe conf$$.file
14604if test -d conf$$.dir; then
14605 rm -f conf$$.dir/conf$$.file
14606else
14607 rm -f conf$$.dir
14608 mkdir conf$$.dir 2>/dev/null
14609fi
14610if (echo >conf$$.file) 2>/dev/null; then
14611 if ln -s conf$$.file conf$$ 2>/dev/null; then
14612 as_ln_s='ln -s'
14613 # ... but there are two gotchas:
14614 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14615 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14616 # In both cases, we have to default to `cp -p'.
14617 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14618 as_ln_s='cp -p'
14619 elif ln conf$$.file conf$$ 2>/dev/null; then
14620 as_ln_s=ln
14621 else
14622 as_ln_s='cp -p'
14623 fi
14624else
14625 as_ln_s='cp -p'
14626fi
14627rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14628rmdir conf$$.dir 2>/dev/null
14629
14630
14631# as_fn_mkdir_p
14632# -------------
14633# Create "$as_dir" as a directory, including parents if necessary.
14634as_fn_mkdir_p ()
14635{
14636
14637 case $as_dir in #(
14638 -*) as_dir=./$as_dir;;
14639 esac
14640 test -d "$as_dir" || eval $as_mkdir_p || {
14641 as_dirs=
14642 while :; do
14643 case $as_dir in #(
14644 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14645 *) as_qdir=$as_dir;;
14646 esac
14647 as_dirs="'$as_qdir' $as_dirs"
14648 as_dir=`$as_dirname -- "$as_dir" ||
14649$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14650 X"$as_dir" : 'X\(//\)[^/]' \| \
14651 X"$as_dir" : 'X\(//\)$' \| \
14652 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14653$as_echo X"$as_dir" |
14654 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14655 s//\1/
14656 q
14657 }
14658 /^X\(\/\/\)[^/].*/{
14659 s//\1/
14660 q
14661 }
14662 /^X\(\/\/\)$/{
14663 s//\1/
14664 q
14665 }
14666 /^X\(\/\).*/{
14667 s//\1/
14668 q
14669 }
14670 s/.*/./; q'`
14671 test -d "$as_dir" && break
14672 done
14673 test -z "$as_dirs" || eval "mkdir $as_dirs"
14674 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14675
14676
14677} # as_fn_mkdir_p
14678if mkdir -p . 2>/dev/null; then
14679 as_mkdir_p='mkdir -p "$as_dir"'
14680else
14681 test -d ./-p && rmdir ./-p
14682 as_mkdir_p=false
14683fi
14684
14685if test -x / >/dev/null 2>&1; then
14686 as_test_x='test -x'
14687else
14688 if ls -dL / >/dev/null 2>&1; then
14689 as_ls_L_option=L
14690 else
14691 as_ls_L_option=
14692 fi
14693 as_test_x='
14694 eval sh -c '\''
14695 if test -d "$1"; then
14696 test -d "$1/.";
14697 else
14698 case $1 in #(
14699 -*)set "./$1";;
14700 esac;
14701 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
14702 ???[sx]*):;;*)false;;esac;fi
14703 '\'' sh
14704 '
14705fi
14706as_executable_p=$as_test_x
14707
14708# Sed expression to map a string onto a valid CPP name.
14709as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14710
14711# Sed expression to map a string onto a valid variable name.
14712as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14713
14714
14715exec 6>&1
14716## ----------------------------------- ##
14717## Main body of $CONFIG_STATUS script. ##
14718## ----------------------------------- ##
14719_ASEOF
14720test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14721
14722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14723# Save the log message, to keep $0 and so on meaningful, and to
14724# report actual input values of CONFIG_FILES etc. instead of their
14725# values after options handling.
14726ac_log="
14727This file was extended by eet $as_me 1.5.0, which was
14728generated by GNU Autoconf 2.67. Invocation command line was
14729
14730 CONFIG_FILES = $CONFIG_FILES
14731 CONFIG_HEADERS = $CONFIG_HEADERS
14732 CONFIG_LINKS = $CONFIG_LINKS
14733 CONFIG_COMMANDS = $CONFIG_COMMANDS
14734 $ $0 $@
14735
14736on `(hostname || uname -n) 2>/dev/null | sed 1q`
14737"
14738
14739_ACEOF
14740
14741case $ac_config_files in *"
14742"*) set x $ac_config_files; shift; ac_config_files=$*;;
14743esac
14744
14745case $ac_config_headers in *"
14746"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14747esac
14748
14749
14750cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14751# Files that config.status was made for.
14752config_files="$ac_config_files"
14753config_headers="$ac_config_headers"
14754config_commands="$ac_config_commands"
14755
14756_ACEOF
14757
14758cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14759ac_cs_usage="\
14760\`$as_me' instantiates files and other configuration actions
14761from templates according to the current configuration. Unless the files
14762and actions are specified as TAGs, all are instantiated by default.
14763
14764Usage: $0 [OPTION]... [TAG]...
14765
14766 -h, --help print this help, then exit
14767 -V, --version print version number and configuration settings, then exit
14768 --config print configuration, then exit
14769 -q, --quiet, --silent
14770 do not print progress messages
14771 -d, --debug don't remove temporary files
14772 --recheck update $as_me by reconfiguring in the same conditions
14773 --file=FILE[:TEMPLATE]
14774 instantiate the configuration file FILE
14775 --header=FILE[:TEMPLATE]
14776 instantiate the configuration header FILE
14777
14778Configuration files:
14779$config_files
14780
14781Configuration headers:
14782$config_headers
14783
14784Configuration commands:
14785$config_commands
14786
14787Report bugs to <enlightenment-devel@lists.sourceforge.net>."
14788
14789_ACEOF
14790cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14791ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14792ac_cs_version="\\
14793eet config.status 1.5.0
14794configured by $0, generated by GNU Autoconf 2.67,
14795 with options \\"\$ac_cs_config\\"
14796
14797Copyright (C) 2010 Free Software Foundation, Inc.
14798This config.status script is free software; the Free Software Foundation
14799gives unlimited permission to copy, distribute and modify it."
14800
14801ac_pwd='$ac_pwd'
14802srcdir='$srcdir'
14803INSTALL='$INSTALL'
14804MKDIR_P='$MKDIR_P'
14805AWK='$AWK'
14806test -n "\$AWK" || AWK=awk
14807_ACEOF
14808
14809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14810# The default lists apply if the user does not specify any file.
14811ac_need_defaults=:
14812while test $# != 0
14813do
14814 case $1 in
14815 --*=?*)
14816 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14817 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14818 ac_shift=:
14819 ;;
14820 --*=)
14821 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14822 ac_optarg=
14823 ac_shift=:
14824 ;;
14825 *)
14826 ac_option=$1
14827 ac_optarg=$2
14828 ac_shift=shift
14829 ;;
14830 esac
14831
14832 case $ac_option in
14833 # Handling of the options.
14834 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14835 ac_cs_recheck=: ;;
14836 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14837 $as_echo "$ac_cs_version"; exit ;;
14838 --config | --confi | --conf | --con | --co | --c )
14839 $as_echo "$ac_cs_config"; exit ;;
14840 --debug | --debu | --deb | --de | --d | -d )
14841 debug=: ;;
14842 --file | --fil | --fi | --f )
14843 $ac_shift
14844 case $ac_optarg in
14845 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14846 '') as_fn_error $? "missing file argument" ;;
14847 esac
14848 as_fn_append CONFIG_FILES " '$ac_optarg'"
14849 ac_need_defaults=false;;
14850 --header | --heade | --head | --hea )
14851 $ac_shift
14852 case $ac_optarg in
14853 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14854 esac
14855 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14856 ac_need_defaults=false;;
14857 --he | --h)
14858 # Conflict between --help and --header
14859 as_fn_error $? "ambiguous option: \`$1'
14860Try \`$0 --help' for more information.";;
14861 --help | --hel | -h )
14862 $as_echo "$ac_cs_usage"; exit ;;
14863 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14864 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14865 ac_cs_silent=: ;;
14866
14867 # This is an error.
14868 -*) as_fn_error $? "unrecognized option: \`$1'
14869Try \`$0 --help' for more information." ;;
14870
14871 *) as_fn_append ac_config_targets " $1"
14872 ac_need_defaults=false ;;
14873
14874 esac
14875 shift
14876done
14877
14878ac_configure_extra_args=
14879
14880if $ac_cs_silent; then
14881 exec 6>/dev/null
14882 ac_configure_extra_args="$ac_configure_extra_args --silent"
14883fi
14884
14885_ACEOF
14886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14887if \$ac_cs_recheck; then
14888 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14889 shift
14890 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14891 CONFIG_SHELL='$SHELL'
14892 export CONFIG_SHELL
14893 exec "\$@"
14894fi
14895
14896_ACEOF
14897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14898exec 5>>config.log
14899{
14900 echo
14901 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14902## Running $as_me. ##
14903_ASBOX
14904 $as_echo "$ac_log"
14905} >&5
14906
14907_ACEOF
14908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14909#
14910# INIT-COMMANDS
14911#
14912AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
14913
14914
14915# The HP-UX ksh and POSIX shell print the target directory to stdout
14916# if CDPATH is set.
14917(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14918
14919sed_quote_subst='$sed_quote_subst'
14920double_quote_subst='$double_quote_subst'
14921delay_variable_subst='$delay_variable_subst'
14922AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
14923DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
14924OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
14925macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
14926macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
14927enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
14928enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
14929pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
14930enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
14931host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
14932host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
14933host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
14934build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
14935build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
14936build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
14937SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
14938Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
14939GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
14940EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
14941FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
14942LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
14943NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
14944LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
14945max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
14946ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
14947exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
14948lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
14949lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
14950lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
14951reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
14952reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14953deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
14954file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
14955AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
14956AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
14957STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
14958RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
14959old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14960old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14961old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14962CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
14963CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
14964compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
14965GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
14966lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
14967lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
14968lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
14969lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
14970objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
14971SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
14972ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
14973MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
14974lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
14975lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
14976lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
14977lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
14978lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
14979need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
14980DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
14981NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
14982LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
14983OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
14984OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
14985libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
14986shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14987extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14988archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
14989enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
14990export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
14991whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
14992compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
14993old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14994old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14995archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14996archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14997module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14998module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
14999with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
15000allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
15001no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
15002hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
15003hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
15004hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
15005hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
15006hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
15007hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
15008hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
15009hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
15010inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
15011link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
15012fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
15013always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
15014export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
15015exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
15016include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
15017prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
15018file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
15019variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
15020need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
15021need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
15022version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
15023runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
15024shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
15025shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
15026libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
15027library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
15028soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
15029postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
15030postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
15031finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
15032finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
15033hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
15034sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
15035sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
15036hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
15037enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
15038enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
15039enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
15040old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
15041striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
15042
15043LTCC='$LTCC'
15044LTCFLAGS='$LTCFLAGS'
15045compiler='$compiler_DEFAULT'
15046
15047# Quote evaled strings.
15048for var in SED \
15049GREP \
15050EGREP \
15051FGREP \
15052LD \
15053NM \
15054LN_S \
15055lt_SP2NL \
15056lt_NL2SP \
15057reload_flag \
15058deplibs_check_method \
15059file_magic_cmd \
15060AR \
15061AR_FLAGS \
15062STRIP \
15063RANLIB \
15064CC \
15065CFLAGS \
15066compiler \
15067lt_cv_sys_global_symbol_pipe \
15068lt_cv_sys_global_symbol_to_cdecl \
15069lt_cv_sys_global_symbol_to_c_name_address \
15070lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
15071SHELL \
15072ECHO \
15073lt_prog_compiler_no_builtin_flag \
15074lt_prog_compiler_wl \
15075lt_prog_compiler_pic \
15076lt_prog_compiler_static \
15077lt_cv_prog_compiler_c_o \
15078need_locks \
15079DSYMUTIL \
15080NMEDIT \
15081LIPO \
15082OTOOL \
15083OTOOL64 \
15084shrext_cmds \
15085export_dynamic_flag_spec \
15086whole_archive_flag_spec \
15087compiler_needs_object \
15088with_gnu_ld \
15089allow_undefined_flag \
15090no_undefined_flag \
15091hardcode_libdir_flag_spec \
15092hardcode_libdir_flag_spec_ld \
15093hardcode_libdir_separator \
15094fix_srcfile_path \
15095exclude_expsyms \
15096include_expsyms \
15097file_list_spec \
15098variables_saved_for_relink \
15099libname_spec \
15100library_names_spec \
15101soname_spec \
15102finish_eval \
15103old_striplib \
15104striplib; do
15105 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
15106 *[\\\\\\\`\\"\\\$]*)
15107 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
15108 ;;
15109 *)
15110 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
15111 ;;
15112 esac
15113done
15114
15115# Double-quote double-evaled strings.
15116for var in reload_cmds \
15117old_postinstall_cmds \
15118old_postuninstall_cmds \
15119old_archive_cmds \
15120extract_expsyms_cmds \
15121old_archive_from_new_cmds \
15122old_archive_from_expsyms_cmds \
15123archive_cmds \
15124archive_expsym_cmds \
15125module_cmds \
15126module_expsym_cmds \
15127export_symbols_cmds \
15128prelink_cmds \
15129postinstall_cmds \
15130postuninstall_cmds \
15131finish_cmds \
15132sys_lib_search_path_spec \
15133sys_lib_dlsearch_path_spec; do
15134 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
15135 *[\\\\\\\`\\"\\\$]*)
15136 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
15137 ;;
15138 *)
15139 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
15140 ;;
15141 esac
15142done
15143
15144# Fix-up fallback echo if it was mangled by the above quoting rules.
15145case \$lt_ECHO in
15146*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
15147 ;;
15148esac
15149
15150ac_aux_dir='$ac_aux_dir'
15151xsi_shell='$xsi_shell'
15152lt_shell_append='$lt_shell_append'
15153
15154# See if we are running on zsh, and set the options which allow our
15155# commands through without removal of \ escapes INIT.
15156if test -n "\${ZSH_VERSION+set}" ; then
15157 setopt NO_GLOB_SUBST
15158fi
15159
15160
15161 PACKAGE='$PACKAGE'
15162 VERSION='$VERSION'
15163 TIMESTAMP='$TIMESTAMP'
15164 RM='$RM'
15165 ofile='$ofile'
15166
15167
15168
15169
15170_ACEOF
15171
15172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15173
15174# Handling of arguments.
15175for ac_config_target in $ac_config_targets
15176do
15177 case $ac_config_target in
15178 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
15179 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15180 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
15181 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15182 "eet.pc") CONFIG_FILES="$CONFIG_FILES eet.pc" ;;
15183 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
15184 "doc/Doxyfile") CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;;
15185 "doc/eet.dox") CONFIG_FILES="$CONFIG_FILES doc/eet.dox" ;;
15186 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
15187 "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;;
15188 "src/bin/Makefile") CONFIG_FILES="$CONFIG_FILES src/bin/Makefile" ;;
15189 "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;;
15190 "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;;
15191 "eet.spec") CONFIG_FILES="$CONFIG_FILES eet.spec" ;;
15192
15193 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
15194 esac
15195done
15196
15197
15198# If the user did not use the arguments to specify the items to instantiate,
15199# then the envvar interface is used. Set only those that are not.
15200# We use the long form for the default assignment because of an extremely
15201# bizarre bug on SunOS 4.1.3.
15202if $ac_need_defaults; then
15203 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15204 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15205 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15206fi
15207
15208# Have a temporary directory for convenience. Make it in the build tree
15209# simply because there is no reason against having it here, and in addition,
15210# creating and moving files from /tmp can sometimes cause problems.
15211# Hook for its removal unless debugging.
15212# Note that there is a small window in which the directory will not be cleaned:
15213# after its creation but before its name has been assigned to `$tmp'.
15214$debug ||
15215{
15216 tmp=
15217 trap 'exit_status=$?
15218 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15219' 0
15220 trap 'as_fn_exit 1' 1 2 13 15
15221}
15222# Create a (secure) tmp directory for tmp files.
15223
15224{
15225 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15226 test -n "$tmp" && test -d "$tmp"
15227} ||
15228{
15229 tmp=./conf$$-$RANDOM
15230 (umask 077 && mkdir "$tmp")
15231} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15232
15233# Set up the scripts for CONFIG_FILES section.
15234# No need to generate them if there are no CONFIG_FILES.
15235# This happens for instance with `./config.status config.h'.
15236if test -n "$CONFIG_FILES"; then
15237
15238
15239ac_cr=`echo X | tr X '\015'`
15240# On cygwin, bash can eat \r inside `` if the user requested igncr.
15241# But we know of no other shell where ac_cr would be empty at this
15242# point, so we can use a bashism as a fallback.
15243if test "x$ac_cr" = x; then
15244 eval ac_cr=\$\'\\r\'
15245fi
15246ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15247if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15248 ac_cs_awk_cr='\\r'
15249else
15250 ac_cs_awk_cr=$ac_cr
15251fi
15252
15253echo 'BEGIN {' >"$tmp/subs1.awk" &&
15254_ACEOF
15255
15256
15257{
15258 echo "cat >conf$$subs.awk <<_ACEOF" &&
15259 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15260 echo "_ACEOF"
15261} >conf$$subs.sh ||
15262 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15263ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15264ac_delim='%!_!# '
15265for ac_last_try in false false false false false :; do
15266 . ./conf$$subs.sh ||
15267 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15268
15269 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15270 if test $ac_delim_n = $ac_delim_num; then
15271 break
15272 elif $ac_last_try; then
15273 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15274 else
15275 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15276 fi
15277done
15278rm -f conf$$subs.sh
15279
15280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15281cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15282_ACEOF
15283sed -n '
15284h
15285s/^/S["/; s/!.*/"]=/
15286p
15287g
15288s/^[^!]*!//
15289:repl
15290t repl
15291s/'"$ac_delim"'$//
15292t delim
15293:nl
15294h
15295s/\(.\{148\}\)..*/\1/
15296t more1
15297s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15298p
15299n
15300b repl
15301:more1
15302s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15303p
15304g
15305s/.\{148\}//
15306t nl
15307:delim
15308h
15309s/\(.\{148\}\)..*/\1/
15310t more2
15311s/["\\]/\\&/g; s/^/"/; s/$/"/
15312p
15313b
15314:more2
15315s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15316p
15317g
15318s/.\{148\}//
15319t delim
15320' <conf$$subs.awk | sed '
15321/^[^""]/{
15322 N
15323 s/\n//
15324}
15325' >>$CONFIG_STATUS || ac_write_fail=1
15326rm -f conf$$subs.awk
15327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15328_ACAWK
15329cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15330 for (key in S) S_is_set[key] = 1
15331 FS = ""
15332
15333}
15334{
15335 line = $ 0
15336 nfields = split(line, field, "@")
15337 substed = 0
15338 len = length(field[1])
15339 for (i = 2; i < nfields; i++) {
15340 key = field[i]
15341 keylen = length(key)
15342 if (S_is_set[key]) {
15343 value = S[key]
15344 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15345 len += length(value) + length(field[++i])
15346 substed = 1
15347 } else
15348 len += 1 + keylen
15349 }
15350
15351 print line
15352}
15353
15354_ACAWK
15355_ACEOF
15356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15357if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15358 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15359else
15360 cat
15361fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15362 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15363_ACEOF
15364
15365# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15366# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15367# trailing colons and then remove the whole line if VPATH becomes empty
15368# (actually we leave an empty line to preserve line numbers).
15369if test "x$srcdir" = x.; then
15370 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15371h
15372s///
15373s/^/:/
15374s/[ ]*$/:/
15375s/:\$(srcdir):/:/g
15376s/:\${srcdir}:/:/g
15377s/:@srcdir@:/:/g
15378s/^:*//
15379s/:*$//
15380x
15381s/\(=[ ]*\).*/\1/
15382G
15383s/\n//
15384s/^[^=]*=[ ]*$//
15385}'
15386fi
15387
15388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15389fi # test -n "$CONFIG_FILES"
15390
15391# Set up the scripts for CONFIG_HEADERS section.
15392# No need to generate them if there are no CONFIG_HEADERS.
15393# This happens for instance with `./config.status Makefile'.
15394if test -n "$CONFIG_HEADERS"; then
15395cat >"$tmp/defines.awk" <<\_ACAWK ||
15396BEGIN {
15397_ACEOF
15398
15399# Transform confdefs.h into an awk script `defines.awk', embedded as
15400# here-document in config.status, that substitutes the proper values into
15401# config.h.in to produce config.h.
15402
15403# Create a delimiter string that does not exist in confdefs.h, to ease
15404# handling of long lines.
15405ac_delim='%!_!# '
15406for ac_last_try in false false :; do
15407 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15408 if test -z "$ac_t"; then
15409 break
15410 elif $ac_last_try; then
15411 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15412 else
15413 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15414 fi
15415done
15416
15417# For the awk script, D is an array of macro values keyed by name,
15418# likewise P contains macro parameters if any. Preserve backslash
15419# newline sequences.
15420
15421ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15422sed -n '
15423s/.\{148\}/&'"$ac_delim"'/g
15424t rset
15425:rset
15426s/^[ ]*#[ ]*define[ ][ ]*/ /
15427t def
15428d
15429:def
15430s/\\$//
15431t bsnl
15432s/["\\]/\\&/g
15433s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15434D["\1"]=" \3"/p
15435s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15436d
15437:bsnl
15438s/["\\]/\\&/g
15439s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15440D["\1"]=" \3\\\\\\n"\\/p
15441t cont
15442s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15443t cont
15444d
15445:cont
15446n
15447s/.\{148\}/&'"$ac_delim"'/g
15448t clear
15449:clear
15450s/\\$//
15451t bsnlc
15452s/["\\]/\\&/g; s/^/"/; s/$/"/p
15453d
15454:bsnlc
15455s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15456b cont
15457' <confdefs.h | sed '
15458s/'"$ac_delim"'/"\\\
15459"/g' >>$CONFIG_STATUS || ac_write_fail=1
15460
15461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15462 for (key in D) D_is_set[key] = 1
15463 FS = ""
15464}
15465/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15466 line = \$ 0
15467 split(line, arg, " ")
15468 if (arg[1] == "#") {
15469 defundef = arg[2]
15470 mac1 = arg[3]
15471 } else {
15472 defundef = substr(arg[1], 2)
15473 mac1 = arg[2]
15474 }
15475 split(mac1, mac2, "(") #)
15476 macro = mac2[1]
15477 prefix = substr(line, 1, index(line, defundef) - 1)
15478 if (D_is_set[macro]) {
15479 # Preserve the white space surrounding the "#".
15480 print prefix "define", macro P[macro] D[macro]
15481 next
15482 } else {
15483 # Replace #undef with comments. This is necessary, for example,
15484 # in the case of _POSIX_SOURCE, which is predefined and required
15485 # on some systems where configure will not decide to define it.
15486 if (defundef == "undef") {
15487 print "/*", prefix defundef, macro, "*/"
15488 next
15489 }
15490 }
15491}
15492{ print }
15493_ACAWK
15494_ACEOF
15495cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15496 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15497fi # test -n "$CONFIG_HEADERS"
15498
15499
15500eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15501shift
15502for ac_tag
15503do
15504 case $ac_tag in
15505 :[FHLC]) ac_mode=$ac_tag; continue;;
15506 esac
15507 case $ac_mode$ac_tag in
15508 :[FHL]*:*);;
15509 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
15510 :[FH]-) ac_tag=-:-;;
15511 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15512 esac
15513 ac_save_IFS=$IFS
15514 IFS=:
15515 set x $ac_tag
15516 IFS=$ac_save_IFS
15517 shift
15518 ac_file=$1
15519 shift
15520
15521 case $ac_mode in
15522 :L) ac_source=$1;;
15523 :[FH])
15524 ac_file_inputs=
15525 for ac_f
15526 do
15527 case $ac_f in
15528 -) ac_f="$tmp/stdin";;
15529 *) # Look for the file first in the build tree, then in the source tree
15530 # (if the path is not absolute). The absolute path cannot be DOS-style,
15531 # because $ac_f cannot contain `:'.
15532 test -f "$ac_f" ||
15533 case $ac_f in
15534 [\\/$]*) false;;
15535 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15536 esac ||
15537 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
15538 esac
15539 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15540 as_fn_append ac_file_inputs " '$ac_f'"
15541 done
15542
15543 # Let's still pretend it is `configure' which instantiates (i.e., don't
15544 # use $as_me), people would be surprised to read:
15545 # /* config.h. Generated by config.status. */
15546 configure_input='Generated from '`
15547 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15548 `' by configure.'
15549 if test x"$ac_file" != x-; then
15550 configure_input="$ac_file. $configure_input"
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15552$as_echo "$as_me: creating $ac_file" >&6;}
15553 fi
15554 # Neutralize special characters interpreted by sed in replacement strings.
15555 case $configure_input in #(
15556 *\&* | *\|* | *\\* )
15557 ac_sed_conf_input=`$as_echo "$configure_input" |
15558 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15559 *) ac_sed_conf_input=$configure_input;;
15560 esac
15561
15562 case $ac_tag in
15563 *:-:* | *:-) cat >"$tmp/stdin" \
15564 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15565 esac
15566 ;;
15567 esac
15568
15569 ac_dir=`$as_dirname -- "$ac_file" ||
15570$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15571 X"$ac_file" : 'X\(//\)[^/]' \| \
15572 X"$ac_file" : 'X\(//\)$' \| \
15573 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15574$as_echo X"$ac_file" |
15575 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15576 s//\1/
15577 q
15578 }
15579 /^X\(\/\/\)[^/].*/{
15580 s//\1/
15581 q
15582 }
15583 /^X\(\/\/\)$/{
15584 s//\1/
15585 q
15586 }
15587 /^X\(\/\).*/{
15588 s//\1/
15589 q
15590 }
15591 s/.*/./; q'`
15592 as_dir="$ac_dir"; as_fn_mkdir_p
15593 ac_builddir=.
15594
15595case "$ac_dir" in
15596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15597*)
15598 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15599 # A ".." for each directory in $ac_dir_suffix.
15600 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15601 case $ac_top_builddir_sub in
15602 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15603 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15604 esac ;;
15605esac
15606ac_abs_top_builddir=$ac_pwd
15607ac_abs_builddir=$ac_pwd$ac_dir_suffix
15608# for backward compatibility:
15609ac_top_builddir=$ac_top_build_prefix
15610
15611case $srcdir in
15612 .) # We are building in place.
15613 ac_srcdir=.
15614 ac_top_srcdir=$ac_top_builddir_sub
15615 ac_abs_top_srcdir=$ac_pwd ;;
15616 [\\/]* | ?:[\\/]* ) # Absolute name.
15617 ac_srcdir=$srcdir$ac_dir_suffix;
15618 ac_top_srcdir=$srcdir
15619 ac_abs_top_srcdir=$srcdir ;;
15620 *) # Relative name.
15621 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15622 ac_top_srcdir=$ac_top_build_prefix$srcdir
15623 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15624esac
15625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15626
15627
15628 case $ac_mode in
15629 :F)
15630 #
15631 # CONFIG_FILE
15632 #
15633
15634 case $INSTALL in
15635 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15636 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15637 esac
15638 ac_MKDIR_P=$MKDIR_P
15639 case $MKDIR_P in
15640 [\\/$]* | ?:[\\/]* ) ;;
15641 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15642 esac
15643_ACEOF
15644
15645cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15646# If the template does not know about datarootdir, expand it.
15647# FIXME: This hack should be removed a few years after 2.60.
15648ac_datarootdir_hack=; ac_datarootdir_seen=
15649ac_sed_dataroot='
15650/datarootdir/ {
15651 p
15652 q
15653}
15654/@datadir@/p
15655/@docdir@/p
15656/@infodir@/p
15657/@localedir@/p
15658/@mandir@/p'
15659case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15660*datarootdir*) ac_datarootdir_seen=yes;;
15661*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15663$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15664_ACEOF
15665cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15666 ac_datarootdir_hack='
15667 s&@datadir@&$datadir&g
15668 s&@docdir@&$docdir&g
15669 s&@infodir@&$infodir&g
15670 s&@localedir@&$localedir&g
15671 s&@mandir@&$mandir&g
15672 s&\\\${datarootdir}&$datarootdir&g' ;;
15673esac
15674_ACEOF
15675
15676# Neutralize VPATH when `$srcdir' = `.'.
15677# Shell code in configure.ac might set extrasub.
15678# FIXME: do we really want to maintain this feature?
15679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15680ac_sed_extra="$ac_vpsub
15681$extrasub
15682_ACEOF
15683cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15684:t
15685/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15686s|@configure_input@|$ac_sed_conf_input|;t t
15687s&@top_builddir@&$ac_top_builddir_sub&;t t
15688s&@top_build_prefix@&$ac_top_build_prefix&;t t
15689s&@srcdir@&$ac_srcdir&;t t
15690s&@abs_srcdir@&$ac_abs_srcdir&;t t
15691s&@top_srcdir@&$ac_top_srcdir&;t t
15692s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15693s&@builddir@&$ac_builddir&;t t
15694s&@abs_builddir@&$ac_abs_builddir&;t t
15695s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15696s&@INSTALL@&$ac_INSTALL&;t t
15697s&@MKDIR_P@&$ac_MKDIR_P&;t t
15698$ac_datarootdir_hack
15699"
15700eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15701 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15702
15703test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15704 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15705 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15707which seems to be undefined. Please make sure it is defined" >&5
15708$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15709which seems to be undefined. Please make sure it is defined" >&2;}
15710
15711 rm -f "$tmp/stdin"
15712 case $ac_file in
15713 -) cat "$tmp/out" && rm -f "$tmp/out";;
15714 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15715 esac \
15716 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15717 ;;
15718 :H)
15719 #
15720 # CONFIG_HEADER
15721 #
15722 if test x"$ac_file" != x-; then
15723 {
15724 $as_echo "/* $configure_input */" \
15725 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15726 } >"$tmp/config.h" \
15727 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15728 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15729 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15730$as_echo "$as_me: $ac_file is unchanged" >&6;}
15731 else
15732 rm -f "$ac_file"
15733 mv "$tmp/config.h" "$ac_file" \
15734 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15735 fi
15736 else
15737 $as_echo "/* $configure_input */" \
15738 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15739 || as_fn_error $? "could not create -" "$LINENO" 5
15740 fi
15741# Compute "$ac_file"'s index in $config_headers.
15742_am_arg="$ac_file"
15743_am_stamp_count=1
15744for _am_header in $config_headers :; do
15745 case $_am_header in
15746 $_am_arg | $_am_arg:* )
15747 break ;;
15748 * )
15749 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
15750 esac
15751done
15752echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
15753$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15754 X"$_am_arg" : 'X\(//\)[^/]' \| \
15755 X"$_am_arg" : 'X\(//\)$' \| \
15756 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
15757$as_echo X"$_am_arg" |
15758 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15759 s//\1/
15760 q
15761 }
15762 /^X\(\/\/\)[^/].*/{
15763 s//\1/
15764 q
15765 }
15766 /^X\(\/\/\)$/{
15767 s//\1/
15768 q
15769 }
15770 /^X\(\/\).*/{
15771 s//\1/
15772 q
15773 }
15774 s/.*/./; q'`/stamp-h$_am_stamp_count
15775 ;;
15776
15777 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15778$as_echo "$as_me: executing $ac_file commands" >&6;}
15779 ;;
15780 esac
15781
15782
15783 case $ac_file$ac_mode in
15784 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
15785 # Autoconf 2.62 quotes --file arguments for eval, but not when files
15786 # are listed without --file. Let's play safe and only enable the eval
15787 # if we detect the quoting.
15788 case $CONFIG_FILES in
15789 *\'*) eval set x "$CONFIG_FILES" ;;
15790 *) set x $CONFIG_FILES ;;
15791 esac
15792 shift
15793 for mf
15794 do
15795 # Strip MF so we end up with the name of the file.
15796 mf=`echo "$mf" | sed -e 's/:.*$//'`
15797 # Check whether this is an Automake generated Makefile or not.
15798 # We used to match only the files named `Makefile.in', but
15799 # some people rename them; so instead we look at the file content.
15800 # Grep'ing the first line is not enough: some people post-process
15801 # each Makefile.in and add a new line on top of each file to say so.
15802 # Grep'ing the whole file is not good either: AIX grep has a line
15803 # limit of 2048, but all sed's we know have understand at least 4000.
15804 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
15805 dirpart=`$as_dirname -- "$mf" ||
15806$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15807 X"$mf" : 'X\(//\)[^/]' \| \
15808 X"$mf" : 'X\(//\)$' \| \
15809 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
15810$as_echo X"$mf" |
15811 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15812 s//\1/
15813 q
15814 }
15815 /^X\(\/\/\)[^/].*/{
15816 s//\1/
15817 q
15818 }
15819 /^X\(\/\/\)$/{
15820 s//\1/
15821 q
15822 }
15823 /^X\(\/\).*/{
15824 s//\1/
15825 q
15826 }
15827 s/.*/./; q'`
15828 else
15829 continue
15830 fi
15831 # Extract the definition of DEPDIR, am__include, and am__quote
15832 # from the Makefile without running `make'.
15833 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
15834 test -z "$DEPDIR" && continue
15835 am__include=`sed -n 's/^am__include = //p' < "$mf"`
15836 test -z "am__include" && continue
15837 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
15838 # When using ansi2knr, U may be empty or an underscore; expand it
15839 U=`sed -n 's/^U = //p' < "$mf"`
15840 # Find all dependency output files, they are included files with
15841 # $(DEPDIR) in their names. We invoke sed twice because it is the
15842 # simplest approach to changing $(DEPDIR) to its actual value in the
15843 # expansion.
15844 for file in `sed -n "
15845 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
15846 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
15847 # Make sure the directory exists.
15848 test -f "$dirpart/$file" && continue
15849 fdir=`$as_dirname -- "$file" ||
15850$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15851 X"$file" : 'X\(//\)[^/]' \| \
15852 X"$file" : 'X\(//\)$' \| \
15853 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
15854$as_echo X"$file" |
15855 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15856 s//\1/
15857 q
15858 }
15859 /^X\(\/\/\)[^/].*/{
15860 s//\1/
15861 q
15862 }
15863 /^X\(\/\/\)$/{
15864 s//\1/
15865 q
15866 }
15867 /^X\(\/\).*/{
15868 s//\1/
15869 q
15870 }
15871 s/.*/./; q'`
15872 as_dir=$dirpart/$fdir; as_fn_mkdir_p
15873 # echo "creating $dirpart/$file"
15874 echo '# dummy' > "$dirpart/$file"
15875 done
15876 done
15877}
15878 ;;
15879 "libtool":C)
15880
15881 # See if we are running on zsh, and set the options which allow our
15882 # commands through without removal of \ escapes.
15883 if test -n "${ZSH_VERSION+set}" ; then
15884 setopt NO_GLOB_SUBST
15885 fi
15886
15887 cfgfile="${ofile}T"
15888 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
15889 $RM "$cfgfile"
15890
15891 cat <<_LT_EOF >> "$cfgfile"
15892#! $SHELL
15893
15894# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
15895# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
15896# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15897# NOTE: Changes made to this file will be lost: look at ltmain.sh.
15898#
15899# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
15900# 2006, 2007, 2008 Free Software Foundation, Inc.
15901# Written by Gordon Matzigkeit, 1996
15902#
15903# This file is part of GNU Libtool.
15904#
15905# GNU Libtool is free software; you can redistribute it and/or
15906# modify it under the terms of the GNU General Public License as
15907# published by the Free Software Foundation; either version 2 of
15908# the License, or (at your option) any later version.
15909#
15910# As a special exception to the GNU General Public License,
15911# if you distribute this file as part of a program or library that
15912# is built using GNU Libtool, you may include this file under the
15913# same distribution terms that you use for the rest of that program.
15914#
15915# GNU Libtool is distributed in the hope that it will be useful,
15916# but WITHOUT ANY WARRANTY; without even the implied warranty of
15917# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15918# GNU General Public License for more details.
15919#
15920# You should have received a copy of the GNU General Public License
15921# along with GNU Libtool; see the file COPYING. If not, a copy
15922# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
15923# obtained by writing to the Free Software Foundation, Inc.,
15924# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15925
15926
15927# The names of the tagged configurations supported by this script.
15928available_tags=""
15929
15930# ### BEGIN LIBTOOL CONFIG
15931
15932# Assembler program.
15933AS=$AS
15934
15935# DLL creation program.
15936DLLTOOL=$DLLTOOL
15937
15938# Object dumper program.
15939OBJDUMP=$OBJDUMP
15940
15941# Which release of libtool.m4 was used?
15942macro_version=$macro_version
15943macro_revision=$macro_revision
15944
15945# Whether or not to build shared libraries.
15946build_libtool_libs=$enable_shared
15947
15948# Whether or not to build static libraries.
15949build_old_libs=$enable_static
15950
15951# What type of objects to build.
15952pic_mode=$pic_mode
15953
15954# Whether or not to optimize for fast installation.
15955fast_install=$enable_fast_install
15956
15957# The host system.
15958host_alias=$host_alias
15959host=$host
15960host_os=$host_os
15961
15962# The build system.
15963build_alias=$build_alias
15964build=$build
15965build_os=$build_os
15966
15967# A sed program that does not truncate output.
15968SED=$lt_SED
15969
15970# Sed that helps us avoid accidentally triggering echo(1) options like -n.
15971Xsed="\$SED -e 1s/^X//"
15972
15973# A grep program that handles long lines.
15974GREP=$lt_GREP
15975
15976# An ERE matcher.
15977EGREP=$lt_EGREP
15978
15979# A literal string matcher.
15980FGREP=$lt_FGREP
15981
15982# A BSD- or MS-compatible name lister.
15983NM=$lt_NM
15984
15985# Whether we need soft or hard links.
15986LN_S=$lt_LN_S
15987
15988# What is the maximum length of a command?
15989max_cmd_len=$max_cmd_len
15990
15991# Object file suffix (normally "o").
15992objext=$ac_objext
15993
15994# Executable file suffix (normally "").
15995exeext=$exeext
15996
15997# whether the shell understands "unset".
15998lt_unset=$lt_unset
15999
16000# turn spaces into newlines.
16001SP2NL=$lt_lt_SP2NL
16002
16003# turn newlines into spaces.
16004NL2SP=$lt_lt_NL2SP
16005
16006# How to create reloadable object files.
16007reload_flag=$lt_reload_flag
16008reload_cmds=$lt_reload_cmds
16009
16010# Method to check whether dependent libraries are shared objects.
16011deplibs_check_method=$lt_deplibs_check_method
16012
16013# Command to use when deplibs_check_method == "file_magic".
16014file_magic_cmd=$lt_file_magic_cmd
16015
16016# The archiver.
16017AR=$lt_AR
16018AR_FLAGS=$lt_AR_FLAGS
16019
16020# A symbol stripping program.
16021STRIP=$lt_STRIP
16022
16023# Commands used to install an old-style archive.
16024RANLIB=$lt_RANLIB
16025old_postinstall_cmds=$lt_old_postinstall_cmds
16026old_postuninstall_cmds=$lt_old_postuninstall_cmds
16027
16028# A C compiler.
16029LTCC=$lt_CC
16030
16031# LTCC compiler flags.
16032LTCFLAGS=$lt_CFLAGS
16033
16034# Take the output of nm and produce a listing of raw symbols and C names.
16035global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
16036
16037# Transform the output of nm in a proper C declaration.
16038global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
16039
16040# Transform the output of nm in a C name address pair.
16041global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
16042
16043# Transform the output of nm in a C name address pair when lib prefix is needed.
16044global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
16045
16046# The name of the directory that contains temporary libtool files.
16047objdir=$objdir
16048
16049# Shell to use when invoking shell scripts.
16050SHELL=$lt_SHELL
16051
16052# An echo program that does not interpret backslashes.
16053ECHO=$lt_ECHO
16054
16055# Used to examine libraries when file_magic_cmd begins with "file".
16056MAGIC_CMD=$MAGIC_CMD
16057
16058# Must we lock files when doing compilation?
16059need_locks=$lt_need_locks
16060
16061# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
16062DSYMUTIL=$lt_DSYMUTIL
16063
16064# Tool to change global to local symbols on Mac OS X.
16065NMEDIT=$lt_NMEDIT
16066
16067# Tool to manipulate fat objects and archives on Mac OS X.
16068LIPO=$lt_LIPO
16069
16070# ldd/readelf like tool for Mach-O binaries on Mac OS X.
16071OTOOL=$lt_OTOOL
16072
16073# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
16074OTOOL64=$lt_OTOOL64
16075
16076# Old archive suffix (normally "a").
16077libext=$libext
16078
16079# Shared library suffix (normally ".so").
16080shrext_cmds=$lt_shrext_cmds
16081
16082# The commands to extract the exported symbol list from a shared archive.
16083extract_expsyms_cmds=$lt_extract_expsyms_cmds
16084
16085# Variables whose values should be saved in libtool wrapper scripts and
16086# restored at link time.
16087variables_saved_for_relink=$lt_variables_saved_for_relink
16088
16089# Do we need the "lib" prefix for modules?
16090need_lib_prefix=$need_lib_prefix
16091
16092# Do we need a version for libraries?
16093need_version=$need_version
16094
16095# Library versioning type.
16096version_type=$version_type
16097
16098# Shared library runtime path variable.
16099runpath_var=$runpath_var
16100
16101# Shared library path variable.
16102shlibpath_var=$shlibpath_var
16103
16104# Is shlibpath searched before the hard-coded library search path?
16105shlibpath_overrides_runpath=$shlibpath_overrides_runpath
16106
16107# Format of library name prefix.
16108libname_spec=$lt_libname_spec
16109
16110# List of archive names. First name is the real one, the rest are links.
16111# The last name is the one that the linker finds with -lNAME
16112library_names_spec=$lt_library_names_spec
16113
16114# The coded name of the library, if different from the real name.
16115soname_spec=$lt_soname_spec
16116
16117# Command to use after installation of a shared archive.
16118postinstall_cmds=$lt_postinstall_cmds
16119
16120# Command to use after uninstallation of a shared archive.
16121postuninstall_cmds=$lt_postuninstall_cmds
16122
16123# Commands used to finish a libtool library installation in a directory.
16124finish_cmds=$lt_finish_cmds
16125
16126# As "finish_cmds", except a single script fragment to be evaled but
16127# not shown.
16128finish_eval=$lt_finish_eval
16129
16130# Whether we should hardcode library paths into libraries.
16131hardcode_into_libs=$hardcode_into_libs
16132
16133# Compile-time system search path for libraries.
16134sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
16135
16136# Run-time system search path for libraries.
16137sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
16138
16139# Whether dlopen is supported.
16140dlopen_support=$enable_dlopen
16141
16142# Whether dlopen of programs is supported.
16143dlopen_self=$enable_dlopen_self
16144
16145# Whether dlopen of statically linked programs is supported.
16146dlopen_self_static=$enable_dlopen_self_static
16147
16148# Commands to strip libraries.
16149old_striplib=$lt_old_striplib
16150striplib=$lt_striplib
16151
16152
16153# The linker used to build libraries.
16154LD=$lt_LD
16155
16156# Commands used to build an old-style archive.
16157old_archive_cmds=$lt_old_archive_cmds
16158
16159# A language specific compiler.
16160CC=$lt_compiler
16161
16162# Is the compiler the GNU compiler?
16163with_gcc=$GCC
16164
16165# Compiler flag to turn off builtin functions.
16166no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
16167
16168# How to pass a linker flag through the compiler.
16169wl=$lt_lt_prog_compiler_wl
16170
16171# Additional compiler flags for building library objects.
16172pic_flag=$lt_lt_prog_compiler_pic
16173
16174# Compiler flag to prevent dynamic linking.
16175link_static_flag=$lt_lt_prog_compiler_static
16176
16177# Does compiler simultaneously support -c and -o options?
16178compiler_c_o=$lt_lt_cv_prog_compiler_c_o
16179
16180# Whether or not to add -lc for building shared libraries.
16181build_libtool_need_lc=$archive_cmds_need_lc
16182
16183# Whether or not to disallow shared libs when runtime libs are static.
16184allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
16185
16186# Compiler flag to allow reflexive dlopens.
16187export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
16188
16189# Compiler flag to generate shared objects directly from archives.
16190whole_archive_flag_spec=$lt_whole_archive_flag_spec
16191
16192# Whether the compiler copes with passing no objects directly.
16193compiler_needs_object=$lt_compiler_needs_object
16194
16195# Create an old-style archive from a shared archive.
16196old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
16197
16198# Create a temporary old-style archive to link instead of a shared archive.
16199old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
16200
16201# Commands used to build a shared archive.
16202archive_cmds=$lt_archive_cmds
16203archive_expsym_cmds=$lt_archive_expsym_cmds
16204
16205# Commands used to build a loadable module if different from building
16206# a shared archive.
16207module_cmds=$lt_module_cmds
16208module_expsym_cmds=$lt_module_expsym_cmds
16209
16210# Whether we are building with GNU ld or not.
16211with_gnu_ld=$lt_with_gnu_ld
16212
16213# Flag that allows shared libraries with undefined symbols to be built.
16214allow_undefined_flag=$lt_allow_undefined_flag
16215
16216# Flag that enforces no undefined symbols.
16217no_undefined_flag=$lt_no_undefined_flag
16218
16219# Flag to hardcode \$libdir into a binary during linking.
16220# This must work even if \$libdir does not exist
16221hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
16222
16223# If ld is used when linking, flag to hardcode \$libdir into a binary
16224# during linking. This must work even if \$libdir does not exist.
16225hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
16226
16227# Whether we need a single "-rpath" flag with a separated argument.
16228hardcode_libdir_separator=$lt_hardcode_libdir_separator
16229
16230# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16231# DIR into the resulting binary.
16232hardcode_direct=$hardcode_direct
16233
16234# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
16235# DIR into the resulting binary and the resulting library dependency is
16236# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
16237# library is relocated.
16238hardcode_direct_absolute=$hardcode_direct_absolute
16239
16240# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
16241# into the resulting binary.
16242hardcode_minus_L=$hardcode_minus_L
16243
16244# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
16245# into the resulting binary.
16246hardcode_shlibpath_var=$hardcode_shlibpath_var
16247
16248# Set to "yes" if building a shared library automatically hardcodes DIR
16249# into the library and all subsequent libraries and executables linked
16250# against it.
16251hardcode_automatic=$hardcode_automatic
16252
16253# Set to yes if linker adds runtime paths of dependent libraries
16254# to runtime path list.
16255inherit_rpath=$inherit_rpath
16256
16257# Whether libtool must link a program against all its dependency libraries.
16258link_all_deplibs=$link_all_deplibs
16259
16260# Fix the shell variable \$srcfile for the compiler.
16261fix_srcfile_path=$lt_fix_srcfile_path
16262
16263# Set to "yes" if exported symbols are required.
16264always_export_symbols=$always_export_symbols
16265
16266# The commands to list exported symbols.
16267export_symbols_cmds=$lt_export_symbols_cmds
16268
16269# Symbols that should not be listed in the preloaded symbols.
16270exclude_expsyms=$lt_exclude_expsyms
16271
16272# Symbols that must always be exported.
16273include_expsyms=$lt_include_expsyms
16274
16275# Commands necessary for linking programs (against libraries) with templates.
16276prelink_cmds=$lt_prelink_cmds
16277
16278# Specify filename containing input files.
16279file_list_spec=$lt_file_list_spec
16280
16281# How to hardcode a shared library path into an executable.
16282hardcode_action=$hardcode_action
16283
16284# ### END LIBTOOL CONFIG
16285
16286_LT_EOF
16287
16288 case $host_os in
16289 aix3*)
16290 cat <<\_LT_EOF >> "$cfgfile"
16291# AIX sometimes has problems with the GCC collect2 program. For some
16292# reason, if we set the COLLECT_NAMES environment variable, the problems
16293# vanish in a puff of smoke.
16294if test "X${COLLECT_NAMES+set}" != Xset; then
16295 COLLECT_NAMES=
16296 export COLLECT_NAMES
16297fi
16298_LT_EOF
16299 ;;
16300 esac
16301
16302
16303ltmain="$ac_aux_dir/ltmain.sh"
16304
16305
16306 # We use sed instead of cat because bash on DJGPP gets confused if
16307 # if finds mixed CR/LF and LF-only lines. Since sed operates in
16308 # text mode, it properly converts lines to CR/LF. This bash problem
16309 # is reportedly fixed, but why not run on old versions too?
16310 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
16311 || (rm -f "$cfgfile"; exit 1)
16312
16313 case $xsi_shell in
16314 yes)
16315 cat << \_LT_EOF >> "$cfgfile"
16316
16317# func_dirname file append nondir_replacement
16318# Compute the dirname of FILE. If nonempty, add APPEND to the result,
16319# otherwise set result to NONDIR_REPLACEMENT.
16320func_dirname ()
16321{
16322 case ${1} in
16323 */*) func_dirname_result="${1%/*}${2}" ;;
16324 * ) func_dirname_result="${3}" ;;
16325 esac
16326}
16327
16328# func_basename file
16329func_basename ()
16330{
16331 func_basename_result="${1##*/}"
16332}
16333
16334# func_dirname_and_basename file append nondir_replacement
16335# perform func_basename and func_dirname in a single function
16336# call:
16337# dirname: Compute the dirname of FILE. If nonempty,
16338# add APPEND to the result, otherwise set result
16339# to NONDIR_REPLACEMENT.
16340# value returned in "$func_dirname_result"
16341# basename: Compute filename of FILE.
16342# value retuned in "$func_basename_result"
16343# Implementation must be kept synchronized with func_dirname
16344# and func_basename. For efficiency, we do not delegate to
16345# those functions but instead duplicate the functionality here.
16346func_dirname_and_basename ()
16347{
16348 case ${1} in
16349 */*) func_dirname_result="${1%/*}${2}" ;;
16350 * ) func_dirname_result="${3}" ;;
16351 esac
16352 func_basename_result="${1##*/}"
16353}
16354
16355# func_stripname prefix suffix name
16356# strip PREFIX and SUFFIX off of NAME.
16357# PREFIX and SUFFIX must not contain globbing or regex special
16358# characters, hashes, percent signs, but SUFFIX may contain a leading
16359# dot (in which case that matches only a dot).
16360func_stripname ()
16361{
16362 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
16363 # positional parameters, so assign one to ordinary parameter first.
16364 func_stripname_result=${3}
16365 func_stripname_result=${func_stripname_result#"${1}"}
16366 func_stripname_result=${func_stripname_result%"${2}"}
16367}
16368
16369# func_opt_split
16370func_opt_split ()
16371{
16372 func_opt_split_opt=${1%%=*}
16373 func_opt_split_arg=${1#*=}
16374}
16375
16376# func_lo2o object
16377func_lo2o ()
16378{
16379 case ${1} in
16380 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
16381 *) func_lo2o_result=${1} ;;
16382 esac
16383}
16384
16385# func_xform libobj-or-source
16386func_xform ()
16387{
16388 func_xform_result=${1%.*}.lo
16389}
16390
16391# func_arith arithmetic-term...
16392func_arith ()
16393{
16394 func_arith_result=$(( $* ))
16395}
16396
16397# func_len string
16398# STRING may not start with a hyphen.
16399func_len ()
16400{
16401 func_len_result=${#1}
16402}
16403
16404_LT_EOF
16405 ;;
16406 *) # Bourne compatible functions.
16407 cat << \_LT_EOF >> "$cfgfile"
16408
16409# func_dirname file append nondir_replacement
16410# Compute the dirname of FILE. If nonempty, add APPEND to the result,
16411# otherwise set result to NONDIR_REPLACEMENT.
16412func_dirname ()
16413{
16414 # Extract subdirectory from the argument.
16415 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
16416 if test "X$func_dirname_result" = "X${1}"; then
16417 func_dirname_result="${3}"
16418 else
16419 func_dirname_result="$func_dirname_result${2}"
16420 fi
16421}
16422
16423# func_basename file
16424func_basename ()
16425{
16426 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
16427}
16428
16429
16430# func_stripname prefix suffix name
16431# strip PREFIX and SUFFIX off of NAME.
16432# PREFIX and SUFFIX must not contain globbing or regex special
16433# characters, hashes, percent signs, but SUFFIX may contain a leading
16434# dot (in which case that matches only a dot).
16435# func_strip_suffix prefix name
16436func_stripname ()
16437{
16438 case ${2} in
16439 .*) func_stripname_result=`$ECHO "X${3}" \
16440 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
16441 *) func_stripname_result=`$ECHO "X${3}" \
16442 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
16443 esac
16444}
16445
16446# sed scripts:
16447my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
16448my_sed_long_arg='1s/^-[^=]*=//'
16449
16450# func_opt_split
16451func_opt_split ()
16452{
16453 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
16454 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
16455}
16456
16457# func_lo2o object
16458func_lo2o ()
16459{
16460 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
16461}
16462
16463# func_xform libobj-or-source
16464func_xform ()
16465{
16466 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
16467}
16468
16469# func_arith arithmetic-term...
16470func_arith ()
16471{
16472 func_arith_result=`expr "$@"`
16473}
16474
16475# func_len string
16476# STRING may not start with a hyphen.
16477func_len ()
16478{
16479 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
16480}
16481
16482_LT_EOF
16483esac
16484
16485case $lt_shell_append in
16486 yes)
16487 cat << \_LT_EOF >> "$cfgfile"
16488
16489# func_append var value
16490# Append VALUE to the end of shell variable VAR.
16491func_append ()
16492{
16493 eval "$1+=\$2"
16494}
16495_LT_EOF
16496 ;;
16497 *)
16498 cat << \_LT_EOF >> "$cfgfile"
16499
16500# func_append var value
16501# Append VALUE to the end of shell variable VAR.
16502func_append ()
16503{
16504 eval "$1=\$$1\$2"
16505}
16506
16507_LT_EOF
16508 ;;
16509 esac
16510
16511
16512 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
16513 || (rm -f "$cfgfile"; exit 1)
16514
16515 mv -f "$cfgfile" "$ofile" ||
16516 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
16517 chmod +x "$ofile"
16518
16519 ;;
16520
16521 esac
16522done # for ac_tag
16523
16524
16525as_fn_exit 0
16526_ACEOF
16527ac_clean_files=$ac_clean_files_save
16528
16529test $ac_write_fail = 0 ||
16530 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16531
16532
16533# configure is writing to config.log, and then calls config.status.
16534# config.status does its own redirection, appending to config.log.
16535# Unfortunately, on DOS this fails, as config.log is still kept open
16536# by configure, so config.status won't be able to write to it; its
16537# output is simply discarded. So we exec the FD to /dev/null,
16538# effectively closing config.log, so it can be properly (re)opened and
16539# appended to by config.status. When coming back to configure, we
16540# need to make the FD available again.
16541if test "$no_create" != yes; then
16542 ac_cs_success=:
16543 ac_config_status_args=
16544 test "$silent" = yes &&
16545 ac_config_status_args="$ac_config_status_args --quiet"
16546 exec 5>/dev/null
16547 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16548 exec 5>>config.log
16549 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16550 # would make configure fail if this is the last instruction.
16551 $ac_cs_success || as_fn_exit 1
16552fi
16553if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16555$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16556fi
16557
16558
16559
16560#####################################################################
16561## Info
16562
16563echo
16564echo
16565echo
16566echo "------------------------------------------------------------------------"
16567echo "$PACKAGE_NAME $PACKAGE_VERSION"
16568echo "------------------------------------------------------------------------"
16569echo
16570echo "Configuration Options Summary:"
16571echo
16572echo " Amalgamation.........: ${do_amalgamation}"
16573echo " Secure layer.........: ${secure_layer}"
16574if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
16575 echo " Cipher support.....: ${have_cipher}"
16576 echo " Signature..........: ${have_signature}"
16577fi
16578echo
16579echo " Old eet file format..: ${old_eet_file_format}"
16580echo
16581echo " Tests................: ${enable_tests}"
16582echo " Coverage.............: ${enable_coverage}"
16583echo
16584echo " Build eet............: $have_eet"
16585echo
16586echo " Documentation........: ${build_doc}"
16587if test "x${build_doc}" = "xyes" ; then
16588 echo " Building...........: make doc"
16589fi
16590echo " Examples.............: ${build_examples}"
16591if test "x${build_examples}" = "xyes" ; then
16592 echo " Install............: ${install_examples}"
16593fi
16594echo
16595echo "Compilation............: make (or gmake)"
16596echo " CPPFLAGS.............: $CPPFLAGS"
16597echo " CFLAGS...............: $CFLAGS"
16598echo " LDFLAGS..............: $LDFLAGS"
16599echo
16600echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
16601echo " prefix...............: $prefix"
16602echo
diff --git a/libraries/eet/configure.ac b/libraries/eet/configure.ac
new file mode 100644
index 0000000..984cd75
--- /dev/null
+++ b/libraries/eet/configure.ac
@@ -0,0 +1,490 @@
1y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1])
4m4_define([v_min], [5])
5m4_define([v_mic], [0])
6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8##-- When released, remove the dnl on the below line
9m4_undefine([v_rev])
10##-- When doing snapshots - change soname. remove dnl on below line
11dnl m4_define([relname], [ver-pre-svn-05])
12dnl m4_define([v_rel], [-release relname])
13##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
15m4_define([lt_cur], m4_eval(v_maj + v_min))
16m4_define([lt_rev], v_mic)
17m4_define([lt_age], v_min)
18##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21AC_INIT([eet], [v_ver], [enlightenment-devel@lists.sourceforge.net])
22AC_PREREQ([2.52])
23AC_CONFIG_SRCDIR([configure.ac])
24AC_CONFIG_MACRO_DIR([m4])
25
26AC_CONFIG_HEADERS([config.h])
27AH_TOP([
28#ifndef EFL_CONFIG_H__
29#define EFL_CONFIG_H__
30])
31AH_BOTTOM([
32#endif /* EFL_CONFIG_H__ */
33])
34
35AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38AC_LIBTOOL_WIN32_DLL
39define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
40define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
41AC_PROG_LIBTOOL
42
43##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
44##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
45m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
46m4_ifdef([v_rel], , [m4_define([v_rel], [])])
47AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
48AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
49AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
50AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
51version_info="lt_cur:lt_rev:lt_age"
52release_info="v_rel"
53AC_SUBST(version_info)
54AC_SUBST(release_info)
55##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
56##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
57VMAJ=v_maj
58AC_SUBST(VMAJ)
59
60
61### Needed information
62
63AC_CANONICAL_BUILD
64AC_CANONICAL_HOST
65
66### Default options with respect to host
67
68want_gnutls="auto"
69want_openssl="auto"
70want_cipher="yes"
71want_signature="yes"
72
73requirement_eet=""
74
75
76### Additional options to configure
77
78# Amalgamation
79
80AC_ARG_ENABLE([amalgamation],
81 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
82 [if test "x${enableval}" = "xyes"; then
83 do_amalgamation="yes"
84 else
85 do_amalgamation="no"
86 fi
87 ],
88 [do_amalgamation="no"]
89)
90AM_CONDITIONAL(EET_AMALGAMATION, test "x${do_amalgamation}" = "xyes")
91
92EFL_ENABLE_BIN([eet])
93
94# Old eet file format support
95
96old_eet_file_format="yes"
97AC_ARG_ENABLE(old-eet-file-format,
98 [AC_HELP_STRING(
99 [--disable-old-eet-file-format],
100 [disable old eet file format support. [[default=enabled]]]
101 )],
102 [old_eet_file_format=$enableval]
103)
104AC_MSG_CHECKING([whether to support old eet file format])
105AC_MSG_RESULT([${old_eet_file_format}])
106
107if test "x${old_eet_file_format}" = "xyes" ; then
108 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 1, [support old eet file format])
109else
110 AC_DEFINE(EET_OLD_EET_FILE_FORMAT, 0, [support old eet file format])
111fi
112
113# Gnutls support
114
115AC_ARG_ENABLE([gnutls],
116 [AC_HELP_STRING([--disable-gnutls], [disable gnutls eet support])],
117 [want_gnutls=$enableval]
118)
119AC_MSG_CHECKING([whether to use Gnutls])
120AC_MSG_RESULT([${want_gnutls}])
121
122# Specific GNUTLS improvement
123
124new_gnutls_api="yes"
125AC_ARG_ENABLE(new-gnutls-api,
126 [AC_HELP_STRING(
127 [--disable-new-gnutls-api],
128 [enable use of gnutls_x509_crt_verify_hash. [[default=enable]]]
129 )],
130 [new_gnutls_api=$enableval]
131)
132AC_MSG_CHECKING([whether to use gnutls_x509_crt_verify_hash])
133AC_MSG_RESULT([${new_gnutls_api}])
134
135if test "x${new_gnutls_api}" = "xyes" ; then
136 AC_CHECK_LIB(gnutls, gnutls_x509_crt_verify_hash,
137 [ new_gnutls_api="yes" ],
138 [ new_gnutls_api="no" ]
139 )
140
141 if test "x${new_gnutls_api}" = "xyes"; then
142 AC_DEFINE(EET_USE_NEW_GNUTLS_API, 1, [use gnutls_x509_crt_verify_hash])
143 fi
144fi
145
146# Openssl support
147
148AC_ARG_ENABLE([openssl],
149 [AC_HELP_STRING([--disable-openssl], [disable openssl eet support])],
150 [want_openssl=$enableval]
151)
152AC_MSG_CHECKING([whether to use OpenSSL])
153AC_MSG_RESULT([${want_openssl}])
154
155# Cryptography support
156
157AC_ARG_ENABLE([cipher],
158 [AC_HELP_STRING([--disable-cipher], [disable cipher support for eet API])],
159 [want_cipher=$enableval]
160)
161AC_MSG_CHECKING([whether to use cipher])
162AC_MSG_RESULT([${want_cipher}])
163
164AC_ARG_ENABLE([signature],
165 [AC_HELP_STRING([--disable-signature], [disable signature file support for eet])],
166 [want_signature=$enableval]
167)
168AC_MSG_CHECKING([whether to use signature])
169AC_MSG_RESULT([${want_signature}])
170
171# Assert or fail.
172prefer_assert="no"
173AC_ARG_ENABLE([assert],
174 [AC_HELP_STRING([--enable-assert], [enable assert, [[default=disabled]]])],
175 [prefer_assert=$enableval]
176)
177
178# Examples
179
180AC_ARG_ENABLE([install-examples],
181 [AC_HELP_STRING([--disable-install-examples],
182 [disable installing examples (compiled or just source). @<:@default==enabled@:>@])],
183 [
184 if test "x${enableval}" = "xyes" ; then
185 install_examples="yes"
186 else
187 install_examples="no"
188 fi
189 ],
190 [install_examples="yes"])
191AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
192
193AC_ARG_ENABLE([build-examples],
194 [AC_HELP_STRING([--enable-build-examples],
195 [enable building examples. @<:@default==disabled@:>@])],
196 [
197 if test "x${enableval}" = "xyes" ; then
198 build_examples="yes"
199 else
200 build_examples="no"
201 fi
202 ],
203 [build_examples="no"])
204AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
205
206# Unit tests, coverage and benchmarking
207
208EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
209EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
210
211if test "x${prefer_assert}" = "xno"; then
212 DEBUG_CFLAGS="-DNDEBUG"
213else
214# use debug symbols and set DEBUG if coverage support is enabled
215 DEBUG_CFLAGS="${EFL_DEBUG_CFLAGS}"
216fi
217AC_SUBST(DEBUG_CFLAGS)
218
219
220### Checks for programs
221AC_PROG_CC
222
223# pkg-config
224PKG_PROG_PKG_CONFIG
225
226# Check whether pkg-config supports Requires.private
227if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
228 pkgconfig_requires_private="Requires.private"
229else
230 pkgconfig_requires_private="Requires"
231fi
232AC_SUBST(pkgconfig_requires_private)
233
234
235# doxygen program for documentation building
236
237EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
238
239### Checks for libraries
240
241# Evil library for compilation on Windows
242
243EFL_EET_BUILD=""
244case "$host_os" in
245 mingw*)
246 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
247 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
248 requirement_eet="evil ${requirement_eet}"
249 EFL_EET_BUILD="-DEFL_EET_BUILD"
250 ;;
251esac
252AC_SUBST(EFL_EET_BUILD)
253
254EET_LIBS=""
255case "$host_os" in
256 mingw32ce*)
257 EET_LIBS="-lws2"
258 ;;
259 mingw*)
260 EET_LIBS="-lws2_32"
261 ;;
262esac
263AC_SUBST(EET_LIBS)
264
265# Eina library
266
267PKG_CHECK_MODULES(EINA, [eina >= 1.1.0])
268requirement_eet="eina >= 1.1.0 ${requirement_eet}"
269
270# Gnutls library
271have_gnutls="no"
272if test "x${want_gnutls}" = "xyes" || test "x${want_gnutls}" = "xauto" ; then
273 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.7.6],
274 [
275 have_gnutls="yes"
276 want_openssl="no"
277 AC_DEFINE(HAVE_GNUTLS, 1, [Have Gnutls support])
278 requirement_eet="gnutls ${requirement_eet}"
279 ],
280 [have_gnutls="no"])
281 if test "x${have_gnutls}" = "xyes" ; then
282 AC_PATH_GENERIC([libgcrypt], [], [have_gnutls="yes"], [have_gnutls="no"])
283 if test "x${have_gnutls}" = "xyes" ; then
284 GNUTLS_CFLAGS="${GNUTLS_CFLAGS} ${LIBGCRYPT_CFLAGS}"
285 GNUTLS_LIBS="${GNUTLS_LIBS} ${LIBGCRYPT_LIBS}"
286 fi
287 fi
288fi
289
290# Openssl library
291have_openssl="no"
292if test "x${want_openssl}" = "xyes" || test "x${want_openssl}" = "xauto" ; then
293 PKG_CHECK_MODULES(OPENSSL, openssl,
294 [
295 have_openssl="yes"
296 AC_DEFINE(HAVE_OPENSSL, 1, [Have Openssl support])
297 requirement_eet="openssl ${requirement_eet}"
298 ],
299 [have_openssl="no"])
300fi
301
302if test "x${have_gnutls}" = "xyes" ; then
303 secure_layer="GnuTLS"
304elif test "x${have_openssl}" = "xyes" ; then
305 secure_layer="OpenSSL"
306else
307 secure_layer="no"
308fi
309
310have_cipher="no"
311if test "x${have_gnutls}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
312 have_cipher="yes"
313 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
314elif test "x${have_openssl}" = "xyes" && test "x${want_cipher}" = "xyes" ; then
315 have_cipher="yes"
316 AC_DEFINE(HAVE_CIPHER, 1, [Have cipher support built in eet])
317fi
318
319AC_MSG_CHECKING(whether to activate cipher support in eet)
320AC_MSG_RESULT(${have_cipher})
321
322have_signature="no"
323if test "x${have_gnutls}" = "xyes" && test "x${want_signature}" = "xyes" ; then
324 have_signature="yes"
325 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
326elif test "x${have_openssl}" = "xyes" && test "x${want_signature}" = "xyes" ; then
327 have_signature="yes"
328 AC_DEFINE(HAVE_SIGNATURE, 1, [Have signature support for eet file])
329fi
330
331AC_MSG_CHECKING(whether to activate signature support in eet)
332AC_MSG_RESULT(${have_signature})
333
334### Checks for header files
335
336AC_CHECK_HEADER([zlib.h],
337 [dummy="yes"],
338 [AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
339
340AC_CHECK_HEADER([jpeglib.h],
341 [dummy="yes"],
342 [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
343
344AC_CHECK_HEADERS(netinet/in.h unistd.h)
345EFL_CHECK_PATH_MAX
346
347### Checks for types
348
349
350### Checks for structures
351
352
353### Checks for compiler characteristics
354AM_PROG_CC_C_O
355AC_C_CONST
356AC_C_INLINE
357AC_PROG_CC_STDC
358AC_C___ATTRIBUTE__
359
360# Check whether the null pointer is zero on this arch
361AC_TRY_RUN(
362 [
363#include <stdlib.h>
364#include <inttypes.h>
365int main (int argc, char **argv) {
366 void *foo = NULL;
367 uintptr_t bar = (uintptr_t)foo;
368 return (uintptr_t)foo;
369}
370 ],
371 [have_null="yes"],
372 [have_null="no"],
373 [
374 AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
375 have_null="yes"
376 ])
377AC_MSG_CHECKING([value of the null pointer])
378AC_MSG_RESULT([${have_null}])
379
380if test ! "x${have_null}" = "xyes" ; then
381 AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
382fi
383
384# These are needed for fmemopen/open_memstream
385AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
386
387EET_CPPFLAGS=""
388EET_CFLAGS=""
389case "$host_os" in
390 mingw32ce*)
391 EET_CPPFLAGS="-D_WIN32_WCE=0x0420"
392 ;;
393 mingw*)
394 EET_CPPFLAGS="-D_WIN32_WINNT=0x0501"
395 ;;
396esac
397AC_SUBST(EET_CPPFLAGS)
398AC_SUBST(EET_CFLAGS)
399
400
401### Checks for linker characteristics
402
403# use --enable-auto-import on Windows
404
405lt_enable_auto_import=""
406case "$host_os" in
407 mingw*)
408 lt_enable_auto_import="-Wl,--enable-auto-import"
409 ;;
410esac
411AC_SUBST(lt_enable_auto_import)
412
413case "${host_os}" in
414 openbsd*)
415 ;;
416 *)
417 EFL_LINKER_FLAG([-Wl,--as-needed])
418 ;;
419esac
420
421
422### Checks for library functions
423AC_ISC_POSIX
424AC_FUNC_ALLOCA
425
426AC_CHECK_FUNCS(fmemopen open_memstream realpath)
427
428EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
429
430
431AC_SUBST(requirement_eet)
432
433AC_OUTPUT([
434Makefile
435eet.pc
436doc/Makefile
437doc/Doxyfile
438doc/eet.dox
439src/Makefile
440src/lib/Makefile
441src/bin/Makefile
442src/tests/Makefile
443src/examples/Makefile
444eet.spec
445])
446
447
448#####################################################################
449## Info
450
451echo
452echo
453echo
454echo "------------------------------------------------------------------------"
455echo "$PACKAGE_NAME $PACKAGE_VERSION"
456echo "------------------------------------------------------------------------"
457echo
458echo "Configuration Options Summary:"
459echo
460echo " Amalgamation.........: ${do_amalgamation}"
461echo " Secure layer.........: ${secure_layer}"
462if test "x${have_gnutls}" = "xyes" || test "x${have_openssl}" = "xyes" ; then
463 echo " Cipher support.....: ${have_cipher}"
464 echo " Signature..........: ${have_signature}"
465fi
466echo
467echo " Old eet file format..: ${old_eet_file_format}"
468echo
469echo " Tests................: ${enable_tests}"
470echo " Coverage.............: ${enable_coverage}"
471echo
472echo " Build eet............: $have_eet"
473echo
474echo " Documentation........: ${build_doc}"
475if test "x${build_doc}" = "xyes" ; then
476 echo " Building...........: make doc"
477fi
478echo " Examples.............: ${build_examples}"
479if test "x${build_examples}" = "xyes" ; then
480 echo " Install............: ${install_examples}"
481fi
482echo
483echo "Compilation............: make (or gmake)"
484echo " CPPFLAGS.............: $CPPFLAGS"
485echo " CFLAGS...............: $CFLAGS"
486echo " LDFLAGS..............: $LDFLAGS"
487echo
488echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
489echo " prefix...............: $prefix"
490echo
diff --git a/libraries/eet/depcomp b/libraries/eet/depcomp
new file mode 100755
index 0000000..df8eea7
--- /dev/null
+++ b/libraries/eet/depcomp
@@ -0,0 +1,630 @@
1#! /bin/sh
2# depcomp - compile a program generating dependencies as side-effects
3
4scriptversion=2009-04-28.21; # UTC
5
6# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
7# Software Foundation, Inc.
8
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2, or (at your option)
12# any later version.
13
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program.
26
27# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
28
29case $1 in
30 '')
31 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
32 exit 1;
33 ;;
34 -h | --h*)
35 cat <<\EOF
36Usage: depcomp [--help] [--version] PROGRAM [ARGS]
37
38Run PROGRAMS ARGS to compile a file, generating dependencies
39as side-effects.
40
41Environment variables:
42 depmode Dependency tracking mode.
43 source Source file read by `PROGRAMS ARGS'.
44 object Object file output by `PROGRAMS ARGS'.
45 DEPDIR directory where to store dependencies.
46 depfile Dependency file to output.
47 tmpdepfile Temporary file to use when outputing dependencies.
48 libtool Whether libtool is used (yes/no).
49
50Report bugs to <bug-automake@gnu.org>.
51EOF
52 exit $?
53 ;;
54 -v | --v*)
55 echo "depcomp $scriptversion"
56 exit $?
57 ;;
58esac
59
60if test -z "$depmode" || test -z "$source" || test -z "$object"; then
61 echo "depcomp: Variables source, object and depmode must be set" 1>&2
62 exit 1
63fi
64
65# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
66depfile=${depfile-`echo "$object" |
67 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
68tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
69
70rm -f "$tmpdepfile"
71
72# Some modes work just like other modes, but use different flags. We
73# parameterize here, but still list the modes in the big case below,
74# to make depend.m4 easier to write. Note that we *cannot* use a case
75# here, because this file can only contain one case statement.
76if test "$depmode" = hp; then
77 # HP compiler uses -M and no extra arg.
78 gccflag=-M
79 depmode=gcc
80fi
81
82if test "$depmode" = dashXmstdout; then
83 # This is just like dashmstdout with a different argument.
84 dashmflag=-xM
85 depmode=dashmstdout
86fi
87
88cygpath_u="cygpath -u -f -"
89if test "$depmode" = msvcmsys; then
90 # This is just like msvisualcpp but w/o cygpath translation.
91 # Just convert the backslash-escaped backslashes to single forward
92 # slashes to satisfy depend.m4
93 cygpath_u="sed s,\\\\\\\\,/,g"
94 depmode=msvisualcpp
95fi
96
97case "$depmode" in
98gcc3)
99## gcc 3 implements dependency tracking that does exactly what
100## we want. Yay! Note: for some reason libtool 1.4 doesn't like
101## it if -MD -MP comes after the -MF stuff. Hmm.
102## Unfortunately, FreeBSD c89 acceptance of flags depends upon
103## the command line argument order; so add the flags where they
104## appear in depend2.am. Note that the slowdown incurred here
105## affects only configure: in makefiles, %FASTDEP% shortcuts this.
106 for arg
107 do
108 case $arg in
109 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
110 *) set fnord "$@" "$arg" ;;
111 esac
112 shift # fnord
113 shift # $arg
114 done
115 "$@"
116 stat=$?
117 if test $stat -eq 0; then :
118 else
119 rm -f "$tmpdepfile"
120 exit $stat
121 fi
122 mv "$tmpdepfile" "$depfile"
123 ;;
124
125gcc)
126## There are various ways to get dependency output from gcc. Here's
127## why we pick this rather obscure method:
128## - Don't want to use -MD because we'd like the dependencies to end
129## up in a subdir. Having to rename by hand is ugly.
130## (We might end up doing this anyway to support other compilers.)
131## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
132## -MM, not -M (despite what the docs say).
133## - Using -M directly means running the compiler twice (even worse
134## than renaming).
135 if test -z "$gccflag"; then
136 gccflag=-MD,
137 fi
138 "$@" -Wp,"$gccflag$tmpdepfile"
139 stat=$?
140 if test $stat -eq 0; then :
141 else
142 rm -f "$tmpdepfile"
143 exit $stat
144 fi
145 rm -f "$depfile"
146 echo "$object : \\" > "$depfile"
147 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
148## The second -e expression handles DOS-style file names with drive letters.
149 sed -e 's/^[^:]*: / /' \
150 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
151## This next piece of magic avoids the `deleted header file' problem.
152## The problem is that when a header file which appears in a .P file
153## is deleted, the dependency causes make to die (because there is
154## typically no way to rebuild the header). We avoid this by adding
155## dummy dependencies for each header file. Too bad gcc doesn't do
156## this for us directly.
157 tr ' ' '
158' < "$tmpdepfile" |
159## Some versions of gcc put a space before the `:'. On the theory
160## that the space means something, we add a space to the output as
161## well.
162## Some versions of the HPUX 10.20 sed can't process this invocation
163## correctly. Breaking it into two sed invocations is a workaround.
164 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
165 rm -f "$tmpdepfile"
166 ;;
167
168hp)
169 # This case exists only to let depend.m4 do its work. It works by
170 # looking at the text of this script. This case will never be run,
171 # since it is checked for above.
172 exit 1
173 ;;
174
175sgi)
176 if test "$libtool" = yes; then
177 "$@" "-Wp,-MDupdate,$tmpdepfile"
178 else
179 "$@" -MDupdate "$tmpdepfile"
180 fi
181 stat=$?
182 if test $stat -eq 0; then :
183 else
184 rm -f "$tmpdepfile"
185 exit $stat
186 fi
187 rm -f "$depfile"
188
189 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
190 echo "$object : \\" > "$depfile"
191
192 # Clip off the initial element (the dependent). Don't try to be
193 # clever and replace this with sed code, as IRIX sed won't handle
194 # lines with more than a fixed number of characters (4096 in
195 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
196 # the IRIX cc adds comments like `#:fec' to the end of the
197 # dependency line.
198 tr ' ' '
199' < "$tmpdepfile" \
200 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
201 tr '
202' ' ' >> "$depfile"
203 echo >> "$depfile"
204
205 # The second pass generates a dummy entry for each header file.
206 tr ' ' '
207' < "$tmpdepfile" \
208 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
209 >> "$depfile"
210 else
211 # The sourcefile does not contain any dependencies, so just
212 # store a dummy comment line, to avoid errors with the Makefile
213 # "include basename.Plo" scheme.
214 echo "#dummy" > "$depfile"
215 fi
216 rm -f "$tmpdepfile"
217 ;;
218
219aix)
220 # The C for AIX Compiler uses -M and outputs the dependencies
221 # in a .u file. In older versions, this file always lives in the
222 # current directory. Also, the AIX compiler puts `$object:' at the
223 # start of each line; $object doesn't have directory information.
224 # Version 6 uses the directory in both cases.
225 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
226 test "x$dir" = "x$object" && dir=
227 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
228 if test "$libtool" = yes; then
229 tmpdepfile1=$dir$base.u
230 tmpdepfile2=$base.u
231 tmpdepfile3=$dir.libs/$base.u
232 "$@" -Wc,-M
233 else
234 tmpdepfile1=$dir$base.u
235 tmpdepfile2=$dir$base.u
236 tmpdepfile3=$dir$base.u
237 "$@" -M
238 fi
239 stat=$?
240
241 if test $stat -eq 0; then :
242 else
243 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
244 exit $stat
245 fi
246
247 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
248 do
249 test -f "$tmpdepfile" && break
250 done
251 if test -f "$tmpdepfile"; then
252 # Each line is of the form `foo.o: dependent.h'.
253 # Do two passes, one to just change these to
254 # `$object: dependent.h' and one to simply `dependent.h:'.
255 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
256 # That's a tab and a space in the [].
257 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
258 else
259 # The sourcefile does not contain any dependencies, so just
260 # store a dummy comment line, to avoid errors with the Makefile
261 # "include basename.Plo" scheme.
262 echo "#dummy" > "$depfile"
263 fi
264 rm -f "$tmpdepfile"
265 ;;
266
267icc)
268 # Intel's C compiler understands `-MD -MF file'. However on
269 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
270 # ICC 7.0 will fill foo.d with something like
271 # foo.o: sub/foo.c
272 # foo.o: sub/foo.h
273 # which is wrong. We want:
274 # sub/foo.o: sub/foo.c
275 # sub/foo.o: sub/foo.h
276 # sub/foo.c:
277 # sub/foo.h:
278 # ICC 7.1 will output
279 # foo.o: sub/foo.c sub/foo.h
280 # and will wrap long lines using \ :
281 # foo.o: sub/foo.c ... \
282 # sub/foo.h ... \
283 # ...
284
285 "$@" -MD -MF "$tmpdepfile"
286 stat=$?
287 if test $stat -eq 0; then :
288 else
289 rm -f "$tmpdepfile"
290 exit $stat
291 fi
292 rm -f "$depfile"
293 # Each line is of the form `foo.o: dependent.h',
294 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
295 # Do two passes, one to just change these to
296 # `$object: dependent.h' and one to simply `dependent.h:'.
297 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
298 # Some versions of the HPUX 10.20 sed can't process this invocation
299 # correctly. Breaking it into two sed invocations is a workaround.
300 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
301 sed -e 's/$/ :/' >> "$depfile"
302 rm -f "$tmpdepfile"
303 ;;
304
305hp2)
306 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
307 # compilers, which have integrated preprocessors. The correct option
308 # to use with these is +Maked; it writes dependencies to a file named
309 # 'foo.d', which lands next to the object file, wherever that
310 # happens to be.
311 # Much of this is similar to the tru64 case; see comments there.
312 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
313 test "x$dir" = "x$object" && dir=
314 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
315 if test "$libtool" = yes; then
316 tmpdepfile1=$dir$base.d
317 tmpdepfile2=$dir.libs/$base.d
318 "$@" -Wc,+Maked
319 else
320 tmpdepfile1=$dir$base.d
321 tmpdepfile2=$dir$base.d
322 "$@" +Maked
323 fi
324 stat=$?
325 if test $stat -eq 0; then :
326 else
327 rm -f "$tmpdepfile1" "$tmpdepfile2"
328 exit $stat
329 fi
330
331 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
332 do
333 test -f "$tmpdepfile" && break
334 done
335 if test -f "$tmpdepfile"; then
336 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
337 # Add `dependent.h:' lines.
338 sed -ne '2,${
339 s/^ *//
340 s/ \\*$//
341 s/$/:/
342 p
343 }' "$tmpdepfile" >> "$depfile"
344 else
345 echo "#dummy" > "$depfile"
346 fi
347 rm -f "$tmpdepfile" "$tmpdepfile2"
348 ;;
349
350tru64)
351 # The Tru64 compiler uses -MD to generate dependencies as a side
352 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
353 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
354 # dependencies in `foo.d' instead, so we check for that too.
355 # Subdirectories are respected.
356 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
357 test "x$dir" = "x$object" && dir=
358 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
359
360 if test "$libtool" = yes; then
361 # With Tru64 cc, shared objects can also be used to make a
362 # static library. This mechanism is used in libtool 1.4 series to
363 # handle both shared and static libraries in a single compilation.
364 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
365 #
366 # With libtool 1.5 this exception was removed, and libtool now
367 # generates 2 separate objects for the 2 libraries. These two
368 # compilations output dependencies in $dir.libs/$base.o.d and
369 # in $dir$base.o.d. We have to check for both files, because
370 # one of the two compilations can be disabled. We should prefer
371 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
372 # automatically cleaned when .libs/ is deleted, while ignoring
373 # the former would cause a distcleancheck panic.
374 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
375 tmpdepfile2=$dir$base.o.d # libtool 1.5
376 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
377 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
378 "$@" -Wc,-MD
379 else
380 tmpdepfile1=$dir$base.o.d
381 tmpdepfile2=$dir$base.d
382 tmpdepfile3=$dir$base.d
383 tmpdepfile4=$dir$base.d
384 "$@" -MD
385 fi
386
387 stat=$?
388 if test $stat -eq 0; then :
389 else
390 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
391 exit $stat
392 fi
393
394 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
395 do
396 test -f "$tmpdepfile" && break
397 done
398 if test -f "$tmpdepfile"; then
399 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
400 # That's a tab and a space in the [].
401 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
402 else
403 echo "#dummy" > "$depfile"
404 fi
405 rm -f "$tmpdepfile"
406 ;;
407
408#nosideeffect)
409 # This comment above is used by automake to tell side-effect
410 # dependency tracking mechanisms from slower ones.
411
412dashmstdout)
413 # Important note: in order to support this mode, a compiler *must*
414 # always write the preprocessed file to stdout, regardless of -o.
415 "$@" || exit $?
416
417 # Remove the call to Libtool.
418 if test "$libtool" = yes; then
419 while test "X$1" != 'X--mode=compile'; do
420 shift
421 done
422 shift
423 fi
424
425 # Remove `-o $object'.
426 IFS=" "
427 for arg
428 do
429 case $arg in
430 -o)
431 shift
432 ;;
433 $object)
434 shift
435 ;;
436 *)
437 set fnord "$@" "$arg"
438 shift # fnord
439 shift # $arg
440 ;;
441 esac
442 done
443
444 test -z "$dashmflag" && dashmflag=-M
445 # Require at least two characters before searching for `:'
446 # in the target name. This is to cope with DOS-style filenames:
447 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
448 "$@" $dashmflag |
449 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
450 rm -f "$depfile"
451 cat < "$tmpdepfile" > "$depfile"
452 tr ' ' '
453' < "$tmpdepfile" | \
454## Some versions of the HPUX 10.20 sed can't process this invocation
455## correctly. Breaking it into two sed invocations is a workaround.
456 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
457 rm -f "$tmpdepfile"
458 ;;
459
460dashXmstdout)
461 # This case only exists to satisfy depend.m4. It is never actually
462 # run, as this mode is specially recognized in the preamble.
463 exit 1
464 ;;
465
466makedepend)
467 "$@" || exit $?
468 # Remove any Libtool call
469 if test "$libtool" = yes; then
470 while test "X$1" != 'X--mode=compile'; do
471 shift
472 done
473 shift
474 fi
475 # X makedepend
476 shift
477 cleared=no eat=no
478 for arg
479 do
480 case $cleared in
481 no)
482 set ""; shift
483 cleared=yes ;;
484 esac
485 if test $eat = yes; then
486 eat=no
487 continue
488 fi
489 case "$arg" in
490 -D*|-I*)
491 set fnord "$@" "$arg"; shift ;;
492 # Strip any option that makedepend may not understand. Remove
493 # the object too, otherwise makedepend will parse it as a source file.
494 -arch)
495 eat=yes ;;
496 -*|$object)
497 ;;
498 *)
499 set fnord "$@" "$arg"; shift ;;
500 esac
501 done
502 obj_suffix=`echo "$object" | sed 's/^.*\././'`
503 touch "$tmpdepfile"
504 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
505 rm -f "$depfile"
506 cat < "$tmpdepfile" > "$depfile"
507 sed '1,2d' "$tmpdepfile" | tr ' ' '
508' | \
509## Some versions of the HPUX 10.20 sed can't process this invocation
510## correctly. Breaking it into two sed invocations is a workaround.
511 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
512 rm -f "$tmpdepfile" "$tmpdepfile".bak
513 ;;
514
515cpp)
516 # Important note: in order to support this mode, a compiler *must*
517 # always write the preprocessed file to stdout.
518 "$@" || exit $?
519
520 # Remove the call to Libtool.
521 if test "$libtool" = yes; then
522 while test "X$1" != 'X--mode=compile'; do
523 shift
524 done
525 shift
526 fi
527
528 # Remove `-o $object'.
529 IFS=" "
530 for arg
531 do
532 case $arg in
533 -o)
534 shift
535 ;;
536 $object)
537 shift
538 ;;
539 *)
540 set fnord "$@" "$arg"
541 shift # fnord
542 shift # $arg
543 ;;
544 esac
545 done
546
547 "$@" -E |
548 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
549 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
550 sed '$ s: \\$::' > "$tmpdepfile"
551 rm -f "$depfile"
552 echo "$object : \\" > "$depfile"
553 cat < "$tmpdepfile" >> "$depfile"
554 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
555 rm -f "$tmpdepfile"
556 ;;
557
558msvisualcpp)
559 # Important note: in order to support this mode, a compiler *must*
560 # always write the preprocessed file to stdout.
561 "$@" || exit $?
562
563 # Remove the call to Libtool.
564 if test "$libtool" = yes; then
565 while test "X$1" != 'X--mode=compile'; do
566 shift
567 done
568 shift
569 fi
570
571 IFS=" "
572 for arg
573 do
574 case "$arg" in
575 -o)
576 shift
577 ;;
578 $object)
579 shift
580 ;;
581 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
582 set fnord "$@"
583 shift
584 shift
585 ;;
586 *)
587 set fnord "$@" "$arg"
588 shift
589 shift
590 ;;
591 esac
592 done
593 "$@" -E 2>/dev/null |
594 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
595 rm -f "$depfile"
596 echo "$object : \\" > "$depfile"
597 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
598 echo " " >> "$depfile"
599 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
600 rm -f "$tmpdepfile"
601 ;;
602
603msvcmsys)
604 # This case exists only to let depend.m4 do its work. It works by
605 # looking at the text of this script. This case will never be run,
606 # since it is checked for above.
607 exit 1
608 ;;
609
610none)
611 exec "$@"
612 ;;
613
614*)
615 echo "Unknown depmode $depmode" 1>&2
616 exit 1
617 ;;
618esac
619
620exit 0
621
622# Local Variables:
623# mode: shell-script
624# sh-indentation: 2
625# eval: (add-hook 'write-file-hooks 'time-stamp)
626# time-stamp-start: "scriptversion="
627# time-stamp-format: "%:y-%02m-%02d.%02H"
628# time-stamp-time-zone: "UTC"
629# time-stamp-end: "; # UTC"
630# End:
diff --git a/libraries/eet/doc/Doxyfile b/libraries/eet/doc/Doxyfile
new file mode 100644
index 0000000..bf2352b
--- /dev/null
+++ b/libraries/eet/doc/Doxyfile
@@ -0,0 +1,139 @@
1PROJECT_NAME = Eet
2PROJECT_NUMBER = 1.5.0
3OUTPUT_DIRECTORY = .
4INPUT = ./eet.dox ./examples.dox ../src/lib
5IMAGE_PATH = img
6OUTPUT_LANGUAGE = English
7GENERATE_HTML = YES
8HTML_OUTPUT = html
9HTML_FILE_EXTENSION = .html
10HTML_HEADER = ./head.html
11HTML_FOOTER = ./foot.html
12HTML_STYLESHEET = ./e.css
13HTML_ALIGN_MEMBERS = YES
14ENUM_VALUES_PER_LINE = 1
15GENERATE_HTMLHELP = NO
16CHM_FILE =
17HHC_LOCATION =
18GENERATE_CHI = NO
19BINARY_TOC = NO
20TOC_EXPAND = NO
21DISABLE_INDEX = YES
22EXTRACT_ALL = NO
23EXTRACT_PRIVATE = NO
24EXTRACT_STATIC = NO
25EXTRACT_LOCAL_CLASSES = NO
26HIDE_UNDOC_MEMBERS = YES
27HIDE_UNDOC_CLASSES = YES
28HIDE_FRIEND_COMPOUNDS = YES
29BRIEF_MEMBER_DESC = YES
30REPEAT_BRIEF = YES
31ALWAYS_DETAILED_SEC = NO
32INLINE_INHERITED_MEMB = NO
33FULL_PATH_NAMES = NO
34STRIP_FROM_PATH =
35INTERNAL_DOCS = NO
36STRIP_CODE_COMMENTS = NO
37CASE_SENSE_NAMES = YES
38SHORT_NAMES = NO
39HIDE_SCOPE_NAMES = NO
40VERBATIM_HEADERS = NO
41SHOW_INCLUDE_FILES = NO
42JAVADOC_AUTOBRIEF = YES
43MULTILINE_CPP_IS_BRIEF = NO
44DETAILS_AT_TOP = NO
45INHERIT_DOCS = YES
46INLINE_INFO = YES
47SORT_MEMBER_DOCS = YES
48DISTRIBUTE_GROUP_DOC = NO
49TAB_SIZE = 8
50GENERATE_TODOLIST = YES
51GENERATE_TESTLIST = YES
52GENERATE_BUGLIST = YES
53GENERATE_DEPRECATEDLIST= YES
54ALIASES =
55ENABLED_SECTIONS =
56MAX_INITIALIZER_LINES = 30
57OPTIMIZE_OUTPUT_FOR_C = YES
58OPTIMIZE_OUTPUT_JAVA = NO
59SHOW_USED_FILES = NO
60QUIET = NO
61WARNINGS = YES
62WARN_IF_UNDOCUMENTED = YES
63WARN_FORMAT = "$file:$line: $text"
64WARN_LOGFILE =
65FILE_PATTERNS =
66RECURSIVE = NO
67EXCLUDE =
68EXCLUDE_SYMLINKS = NO
69EXCLUDE_PATTERNS =
70EXAMPLE_PATH = ../src/examples/
71EXAMPLE_PATTERNS =
72EXAMPLE_RECURSIVE = NO
73INPUT_FILTER =
74FILTER_SOURCE_FILES = NO
75SOURCE_BROWSER = NO
76INLINE_SOURCES = NO
77REFERENCED_BY_RELATION = YES
78REFERENCES_RELATION = YES
79ALPHABETICAL_INDEX = YES
80COLS_IN_ALPHA_INDEX = 2
81IGNORE_PREFIX = eet_ _eet_ Eet_ _Eet_ EET_ _EET_
82GENERATE_TREEVIEW = NO
83TREEVIEW_WIDTH = 250
84GENERATE_LATEX = YES
85LATEX_OUTPUT = latex
86LATEX_CMD_NAME = latex
87MAKEINDEX_CMD_NAME = makeindex
88COMPACT_LATEX = NO
89PAPER_TYPE = a4wide
90EXTRA_PACKAGES =
91LATEX_HEADER =
92PDF_HYPERLINKS = YES
93USE_PDFLATEX = YES
94LATEX_BATCHMODE = NO
95GENERATE_RTF = NO
96RTF_OUTPUT = rtf
97COMPACT_RTF = NO
98RTF_HYPERLINKS = NO
99RTF_STYLESHEET_FILE =
100RTF_EXTENSIONS_FILE =
101GENERATE_MAN = YES
102MAN_OUTPUT = man
103MAN_EXTENSION = .3
104MAN_LINKS = YES
105GENERATE_XML = NO
106XML_SCHEMA =
107XML_DTD =
108GENERATE_AUTOGEN_DEF = NO
109ENABLE_PREPROCESSING = YES
110MACRO_EXPANSION = NO
111EXPAND_ONLY_PREDEF = NO
112SEARCH_INCLUDES = NO
113INCLUDE_PATH =
114INCLUDE_FILE_PATTERNS =
115PREDEFINED =
116EXPAND_AS_DEFINED =
117SKIP_FUNCTION_MACROS = YES
118TAGFILES =
119GENERATE_TAGFILE =
120ALLEXTERNALS = NO
121EXTERNAL_GROUPS = YES
122PERL_PATH = /usr/bin/perl
123CLASS_DIAGRAMS = NO
124HIDE_UNDOC_RELATIONS = YES
125HAVE_DOT = NO
126CLASS_GRAPH = NO
127COLLABORATION_GRAPH = NO
128TEMPLATE_RELATIONS = NO
129INCLUDE_GRAPH = NO
130INCLUDED_BY_GRAPH = NO
131GRAPHICAL_HIERARCHY = NO
132DOT_IMAGE_FORMAT = png
133DOT_PATH =
134DOTFILE_DIRS =
135MAX_DOT_GRAPH_WIDTH = 512
136MAX_DOT_GRAPH_HEIGHT = 512
137GENERATE_LEGEND = YES
138DOT_CLEANUP = YES
139SEARCHENGINE = NO
diff --git a/libraries/eet/doc/Doxyfile.in b/libraries/eet/doc/Doxyfile.in
new file mode 100644
index 0000000..4ed5452
--- /dev/null
+++ b/libraries/eet/doc/Doxyfile.in
@@ -0,0 +1,139 @@
1PROJECT_NAME = Eet
2PROJECT_NUMBER = @PACKAGE_VERSION@
3OUTPUT_DIRECTORY = .
4INPUT = @srcdir@/eet.dox @srcdir@/examples.dox @top_srcdir@/src/lib
5IMAGE_PATH = img
6OUTPUT_LANGUAGE = English
7GENERATE_HTML = YES
8HTML_OUTPUT = html
9HTML_FILE_EXTENSION = .html
10HTML_HEADER = @srcdir@/head.html
11HTML_FOOTER = @srcdir@/foot.html
12HTML_STYLESHEET = @srcdir@/e.css
13HTML_ALIGN_MEMBERS = YES
14ENUM_VALUES_PER_LINE = 1
15GENERATE_HTMLHELP = NO
16CHM_FILE =
17HHC_LOCATION =
18GENERATE_CHI = NO
19BINARY_TOC = NO
20TOC_EXPAND = NO
21DISABLE_INDEX = YES
22EXTRACT_ALL = NO
23EXTRACT_PRIVATE = NO
24EXTRACT_STATIC = NO
25EXTRACT_LOCAL_CLASSES = NO
26HIDE_UNDOC_MEMBERS = YES
27HIDE_UNDOC_CLASSES = YES
28HIDE_FRIEND_COMPOUNDS = YES
29BRIEF_MEMBER_DESC = YES
30REPEAT_BRIEF = YES
31ALWAYS_DETAILED_SEC = NO
32INLINE_INHERITED_MEMB = NO
33FULL_PATH_NAMES = NO
34STRIP_FROM_PATH =
35INTERNAL_DOCS = NO
36STRIP_CODE_COMMENTS = NO
37CASE_SENSE_NAMES = YES
38SHORT_NAMES = NO
39HIDE_SCOPE_NAMES = NO
40VERBATIM_HEADERS = NO
41SHOW_INCLUDE_FILES = NO
42JAVADOC_AUTOBRIEF = YES
43MULTILINE_CPP_IS_BRIEF = NO
44DETAILS_AT_TOP = NO
45INHERIT_DOCS = YES
46INLINE_INFO = YES
47SORT_MEMBER_DOCS = YES
48DISTRIBUTE_GROUP_DOC = NO
49TAB_SIZE = 8
50GENERATE_TODOLIST = YES
51GENERATE_TESTLIST = YES
52GENERATE_BUGLIST = YES
53GENERATE_DEPRECATEDLIST= YES
54ALIASES =
55ENABLED_SECTIONS =
56MAX_INITIALIZER_LINES = 30
57OPTIMIZE_OUTPUT_FOR_C = YES
58OPTIMIZE_OUTPUT_JAVA = NO
59SHOW_USED_FILES = NO
60QUIET = NO
61WARNINGS = YES
62WARN_IF_UNDOCUMENTED = YES
63WARN_FORMAT = "$file:$line: $text"
64WARN_LOGFILE =
65FILE_PATTERNS =
66RECURSIVE = NO
67EXCLUDE =
68EXCLUDE_SYMLINKS = NO
69EXCLUDE_PATTERNS =
70EXAMPLE_PATH = @top_srcdir@/src/examples/
71EXAMPLE_PATTERNS =
72EXAMPLE_RECURSIVE = NO
73INPUT_FILTER =
74FILTER_SOURCE_FILES = NO
75SOURCE_BROWSER = NO
76INLINE_SOURCES = NO
77REFERENCED_BY_RELATION = YES
78REFERENCES_RELATION = YES
79ALPHABETICAL_INDEX = YES
80COLS_IN_ALPHA_INDEX = 2
81IGNORE_PREFIX = eet_ _eet_ Eet_ _Eet_ EET_ _EET_
82GENERATE_TREEVIEW = NO
83TREEVIEW_WIDTH = 250
84GENERATE_LATEX = YES
85LATEX_OUTPUT = latex
86LATEX_CMD_NAME = latex
87MAKEINDEX_CMD_NAME = makeindex
88COMPACT_LATEX = NO
89PAPER_TYPE = a4wide
90EXTRA_PACKAGES =
91LATEX_HEADER =
92PDF_HYPERLINKS = YES
93USE_PDFLATEX = YES
94LATEX_BATCHMODE = NO
95GENERATE_RTF = NO
96RTF_OUTPUT = rtf
97COMPACT_RTF = NO
98RTF_HYPERLINKS = NO
99RTF_STYLESHEET_FILE =
100RTF_EXTENSIONS_FILE =
101GENERATE_MAN = YES
102MAN_OUTPUT = man
103MAN_EXTENSION = .3
104MAN_LINKS = YES
105GENERATE_XML = NO
106XML_SCHEMA =
107XML_DTD =
108GENERATE_AUTOGEN_DEF = NO
109ENABLE_PREPROCESSING = YES
110MACRO_EXPANSION = NO
111EXPAND_ONLY_PREDEF = NO
112SEARCH_INCLUDES = NO
113INCLUDE_PATH =
114INCLUDE_FILE_PATTERNS =
115PREDEFINED =
116EXPAND_AS_DEFINED =
117SKIP_FUNCTION_MACROS = YES
118TAGFILES =
119GENERATE_TAGFILE =
120ALLEXTERNALS = NO
121EXTERNAL_GROUPS = YES
122PERL_PATH = /usr/bin/perl
123CLASS_DIAGRAMS = NO
124HIDE_UNDOC_RELATIONS = YES
125HAVE_DOT = NO
126CLASS_GRAPH = NO
127COLLABORATION_GRAPH = NO
128TEMPLATE_RELATIONS = NO
129INCLUDE_GRAPH = NO
130INCLUDED_BY_GRAPH = NO
131GRAPHICAL_HIERARCHY = NO
132DOT_IMAGE_FORMAT = png
133DOT_PATH =
134DOTFILE_DIRS =
135MAX_DOT_GRAPH_WIDTH = 512
136MAX_DOT_GRAPH_HEIGHT = 512
137GENERATE_LEGEND = YES
138DOT_CLEANUP = YES
139SEARCHENGINE = NO
diff --git a/libraries/eet/doc/Makefile.am b/libraries/eet/doc/Makefile.am
new file mode 100644
index 0000000..12f7073
--- /dev/null
+++ b/libraries/eet/doc/Makefile.am
@@ -0,0 +1,38 @@
1
2MAINTAINERCLEANFILES = Makefile.in eet.dox
3
4.PHONY: doc
5
6PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
7
8if EFL_BUILD_DOC
9
10doc-clean:
11 rm -rf html/ latex/ man/ xml/ $(PACKAGE_DOCNAME).tar*
12
13doc: doc-clean
14 $(efl_doxygen)
15 cp $(srcdir)/img/* html/
16 rm -rf $(PACKAGE_DOCNAME).tar*
17 mkdir -p $(PACKAGE_DOCNAME)/doc
18 cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
19 tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
20 bzip2 -9 $(PACKAGE_DOCNAME).tar
21 rm -rf $(PACKAGE_DOCNAME)/
22 mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
23
24clean-local: doc-clean
25
26else
27
28doc:
29 @echo "Documentation not built. Run ./configure --help"
30
31endif
32
33EXTRA_DIST = $(srcdir)/Doxyfile \
34 $(srcdir)/e.css \
35 $(srcdir)/foot.html \
36 $(srcdir)/head.html \
37 $(wildcard $(srcdir)/img/*.*) \
38 $(srcdir)/eet.dox.in
diff --git a/libraries/eet/doc/Makefile.in b/libraries/eet/doc/Makefile.in
new file mode 100644
index 0000000..c3bcf00
--- /dev/null
+++ b/libraries/eet/doc/Makefile.in
@@ -0,0 +1,439 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = doc
37DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \
38 $(srcdir)/Makefile.in $(srcdir)/eet.dox.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
41 $(top_srcdir)/m4/ac_path_generic.m4 \
42 $(top_srcdir)/m4/efl_binary.m4 \
43 $(top_srcdir)/m4/efl_compiler_flag.m4 \
44 $(top_srcdir)/m4/efl_coverage.m4 \
45 $(top_srcdir)/m4/efl_doxygen.m4 \
46 $(top_srcdir)/m4/efl_fnmatch.m4 \
47 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
48 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
49 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
50 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
51am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
52 $(ACLOCAL_M4)
53mkinstalldirs = $(install_sh) -d
54CONFIG_HEADER = $(top_builddir)/config.h
55CONFIG_CLEAN_FILES = Doxyfile eet.dox
56CONFIG_CLEAN_VPATH_FILES =
57AM_V_GEN = $(am__v_GEN_$(V))
58am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
59am__v_GEN_0 = @echo " GEN " $@;
60AM_V_at = $(am__v_at_$(V))
61am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
62am__v_at_0 = @
63SOURCES =
64DIST_SOURCES =
65DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
66ACLOCAL = @ACLOCAL@
67ALLOCA = @ALLOCA@
68AMTAR = @AMTAR@
69AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
70AR = @AR@
71AS = @AS@
72AUTOCONF = @AUTOCONF@
73AUTOHEADER = @AUTOHEADER@
74AUTOMAKE = @AUTOMAKE@
75AWK = @AWK@
76CC = @CC@
77CCDEPMODE = @CCDEPMODE@
78CFLAGS = @CFLAGS@
79CHECK_CFLAGS = @CHECK_CFLAGS@
80CHECK_LIBS = @CHECK_LIBS@
81CPP = @CPP@
82CPPFLAGS = @CPPFLAGS@
83CYGPATH_W = @CYGPATH_W@
84DEBUG_CFLAGS = @DEBUG_CFLAGS@
85DEFS = @DEFS@
86DEPDIR = @DEPDIR@
87DLLTOOL = @DLLTOOL@
88DSYMUTIL = @DSYMUTIL@
89DUMPBIN = @DUMPBIN@
90ECHO_C = @ECHO_C@
91ECHO_N = @ECHO_N@
92ECHO_T = @ECHO_T@
93EET_CFLAGS = @EET_CFLAGS@
94EET_CPPFLAGS = @EET_CPPFLAGS@
95EET_LIBS = @EET_LIBS@
96EET_PRG = @EET_PRG@
97EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
98EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
99EFL_EET_BUILD = @EFL_EET_BUILD@
100EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
101EGREP = @EGREP@
102EINA_CFLAGS = @EINA_CFLAGS@
103EINA_LIBS = @EINA_LIBS@
104EVIL_CFLAGS = @EVIL_CFLAGS@
105EVIL_LIBS = @EVIL_LIBS@
106EXEEXT = @EXEEXT@
107FGREP = @FGREP@
108GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
109GNUTLS_LIBS = @GNUTLS_LIBS@
110GREP = @GREP@
111INSTALL = @INSTALL@
112INSTALL_DATA = @INSTALL_DATA@
113INSTALL_PROGRAM = @INSTALL_PROGRAM@
114INSTALL_SCRIPT = @INSTALL_SCRIPT@
115INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
116LD = @LD@
117LDFLAGS = @LDFLAGS@
118LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
119LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
120LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
121LIBOBJS = @LIBOBJS@
122LIBS = @LIBS@
123LIBTOOL = @LIBTOOL@
124LIPO = @LIPO@
125LN_S = @LN_S@
126LTLIBOBJS = @LTLIBOBJS@
127MAKEINFO = @MAKEINFO@
128MKDIR_P = @MKDIR_P@
129NM = @NM@
130NMEDIT = @NMEDIT@
131OBJDUMP = @OBJDUMP@
132OBJEXT = @OBJEXT@
133OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
134OPENSSL_LIBS = @OPENSSL_LIBS@
135OTOOL = @OTOOL@
136OTOOL64 = @OTOOL64@
137PACKAGE = @PACKAGE@
138PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
139PACKAGE_NAME = @PACKAGE_NAME@
140PACKAGE_STRING = @PACKAGE_STRING@
141PACKAGE_TARNAME = @PACKAGE_TARNAME@
142PACKAGE_URL = @PACKAGE_URL@
143PACKAGE_VERSION = @PACKAGE_VERSION@
144PATH_SEPARATOR = @PATH_SEPARATOR@
145PKG_CONFIG = @PKG_CONFIG@
146PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
147PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
148RANLIB = @RANLIB@
149SED = @SED@
150SET_MAKE = @SET_MAKE@
151SHELL = @SHELL@
152STRIP = @STRIP@
153VERSION = @VERSION@
154VMAJ = @VMAJ@
155abs_builddir = @abs_builddir@
156abs_srcdir = @abs_srcdir@
157abs_top_builddir = @abs_top_builddir@
158abs_top_srcdir = @abs_top_srcdir@
159ac_ct_CC = @ac_ct_CC@
160ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
161am__include = @am__include@
162am__leading_dot = @am__leading_dot@
163am__quote = @am__quote@
164am__tar = @am__tar@
165am__untar = @am__untar@
166bindir = @bindir@
167build = @build@
168build_alias = @build_alias@
169build_cpu = @build_cpu@
170build_os = @build_os@
171build_vendor = @build_vendor@
172builddir = @builddir@
173datadir = @datadir@
174datarootdir = @datarootdir@
175docdir = @docdir@
176dvidir = @dvidir@
177efl_doxygen = @efl_doxygen@
178efl_have_doxygen = @efl_have_doxygen@
179exec_prefix = @exec_prefix@
180have_lcov = @have_lcov@
181host = @host@
182host_alias = @host_alias@
183host_cpu = @host_cpu@
184host_os = @host_os@
185host_vendor = @host_vendor@
186htmldir = @htmldir@
187includedir = @includedir@
188infodir = @infodir@
189install_sh = @install_sh@
190libdir = @libdir@
191libexecdir = @libexecdir@
192localedir = @localedir@
193localstatedir = @localstatedir@
194lt_ECHO = @lt_ECHO@
195lt_enable_auto_import = @lt_enable_auto_import@
196mandir = @mandir@
197mkdir_p = @mkdir_p@
198oldincludedir = @oldincludedir@
199pdfdir = @pdfdir@
200pkgconfig_requires_private = @pkgconfig_requires_private@
201prefix = @prefix@
202program_transform_name = @program_transform_name@
203psdir = @psdir@
204release_info = @release_info@
205requirement_eet = @requirement_eet@
206sbindir = @sbindir@
207sharedstatedir = @sharedstatedir@
208srcdir = @srcdir@
209sysconfdir = @sysconfdir@
210target_alias = @target_alias@
211top_build_prefix = @top_build_prefix@
212top_builddir = @top_builddir@
213top_srcdir = @top_srcdir@
214version_info = @version_info@
215MAINTAINERCLEANFILES = Makefile.in eet.dox
216PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc
217EXTRA_DIST = $(srcdir)/Doxyfile \
218 $(srcdir)/e.css \
219 $(srcdir)/foot.html \
220 $(srcdir)/head.html \
221 $(wildcard $(srcdir)/img/*.*) \
222 $(srcdir)/eet.dox.in
223
224all: all-am
225
226.SUFFIXES:
227$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
228 @for dep in $?; do \
229 case '$(am__configure_deps)' in \
230 *$$dep*) \
231 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
232 && { if test -f $@; then exit 0; else break; fi; }; \
233 exit 1;; \
234 esac; \
235 done; \
236 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
237 $(am__cd) $(top_srcdir) && \
238 $(AUTOMAKE) --gnu doc/Makefile
239.PRECIOUS: Makefile
240Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
241 @case '$?' in \
242 *config.status*) \
243 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
244 *) \
245 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
246 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
247 esac;
248
249$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
250 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
251
252$(top_srcdir)/configure: $(am__configure_deps)
253 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
254$(ACLOCAL_M4): $(am__aclocal_m4_deps)
255 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
256$(am__aclocal_m4_deps):
257Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in
258 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
259eet.dox: $(top_builddir)/config.status $(srcdir)/eet.dox.in
260 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
261
262mostlyclean-libtool:
263 -rm -f *.lo
264
265clean-libtool:
266 -rm -rf .libs _libs
267tags: TAGS
268TAGS:
269
270ctags: CTAGS
271CTAGS:
272
273
274distdir: $(DISTFILES)
275 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
276 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
277 list='$(DISTFILES)'; \
278 dist_files=`for file in $$list; do echo $$file; done | \
279 sed -e "s|^$$srcdirstrip/||;t" \
280 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
281 case $$dist_files in \
282 */*) $(MKDIR_P) `echo "$$dist_files" | \
283 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
284 sort -u` ;; \
285 esac; \
286 for file in $$dist_files; do \
287 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
288 if test -d $$d/$$file; then \
289 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
290 if test -d "$(distdir)/$$file"; then \
291 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
292 fi; \
293 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
294 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
295 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
296 fi; \
297 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
298 else \
299 test -f "$(distdir)/$$file" \
300 || cp -p $$d/$$file "$(distdir)/$$file" \
301 || exit 1; \
302 fi; \
303 done
304check-am: all-am
305check: check-am
306all-am: Makefile
307installdirs:
308install: install-am
309install-exec: install-exec-am
310install-data: install-data-am
311uninstall: uninstall-am
312
313install-am: all-am
314 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
315
316installcheck: installcheck-am
317install-strip:
318 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
319 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
320 `test -z '$(STRIP)' || \
321 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
322mostlyclean-generic:
323
324clean-generic:
325
326distclean-generic:
327 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
328 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
329
330maintainer-clean-generic:
331 @echo "This command is intended for maintainers to use"
332 @echo "it deletes files that may require special tools to rebuild."
333 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
334@EFL_BUILD_DOC_FALSE@clean-local:
335clean: clean-am
336
337clean-am: clean-generic clean-libtool clean-local mostlyclean-am
338
339distclean: distclean-am
340 -rm -f Makefile
341distclean-am: clean-am distclean-generic
342
343dvi: dvi-am
344
345dvi-am:
346
347html: html-am
348
349html-am:
350
351info: info-am
352
353info-am:
354
355install-data-am:
356
357install-dvi: install-dvi-am
358
359install-dvi-am:
360
361install-exec-am:
362
363install-html: install-html-am
364
365install-html-am:
366
367install-info: install-info-am
368
369install-info-am:
370
371install-man:
372
373install-pdf: install-pdf-am
374
375install-pdf-am:
376
377install-ps: install-ps-am
378
379install-ps-am:
380
381installcheck-am:
382
383maintainer-clean: maintainer-clean-am
384 -rm -f Makefile
385maintainer-clean-am: distclean-am maintainer-clean-generic
386
387mostlyclean: mostlyclean-am
388
389mostlyclean-am: mostlyclean-generic mostlyclean-libtool
390
391pdf: pdf-am
392
393pdf-am:
394
395ps: ps-am
396
397ps-am:
398
399uninstall-am:
400
401.MAKE: install-am install-strip
402
403.PHONY: all all-am check check-am clean clean-generic clean-libtool \
404 clean-local distclean distclean-generic distclean-libtool \
405 distdir dvi dvi-am html html-am info info-am install \
406 install-am install-data install-data-am install-dvi \
407 install-dvi-am install-exec install-exec-am install-html \
408 install-html-am install-info install-info-am install-man \
409 install-pdf install-pdf-am install-ps install-ps-am \
410 install-strip installcheck installcheck-am installdirs \
411 maintainer-clean maintainer-clean-generic mostlyclean \
412 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
413 uninstall uninstall-am
414
415
416.PHONY: doc
417
418@EFL_BUILD_DOC_TRUE@doc-clean:
419@EFL_BUILD_DOC_TRUE@ rm -rf html/ latex/ man/ xml/ $(PACKAGE_DOCNAME).tar*
420
421@EFL_BUILD_DOC_TRUE@doc: doc-clean
422@EFL_BUILD_DOC_TRUE@ $(efl_doxygen)
423@EFL_BUILD_DOC_TRUE@ cp $(srcdir)/img/* html/
424@EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME).tar*
425@EFL_BUILD_DOC_TRUE@ mkdir -p $(PACKAGE_DOCNAME)/doc
426@EFL_BUILD_DOC_TRUE@ cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
427@EFL_BUILD_DOC_TRUE@ tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
428@EFL_BUILD_DOC_TRUE@ bzip2 -9 $(PACKAGE_DOCNAME).tar
429@EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME)/
430@EFL_BUILD_DOC_TRUE@ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
431
432@EFL_BUILD_DOC_TRUE@clean-local: doc-clean
433
434@EFL_BUILD_DOC_FALSE@doc:
435@EFL_BUILD_DOC_FALSE@ @echo "Documentation not built. Run ./configure --help"
436
437# Tell versions [3.59,3.63) of GNU make to not export all variables.
438# Otherwise a system limit (for SysV at least) may be exceeded.
439.NOEXPORT:
diff --git a/libraries/eet/doc/e.css b/libraries/eet/doc/e.css
new file mode 100644
index 0000000..07ebd1e
--- /dev/null
+++ b/libraries/eet/doc/e.css
@@ -0,0 +1,436 @@
1/*
2 Author:
3 Andres Blanc <andresblanc@gmail.com>
4 DaveMDS Andreoli <dave@gurumeditation.it>
5
6 Supported Browsers:
7 ie7, opera9, konqueror4 and firefox3
8
9 Please use a different file for ie6, ie5, etc. hacks.
10*/
11
12
13/* Necessary to place the footer at the bottom of the page */
14html, body {
15 height: 100%;
16 margin: 0px;
17 padding: 0px;
18}
19
20#container {
21 min-height: 100%;
22 height: auto !important;
23 height: 100%;
24 margin: 0 auto -53px;
25}
26
27#footer, #push {
28 height: 53px;
29}
30
31
32* html #container {
33 height: 100%;
34}
35
36/* Prevent floating elements overflowing containers */
37.clear {
38 clear: both;
39 width: 0px;
40 height: 0px;
41}
42
43/* Flexible & centered layout from 750 to 960 pixels */
44.layout {
45 max-width: 960px;
46 min-width: 760px;
47 margin-left: auto;
48 margin-right: auto;
49}
50
51body {
52 /*font-family: Lucida Grande, Helvetica, sans-serif;*/
53 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif
54}
55
56/* Prevent design overflowing the viewport in small resolutions */
57#container {
58 padding-right: 17px;
59 padding-left: 17px;
60 background-image: url(head_bg.png);
61 background-repeat: repeat-x;
62}
63
64#header {
65 width: 100%;
66 height: 102px;
67}
68
69#header h1 {
70 width: 63px;
71 height: 63px;
72 background-image: url(e.png);
73 background-repeat: no-repeat;
74 position: absolute;
75 margin: 0px;
76}
77
78#header h1 span {
79 display: none;
80}
81
82#header h2 {
83 display: none;
84}
85
86/* .menu-container is used to set properties common to .menu and .submenu */
87#header .menu-container {
88}
89
90#header .menu-container ul {
91 list-style-type: none;
92 list-style-position: inside;
93 margin: 0;
94}
95
96#header .menu-container li {
97 display: block;
98 float: right;
99}
100
101#header .menu {
102 height: 63px;
103 display: block;
104 background-image: url(menu_bg.png);
105 background-repeat: repeat-x;
106}
107
108#header .menu ul {
109 height: 100%;
110 display: block;
111 background-image: url(menu_bg_last.png);
112 background-repeat: no-repeat;
113 background-position: top right;
114 padding-right: 17px;
115}
116
117#header .menu li {
118 height: 100%;
119 text-align: center;
120 background-image: url(menu_bg_unsel.png);
121 background-repeat: no-repeat;
122}
123
124#header .menu a {
125 height: 100%;
126 display: block;
127 color: #cdcdcd;
128 text-decoration: none;
129 font-size: 10pt;
130 line-height: 59px;
131 text-align: center;
132 padding: 0px 15px 0px 15px;
133}
134
135#header .menu li:hover {
136 background-image: url(menu_bg_hover.png);
137 background-repeat: no-repeat;
138}
139
140#header .menu li:hover a {
141 color: #FFFFFF;
142}
143
144#header .menu li.current {
145 background-image: url(menu_bg_current.png);
146 background-repeat: no-repeat;
147}
148
149#header .menu li.current a {
150 color: #646464;
151}
152
153
154/* Hide all the submenus but the current */
155#header .submenu ul {
156 display: none;
157}
158
159#header .submenu .current {
160 display: block;
161}
162
163#header .submenu {
164 font: bold 10px verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
165 margin-top: 10px;
166}
167
168#header .submenu a {
169 color: #888888;
170 text-decoration: none;
171 font-size: 0.9em;
172 line-height: 15px;
173 padding:0px 5px 0px 5px;
174}
175
176#header .submenu a:hover {
177 color: #444444;
178}
179
180#header .submenu li {
181 border-left: 1px solid #DDDDDD;
182}
183
184#header .submenu li:last-child {
185 border-left: 0;
186}
187
188#header .doxytitle {
189 position: absolute;
190 font-size: 1.8em;
191 font-weight: bold;
192 color: #444444;
193 line-height: 35px;
194}
195
196#header small {
197 font-size: 0.4em;
198}
199
200#footer {
201 background-image: url(foot_bg.png);
202 width: 100%;
203}
204
205#footer table {
206 width: 100%;
207 text-align: center;
208 white-space: nowrap;
209 padding: 5px 30px 5px 30px;
210 font-size: 0.8em;
211 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif;
212 color: #888888;
213}
214
215#footer td.copyright {
216 width: 100%;
217}
218
219/*
220 Author:
221 Andres Blanc <andresblanc@gmail.com>
222 DaveMDS Andreoli <dave@gurumeditation.it>
223
224 Supported Browsers:
225 ie7, opera9, konqueror4 and firefox3
226
227 Please use a different file for ie6, ie5, etc. hacks.
228*/
229
230
231/* Necessary to place the footer at the bottom of the page */
232html, body {
233 height: 100%;
234 margin: 0px;
235 padding: 0px;
236}
237
238#container {
239 min-height: 100%;
240 height: auto !important;
241 height: 100%;
242 margin: 0 auto -53px;
243}
244
245#footer, #push {
246 height: 53px;
247}
248
249
250* html #container {
251 height: 100%;
252}
253
254/* Prevent floating elements overflowing containers */
255.clear {
256 clear: both;
257 width: 0px;
258 height: 0px;
259}
260
261/* Flexible & centered layout from 750 to 960 pixels */
262.layout {
263 max-width: 960px;
264 min-width: 760px;
265 margin-left: auto;
266 margin-right: auto;
267}
268
269body {
270 /*font-family: Lucida Grande, Helvetica, sans-serif;*/
271 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif
272}
273
274/* Prevent design overflowing the viewport in small resolutions */
275#container {
276 padding-right: 17px;
277 padding-left: 17px;
278 background-image: url(head_bg.png);
279 background-repeat: repeat-x;
280}
281
282#header {
283 width: 100%;
284 height: 102px;
285}
286
287#header h1 {
288 width: 63px;
289 height: 63px;
290 background-image: url(e.png);
291 background-repeat: no-repeat;
292 position: absolute;
293 margin: 0px;
294}
295
296#header h1 span {
297 display: none;
298}
299
300#header h2 {
301 display: none;
302}
303
304/* .menu-container is used to set properties common to .menu and .submenu */
305#header .menu-container {
306}
307
308#header .menu-container ul {
309 list-style-type: none;
310 list-style-position: inside;
311 margin: 0;
312}
313
314#header .menu-container li {
315 display: block;
316 float: right;
317}
318
319#header .menu {
320 height: 63px;
321 display: block;
322 background-image: url(menu_bg.png);
323 background-repeat: repeat-x;
324}
325
326#header .menu ul {
327 height: 100%;
328 display: block;
329 background-image: url(menu_bg_last.png);
330 background-repeat: no-repeat;
331 background-position: top right;
332 padding-right: 17px;
333}
334
335#header .menu li {
336 height: 100%;
337 text-align: center;
338 background-image: url(menu_bg_unsel.png);
339 background-repeat: no-repeat;
340}
341
342#header .menu a {
343 height: 100%;
344 display: block;
345 color: #cdcdcd;
346 text-decoration: none;
347 font-size: 10pt;
348 line-height: 59px;
349 text-align: center;
350 padding: 0px 15px 0px 15px;
351}
352
353#header .menu li:hover {
354 background-image: url(menu_bg_hover.png);
355 background-repeat: no-repeat;
356}
357
358#header .menu li:hover a {
359 color: #FFFFFF;
360}
361
362#header .menu li.current {
363 background-image: url(menu_bg_current.png);
364 background-repeat: no-repeat;
365}
366
367#header .menu li.current a {
368 color: #646464;
369}
370
371
372/* Hide all the submenus but the current */
373#header .submenu ul {
374 display: none;
375}
376
377#header .submenu .current {
378 display: block;
379}
380
381#header .submenu {
382 font: bold 10px verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
383 margin-top: 10px;
384}
385
386#header .submenu a {
387 color: #888888;
388 text-decoration: none;
389 font-size: 0.9em;
390 line-height: 15px;
391 padding:0px 5px 0px 5px;
392}
393
394#header .submenu a:hover {
395 color: #444444;
396}
397
398#header .submenu li {
399 border-left: 1px solid #DDDDDD;
400}
401
402#header .submenu li:last-child {
403 border-left: 0;
404}
405
406#header .doxytitle {
407 position: absolute;
408 font-size: 1.8em;
409 font-weight: bold;
410 color: #444444;
411 line-height: 35px;
412}
413
414#header small {
415 font-size: 0.4em;
416}
417
418#footer {
419 background-image: url(foot_bg.png);
420 width: 100%;
421}
422
423#footer table {
424 width: 100%;
425 text-align: center;
426 white-space: nowrap;
427 padding: 5px 30px 5px 30px;
428 font-size: 0.8em;
429 font-family: "Bitstream Vera","Vera","Trebuchet MS",Trebuchet,Tahoma,sans-serif;
430 color: #888888;
431}
432
433#footer td.copyright {
434 width: 100%;
435}
436
diff --git a/libraries/eet/doc/eet.dox.in b/libraries/eet/doc/eet.dox.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libraries/eet/doc/eet.dox.in
diff --git a/libraries/eet/doc/foot.html b/libraries/eet/doc/foot.html
new file mode 100644
index 0000000..3a96978
--- /dev/null
+++ b/libraries/eet/doc/foot.html
@@ -0,0 +1,20 @@
1
2 <div id="push"></div>
3 </div> <!-- #content -->
4 </div> <!-- .layout -->
5
6 </div> <!-- #container -->
7
8
9 <div id="footer">
10 <table><tr>
11 <td class="poweredby"><img src="doxygen.png"></td>
12 <td>Samsung Electronics is supporting the EFL Documentation Project</td>
13 <td class="copyright">Copyright &copy;$year Enlightenment</td>
14 <td class="generated">Docs generated $datetime</td>
15 </tr></table>
16 </div>
17
18
19</body>
20</html>
diff --git a/libraries/eet/doc/head.html b/libraries/eet/doc/head.html
new file mode 100644
index 0000000..519631b
--- /dev/null
+++ b/libraries/eet/doc/head.html
@@ -0,0 +1,65 @@
1<html>
2<head>
3 <title>$title</title>
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8">
5 <meta name="author" content="Andres Blanc" >
6
7 <link rel="icon" href="img/favicon.png" type="image/x-icon">
8 <link rel="shortcut icon" href="img/favicon.png" type="image/x-icon">
9 <link rel="icon" href="img/favicon.png" type="image/ico">
10 <link rel="shortcut icon" href="img/favicon.png" type="image/ico">
11
12 <link rel="stylesheet" type="text/css" media="screen" href="e.css">
13 <link rel="stylesheet" type="text/css" media="screen" href="edoxy.css">
14</head>
15
16<body>
17
18<div id="container">
19
20<div id="header">
21<div class="layout">
22
23 <h1><span>Enlightenment</span></h1>
24 <h2><span>Beauty at your fingertips</span></h2>
25
26 <div class="menu-container">
27 <div class="menu">
28 <ul>
29 <li class="current"><a href="http://web.enlightenment.org/p.php?p=docs">Docs</a></li>
30 <li><a href="http://trac.enlightenment.org/e">Tracker</a></li>
31 <li><a href="http://www.enlightenment.org/p.php?p=contact">Contact</a></li>
32 <li><a href="http://www.enlightenment.org/p.php?p=contribute">Contribute</a></li>
33 <li><a href="http://www.enlightenment.org/p.php?p=support">Support</a></li>
34 <li><a href="http://www.enlightenment.org/p.php?p=download">Download</a></li>
35 <li><a href="http://www.enlightenment.org/p.php?p=about">About</a></li>
36 <li><a href="http://www.enlightenment.org/p.php?p=news">News</a></li>
37 <li><a href="http://www.enlightenment.org/">Home</a></li>
38 </ul>
39 </div>
40 </div>
41
42 <div class="doxytitle">
43 $projectname Documentation <small>at $date</small>
44 </div>
45
46 <div class="menu-container">
47 <div class="submenu">
48 <ul class="current">
49 <li><a href="Examples.html">Examples</a></li>
50 <li><a href="files.html">Files</a></li>
51 <li><a href="modules.html">Modules</a></li>
52 <li><a href="globals.html">Globals</a></li>
53 <li><a href="pages.html">Related Pages</a></li>
54 <li class="current"><a href="index.html">Main Page</a></li>
55 </ul>
56 </div>
57 </div>
58
59
60 <div class="clear"></div>
61</div>
62</div>
63
64<div id="content">
65<div class="layout">
diff --git a/libraries/eet/doc/img/e.png b/libraries/eet/doc/img/e.png
new file mode 100755
index 0000000..b3884a5
--- /dev/null
+++ b/libraries/eet/doc/img/e.png
Binary files differ
diff --git a/libraries/eet/doc/img/e_big.png b/libraries/eet/doc/img/e_big.png
new file mode 100755
index 0000000..d42aeb4
--- /dev/null
+++ b/libraries/eet/doc/img/e_big.png
Binary files differ
diff --git a/libraries/eet/doc/img/edoxy.css b/libraries/eet/doc/img/edoxy.css
new file mode 100755
index 0000000..616a0c5
--- /dev/null
+++ b/libraries/eet/doc/img/edoxy.css
@@ -0,0 +1,966 @@
1/*
2 * This file contain a custom doxygen style to match e.org graphics
3 */
4
5
6
7/* BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
8 font-family: Geneva, Arial, Helvetica, sans-serif;
9}*/
10BODY, TD {
11 font-size: 12px;
12}
13H1 {
14 text-align: center;
15 font-size: 160%;
16}
17H2 {
18 font-size: 120%;
19}
20H3 {
21 font-size: 100%;
22}
23CAPTION {
24 font-weight: bold
25}
26DIV.qindex {
27 width: 100%;
28 background-color: #e8eef2;
29 border: 1px solid #84b0c7;
30 text-align: center;
31 margin: 2px;
32 padding: 2px;
33 line-height: 140%;
34}
35DIV.navpath {
36 width: 100%;
37 background-color: #e8eef2;
38 border: 1px solid #84b0c7;
39 text-align: center;
40 margin: 2px;
41 padding: 2px;
42 line-height: 140%;
43}
44DIV.navtab {
45 background-color: #e8eef2;
46 border: 1px solid #84b0c7;
47 text-align: center;
48 margin: 2px;
49 margin-right: 15px;
50 padding: 2px;
51}
52TD.navtab {
53 font-size: 70%;
54}
55A.qindex {
56 text-decoration: none;
57 font-weight: bold;
58 color: #1A419D;
59}
60A.qindex:visited {
61 text-decoration: none;
62 font-weight: bold;
63 color: #1A419D
64}
65A.qindex:hover {
66 text-decoration: none;
67 background-color: #ddddff;
68}
69A.qindexHL {
70 text-decoration: none;
71 font-weight: bold;
72 background-color: #6666cc;
73 color: #ffffff;
74 border: 1px double #9295C2;
75}
76A.qindexHL:hover {
77 text-decoration: none;
78 background-color: #6666cc;
79 color: #ffffff;
80}
81A.qindexHL:visited {
82 text-decoration: none;
83 background-color: #6666cc;
84 color: #ffffff
85}
86A.el {
87 text-decoration: none;
88 font-weight: bold
89}
90A.elRef {
91 font-weight: bold
92}
93A.code:link {
94 text-decoration: none;
95 font-weight: normal;
96 color: #0000FF
97}
98A.code:visited {
99 text-decoration: none;
100 font-weight: normal;
101 color: #0000FF
102}
103A.codeRef:link {
104 font-weight: normal;
105 color: #0000FF
106}
107A.codeRef:visited {
108 font-weight: normal;
109 color: #0000FF
110}
111A:hover, A:visited:hover {
112 text-decoration: none;
113 /* background-color: #f2f2ff; */
114 color: #000055;
115}
116A.anchor {
117 color: #000;
118}
119DL.el {
120 margin-left: -1cm
121}
122.fragment {
123 font-family: monospace, fixed;
124 font-size: 95%;
125}
126PRE.fragment {
127 border: 1px solid #CCCCCC;
128 background-color: #f5f5f5;
129 margin-top: 4px;
130 margin-bottom: 4px;
131 margin-left: 2px;
132 margin-right: 8px;
133 padding-left: 6px;
134 padding-right: 6px;
135 padding-top: 4px;
136 padding-bottom: 4px;
137}
138DIV.ah {
139 background-color: black;
140 font-weight: bold;
141 color: #ffffff;
142 margin-bottom: 3px;
143 margin-top: 3px
144}
145
146DIV.groupHeader {
147 margin-left: 16px;
148 margin-top: 12px;
149 margin-bottom: 6px;
150 font-weight: bold;
151}
152DIV.groupText {
153 margin-left: 16px;
154 font-style: italic;
155 font-size: 90%
156}
157/*BODY {
158 background: white;
159 color: black;
160 margin-right: 20px;
161 margin-left: 20px;
162}*/
163TD.indexkey {
164 background-color: #e8eef2;
165 font-weight: bold;
166 padding-right : 10px;
167 padding-top : 2px;
168 padding-left : 10px;
169 padding-bottom : 2px;
170 margin-left : 0px;
171 margin-right : 0px;
172 margin-top : 2px;
173 margin-bottom : 2px;
174 border: 1px solid #CCCCCC;
175}
176TD.indexvalue {
177 background-color: #e8eef2;
178 font-style: italic;
179 padding-right : 10px;
180 padding-top : 2px;
181 padding-left : 10px;
182 padding-bottom : 2px;
183 margin-left : 0px;
184 margin-right : 0px;
185 margin-top : 2px;
186 margin-bottom : 2px;
187 border: 1px solid #CCCCCC;
188}
189TR.memlist {
190 background-color: #f0f0f0;
191}
192P.formulaDsp {
193 text-align: center;
194}
195IMG.formulaDsp {
196}
197IMG.formulaInl {
198 vertical-align: middle;
199}
200SPAN.keyword { color: #008000 }
201SPAN.keywordtype { color: #604020 }
202SPAN.keywordflow { color: #e08000 }
203SPAN.comment { color: #800000 }
204SPAN.preprocessor { color: #806020 }
205SPAN.stringliteral { color: #002080 }
206SPAN.charliteral { color: #008080 }
207SPAN.vhdldigit { color: #ff00ff }
208SPAN.vhdlchar { color: #000000 }
209SPAN.vhdlkeyword { color: #700070 }
210SPAN.vhdllogic { color: #ff0000 }
211
212.mdescLeft {
213 padding: 0px 8px 4px 8px;
214 font-size: 80%;
215 font-style: italic;
216 background-color: #FAFAFA;
217 border-top: 1px none #E0E0E0;
218 border-right: 1px none #E0E0E0;
219 border-bottom: 1px none #E0E0E0;
220 border-left: 1px none #E0E0E0;
221 margin: 0px;
222}
223.mdescRight {
224 padding: 0px 8px 4px 8px;
225 font-size: 80%;
226 font-style: italic;
227 background-color: #FAFAFA;
228 border-top: 1px none #E0E0E0;
229 border-right: 1px none #E0E0E0;
230 border-bottom: 1px none #E0E0E0;
231 border-left: 1px none #E0E0E0;
232 margin: 0px;
233}
234.memItemLeft {
235 padding: 1px 0px 0px 8px;
236 margin: 4px;
237 border-top-width: 1px;
238 border-right-width: 1px;
239 border-bottom-width: 1px;
240 border-left-width: 1px;
241 border-top-color: #E0E0E0;
242 border-right-color: #E0E0E0;
243 border-bottom-color: #E0E0E0;
244 border-left-color: #E0E0E0;
245 border-top-style: solid;
246 border-right-style: none;
247 border-bottom-style: none;
248 border-left-style: none;
249 background-color: #FAFAFA;
250 font-size: 80%;
251}
252.memItemRight {
253 padding: 1px 8px 0px 8px;
254 margin: 4px;
255 border-top-width: 1px;
256 border-right-width: 1px;
257 border-bottom-width: 1px;
258 border-left-width: 1px;
259 border-top-color: #E0E0E0;
260 border-right-color: #E0E0E0;
261 border-bottom-color: #E0E0E0;
262 border-left-color: #E0E0E0;
263 border-top-style: solid;
264 border-right-style: none;
265 border-bottom-style: none;
266 border-left-style: none;
267 background-color: #FAFAFA;
268 font-size: 80%;
269}
270.memTemplItemLeft {
271 padding: 1px 0px 0px 8px;
272 margin: 4px;
273 border-top-width: 1px;
274 border-right-width: 1px;
275 border-bottom-width: 1px;
276 border-left-width: 1px;
277 border-top-color: #E0E0E0;
278 border-right-color: #E0E0E0;
279 border-bottom-color: #E0E0E0;
280 border-left-color: #E0E0E0;
281 border-top-style: none;
282 border-right-style: none;
283 border-bottom-style: none;
284 border-left-style: none;
285 background-color: #FAFAFA;
286 font-size: 80%;
287}
288.memTemplItemRight {
289 padding: 1px 8px 0px 8px;
290 margin: 4px;
291 border-top-width: 1px;
292 border-right-width: 1px;
293 border-bottom-width: 1px;
294 border-left-width: 1px;
295 border-top-color: #E0E0E0;
296 border-right-color: #E0E0E0;
297 border-bottom-color: #E0E0E0;
298 border-left-color: #E0E0E0;
299 border-top-style: none;
300 border-right-style: none;
301 border-bottom-style: none;
302 border-left-style: none;
303 background-color: #FAFAFA;
304 font-size: 80%;
305}
306.memTemplParams {
307 padding: 1px 0px 0px 8px;
308 margin: 4px;
309 border-top-width: 1px;
310 border-right-width: 1px;
311 border-bottom-width: 1px;
312 border-left-width: 1px;
313 border-top-color: #E0E0E0;
314 border-right-color: #E0E0E0;
315 border-bottom-color: #E0E0E0;
316 border-left-color: #E0E0E0;
317 border-top-style: solid;
318 border-right-style: none;
319 border-bottom-style: none;
320 border-left-style: none;
321 color: #606060;
322 background-color: #FAFAFA;
323 font-size: 80%;
324}
325.search {
326 color: #003399;
327 font-weight: bold;
328}
329FORM.search {
330 margin-bottom: 0px;
331 margin-top: 0px;
332}
333INPUT.search {
334 font-size: 75%;
335 color: #000080;
336 font-weight: normal;
337 background-color: #e8eef2;
338}
339TD.tiny {
340 font-size: 75%;
341}
342a {
343 color: #1A41A8;
344}
345a:visited {
346 color: #2A3798;
347}
348.dirtab {
349 padding: 4px;
350 border-collapse: collapse;
351 border: 1px solid #84b0c7;
352}
353TH.dirtab {
354 background: #e8eef2;
355 font-weight: bold;
356}
357HR {
358 height: 1px;
359 border: none;
360 border-top: 1px solid black;
361}
362
363/* Style for detailed member documentation */
364.memtemplate {
365 font-size: 80%;
366 color: #606060;
367 font-weight: normal;
368 margin-left: 3px;
369}
370.memnav {
371 background-color: #e8eef2;
372 border: 1px solid #84b0c7;
373 text-align: center;
374 margin: 2px;
375 margin-right: 15px;
376 padding: 2px;
377}
378.memitem {
379 padding: 4px;
380 background-color: #eef3f5;
381 border-width: 1px;
382 border-style: solid;
383 border-color: #dedeee;
384 -moz-border-radius: 8px 8px 8px 8px;
385}
386.memname {
387 white-space: nowrap;
388 font-weight: bold;
389}
390.memdoc{
391 padding-left: 10px;
392}
393.memproto {
394 background-color: #d5e1e8;
395 width: 100%;
396 border-width: 1px;
397 border-style: solid;
398 border-color: #84b0c7;
399 font-weight: bold;
400 -moz-border-radius: 8px 8px 8px 8px;
401}
402.paramkey {
403 text-align: right;
404}
405.paramtype {
406 white-space: nowrap;
407}
408.paramname {
409 color: #602020;
410 font-style: italic;
411 white-space: nowrap;
412}
413/* End Styling for detailed member documentation */
414
415/* for the tree view */
416.ftvtree {
417 font-family: sans-serif;
418 margin:0.5em;
419}
420/* these are for tree view when used as main index */
421.directory {
422 font-size: 9pt;
423 font-weight: bold;
424}
425.directory h3 {
426 margin: 0px;
427 margin-top: 1em;
428 font-size: 11pt;
429}
430
431/* The following two styles can be used to replace the root node title */
432/* with an image of your choice. Simply uncomment the next two styles, */
433/* specify the name of your image and be sure to set 'height' to the */
434/* proper pixel height of your image. */
435
436/* .directory h3.swap { */
437/* height: 61px; */
438/* background-repeat: no-repeat; */
439/* background-image: url("yourimage.gif"); */
440/* } */
441/* .directory h3.swap span { */
442/* display: none; */
443/* } */
444
445.directory > h3 {
446 margin-top: 0;
447}
448.directory p {
449 margin: 0px;
450 white-space: nowrap;
451}
452.directory div {
453 display: none;
454 margin: 0px;
455}
456.directory img {
457 vertical-align: -30%;
458}
459/* these are for tree view when not used as main index */
460.directory-alt {
461 font-size: 100%;
462 font-weight: bold;
463}
464.directory-alt h3 {
465 margin: 0px;
466 margin-top: 1em;
467 font-size: 11pt;
468}
469.directory-alt > h3 {
470 margin-top: 0;
471}
472.directory-alt p {
473 margin: 0px;
474 white-space: nowrap;
475}
476.directory-alt div {
477 display: none;
478 margin: 0px;
479}
480.directory-alt img {
481 vertical-align: -30%;
482}
483
484/*
485 * This file contain a custom doxygen style to match e.org graphics
486 */
487
488
489
490/* BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
491 font-family: Geneva, Arial, Helvetica, sans-serif;
492}*/
493BODY, TD {
494 font-size: 12px;
495}
496H1 {
497 text-align: center;
498 font-size: 160%;
499}
500H2 {
501 font-size: 120%;
502}
503H3 {
504 font-size: 100%;
505}
506CAPTION {
507 font-weight: bold
508}
509DIV.qindex {
510 width: 100%;
511 background-color: #e8eef2;
512 border: 1px solid #84b0c7;
513 text-align: center;
514 margin: 2px;
515 padding: 2px;
516 line-height: 140%;
517}
518DIV.navpath {
519 width: 100%;
520 background-color: #e8eef2;
521 border: 1px solid #84b0c7;
522 text-align: center;
523 margin: 2px;
524 padding: 2px;
525 line-height: 140%;
526}
527DIV.navtab {
528 background-color: #e8eef2;
529 border: 1px solid #84b0c7;
530 text-align: center;
531 margin: 2px;
532 margin-right: 15px;
533 padding: 2px;
534}
535TD.navtab {
536 font-size: 70%;
537}
538A.qindex {
539 text-decoration: none;
540 font-weight: bold;
541 color: #1A419D;
542}
543A.qindex:visited {
544 text-decoration: none;
545 font-weight: bold;
546 color: #1A419D
547}
548A.qindex:hover {
549 text-decoration: none;
550 background-color: #ddddff;
551}
552A.qindexHL {
553 text-decoration: none;
554 font-weight: bold;
555 background-color: #6666cc;
556 color: #ffffff;
557 border: 1px double #9295C2;
558}
559A.qindexHL:hover {
560 text-decoration: none;
561 background-color: #6666cc;
562 color: #ffffff;
563}
564A.qindexHL:visited {
565 text-decoration: none;
566 background-color: #6666cc;
567 color: #ffffff
568}
569A.el {
570 text-decoration: none;
571 font-weight: bold
572}
573A.elRef {
574 font-weight: bold
575}
576A.code:link {
577 text-decoration: none;
578 font-weight: normal;
579 color: #0000FF
580}
581A.code:visited {
582 text-decoration: none;
583 font-weight: normal;
584 color: #0000FF
585}
586A.codeRef:link {
587 font-weight: normal;
588 color: #0000FF
589}
590A.codeRef:visited {
591 font-weight: normal;
592 color: #0000FF
593}
594A:hover, A:visited:hover {
595 text-decoration: none;
596 /* background-color: #f2f2ff; */
597 color: #000055;
598}
599A.anchor {
600 color: #000;
601}
602DL.el {
603 margin-left: -1cm
604}
605.fragment {
606 font-family: monospace, fixed;
607 font-size: 95%;
608}
609PRE.fragment {
610 border: 1px solid #CCCCCC;
611 background-color: #f5f5f5;
612 margin-top: 4px;
613 margin-bottom: 4px;
614 margin-left: 2px;
615 margin-right: 8px;
616 padding-left: 6px;
617 padding-right: 6px;
618 padding-top: 4px;
619 padding-bottom: 4px;
620}
621DIV.ah {
622 background-color: black;
623 font-weight: bold;
624 color: #ffffff;
625 margin-bottom: 3px;
626 margin-top: 3px
627}
628
629DIV.groupHeader {
630 margin-left: 16px;
631 margin-top: 12px;
632 margin-bottom: 6px;
633 font-weight: bold;
634}
635DIV.groupText {
636 margin-left: 16px;
637 font-style: italic;
638 font-size: 90%
639}
640/*BODY {
641 background: white;
642 color: black;
643 margin-right: 20px;
644 margin-left: 20px;
645}*/
646TD.indexkey {
647 background-color: #e8eef2;
648 font-weight: bold;
649 padding-right : 10px;
650 padding-top : 2px;
651 padding-left : 10px;
652 padding-bottom : 2px;
653 margin-left : 0px;
654 margin-right : 0px;
655 margin-top : 2px;
656 margin-bottom : 2px;
657 border: 1px solid #CCCCCC;
658}
659TD.indexvalue {
660 background-color: #e8eef2;
661 font-style: italic;
662 padding-right : 10px;
663 padding-top : 2px;
664 padding-left : 10px;
665 padding-bottom : 2px;
666 margin-left : 0px;
667 margin-right : 0px;
668 margin-top : 2px;
669 margin-bottom : 2px;
670 border: 1px solid #CCCCCC;
671}
672TR.memlist {
673 background-color: #f0f0f0;
674}
675P.formulaDsp {
676 text-align: center;
677}
678IMG.formulaDsp {
679}
680IMG.formulaInl {
681 vertical-align: middle;
682}
683SPAN.keyword { color: #008000 }
684SPAN.keywordtype { color: #604020 }
685SPAN.keywordflow { color: #e08000 }
686SPAN.comment { color: #800000 }
687SPAN.preprocessor { color: #806020 }
688SPAN.stringliteral { color: #002080 }
689SPAN.charliteral { color: #008080 }
690SPAN.vhdldigit { color: #ff00ff }
691SPAN.vhdlchar { color: #000000 }
692SPAN.vhdlkeyword { color: #700070 }
693SPAN.vhdllogic { color: #ff0000 }
694
695.mdescLeft {
696 padding: 0px 8px 4px 8px;
697 font-size: 80%;
698 font-style: italic;
699 background-color: #FAFAFA;
700 border-top: 1px none #E0E0E0;
701 border-right: 1px none #E0E0E0;
702 border-bottom: 1px none #E0E0E0;
703 border-left: 1px none #E0E0E0;
704 margin: 0px;
705}
706.mdescRight {
707 padding: 0px 8px 4px 8px;
708 font-size: 80%;
709 font-style: italic;
710 background-color: #FAFAFA;
711 border-top: 1px none #E0E0E0;
712 border-right: 1px none #E0E0E0;
713 border-bottom: 1px none #E0E0E0;
714 border-left: 1px none #E0E0E0;
715 margin: 0px;
716}
717.memItemLeft {
718 padding: 1px 0px 0px 8px;
719 margin: 4px;
720 border-top-width: 1px;
721 border-right-width: 1px;
722 border-bottom-width: 1px;
723 border-left-width: 1px;
724 border-top-color: #E0E0E0;
725 border-right-color: #E0E0E0;
726 border-bottom-color: #E0E0E0;
727 border-left-color: #E0E0E0;
728 border-top-style: solid;
729 border-right-style: none;
730 border-bottom-style: none;
731 border-left-style: none;
732 background-color: #FAFAFA;
733 font-size: 80%;
734}
735.memItemRight {
736 padding: 1px 8px 0px 8px;
737 margin: 4px;
738 border-top-width: 1px;
739 border-right-width: 1px;
740 border-bottom-width: 1px;
741 border-left-width: 1px;
742 border-top-color: #E0E0E0;
743 border-right-color: #E0E0E0;
744 border-bottom-color: #E0E0E0;
745 border-left-color: #E0E0E0;
746 border-top-style: solid;
747 border-right-style: none;
748 border-bottom-style: none;
749 border-left-style: none;
750 background-color: #FAFAFA;
751 font-size: 80%;
752}
753.memTemplItemLeft {
754 padding: 1px 0px 0px 8px;
755 margin: 4px;
756 border-top-width: 1px;
757 border-right-width: 1px;
758 border-bottom-width: 1px;
759 border-left-width: 1px;
760 border-top-color: #E0E0E0;
761 border-right-color: #E0E0E0;
762 border-bottom-color: #E0E0E0;
763 border-left-color: #E0E0E0;
764 border-top-style: none;
765 border-right-style: none;
766 border-bottom-style: none;
767 border-left-style: none;
768 background-color: #FAFAFA;
769 font-size: 80%;
770}
771.memTemplItemRight {
772 padding: 1px 8px 0px 8px;
773 margin: 4px;
774 border-top-width: 1px;
775 border-right-width: 1px;
776 border-bottom-width: 1px;
777 border-left-width: 1px;
778 border-top-color: #E0E0E0;
779 border-right-color: #E0E0E0;
780 border-bottom-color: #E0E0E0;
781 border-left-color: #E0E0E0;
782 border-top-style: none;
783 border-right-style: none;
784 border-bottom-style: none;
785 border-left-style: none;
786 background-color: #FAFAFA;
787 font-size: 80%;
788}
789.memTemplParams {
790 padding: 1px 0px 0px 8px;
791 margin: 4px;
792 border-top-width: 1px;
793 border-right-width: 1px;
794 border-bottom-width: 1px;
795 border-left-width: 1px;
796 border-top-color: #E0E0E0;
797 border-right-color: #E0E0E0;
798 border-bottom-color: #E0E0E0;
799 border-left-color: #E0E0E0;
800 border-top-style: solid;
801 border-right-style: none;
802 border-bottom-style: none;
803 border-left-style: none;
804 color: #606060;
805 background-color: #FAFAFA;
806 font-size: 80%;
807}
808.search {
809 color: #003399;
810 font-weight: bold;
811}
812FORM.search {
813 margin-bottom: 0px;
814 margin-top: 0px;
815}
816INPUT.search {
817 font-size: 75%;
818 color: #000080;
819 font-weight: normal;
820 background-color: #e8eef2;
821}
822TD.tiny {
823 font-size: 75%;
824}
825a {
826 color: #1A41A8;
827}
828a:visited {
829 color: #2A3798;
830}
831.dirtab {
832 padding: 4px;
833 border-collapse: collapse;
834 border: 1px solid #84b0c7;
835}
836TH.dirtab {
837 background: #e8eef2;
838 font-weight: bold;
839}
840HR {
841 height: 1px;
842 border: none;
843 border-top: 1px solid black;
844}
845
846/* Style for detailed member documentation */
847.memtemplate {
848 font-size: 80%;
849 color: #606060;
850 font-weight: normal;
851 margin-left: 3px;
852}
853.memnav {
854 background-color: #e8eef2;
855 border: 1px solid #84b0c7;
856 text-align: center;
857 margin: 2px;
858 margin-right: 15px;
859 padding: 2px;
860}
861.memitem {
862 padding: 4px;
863 background-color: #eef3f5;
864 border-width: 1px;
865 border-style: solid;
866 border-color: #dedeee;
867 -moz-border-radius: 8px 8px 8px 8px;
868}
869.memname {
870 white-space: nowrap;
871 font-weight: bold;
872}
873.memdoc{
874 padding-left: 10px;
875}
876.memproto {
877 background-color: #d5e1e8;
878 width: 100%;
879 border-width: 1px;
880 border-style: solid;
881 border-color: #84b0c7;
882 font-weight: bold;
883 -moz-border-radius: 8px 8px 8px 8px;
884}
885.paramkey {
886 text-align: right;
887}
888.paramtype {
889 white-space: nowrap;
890}
891.paramname {
892 color: #602020;
893 font-style: italic;
894 white-space: nowrap;
895}
896/* End Styling for detailed member documentation */
897
898/* for the tree view */
899.ftvtree {
900 font-family: sans-serif;
901 margin:0.5em;
902}
903/* these are for tree view when used as main index */
904.directory {
905 font-size: 9pt;
906 font-weight: bold;
907}
908.directory h3 {
909 margin: 0px;
910 margin-top: 1em;
911 font-size: 11pt;
912}
913
914/* The following two styles can be used to replace the root node title */
915/* with an image of your choice. Simply uncomment the next two styles, */
916/* specify the name of your image and be sure to set 'height' to the */
917/* proper pixel height of your image. */
918
919/* .directory h3.swap { */
920/* height: 61px; */
921/* background-repeat: no-repeat; */
922/* background-image: url("yourimage.gif"); */
923/* } */
924/* .directory h3.swap span { */
925/* display: none; */
926/* } */
927
928.directory > h3 {
929 margin-top: 0;
930}
931.directory p {
932 margin: 0px;
933 white-space: nowrap;
934}
935.directory div {
936 display: none;
937 margin: 0px;
938}
939.directory img {
940 vertical-align: -30%;
941}
942/* these are for tree view when not used as main index */
943.directory-alt {
944 font-size: 100%;
945 font-weight: bold;
946}
947.directory-alt h3 {
948 margin: 0px;
949 margin-top: 1em;
950 font-size: 11pt;
951}
952.directory-alt > h3 {
953 margin-top: 0;
954}
955.directory-alt p {
956 margin: 0px;
957 white-space: nowrap;
958}
959.directory-alt div {
960 display: none;
961 margin: 0px;
962}
963.directory-alt img {
964 vertical-align: -30%;
965}
966
diff --git a/libraries/eet/doc/img/eet.png b/libraries/eet/doc/img/eet.png
new file mode 100644
index 0000000..47597a8
--- /dev/null
+++ b/libraries/eet/doc/img/eet.png
Binary files differ
diff --git a/libraries/eet/doc/img/foot_bg.png b/libraries/eet/doc/img/foot_bg.png
new file mode 100755
index 0000000..b24f3a4
--- /dev/null
+++ b/libraries/eet/doc/img/foot_bg.png
Binary files differ
diff --git a/libraries/eet/doc/img/head_bg.png b/libraries/eet/doc/img/head_bg.png
new file mode 100755
index 0000000..081dc13
--- /dev/null
+++ b/libraries/eet/doc/img/head_bg.png
Binary files differ
diff --git a/libraries/eet/doc/img/hilite.png b/libraries/eet/doc/img/hilite.png
new file mode 100644
index 0000000..88a4381
--- /dev/null
+++ b/libraries/eet/doc/img/hilite.png
Binary files differ
diff --git a/libraries/eet/doc/img/menu_bg.png b/libraries/eet/doc/img/menu_bg.png
new file mode 100755
index 0000000..e978743
--- /dev/null
+++ b/libraries/eet/doc/img/menu_bg.png
Binary files differ
diff --git a/libraries/eet/doc/img/menu_bg_current.png b/libraries/eet/doc/img/menu_bg_current.png
new file mode 100755
index 0000000..de97c92
--- /dev/null
+++ b/libraries/eet/doc/img/menu_bg_current.png
Binary files differ
diff --git a/libraries/eet/doc/img/menu_bg_hover.png b/libraries/eet/doc/img/menu_bg_hover.png
new file mode 100755
index 0000000..3fd851d
--- /dev/null
+++ b/libraries/eet/doc/img/menu_bg_hover.png
Binary files differ
diff --git a/libraries/eet/doc/img/menu_bg_last.png b/libraries/eet/doc/img/menu_bg_last.png
new file mode 100755
index 0000000..88c116c
--- /dev/null
+++ b/libraries/eet/doc/img/menu_bg_last.png
Binary files differ
diff --git a/libraries/eet/doc/img/menu_bg_unsel.png b/libraries/eet/doc/img/menu_bg_unsel.png
new file mode 100755
index 0000000..50e5fd8
--- /dev/null
+++ b/libraries/eet/doc/img/menu_bg_unsel.png
Binary files differ
diff --git a/libraries/eet/eet.pc.in b/libraries/eet/eet.pc.in
new file mode 100644
index 0000000..f7a3bf1
--- /dev/null
+++ b/libraries/eet/eet.pc.in
@@ -0,0 +1,13 @@
1prefix=@prefix@
2exec_prefix=@exec_prefix@
3libdir=@libdir@
4includedir=@includedir@
5
6Name: eet
7Description: Library for speedy data storage, retrieval, and compression
8@pkgconfig_requires_private@: @requirement_eet@
9Version: @VERSION@
10Libs: -L${libdir} -leet
11Libs.private: @EET_LIBS@ @EFL_FNMATCH_LIBS@ @LIBGCRYPT_LIBS@ -ljpeg -lz -lm
12Cflags: -I${includedir}/eet-@VMAJ@
13Cflags.private: @LIBGCRYPT_CFLAGS@
diff --git a/libraries/eet/eet.spec b/libraries/eet/eet.spec
new file mode 100644
index 0000000..07cabba
--- /dev/null
+++ b/libraries/eet/eet.spec
@@ -0,0 +1,75 @@
1%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
2%define _missing_doc_files_terminate_build 0
3
4Summary: Library for speedy data storage, retrieval, and compression.
5Name: eet
6Version: 1.5.0
7Release: %{_rel}
8License: BSD
9Group: System Environment/Libraries
10Source: http://download.enlightenment.org/releases/%{name}-%{version}.tar.gz
11Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
12Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
13Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
14URL: http://www.enlightenment.org/
15BuildRequires: libjpeg-devel zlib-devel
16BuildRoot: %{_tmppath}/%{name}-%{version}-root
17
18%description
19Eet is a tiny library designed to write an arbitrary set of chunks of
20data to a file and optionally compress each chunk (very much like a
21zip file) and allow fast random-access reading of the file later
22on. It does not do zip as a zip itself has more complexity than is
23needed, and it was much simpler to implement this once here.
24
25It also can encode and decode data structures in memory, as well as
26image data for saving to eet files or sending across the network to
27other machines, or just writing to arbitrary files on the system. All
28data is encoded in a platform independent way and can be written and
29read by any architecture.
30
31%package devel
32Summary: Eet headers, static libraries, documentation and test programs
33Group: System Environment/Libraries
34Requires: %{name} = %{version}
35Requires: libjpeg-devel, zlib-devel
36
37%description devel
38Headers, static libraries, test programs and documentation for Eet
39
40%prep
41%setup -q
42
43%build
44%{configure} --prefix=%{_prefix}
45### use this if you have build problems
46#./configure --prefix=%{_prefix}
47%{__make} %{?_smp_mflags} %{?mflags}
48
49%install
50%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
51
52%clean
53test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
54
55%post
56/sbin/ldconfig
57
58%postun
59/sbin/ldconfig
60
61%files
62%defattr(-, root, root)
63%doc AUTHORS COPYING COPYING-PLAIN README
64%{_libdir}/*.so.*
65
66%files devel
67%defattr(-, root, root)
68%{_bindir}/eet*
69%{_libdir}/pkgconfig/*
70%{_includedir}/*
71%{_libdir}/*.a
72%{_libdir}/*.so
73%{_libdir}/*.la
74
75%changelog
diff --git a/libraries/eet/eet.spec.in b/libraries/eet/eet.spec.in
new file mode 100644
index 0000000..898fd7a
--- /dev/null
+++ b/libraries/eet/eet.spec.in
@@ -0,0 +1,75 @@
1%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
2%define _missing_doc_files_terminate_build 0
3
4Summary: Library for speedy data storage, retrieval, and compression.
5Name: @PACKAGE@
6Version: @VERSION@
7Release: %{_rel}
8License: BSD
9Group: System Environment/Libraries
10Source: http://download.enlightenment.org/releases/%{name}-%{version}.tar.gz
11Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
12Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
13Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
14URL: http://www.enlightenment.org/
15BuildRequires: libjpeg-devel zlib-devel
16BuildRoot: %{_tmppath}/%{name}-%{version}-root
17
18%description
19Eet is a tiny library designed to write an arbitrary set of chunks of
20data to a file and optionally compress each chunk (very much like a
21zip file) and allow fast random-access reading of the file later
22on. It does not do zip as a zip itself has more complexity than is
23needed, and it was much simpler to implement this once here.
24
25It also can encode and decode data structures in memory, as well as
26image data for saving to eet files or sending across the network to
27other machines, or just writing to arbitrary files on the system. All
28data is encoded in a platform independent way and can be written and
29read by any architecture.
30
31%package devel
32Summary: Eet headers, static libraries, documentation and test programs
33Group: System Environment/Libraries
34Requires: %{name} = %{version}
35Requires: libjpeg-devel, zlib-devel
36
37%description devel
38Headers, static libraries, test programs and documentation for Eet
39
40%prep
41%setup -q
42
43%build
44%{configure} --prefix=%{_prefix}
45### use this if you have build problems
46#./configure --prefix=%{_prefix}
47%{__make} %{?_smp_mflags} %{?mflags}
48
49%install
50%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
51
52%clean
53test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
54
55%post
56/sbin/ldconfig
57
58%postun
59/sbin/ldconfig
60
61%files
62%defattr(-, root, root)
63%doc AUTHORS COPYING COPYING-PLAIN README
64%{_libdir}/*.so.*
65
66%files devel
67%defattr(-, root, root)
68%{_bindir}/eet*
69%{_libdir}/pkgconfig/*
70%{_includedir}/*
71%{_libdir}/*.a
72%{_libdir}/*.so
73%{_libdir}/*.la
74
75%changelog
diff --git a/libraries/eet/install-sh b/libraries/eet/install-sh
new file mode 100755
index 0000000..6781b98
--- /dev/null
+++ b/libraries/eet/install-sh
@@ -0,0 +1,520 @@
1#!/bin/sh
2# install - install a program, script, or datafile
3
4scriptversion=2009-04-28.21; # UTC
5
6# This originates from X11R5 (mit/util/scripts/install.sh), which was
7# later released in X11R6 (xc/config/util/install.sh) with the
8# following copyright and license.
9#
10# Copyright (C) 1994 X Consortium
11#
12# Permission is hereby granted, free of charge, to any person obtaining a copy
13# of this software and associated documentation files (the "Software"), to
14# deal in the Software without restriction, including without limitation the
15# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16# sell copies of the Software, and to permit persons to whom the Software is
17# furnished to do so, subject to the following conditions:
18#
19# The above copyright notice and this permission notice shall be included in
20# all copies or substantial portions of the Software.
21#
22# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
27# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28#
29# Except as contained in this notice, the name of the X Consortium shall not
30# be used in advertising or otherwise to promote the sale, use or other deal-
31# ings in this Software without prior written authorization from the X Consor-
32# tium.
33#
34#
35# FSF changes to this file are in the public domain.
36#
37# Calling this script install-sh is preferred over install.sh, to prevent
38# `make' implicit rules from creating a file called install from it
39# when there is no Makefile.
40#
41# This script is compatible with the BSD install script, but was written
42# from scratch.
43
44nl='
45'
46IFS=" "" $nl"
47
48# set DOITPROG to echo to test this script
49
50# Don't use :- since 4.3BSD and earlier shells don't like it.
51doit=${DOITPROG-}
52if test -z "$doit"; then
53 doit_exec=exec
54else
55 doit_exec=$doit
56fi
57
58# Put in absolute file names if you don't have them in your path;
59# or use environment vars.
60
61chgrpprog=${CHGRPPROG-chgrp}
62chmodprog=${CHMODPROG-chmod}
63chownprog=${CHOWNPROG-chown}
64cmpprog=${CMPPROG-cmp}
65cpprog=${CPPROG-cp}
66mkdirprog=${MKDIRPROG-mkdir}
67mvprog=${MVPROG-mv}
68rmprog=${RMPROG-rm}
69stripprog=${STRIPPROG-strip}
70
71posix_glob='?'
72initialize_posix_glob='
73 test "$posix_glob" != "?" || {
74 if (set -f) 2>/dev/null; then
75 posix_glob=
76 else
77 posix_glob=:
78 fi
79 }
80'
81
82posix_mkdir=
83
84# Desired mode of installed file.
85mode=0755
86
87chgrpcmd=
88chmodcmd=$chmodprog
89chowncmd=
90mvcmd=$mvprog
91rmcmd="$rmprog -f"
92stripcmd=
93
94src=
95dst=
96dir_arg=
97dst_arg=
98
99copy_on_change=false
100no_target_directory=
101
102usage="\
103Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
104 or: $0 [OPTION]... SRCFILES... DIRECTORY
105 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
106 or: $0 [OPTION]... -d DIRECTORIES...
107
108In the 1st form, copy SRCFILE to DSTFILE.
109In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
110In the 4th, create DIRECTORIES.
111
112Options:
113 --help display this help and exit.
114 --version display version info and exit.
115
116 -c (ignored)
117 -C install only if different (preserve the last data modification time)
118 -d create directories instead of installing files.
119 -g GROUP $chgrpprog installed files to GROUP.
120 -m MODE $chmodprog installed files to MODE.
121 -o USER $chownprog installed files to USER.
122 -s $stripprog installed files.
123 -t DIRECTORY install into DIRECTORY.
124 -T report an error if DSTFILE is a directory.
125
126Environment variables override the default commands:
127 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
128 RMPROG STRIPPROG
129"
130
131while test $# -ne 0; do
132 case $1 in
133 -c) ;;
134
135 -C) copy_on_change=true;;
136
137 -d) dir_arg=true;;
138
139 -g) chgrpcmd="$chgrpprog $2"
140 shift;;
141
142 --help) echo "$usage"; exit $?;;
143
144 -m) mode=$2
145 case $mode in
146 *' '* | *' '* | *'
147'* | *'*'* | *'?'* | *'['*)
148 echo "$0: invalid mode: $mode" >&2
149 exit 1;;
150 esac
151 shift;;
152
153 -o) chowncmd="$chownprog $2"
154 shift;;
155
156 -s) stripcmd=$stripprog;;
157
158 -t) dst_arg=$2
159 shift;;
160
161 -T) no_target_directory=true;;
162
163 --version) echo "$0 $scriptversion"; exit $?;;
164
165 --) shift
166 break;;
167
168 -*) echo "$0: invalid option: $1" >&2
169 exit 1;;
170
171 *) break;;
172 esac
173 shift
174done
175
176if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
177 # When -d is used, all remaining arguments are directories to create.
178 # When -t is used, the destination is already specified.
179 # Otherwise, the last argument is the destination. Remove it from $@.
180 for arg
181 do
182 if test -n "$dst_arg"; then
183 # $@ is not empty: it contains at least $arg.
184 set fnord "$@" "$dst_arg"
185 shift # fnord
186 fi
187 shift # arg
188 dst_arg=$arg
189 done
190fi
191
192if test $# -eq 0; then
193 if test -z "$dir_arg"; then
194 echo "$0: no input file specified." >&2
195 exit 1
196 fi
197 # It's OK to call `install-sh -d' without argument.
198 # This can happen when creating conditional directories.
199 exit 0
200fi
201
202if test -z "$dir_arg"; then
203 trap '(exit $?); exit' 1 2 13 15
204
205 # Set umask so as not to create temps with too-generous modes.
206 # However, 'strip' requires both read and write access to temps.
207 case $mode in
208 # Optimize common cases.
209 *644) cp_umask=133;;
210 *755) cp_umask=22;;
211
212 *[0-7])
213 if test -z "$stripcmd"; then
214 u_plus_rw=
215 else
216 u_plus_rw='% 200'
217 fi
218 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
219 *)
220 if test -z "$stripcmd"; then
221 u_plus_rw=
222 else
223 u_plus_rw=,u+rw
224 fi
225 cp_umask=$mode$u_plus_rw;;
226 esac
227fi
228
229for src
230do
231 # Protect names starting with `-'.
232 case $src in
233 -*) src=./$src;;
234 esac
235
236 if test -n "$dir_arg"; then
237 dst=$src
238 dstdir=$dst
239 test -d "$dstdir"
240 dstdir_status=$?
241 else
242
243 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
244 # might cause directories to be created, which would be especially bad
245 # if $src (and thus $dsttmp) contains '*'.
246 if test ! -f "$src" && test ! -d "$src"; then
247 echo "$0: $src does not exist." >&2
248 exit 1
249 fi
250
251 if test -z "$dst_arg"; then
252 echo "$0: no destination specified." >&2
253 exit 1
254 fi
255
256 dst=$dst_arg
257 # Protect names starting with `-'.
258 case $dst in
259 -*) dst=./$dst;;
260 esac
261
262 # If destination is a directory, append the input filename; won't work
263 # if double slashes aren't ignored.
264 if test -d "$dst"; then
265 if test -n "$no_target_directory"; then
266 echo "$0: $dst_arg: Is a directory" >&2
267 exit 1
268 fi
269 dstdir=$dst
270 dst=$dstdir/`basename "$src"`
271 dstdir_status=0
272 else
273 # Prefer dirname, but fall back on a substitute if dirname fails.
274 dstdir=`
275 (dirname "$dst") 2>/dev/null ||
276 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
277 X"$dst" : 'X\(//\)[^/]' \| \
278 X"$dst" : 'X\(//\)$' \| \
279 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
280 echo X"$dst" |
281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
282 s//\1/
283 q
284 }
285 /^X\(\/\/\)[^/].*/{
286 s//\1/
287 q
288 }
289 /^X\(\/\/\)$/{
290 s//\1/
291 q
292 }
293 /^X\(\/\).*/{
294 s//\1/
295 q
296 }
297 s/.*/./; q'
298 `
299
300 test -d "$dstdir"
301 dstdir_status=$?
302 fi
303 fi
304
305 obsolete_mkdir_used=false
306
307 if test $dstdir_status != 0; then
308 case $posix_mkdir in
309 '')
310 # Create intermediate dirs using mode 755 as modified by the umask.
311 # This is like FreeBSD 'install' as of 1997-10-28.
312 umask=`umask`
313 case $stripcmd.$umask in
314 # Optimize common cases.
315 *[2367][2367]) mkdir_umask=$umask;;
316 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
317
318 *[0-7])
319 mkdir_umask=`expr $umask + 22 \
320 - $umask % 100 % 40 + $umask % 20 \
321 - $umask % 10 % 4 + $umask % 2
322 `;;
323 *) mkdir_umask=$umask,go-w;;
324 esac
325
326 # With -d, create the new directory with the user-specified mode.
327 # Otherwise, rely on $mkdir_umask.
328 if test -n "$dir_arg"; then
329 mkdir_mode=-m$mode
330 else
331 mkdir_mode=
332 fi
333
334 posix_mkdir=false
335 case $umask in
336 *[123567][0-7][0-7])
337 # POSIX mkdir -p sets u+wx bits regardless of umask, which
338 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
339 ;;
340 *)
341 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
342 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
343
344 if (umask $mkdir_umask &&
345 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
346 then
347 if test -z "$dir_arg" || {
348 # Check for POSIX incompatibilities with -m.
349 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
350 # other-writeable bit of parent directory when it shouldn't.
351 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
352 ls_ld_tmpdir=`ls -ld "$tmpdir"`
353 case $ls_ld_tmpdir in
354 d????-?r-*) different_mode=700;;
355 d????-?--*) different_mode=755;;
356 *) false;;
357 esac &&
358 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
359 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
360 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
361 }
362 }
363 then posix_mkdir=:
364 fi
365 rmdir "$tmpdir/d" "$tmpdir"
366 else
367 # Remove any dirs left behind by ancient mkdir implementations.
368 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
369 fi
370 trap '' 0;;
371 esac;;
372 esac
373
374 if
375 $posix_mkdir && (
376 umask $mkdir_umask &&
377 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
378 )
379 then :
380 else
381
382 # The umask is ridiculous, or mkdir does not conform to POSIX,
383 # or it failed possibly due to a race condition. Create the
384 # directory the slow way, step by step, checking for races as we go.
385
386 case $dstdir in
387 /*) prefix='/';;
388 -*) prefix='./';;
389 *) prefix='';;
390 esac
391
392 eval "$initialize_posix_glob"
393
394 oIFS=$IFS
395 IFS=/
396 $posix_glob set -f
397 set fnord $dstdir
398 shift
399 $posix_glob set +f
400 IFS=$oIFS
401
402 prefixes=
403
404 for d
405 do
406 test -z "$d" && continue
407
408 prefix=$prefix$d
409 if test -d "$prefix"; then
410 prefixes=
411 else
412 if $posix_mkdir; then
413 (umask=$mkdir_umask &&
414 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
415 # Don't fail if two instances are running concurrently.
416 test -d "$prefix" || exit 1
417 else
418 case $prefix in
419 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
420 *) qprefix=$prefix;;
421 esac
422 prefixes="$prefixes '$qprefix'"
423 fi
424 fi
425 prefix=$prefix/
426 done
427
428 if test -n "$prefixes"; then
429 # Don't fail if two instances are running concurrently.
430 (umask $mkdir_umask &&
431 eval "\$doit_exec \$mkdirprog $prefixes") ||
432 test -d "$dstdir" || exit 1
433 obsolete_mkdir_used=true
434 fi
435 fi
436 fi
437
438 if test -n "$dir_arg"; then
439 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
440 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
441 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
442 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
443 else
444
445 # Make a couple of temp file names in the proper directory.
446 dsttmp=$dstdir/_inst.$$_
447 rmtmp=$dstdir/_rm.$$_
448
449 # Trap to clean up those temp files at exit.
450 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
451
452 # Copy the file name to the temp name.
453 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
454
455 # and set any options; do chmod last to preserve setuid bits.
456 #
457 # If any of these fail, we abort the whole thing. If we want to
458 # ignore errors from any of these, just make sure not to ignore
459 # errors from the above "$doit $cpprog $src $dsttmp" command.
460 #
461 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
462 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
463 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
464 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
465
466 # If -C, don't bother to copy if it wouldn't change the file.
467 if $copy_on_change &&
468 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
469 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
470
471 eval "$initialize_posix_glob" &&
472 $posix_glob set -f &&
473 set X $old && old=:$2:$4:$5:$6 &&
474 set X $new && new=:$2:$4:$5:$6 &&
475 $posix_glob set +f &&
476
477 test "$old" = "$new" &&
478 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
479 then
480 rm -f "$dsttmp"
481 else
482 # Rename the file to the real destination.
483 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
484
485 # The rename failed, perhaps because mv can't rename something else
486 # to itself, or perhaps because mv is so ancient that it does not
487 # support -f.
488 {
489 # Now remove or move aside any old file at destination location.
490 # We try this two ways since rm can't unlink itself on some
491 # systems and the destination file might be busy for other
492 # reasons. In this case, the final cleanup might fail but the new
493 # file should still install successfully.
494 {
495 test ! -f "$dst" ||
496 $doit $rmcmd -f "$dst" 2>/dev/null ||
497 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
498 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
499 } ||
500 { echo "$0: cannot unlink or rename $dst" >&2
501 (exit 1); exit 1
502 }
503 } &&
504
505 # Now rename the file to the real destination.
506 $doit $mvcmd "$dsttmp" "$dst"
507 }
508 fi || exit 1
509
510 trap '' 0
511 fi
512done
513
514# Local variables:
515# eval: (add-hook 'write-file-hooks 'time-stamp)
516# time-stamp-start: "scriptversion="
517# time-stamp-format: "%:y-%02m-%02d.%02H"
518# time-stamp-time-zone: "UTC"
519# time-stamp-end: "; # UTC"
520# End:
diff --git a/libraries/eet/ltmain.sh b/libraries/eet/ltmain.sh
new file mode 100755
index 0000000..fa4b1e1
--- /dev/null
+++ b/libraries/eet/ltmain.sh
@@ -0,0 +1,8413 @@
1# Generated from ltmain.m4sh.
2
3# ltmain.sh (GNU libtool) 2.2.6b
4# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5
6# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
7# This is free software; see the source for copying conditions. There is NO
8# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10# GNU Libtool is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2 of the License, or
13# (at your option) any later version.
14#
15# As a special exception to the GNU General Public License,
16# if you distribute this file as part of a program or library that
17# is built using GNU Libtool, you may include this file under the
18# same distribution terms that you use for the rest of that program.
19#
20# GNU Libtool is distributed in the hope that it will be useful, but
21# WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23# General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with GNU Libtool; see the file COPYING. If not, a copy
27# can be downloaded from http://www.gnu.org/licenses/gpl.html,
28# or obtained by writing to the Free Software Foundation, Inc.,
29# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30
31# Usage: $progname [OPTION]... [MODE-ARG]...
32#
33# Provide generalized library-building support services.
34#
35# --config show all configuration variables
36# --debug enable verbose shell tracing
37# -n, --dry-run display commands without modifying any files
38# --features display basic configuration information and exit
39# --mode=MODE use operation mode MODE
40# --preserve-dup-deps don't remove duplicate dependency libraries
41# --quiet, --silent don't print informational messages
42# --tag=TAG use configuration variables from tag TAG
43# -v, --verbose print informational messages (default)
44# --version print version information
45# -h, --help print short or long help message
46#
47# MODE must be one of the following:
48#
49# clean remove files from the build directory
50# compile compile a source file into a libtool object
51# execute automatically set library path, then run a program
52# finish complete the installation of libtool libraries
53# install install libraries or executables
54# link create a library or an executable
55# uninstall remove libraries from an installed directory
56#
57# MODE-ARGS vary depending on the MODE.
58# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
59#
60# When reporting a bug, please describe a test case to reproduce it and
61# include the following information:
62#
63# host-triplet: $host
64# shell: $SHELL
65# compiler: $LTCC
66# compiler flags: $LTCFLAGS
67# linker: $LD (gnu? $with_gnu_ld)
68# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3
69# automake: $automake_version
70# autoconf: $autoconf_version
71#
72# Report bugs to <bug-libtool@gnu.org>.
73
74PROGRAM=ltmain.sh
75PACKAGE=libtool
76VERSION="2.2.6b Debian-2.2.6b-2ubuntu3"
77TIMESTAMP=""
78package_revision=1.3017
79
80# Be Bourne compatible
81if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
82 emulate sh
83 NULLCMD=:
84 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
85 # is contrary to our usage. Disable this feature.
86 alias -g '${1+"$@"}'='"$@"'
87 setopt NO_GLOB_SUBST
88else
89 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
90fi
91BIN_SH=xpg4; export BIN_SH # for Tru64
92DUALCASE=1; export DUALCASE # for MKS sh
93
94# NLS nuisances: We save the old values to restore during execute mode.
95# Only set LANG and LC_ALL to C if already set.
96# These must not be set unconditionally because not all systems understand
97# e.g. LANG=C (notably SCO).
98lt_user_locale=
99lt_safe_locale=
100for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
101do
102 eval "if test \"\${$lt_var+set}\" = set; then
103 save_$lt_var=\$$lt_var
104 $lt_var=C
105 export $lt_var
106 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
107 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
108 fi"
109done
110
111$lt_unset CDPATH
112
113
114
115
116
117: ${CP="cp -f"}
118: ${ECHO="echo"}
119: ${EGREP="/bin/grep -E"}
120: ${FGREP="/bin/grep -F"}
121: ${GREP="/bin/grep"}
122: ${LN_S="ln -s"}
123: ${MAKE="make"}
124: ${MKDIR="mkdir"}
125: ${MV="mv -f"}
126: ${RM="rm -f"}
127: ${SED="/bin/sed"}
128: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
129: ${Xsed="$SED -e 1s/^X//"}
130
131# Global variables:
132EXIT_SUCCESS=0
133EXIT_FAILURE=1
134EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
135EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
136
137exit_status=$EXIT_SUCCESS
138
139# Make sure IFS has a sensible default
140lt_nl='
141'
142IFS=" $lt_nl"
143
144dirname="s,/[^/]*$,,"
145basename="s,^.*/,,"
146
147# func_dirname_and_basename file append nondir_replacement
148# perform func_basename and func_dirname in a single function
149# call:
150# dirname: Compute the dirname of FILE. If nonempty,
151# add APPEND to the result, otherwise set result
152# to NONDIR_REPLACEMENT.
153# value returned in "$func_dirname_result"
154# basename: Compute filename of FILE.
155# value retuned in "$func_basename_result"
156# Implementation must be kept synchronized with func_dirname
157# and func_basename. For efficiency, we do not delegate to
158# those functions but instead duplicate the functionality here.
159func_dirname_and_basename ()
160{
161 # Extract subdirectory from the argument.
162 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
163 if test "X$func_dirname_result" = "X${1}"; then
164 func_dirname_result="${3}"
165 else
166 func_dirname_result="$func_dirname_result${2}"
167 fi
168 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
169}
170
171# Generated shell functions inserted here.
172
173# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
174# is ksh but when the shell is invoked as "sh" and the current value of
175# the _XPG environment variable is not equal to 1 (one), the special
176# positional parameter $0, within a function call, is the name of the
177# function.
178progpath="$0"
179
180# The name of this program:
181# In the unlikely event $progname began with a '-', it would play havoc with
182# func_echo (imagine progname=-n), so we prepend ./ in that case:
183func_dirname_and_basename "$progpath"
184progname=$func_basename_result
185case $progname in
186 -*) progname=./$progname ;;
187esac
188
189# Make sure we have an absolute path for reexecution:
190case $progpath in
191 [\\/]*|[A-Za-z]:\\*) ;;
192 *[\\/]*)
193 progdir=$func_dirname_result
194 progdir=`cd "$progdir" && pwd`
195 progpath="$progdir/$progname"
196 ;;
197 *)
198 save_IFS="$IFS"
199 IFS=:
200 for progdir in $PATH; do
201 IFS="$save_IFS"
202 test -x "$progdir/$progname" && break
203 done
204 IFS="$save_IFS"
205 test -n "$progdir" || progdir=`pwd`
206 progpath="$progdir/$progname"
207 ;;
208esac
209
210# Sed substitution that helps us do robust quoting. It backslashifies
211# metacharacters that are still active within double-quoted strings.
212Xsed="${SED}"' -e 1s/^X//'
213sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
214
215# Same as above, but do not quote variable references.
216double_quote_subst='s/\(["`\\]\)/\\\1/g'
217
218# Re-`\' parameter expansions in output of double_quote_subst that were
219# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
220# in input to double_quote_subst, that '$' was protected from expansion.
221# Since each input `\' is now two `\'s, look for any number of runs of
222# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
223bs='\\'
224bs2='\\\\'
225bs4='\\\\\\\\'
226dollar='\$'
227sed_double_backslash="\
228 s/$bs4/&\\
229/g
230 s/^$bs2$dollar/$bs&/
231 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
232 s/\n//g"
233
234# Standard options:
235opt_dry_run=false
236opt_help=false
237opt_quiet=false
238opt_verbose=false
239opt_warning=:
240
241# func_echo arg...
242# Echo program name prefixed message, along with the current mode
243# name if it has been set yet.
244func_echo ()
245{
246 $ECHO "$progname${mode+: }$mode: $*"
247}
248
249# func_verbose arg...
250# Echo program name prefixed message in verbose mode only.
251func_verbose ()
252{
253 $opt_verbose && func_echo ${1+"$@"}
254
255 # A bug in bash halts the script if the last line of a function
256 # fails when set -e is in force, so we need another command to
257 # work around that:
258 :
259}
260
261# func_error arg...
262# Echo program name prefixed message to standard error.
263func_error ()
264{
265 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
266}
267
268# func_warning arg...
269# Echo program name prefixed warning message to standard error.
270func_warning ()
271{
272 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
273
274 # bash bug again:
275 :
276}
277
278# func_fatal_error arg...
279# Echo program name prefixed message to standard error, and exit.
280func_fatal_error ()
281{
282 func_error ${1+"$@"}
283 exit $EXIT_FAILURE
284}
285
286# func_fatal_help arg...
287# Echo program name prefixed message to standard error, followed by
288# a help hint, and exit.
289func_fatal_help ()
290{
291 func_error ${1+"$@"}
292 func_fatal_error "$help"
293}
294help="Try \`$progname --help' for more information." ## default
295
296
297# func_grep expression filename
298# Check whether EXPRESSION matches any line of FILENAME, without output.
299func_grep ()
300{
301 $GREP "$1" "$2" >/dev/null 2>&1
302}
303
304
305# func_mkdir_p directory-path
306# Make sure the entire path to DIRECTORY-PATH is available.
307func_mkdir_p ()
308{
309 my_directory_path="$1"
310 my_dir_list=
311
312 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
313
314 # Protect directory names starting with `-'
315 case $my_directory_path in
316 -*) my_directory_path="./$my_directory_path" ;;
317 esac
318
319 # While some portion of DIR does not yet exist...
320 while test ! -d "$my_directory_path"; do
321 # ...make a list in topmost first order. Use a colon delimited
322 # list incase some portion of path contains whitespace.
323 my_dir_list="$my_directory_path:$my_dir_list"
324
325 # If the last portion added has no slash in it, the list is done
326 case $my_directory_path in */*) ;; *) break ;; esac
327
328 # ...otherwise throw away the child directory and loop
329 my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
330 done
331 my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
332
333 save_mkdir_p_IFS="$IFS"; IFS=':'
334 for my_dir in $my_dir_list; do
335 IFS="$save_mkdir_p_IFS"
336 # mkdir can fail with a `File exist' error if two processes
337 # try to create one of the directories concurrently. Don't
338 # stop in that case!
339 $MKDIR "$my_dir" 2>/dev/null || :
340 done
341 IFS="$save_mkdir_p_IFS"
342
343 # Bail out if we (or some other process) failed to create a directory.
344 test -d "$my_directory_path" || \
345 func_fatal_error "Failed to create \`$1'"
346 fi
347}
348
349
350# func_mktempdir [string]
351# Make a temporary directory that won't clash with other running
352# libtool processes, and avoids race conditions if possible. If
353# given, STRING is the basename for that directory.
354func_mktempdir ()
355{
356 my_template="${TMPDIR-/tmp}/${1-$progname}"
357
358 if test "$opt_dry_run" = ":"; then
359 # Return a directory name, but don't create it in dry-run mode
360 my_tmpdir="${my_template}-$$"
361 else
362
363 # If mktemp works, use that first and foremost
364 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
365
366 if test ! -d "$my_tmpdir"; then
367 # Failing that, at least try and use $RANDOM to avoid a race
368 my_tmpdir="${my_template}-${RANDOM-0}$$"
369
370 save_mktempdir_umask=`umask`
371 umask 0077
372 $MKDIR "$my_tmpdir"
373 umask $save_mktempdir_umask
374 fi
375
376 # If we're not in dry-run mode, bomb out on failure
377 test -d "$my_tmpdir" || \
378 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
379 fi
380
381 $ECHO "X$my_tmpdir" | $Xsed
382}
383
384
385# func_quote_for_eval arg
386# Aesthetically quote ARG to be evaled later.
387# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
388# is double-quoted, suitable for a subsequent eval, whereas
389# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
390# which are still active within double quotes backslashified.
391func_quote_for_eval ()
392{
393 case $1 in
394 *[\\\`\"\$]*)
395 func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
396 *)
397 func_quote_for_eval_unquoted_result="$1" ;;
398 esac
399
400 case $func_quote_for_eval_unquoted_result in
401 # Double-quote args containing shell metacharacters to delay
402 # word splitting, command substitution and and variable
403 # expansion for a subsequent eval.
404 # Many Bourne shells cannot handle close brackets correctly
405 # in scan sets, so we specify it separately.
406 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
407 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
408 ;;
409 *)
410 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
411 esac
412}
413
414
415# func_quote_for_expand arg
416# Aesthetically quote ARG to be evaled later; same as above,
417# but do not quote variable references.
418func_quote_for_expand ()
419{
420 case $1 in
421 *[\\\`\"]*)
422 my_arg=`$ECHO "X$1" | $Xsed \
423 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
424 *)
425 my_arg="$1" ;;
426 esac
427
428 case $my_arg in
429 # Double-quote args containing shell metacharacters to delay
430 # word splitting and command substitution for a subsequent eval.
431 # Many Bourne shells cannot handle close brackets correctly
432 # in scan sets, so we specify it separately.
433 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
434 my_arg="\"$my_arg\""
435 ;;
436 esac
437
438 func_quote_for_expand_result="$my_arg"
439}
440
441
442# func_show_eval cmd [fail_exp]
443# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
444# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
445# is given, then evaluate it.
446func_show_eval ()
447{
448 my_cmd="$1"
449 my_fail_exp="${2-:}"
450
451 ${opt_silent-false} || {
452 func_quote_for_expand "$my_cmd"
453 eval "func_echo $func_quote_for_expand_result"
454 }
455
456 if ${opt_dry_run-false}; then :; else
457 eval "$my_cmd"
458 my_status=$?
459 if test "$my_status" -eq 0; then :; else
460 eval "(exit $my_status); $my_fail_exp"
461 fi
462 fi
463}
464
465
466# func_show_eval_locale cmd [fail_exp]
467# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
468# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
469# is given, then evaluate it. Use the saved locale for evaluation.
470func_show_eval_locale ()
471{
472 my_cmd="$1"
473 my_fail_exp="${2-:}"
474
475 ${opt_silent-false} || {
476 func_quote_for_expand "$my_cmd"
477 eval "func_echo $func_quote_for_expand_result"
478 }
479
480 if ${opt_dry_run-false}; then :; else
481 eval "$lt_user_locale
482 $my_cmd"
483 my_status=$?
484 eval "$lt_safe_locale"
485 if test "$my_status" -eq 0; then :; else
486 eval "(exit $my_status); $my_fail_exp"
487 fi
488 fi
489}
490
491
492
493
494
495# func_version
496# Echo version message to standard output and exit.
497func_version ()
498{
499 $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
500 s/^# //
501 s/^# *$//
502 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
503 p
504 }' < "$progpath"
505 exit $?
506}
507
508# func_usage
509# Echo short help message to standard output and exit.
510func_usage ()
511{
512 $SED -n '/^# Usage:/,/# -h/ {
513 s/^# //
514 s/^# *$//
515 s/\$progname/'$progname'/
516 p
517 }' < "$progpath"
518 $ECHO
519 $ECHO "run \`$progname --help | more' for full usage"
520 exit $?
521}
522
523# func_help
524# Echo long help message to standard output and exit.
525func_help ()
526{
527 $SED -n '/^# Usage:/,/# Report bugs to/ {
528 s/^# //
529 s/^# *$//
530 s*\$progname*'$progname'*
531 s*\$host*'"$host"'*
532 s*\$SHELL*'"$SHELL"'*
533 s*\$LTCC*'"$LTCC"'*
534 s*\$LTCFLAGS*'"$LTCFLAGS"'*
535 s*\$LD*'"$LD"'*
536 s/\$with_gnu_ld/'"$with_gnu_ld"'/
537 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
538 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
539 p
540 }' < "$progpath"
541 exit $?
542}
543
544# func_missing_arg argname
545# Echo program name prefixed message to standard error and set global
546# exit_cmd.
547func_missing_arg ()
548{
549 func_error "missing argument for $1"
550 exit_cmd=exit
551}
552
553exit_cmd=:
554
555
556
557
558
559# Check that we have a working $ECHO.
560if test "X$1" = X--no-reexec; then
561 # Discard the --no-reexec flag, and continue.
562 shift
563elif test "X$1" = X--fallback-echo; then
564 # Avoid inline document here, it may be left over
565 :
566elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
567 # Yippee, $ECHO works!
568 :
569else
570 # Restart under the correct shell, and then maybe $ECHO will work.
571 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
572fi
573
574if test "X$1" = X--fallback-echo; then
575 # used as fallback echo
576 shift
577 cat <<EOF
578$*
579EOF
580 exit $EXIT_SUCCESS
581fi
582
583magic="%%%MAGIC variable%%%"
584magic_exe="%%%MAGIC EXE variable%%%"
585
586# Global variables.
587# $mode is unset
588nonopt=
589execute_dlfiles=
590preserve_args=
591lo2o="s/\\.lo\$/.${objext}/"
592o2lo="s/\\.${objext}\$/.lo/"
593extracted_archives=
594extracted_serial=0
595
596opt_dry_run=false
597opt_duplicate_deps=false
598opt_silent=false
599opt_debug=:
600
601# If this variable is set in any of the actions, the command in it
602# will be execed at the end. This prevents here-documents from being
603# left over by shells.
604exec_cmd=
605
606# func_fatal_configuration arg...
607# Echo program name prefixed message to standard error, followed by
608# a configuration failure hint, and exit.
609func_fatal_configuration ()
610{
611 func_error ${1+"$@"}
612 func_error "See the $PACKAGE documentation for more information."
613 func_fatal_error "Fatal configuration error."
614}
615
616
617# func_config
618# Display the configuration for all the tags in this script.
619func_config ()
620{
621 re_begincf='^# ### BEGIN LIBTOOL'
622 re_endcf='^# ### END LIBTOOL'
623
624 # Default configuration.
625 $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
626
627 # Now print the configurations for the tags.
628 for tagname in $taglist; do
629 $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
630 done
631
632 exit $?
633}
634
635# func_features
636# Display the features supported by this script.
637func_features ()
638{
639 $ECHO "host: $host"
640 if test "$build_libtool_libs" = yes; then
641 $ECHO "enable shared libraries"
642 else
643 $ECHO "disable shared libraries"
644 fi
645 if test "$build_old_libs" = yes; then
646 $ECHO "enable static libraries"
647 else
648 $ECHO "disable static libraries"
649 fi
650
651 exit $?
652}
653
654# func_enable_tag tagname
655# Verify that TAGNAME is valid, and either flag an error and exit, or
656# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
657# variable here.
658func_enable_tag ()
659{
660 # Global variable:
661 tagname="$1"
662
663 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
664 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
665 sed_extractcf="/$re_begincf/,/$re_endcf/p"
666
667 # Validate tagname.
668 case $tagname in
669 *[!-_A-Za-z0-9,/]*)
670 func_fatal_error "invalid tag name: $tagname"
671 ;;
672 esac
673
674 # Don't test for the "default" C tag, as we know it's
675 # there but not specially marked.
676 case $tagname in
677 CC) ;;
678 *)
679 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
680 taglist="$taglist $tagname"
681
682 # Evaluate the configuration. Be careful to quote the path
683 # and the sed script, to avoid splitting on whitespace, but
684 # also don't use non-portable quotes within backquotes within
685 # quotes we have to do it in 2 steps:
686 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
687 eval "$extractedcf"
688 else
689 func_error "ignoring unknown tag $tagname"
690 fi
691 ;;
692 esac
693}
694
695# Parse options once, thoroughly. This comes as soon as possible in
696# the script to make things like `libtool --version' happen quickly.
697{
698
699 # Shorthand for --mode=foo, only valid as the first argument
700 case $1 in
701 clean|clea|cle|cl)
702 shift; set dummy --mode clean ${1+"$@"}; shift
703 ;;
704 compile|compil|compi|comp|com|co|c)
705 shift; set dummy --mode compile ${1+"$@"}; shift
706 ;;
707 execute|execut|execu|exec|exe|ex|e)
708 shift; set dummy --mode execute ${1+"$@"}; shift
709 ;;
710 finish|finis|fini|fin|fi|f)
711 shift; set dummy --mode finish ${1+"$@"}; shift
712 ;;
713 install|instal|insta|inst|ins|in|i)
714 shift; set dummy --mode install ${1+"$@"}; shift
715 ;;
716 link|lin|li|l)
717 shift; set dummy --mode link ${1+"$@"}; shift
718 ;;
719 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
720 shift; set dummy --mode uninstall ${1+"$@"}; shift
721 ;;
722 esac
723
724 # Parse non-mode specific arguments:
725 while test "$#" -gt 0; do
726 opt="$1"
727 shift
728
729 case $opt in
730 --config) func_config ;;
731
732 --debug) preserve_args="$preserve_args $opt"
733 func_echo "enabling shell trace mode"
734 opt_debug='set -x'
735 $opt_debug
736 ;;
737
738 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
739 execute_dlfiles="$execute_dlfiles $1"
740 shift
741 ;;
742
743 --dry-run | -n) opt_dry_run=: ;;
744 --features) func_features ;;
745 --finish) mode="finish" ;;
746
747 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
748 case $1 in
749 # Valid mode arguments:
750 clean) ;;
751 compile) ;;
752 execute) ;;
753 finish) ;;
754 install) ;;
755 link) ;;
756 relink) ;;
757 uninstall) ;;
758
759 # Catch anything else as an error
760 *) func_error "invalid argument for $opt"
761 exit_cmd=exit
762 break
763 ;;
764 esac
765
766 mode="$1"
767 shift
768 ;;
769
770 --preserve-dup-deps)
771 opt_duplicate_deps=: ;;
772
773 --quiet|--silent) preserve_args="$preserve_args $opt"
774 opt_silent=:
775 ;;
776
777 --verbose| -v) preserve_args="$preserve_args $opt"
778 opt_silent=false
779 ;;
780
781 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
782 preserve_args="$preserve_args $opt $1"
783 func_enable_tag "$1" # tagname is set here
784 shift
785 ;;
786
787 # Separate optargs to long options:
788 -dlopen=*|--mode=*|--tag=*)
789 func_opt_split "$opt"
790 set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
791 shift
792 ;;
793
794 -\?|-h) func_usage ;;
795 --help) opt_help=: ;;
796 --version) func_version ;;
797
798 -*) func_fatal_help "unrecognized option \`$opt'" ;;
799
800 *) nonopt="$opt"
801 break
802 ;;
803 esac
804 done
805
806
807 case $host in
808 *cygwin* | *mingw* | *pw32* | *cegcc*)
809 # don't eliminate duplications in $postdeps and $predeps
810 opt_duplicate_compiler_generated_deps=:
811 ;;
812 *)
813 opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
814 ;;
815 esac
816
817 # Having warned about all mis-specified options, bail out if
818 # anything was wrong.
819 $exit_cmd $EXIT_FAILURE
820}
821
822# func_check_version_match
823# Ensure that we are using m4 macros, and libtool script from the same
824# release of libtool.
825func_check_version_match ()
826{
827 if test "$package_revision" != "$macro_revision"; then
828 if test "$VERSION" != "$macro_version"; then
829 if test -z "$macro_version"; then
830 cat >&2 <<_LT_EOF
831$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
832$progname: definition of this LT_INIT comes from an older release.
833$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
834$progname: and run autoconf again.
835_LT_EOF
836 else
837 cat >&2 <<_LT_EOF
838$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
839$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
840$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
841$progname: and run autoconf again.
842_LT_EOF
843 fi
844 else
845 cat >&2 <<_LT_EOF
846$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
847$progname: but the definition of this LT_INIT comes from revision $macro_revision.
848$progname: You should recreate aclocal.m4 with macros from revision $package_revision
849$progname: of $PACKAGE $VERSION and run autoconf again.
850_LT_EOF
851 fi
852
853 exit $EXIT_MISMATCH
854 fi
855}
856
857
858## ----------- ##
859## Main. ##
860## ----------- ##
861
862$opt_help || {
863 # Sanity checks first:
864 func_check_version_match
865
866 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
867 func_fatal_configuration "not configured to build any kind of library"
868 fi
869
870 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
871
872
873 # Darwin sucks
874 eval std_shrext=\"$shrext_cmds\"
875
876
877 # Only execute mode is allowed to have -dlopen flags.
878 if test -n "$execute_dlfiles" && test "$mode" != execute; then
879 func_error "unrecognized option \`-dlopen'"
880 $ECHO "$help" 1>&2
881 exit $EXIT_FAILURE
882 fi
883
884 # Change the help message to a mode-specific one.
885 generic_help="$help"
886 help="Try \`$progname --help --mode=$mode' for more information."
887}
888
889
890# func_lalib_p file
891# True iff FILE is a libtool `.la' library or `.lo' object file.
892# This function is only a basic sanity check; it will hardly flush out
893# determined imposters.
894func_lalib_p ()
895{
896 test -f "$1" &&
897 $SED -e 4q "$1" 2>/dev/null \
898 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
899}
900
901# func_lalib_unsafe_p file
902# True iff FILE is a libtool `.la' library or `.lo' object file.
903# This function implements the same check as func_lalib_p without
904# resorting to external programs. To this end, it redirects stdin and
905# closes it afterwards, without saving the original file descriptor.
906# As a safety measure, use it only where a negative result would be
907# fatal anyway. Works if `file' does not exist.
908func_lalib_unsafe_p ()
909{
910 lalib_p=no
911 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
912 for lalib_p_l in 1 2 3 4
913 do
914 read lalib_p_line
915 case "$lalib_p_line" in
916 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
917 esac
918 done
919 exec 0<&5 5<&-
920 fi
921 test "$lalib_p" = yes
922}
923
924# func_ltwrapper_script_p file
925# True iff FILE is a libtool wrapper script
926# This function is only a basic sanity check; it will hardly flush out
927# determined imposters.
928func_ltwrapper_script_p ()
929{
930 func_lalib_p "$1"
931}
932
933# func_ltwrapper_executable_p file
934# True iff FILE is a libtool wrapper executable
935# This function is only a basic sanity check; it will hardly flush out
936# determined imposters.
937func_ltwrapper_executable_p ()
938{
939 func_ltwrapper_exec_suffix=
940 case $1 in
941 *.exe) ;;
942 *) func_ltwrapper_exec_suffix=.exe ;;
943 esac
944 $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
945}
946
947# func_ltwrapper_scriptname file
948# Assumes file is an ltwrapper_executable
949# uses $file to determine the appropriate filename for a
950# temporary ltwrapper_script.
951func_ltwrapper_scriptname ()
952{
953 func_ltwrapper_scriptname_result=""
954 if func_ltwrapper_executable_p "$1"; then
955 func_dirname_and_basename "$1" "" "."
956 func_stripname '' '.exe' "$func_basename_result"
957 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
958 fi
959}
960
961# func_ltwrapper_p file
962# True iff FILE is a libtool wrapper script or wrapper executable
963# This function is only a basic sanity check; it will hardly flush out
964# determined imposters.
965func_ltwrapper_p ()
966{
967 func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
968}
969
970
971# func_execute_cmds commands fail_cmd
972# Execute tilde-delimited COMMANDS.
973# If FAIL_CMD is given, eval that upon failure.
974# FAIL_CMD may read-access the current command in variable CMD!
975func_execute_cmds ()
976{
977 $opt_debug
978 save_ifs=$IFS; IFS='~'
979 for cmd in $1; do
980 IFS=$save_ifs
981 eval cmd=\"$cmd\"
982 func_show_eval "$cmd" "${2-:}"
983 done
984 IFS=$save_ifs
985}
986
987
988# func_source file
989# Source FILE, adding directory component if necessary.
990# Note that it is not necessary on cygwin/mingw to append a dot to
991# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
992# behavior happens only for exec(3), not for open(2)! Also, sourcing
993# `FILE.' does not work on cygwin managed mounts.
994func_source ()
995{
996 $opt_debug
997 case $1 in
998 */* | *\\*) . "$1" ;;
999 *) . "./$1" ;;
1000 esac
1001}
1002
1003
1004# func_infer_tag arg
1005# Infer tagged configuration to use if any are available and
1006# if one wasn't chosen via the "--tag" command line option.
1007# Only attempt this if the compiler in the base compile
1008# command doesn't match the default compiler.
1009# arg is usually of the form 'gcc ...'
1010func_infer_tag ()
1011{
1012 $opt_debug
1013 if test -n "$available_tags" && test -z "$tagname"; then
1014 CC_quoted=
1015 for arg in $CC; do
1016 func_quote_for_eval "$arg"
1017 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1018 done
1019 case $@ in
1020 # Blanks in the command may have been stripped by the calling shell,
1021 # but not from the CC environment variable when configure was run.
1022 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1023 # Blanks at the start of $base_compile will cause this to fail
1024 # if we don't check for them as well.
1025 *)
1026 for z in $available_tags; do
1027 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
1028 # Evaluate the configuration.
1029 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
1030 CC_quoted=
1031 for arg in $CC; do
1032 # Double-quote args containing other shell metacharacters.
1033 func_quote_for_eval "$arg"
1034 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1035 done
1036 case "$@ " in
1037 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1038 # The compiler in the base compile command matches
1039 # the one in the tagged configuration.
1040 # Assume this is the tagged configuration we want.
1041 tagname=$z
1042 break
1043 ;;
1044 esac
1045 fi
1046 done
1047 # If $tagname still isn't set, then no tagged configuration
1048 # was found and let the user know that the "--tag" command
1049 # line option must be used.
1050 if test -z "$tagname"; then
1051 func_echo "unable to infer tagged configuration"
1052 func_fatal_error "specify a tag with \`--tag'"
1053# else
1054# func_verbose "using $tagname tagged configuration"
1055 fi
1056 ;;
1057 esac
1058 fi
1059}
1060
1061
1062
1063# func_write_libtool_object output_name pic_name nonpic_name
1064# Create a libtool object file (analogous to a ".la" file),
1065# but don't create it if we're doing a dry run.
1066func_write_libtool_object ()
1067{
1068 write_libobj=${1}
1069 if test "$build_libtool_libs" = yes; then
1070 write_lobj=\'${2}\'
1071 else
1072 write_lobj=none
1073 fi
1074
1075 if test "$build_old_libs" = yes; then
1076 write_oldobj=\'${3}\'
1077 else
1078 write_oldobj=none
1079 fi
1080
1081 $opt_dry_run || {
1082 cat >${write_libobj}T <<EOF
1083# $write_libobj - a libtool object file
1084# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1085#
1086# Please DO NOT delete this file!
1087# It is necessary for linking the library.
1088
1089# Name of the PIC object.
1090pic_object=$write_lobj
1091
1092# Name of the non-PIC object
1093non_pic_object=$write_oldobj
1094
1095EOF
1096 $MV "${write_libobj}T" "${write_libobj}"
1097 }
1098}
1099
1100# func_mode_compile arg...
1101func_mode_compile ()
1102{
1103 $opt_debug
1104 # Get the compilation command and the source file.
1105 base_compile=
1106 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1107 suppress_opt=yes
1108 suppress_output=
1109 arg_mode=normal
1110 libobj=
1111 later=
1112 pie_flag=
1113
1114 for arg
1115 do
1116 case $arg_mode in
1117 arg )
1118 # do not "continue". Instead, add this to base_compile
1119 lastarg="$arg"
1120 arg_mode=normal
1121 ;;
1122
1123 target )
1124 libobj="$arg"
1125 arg_mode=normal
1126 continue
1127 ;;
1128
1129 normal )
1130 # Accept any command-line options.
1131 case $arg in
1132 -o)
1133 test -n "$libobj" && \
1134 func_fatal_error "you cannot specify \`-o' more than once"
1135 arg_mode=target
1136 continue
1137 ;;
1138
1139 -pie | -fpie | -fPIE)
1140 pie_flag="$pie_flag $arg"
1141 continue
1142 ;;
1143
1144 -shared | -static | -prefer-pic | -prefer-non-pic)
1145 later="$later $arg"
1146 continue
1147 ;;
1148
1149 -no-suppress)
1150 suppress_opt=no
1151 continue
1152 ;;
1153
1154 -Xcompiler)
1155 arg_mode=arg # the next one goes into the "base_compile" arg list
1156 continue # The current "srcfile" will either be retained or
1157 ;; # replaced later. I would guess that would be a bug.
1158
1159 -Wc,*)
1160 func_stripname '-Wc,' '' "$arg"
1161 args=$func_stripname_result
1162 lastarg=
1163 save_ifs="$IFS"; IFS=','
1164 for arg in $args; do
1165 IFS="$save_ifs"
1166 func_quote_for_eval "$arg"
1167 lastarg="$lastarg $func_quote_for_eval_result"
1168 done
1169 IFS="$save_ifs"
1170 func_stripname ' ' '' "$lastarg"
1171 lastarg=$func_stripname_result
1172
1173 # Add the arguments to base_compile.
1174 base_compile="$base_compile $lastarg"
1175 continue
1176 ;;
1177
1178 *)
1179 # Accept the current argument as the source file.
1180 # The previous "srcfile" becomes the current argument.
1181 #
1182 lastarg="$srcfile"
1183 srcfile="$arg"
1184 ;;
1185 esac # case $arg
1186 ;;
1187 esac # case $arg_mode
1188
1189 # Aesthetically quote the previous argument.
1190 func_quote_for_eval "$lastarg"
1191 base_compile="$base_compile $func_quote_for_eval_result"
1192 done # for arg
1193
1194 case $arg_mode in
1195 arg)
1196 func_fatal_error "you must specify an argument for -Xcompile"
1197 ;;
1198 target)
1199 func_fatal_error "you must specify a target with \`-o'"
1200 ;;
1201 *)
1202 # Get the name of the library object.
1203 test -z "$libobj" && {
1204 func_basename "$srcfile"
1205 libobj="$func_basename_result"
1206 }
1207 ;;
1208 esac
1209
1210 # Recognize several different file suffixes.
1211 # If the user specifies -o file.o, it is replaced with file.lo
1212 case $libobj in
1213 *.[cCFSifmso] | \
1214 *.ada | *.adb | *.ads | *.asm | \
1215 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1216 *.[fF][09]? | *.for | *.java | *.obj | *.sx)
1217 func_xform "$libobj"
1218 libobj=$func_xform_result
1219 ;;
1220 esac
1221
1222 case $libobj in
1223 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
1224 *)
1225 func_fatal_error "cannot determine name of library object from \`$libobj'"
1226 ;;
1227 esac
1228
1229 func_infer_tag $base_compile
1230
1231 for arg in $later; do
1232 case $arg in
1233 -shared)
1234 test "$build_libtool_libs" != yes && \
1235 func_fatal_configuration "can not build a shared library"
1236 build_old_libs=no
1237 continue
1238 ;;
1239
1240 -static)
1241 build_libtool_libs=no
1242 build_old_libs=yes
1243 continue
1244 ;;
1245
1246 -prefer-pic)
1247 pic_mode=yes
1248 continue
1249 ;;
1250
1251 -prefer-non-pic)
1252 pic_mode=no
1253 continue
1254 ;;
1255 esac
1256 done
1257
1258 func_quote_for_eval "$libobj"
1259 test "X$libobj" != "X$func_quote_for_eval_result" \
1260 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
1261 && func_warning "libobj name \`$libobj' may not contain shell special characters."
1262 func_dirname_and_basename "$obj" "/" ""
1263 objname="$func_basename_result"
1264 xdir="$func_dirname_result"
1265 lobj=${xdir}$objdir/$objname
1266
1267 test -z "$base_compile" && \
1268 func_fatal_help "you must specify a compilation command"
1269
1270 # Delete any leftover library objects.
1271 if test "$build_old_libs" = yes; then
1272 removelist="$obj $lobj $libobj ${libobj}T"
1273 else
1274 removelist="$lobj $libobj ${libobj}T"
1275 fi
1276
1277 # On Cygwin there's no "real" PIC flag so we must build both object types
1278 case $host_os in
1279 cygwin* | mingw* | pw32* | os2* | cegcc*)
1280 pic_mode=default
1281 ;;
1282 esac
1283 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1284 # non-PIC code in shared libraries is not supported
1285 pic_mode=default
1286 fi
1287
1288 # Calculate the filename of the output object if compiler does
1289 # not support -o with -c
1290 if test "$compiler_c_o" = no; then
1291 output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1292 lockfile="$output_obj.lock"
1293 else
1294 output_obj=
1295 need_locks=no
1296 lockfile=
1297 fi
1298
1299 # Lock this critical section if it is needed
1300 # We use this script file to make the link, it avoids creating a new file
1301 if test "$need_locks" = yes; then
1302 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1303 func_echo "Waiting for $lockfile to be removed"
1304 sleep 2
1305 done
1306 elif test "$need_locks" = warn; then
1307 if test -f "$lockfile"; then
1308 $ECHO "\
1309*** ERROR, $lockfile exists and contains:
1310`cat $lockfile 2>/dev/null`
1311
1312This indicates that another process is trying to use the same
1313temporary object file, and libtool could not work around it because
1314your compiler does not support \`-c' and \`-o' together. If you
1315repeat this compilation, it may succeed, by chance, but you had better
1316avoid parallel builds (make -j) in this platform, or get a better
1317compiler."
1318
1319 $opt_dry_run || $RM $removelist
1320 exit $EXIT_FAILURE
1321 fi
1322 removelist="$removelist $output_obj"
1323 $ECHO "$srcfile" > "$lockfile"
1324 fi
1325
1326 $opt_dry_run || $RM $removelist
1327 removelist="$removelist $lockfile"
1328 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
1329
1330 if test -n "$fix_srcfile_path"; then
1331 eval srcfile=\"$fix_srcfile_path\"
1332 fi
1333 func_quote_for_eval "$srcfile"
1334 qsrcfile=$func_quote_for_eval_result
1335
1336 # Only build a PIC object if we are building libtool libraries.
1337 if test "$build_libtool_libs" = yes; then
1338 # Without this assignment, base_compile gets emptied.
1339 fbsd_hideous_sh_bug=$base_compile
1340
1341 if test "$pic_mode" != no; then
1342 command="$base_compile $qsrcfile $pic_flag"
1343 else
1344 # Don't build PIC code
1345 command="$base_compile $qsrcfile"
1346 fi
1347
1348 func_mkdir_p "$xdir$objdir"
1349
1350 if test -z "$output_obj"; then
1351 # Place PIC objects in $objdir
1352 command="$command -o $lobj"
1353 fi
1354
1355 func_show_eval_locale "$command" \
1356 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
1357
1358 if test "$need_locks" = warn &&
1359 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1360 $ECHO "\
1361*** ERROR, $lockfile contains:
1362`cat $lockfile 2>/dev/null`
1363
1364but it should contain:
1365$srcfile
1366
1367This indicates that another process is trying to use the same
1368temporary object file, and libtool could not work around it because
1369your compiler does not support \`-c' and \`-o' together. If you
1370repeat this compilation, it may succeed, by chance, but you had better
1371avoid parallel builds (make -j) in this platform, or get a better
1372compiler."
1373
1374 $opt_dry_run || $RM $removelist
1375 exit $EXIT_FAILURE
1376 fi
1377
1378 # Just move the object if needed, then go on to compile the next one
1379 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1380 func_show_eval '$MV "$output_obj" "$lobj"' \
1381 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1382 fi
1383
1384 # Allow error messages only from the first compilation.
1385 if test "$suppress_opt" = yes; then
1386 suppress_output=' >/dev/null 2>&1'
1387 fi
1388 fi
1389
1390 # Only build a position-dependent object if we build old libraries.
1391 if test "$build_old_libs" = yes; then
1392 if test "$pic_mode" != yes; then
1393 # Don't build PIC code
1394 command="$base_compile $qsrcfile$pie_flag"
1395 else
1396 command="$base_compile $qsrcfile $pic_flag"
1397 fi
1398 if test "$compiler_c_o" = yes; then
1399 command="$command -o $obj"
1400 fi
1401
1402 # Suppress compiler output if we already did a PIC compilation.
1403 command="$command$suppress_output"
1404 func_show_eval_locale "$command" \
1405 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
1406
1407 if test "$need_locks" = warn &&
1408 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1409 $ECHO "\
1410*** ERROR, $lockfile contains:
1411`cat $lockfile 2>/dev/null`
1412
1413but it should contain:
1414$srcfile
1415
1416This indicates that another process is trying to use the same
1417temporary object file, and libtool could not work around it because
1418your compiler does not support \`-c' and \`-o' together. If you
1419repeat this compilation, it may succeed, by chance, but you had better
1420avoid parallel builds (make -j) in this platform, or get a better
1421compiler."
1422
1423 $opt_dry_run || $RM $removelist
1424 exit $EXIT_FAILURE
1425 fi
1426
1427 # Just move the object if needed
1428 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1429 func_show_eval '$MV "$output_obj" "$obj"' \
1430 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
1431 fi
1432 fi
1433
1434 $opt_dry_run || {
1435 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
1436
1437 # Unlock the critical section if it was locked
1438 if test "$need_locks" != no; then
1439 removelist=$lockfile
1440 $RM "$lockfile"
1441 fi
1442 }
1443
1444 exit $EXIT_SUCCESS
1445}
1446
1447$opt_help || {
1448test "$mode" = compile && func_mode_compile ${1+"$@"}
1449}
1450
1451func_mode_help ()
1452{
1453 # We need to display help for each of the modes.
1454 case $mode in
1455 "")
1456 # Generic help is extracted from the usage comments
1457 # at the start of this file.
1458 func_help
1459 ;;
1460
1461 clean)
1462 $ECHO \
1463"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
1464
1465Remove files from the build directory.
1466
1467RM is the name of the program to use to delete files associated with each FILE
1468(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1469to RM.
1470
1471If FILE is a libtool library, object or program, all the files associated
1472with it are deleted. Otherwise, only FILE itself is deleted using RM."
1473 ;;
1474
1475 compile)
1476 $ECHO \
1477"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
1478
1479Compile a source file into a libtool library object.
1480
1481This mode accepts the following additional options:
1482
1483 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
1484 -no-suppress do not suppress compiler output for multiple passes
1485 -prefer-pic try to building PIC objects only
1486 -prefer-non-pic try to building non-PIC objects only
1487 -shared do not build a \`.o' file suitable for static linking
1488 -static only build a \`.o' file suitable for static linking
1489
1490COMPILE-COMMAND is a command to be used in creating a \`standard' object file
1491from the given SOURCEFILE.
1492
1493The output file name is determined by removing the directory component from
1494SOURCEFILE, then substituting the C source code suffix \`.c' with the
1495library object suffix, \`.lo'."
1496 ;;
1497
1498 execute)
1499 $ECHO \
1500"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
1501
1502Automatically set library path, then run a program.
1503
1504This mode accepts the following additional options:
1505
1506 -dlopen FILE add the directory containing FILE to the library path
1507
1508This mode sets the library path environment variable according to \`-dlopen'
1509flags.
1510
1511If any of the ARGS are libtool executable wrappers, then they are translated
1512into their corresponding uninstalled binary, and any of their required library
1513directories are added to the library path.
1514
1515Then, COMMAND is executed, with ARGS as arguments."
1516 ;;
1517
1518 finish)
1519 $ECHO \
1520"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
1521
1522Complete the installation of libtool libraries.
1523
1524Each LIBDIR is a directory that contains libtool libraries.
1525
1526The commands that this mode executes may require superuser privileges. Use
1527the \`--dry-run' option if you just want to see what would be executed."
1528 ;;
1529
1530 install)
1531 $ECHO \
1532"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
1533
1534Install executables or libraries.
1535
1536INSTALL-COMMAND is the installation command. The first component should be
1537either the \`install' or \`cp' program.
1538
1539The following components of INSTALL-COMMAND are treated specially:
1540
1541 -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
1542
1543The rest of the components are interpreted as arguments to that command (only
1544BSD-compatible install options are recognized)."
1545 ;;
1546
1547 link)
1548 $ECHO \
1549"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
1550
1551Link object files or libraries together to form another library, or to
1552create an executable program.
1553
1554LINK-COMMAND is a command using the C compiler that you would use to create
1555a program from several object files.
1556
1557The following components of LINK-COMMAND are treated specially:
1558
1559 -all-static do not do any dynamic linking at all
1560 -avoid-version do not add a version suffix if possible
1561 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
1562 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
1563 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
1564 -export-symbols SYMFILE
1565 try to export only the symbols listed in SYMFILE
1566 -export-symbols-regex REGEX
1567 try to export only the symbols matching REGEX
1568 -LLIBDIR search LIBDIR for required installed libraries
1569 -lNAME OUTPUT-FILE requires the installed library libNAME
1570 -module build a library that can dlopened
1571 -no-fast-install disable the fast-install mode
1572 -no-install link a not-installable executable
1573 -no-undefined declare that a library does not refer to external symbols
1574 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
1575 -objectlist FILE Use a list of object files found in FILE to specify objects
1576 -precious-files-regex REGEX
1577 don't remove output files matching REGEX
1578 -release RELEASE specify package release information
1579 -rpath LIBDIR the created library will eventually be installed in LIBDIR
1580 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
1581 -shared only do dynamic linking of libtool libraries
1582 -shrext SUFFIX override the standard shared library file extension
1583 -static do not do any dynamic linking of uninstalled libtool libraries
1584 -static-libtool-libs
1585 do not do any dynamic linking of libtool libraries
1586 -version-info CURRENT[:REVISION[:AGE]]
1587 specify library version info [each variable defaults to 0]
1588 -weak LIBNAME declare that the target provides the LIBNAME interface
1589
1590All other options (arguments beginning with \`-') are ignored.
1591
1592Every other argument is treated as a filename. Files ending in \`.la' are
1593treated as uninstalled libtool libraries, other files are standard or library
1594object files.
1595
1596If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
1597only library objects (\`.lo' files) may be specified, and \`-rpath' is
1598required, except when creating a convenience library.
1599
1600If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
1601using \`ar' and \`ranlib', or on Windows using \`lib'.
1602
1603If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
1604is created, otherwise an executable program is created."
1605 ;;
1606
1607 uninstall)
1608 $ECHO \
1609"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
1610
1611Remove libraries from an installation directory.
1612
1613RM is the name of the program to use to delete files associated with each FILE
1614(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1615to RM.
1616
1617If FILE is a libtool library, all the files associated with it are deleted.
1618Otherwise, only FILE itself is deleted using RM."
1619 ;;
1620
1621 *)
1622 func_fatal_help "invalid operation mode \`$mode'"
1623 ;;
1624 esac
1625
1626 $ECHO
1627 $ECHO "Try \`$progname --help' for more information about other modes."
1628
1629 exit $?
1630}
1631
1632 # Now that we've collected a possible --mode arg, show help if necessary
1633 $opt_help && func_mode_help
1634
1635
1636# func_mode_execute arg...
1637func_mode_execute ()
1638{
1639 $opt_debug
1640 # The first argument is the command name.
1641 cmd="$nonopt"
1642 test -z "$cmd" && \
1643 func_fatal_help "you must specify a COMMAND"
1644
1645 # Handle -dlopen flags immediately.
1646 for file in $execute_dlfiles; do
1647 test -f "$file" \
1648 || func_fatal_help "\`$file' is not a file"
1649
1650 dir=
1651 case $file in
1652 *.la)
1653 # Check to see that this really is a libtool archive.
1654 func_lalib_unsafe_p "$file" \
1655 || func_fatal_help "\`$lib' is not a valid libtool archive"
1656
1657 # Read the libtool library.
1658 dlname=
1659 library_names=
1660 func_source "$file"
1661
1662 # Skip this library if it cannot be dlopened.
1663 if test -z "$dlname"; then
1664 # Warn if it was a shared library.
1665 test -n "$library_names" && \
1666 func_warning "\`$file' was not linked with \`-export-dynamic'"
1667 continue
1668 fi
1669
1670 func_dirname "$file" "" "."
1671 dir="$func_dirname_result"
1672
1673 if test -f "$dir/$objdir/$dlname"; then
1674 dir="$dir/$objdir"
1675 else
1676 if test ! -f "$dir/$dlname"; then
1677 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
1678 fi
1679 fi
1680 ;;
1681
1682 *.lo)
1683 # Just add the directory containing the .lo file.
1684 func_dirname "$file" "" "."
1685 dir="$func_dirname_result"
1686 ;;
1687
1688 *)
1689 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
1690 continue
1691 ;;
1692 esac
1693
1694 # Get the absolute pathname.
1695 absdir=`cd "$dir" && pwd`
1696 test -n "$absdir" && dir="$absdir"
1697
1698 # Now add the directory to shlibpath_var.
1699 if eval "test -z \"\$$shlibpath_var\""; then
1700 eval "$shlibpath_var=\"\$dir\""
1701 else
1702 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
1703 fi
1704 done
1705
1706 # This variable tells wrapper scripts just to set shlibpath_var
1707 # rather than running their programs.
1708 libtool_execute_magic="$magic"
1709
1710 # Check if any of the arguments is a wrapper script.
1711 args=
1712 for file
1713 do
1714 case $file in
1715 -*) ;;
1716 *)
1717 # Do a test to see if this is really a libtool program.
1718 if func_ltwrapper_script_p "$file"; then
1719 func_source "$file"
1720 # Transform arg to wrapped name.
1721 file="$progdir/$program"
1722 elif func_ltwrapper_executable_p "$file"; then
1723 func_ltwrapper_scriptname "$file"
1724 func_source "$func_ltwrapper_scriptname_result"
1725 # Transform arg to wrapped name.
1726 file="$progdir/$program"
1727 fi
1728 ;;
1729 esac
1730 # Quote arguments (to preserve shell metacharacters).
1731 func_quote_for_eval "$file"
1732 args="$args $func_quote_for_eval_result"
1733 done
1734
1735 if test "X$opt_dry_run" = Xfalse; then
1736 if test -n "$shlibpath_var"; then
1737 # Export the shlibpath_var.
1738 eval "export $shlibpath_var"
1739 fi
1740
1741 # Restore saved environment variables
1742 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
1743 do
1744 eval "if test \"\${save_$lt_var+set}\" = set; then
1745 $lt_var=\$save_$lt_var; export $lt_var
1746 else
1747 $lt_unset $lt_var
1748 fi"
1749 done
1750
1751 # Now prepare to actually exec the command.
1752 exec_cmd="\$cmd$args"
1753 else
1754 # Display what would be done.
1755 if test -n "$shlibpath_var"; then
1756 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1757 $ECHO "export $shlibpath_var"
1758 fi
1759 $ECHO "$cmd$args"
1760 exit $EXIT_SUCCESS
1761 fi
1762}
1763
1764test "$mode" = execute && func_mode_execute ${1+"$@"}
1765
1766
1767# func_mode_finish arg...
1768func_mode_finish ()
1769{
1770 $opt_debug
1771 libdirs="$nonopt"
1772 admincmds=
1773
1774 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1775 for dir
1776 do
1777 libdirs="$libdirs $dir"
1778 done
1779
1780 for libdir in $libdirs; do
1781 if test -n "$finish_cmds"; then
1782 # Do each command in the finish commands.
1783 func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
1784'"$cmd"'"'
1785 fi
1786 if test -n "$finish_eval"; then
1787 # Do the single finish_eval.
1788 eval cmds=\"$finish_eval\"
1789 $opt_dry_run || eval "$cmds" || admincmds="$admincmds
1790 $cmds"
1791 fi
1792 done
1793 fi
1794
1795 # Exit here if they wanted silent mode.
1796 $opt_silent && exit $EXIT_SUCCESS
1797
1798 $ECHO "X----------------------------------------------------------------------" | $Xsed
1799 $ECHO "Libraries have been installed in:"
1800 for libdir in $libdirs; do
1801 $ECHO " $libdir"
1802 done
1803 $ECHO
1804 $ECHO "If you ever happen to want to link against installed libraries"
1805 $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1806 $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1807 $ECHO "flag during linking and do at least one of the following:"
1808 if test -n "$shlibpath_var"; then
1809 $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1810 $ECHO " during execution"
1811 fi
1812 if test -n "$runpath_var"; then
1813 $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1814 $ECHO " during linking"
1815 fi
1816 if test -n "$hardcode_libdir_flag_spec"; then
1817 libdir=LIBDIR
1818 eval flag=\"$hardcode_libdir_flag_spec\"
1819
1820 $ECHO " - use the \`$flag' linker flag"
1821 fi
1822 if test -n "$admincmds"; then
1823 $ECHO " - have your system administrator run these commands:$admincmds"
1824 fi
1825 if test -f /etc/ld.so.conf; then
1826 $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1827 fi
1828 $ECHO
1829
1830 $ECHO "See any operating system documentation about shared libraries for"
1831 case $host in
1832 solaris2.[6789]|solaris2.1[0-9])
1833 $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1834 $ECHO "pages."
1835 ;;
1836 *)
1837 $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
1838 ;;
1839 esac
1840 $ECHO "X----------------------------------------------------------------------" | $Xsed
1841 exit $EXIT_SUCCESS
1842}
1843
1844test "$mode" = finish && func_mode_finish ${1+"$@"}
1845
1846
1847# func_mode_install arg...
1848func_mode_install ()
1849{
1850 $opt_debug
1851 # There may be an optional sh(1) argument at the beginning of
1852 # install_prog (especially on Windows NT).
1853 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
1854 # Allow the use of GNU shtool's install command.
1855 $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
1856 # Aesthetically quote it.
1857 func_quote_for_eval "$nonopt"
1858 install_prog="$func_quote_for_eval_result "
1859 arg=$1
1860 shift
1861 else
1862 install_prog=
1863 arg=$nonopt
1864 fi
1865
1866 # The real first argument should be the name of the installation program.
1867 # Aesthetically quote it.
1868 func_quote_for_eval "$arg"
1869 install_prog="$install_prog$func_quote_for_eval_result"
1870
1871 # We need to accept at least all the BSD install flags.
1872 dest=
1873 files=
1874 opts=
1875 prev=
1876 install_type=
1877 isdir=no
1878 stripme=
1879 for arg
1880 do
1881 if test -n "$dest"; then
1882 files="$files $dest"
1883 dest=$arg
1884 continue
1885 fi
1886
1887 case $arg in
1888 -d) isdir=yes ;;
1889 -f)
1890 case " $install_prog " in
1891 *[\\\ /]cp\ *) ;;
1892 *) prev=$arg ;;
1893 esac
1894 ;;
1895 -g | -m | -o)
1896 prev=$arg
1897 ;;
1898 -s)
1899 stripme=" -s"
1900 continue
1901 ;;
1902 -*)
1903 ;;
1904 *)
1905 # If the previous option needed an argument, then skip it.
1906 if test -n "$prev"; then
1907 prev=
1908 else
1909 dest=$arg
1910 continue
1911 fi
1912 ;;
1913 esac
1914
1915 # Aesthetically quote the argument.
1916 func_quote_for_eval "$arg"
1917 install_prog="$install_prog $func_quote_for_eval_result"
1918 done
1919
1920 test -z "$install_prog" && \
1921 func_fatal_help "you must specify an install program"
1922
1923 test -n "$prev" && \
1924 func_fatal_help "the \`$prev' option requires an argument"
1925
1926 if test -z "$files"; then
1927 if test -z "$dest"; then
1928 func_fatal_help "no file or destination specified"
1929 else
1930 func_fatal_help "you must specify a destination"
1931 fi
1932 fi
1933
1934 # Strip any trailing slash from the destination.
1935 func_stripname '' '/' "$dest"
1936 dest=$func_stripname_result
1937
1938 # Check to see that the destination is a directory.
1939 test -d "$dest" && isdir=yes
1940 if test "$isdir" = yes; then
1941 destdir="$dest"
1942 destname=
1943 else
1944 func_dirname_and_basename "$dest" "" "."
1945 destdir="$func_dirname_result"
1946 destname="$func_basename_result"
1947
1948 # Not a directory, so check to see that there is only one file specified.
1949 set dummy $files; shift
1950 test "$#" -gt 1 && \
1951 func_fatal_help "\`$dest' is not a directory"
1952 fi
1953 case $destdir in
1954 [\\/]* | [A-Za-z]:[\\/]*) ;;
1955 *)
1956 for file in $files; do
1957 case $file in
1958 *.lo) ;;
1959 *)
1960 func_fatal_help "\`$destdir' must be an absolute directory name"
1961 ;;
1962 esac
1963 done
1964 ;;
1965 esac
1966
1967 # This variable tells wrapper scripts just to set variables rather
1968 # than running their programs.
1969 libtool_install_magic="$magic"
1970
1971 staticlibs=
1972 future_libdirs=
1973 current_libdirs=
1974 for file in $files; do
1975
1976 # Do each installation.
1977 case $file in
1978 *.$libext)
1979 # Do the static libraries later.
1980 staticlibs="$staticlibs $file"
1981 ;;
1982
1983 *.la)
1984 # Check to see that this really is a libtool archive.
1985 func_lalib_unsafe_p "$file" \
1986 || func_fatal_help "\`$file' is not a valid libtool archive"
1987
1988 library_names=
1989 old_library=
1990 relink_command=
1991 func_source "$file"
1992
1993 # Add the libdir to current_libdirs if it is the destination.
1994 if test "X$destdir" = "X$libdir"; then
1995 case "$current_libdirs " in
1996 *" $libdir "*) ;;
1997 *) current_libdirs="$current_libdirs $libdir" ;;
1998 esac
1999 else
2000 # Note the libdir as a future libdir.
2001 case "$future_libdirs " in
2002 *" $libdir "*) ;;
2003 *) future_libdirs="$future_libdirs $libdir" ;;
2004 esac
2005 fi
2006
2007 func_dirname "$file" "/" ""
2008 dir="$func_dirname_result"
2009 dir="$dir$objdir"
2010
2011 if test -n "$relink_command"; then
2012 # Determine the prefix the user has applied to our future dir.
2013 inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2014
2015 # Don't allow the user to place us outside of our expected
2016 # location b/c this prevents finding dependent libraries that
2017 # are installed to the same prefix.
2018 # At present, this check doesn't affect windows .dll's that
2019 # are installed into $libdir/../bin (currently, that works fine)
2020 # but it's something to keep an eye on.
2021 test "$inst_prefix_dir" = "$destdir" && \
2022 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
2023
2024 if test -n "$inst_prefix_dir"; then
2025 # Stick the inst_prefix_dir data into the link command.
2026 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2027 else
2028 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2029 fi
2030
2031 func_warning "relinking \`$file'"
2032 func_show_eval "$relink_command" \
2033 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
2034 fi
2035
2036 # See the names of the shared library.
2037 set dummy $library_names; shift
2038 if test -n "$1"; then
2039 realname="$1"
2040 shift
2041
2042 srcname="$realname"
2043 test -n "$relink_command" && srcname="$realname"T
2044
2045 # Install the shared library and build the symlinks.
2046 func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
2047 'exit $?'
2048 tstripme="$stripme"
2049 case $host_os in
2050 cygwin* | mingw* | pw32* | cegcc*)
2051 case $realname in
2052 *.dll.a)
2053 tstripme=""
2054 ;;
2055 esac
2056 ;;
2057 esac
2058 if test -n "$tstripme" && test -n "$striplib"; then
2059 func_show_eval "$striplib $destdir/$realname" 'exit $?'
2060 fi
2061
2062 if test "$#" -gt 0; then
2063 # Delete the old symlinks, and create new ones.
2064 # Try `ln -sf' first, because the `ln' binary might depend on
2065 # the symlink we replace! Solaris /bin/ln does not understand -f,
2066 # so we also need to try rm && ln -s.
2067 for linkname
2068 do
2069 test "$linkname" != "$realname" \
2070 && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
2071 done
2072 fi
2073
2074 # Do each command in the postinstall commands.
2075 lib="$destdir/$realname"
2076 func_execute_cmds "$postinstall_cmds" 'exit $?'
2077 fi
2078
2079 # Install the pseudo-library for information purposes.
2080 func_basename "$file"
2081 name="$func_basename_result"
2082 instname="$dir/$name"i
2083 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
2084
2085 # Maybe install the static library, too.
2086 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
2087 ;;
2088
2089 *.lo)
2090 # Install (i.e. copy) a libtool object.
2091
2092 # Figure out destination file name, if it wasn't already specified.
2093 if test -n "$destname"; then
2094 destfile="$destdir/$destname"
2095 else
2096 func_basename "$file"
2097 destfile="$func_basename_result"
2098 destfile="$destdir/$destfile"
2099 fi
2100
2101 # Deduce the name of the destination old-style object file.
2102 case $destfile in
2103 *.lo)
2104 func_lo2o "$destfile"
2105 staticdest=$func_lo2o_result
2106 ;;
2107 *.$objext)
2108 staticdest="$destfile"
2109 destfile=
2110 ;;
2111 *)
2112 func_fatal_help "cannot copy a libtool object to \`$destfile'"
2113 ;;
2114 esac
2115
2116 # Install the libtool object if requested.
2117 test -n "$destfile" && \
2118 func_show_eval "$install_prog $file $destfile" 'exit $?'
2119
2120 # Install the old object if enabled.
2121 if test "$build_old_libs" = yes; then
2122 # Deduce the name of the old-style object file.
2123 func_lo2o "$file"
2124 staticobj=$func_lo2o_result
2125 func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
2126 fi
2127 exit $EXIT_SUCCESS
2128 ;;
2129
2130 *)
2131 # Figure out destination file name, if it wasn't already specified.
2132 if test -n "$destname"; then
2133 destfile="$destdir/$destname"
2134 else
2135 func_basename "$file"
2136 destfile="$func_basename_result"
2137 destfile="$destdir/$destfile"
2138 fi
2139
2140 # If the file is missing, and there is a .exe on the end, strip it
2141 # because it is most likely a libtool script we actually want to
2142 # install
2143 stripped_ext=""
2144 case $file in
2145 *.exe)
2146 if test ! -f "$file"; then
2147 func_stripname '' '.exe' "$file"
2148 file=$func_stripname_result
2149 stripped_ext=".exe"
2150 fi
2151 ;;
2152 esac
2153
2154 # Do a test to see if this is really a libtool program.
2155 case $host in
2156 *cygwin* | *mingw*)
2157 if func_ltwrapper_executable_p "$file"; then
2158 func_ltwrapper_scriptname "$file"
2159 wrapper=$func_ltwrapper_scriptname_result
2160 else
2161 func_stripname '' '.exe' "$file"
2162 wrapper=$func_stripname_result
2163 fi
2164 ;;
2165 *)
2166 wrapper=$file
2167 ;;
2168 esac
2169 if func_ltwrapper_script_p "$wrapper"; then
2170 notinst_deplibs=
2171 relink_command=
2172
2173 func_source "$wrapper"
2174
2175 # Check the variables that should have been set.
2176 test -z "$generated_by_libtool_version" && \
2177 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
2178
2179 finalize=yes
2180 for lib in $notinst_deplibs; do
2181 # Check to see that each library is installed.
2182 libdir=
2183 if test -f "$lib"; then
2184 func_source "$lib"
2185 fi
2186 libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
2187 if test -n "$libdir" && test ! -f "$libfile"; then
2188 func_warning "\`$lib' has not been installed in \`$libdir'"
2189 finalize=no
2190 fi
2191 done
2192
2193 relink_command=
2194 func_source "$wrapper"
2195
2196 outputname=
2197 if test "$fast_install" = no && test -n "$relink_command"; then
2198 $opt_dry_run || {
2199 if test "$finalize" = yes; then
2200 tmpdir=`func_mktempdir`
2201 func_basename "$file$stripped_ext"
2202 file="$func_basename_result"
2203 outputname="$tmpdir/$file"
2204 # Replace the output file specification.
2205 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
2206
2207 $opt_silent || {
2208 func_quote_for_expand "$relink_command"
2209 eval "func_echo $func_quote_for_expand_result"
2210 }
2211 if eval "$relink_command"; then :
2212 else
2213 func_error "error: relink \`$file' with the above command before installing it"
2214 $opt_dry_run || ${RM}r "$tmpdir"
2215 continue
2216 fi
2217 file="$outputname"
2218 else
2219 func_warning "cannot relink \`$file'"
2220 fi
2221 }
2222 else
2223 # Install the binary that we compiled earlier.
2224 file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
2225 fi
2226 fi
2227
2228 # remove .exe since cygwin /usr/bin/install will append another
2229 # one anyway
2230 case $install_prog,$host in
2231 */usr/bin/install*,*cygwin*)
2232 case $file:$destfile in
2233 *.exe:*.exe)
2234 # this is ok
2235 ;;
2236 *.exe:*)
2237 destfile=$destfile.exe
2238 ;;
2239 *:*.exe)
2240 func_stripname '' '.exe' "$destfile"
2241 destfile=$func_stripname_result
2242 ;;
2243 esac
2244 ;;
2245 esac
2246 func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
2247 $opt_dry_run || if test -n "$outputname"; then
2248 ${RM}r "$tmpdir"
2249 fi
2250 ;;
2251 esac
2252 done
2253
2254 for file in $staticlibs; do
2255 func_basename "$file"
2256 name="$func_basename_result"
2257
2258 # Set up the ranlib parameters.
2259 oldlib="$destdir/$name"
2260
2261 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
2262
2263 if test -n "$stripme" && test -n "$old_striplib"; then
2264 func_show_eval "$old_striplib $oldlib" 'exit $?'
2265 fi
2266
2267 # Do each command in the postinstall commands.
2268 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
2269 done
2270
2271 test -n "$future_libdirs" && \
2272 func_warning "remember to run \`$progname --finish$future_libdirs'"
2273
2274 if test -n "$current_libdirs"; then
2275 # Maybe just do a dry run.
2276 $opt_dry_run && current_libdirs=" -n$current_libdirs"
2277 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
2278 else
2279 exit $EXIT_SUCCESS
2280 fi
2281}
2282
2283test "$mode" = install && func_mode_install ${1+"$@"}
2284
2285
2286# func_generate_dlsyms outputname originator pic_p
2287# Extract symbols from dlprefiles and create ${outputname}S.o with
2288# a dlpreopen symbol table.
2289func_generate_dlsyms ()
2290{
2291 $opt_debug
2292 my_outputname="$1"
2293 my_originator="$2"
2294 my_pic_p="${3-no}"
2295 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
2296 my_dlsyms=
2297
2298 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2299 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2300 my_dlsyms="${my_outputname}S.c"
2301 else
2302 func_error "not configured to extract global symbols from dlpreopened files"
2303 fi
2304 fi
2305
2306 if test -n "$my_dlsyms"; then
2307 case $my_dlsyms in
2308 "") ;;
2309 *.c)
2310 # Discover the nlist of each of the dlfiles.
2311 nlist="$output_objdir/${my_outputname}.nm"
2312
2313 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
2314
2315 # Parse the name list into a source file.
2316 func_verbose "creating $output_objdir/$my_dlsyms"
2317
2318 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
2319/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
2320/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
2321
2322#ifdef __cplusplus
2323extern \"C\" {
2324#endif
2325
2326/* External symbol declarations for the compiler. */\
2327"
2328
2329 if test "$dlself" = yes; then
2330 func_verbose "generating symbol list for \`$output'"
2331
2332 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
2333
2334 # Add our own program objects to the symbol list.
2335 progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2336 for progfile in $progfiles; do
2337 func_verbose "extracting global C symbols from \`$progfile'"
2338 $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
2339 done
2340
2341 if test -n "$exclude_expsyms"; then
2342 $opt_dry_run || {
2343 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2344 eval '$MV "$nlist"T "$nlist"'
2345 }
2346 fi
2347
2348 if test -n "$export_symbols_regex"; then
2349 $opt_dry_run || {
2350 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2351 eval '$MV "$nlist"T "$nlist"'
2352 }
2353 fi
2354
2355 # Prepare the list of exported symbols
2356 if test -z "$export_symbols"; then
2357 export_symbols="$output_objdir/$outputname.exp"
2358 $opt_dry_run || {
2359 $RM $export_symbols
2360 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2361 case $host in
2362 *cygwin* | *mingw* | *cegcc* )
2363 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2364 eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
2365 ;;
2366 esac
2367 }
2368 else
2369 $opt_dry_run || {
2370 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
2371 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
2372 eval '$MV "$nlist"T "$nlist"'
2373 case $host in
2374 *cygwin | *mingw* | *cegcc* )
2375 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2376 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
2377 ;;
2378 esac
2379 }
2380 fi
2381 fi
2382
2383 for dlprefile in $dlprefiles; do
2384 func_verbose "extracting global C symbols from \`$dlprefile'"
2385 func_basename "$dlprefile"
2386 name="$func_basename_result"
2387 $opt_dry_run || {
2388 eval '$ECHO ": $name " >> "$nlist"'
2389 eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2390 }
2391 done
2392
2393 $opt_dry_run || {
2394 # Make sure we have at least an empty file.
2395 test -f "$nlist" || : > "$nlist"
2396
2397 if test -n "$exclude_expsyms"; then
2398 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2399 $MV "$nlist"T "$nlist"
2400 fi
2401
2402 # Try sorting and uniquifying the output.
2403 if $GREP -v "^: " < "$nlist" |
2404 if sort -k 3 </dev/null >/dev/null 2>&1; then
2405 sort -k 3
2406 else
2407 sort +2
2408 fi |
2409 uniq > "$nlist"S; then
2410 :
2411 else
2412 $GREP -v "^: " < "$nlist" > "$nlist"S
2413 fi
2414
2415 if test -f "$nlist"S; then
2416 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
2417 else
2418 $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
2419 fi
2420
2421 $ECHO >> "$output_objdir/$my_dlsyms" "\
2422
2423/* The mapping between symbol names and symbols. */
2424typedef struct {
2425 const char *name;
2426 void *address;
2427} lt_dlsymlist;
2428"
2429 case $host in
2430 *cygwin* | *mingw* | *cegcc* )
2431 $ECHO >> "$output_objdir/$my_dlsyms" "\
2432/* DATA imports from DLLs on WIN32 con't be const, because
2433 runtime relocations are performed -- see ld's documentation
2434 on pseudo-relocs. */"
2435 lt_dlsym_const= ;;
2436 *osf5*)
2437 echo >> "$output_objdir/$my_dlsyms" "\
2438/* This system does not cope well with relocations in const data */"
2439 lt_dlsym_const= ;;
2440 *)
2441 lt_dlsym_const=const ;;
2442 esac
2443
2444 $ECHO >> "$output_objdir/$my_dlsyms" "\
2445extern $lt_dlsym_const lt_dlsymlist
2446lt_${my_prefix}_LTX_preloaded_symbols[];
2447$lt_dlsym_const lt_dlsymlist
2448lt_${my_prefix}_LTX_preloaded_symbols[] =
2449{\
2450 { \"$my_originator\", (void *) 0 },"
2451
2452 case $need_lib_prefix in
2453 no)
2454 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
2455 ;;
2456 *)
2457 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
2458 ;;
2459 esac
2460 $ECHO >> "$output_objdir/$my_dlsyms" "\
2461 {0, (void *) 0}
2462};
2463
2464/* This works around a problem in FreeBSD linker */
2465#ifdef FREEBSD_WORKAROUND
2466static const void *lt_preloaded_setup() {
2467 return lt_${my_prefix}_LTX_preloaded_symbols;
2468}
2469#endif
2470
2471#ifdef __cplusplus
2472}
2473#endif\
2474"
2475 } # !$opt_dry_run
2476
2477 pic_flag_for_symtable=
2478 case "$compile_command " in
2479 *" -static "*) ;;
2480 *)
2481 case $host in
2482 # compiling the symbol table file with pic_flag works around
2483 # a FreeBSD bug that causes programs to crash when -lm is
2484 # linked before any other PIC object. But we must not use
2485 # pic_flag when linking with -static. The problem exists in
2486 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2487 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2488 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
2489 *-*-hpux*)
2490 pic_flag_for_symtable=" $pic_flag" ;;
2491 *)
2492 if test "X$my_pic_p" != Xno; then
2493 pic_flag_for_symtable=" $pic_flag"
2494 fi
2495 ;;
2496 esac
2497 ;;
2498 esac
2499 symtab_cflags=
2500 for arg in $LTCFLAGS; do
2501 case $arg in
2502 -pie | -fpie | -fPIE) ;;
2503 *) symtab_cflags="$symtab_cflags $arg" ;;
2504 esac
2505 done
2506
2507 # Now compile the dynamic symbol file.
2508 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
2509
2510 # Clean up the generated files.
2511 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
2512
2513 # Transform the symbol file into the correct name.
2514 symfileobj="$output_objdir/${my_outputname}S.$objext"
2515 case $host in
2516 *cygwin* | *mingw* | *cegcc* )
2517 if test -f "$output_objdir/$my_outputname.def"; then
2518 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2519 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2520 else
2521 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2522 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2523 fi
2524 ;;
2525 *)
2526 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2527 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2528 ;;
2529 esac
2530 ;;
2531 *)
2532 func_fatal_error "unknown suffix for \`$my_dlsyms'"
2533 ;;
2534 esac
2535 else
2536 # We keep going just in case the user didn't refer to
2537 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2538 # really was required.
2539
2540 # Nullify the symbol file.
2541 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2542 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2543 fi
2544}
2545
2546# func_win32_libid arg
2547# return the library type of file 'arg'
2548#
2549# Need a lot of goo to handle *both* DLLs and import libs
2550# Has to be a shell function in order to 'eat' the argument
2551# that is supplied when $file_magic_command is called.
2552func_win32_libid ()
2553{
2554 $opt_debug
2555 win32_libid_type="unknown"
2556 win32_fileres=`file -L $1 2>/dev/null`
2557 case $win32_fileres in
2558 *ar\ archive\ import\ library*) # definitely import
2559 win32_libid_type="x86 archive import"
2560 ;;
2561 *ar\ archive*) # could be an import, or static
2562 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2563 $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2564 win32_nmres=`eval $NM -f posix -A $1 |
2565 $SED -n -e '
2566 1,100{
2567 / I /{
2568 s,.*,import,
2569 p
2570 q
2571 }
2572 }'`
2573 case $win32_nmres in
2574 import*) win32_libid_type="x86 archive import";;
2575 *) win32_libid_type="x86 archive static";;
2576 esac
2577 fi
2578 ;;
2579 *DLL*)
2580 win32_libid_type="x86 DLL"
2581 ;;
2582 *executable*) # but shell scripts are "executable" too...
2583 case $win32_fileres in
2584 *MS\ Windows\ PE\ Intel*)
2585 win32_libid_type="x86 DLL"
2586 ;;
2587 esac
2588 ;;
2589 esac
2590 $ECHO "$win32_libid_type"
2591}
2592
2593
2594
2595# func_extract_an_archive dir oldlib
2596func_extract_an_archive ()
2597{
2598 $opt_debug
2599 f_ex_an_ar_dir="$1"; shift
2600 f_ex_an_ar_oldlib="$1"
2601 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
2602 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
2603 :
2604 else
2605 func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
2606 fi
2607}
2608
2609
2610# func_extract_archives gentop oldlib ...
2611func_extract_archives ()
2612{
2613 $opt_debug
2614 my_gentop="$1"; shift
2615 my_oldlibs=${1+"$@"}
2616 my_oldobjs=""
2617 my_xlib=""
2618 my_xabs=""
2619 my_xdir=""
2620
2621 for my_xlib in $my_oldlibs; do
2622 # Extract the objects.
2623 case $my_xlib in
2624 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
2625 *) my_xabs=`pwd`"/$my_xlib" ;;
2626 esac
2627 func_basename "$my_xlib"
2628 my_xlib="$func_basename_result"
2629 my_xlib_u=$my_xlib
2630 while :; do
2631 case " $extracted_archives " in
2632 *" $my_xlib_u "*)
2633 func_arith $extracted_serial + 1
2634 extracted_serial=$func_arith_result
2635 my_xlib_u=lt$extracted_serial-$my_xlib ;;
2636 *) break ;;
2637 esac
2638 done
2639 extracted_archives="$extracted_archives $my_xlib_u"
2640 my_xdir="$my_gentop/$my_xlib_u"
2641
2642 func_mkdir_p "$my_xdir"
2643
2644 case $host in
2645 *-darwin*)
2646 func_verbose "Extracting $my_xabs"
2647 # Do not bother doing anything if just a dry run
2648 $opt_dry_run || {
2649 darwin_orig_dir=`pwd`
2650 cd $my_xdir || exit $?
2651 darwin_archive=$my_xabs
2652 darwin_curdir=`pwd`
2653 darwin_base_archive=`basename "$darwin_archive"`
2654 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
2655 if test -n "$darwin_arches"; then
2656 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
2657 darwin_arch=
2658 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
2659 for darwin_arch in $darwin_arches ; do
2660 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2661 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
2662 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2663 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
2664 cd "$darwin_curdir"
2665 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
2666 done # $darwin_arches
2667 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
2668 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
2669 darwin_file=
2670 darwin_files=
2671 for darwin_file in $darwin_filelist; do
2672 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
2673 $LIPO -create -output "$darwin_file" $darwin_files
2674 done # $darwin_filelist
2675 $RM -rf unfat-$$
2676 cd "$darwin_orig_dir"
2677 else
2678 cd $darwin_orig_dir
2679 func_extract_an_archive "$my_xdir" "$my_xabs"
2680 fi # $darwin_arches
2681 } # !$opt_dry_run
2682 ;;
2683 *)
2684 func_extract_an_archive "$my_xdir" "$my_xabs"
2685 ;;
2686 esac
2687 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
2688 done
2689
2690 func_extract_archives_result="$my_oldobjs"
2691}
2692
2693
2694
2695# func_emit_wrapper_part1 [arg=no]
2696#
2697# Emit the first part of a libtool wrapper script on stdout.
2698# For more information, see the description associated with
2699# func_emit_wrapper(), below.
2700func_emit_wrapper_part1 ()
2701{
2702 func_emit_wrapper_part1_arg1=no
2703 if test -n "$1" ; then
2704 func_emit_wrapper_part1_arg1=$1
2705 fi
2706
2707 $ECHO "\
2708#! $SHELL
2709
2710# $output - temporary wrapper script for $objdir/$outputname
2711# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2712#
2713# The $output program cannot be directly executed until all the libtool
2714# libraries that it depends on are installed.
2715#
2716# This wrapper script should never be moved out of the build directory.
2717# If it is, it will not operate correctly.
2718
2719# Sed substitution that helps us do robust quoting. It backslashifies
2720# metacharacters that are still active within double-quoted strings.
2721Xsed='${SED} -e 1s/^X//'
2722sed_quote_subst='$sed_quote_subst'
2723
2724# Be Bourne compatible
2725if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2726 emulate sh
2727 NULLCMD=:
2728 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
2729 # is contrary to our usage. Disable this feature.
2730 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2731 setopt NO_GLOB_SUBST
2732else
2733 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2734fi
2735BIN_SH=xpg4; export BIN_SH # for Tru64
2736DUALCASE=1; export DUALCASE # for MKS sh
2737
2738# The HP-UX ksh and POSIX shell print the target directory to stdout
2739# if CDPATH is set.
2740(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2741
2742relink_command=\"$relink_command\"
2743
2744# This environment variable determines our operation mode.
2745if test \"\$libtool_install_magic\" = \"$magic\"; then
2746 # install mode needs the following variables:
2747 generated_by_libtool_version='$macro_version'
2748 notinst_deplibs='$notinst_deplibs'
2749else
2750 # When we are sourced in execute mode, \$file and \$ECHO are already set.
2751 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2752 ECHO=\"$qecho\"
2753 file=\"\$0\"
2754 # Make sure echo works.
2755 if test \"X\$1\" = X--no-reexec; then
2756 # Discard the --no-reexec flag, and continue.
2757 shift
2758 elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2759 # Yippee, \$ECHO works!
2760 :
2761 else
2762 # Restart under the correct shell, and then maybe \$ECHO will work.
2763 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2764 fi
2765 fi\
2766"
2767 $ECHO "\
2768
2769 # Find the directory that this script lives in.
2770 thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2771 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2772
2773 # Follow symbolic links until we get to the real thisdir.
2774 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2775 while test -n \"\$file\"; do
2776 destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2777
2778 # If there was a directory component, then change thisdir.
2779 if test \"x\$destdir\" != \"x\$file\"; then
2780 case \"\$destdir\" in
2781 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2782 *) thisdir=\"\$thisdir/\$destdir\" ;;
2783 esac
2784 fi
2785
2786 file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2787 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2788 done
2789"
2790}
2791# end: func_emit_wrapper_part1
2792
2793# func_emit_wrapper_part2 [arg=no]
2794#
2795# Emit the second part of a libtool wrapper script on stdout.
2796# For more information, see the description associated with
2797# func_emit_wrapper(), below.
2798func_emit_wrapper_part2 ()
2799{
2800 func_emit_wrapper_part2_arg1=no
2801 if test -n "$1" ; then
2802 func_emit_wrapper_part2_arg1=$1
2803 fi
2804
2805 $ECHO "\
2806
2807 # Usually 'no', except on cygwin/mingw when embedded into
2808 # the cwrapper.
2809 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
2810 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2811 # special case for '.'
2812 if test \"\$thisdir\" = \".\"; then
2813 thisdir=\`pwd\`
2814 fi
2815 # remove .libs from thisdir
2816 case \"\$thisdir\" in
2817 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
2818 $objdir ) thisdir=. ;;
2819 esac
2820 fi
2821
2822 # Try to get the absolute directory name.
2823 absdir=\`cd \"\$thisdir\" && pwd\`
2824 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2825"
2826
2827 if test "$fast_install" = yes; then
2828 $ECHO "\
2829 program=lt-'$outputname'$exeext
2830 progdir=\"\$thisdir/$objdir\"
2831
2832 if test ! -f \"\$progdir/\$program\" ||
2833 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2834 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2835
2836 file=\"\$\$-\$program\"
2837
2838 if test ! -d \"\$progdir\"; then
2839 $MKDIR \"\$progdir\"
2840 else
2841 $RM \"\$progdir/\$file\"
2842 fi"
2843
2844 $ECHO "\
2845
2846 # relink executable if necessary
2847 if test -n \"\$relink_command\"; then
2848 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
2849 else
2850 $ECHO \"\$relink_command_output\" >&2
2851 $RM \"\$progdir/\$file\"
2852 exit 1
2853 fi
2854 fi
2855
2856 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2857 { $RM \"\$progdir/\$program\";
2858 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2859 $RM \"\$progdir/\$file\"
2860 fi"
2861 else
2862 $ECHO "\
2863 program='$outputname'
2864 progdir=\"\$thisdir/$objdir\"
2865"
2866 fi
2867
2868 $ECHO "\
2869
2870 if test -f \"\$progdir/\$program\"; then"
2871
2872 # Export our shlibpath_var if we have one.
2873 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2874 $ECHO "\
2875 # Add our own library path to $shlibpath_var
2876 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2877
2878 # Some systems cannot cope with colon-terminated $shlibpath_var
2879 # The second colon is a workaround for a bug in BeOS R4 sed
2880 $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2881
2882 export $shlibpath_var
2883"
2884 fi
2885
2886 # fixup the dll searchpath if we need to.
2887 if test -n "$dllsearchpath"; then
2888 $ECHO "\
2889 # Add the dll search path components to the executable PATH
2890 PATH=$dllsearchpath:\$PATH
2891"
2892 fi
2893
2894 $ECHO "\
2895 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2896 # Run the actual program with our arguments.
2897"
2898 case $host in
2899 # Backslashes separate directories on plain windows
2900 *-*-mingw | *-*-os2* | *-cegcc*)
2901 $ECHO "\
2902 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
2903"
2904 ;;
2905
2906 *)
2907 $ECHO "\
2908 exec \"\$progdir/\$program\" \${1+\"\$@\"}
2909"
2910 ;;
2911 esac
2912 $ECHO "\
2913 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
2914 exit 1
2915 fi
2916 else
2917 # The program doesn't exist.
2918 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
2919 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
2920 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
2921 exit 1
2922 fi
2923fi\
2924"
2925}
2926# end: func_emit_wrapper_part2
2927
2928
2929# func_emit_wrapper [arg=no]
2930#
2931# Emit a libtool wrapper script on stdout.
2932# Don't directly open a file because we may want to
2933# incorporate the script contents within a cygwin/mingw
2934# wrapper executable. Must ONLY be called from within
2935# func_mode_link because it depends on a number of variables
2936# set therein.
2937#
2938# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
2939# variable will take. If 'yes', then the emitted script
2940# will assume that the directory in which it is stored is
2941# the $objdir directory. This is a cygwin/mingw-specific
2942# behavior.
2943func_emit_wrapper ()
2944{
2945 func_emit_wrapper_arg1=no
2946 if test -n "$1" ; then
2947 func_emit_wrapper_arg1=$1
2948 fi
2949
2950 # split this up so that func_emit_cwrapperexe_src
2951 # can call each part independently.
2952 func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
2953 func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
2954}
2955
2956
2957# func_to_host_path arg
2958#
2959# Convert paths to host format when used with build tools.
2960# Intended for use with "native" mingw (where libtool itself
2961# is running under the msys shell), or in the following cross-
2962# build environments:
2963# $build $host
2964# mingw (msys) mingw [e.g. native]
2965# cygwin mingw
2966# *nix + wine mingw
2967# where wine is equipped with the `winepath' executable.
2968# In the native mingw case, the (msys) shell automatically
2969# converts paths for any non-msys applications it launches,
2970# but that facility isn't available from inside the cwrapper.
2971# Similar accommodations are necessary for $host mingw and
2972# $build cygwin. Calling this function does no harm for other
2973# $host/$build combinations not listed above.
2974#
2975# ARG is the path (on $build) that should be converted to
2976# the proper representation for $host. The result is stored
2977# in $func_to_host_path_result.
2978func_to_host_path ()
2979{
2980 func_to_host_path_result="$1"
2981 if test -n "$1" ; then
2982 case $host in
2983 *mingw* )
2984 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2985 case $build in
2986 *mingw* ) # actually, msys
2987 # awkward: cmd appends spaces to result
2988 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
2989 func_to_host_path_tmp1=`( cmd //c echo "$1" |\
2990 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2991 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2992 $SED -e "$lt_sed_naive_backslashify"`
2993 ;;
2994 *cygwin* )
2995 func_to_host_path_tmp1=`cygpath -w "$1"`
2996 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2997 $SED -e "$lt_sed_naive_backslashify"`
2998 ;;
2999 * )
3000 # Unfortunately, winepath does not exit with a non-zero
3001 # error code, so we are forced to check the contents of
3002 # stdout. On the other hand, if the command is not
3003 # found, the shell will set an exit code of 127 and print
3004 # *an error message* to stdout. So we must check for both
3005 # error code of zero AND non-empty stdout, which explains
3006 # the odd construction:
3007 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3008 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3009 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3010 $SED -e "$lt_sed_naive_backslashify"`
3011 else
3012 # Allow warning below.
3013 func_to_host_path_result=""
3014 fi
3015 ;;
3016 esac
3017 if test -z "$func_to_host_path_result" ; then
3018 func_error "Could not determine host path corresponding to"
3019 func_error " '$1'"
3020 func_error "Continuing, but uninstalled executables may not work."
3021 # Fallback:
3022 func_to_host_path_result="$1"
3023 fi
3024 ;;
3025 esac
3026 fi
3027}
3028# end: func_to_host_path
3029
3030# func_to_host_pathlist arg
3031#
3032# Convert pathlists to host format when used with build tools.
3033# See func_to_host_path(), above. This function supports the
3034# following $build/$host combinations (but does no harm for
3035# combinations not listed here):
3036# $build $host
3037# mingw (msys) mingw [e.g. native]
3038# cygwin mingw
3039# *nix + wine mingw
3040#
3041# Path separators are also converted from $build format to
3042# $host format. If ARG begins or ends with a path separator
3043# character, it is preserved (but converted to $host format)
3044# on output.
3045#
3046# ARG is a pathlist (on $build) that should be converted to
3047# the proper representation on $host. The result is stored
3048# in $func_to_host_pathlist_result.
3049func_to_host_pathlist ()
3050{
3051 func_to_host_pathlist_result="$1"
3052 if test -n "$1" ; then
3053 case $host in
3054 *mingw* )
3055 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3056 # Remove leading and trailing path separator characters from
3057 # ARG. msys behavior is inconsistent here, cygpath turns them
3058 # into '.;' and ';.', and winepath ignores them completely.
3059 func_to_host_pathlist_tmp2="$1"
3060 # Once set for this call, this variable should not be
3061 # reassigned. It is used in tha fallback case.
3062 func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3063 $SED -e 's|^:*||' -e 's|:*$||'`
3064 case $build in
3065 *mingw* ) # Actually, msys.
3066 # Awkward: cmd appends spaces to result.
3067 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3068 func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3069 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3070 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3071 $SED -e "$lt_sed_naive_backslashify"`
3072 ;;
3073 *cygwin* )
3074 func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3075 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3076 $SED -e "$lt_sed_naive_backslashify"`
3077 ;;
3078 * )
3079 # unfortunately, winepath doesn't convert pathlists
3080 func_to_host_pathlist_result=""
3081 func_to_host_pathlist_oldIFS=$IFS
3082 IFS=:
3083 for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3084 IFS=$func_to_host_pathlist_oldIFS
3085 if test -n "$func_to_host_pathlist_f" ; then
3086 func_to_host_path "$func_to_host_pathlist_f"
3087 if test -n "$func_to_host_path_result" ; then
3088 if test -z "$func_to_host_pathlist_result" ; then
3089 func_to_host_pathlist_result="$func_to_host_path_result"
3090 else
3091 func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3092 fi
3093 fi
3094 fi
3095 IFS=:
3096 done
3097 IFS=$func_to_host_pathlist_oldIFS
3098 ;;
3099 esac
3100 if test -z "$func_to_host_pathlist_result" ; then
3101 func_error "Could not determine the host path(s) corresponding to"
3102 func_error " '$1'"
3103 func_error "Continuing, but uninstalled executables may not work."
3104 # Fallback. This may break if $1 contains DOS-style drive
3105 # specifications. The fix is not to complicate the expression
3106 # below, but for the user to provide a working wine installation
3107 # with winepath so that path translation in the cross-to-mingw
3108 # case works properly.
3109 lt_replace_pathsep_nix_to_dos="s|:|;|g"
3110 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3111 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3112 fi
3113 # Now, add the leading and trailing path separators back
3114 case "$1" in
3115 :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3116 ;;
3117 esac
3118 case "$1" in
3119 *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
3120 ;;
3121 esac
3122 ;;
3123 esac
3124 fi
3125}
3126# end: func_to_host_pathlist
3127
3128# func_emit_cwrapperexe_src
3129# emit the source code for a wrapper executable on stdout
3130# Must ONLY be called from within func_mode_link because
3131# it depends on a number of variable set therein.
3132func_emit_cwrapperexe_src ()
3133{
3134 cat <<EOF
3135
3136/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
3137 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
3138
3139 The $output program cannot be directly executed until all the libtool
3140 libraries that it depends on are installed.
3141
3142 This wrapper executable should never be moved out of the build directory.
3143 If it is, it will not operate correctly.
3144
3145 Currently, it simply execs the wrapper *script* "$SHELL $output",
3146 but could eventually absorb all of the scripts functionality and
3147 exec $objdir/$outputname directly.
3148*/
3149EOF
3150 cat <<"EOF"
3151#include <stdio.h>
3152#include <stdlib.h>
3153#ifdef _MSC_VER
3154# include <direct.h>
3155# include <process.h>
3156# include <io.h>
3157# define setmode _setmode
3158#else
3159# include <unistd.h>
3160# include <stdint.h>
3161# ifdef __CYGWIN__
3162# include <io.h>
3163# define HAVE_SETENV
3164# ifdef __STRICT_ANSI__
3165char *realpath (const char *, char *);
3166int putenv (char *);
3167int setenv (const char *, const char *, int);
3168# endif
3169# endif
3170#endif
3171#include <malloc.h>
3172#include <stdarg.h>
3173#include <assert.h>
3174#include <string.h>
3175#include <ctype.h>
3176#include <errno.h>
3177#include <fcntl.h>
3178#include <sys/stat.h>
3179
3180#if defined(PATH_MAX)
3181# define LT_PATHMAX PATH_MAX
3182#elif defined(MAXPATHLEN)
3183# define LT_PATHMAX MAXPATHLEN
3184#else
3185# define LT_PATHMAX 1024
3186#endif
3187
3188#ifndef S_IXOTH
3189# define S_IXOTH 0
3190#endif
3191#ifndef S_IXGRP
3192# define S_IXGRP 0
3193#endif
3194
3195#ifdef _MSC_VER
3196# define S_IXUSR _S_IEXEC
3197# define stat _stat
3198# ifndef _INTPTR_T_DEFINED
3199# define intptr_t int
3200# endif
3201#endif
3202
3203#ifndef DIR_SEPARATOR
3204# define DIR_SEPARATOR '/'
3205# define PATH_SEPARATOR ':'
3206#endif
3207
3208#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
3209 defined (__OS2__)
3210# define HAVE_DOS_BASED_FILE_SYSTEM
3211# define FOPEN_WB "wb"
3212# ifndef DIR_SEPARATOR_2
3213# define DIR_SEPARATOR_2 '\\'
3214# endif
3215# ifndef PATH_SEPARATOR_2
3216# define PATH_SEPARATOR_2 ';'
3217# endif
3218#endif
3219
3220#ifndef DIR_SEPARATOR_2
3221# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
3222#else /* DIR_SEPARATOR_2 */
3223# define IS_DIR_SEPARATOR(ch) \
3224 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
3225#endif /* DIR_SEPARATOR_2 */
3226
3227#ifndef PATH_SEPARATOR_2
3228# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
3229#else /* PATH_SEPARATOR_2 */
3230# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
3231#endif /* PATH_SEPARATOR_2 */
3232
3233#ifdef __CYGWIN__
3234# define FOPEN_WB "wb"
3235#endif
3236
3237#ifndef FOPEN_WB
3238# define FOPEN_WB "w"
3239#endif
3240#ifndef _O_BINARY
3241# define _O_BINARY 0
3242#endif
3243
3244#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
3245#define XFREE(stale) do { \
3246 if (stale) { free ((void *) stale); stale = 0; } \
3247} while (0)
3248
3249#undef LTWRAPPER_DEBUGPRINTF
3250#if defined DEBUGWRAPPER
3251# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3252static void
3253ltwrapper_debugprintf (const char *fmt, ...)
3254{
3255 va_list args;
3256 va_start (args, fmt);
3257 (void) vfprintf (stderr, fmt, args);
3258 va_end (args);
3259}
3260#else
3261# define LTWRAPPER_DEBUGPRINTF(args)
3262#endif
3263
3264const char *program_name = NULL;
3265
3266void *xmalloc (size_t num);
3267char *xstrdup (const char *string);
3268const char *base_name (const char *name);
3269char *find_executable (const char *wrapper);
3270char *chase_symlinks (const char *pathspec);
3271int make_executable (const char *path);
3272int check_executable (const char *path);
3273char *strendzap (char *str, const char *pat);
3274void lt_fatal (const char *message, ...);
3275void lt_setenv (const char *name, const char *value);
3276char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3277void lt_opt_process_env_set (const char *arg);
3278void lt_opt_process_env_prepend (const char *arg);
3279void lt_opt_process_env_append (const char *arg);
3280int lt_split_name_value (const char *arg, char** name, char** value);
3281void lt_update_exe_path (const char *name, const char *value);
3282void lt_update_lib_path (const char *name, const char *value);
3283
3284static const char *script_text_part1 =
3285EOF
3286
3287 func_emit_wrapper_part1 yes |
3288 $SED -e 's/\([\\"]\)/\\\1/g' \
3289 -e 's/^/ "/' -e 's/$/\\n"/'
3290 echo ";"
3291 cat <<EOF
3292
3293static const char *script_text_part2 =
3294EOF
3295 func_emit_wrapper_part2 yes |
3296 $SED -e 's/\([\\"]\)/\\\1/g' \
3297 -e 's/^/ "/' -e 's/$/\\n"/'
3298 echo ";"
3299
3300 cat <<EOF
3301const char * MAGIC_EXE = "$magic_exe";
3302const char * LIB_PATH_VARNAME = "$shlibpath_var";
3303EOF
3304
3305 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3306 func_to_host_pathlist "$temp_rpath"
3307 cat <<EOF
3308const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
3309EOF
3310 else
3311 cat <<"EOF"
3312const char * LIB_PATH_VALUE = "";
3313EOF
3314 fi
3315
3316 if test -n "$dllsearchpath"; then
3317 func_to_host_pathlist "$dllsearchpath:"
3318 cat <<EOF
3319const char * EXE_PATH_VARNAME = "PATH";
3320const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
3321EOF
3322 else
3323 cat <<"EOF"
3324const char * EXE_PATH_VARNAME = "";
3325const char * EXE_PATH_VALUE = "";
3326EOF
3327 fi
3328
3329 if test "$fast_install" = yes; then
3330 cat <<EOF
3331const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
3332EOF
3333 else
3334 cat <<EOF
3335const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
3336EOF
3337 fi
3338
3339
3340 cat <<"EOF"
3341
3342#define LTWRAPPER_OPTION_PREFIX "--lt-"
3343#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
3344
3345static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
3346static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
3347
3348static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3349
3350static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3351static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3352 /* argument is putenv-style "foo=bar", value of foo is set to bar */
3353
3354static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3355static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3356 /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3357
3358static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3359static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3360 /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
3361
3362int
3363main (int argc, char *argv[])
3364{
3365 char **newargz;
3366 int newargc;
3367 char *tmp_pathspec;
3368 char *actual_cwrapper_path;
3369 char *actual_cwrapper_name;
3370 char *target_name;
3371 char *lt_argv_zero;
3372 intptr_t rval = 127;
3373
3374 int i;
3375
3376 program_name = (char *) xstrdup (base_name (argv[0]));
3377 LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
3378 LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
3379
3380 /* very simple arg parsing; don't want to rely on getopt */
3381 for (i = 1; i < argc; i++)
3382 {
3383 if (strcmp (argv[i], dumpscript_opt) == 0)
3384 {
3385EOF
3386 case "$host" in
3387 *mingw* | *cygwin* )
3388 # make stdout use "unix" line endings
3389 echo " setmode(1,_O_BINARY);"
3390 ;;
3391 esac
3392
3393 cat <<"EOF"
3394 printf ("%s", script_text_part1);
3395 printf ("%s", script_text_part2);
3396 return 0;
3397 }
3398 }
3399
3400 newargz = XMALLOC (char *, argc + 1);
3401 tmp_pathspec = find_executable (argv[0]);
3402 if (tmp_pathspec == NULL)
3403 lt_fatal ("Couldn't find %s", argv[0]);
3404 LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
3405 tmp_pathspec));
3406
3407 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
3408 LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
3409 actual_cwrapper_path));
3410 XFREE (tmp_pathspec);
3411
3412 actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
3413 strendzap (actual_cwrapper_path, actual_cwrapper_name);
3414
3415 /* wrapper name transforms */
3416 strendzap (actual_cwrapper_name, ".exe");
3417 tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
3418 XFREE (actual_cwrapper_name);
3419 actual_cwrapper_name = tmp_pathspec;
3420 tmp_pathspec = 0;
3421
3422 /* target_name transforms -- use actual target program name; might have lt- prefix */
3423 target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
3424 strendzap (target_name, ".exe");
3425 tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
3426 XFREE (target_name);
3427 target_name = tmp_pathspec;
3428 tmp_pathspec = 0;
3429
3430 LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
3431 target_name));
3432EOF
3433
3434 cat <<EOF
3435 newargz[0] =
3436 XMALLOC (char, (strlen (actual_cwrapper_path) +
3437 strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
3438 strcpy (newargz[0], actual_cwrapper_path);
3439 strcat (newargz[0], "$objdir");
3440 strcat (newargz[0], "/");
3441EOF
3442
3443 cat <<"EOF"
3444 /* stop here, and copy so we don't have to do this twice */
3445 tmp_pathspec = xstrdup (newargz[0]);
3446
3447 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
3448 strcat (newargz[0], actual_cwrapper_name);
3449
3450 /* DO want the lt- prefix here if it exists, so use target_name */
3451 lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
3452 XFREE (tmp_pathspec);
3453 tmp_pathspec = NULL;
3454EOF
3455
3456 case $host_os in
3457 mingw*)
3458 cat <<"EOF"
3459 {
3460 char* p;
3461 while ((p = strchr (newargz[0], '\\')) != NULL)
3462 {
3463 *p = '/';
3464 }
3465 while ((p = strchr (lt_argv_zero, '\\')) != NULL)
3466 {
3467 *p = '/';
3468 }
3469 }
3470EOF
3471 ;;
3472 esac
3473
3474 cat <<"EOF"
3475 XFREE (target_name);
3476 XFREE (actual_cwrapper_path);
3477 XFREE (actual_cwrapper_name);
3478
3479 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
3480 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
3481 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3482 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
3483
3484 newargc=0;
3485 for (i = 1; i < argc; i++)
3486 {
3487 if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3488 {
3489 if (argv[i][env_set_opt_len] == '=')
3490 {
3491 const char *p = argv[i] + env_set_opt_len + 1;
3492 lt_opt_process_env_set (p);
3493 }
3494 else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3495 {
3496 lt_opt_process_env_set (argv[++i]); /* don't copy */
3497 }
3498 else
3499 lt_fatal ("%s missing required argument", env_set_opt);
3500 continue;
3501 }
3502 if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3503 {
3504 if (argv[i][env_prepend_opt_len] == '=')
3505 {
3506 const char *p = argv[i] + env_prepend_opt_len + 1;
3507 lt_opt_process_env_prepend (p);
3508 }
3509 else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3510 {
3511 lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3512 }
3513 else
3514 lt_fatal ("%s missing required argument", env_prepend_opt);
3515 continue;
3516 }
3517 if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3518 {
3519 if (argv[i][env_append_opt_len] == '=')
3520 {
3521 const char *p = argv[i] + env_append_opt_len + 1;
3522 lt_opt_process_env_append (p);
3523 }
3524 else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3525 {
3526 lt_opt_process_env_append (argv[++i]); /* don't copy */
3527 }
3528 else
3529 lt_fatal ("%s missing required argument", env_append_opt);
3530 continue;
3531 }
3532 if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3533 {
3534 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3535 namespace, but it is not one of the ones we know about and
3536 have already dealt with, above (inluding dump-script), then
3537 report an error. Otherwise, targets might begin to believe
3538 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3539 namespace. The first time any user complains about this, we'll
3540 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3541 or a configure.ac-settable value.
3542 */
3543 lt_fatal ("Unrecognized option in %s namespace: '%s'",
3544 ltwrapper_option_prefix, argv[i]);
3545 }
3546 /* otherwise ... */
3547 newargz[++newargc] = xstrdup (argv[i]);
3548 }
3549 newargz[++newargc] = NULL;
3550
3551 LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
3552 for (i = 0; i < newargc; i++)
3553 {
3554 LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
3555 }
3556
3557EOF
3558
3559 case $host_os in
3560 mingw*)
3561 cat <<"EOF"
3562 /* execv doesn't actually work on mingw as expected on unix */
3563 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
3564 if (rval == -1)
3565 {
3566 /* failed to start process */
3567 LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
3568 return 127;
3569 }
3570 return rval;
3571EOF
3572 ;;
3573 *)
3574 cat <<"EOF"
3575 execv (lt_argv_zero, newargz);
3576 return rval; /* =127, but avoids unused variable warning */
3577EOF
3578 ;;
3579 esac
3580
3581 cat <<"EOF"
3582}
3583
3584void *
3585xmalloc (size_t num)
3586{
3587 void *p = (void *) malloc (num);
3588 if (!p)
3589 lt_fatal ("Memory exhausted");
3590
3591 return p;
3592}
3593
3594char *
3595xstrdup (const char *string)
3596{
3597 return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
3598 string) : NULL;
3599}
3600
3601const char *
3602base_name (const char *name)
3603{
3604 const char *base;
3605
3606#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3607 /* Skip over the disk name in MSDOS pathnames. */
3608 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
3609 name += 2;
3610#endif
3611
3612 for (base = name; *name; name++)
3613 if (IS_DIR_SEPARATOR (*name))
3614 base = name + 1;
3615 return base;
3616}
3617
3618int
3619check_executable (const char *path)
3620{
3621 struct stat st;
3622
3623 LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
3624 path ? (*path ? path : "EMPTY!") : "NULL!"));
3625 if ((!path) || (!*path))
3626 return 0;
3627
3628 if ((stat (path, &st) >= 0)
3629 && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
3630 return 1;
3631 else
3632 return 0;
3633}
3634
3635int
3636make_executable (const char *path)
3637{
3638 int rval = 0;
3639 struct stat st;
3640
3641 LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
3642 path ? (*path ? path : "EMPTY!") : "NULL!"));
3643 if ((!path) || (!*path))
3644 return 0;
3645
3646 if (stat (path, &st) >= 0)
3647 {
3648 rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
3649 }
3650 return rval;
3651}
3652
3653/* Searches for the full path of the wrapper. Returns
3654 newly allocated full path name if found, NULL otherwise
3655 Does not chase symlinks, even on platforms that support them.
3656*/
3657char *
3658find_executable (const char *wrapper)
3659{
3660 int has_slash = 0;
3661 const char *p;
3662 const char *p_next;
3663 /* static buffer for getcwd */
3664 char tmp[LT_PATHMAX + 1];
3665 int tmp_len;
3666 char *concat_name;
3667
3668 LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
3669 wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
3670
3671 if ((wrapper == NULL) || (*wrapper == '\0'))
3672 return NULL;
3673
3674 /* Absolute path? */
3675#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3676 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
3677 {
3678 concat_name = xstrdup (wrapper);
3679 if (check_executable (concat_name))
3680 return concat_name;
3681 XFREE (concat_name);
3682 }
3683 else
3684 {
3685#endif
3686 if (IS_DIR_SEPARATOR (wrapper[0]))
3687 {
3688 concat_name = xstrdup (wrapper);
3689 if (check_executable (concat_name))
3690 return concat_name;
3691 XFREE (concat_name);
3692 }
3693#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
3694 }
3695#endif
3696
3697 for (p = wrapper; *p; p++)
3698 if (*p == '/')
3699 {
3700 has_slash = 1;
3701 break;
3702 }
3703 if (!has_slash)
3704 {
3705 /* no slashes; search PATH */
3706 const char *path = getenv ("PATH");
3707 if (path != NULL)
3708 {
3709 for (p = path; *p; p = p_next)
3710 {
3711 const char *q;
3712 size_t p_len;
3713 for (q = p; *q; q++)
3714 if (IS_PATH_SEPARATOR (*q))
3715 break;
3716 p_len = q - p;
3717 p_next = (*q == '\0' ? q : q + 1);
3718 if (p_len == 0)
3719 {
3720 /* empty path: current directory */
3721 if (getcwd (tmp, LT_PATHMAX) == NULL)
3722 lt_fatal ("getcwd failed");
3723 tmp_len = strlen (tmp);
3724 concat_name =
3725 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
3726 memcpy (concat_name, tmp, tmp_len);
3727 concat_name[tmp_len] = '/';
3728 strcpy (concat_name + tmp_len + 1, wrapper);
3729 }
3730 else
3731 {
3732 concat_name =
3733 XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
3734 memcpy (concat_name, p, p_len);
3735 concat_name[p_len] = '/';
3736 strcpy (concat_name + p_len + 1, wrapper);
3737 }
3738 if (check_executable (concat_name))
3739 return concat_name;
3740 XFREE (concat_name);
3741 }
3742 }
3743 /* not found in PATH; assume curdir */
3744 }
3745 /* Relative path | not found in path: prepend cwd */
3746 if (getcwd (tmp, LT_PATHMAX) == NULL)
3747 lt_fatal ("getcwd failed");
3748 tmp_len = strlen (tmp);
3749 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
3750 memcpy (concat_name, tmp, tmp_len);
3751 concat_name[tmp_len] = '/';
3752 strcpy (concat_name + tmp_len + 1, wrapper);
3753
3754 if (check_executable (concat_name))
3755 return concat_name;
3756 XFREE (concat_name);
3757 return NULL;
3758}
3759
3760char *
3761chase_symlinks (const char *pathspec)
3762{
3763#ifndef S_ISLNK
3764 return xstrdup (pathspec);
3765#else
3766 char buf[LT_PATHMAX];
3767 struct stat s;
3768 char *tmp_pathspec = xstrdup (pathspec);
3769 char *p;
3770 int has_symlinks = 0;
3771 while (strlen (tmp_pathspec) && !has_symlinks)
3772 {
3773 LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
3774 tmp_pathspec));
3775 if (lstat (tmp_pathspec, &s) == 0)
3776 {
3777 if (S_ISLNK (s.st_mode) != 0)
3778 {
3779 has_symlinks = 1;
3780 break;
3781 }
3782
3783 /* search backwards for last DIR_SEPARATOR */
3784 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
3785 while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
3786 p--;
3787 if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
3788 {
3789 /* no more DIR_SEPARATORS left */
3790 break;
3791 }
3792 *p = '\0';
3793 }
3794 else
3795 {
3796 char *errstr = strerror (errno);
3797 lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
3798 }
3799 }
3800 XFREE (tmp_pathspec);
3801
3802 if (!has_symlinks)
3803 {
3804 return xstrdup (pathspec);
3805 }
3806
3807 tmp_pathspec = realpath (pathspec, buf);
3808 if (tmp_pathspec == 0)
3809 {
3810 lt_fatal ("Could not follow symlinks for %s", pathspec);
3811 }
3812 return xstrdup (tmp_pathspec);
3813#endif
3814}
3815
3816char *
3817strendzap (char *str, const char *pat)
3818{
3819 size_t len, patlen;
3820
3821 assert (str != NULL);
3822 assert (pat != NULL);
3823
3824 len = strlen (str);
3825 patlen = strlen (pat);
3826
3827 if (patlen <= len)
3828 {
3829 str += len - patlen;
3830 if (strcmp (str, pat) == 0)
3831 *str = '\0';
3832 }
3833 return str;
3834}
3835
3836static void
3837lt_error_core (int exit_status, const char *mode,
3838 const char *message, va_list ap)
3839{
3840 fprintf (stderr, "%s: %s: ", program_name, mode);
3841 vfprintf (stderr, message, ap);
3842 fprintf (stderr, ".\n");
3843
3844 if (exit_status >= 0)
3845 exit (exit_status);
3846}
3847
3848void
3849lt_fatal (const char *message, ...)
3850{
3851 va_list ap;
3852 va_start (ap, message);
3853 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
3854 va_end (ap);
3855}
3856
3857void
3858lt_setenv (const char *name, const char *value)
3859{
3860 LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
3861 (name ? name : "<NULL>"),
3862 (value ? value : "<NULL>")));
3863 {
3864#ifdef HAVE_SETENV
3865 /* always make a copy, for consistency with !HAVE_SETENV */
3866 char *str = xstrdup (value);
3867 setenv (name, str, 1);
3868#else
3869 int len = strlen (name) + 1 + strlen (value) + 1;
3870 char *str = XMALLOC (char, len);
3871 sprintf (str, "%s=%s", name, value);
3872 if (putenv (str) != EXIT_SUCCESS)
3873 {
3874 XFREE (str);
3875 }
3876#endif
3877 }
3878}
3879
3880char *
3881lt_extend_str (const char *orig_value, const char *add, int to_end)
3882{
3883 char *new_value;
3884 if (orig_value && *orig_value)
3885 {
3886 int orig_value_len = strlen (orig_value);
3887 int add_len = strlen (add);
3888 new_value = XMALLOC (char, add_len + orig_value_len + 1);
3889 if (to_end)
3890 {
3891 strcpy (new_value, orig_value);
3892 strcpy (new_value + orig_value_len, add);
3893 }
3894 else
3895 {
3896 strcpy (new_value, add);
3897 strcpy (new_value + add_len, orig_value);
3898 }
3899 }
3900 else
3901 {
3902 new_value = xstrdup (add);
3903 }
3904 return new_value;
3905}
3906
3907int
3908lt_split_name_value (const char *arg, char** name, char** value)
3909{
3910 const char *p;
3911 int len;
3912 if (!arg || !*arg)
3913 return 1;
3914
3915 p = strchr (arg, (int)'=');
3916
3917 if (!p)
3918 return 1;
3919
3920 *value = xstrdup (++p);
3921
3922 len = strlen (arg) - strlen (*value);
3923 *name = XMALLOC (char, len);
3924 strncpy (*name, arg, len-1);
3925 (*name)[len - 1] = '\0';
3926
3927 return 0;
3928}
3929
3930void
3931lt_opt_process_env_set (const char *arg)
3932{
3933 char *name = NULL;
3934 char *value = NULL;
3935
3936 if (lt_split_name_value (arg, &name, &value) != 0)
3937 {
3938 XFREE (name);
3939 XFREE (value);
3940 lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
3941 }
3942
3943 lt_setenv (name, value);
3944 XFREE (name);
3945 XFREE (value);
3946}
3947
3948void
3949lt_opt_process_env_prepend (const char *arg)
3950{
3951 char *name = NULL;
3952 char *value = NULL;
3953 char *new_value = NULL;
3954
3955 if (lt_split_name_value (arg, &name, &value) != 0)
3956 {
3957 XFREE (name);
3958 XFREE (value);
3959 lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
3960 }
3961
3962 new_value = lt_extend_str (getenv (name), value, 0);
3963 lt_setenv (name, new_value);
3964 XFREE (new_value);
3965 XFREE (name);
3966 XFREE (value);
3967}
3968
3969void
3970lt_opt_process_env_append (const char *arg)
3971{
3972 char *name = NULL;
3973 char *value = NULL;
3974 char *new_value = NULL;
3975
3976 if (lt_split_name_value (arg, &name, &value) != 0)
3977 {
3978 XFREE (name);
3979 XFREE (value);
3980 lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
3981 }
3982
3983 new_value = lt_extend_str (getenv (name), value, 1);
3984 lt_setenv (name, new_value);
3985 XFREE (new_value);
3986 XFREE (name);
3987 XFREE (value);
3988}
3989
3990void
3991lt_update_exe_path (const char *name, const char *value)
3992{
3993 LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
3994 (name ? name : "<NULL>"),
3995 (value ? value : "<NULL>")));
3996
3997 if (name && *name && value && *value)
3998 {
3999 char *new_value = lt_extend_str (getenv (name), value, 0);
4000 /* some systems can't cope with a ':'-terminated path #' */
4001 int len = strlen (new_value);
4002 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
4003 {
4004 new_value[len-1] = '\0';
4005 }
4006 lt_setenv (name, new_value);
4007 XFREE (new_value);
4008 }
4009}
4010
4011void
4012lt_update_lib_path (const char *name, const char *value)
4013{
4014 LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4015 (name ? name : "<NULL>"),
4016 (value ? value : "<NULL>")));
4017
4018 if (name && *name && value && *value)
4019 {
4020 char *new_value = lt_extend_str (getenv (name), value, 0);
4021 lt_setenv (name, new_value);
4022 XFREE (new_value);
4023 }
4024}
4025
4026
4027EOF
4028}
4029# end: func_emit_cwrapperexe_src
4030
4031# func_mode_link arg...
4032func_mode_link ()
4033{
4034 $opt_debug
4035 case $host in
4036 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4037 # It is impossible to link a dll without this setting, and
4038 # we shouldn't force the makefile maintainer to figure out
4039 # which system we are compiling for in order to pass an extra
4040 # flag for every libtool invocation.
4041 # allow_undefined=no
4042
4043 # FIXME: Unfortunately, there are problems with the above when trying
4044 # to make a dll which has undefined symbols, in which case not
4045 # even a static library is built. For now, we need to specify
4046 # -no-undefined on the libtool link line when we can be certain
4047 # that all symbols are satisfied, otherwise we get a static library.
4048 allow_undefined=yes
4049 ;;
4050 *)
4051 allow_undefined=yes
4052 ;;
4053 esac
4054 libtool_args=$nonopt
4055 base_compile="$nonopt $@"
4056 compile_command=$nonopt
4057 finalize_command=$nonopt
4058
4059 compile_rpath=
4060 finalize_rpath=
4061 compile_shlibpath=
4062 finalize_shlibpath=
4063 convenience=
4064 old_convenience=
4065 deplibs=
4066 old_deplibs=
4067 compiler_flags=
4068 linker_flags=
4069 dllsearchpath=
4070 lib_search_path=`pwd`
4071 inst_prefix_dir=
4072 new_inherited_linker_flags=
4073
4074 avoid_version=no
4075 dlfiles=
4076 dlprefiles=
4077 dlself=no
4078 export_dynamic=no
4079 export_symbols=
4080 export_symbols_regex=
4081 generated=
4082 libobjs=
4083 ltlibs=
4084 module=no
4085 no_install=no
4086 objs=
4087 non_pic_objects=
4088 precious_files_regex=
4089 prefer_static_libs=no
4090 preload=no
4091 prev=
4092 prevarg=
4093 release=
4094 rpath=
4095 xrpath=
4096 perm_rpath=
4097 temp_rpath=
4098 thread_safe=no
4099 vinfo=
4100 vinfo_number=no
4101 weak_libs=
4102 single_module="${wl}-single_module"
4103 func_infer_tag $base_compile
4104
4105 # We need to know -static, to get the right output filenames.
4106 for arg
4107 do
4108 case $arg in
4109 -shared)
4110 test "$build_libtool_libs" != yes && \
4111 func_fatal_configuration "can not build a shared library"
4112 build_old_libs=no
4113 break
4114 ;;
4115 -all-static | -static | -static-libtool-libs)
4116 case $arg in
4117 -all-static)
4118 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
4119 func_warning "complete static linking is impossible in this configuration"
4120 fi
4121 if test -n "$link_static_flag"; then
4122 dlopen_self=$dlopen_self_static
4123 fi
4124 prefer_static_libs=yes
4125 ;;
4126 -static)
4127 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4128 dlopen_self=$dlopen_self_static
4129 fi
4130 prefer_static_libs=built
4131 ;;
4132 -static-libtool-libs)
4133 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4134 dlopen_self=$dlopen_self_static
4135 fi
4136 prefer_static_libs=yes
4137 ;;
4138 esac
4139 build_libtool_libs=no
4140 build_old_libs=yes
4141 break
4142 ;;
4143 esac
4144 done
4145
4146 # See if our shared archives depend on static archives.
4147 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
4148
4149 # Go through the arguments, transforming them on the way.
4150 while test "$#" -gt 0; do
4151 arg="$1"
4152 shift
4153 func_quote_for_eval "$arg"
4154 qarg=$func_quote_for_eval_unquoted_result
4155 func_append libtool_args " $func_quote_for_eval_result"
4156
4157 # If the previous option needs an argument, assign it.
4158 if test -n "$prev"; then
4159 case $prev in
4160 output)
4161 func_append compile_command " @OUTPUT@"
4162 func_append finalize_command " @OUTPUT@"
4163 ;;
4164 esac
4165
4166 case $prev in
4167 dlfiles|dlprefiles)
4168 if test "$preload" = no; then
4169 # Add the symbol object into the linking commands.
4170 func_append compile_command " @SYMFILE@"
4171 func_append finalize_command " @SYMFILE@"
4172 preload=yes
4173 fi
4174 case $arg in
4175 *.la | *.lo) ;; # We handle these cases below.
4176 force)
4177 if test "$dlself" = no; then
4178 dlself=needless
4179 export_dynamic=yes
4180 fi
4181 prev=
4182 continue
4183 ;;
4184 self)
4185 if test "$prev" = dlprefiles; then
4186 dlself=yes
4187 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
4188 dlself=yes
4189 else
4190 dlself=needless
4191 export_dynamic=yes
4192 fi
4193 prev=
4194 continue
4195 ;;
4196 *)
4197 if test "$prev" = dlfiles; then
4198 dlfiles="$dlfiles $arg"
4199 else
4200 dlprefiles="$dlprefiles $arg"
4201 fi
4202 prev=
4203 continue
4204 ;;
4205 esac
4206 ;;
4207 expsyms)
4208 export_symbols="$arg"
4209 test -f "$arg" \
4210 || func_fatal_error "symbol file \`$arg' does not exist"
4211 prev=
4212 continue
4213 ;;
4214 expsyms_regex)
4215 export_symbols_regex="$arg"
4216 prev=
4217 continue
4218 ;;
4219 framework)
4220 case $host in
4221 *-*-darwin*)
4222 case "$deplibs " in
4223 *" $qarg.ltframework "*) ;;
4224 *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
4225 ;;
4226 esac
4227 ;;
4228 esac
4229 prev=
4230 continue
4231 ;;
4232 inst_prefix)
4233 inst_prefix_dir="$arg"
4234 prev=
4235 continue
4236 ;;
4237 objectlist)
4238 if test -f "$arg"; then
4239 save_arg=$arg
4240 moreargs=
4241 for fil in `cat "$save_arg"`
4242 do
4243# moreargs="$moreargs $fil"
4244 arg=$fil
4245 # A libtool-controlled object.
4246
4247 # Check to see that this really is a libtool object.
4248 if func_lalib_unsafe_p "$arg"; then
4249 pic_object=
4250 non_pic_object=
4251
4252 # Read the .lo file
4253 func_source "$arg"
4254
4255 if test -z "$pic_object" ||
4256 test -z "$non_pic_object" ||
4257 test "$pic_object" = none &&
4258 test "$non_pic_object" = none; then
4259 func_fatal_error "cannot find name of object for \`$arg'"
4260 fi
4261
4262 # Extract subdirectory from the argument.
4263 func_dirname "$arg" "/" ""
4264 xdir="$func_dirname_result"
4265
4266 if test "$pic_object" != none; then
4267 # Prepend the subdirectory the object is found in.
4268 pic_object="$xdir$pic_object"
4269
4270 if test "$prev" = dlfiles; then
4271 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4272 dlfiles="$dlfiles $pic_object"
4273 prev=
4274 continue
4275 else
4276 # If libtool objects are unsupported, then we need to preload.
4277 prev=dlprefiles
4278 fi
4279 fi
4280
4281 # CHECK ME: I think I busted this. -Ossama
4282 if test "$prev" = dlprefiles; then
4283 # Preload the old-style object.
4284 dlprefiles="$dlprefiles $pic_object"
4285 prev=
4286 fi
4287
4288 # A PIC object.
4289 func_append libobjs " $pic_object"
4290 arg="$pic_object"
4291 fi
4292
4293 # Non-PIC object.
4294 if test "$non_pic_object" != none; then
4295 # Prepend the subdirectory the object is found in.
4296 non_pic_object="$xdir$non_pic_object"
4297
4298 # A standard non-PIC object
4299 func_append non_pic_objects " $non_pic_object"
4300 if test -z "$pic_object" || test "$pic_object" = none ; then
4301 arg="$non_pic_object"
4302 fi
4303 else
4304 # If the PIC object exists, use it instead.
4305 # $xdir was prepended to $pic_object above.
4306 non_pic_object="$pic_object"
4307 func_append non_pic_objects " $non_pic_object"
4308 fi
4309 else
4310 # Only an error if not doing a dry-run.
4311 if $opt_dry_run; then
4312 # Extract subdirectory from the argument.
4313 func_dirname "$arg" "/" ""
4314 xdir="$func_dirname_result"
4315
4316 func_lo2o "$arg"
4317 pic_object=$xdir$objdir/$func_lo2o_result
4318 non_pic_object=$xdir$func_lo2o_result
4319 func_append libobjs " $pic_object"
4320 func_append non_pic_objects " $non_pic_object"
4321 else
4322 func_fatal_error "\`$arg' is not a valid libtool object"
4323 fi
4324 fi
4325 done
4326 else
4327 func_fatal_error "link input file \`$arg' does not exist"
4328 fi
4329 arg=$save_arg
4330 prev=
4331 continue
4332 ;;
4333 precious_regex)
4334 precious_files_regex="$arg"
4335 prev=
4336 continue
4337 ;;
4338 release)
4339 release="-$arg"
4340 prev=
4341 continue
4342 ;;
4343 rpath | xrpath)
4344 # We need an absolute path.
4345 case $arg in
4346 [\\/]* | [A-Za-z]:[\\/]*) ;;
4347 *)
4348 func_fatal_error "only absolute run-paths are allowed"
4349 ;;
4350 esac
4351 if test "$prev" = rpath; then
4352 case "$rpath " in
4353 *" $arg "*) ;;
4354 *) rpath="$rpath $arg" ;;
4355 esac
4356 else
4357 case "$xrpath " in
4358 *" $arg "*) ;;
4359 *) xrpath="$xrpath $arg" ;;
4360 esac
4361 fi
4362 prev=
4363 continue
4364 ;;
4365 shrext)
4366 shrext_cmds="$arg"
4367 prev=
4368 continue
4369 ;;
4370 weak)
4371 weak_libs="$weak_libs $arg"
4372 prev=
4373 continue
4374 ;;
4375 xcclinker)
4376 linker_flags="$linker_flags $qarg"
4377 compiler_flags="$compiler_flags $qarg"
4378 prev=
4379 func_append compile_command " $qarg"
4380 func_append finalize_command " $qarg"
4381 continue
4382 ;;
4383 xcompiler)
4384 compiler_flags="$compiler_flags $qarg"
4385 prev=
4386 func_append compile_command " $qarg"
4387 func_append finalize_command " $qarg"
4388 continue
4389 ;;
4390 xlinker)
4391 linker_flags="$linker_flags $qarg"
4392 compiler_flags="$compiler_flags $wl$qarg"
4393 prev=
4394 func_append compile_command " $wl$qarg"
4395 func_append finalize_command " $wl$qarg"
4396 continue
4397 ;;
4398 *)
4399 eval "$prev=\"\$arg\""
4400 prev=
4401 continue
4402 ;;
4403 esac
4404 fi # test -n "$prev"
4405
4406 prevarg="$arg"
4407
4408 case $arg in
4409 -all-static)
4410 if test -n "$link_static_flag"; then
4411 # See comment for -static flag below, for more details.
4412 func_append compile_command " $link_static_flag"
4413 func_append finalize_command " $link_static_flag"
4414 fi
4415 continue
4416 ;;
4417
4418 -allow-undefined)
4419 # FIXME: remove this flag sometime in the future.
4420 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
4421 ;;
4422
4423 -avoid-version)
4424 avoid_version=yes
4425 continue
4426 ;;
4427
4428 -dlopen)
4429 prev=dlfiles
4430 continue
4431 ;;
4432
4433 -dlpreopen)
4434 prev=dlprefiles
4435 continue
4436 ;;
4437
4438 -export-dynamic)
4439 export_dynamic=yes
4440 continue
4441 ;;
4442
4443 -export-symbols | -export-symbols-regex)
4444 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
4445 func_fatal_error "more than one -exported-symbols argument is not allowed"
4446 fi
4447 if test "X$arg" = "X-export-symbols"; then
4448 prev=expsyms
4449 else
4450 prev=expsyms_regex
4451 fi
4452 continue
4453 ;;
4454
4455 -framework)
4456 prev=framework
4457 continue
4458 ;;
4459
4460 -inst-prefix-dir)
4461 prev=inst_prefix
4462 continue
4463 ;;
4464
4465 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
4466 # so, if we see these flags be careful not to treat them like -L
4467 -L[A-Z][A-Z]*:*)
4468 case $with_gcc/$host in
4469 no/*-*-irix* | /*-*-irix*)
4470 func_append compile_command " $arg"
4471 func_append finalize_command " $arg"
4472 ;;
4473 esac
4474 continue
4475 ;;
4476
4477 -L*)
4478 func_stripname '-L' '' "$arg"
4479 dir=$func_stripname_result
4480 if test -z "$dir"; then
4481 if test "$#" -gt 0; then
4482 func_fatal_error "require no space between \`-L' and \`$1'"
4483 else
4484 func_fatal_error "need path for \`-L' option"
4485 fi
4486 fi
4487 # We need an absolute path.
4488 case $dir in
4489 [\\/]* | [A-Za-z]:[\\/]*) ;;
4490 *)
4491 absdir=`cd "$dir" && pwd`
4492 test -z "$absdir" && \
4493 func_fatal_error "cannot determine absolute directory name of \`$dir'"
4494 dir="$absdir"
4495 ;;
4496 esac
4497 case "$deplibs " in
4498 *" -L$dir "*) ;;
4499 *)
4500 deplibs="$deplibs -L$dir"
4501 lib_search_path="$lib_search_path $dir"
4502 ;;
4503 esac
4504 case $host in
4505 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4506 testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
4507 case :$dllsearchpath: in
4508 *":$dir:"*) ;;
4509 ::) dllsearchpath=$dir;;
4510 *) dllsearchpath="$dllsearchpath:$dir";;
4511 esac
4512 case :$dllsearchpath: in
4513 *":$testbindir:"*) ;;
4514 ::) dllsearchpath=$testbindir;;
4515 *) dllsearchpath="$dllsearchpath:$testbindir";;
4516 esac
4517 ;;
4518 esac
4519 continue
4520 ;;
4521
4522 -l*)
4523 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
4524 case $host in
4525 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
4526 # These systems don't actually have a C or math library (as such)
4527 continue
4528 ;;
4529 *-*-os2*)
4530 # These systems don't actually have a C library (as such)
4531 test "X$arg" = "X-lc" && continue
4532 ;;
4533 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4534 # Do not include libc due to us having libc/libc_r.
4535 test "X$arg" = "X-lc" && continue
4536 ;;
4537 *-*-rhapsody* | *-*-darwin1.[012])
4538 # Rhapsody C and math libraries are in the System framework
4539 deplibs="$deplibs System.ltframework"
4540 continue
4541 ;;
4542 *-*-sco3.2v5* | *-*-sco5v6*)
4543 # Causes problems with __ctype
4544 test "X$arg" = "X-lc" && continue
4545 ;;
4546 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
4547 # Compiler inserts libc in the correct place for threads to work
4548 test "X$arg" = "X-lc" && continue
4549 ;;
4550 esac
4551 elif test "X$arg" = "X-lc_r"; then
4552 case $host in
4553 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4554 # Do not include libc_r directly, use -pthread flag.
4555 continue
4556 ;;
4557 esac
4558 fi
4559 deplibs="$deplibs $arg"
4560 continue
4561 ;;
4562
4563 -module)
4564 module=yes
4565 continue
4566 ;;
4567
4568 # Tru64 UNIX uses -model [arg] to determine the layout of C++
4569 # classes, name mangling, and exception handling.
4570 # Darwin uses the -arch flag to determine output architecture.
4571 -model|-arch|-isysroot)
4572 compiler_flags="$compiler_flags $arg"
4573 func_append compile_command " $arg"
4574 func_append finalize_command " $arg"
4575 prev=xcompiler
4576 continue
4577 ;;
4578
4579 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4580 compiler_flags="$compiler_flags $arg"
4581 func_append compile_command " $arg"
4582 func_append finalize_command " $arg"
4583 case "$new_inherited_linker_flags " in
4584 *" $arg "*) ;;
4585 * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
4586 esac
4587 continue
4588 ;;
4589
4590 -multi_module)
4591 single_module="${wl}-multi_module"
4592 continue
4593 ;;
4594
4595 -no-fast-install)
4596 fast_install=no
4597 continue
4598 ;;
4599
4600 -no-install)
4601 case $host in
4602 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
4603 # The PATH hackery in wrapper scripts is required on Windows
4604 # and Darwin in order for the loader to find any dlls it needs.
4605 func_warning "\`-no-install' is ignored for $host"
4606 func_warning "assuming \`-no-fast-install' instead"
4607 fast_install=no
4608 ;;
4609 *) no_install=yes ;;
4610 esac
4611 continue
4612 ;;
4613
4614 -no-undefined)
4615 allow_undefined=no
4616 continue
4617 ;;
4618
4619 -objectlist)
4620 prev=objectlist
4621 continue
4622 ;;
4623
4624 -o) prev=output ;;
4625
4626 -precious-files-regex)
4627 prev=precious_regex
4628 continue
4629 ;;
4630
4631 -release)
4632 prev=release
4633 continue
4634 ;;
4635
4636 -rpath)
4637 prev=rpath
4638 continue
4639 ;;
4640
4641 -R)
4642 prev=xrpath
4643 continue
4644 ;;
4645
4646 -R*)
4647 func_stripname '-R' '' "$arg"
4648 dir=$func_stripname_result
4649 # We need an absolute path.
4650 case $dir in
4651 [\\/]* | [A-Za-z]:[\\/]*) ;;
4652 *)
4653 func_fatal_error "only absolute run-paths are allowed"
4654 ;;
4655 esac
4656 case "$xrpath " in
4657 *" $dir "*) ;;
4658 *) xrpath="$xrpath $dir" ;;
4659 esac
4660 continue
4661 ;;
4662
4663 -shared)
4664 # The effects of -shared are defined in a previous loop.
4665 continue
4666 ;;
4667
4668 -shrext)
4669 prev=shrext
4670 continue
4671 ;;
4672
4673 -static | -static-libtool-libs)
4674 # The effects of -static are defined in a previous loop.
4675 # We used to do the same as -all-static on platforms that
4676 # didn't have a PIC flag, but the assumption that the effects
4677 # would be equivalent was wrong. It would break on at least
4678 # Digital Unix and AIX.
4679 continue
4680 ;;
4681
4682 -thread-safe)
4683 thread_safe=yes
4684 continue
4685 ;;
4686
4687 -version-info)
4688 prev=vinfo
4689 continue
4690 ;;
4691
4692 -version-number)
4693 prev=vinfo
4694 vinfo_number=yes
4695 continue
4696 ;;
4697
4698 -weak)
4699 prev=weak
4700 continue
4701 ;;
4702
4703 -Wc,*)
4704 func_stripname '-Wc,' '' "$arg"
4705 args=$func_stripname_result
4706 arg=
4707 save_ifs="$IFS"; IFS=','
4708 for flag in $args; do
4709 IFS="$save_ifs"
4710 func_quote_for_eval "$flag"
4711 arg="$arg $wl$func_quote_for_eval_result"
4712 compiler_flags="$compiler_flags $func_quote_for_eval_result"
4713 done
4714 IFS="$save_ifs"
4715 func_stripname ' ' '' "$arg"
4716 arg=$func_stripname_result
4717 ;;
4718
4719 -Wl,*)
4720 func_stripname '-Wl,' '' "$arg"
4721 args=$func_stripname_result
4722 arg=
4723 save_ifs="$IFS"; IFS=','
4724 for flag in $args; do
4725 IFS="$save_ifs"
4726 func_quote_for_eval "$flag"
4727 arg="$arg $wl$func_quote_for_eval_result"
4728 compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
4729 linker_flags="$linker_flags $func_quote_for_eval_result"
4730 done
4731 IFS="$save_ifs"
4732 func_stripname ' ' '' "$arg"
4733 arg=$func_stripname_result
4734 ;;
4735
4736 -Xcompiler)
4737 prev=xcompiler
4738 continue
4739 ;;
4740
4741 -Xlinker)
4742 prev=xlinker
4743 continue
4744 ;;
4745
4746 -XCClinker)
4747 prev=xcclinker
4748 continue
4749 ;;
4750
4751 # -msg_* for osf cc
4752 -msg_*)
4753 func_quote_for_eval "$arg"
4754 arg="$func_quote_for_eval_result"
4755 ;;
4756
4757 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4758 # -r[0-9][0-9]* specifies the processor on the SGI compiler
4759 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4760 # +DA*, +DD* enable 64-bit mode on the HP compiler
4761 # -q* pass through compiler args for the IBM compiler
4762 # -m*, -t[45]*, -txscale* pass through architecture-specific
4763 # compiler args for GCC
4764 # -F/path gives path to uninstalled frameworks, gcc on darwin
4765 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4766 # @file GCC response files
4767 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4768 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
4769 func_quote_for_eval "$arg"
4770 arg="$func_quote_for_eval_result"
4771 func_append compile_command " $arg"
4772 func_append finalize_command " $arg"
4773 compiler_flags="$compiler_flags $arg"
4774 continue
4775 ;;
4776
4777 # Some other compiler flag.
4778 -* | +*)
4779 func_quote_for_eval "$arg"
4780 arg="$func_quote_for_eval_result"
4781 ;;
4782
4783 *.$objext)
4784 # A standard object.
4785 objs="$objs $arg"
4786 ;;
4787
4788 *.lo)
4789 # A libtool-controlled object.
4790
4791 # Check to see that this really is a libtool object.
4792 if func_lalib_unsafe_p "$arg"; then
4793 pic_object=
4794 non_pic_object=
4795
4796 # Read the .lo file
4797 func_source "$arg"
4798
4799 if test -z "$pic_object" ||
4800 test -z "$non_pic_object" ||
4801 test "$pic_object" = none &&
4802 test "$non_pic_object" = none; then
4803 func_fatal_error "cannot find name of object for \`$arg'"
4804 fi
4805
4806 # Extract subdirectory from the argument.
4807 func_dirname "$arg" "/" ""
4808 xdir="$func_dirname_result"
4809
4810 if test "$pic_object" != none; then
4811 # Prepend the subdirectory the object is found in.
4812 pic_object="$xdir$pic_object"
4813
4814 if test "$prev" = dlfiles; then
4815 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4816 dlfiles="$dlfiles $pic_object"
4817 prev=
4818 continue
4819 else
4820 # If libtool objects are unsupported, then we need to preload.
4821 prev=dlprefiles
4822 fi
4823 fi
4824
4825 # CHECK ME: I think I busted this. -Ossama
4826 if test "$prev" = dlprefiles; then
4827 # Preload the old-style object.
4828 dlprefiles="$dlprefiles $pic_object"
4829 prev=
4830 fi
4831
4832 # A PIC object.
4833 func_append libobjs " $pic_object"
4834 arg="$pic_object"
4835 fi
4836
4837 # Non-PIC object.
4838 if test "$non_pic_object" != none; then
4839 # Prepend the subdirectory the object is found in.
4840 non_pic_object="$xdir$non_pic_object"
4841
4842 # A standard non-PIC object
4843 func_append non_pic_objects " $non_pic_object"
4844 if test -z "$pic_object" || test "$pic_object" = none ; then
4845 arg="$non_pic_object"
4846 fi
4847 else
4848 # If the PIC object exists, use it instead.
4849 # $xdir was prepended to $pic_object above.
4850 non_pic_object="$pic_object"
4851 func_append non_pic_objects " $non_pic_object"
4852 fi
4853 else
4854 # Only an error if not doing a dry-run.
4855 if $opt_dry_run; then
4856 # Extract subdirectory from the argument.
4857 func_dirname "$arg" "/" ""
4858 xdir="$func_dirname_result"
4859
4860 func_lo2o "$arg"
4861 pic_object=$xdir$objdir/$func_lo2o_result
4862 non_pic_object=$xdir$func_lo2o_result
4863 func_append libobjs " $pic_object"
4864 func_append non_pic_objects " $non_pic_object"
4865 else
4866 func_fatal_error "\`$arg' is not a valid libtool object"
4867 fi
4868 fi
4869 ;;
4870
4871 *.$libext)
4872 # An archive.
4873 deplibs="$deplibs $arg"
4874 old_deplibs="$old_deplibs $arg"
4875 continue
4876 ;;
4877
4878 *.la)
4879 # A libtool-controlled library.
4880
4881 if test "$prev" = dlfiles; then
4882 # This library was specified with -dlopen.
4883 dlfiles="$dlfiles $arg"
4884 prev=
4885 elif test "$prev" = dlprefiles; then
4886 # The library was specified with -dlpreopen.
4887 dlprefiles="$dlprefiles $arg"
4888 prev=
4889 else
4890 deplibs="$deplibs $arg"
4891 fi
4892 continue
4893 ;;
4894
4895 # Some other compiler argument.
4896 *)
4897 # Unknown arguments in both finalize_command and compile_command need
4898 # to be aesthetically quoted because they are evaled later.
4899 func_quote_for_eval "$arg"
4900 arg="$func_quote_for_eval_result"
4901 ;;
4902 esac # arg
4903
4904 # Now actually substitute the argument into the commands.
4905 if test -n "$arg"; then
4906 func_append compile_command " $arg"
4907 func_append finalize_command " $arg"
4908 fi
4909 done # argument parsing loop
4910
4911 test -n "$prev" && \
4912 func_fatal_help "the \`$prevarg' option requires an argument"
4913
4914 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
4915 eval arg=\"$export_dynamic_flag_spec\"
4916 func_append compile_command " $arg"
4917 func_append finalize_command " $arg"
4918 fi
4919
4920 oldlibs=
4921 # calculate the name of the file, without its directory
4922 func_basename "$output"
4923 outputname="$func_basename_result"
4924 libobjs_save="$libobjs"
4925
4926 if test -n "$shlibpath_var"; then
4927 # get the directories listed in $shlibpath_var
4928 eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
4929 else
4930 shlib_search_path=
4931 fi
4932 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
4933 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
4934
4935 func_dirname "$output" "/" ""
4936 output_objdir="$func_dirname_result$objdir"
4937 # Create the object directory.
4938 func_mkdir_p "$output_objdir"
4939
4940 # Determine the type of output
4941 case $output in
4942 "")
4943 func_fatal_help "you must specify an output file"
4944 ;;
4945 *.$libext) linkmode=oldlib ;;
4946 *.lo | *.$objext) linkmode=obj ;;
4947 *.la) linkmode=lib ;;
4948 *) linkmode=prog ;; # Anything else should be a program.
4949 esac
4950
4951 specialdeplibs=
4952
4953 libs=
4954 # Find all interdependent deplibs by searching for libraries
4955 # that are linked more than once (e.g. -la -lb -la)
4956 for deplib in $deplibs; do
4957 if $opt_duplicate_deps ; then
4958 case "$libs " in
4959 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4960 esac
4961 fi
4962 libs="$libs $deplib"
4963 done
4964
4965 if test "$linkmode" = lib; then
4966 libs="$predeps $libs $compiler_lib_search_path $postdeps"
4967
4968 # Compute libraries that are listed more than once in $predeps
4969 # $postdeps and mark them as special (i.e., whose duplicates are
4970 # not to be eliminated).
4971 pre_post_deps=
4972 if $opt_duplicate_compiler_generated_deps; then
4973 for pre_post_dep in $predeps $postdeps; do
4974 case "$pre_post_deps " in
4975 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
4976 esac
4977 pre_post_deps="$pre_post_deps $pre_post_dep"
4978 done
4979 fi
4980 pre_post_deps=
4981 fi
4982
4983 deplibs=
4984 newdependency_libs=
4985 newlib_search_path=
4986 need_relink=no # whether we're linking any uninstalled libtool libraries
4987 notinst_deplibs= # not-installed libtool libraries
4988 notinst_path= # paths that contain not-installed libtool libraries
4989
4990 case $linkmode in
4991 lib)
4992 passes="conv dlpreopen link"
4993 for file in $dlfiles $dlprefiles; do
4994 case $file in
4995 *.la) ;;
4996 *)
4997 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
4998 ;;
4999 esac
5000 done
5001 ;;
5002 prog)
5003 compile_deplibs=
5004 finalize_deplibs=
5005 alldeplibs=no
5006 newdlfiles=
5007 newdlprefiles=
5008 passes="conv scan dlopen dlpreopen link"
5009 ;;
5010 *) passes="conv"
5011 ;;
5012 esac
5013
5014 for pass in $passes; do
5015 # The preopen pass in lib mode reverses $deplibs; put it back here
5016 # so that -L comes before libs that need it for instance...
5017 if test "$linkmode,$pass" = "lib,link"; then
5018 ## FIXME: Find the place where the list is rebuilt in the wrong
5019 ## order, and fix it there properly
5020 tmp_deplibs=
5021 for deplib in $deplibs; do
5022 tmp_deplibs="$deplib $tmp_deplibs"
5023 done
5024 deplibs="$tmp_deplibs"
5025 fi
5026
5027 if test "$linkmode,$pass" = "lib,link" ||
5028 test "$linkmode,$pass" = "prog,scan"; then
5029 libs="$deplibs"
5030 deplibs=
5031 fi
5032 if test "$linkmode" = prog; then
5033 case $pass in
5034 dlopen) libs="$dlfiles" ;;
5035 dlpreopen) libs="$dlprefiles" ;;
5036 link)
5037 libs="$deplibs %DEPLIBS%"
5038 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
5039 ;;
5040 esac
5041 fi
5042 if test "$linkmode,$pass" = "lib,dlpreopen"; then
5043 # Collect and forward deplibs of preopened libtool libs
5044 for lib in $dlprefiles; do
5045 # Ignore non-libtool-libs
5046 dependency_libs=
5047 case $lib in
5048 *.la) func_source "$lib" ;;
5049 esac
5050
5051 # Collect preopened libtool deplibs, except any this library
5052 # has declared as weak libs
5053 for deplib in $dependency_libs; do
5054 deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
5055 case " $weak_libs " in
5056 *" $deplib_base "*) ;;
5057 *) deplibs="$deplibs $deplib" ;;
5058 esac
5059 done
5060 done
5061 libs="$dlprefiles"
5062 fi
5063 if test "$pass" = dlopen; then
5064 # Collect dlpreopened libraries
5065 save_deplibs="$deplibs"
5066 deplibs=
5067 fi
5068
5069 for deplib in $libs; do
5070 lib=
5071 found=no
5072 case $deplib in
5073 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5074 if test "$linkmode,$pass" = "prog,link"; then
5075 compile_deplibs="$deplib $compile_deplibs"
5076 finalize_deplibs="$deplib $finalize_deplibs"
5077 else
5078 compiler_flags="$compiler_flags $deplib"
5079 if test "$linkmode" = lib ; then
5080 case "$new_inherited_linker_flags " in
5081 *" $deplib "*) ;;
5082 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5083 esac
5084 fi
5085 fi
5086 continue
5087 ;;
5088 -l*)
5089 if test "$linkmode" != lib && test "$linkmode" != prog; then
5090 func_warning "\`-l' is ignored for archives/objects"
5091 continue
5092 fi
5093 func_stripname '-l' '' "$deplib"
5094 name=$func_stripname_result
5095 if test "$linkmode" = lib; then
5096 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
5097 else
5098 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
5099 fi
5100 for searchdir in $searchdirs; do
5101 for search_ext in .la $std_shrext .so .a; do
5102 # Search the libtool library
5103 lib="$searchdir/lib${name}${search_ext}"
5104 if test -f "$lib"; then
5105 if test "$search_ext" = ".la"; then
5106 found=yes
5107 else
5108 found=no
5109 fi
5110 break 2
5111 fi
5112 done
5113 done
5114 if test "$found" != yes; then
5115 # deplib doesn't seem to be a libtool library
5116 if test "$linkmode,$pass" = "prog,link"; then
5117 compile_deplibs="$deplib $compile_deplibs"
5118 finalize_deplibs="$deplib $finalize_deplibs"
5119 else
5120 deplibs="$deplib $deplibs"
5121 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5122 fi
5123 continue
5124 else # deplib is a libtool library
5125 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
5126 # We need to do some special things here, and not later.
5127 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5128 case " $predeps $postdeps " in
5129 *" $deplib "*)
5130 if func_lalib_p "$lib"; then
5131 library_names=
5132 old_library=
5133 func_source "$lib"
5134 for l in $old_library $library_names; do
5135 ll="$l"
5136 done
5137 if test "X$ll" = "X$old_library" ; then # only static version available
5138 found=no
5139 func_dirname "$lib" "" "."
5140 ladir="$func_dirname_result"
5141 lib=$ladir/$old_library
5142 if test "$linkmode,$pass" = "prog,link"; then
5143 compile_deplibs="$deplib $compile_deplibs"
5144 finalize_deplibs="$deplib $finalize_deplibs"
5145 else
5146 deplibs="$deplib $deplibs"
5147 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5148 fi
5149 continue
5150 fi
5151 fi
5152 ;;
5153 *) ;;
5154 esac
5155 fi
5156 fi
5157 ;; # -l
5158 *.ltframework)
5159 if test "$linkmode,$pass" = "prog,link"; then
5160 compile_deplibs="$deplib $compile_deplibs"
5161 finalize_deplibs="$deplib $finalize_deplibs"
5162 else
5163 deplibs="$deplib $deplibs"
5164 if test "$linkmode" = lib ; then
5165 case "$new_inherited_linker_flags " in
5166 *" $deplib "*) ;;
5167 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
5168 esac
5169 fi
5170 fi
5171 continue
5172 ;;
5173 -L*)
5174 case $linkmode in
5175 lib)
5176 deplibs="$deplib $deplibs"
5177 test "$pass" = conv && continue
5178 newdependency_libs="$deplib $newdependency_libs"
5179 func_stripname '-L' '' "$deplib"
5180 newlib_search_path="$newlib_search_path $func_stripname_result"
5181 ;;
5182 prog)
5183 if test "$pass" = conv; then
5184 deplibs="$deplib $deplibs"
5185 continue
5186 fi
5187 if test "$pass" = scan; then
5188 deplibs="$deplib $deplibs"
5189 else
5190 compile_deplibs="$deplib $compile_deplibs"
5191 finalize_deplibs="$deplib $finalize_deplibs"
5192 fi
5193 func_stripname '-L' '' "$deplib"
5194 newlib_search_path="$newlib_search_path $func_stripname_result"
5195 ;;
5196 *)
5197 func_warning "\`-L' is ignored for archives/objects"
5198 ;;
5199 esac # linkmode
5200 continue
5201 ;; # -L
5202 -R*)
5203 if test "$pass" = link; then
5204 func_stripname '-R' '' "$deplib"
5205 dir=$func_stripname_result
5206 # Make sure the xrpath contains only unique directories.
5207 case "$xrpath " in
5208 *" $dir "*) ;;
5209 *) xrpath="$xrpath $dir" ;;
5210 esac
5211 fi
5212 deplibs="$deplib $deplibs"
5213 continue
5214 ;;
5215 *.la) lib="$deplib" ;;
5216 *.$libext)
5217 if test "$pass" = conv; then
5218 deplibs="$deplib $deplibs"
5219 continue
5220 fi
5221 case $linkmode in
5222 lib)
5223 # Linking convenience modules into shared libraries is allowed,
5224 # but linking other static libraries is non-portable.
5225 case " $dlpreconveniencelibs " in
5226 *" $deplib "*) ;;
5227 *)
5228 valid_a_lib=no
5229 case $deplibs_check_method in
5230 match_pattern*)
5231 set dummy $deplibs_check_method; shift
5232 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
5233 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
5234 | $EGREP "$match_pattern_regex" > /dev/null; then
5235 valid_a_lib=yes
5236 fi
5237 ;;
5238 pass_all)
5239 valid_a_lib=yes
5240 ;;
5241 esac
5242 if test "$valid_a_lib" != yes; then
5243 $ECHO
5244 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
5245 $ECHO "*** I have the capability to make that library automatically link in when"
5246 $ECHO "*** you link to this library. But I can only do this if you have a"
5247 $ECHO "*** shared version of the library, which you do not appear to have"
5248 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
5249 $ECHO "*** that it is just a static archive that I should not use here."
5250 else
5251 $ECHO
5252 $ECHO "*** Warning: Linking the shared library $output against the"
5253 $ECHO "*** static library $deplib is not portable!"
5254 deplibs="$deplib $deplibs"
5255 fi
5256 ;;
5257 esac
5258 continue
5259 ;;
5260 prog)
5261 if test "$pass" != link; then
5262 deplibs="$deplib $deplibs"
5263 else
5264 compile_deplibs="$deplib $compile_deplibs"
5265 finalize_deplibs="$deplib $finalize_deplibs"
5266 fi
5267 continue
5268 ;;
5269 esac # linkmode
5270 ;; # *.$libext
5271 *.lo | *.$objext)
5272 if test "$pass" = conv; then
5273 deplibs="$deplib $deplibs"
5274 elif test "$linkmode" = prog; then
5275 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
5276 # If there is no dlopen support or we're linking statically,
5277 # we need to preload.
5278 newdlprefiles="$newdlprefiles $deplib"
5279 compile_deplibs="$deplib $compile_deplibs"
5280 finalize_deplibs="$deplib $finalize_deplibs"
5281 else
5282 newdlfiles="$newdlfiles $deplib"
5283 fi
5284 fi
5285 continue
5286 ;;
5287 %DEPLIBS%)
5288 alldeplibs=yes
5289 continue
5290 ;;
5291 esac # case $deplib
5292
5293 if test "$found" = yes || test -f "$lib"; then :
5294 else
5295 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
5296 fi
5297
5298 # Check to see that this really is a libtool archive.
5299 func_lalib_unsafe_p "$lib" \
5300 || func_fatal_error "\`$lib' is not a valid libtool archive"
5301
5302 func_dirname "$lib" "" "."
5303 ladir="$func_dirname_result"
5304
5305 dlname=
5306 dlopen=
5307 dlpreopen=
5308 libdir=
5309 library_names=
5310 old_library=
5311 inherited_linker_flags=
5312 # If the library was installed with an old release of libtool,
5313 # it will not redefine variables installed, or shouldnotlink
5314 installed=yes
5315 shouldnotlink=no
5316 avoidtemprpath=
5317
5318
5319 # Read the .la file
5320 func_source "$lib"
5321
5322 # Convert "-framework foo" to "foo.ltframework"
5323 if test -n "$inherited_linker_flags"; then
5324 tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
5325 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
5326 case " $new_inherited_linker_flags " in
5327 *" $tmp_inherited_linker_flag "*) ;;
5328 *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
5329 esac
5330 done
5331 fi
5332 dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
5333 if test "$linkmode,$pass" = "lib,link" ||
5334 test "$linkmode,$pass" = "prog,scan" ||
5335 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5336 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5337 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
5338 fi
5339
5340 if test "$pass" = conv; then
5341 # Only check for convenience libraries
5342 deplibs="$lib $deplibs"
5343 if test -z "$libdir"; then
5344 if test -z "$old_library"; then
5345 func_fatal_error "cannot find name of link library for \`$lib'"
5346 fi
5347 # It is a libtool convenience library, so add in its objects.
5348 convenience="$convenience $ladir/$objdir/$old_library"
5349 old_convenience="$old_convenience $ladir/$objdir/$old_library"
5350 tmp_libs=
5351 for deplib in $dependency_libs; do
5352 deplibs="$deplib $deplibs"
5353 if $opt_duplicate_deps ; then
5354 case "$tmp_libs " in
5355 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5356 esac
5357 fi
5358 tmp_libs="$tmp_libs $deplib"
5359 done
5360 elif test "$linkmode" != prog && test "$linkmode" != lib; then
5361 func_fatal_error "\`$lib' is not a convenience library"
5362 fi
5363 continue
5364 fi # $pass = conv
5365
5366
5367 # Get the name of the library we link against.
5368 linklib=
5369 for l in $old_library $library_names; do
5370 linklib="$l"
5371 done
5372 if test -z "$linklib"; then
5373 func_fatal_error "cannot find name of link library for \`$lib'"
5374 fi
5375
5376 # This library was specified with -dlopen.
5377 if test "$pass" = dlopen; then
5378 if test -z "$libdir"; then
5379 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
5380 fi
5381 if test -z "$dlname" ||
5382 test "$dlopen_support" != yes ||
5383 test "$build_libtool_libs" = no; then
5384 # If there is no dlname, no dlopen support or we're linking
5385 # statically, we need to preload. We also need to preload any
5386 # dependent libraries so libltdl's deplib preloader doesn't
5387 # bomb out in the load deplibs phase.
5388 dlprefiles="$dlprefiles $lib $dependency_libs"
5389 else
5390 newdlfiles="$newdlfiles $lib"
5391 fi
5392 continue
5393 fi # $pass = dlopen
5394
5395 # We need an absolute path.
5396 case $ladir in
5397 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
5398 *)
5399 abs_ladir=`cd "$ladir" && pwd`
5400 if test -z "$abs_ladir"; then
5401 func_warning "cannot determine absolute directory name of \`$ladir'"
5402 func_warning "passing it literally to the linker, although it might fail"
5403 abs_ladir="$ladir"
5404 fi
5405 ;;
5406 esac
5407 func_basename "$lib"
5408 laname="$func_basename_result"
5409
5410 # Find the relevant object directory and library name.
5411 if test "X$installed" = Xyes; then
5412 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5413 func_warning "library \`$lib' was moved."
5414 dir="$ladir"
5415 absdir="$abs_ladir"
5416 libdir="$abs_ladir"
5417 else
5418 dir="$libdir"
5419 absdir="$libdir"
5420 fi
5421 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
5422 else
5423 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5424 dir="$ladir"
5425 absdir="$abs_ladir"
5426 # Remove this search path later
5427 notinst_path="$notinst_path $abs_ladir"
5428 else
5429 dir="$ladir/$objdir"
5430 absdir="$abs_ladir/$objdir"
5431 # Remove this search path later
5432 notinst_path="$notinst_path $abs_ladir"
5433 fi
5434 fi # $installed = yes
5435 func_stripname 'lib' '.la' "$laname"
5436 name=$func_stripname_result
5437
5438 # This library was specified with -dlpreopen.
5439 if test "$pass" = dlpreopen; then
5440 if test -z "$libdir" && test "$linkmode" = prog; then
5441 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
5442 fi
5443 # Prefer using a static library (so that no silly _DYNAMIC symbols
5444 # are required to link).
5445 if test -n "$old_library"; then
5446 newdlprefiles="$newdlprefiles $dir/$old_library"
5447 # Keep a list of preopened convenience libraries to check
5448 # that they are being used correctly in the link pass.
5449 test -z "$libdir" && \
5450 dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5451 # Otherwise, use the dlname, so that lt_dlopen finds it.
5452 elif test -n "$dlname"; then
5453 newdlprefiles="$newdlprefiles $dir/$dlname"
5454 else
5455 newdlprefiles="$newdlprefiles $dir/$linklib"
5456 fi
5457 fi # $pass = dlpreopen
5458
5459 if test -z "$libdir"; then
5460 # Link the convenience library
5461 if test "$linkmode" = lib; then
5462 deplibs="$dir/$old_library $deplibs"
5463 elif test "$linkmode,$pass" = "prog,link"; then
5464 compile_deplibs="$dir/$old_library $compile_deplibs"
5465 finalize_deplibs="$dir/$old_library $finalize_deplibs"
5466 else
5467 deplibs="$lib $deplibs" # used for prog,scan pass
5468 fi
5469 continue
5470 fi
5471
5472
5473 if test "$linkmode" = prog && test "$pass" != link; then
5474 newlib_search_path="$newlib_search_path $ladir"
5475 deplibs="$lib $deplibs"
5476
5477 linkalldeplibs=no
5478 if test "$link_all_deplibs" != no || test -z "$library_names" ||
5479 test "$build_libtool_libs" = no; then
5480 linkalldeplibs=yes
5481 fi
5482
5483 tmp_libs=
5484 for deplib in $dependency_libs; do
5485 case $deplib in
5486 -L*) func_stripname '-L' '' "$deplib"
5487 newlib_search_path="$newlib_search_path $func_stripname_result"
5488 ;;
5489 esac
5490 # Need to link against all dependency_libs?
5491 if test "$linkalldeplibs" = yes; then
5492 deplibs="$deplib $deplibs"
5493 else
5494 # Need to hardcode shared library paths
5495 # or/and link against static libraries
5496 newdependency_libs="$deplib $newdependency_libs"
5497 fi
5498 if $opt_duplicate_deps ; then
5499 case "$tmp_libs " in
5500 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5501 esac
5502 fi
5503 tmp_libs="$tmp_libs $deplib"
5504 done # for deplib
5505 continue
5506 fi # $linkmode = prog...
5507
5508 if test "$linkmode,$pass" = "prog,link"; then
5509 if test -n "$library_names" &&
5510 { { test "$prefer_static_libs" = no ||
5511 test "$prefer_static_libs,$installed" = "built,yes"; } ||
5512 test -z "$old_library"; }; then
5513 # We need to hardcode the library path
5514 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
5515 # Make sure the rpath contains only unique directories.
5516 case "$temp_rpath:" in
5517 *"$absdir:"*) ;;
5518 *) temp_rpath="$temp_rpath$absdir:" ;;
5519 esac
5520 fi
5521
5522 # Hardcode the library path.
5523 # Skip directories that are in the system default run-time
5524 # search path.
5525 case " $sys_lib_dlsearch_path " in
5526 *" $absdir "*) ;;
5527 *)
5528 case "$compile_rpath " in
5529 *" $absdir "*) ;;
5530 *) compile_rpath="$compile_rpath $absdir"
5531 esac
5532 ;;
5533 esac
5534 case " $sys_lib_dlsearch_path " in
5535 *" $libdir "*) ;;
5536 *)
5537 case "$finalize_rpath " in
5538 *" $libdir "*) ;;
5539 *) finalize_rpath="$finalize_rpath $libdir"
5540 esac
5541 ;;
5542 esac
5543 fi # $linkmode,$pass = prog,link...
5544
5545 if test "$alldeplibs" = yes &&
5546 { test "$deplibs_check_method" = pass_all ||
5547 { test "$build_libtool_libs" = yes &&
5548 test -n "$library_names"; }; }; then
5549 # We only need to search for static libraries
5550 continue
5551 fi
5552 fi
5553
5554 link_static=no # Whether the deplib will be linked statically
5555 use_static_libs=$prefer_static_libs
5556 if test "$use_static_libs" = built && test "$installed" = yes; then
5557 use_static_libs=no
5558 fi
5559 if test -n "$library_names" &&
5560 { test "$use_static_libs" = no || test -z "$old_library"; }; then
5561 case $host in
5562 *cygwin* | *mingw* | *cegcc*)
5563 # No point in relinking DLLs because paths are not encoded
5564 notinst_deplibs="$notinst_deplibs $lib"
5565 need_relink=no
5566 ;;
5567 *)
5568 if test "$installed" = no; then
5569 notinst_deplibs="$notinst_deplibs $lib"
5570 need_relink=yes
5571 fi
5572 ;;
5573 esac
5574 # This is a shared library
5575
5576 # Warn about portability, can't link against -module's on some
5577 # systems (darwin). Don't bleat about dlopened modules though!
5578 dlopenmodule=""
5579 for dlpremoduletest in $dlprefiles; do
5580 if test "X$dlpremoduletest" = "X$lib"; then
5581 dlopenmodule="$dlpremoduletest"
5582 break
5583 fi
5584 done
5585 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5586 $ECHO
5587 if test "$linkmode" = prog; then
5588 $ECHO "*** Warning: Linking the executable $output against the loadable module"
5589 else
5590 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
5591 fi
5592 $ECHO "*** $linklib is not portable!"
5593 fi
5594 if test "$linkmode" = lib &&
5595 test "$hardcode_into_libs" = yes; then
5596 # Hardcode the library path.
5597 # Skip directories that are in the system default run-time
5598 # search path.
5599 case " $sys_lib_dlsearch_path " in
5600 *" $absdir "*) ;;
5601 *)
5602 case "$compile_rpath " in
5603 *" $absdir "*) ;;
5604 *) compile_rpath="$compile_rpath $absdir"
5605 esac
5606 ;;
5607 esac
5608 case " $sys_lib_dlsearch_path " in
5609 *" $libdir "*) ;;
5610 *)
5611 case "$finalize_rpath " in
5612 *" $libdir "*) ;;
5613 *) finalize_rpath="$finalize_rpath $libdir"
5614 esac
5615 ;;
5616 esac
5617 fi
5618
5619 if test -n "$old_archive_from_expsyms_cmds"; then
5620 # figure out the soname
5621 set dummy $library_names
5622 shift
5623 realname="$1"
5624 shift
5625 libname=`eval "\\$ECHO \"$libname_spec\""`
5626 # use dlname if we got it. it's perfectly good, no?
5627 if test -n "$dlname"; then
5628 soname="$dlname"
5629 elif test -n "$soname_spec"; then
5630 # bleh windows
5631 case $host in
5632 *cygwin* | mingw* | *cegcc*)
5633 func_arith $current - $age
5634 major=$func_arith_result
5635 versuffix="-$major"
5636 ;;
5637 esac
5638 eval soname=\"$soname_spec\"
5639 else
5640 soname="$realname"
5641 fi
5642
5643 # Make a new name for the extract_expsyms_cmds to use
5644 soroot="$soname"
5645 func_basename "$soroot"
5646 soname="$func_basename_result"
5647 func_stripname 'lib' '.dll' "$soname"
5648 newlib=libimp-$func_stripname_result.a
5649
5650 # If the library has no export list, then create one now
5651 if test -f "$output_objdir/$soname-def"; then :
5652 else
5653 func_verbose "extracting exported symbol list from \`$soname'"
5654 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
5655 fi
5656
5657 # Create $newlib
5658 if test -f "$output_objdir/$newlib"; then :; else
5659 func_verbose "generating import library for \`$soname'"
5660 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
5661 fi
5662 # make sure the library variables are pointing to the new library
5663 dir=$output_objdir
5664 linklib=$newlib
5665 fi # test -n "$old_archive_from_expsyms_cmds"
5666
5667 if test "$linkmode" = prog || test "$mode" != relink; then
5668 add_shlibpath=
5669 add_dir=
5670 add=
5671 lib_linked=yes
5672 case $hardcode_action in
5673 immediate | unsupported)
5674 if test "$hardcode_direct" = no; then
5675 add="$dir/$linklib"
5676 case $host in
5677 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
5678 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
5679 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
5680 *-*-unixware7*) add_dir="-L$dir" ;;
5681 *-*-darwin* )
5682 # if the lib is a (non-dlopened) module then we can not
5683 # link against it, someone is ignoring the earlier warnings
5684 if /usr/bin/file -L $add 2> /dev/null |
5685 $GREP ": [^:]* bundle" >/dev/null ; then
5686 if test "X$dlopenmodule" != "X$lib"; then
5687 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
5688 if test -z "$old_library" ; then
5689 $ECHO
5690 $ECHO "*** And there doesn't seem to be a static archive available"
5691 $ECHO "*** The link will probably fail, sorry"
5692 else
5693 add="$dir/$old_library"
5694 fi
5695 elif test -n "$old_library"; then
5696 add="$dir/$old_library"
5697 fi
5698 fi
5699 esac
5700 elif test "$hardcode_minus_L" = no; then
5701 case $host in
5702 *-*-sunos*) add_shlibpath="$dir" ;;
5703 esac
5704 add_dir="-L$dir"
5705 add="-l$name"
5706 elif test "$hardcode_shlibpath_var" = no; then
5707 add_shlibpath="$dir"
5708 add="-l$name"
5709 else
5710 lib_linked=no
5711 fi
5712 ;;
5713 relink)
5714 if test "$hardcode_direct" = yes &&
5715 test "$hardcode_direct_absolute" = no; then
5716 add="$dir/$linklib"
5717 elif test "$hardcode_minus_L" = yes; then
5718 add_dir="-L$dir"
5719 # Try looking first in the location we're being installed to.
5720 if test -n "$inst_prefix_dir"; then
5721 case $libdir in
5722 [\\/]*)
5723 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5724 ;;
5725 esac
5726 fi
5727 add="-l$name"
5728 elif test "$hardcode_shlibpath_var" = yes; then
5729 add_shlibpath="$dir"
5730 add="-l$name"
5731 else
5732 lib_linked=no
5733 fi
5734 ;;
5735 *) lib_linked=no ;;
5736 esac
5737
5738 if test "$lib_linked" != yes; then
5739 func_fatal_configuration "unsupported hardcode properties"
5740 fi
5741
5742 if test -n "$add_shlibpath"; then
5743 case :$compile_shlibpath: in
5744 *":$add_shlibpath:"*) ;;
5745 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
5746 esac
5747 fi
5748 if test "$linkmode" = prog; then
5749 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
5750 test -n "$add" && compile_deplibs="$add $compile_deplibs"
5751 else
5752 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5753 test -n "$add" && deplibs="$add $deplibs"
5754 if test "$hardcode_direct" != yes &&
5755 test "$hardcode_minus_L" != yes &&
5756 test "$hardcode_shlibpath_var" = yes; then
5757 case :$finalize_shlibpath: in
5758 *":$libdir:"*) ;;
5759 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5760 esac
5761 fi
5762 fi
5763 fi
5764
5765 if test "$linkmode" = prog || test "$mode" = relink; then
5766 add_shlibpath=
5767 add_dir=
5768 add=
5769 # Finalize command for both is simple: just hardcode it.
5770 if test "$hardcode_direct" = yes &&
5771 test "$hardcode_direct_absolute" = no; then
5772 add="$libdir/$linklib"
5773 elif test "$hardcode_minus_L" = yes; then
5774 add_dir="-L$libdir"
5775 add="-l$name"
5776 elif test "$hardcode_shlibpath_var" = yes; then
5777 case :$finalize_shlibpath: in
5778 *":$libdir:"*) ;;
5779 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
5780 esac
5781 add="-l$name"
5782 elif test "$hardcode_automatic" = yes; then
5783 if test -n "$inst_prefix_dir" &&
5784 test -f "$inst_prefix_dir$libdir/$linklib" ; then
5785 add="$inst_prefix_dir$libdir/$linklib"
5786 else
5787 add="$libdir/$linklib"
5788 fi
5789 else
5790 # We cannot seem to hardcode it, guess we'll fake it.
5791 add_dir="-L$libdir"
5792 # Try looking first in the location we're being installed to.
5793 if test -n "$inst_prefix_dir"; then
5794 case $libdir in
5795 [\\/]*)
5796 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5797 ;;
5798 esac
5799 fi
5800 add="-l$name"
5801 fi
5802
5803 if test "$linkmode" = prog; then
5804 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
5805 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
5806 else
5807 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5808 test -n "$add" && deplibs="$add $deplibs"
5809 fi
5810 fi
5811 elif test "$linkmode" = prog; then
5812 # Here we assume that one of hardcode_direct or hardcode_minus_L
5813 # is not unsupported. This is valid on all known static and
5814 # shared platforms.
5815 if test "$hardcode_direct" != unsupported; then
5816 test -n "$old_library" && linklib="$old_library"
5817 compile_deplibs="$dir/$linklib $compile_deplibs"
5818 finalize_deplibs="$dir/$linklib $finalize_deplibs"
5819 else
5820 compile_deplibs="-l$name -L$dir $compile_deplibs"
5821 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
5822 fi
5823 elif test "$build_libtool_libs" = yes; then
5824 # Not a shared library
5825 if test "$deplibs_check_method" != pass_all; then
5826 # We're trying link a shared library against a static one
5827 # but the system doesn't support it.
5828
5829 # Just print a warning and add the library to dependency_libs so
5830 # that the program can be linked against the static library.
5831 $ECHO
5832 $ECHO "*** Warning: This system can not link to static lib archive $lib."
5833 $ECHO "*** I have the capability to make that library automatically link in when"
5834 $ECHO "*** you link to this library. But I can only do this if you have a"
5835 $ECHO "*** shared version of the library, which you do not appear to have."
5836 if test "$module" = yes; then
5837 $ECHO "*** But as you try to build a module library, libtool will still create "
5838 $ECHO "*** a static module, that should work as long as the dlopening application"
5839 $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
5840 if test -z "$global_symbol_pipe"; then
5841 $ECHO
5842 $ECHO "*** However, this would only work if libtool was able to extract symbol"
5843 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5844 $ECHO "*** not find such a program. So, this module is probably useless."
5845 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
5846 fi
5847 if test "$build_old_libs" = no; then
5848 build_libtool_libs=module
5849 build_old_libs=yes
5850 else
5851 build_libtool_libs=no
5852 fi
5853 fi
5854 else
5855 deplibs="$dir/$old_library $deplibs"
5856 link_static=yes
5857 fi
5858 fi # link shared/static library?
5859
5860 if test "$linkmode" = lib; then
5861 if test -n "$dependency_libs" &&
5862 { test "$hardcode_into_libs" != yes ||
5863 test "$build_old_libs" = yes ||
5864 test "$link_static" = yes; }; then
5865 # Extract -R from dependency_libs
5866 temp_deplibs=
5867 for libdir in $dependency_libs; do
5868 case $libdir in
5869 -R*) func_stripname '-R' '' "$libdir"
5870 temp_xrpath=$func_stripname_result
5871 case " $xrpath " in
5872 *" $temp_xrpath "*) ;;
5873 *) xrpath="$xrpath $temp_xrpath";;
5874 esac;;
5875 *) temp_deplibs="$temp_deplibs $libdir";;
5876 esac
5877 done
5878 dependency_libs="$temp_deplibs"
5879 fi
5880
5881 newlib_search_path="$newlib_search_path $absdir"
5882 # Link against this library
5883 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
5884 # ... and its dependency_libs
5885 tmp_libs=
5886 for deplib in $dependency_libs; do
5887 newdependency_libs="$deplib $newdependency_libs"
5888 if $opt_duplicate_deps ; then
5889 case "$tmp_libs " in
5890 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5891 esac
5892 fi
5893 tmp_libs="$tmp_libs $deplib"
5894 done
5895
5896 if test "$link_all_deplibs" != no; then
5897 # Add the search paths of all dependency libraries
5898 for deplib in $dependency_libs; do
5899 path=
5900 case $deplib in
5901 -L*) path="$deplib" ;;
5902 *.la)
5903 func_dirname "$deplib" "" "."
5904 dir="$func_dirname_result"
5905 # We need an absolute path.
5906 case $dir in
5907 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
5908 *)
5909 absdir=`cd "$dir" && pwd`
5910 if test -z "$absdir"; then
5911 func_warning "cannot determine absolute directory name of \`$dir'"
5912 absdir="$dir"
5913 fi
5914 ;;
5915 esac
5916 if $GREP "^installed=no" $deplib > /dev/null; then
5917 case $host in
5918 *-*-darwin*)
5919 depdepl=
5920 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
5921 if test -n "$deplibrary_names" ; then
5922 for tmp in $deplibrary_names ; do
5923 depdepl=$tmp
5924 done
5925 if test -f "$absdir/$objdir/$depdepl" ; then
5926 depdepl="$absdir/$objdir/$depdepl"
5927 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5928 if test -z "$darwin_install_name"; then
5929 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5930 fi
5931 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5932 linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
5933 path=
5934 fi
5935 fi
5936 ;;
5937 *)
5938 path="-L$absdir/$objdir"
5939 ;;
5940 esac
5941 else
5942 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5943 test -z "$libdir" && \
5944 func_fatal_error "\`$deplib' is not a valid libtool archive"
5945 test "$absdir" != "$libdir" && \
5946 func_warning "\`$deplib' seems to be moved"
5947
5948 path="-L$absdir"
5949 fi
5950 ;;
5951 esac
5952 case " $deplibs " in
5953 *" $path "*) ;;
5954 *) deplibs="$path $deplibs" ;;
5955 esac
5956 done
5957 fi # link_all_deplibs != no
5958 fi # linkmode = lib
5959 done # for deplib in $libs
5960 if test "$pass" = link; then
5961 if test "$linkmode" = "prog"; then
5962 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
5963 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
5964 else
5965 compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
5966 fi
5967 fi
5968 dependency_libs="$newdependency_libs"
5969 if test "$pass" = dlpreopen; then
5970 # Link the dlpreopened libraries before other libraries
5971 for deplib in $save_deplibs; do
5972 deplibs="$deplib $deplibs"
5973 done
5974 fi
5975 if test "$pass" != dlopen; then
5976 if test "$pass" != conv; then
5977 # Make sure lib_search_path contains only unique directories.
5978 lib_search_path=
5979 for dir in $newlib_search_path; do
5980 case "$lib_search_path " in
5981 *" $dir "*) ;;
5982 *) lib_search_path="$lib_search_path $dir" ;;
5983 esac
5984 done
5985 newlib_search_path=
5986 fi
5987
5988 if test "$linkmode,$pass" != "prog,link"; then
5989 vars="deplibs"
5990 else
5991 vars="compile_deplibs finalize_deplibs"
5992 fi
5993 for var in $vars dependency_libs; do
5994 # Add libraries to $var in reverse order
5995 eval tmp_libs=\"\$$var\"
5996 new_libs=
5997 for deplib in $tmp_libs; do
5998 # FIXME: Pedantically, this is the right thing to do, so
5999 # that some nasty dependency loop isn't accidentally
6000 # broken:
6001 #new_libs="$deplib $new_libs"
6002 # Pragmatically, this seems to cause very few problems in
6003 # practice:
6004 case $deplib in
6005 -L*) new_libs="$deplib $new_libs" ;;
6006 -R*) ;;
6007 *)
6008 # And here is the reason: when a library appears more
6009 # than once as an explicit dependence of a library, or
6010 # is implicitly linked in more than once by the
6011 # compiler, it is considered special, and multiple
6012 # occurrences thereof are not removed. Compare this
6013 # with having the same library being listed as a
6014 # dependency of multiple other libraries: in this case,
6015 # we know (pedantically, we assume) the library does not
6016 # need to be listed more than once, so we keep only the
6017 # last copy. This is not always right, but it is rare
6018 # enough that we require users that really mean to play
6019 # such unportable linking tricks to link the library
6020 # using -Wl,-lname, so that libtool does not consider it
6021 # for duplicate removal.
6022 case " $specialdeplibs " in
6023 *" $deplib "*) new_libs="$deplib $new_libs" ;;
6024 *)
6025 case " $new_libs " in
6026 *" $deplib "*) ;;
6027 *) new_libs="$deplib $new_libs" ;;
6028 esac
6029 ;;
6030 esac
6031 ;;
6032 esac
6033 done
6034 tmp_libs=
6035 for deplib in $new_libs; do
6036 case $deplib in
6037 -L*)
6038 case " $tmp_libs " in
6039 *" $deplib "*) ;;
6040 *) tmp_libs="$tmp_libs $deplib" ;;
6041 esac
6042 ;;
6043 *) tmp_libs="$tmp_libs $deplib" ;;
6044 esac
6045 done
6046 eval $var=\"$tmp_libs\"
6047 done # for var
6048 fi
6049 # Last step: remove runtime libs from dependency_libs
6050 # (they stay in deplibs)
6051 tmp_libs=
6052 for i in $dependency_libs ; do
6053 case " $predeps $postdeps $compiler_lib_search_path " in
6054 *" $i "*)
6055 i=""
6056 ;;
6057 esac
6058 if test -n "$i" ; then
6059 tmp_libs="$tmp_libs $i"
6060 fi
6061 done
6062 dependency_libs=$tmp_libs
6063 done # for pass
6064 if test "$linkmode" = prog; then
6065 dlfiles="$newdlfiles"
6066 fi
6067 if test "$linkmode" = prog || test "$linkmode" = lib; then
6068 dlprefiles="$newdlprefiles"
6069 fi
6070
6071 case $linkmode in
6072 oldlib)
6073 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
6074 func_warning "\`-dlopen' is ignored for archives"
6075 fi
6076
6077 case " $deplibs" in
6078 *\ -l* | *\ -L*)
6079 func_warning "\`-l' and \`-L' are ignored for archives" ;;
6080 esac
6081
6082 test -n "$rpath" && \
6083 func_warning "\`-rpath' is ignored for archives"
6084
6085 test -n "$xrpath" && \
6086 func_warning "\`-R' is ignored for archives"
6087
6088 test -n "$vinfo" && \
6089 func_warning "\`-version-info/-version-number' is ignored for archives"
6090
6091 test -n "$release" && \
6092 func_warning "\`-release' is ignored for archives"
6093
6094 test -n "$export_symbols$export_symbols_regex" && \
6095 func_warning "\`-export-symbols' is ignored for archives"
6096
6097 # Now set the variables for building old libraries.
6098 build_libtool_libs=no
6099 oldlibs="$output"
6100 objs="$objs$old_deplibs"
6101 ;;
6102
6103 lib)
6104 # Make sure we only generate libraries of the form `libNAME.la'.
6105 case $outputname in
6106 lib*)
6107 func_stripname 'lib' '.la' "$outputname"
6108 name=$func_stripname_result
6109 eval shared_ext=\"$shrext_cmds\"
6110 eval libname=\"$libname_spec\"
6111 ;;
6112 *)
6113 test "$module" = no && \
6114 func_fatal_help "libtool library \`$output' must begin with \`lib'"
6115
6116 if test "$need_lib_prefix" != no; then
6117 # Add the "lib" prefix for modules if required
6118 func_stripname '' '.la' "$outputname"
6119 name=$func_stripname_result
6120 eval shared_ext=\"$shrext_cmds\"
6121 eval libname=\"$libname_spec\"
6122 else
6123 func_stripname '' '.la' "$outputname"
6124 libname=$func_stripname_result
6125 fi
6126 ;;
6127 esac
6128
6129 if test -n "$objs"; then
6130 if test "$deplibs_check_method" != pass_all; then
6131 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
6132 else
6133 $ECHO
6134 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
6135 $ECHO "*** objects $objs is not portable!"
6136 libobjs="$libobjs $objs"
6137 fi
6138 fi
6139
6140 test "$dlself" != no && \
6141 func_warning "\`-dlopen self' is ignored for libtool libraries"
6142
6143 set dummy $rpath
6144 shift
6145 test "$#" -gt 1 && \
6146 func_warning "ignoring multiple \`-rpath's for a libtool library"
6147
6148 install_libdir="$1"
6149
6150 oldlibs=
6151 if test -z "$rpath"; then
6152 if test "$build_libtool_libs" = yes; then
6153 # Building a libtool convenience library.
6154 # Some compilers have problems with a `.al' extension so
6155 # convenience libraries should have the same extension an
6156 # archive normally would.
6157 oldlibs="$output_objdir/$libname.$libext $oldlibs"
6158 build_libtool_libs=convenience
6159 build_old_libs=yes
6160 fi
6161
6162 test -n "$vinfo" && \
6163 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
6164
6165 test -n "$release" && \
6166 func_warning "\`-release' is ignored for convenience libraries"
6167 else
6168
6169 # Parse the version information argument.
6170 save_ifs="$IFS"; IFS=':'
6171 set dummy $vinfo 0 0 0
6172 shift
6173 IFS="$save_ifs"
6174
6175 test -n "$7" && \
6176 func_fatal_help "too many parameters to \`-version-info'"
6177
6178 # convert absolute version numbers to libtool ages
6179 # this retains compatibility with .la files and attempts
6180 # to make the code below a bit more comprehensible
6181
6182 case $vinfo_number in
6183 yes)
6184 number_major="$1"
6185 number_minor="$2"
6186 number_revision="$3"
6187 #
6188 # There are really only two kinds -- those that
6189 # use the current revision as the major version
6190 # and those that subtract age and use age as
6191 # a minor version. But, then there is irix
6192 # which has an extra 1 added just for fun
6193 #
6194 case $version_type in
6195 darwin|linux|osf|windows|none)
6196 func_arith $number_major + $number_minor
6197 current=$func_arith_result
6198 age="$number_minor"
6199 revision="$number_revision"
6200 ;;
6201 freebsd-aout|freebsd-elf|sunos)
6202 current="$number_major"
6203 revision="$number_minor"
6204 age="0"
6205 ;;
6206 irix|nonstopux)
6207 func_arith $number_major + $number_minor
6208 current=$func_arith_result
6209 age="$number_minor"
6210 revision="$number_minor"
6211 lt_irix_increment=no
6212 ;;
6213 *)
6214 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
6215 ;;
6216 esac
6217 ;;
6218 no)
6219 current="$1"
6220 revision="$2"
6221 age="$3"
6222 ;;
6223 esac
6224
6225 # Check that each of the things are valid numbers.
6226 case $current in
6227 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]) ;;
6228 *)
6229 func_error "CURRENT \`$current' must be a nonnegative integer"
6230 func_fatal_error "\`$vinfo' is not valid version information"
6231 ;;
6232 esac
6233
6234 case $revision in
6235 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]) ;;
6236 *)
6237 func_error "REVISION \`$revision' must be a nonnegative integer"
6238 func_fatal_error "\`$vinfo' is not valid version information"
6239 ;;
6240 esac
6241
6242 case $age in
6243 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]) ;;
6244 *)
6245 func_error "AGE \`$age' must be a nonnegative integer"
6246 func_fatal_error "\`$vinfo' is not valid version information"
6247 ;;
6248 esac
6249
6250 if test "$age" -gt "$current"; then
6251 func_error "AGE \`$age' is greater than the current interface number \`$current'"
6252 func_fatal_error "\`$vinfo' is not valid version information"
6253 fi
6254
6255 # Calculate the version variables.
6256 major=
6257 versuffix=
6258 verstring=
6259 case $version_type in
6260 none) ;;
6261
6262 darwin)
6263 # Like Linux, but with the current version available in
6264 # verstring for coding it into the library header
6265 func_arith $current - $age
6266 major=.$func_arith_result
6267 versuffix="$major.$age.$revision"
6268 # Darwin ld doesn't like 0 for these options...
6269 func_arith $current + 1
6270 minor_current=$func_arith_result
6271 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
6272 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
6273 ;;
6274
6275 freebsd-aout)
6276 major=".$current"
6277 versuffix=".$current.$revision";
6278 ;;
6279
6280 freebsd-elf)
6281 major=".$current"
6282 versuffix=".$current"
6283 ;;
6284
6285 irix | nonstopux)
6286 if test "X$lt_irix_increment" = "Xno"; then
6287 func_arith $current - $age
6288 else
6289 func_arith $current - $age + 1
6290 fi
6291 major=$func_arith_result
6292
6293 case $version_type in
6294 nonstopux) verstring_prefix=nonstopux ;;
6295 *) verstring_prefix=sgi ;;
6296 esac
6297 verstring="$verstring_prefix$major.$revision"
6298
6299 # Add in all the interfaces that we are compatible with.
6300 loop=$revision
6301 while test "$loop" -ne 0; do
6302 func_arith $revision - $loop
6303 iface=$func_arith_result
6304 func_arith $loop - 1
6305 loop=$func_arith_result
6306 verstring="$verstring_prefix$major.$iface:$verstring"
6307 done
6308
6309 # Before this point, $major must not contain `.'.
6310 major=.$major
6311 versuffix="$major.$revision"
6312 ;;
6313
6314 linux)
6315 func_arith $current - $age
6316 major=.$func_arith_result
6317 versuffix="$major.$age.$revision"
6318 ;;
6319
6320 osf)
6321 func_arith $current - $age
6322 major=.$func_arith_result
6323 versuffix=".$current.$age.$revision"
6324 verstring="$current.$age.$revision"
6325
6326 # Add in all the interfaces that we are compatible with.
6327 loop=$age
6328 while test "$loop" -ne 0; do
6329 func_arith $current - $loop
6330 iface=$func_arith_result
6331 func_arith $loop - 1
6332 loop=$func_arith_result
6333 verstring="$verstring:${iface}.0"
6334 done
6335
6336 # Make executables depend on our current version.
6337 verstring="$verstring:${current}.0"
6338 ;;
6339
6340 qnx)
6341 major=".$current"
6342 versuffix=".$current"
6343 ;;
6344
6345 sunos)
6346 major=".$current"
6347 versuffix=".$current.$revision"
6348 ;;
6349
6350 windows)
6351 # Use '-' rather than '.', since we only want one
6352 # extension on DOS 8.3 filesystems.
6353 func_arith $current - $age
6354 major=$func_arith_result
6355 versuffix="-$major"
6356 ;;
6357
6358 *)
6359 func_fatal_configuration "unknown library version type \`$version_type'"
6360 ;;
6361 esac
6362
6363 # Clear the version info if we defaulted, and they specified a release.
6364 if test -z "$vinfo" && test -n "$release"; then
6365 major=
6366 case $version_type in
6367 darwin)
6368 # we can't check for "0.0" in archive_cmds due to quoting
6369 # problems, so we reset it completely
6370 verstring=
6371 ;;
6372 *)
6373 verstring="0.0"
6374 ;;
6375 esac
6376 if test "$need_version" = no; then
6377 versuffix=
6378 else
6379 versuffix=".0.0"
6380 fi
6381 fi
6382
6383 # Remove version info from name if versioning should be avoided
6384 if test "$avoid_version" = yes && test "$need_version" = no; then
6385 major=
6386 versuffix=
6387 verstring=""
6388 fi
6389
6390 # Check to see if the archive will have undefined symbols.
6391 if test "$allow_undefined" = yes; then
6392 if test "$allow_undefined_flag" = unsupported; then
6393 func_warning "undefined symbols not allowed in $host shared libraries"
6394 build_libtool_libs=no
6395 build_old_libs=yes
6396 fi
6397 else
6398 # Don't allow undefined symbols.
6399 allow_undefined_flag="$no_undefined_flag"
6400 fi
6401
6402 fi
6403
6404 func_generate_dlsyms "$libname" "$libname" "yes"
6405 libobjs="$libobjs $symfileobj"
6406 test "X$libobjs" = "X " && libobjs=
6407
6408 if test "$mode" != relink; then
6409 # Remove our outputs, but don't remove object files since they
6410 # may have been created when compiling PIC objects.
6411 removelist=
6412 tempremovelist=`$ECHO "$output_objdir/*"`
6413 for p in $tempremovelist; do
6414 case $p in
6415 *.$objext | *.gcno)
6416 ;;
6417 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
6418 if test "X$precious_files_regex" != "X"; then
6419 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
6420 then
6421 continue
6422 fi
6423 fi
6424 removelist="$removelist $p"
6425 ;;
6426 *) ;;
6427 esac
6428 done
6429 test -n "$removelist" && \
6430 func_show_eval "${RM}r \$removelist"
6431 fi
6432
6433 # Now set the variables for building old libraries.
6434 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
6435 oldlibs="$oldlibs $output_objdir/$libname.$libext"
6436
6437 # Transform .lo files to .o files.
6438 oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
6439 fi
6440
6441 # Eliminate all temporary directories.
6442 #for path in $notinst_path; do
6443 # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6444 # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6445 # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
6446 #done
6447
6448 if test -n "$xrpath"; then
6449 # If the user specified any rpath flags, then add them.
6450 temp_xrpath=
6451 for libdir in $xrpath; do
6452 temp_xrpath="$temp_xrpath -R$libdir"
6453 case "$finalize_rpath " in
6454 *" $libdir "*) ;;
6455 *) finalize_rpath="$finalize_rpath $libdir" ;;
6456 esac
6457 done
6458 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
6459 dependency_libs="$temp_xrpath $dependency_libs"
6460 fi
6461 fi
6462
6463 # Make sure dlfiles contains only unique files that won't be dlpreopened
6464 old_dlfiles="$dlfiles"
6465 dlfiles=
6466 for lib in $old_dlfiles; do
6467 case " $dlprefiles $dlfiles " in
6468 *" $lib "*) ;;
6469 *) dlfiles="$dlfiles $lib" ;;
6470 esac
6471 done
6472
6473 # Make sure dlprefiles contains only unique files
6474 old_dlprefiles="$dlprefiles"
6475 dlprefiles=
6476 for lib in $old_dlprefiles; do
6477 case "$dlprefiles " in
6478 *" $lib "*) ;;
6479 *) dlprefiles="$dlprefiles $lib" ;;
6480 esac
6481 done
6482
6483 if test "$build_libtool_libs" = yes; then
6484 if test -n "$rpath"; then
6485 case $host in
6486 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
6487 # these systems don't actually have a c library (as such)!
6488 ;;
6489 *-*-rhapsody* | *-*-darwin1.[012])
6490 # Rhapsody C library is in the System framework
6491 deplibs="$deplibs System.ltframework"
6492 ;;
6493 *-*-netbsd*)
6494 # Don't link with libc until the a.out ld.so is fixed.
6495 ;;
6496 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
6497 # Do not include libc due to us having libc/libc_r.
6498 ;;
6499 *-*-sco3.2v5* | *-*-sco5v6*)
6500 # Causes problems with __ctype
6501 ;;
6502 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
6503 # Compiler inserts libc in the correct place for threads to work
6504 ;;
6505 *)
6506 # Add libc to deplibs on all other systems if necessary.
6507 if test "$build_libtool_need_lc" = "yes"; then
6508 deplibs="$deplibs -lc"
6509 fi
6510 ;;
6511 esac
6512 fi
6513
6514 # Transform deplibs into only deplibs that can be linked in shared.
6515 name_save=$name
6516 libname_save=$libname
6517 release_save=$release
6518 versuffix_save=$versuffix
6519 major_save=$major
6520 # I'm not sure if I'm treating the release correctly. I think
6521 # release should show up in the -l (ie -lgmp5) so we don't want to
6522 # add it in twice. Is that correct?
6523 release=""
6524 versuffix=""
6525 major=""
6526 newdeplibs=
6527 droppeddeps=no
6528 case $deplibs_check_method in
6529 pass_all)
6530 # Don't check for shared/static. Everything works.
6531 # This might be a little naive. We might want to check
6532 # whether the library exists or not. But this is on
6533 # osf3 & osf4 and I'm not really sure... Just
6534 # implementing what was already the behavior.
6535 newdeplibs=$deplibs
6536 ;;
6537 test_compile)
6538 # This code stresses the "libraries are programs" paradigm to its
6539 # limits. Maybe even breaks it. We compile a program, linking it
6540 # against the deplibs as a proxy for the library. Then we can check
6541 # whether they linked in statically or dynamically with ldd.
6542 $opt_dry_run || $RM conftest.c
6543 cat > conftest.c <<EOF
6544 int main() { return 0; }
6545EOF
6546 $opt_dry_run || $RM conftest
6547 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
6548 ldd_output=`ldd conftest`
6549 for i in $deplibs; do
6550 case $i in
6551 -l*)
6552 func_stripname -l '' "$i"
6553 name=$func_stripname_result
6554 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6555 case " $predeps $postdeps " in
6556 *" $i "*)
6557 newdeplibs="$newdeplibs $i"
6558 i=""
6559 ;;
6560 esac
6561 fi
6562 if test -n "$i" ; then
6563 libname=`eval "\\$ECHO \"$libname_spec\""`
6564 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6565 set dummy $deplib_matches; shift
6566 deplib_match=$1
6567 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6568 newdeplibs="$newdeplibs $i"
6569 else
6570 droppeddeps=yes
6571 $ECHO
6572 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6573 $ECHO "*** I have the capability to make that library automatically link in when"
6574 $ECHO "*** you link to this library. But I can only do this if you have a"
6575 $ECHO "*** shared version of the library, which I believe you do not have"
6576 $ECHO "*** because a test_compile did reveal that the linker did not use it for"
6577 $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
6578 fi
6579 fi
6580 ;;
6581 *)
6582 newdeplibs="$newdeplibs $i"
6583 ;;
6584 esac
6585 done
6586 else
6587 # Error occurred in the first compile. Let's try to salvage
6588 # the situation: Compile a separate program for each library.
6589 for i in $deplibs; do
6590 case $i in
6591 -l*)
6592 func_stripname -l '' "$i"
6593 name=$func_stripname_result
6594 $opt_dry_run || $RM conftest
6595 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
6596 ldd_output=`ldd conftest`
6597 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6598 case " $predeps $postdeps " in
6599 *" $i "*)
6600 newdeplibs="$newdeplibs $i"
6601 i=""
6602 ;;
6603 esac
6604 fi
6605 if test -n "$i" ; then
6606 libname=`eval "\\$ECHO \"$libname_spec\""`
6607 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
6608 set dummy $deplib_matches; shift
6609 deplib_match=$1
6610 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6611 newdeplibs="$newdeplibs $i"
6612 else
6613 droppeddeps=yes
6614 $ECHO
6615 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6616 $ECHO "*** I have the capability to make that library automatically link in when"
6617 $ECHO "*** you link to this library. But I can only do this if you have a"
6618 $ECHO "*** shared version of the library, which you do not appear to have"
6619 $ECHO "*** because a test_compile did reveal that the linker did not use this one"
6620 $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
6621 fi
6622 fi
6623 else
6624 droppeddeps=yes
6625 $ECHO
6626 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6627 $ECHO "*** make it link in! You will probably need to install it or some"
6628 $ECHO "*** library that it depends on before this library will be fully"
6629 $ECHO "*** functional. Installing it before continuing would be even better."
6630 fi
6631 ;;
6632 *)
6633 newdeplibs="$newdeplibs $i"
6634 ;;
6635 esac
6636 done
6637 fi
6638 ;;
6639 file_magic*)
6640 set dummy $deplibs_check_method; shift
6641 file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6642 for a_deplib in $deplibs; do
6643 case $a_deplib in
6644 -l*)
6645 func_stripname -l '' "$a_deplib"
6646 name=$func_stripname_result
6647 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6648 case " $predeps $postdeps " in
6649 *" $a_deplib "*)
6650 newdeplibs="$newdeplibs $a_deplib"
6651 a_deplib=""
6652 ;;
6653 esac
6654 fi
6655 if test -n "$a_deplib" ; then
6656 libname=`eval "\\$ECHO \"$libname_spec\""`
6657 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6658 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6659 for potent_lib in $potential_libs; do
6660 # Follow soft links.
6661 if ls -lLd "$potent_lib" 2>/dev/null |
6662 $GREP " -> " >/dev/null; then
6663 continue
6664 fi
6665 # The statement above tries to avoid entering an
6666 # endless loop below, in case of cyclic links.
6667 # We might still enter an endless loop, since a link
6668 # loop can be closed while we follow links,
6669 # but so what?
6670 potlib="$potent_lib"
6671 while test -h "$potlib" 2>/dev/null; do
6672 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
6673 case $potliblink in
6674 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6675 *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
6676 esac
6677 done
6678 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
6679 $SED -e 10q |
6680 $EGREP "$file_magic_regex" > /dev/null; then
6681 newdeplibs="$newdeplibs $a_deplib"
6682 a_deplib=""
6683 break 2
6684 fi
6685 done
6686 done
6687 fi
6688 if test -n "$a_deplib" ; then
6689 droppeddeps=yes
6690 $ECHO
6691 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6692 $ECHO "*** I have the capability to make that library automatically link in when"
6693 $ECHO "*** you link to this library. But I can only do this if you have a"
6694 $ECHO "*** shared version of the library, which you do not appear to have"
6695 $ECHO "*** because I did check the linker path looking for a file starting"
6696 if test -z "$potlib" ; then
6697 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
6698 else
6699 $ECHO "*** with $libname and none of the candidates passed a file format test"
6700 $ECHO "*** using a file magic. Last file checked: $potlib"
6701 fi
6702 fi
6703 ;;
6704 *)
6705 # Add a -L argument.
6706 newdeplibs="$newdeplibs $a_deplib"
6707 ;;
6708 esac
6709 done # Gone through all deplibs.
6710 ;;
6711 match_pattern*)
6712 set dummy $deplibs_check_method; shift
6713 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
6714 for a_deplib in $deplibs; do
6715 case $a_deplib in
6716 -l*)
6717 func_stripname -l '' "$a_deplib"
6718 name=$func_stripname_result
6719 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6720 case " $predeps $postdeps " in
6721 *" $a_deplib "*)
6722 newdeplibs="$newdeplibs $a_deplib"
6723 a_deplib=""
6724 ;;
6725 esac
6726 fi
6727 if test -n "$a_deplib" ; then
6728 libname=`eval "\\$ECHO \"$libname_spec\""`
6729 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6730 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6731 for potent_lib in $potential_libs; do
6732 potlib="$potent_lib" # see symlink-check above in file_magic test
6733 if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
6734 $EGREP "$match_pattern_regex" > /dev/null; then
6735 newdeplibs="$newdeplibs $a_deplib"
6736 a_deplib=""
6737 break 2
6738 fi
6739 done
6740 done
6741 fi
6742 if test -n "$a_deplib" ; then
6743 droppeddeps=yes
6744 $ECHO
6745 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6746 $ECHO "*** I have the capability to make that library automatically link in when"
6747 $ECHO "*** you link to this library. But I can only do this if you have a"
6748 $ECHO "*** shared version of the library, which you do not appear to have"
6749 $ECHO "*** because I did check the linker path looking for a file starting"
6750 if test -z "$potlib" ; then
6751 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
6752 else
6753 $ECHO "*** with $libname and none of the candidates passed a file format test"
6754 $ECHO "*** using a regex pattern. Last file checked: $potlib"
6755 fi
6756 fi
6757 ;;
6758 *)
6759 # Add a -L argument.
6760 newdeplibs="$newdeplibs $a_deplib"
6761 ;;
6762 esac
6763 done # Gone through all deplibs.
6764 ;;
6765 none | unknown | *)
6766 newdeplibs=""
6767 tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6768 -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
6769 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6770 for i in $predeps $postdeps ; do
6771 # can't use Xsed below, because $i might contain '/'
6772 tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
6773 done
6774 fi
6775 if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6776 $GREP . >/dev/null; then
6777 $ECHO
6778 if test "X$deplibs_check_method" = "Xnone"; then
6779 $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
6780 else
6781 $ECHO "*** Warning: inter-library dependencies are not known to be supported."
6782 fi
6783 $ECHO "*** All declared inter-library dependencies are being dropped."
6784 droppeddeps=yes
6785 fi
6786 ;;
6787 esac
6788 versuffix=$versuffix_save
6789 major=$major_save
6790 release=$release_save
6791 libname=$libname_save
6792 name=$name_save
6793
6794 case $host in
6795 *-*-rhapsody* | *-*-darwin1.[012])
6796 # On Rhapsody replace the C library with the System framework
6797 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
6798 ;;
6799 esac
6800
6801 if test "$droppeddeps" = yes; then
6802 if test "$module" = yes; then
6803 $ECHO
6804 $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
6805 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6806 $ECHO "*** a static module, that should work as long as the dlopening"
6807 $ECHO "*** application is linked with the -dlopen flag."
6808 if test -z "$global_symbol_pipe"; then
6809 $ECHO
6810 $ECHO "*** However, this would only work if libtool was able to extract symbol"
6811 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6812 $ECHO "*** not find such a program. So, this module is probably useless."
6813 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6814 fi
6815 if test "$build_old_libs" = no; then
6816 oldlibs="$output_objdir/$libname.$libext"
6817 build_libtool_libs=module
6818 build_old_libs=yes
6819 else
6820 build_libtool_libs=no
6821 fi
6822 else
6823 $ECHO "*** The inter-library dependencies that have been dropped here will be"
6824 $ECHO "*** automatically added whenever a program is linked with this library"
6825 $ECHO "*** or is declared to -dlopen it."
6826
6827 if test "$allow_undefined" = no; then
6828 $ECHO
6829 $ECHO "*** Since this library must not contain undefined symbols,"
6830 $ECHO "*** because either the platform does not support them or"
6831 $ECHO "*** it was explicitly requested with -no-undefined,"
6832 $ECHO "*** libtool will only create a static version of it."
6833 if test "$build_old_libs" = no; then
6834 oldlibs="$output_objdir/$libname.$libext"
6835 build_libtool_libs=module
6836 build_old_libs=yes
6837 else
6838 build_libtool_libs=no
6839 fi
6840 fi
6841 fi
6842 fi
6843 # Done checking deplibs!
6844 deplibs=$newdeplibs
6845 fi
6846 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
6847 case $host in
6848 *-*-darwin*)
6849 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6850 new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6851 deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6852 ;;
6853 esac
6854
6855 # move library search paths that coincide with paths to not yet
6856 # installed libraries to the beginning of the library search list
6857 new_libs=
6858 for path in $notinst_path; do
6859 case " $new_libs " in
6860 *" -L$path/$objdir "*) ;;
6861 *)
6862 case " $deplibs " in
6863 *" -L$path/$objdir "*)
6864 new_libs="$new_libs -L$path/$objdir" ;;
6865 esac
6866 ;;
6867 esac
6868 done
6869 for deplib in $deplibs; do
6870 case $deplib in
6871 -L*)
6872 case " $new_libs " in
6873 *" $deplib "*) ;;
6874 *) new_libs="$new_libs $deplib" ;;
6875 esac
6876 ;;
6877 *) new_libs="$new_libs $deplib" ;;
6878 esac
6879 done
6880 deplibs="$new_libs"
6881
6882 # All the library-specific variables (install_libdir is set above).
6883 library_names=
6884 old_library=
6885 dlname=
6886
6887 # Test again, we may have decided not to build it any more
6888 if test "$build_libtool_libs" = yes; then
6889 if test "$hardcode_into_libs" = yes; then
6890 # Hardcode the library paths
6891 hardcode_libdirs=
6892 dep_rpath=
6893 rpath="$finalize_rpath"
6894 test "$mode" != relink && rpath="$compile_rpath$rpath"
6895 for libdir in $rpath; do
6896 if test -n "$hardcode_libdir_flag_spec"; then
6897 if test -n "$hardcode_libdir_separator"; then
6898 if test -z "$hardcode_libdirs"; then
6899 hardcode_libdirs="$libdir"
6900 else
6901 # Just accumulate the unique libdirs.
6902 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
6903 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
6904 ;;
6905 *)
6906 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
6907 ;;
6908 esac
6909 fi
6910 else
6911 eval flag=\"$hardcode_libdir_flag_spec\"
6912 dep_rpath="$dep_rpath $flag"
6913 fi
6914 elif test -n "$runpath_var"; then
6915 case "$perm_rpath " in
6916 *" $libdir "*) ;;
6917 *) perm_rpath="$perm_rpath $libdir" ;;
6918 esac
6919 fi
6920 done
6921 # Substitute the hardcoded libdirs into the rpath.
6922 if test -n "$hardcode_libdir_separator" &&
6923 test -n "$hardcode_libdirs"; then
6924 libdir="$hardcode_libdirs"
6925 if test -n "$hardcode_libdir_flag_spec_ld"; then
6926 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
6927 else
6928 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
6929 fi
6930 fi
6931 if test -n "$runpath_var" && test -n "$perm_rpath"; then
6932 # We should set the runpath_var.
6933 rpath=
6934 for dir in $perm_rpath; do
6935 rpath="$rpath$dir:"
6936 done
6937 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
6938 fi
6939 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
6940 fi
6941
6942 shlibpath="$finalize_shlibpath"
6943 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
6944 if test -n "$shlibpath"; then
6945 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
6946 fi
6947
6948 # Get the real and link names of the library.
6949 eval shared_ext=\"$shrext_cmds\"
6950 eval library_names=\"$library_names_spec\"
6951 set dummy $library_names
6952 shift
6953 realname="$1"
6954 shift
6955
6956 if test -n "$soname_spec"; then
6957 eval soname=\"$soname_spec\"
6958 else
6959 soname="$realname"
6960 fi
6961 if test -z "$dlname"; then
6962 dlname=$soname
6963 fi
6964
6965 lib="$output_objdir/$realname"
6966 linknames=
6967 for link
6968 do
6969 linknames="$linknames $link"
6970 done
6971
6972 # Use standard objects if they are pic
6973 test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
6974 test "X$libobjs" = "X " && libobjs=
6975
6976 delfiles=
6977 if test -n "$export_symbols" && test -n "$include_expsyms"; then
6978 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
6979 export_symbols="$output_objdir/$libname.uexp"
6980 delfiles="$delfiles $export_symbols"
6981 fi
6982
6983 orig_export_symbols=
6984 case $host_os in
6985 cygwin* | mingw* | cegcc*)
6986 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
6987 # exporting using user supplied symfile
6988 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
6989 # and it's NOT already a .def file. Must figure out
6990 # which of the given symbols are data symbols and tag
6991 # them as such. So, trigger use of export_symbols_cmds.
6992 # export_symbols gets reassigned inside the "prepare
6993 # the list of exported symbols" if statement, so the
6994 # include_expsyms logic still works.
6995 orig_export_symbols="$export_symbols"
6996 export_symbols=
6997 always_export_symbols=yes
6998 fi
6999 fi
7000 ;;
7001 esac
7002
7003 # Prepare the list of exported symbols
7004 if test -z "$export_symbols"; then
7005 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
7006 func_verbose "generating symbol list for \`$libname.la'"
7007 export_symbols="$output_objdir/$libname.exp"
7008 $opt_dry_run || $RM $export_symbols
7009 cmds=$export_symbols_cmds
7010 save_ifs="$IFS"; IFS='~'
7011 for cmd in $cmds; do
7012 IFS="$save_ifs"
7013 eval cmd=\"$cmd\"
7014 func_len " $cmd"
7015 len=$func_len_result
7016 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7017 func_show_eval "$cmd" 'exit $?'
7018 skipped_export=false
7019 else
7020 # The command line is too long to execute in one step.
7021 func_verbose "using reloadable object file for export list..."
7022 skipped_export=:
7023 # Break out early, otherwise skipped_export may be
7024 # set to false by a later but shorter cmd.
7025 break
7026 fi
7027 done
7028 IFS="$save_ifs"
7029 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
7030 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7031 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
7032 fi
7033 fi
7034 fi
7035
7036 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7037 tmp_export_symbols="$export_symbols"
7038 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7039 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7040 fi
7041
7042 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
7043 # The given exports_symbols file has to be filtered, so filter it.
7044 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
7045 # FIXME: $output_objdir/$libname.filter potentially contains lots of
7046 # 's' commands which not all seds can handle. GNU sed should be fine
7047 # though. Also, the filter scales superlinearly with the number of
7048 # global variables. join(1) would be nice here, but unfortunately
7049 # isn't a blessed tool.
7050 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7051 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
7052 export_symbols=$output_objdir/$libname.def
7053 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7054 fi
7055
7056 tmp_deplibs=
7057 for test_deplib in $deplibs; do
7058 case " $convenience " in
7059 *" $test_deplib "*) ;;
7060 *)
7061 tmp_deplibs="$tmp_deplibs $test_deplib"
7062 ;;
7063 esac
7064 done
7065 deplibs="$tmp_deplibs"
7066
7067 if test -n "$convenience"; then
7068 if test -n "$whole_archive_flag_spec" &&
7069 test "$compiler_needs_object" = yes &&
7070 test -z "$libobjs"; then
7071 # extract the archives, so we have objects to list.
7072 # TODO: could optimize this to just extract one archive.
7073 whole_archive_flag_spec=
7074 fi
7075 if test -n "$whole_archive_flag_spec"; then
7076 save_libobjs=$libobjs
7077 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7078 test "X$libobjs" = "X " && libobjs=
7079 else
7080 gentop="$output_objdir/${outputname}x"
7081 generated="$generated $gentop"
7082
7083 func_extract_archives $gentop $convenience
7084 libobjs="$libobjs $func_extract_archives_result"
7085 test "X$libobjs" = "X " && libobjs=
7086 fi
7087 fi
7088
7089 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
7090 eval flag=\"$thread_safe_flag_spec\"
7091 linker_flags="$linker_flags $flag"
7092 fi
7093
7094 # Make a backup of the uninstalled library when relinking
7095 if test "$mode" = relink; then
7096 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
7097 fi
7098
7099 # Do each of the archive commands.
7100 if test "$module" = yes && test -n "$module_cmds" ; then
7101 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7102 eval test_cmds=\"$module_expsym_cmds\"
7103 cmds=$module_expsym_cmds
7104 else
7105 eval test_cmds=\"$module_cmds\"
7106 cmds=$module_cmds
7107 fi
7108 else
7109 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7110 eval test_cmds=\"$archive_expsym_cmds\"
7111 cmds=$archive_expsym_cmds
7112 else
7113 eval test_cmds=\"$archive_cmds\"
7114 cmds=$archive_cmds
7115 fi
7116 fi
7117
7118 if test "X$skipped_export" != "X:" &&
7119 func_len " $test_cmds" &&
7120 len=$func_len_result &&
7121 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7122 :
7123 else
7124 # The command line is too long to link in one step, link piecewise
7125 # or, if using GNU ld and skipped_export is not :, use a linker
7126 # script.
7127
7128 # Save the value of $output and $libobjs because we want to
7129 # use them later. If we have whole_archive_flag_spec, we
7130 # want to use save_libobjs as it was before
7131 # whole_archive_flag_spec was expanded, because we can't
7132 # assume the linker understands whole_archive_flag_spec.
7133 # This may have to be revisited, in case too many
7134 # convenience libraries get linked in and end up exceeding
7135 # the spec.
7136 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
7137 save_libobjs=$libobjs
7138 fi
7139 save_output=$output
7140 output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
7141
7142 # Clear the reloadable object creation command queue and
7143 # initialize k to one.
7144 test_cmds=
7145 concat_cmds=
7146 objlist=
7147 last_robj=
7148 k=1
7149
7150 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
7151 output=${output_objdir}/${output_la}.lnkscript
7152 func_verbose "creating GNU ld script: $output"
7153 $ECHO 'INPUT (' > $output
7154 for obj in $save_libobjs
7155 do
7156 $ECHO "$obj" >> $output
7157 done
7158 $ECHO ')' >> $output
7159 delfiles="$delfiles $output"
7160 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
7161 output=${output_objdir}/${output_la}.lnk
7162 func_verbose "creating linker input file list: $output"
7163 : > $output
7164 set x $save_libobjs
7165 shift
7166 firstobj=
7167 if test "$compiler_needs_object" = yes; then
7168 firstobj="$1 "
7169 shift
7170 fi
7171 for obj
7172 do
7173 $ECHO "$obj" >> $output
7174 done
7175 delfiles="$delfiles $output"
7176 output=$firstobj\"$file_list_spec$output\"
7177 else
7178 if test -n "$save_libobjs"; then
7179 func_verbose "creating reloadable object files..."
7180 output=$output_objdir/$output_la-${k}.$objext
7181 eval test_cmds=\"$reload_cmds\"
7182 func_len " $test_cmds"
7183 len0=$func_len_result
7184 len=$len0
7185
7186 # Loop over the list of objects to be linked.
7187 for obj in $save_libobjs
7188 do
7189 func_len " $obj"
7190 func_arith $len + $func_len_result
7191 len=$func_arith_result
7192 if test "X$objlist" = X ||
7193 test "$len" -lt "$max_cmd_len"; then
7194 func_append objlist " $obj"
7195 else
7196 # The command $test_cmds is almost too long, add a
7197 # command to the queue.
7198 if test "$k" -eq 1 ; then
7199 # The first file doesn't have a previous command to add.
7200 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
7201 else
7202 # All subsequent reloadable object files will link in
7203 # the last one created.
7204 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
7205 fi
7206 last_robj=$output_objdir/$output_la-${k}.$objext
7207 func_arith $k + 1
7208 k=$func_arith_result
7209 output=$output_objdir/$output_la-${k}.$objext
7210 objlist=$obj
7211 func_len " $last_robj"
7212 func_arith $len0 + $func_len_result
7213 len=$func_arith_result
7214 fi
7215 done
7216 # Handle the remaining objects by creating one last
7217 # reloadable object file. All subsequent reloadable object
7218 # files will link in the last one created.
7219 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7220 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
7221 if test -n "$last_robj"; then
7222 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
7223 fi
7224 delfiles="$delfiles $output"
7225
7226 else
7227 output=
7228 fi
7229
7230 if ${skipped_export-false}; then
7231 func_verbose "generating symbol list for \`$libname.la'"
7232 export_symbols="$output_objdir/$libname.exp"
7233 $opt_dry_run || $RM $export_symbols
7234 libobjs=$output
7235 # Append the command to create the export file.
7236 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7237 eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
7238 if test -n "$last_robj"; then
7239 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
7240 fi
7241 fi
7242
7243 test -n "$save_libobjs" &&
7244 func_verbose "creating a temporary reloadable object file: $output"
7245
7246 # Loop through the commands generated above and execute them.
7247 save_ifs="$IFS"; IFS='~'
7248 for cmd in $concat_cmds; do
7249 IFS="$save_ifs"
7250 $opt_silent || {
7251 func_quote_for_expand "$cmd"
7252 eval "func_echo $func_quote_for_expand_result"
7253 }
7254 $opt_dry_run || eval "$cmd" || {
7255 lt_exit=$?
7256
7257 # Restore the uninstalled library and exit
7258 if test "$mode" = relink; then
7259 ( cd "$output_objdir" && \
7260 $RM "${realname}T" && \
7261 $MV "${realname}U" "$realname" )
7262 fi
7263
7264 exit $lt_exit
7265 }
7266 done
7267 IFS="$save_ifs"
7268
7269 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
7270 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7271 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
7272 fi
7273 fi
7274
7275 if ${skipped_export-false}; then
7276 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7277 tmp_export_symbols="$export_symbols"
7278 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7279 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7280 fi
7281
7282 if test -n "$orig_export_symbols"; then
7283 # The given exports_symbols file has to be filtered, so filter it.
7284 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
7285 # FIXME: $output_objdir/$libname.filter potentially contains lots of
7286 # 's' commands which not all seds can handle. GNU sed should be fine
7287 # though. Also, the filter scales superlinearly with the number of
7288 # global variables. join(1) would be nice here, but unfortunately
7289 # isn't a blessed tool.
7290 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7291 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
7292 export_symbols=$output_objdir/$libname.def
7293 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7294 fi
7295 fi
7296
7297 libobjs=$output
7298 # Restore the value of output.
7299 output=$save_output
7300
7301 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
7302 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7303 test "X$libobjs" = "X " && libobjs=
7304 fi
7305 # Expand the library linking commands again to reset the
7306 # value of $libobjs for piecewise linking.
7307
7308 # Do each of the archive commands.
7309 if test "$module" = yes && test -n "$module_cmds" ; then
7310 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7311 cmds=$module_expsym_cmds
7312 else
7313 cmds=$module_cmds
7314 fi
7315 else
7316 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7317 cmds=$archive_expsym_cmds
7318 else
7319 cmds=$archive_cmds
7320 fi
7321 fi
7322 fi
7323
7324 if test -n "$delfiles"; then
7325 # Append the command to remove temporary files to $cmds.
7326 eval cmds=\"\$cmds~\$RM $delfiles\"
7327 fi
7328
7329 # Add any objects from preloaded convenience libraries
7330 if test -n "$dlprefiles"; then
7331 gentop="$output_objdir/${outputname}x"
7332 generated="$generated $gentop"
7333
7334 func_extract_archives $gentop $dlprefiles
7335 libobjs="$libobjs $func_extract_archives_result"
7336 test "X$libobjs" = "X " && libobjs=
7337 fi
7338
7339 save_ifs="$IFS"; IFS='~'
7340 for cmd in $cmds; do
7341 IFS="$save_ifs"
7342 eval cmd=\"$cmd\"
7343 $opt_silent || {
7344 func_quote_for_expand "$cmd"
7345 eval "func_echo $func_quote_for_expand_result"
7346 }
7347 $opt_dry_run || eval "$cmd" || {
7348 lt_exit=$?
7349
7350 # Restore the uninstalled library and exit
7351 if test "$mode" = relink; then
7352 ( cd "$output_objdir" && \
7353 $RM "${realname}T" && \
7354 $MV "${realname}U" "$realname" )
7355 fi
7356
7357 exit $lt_exit
7358 }
7359 done
7360 IFS="$save_ifs"
7361
7362 # Restore the uninstalled library and exit
7363 if test "$mode" = relink; then
7364 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
7365
7366 if test -n "$convenience"; then
7367 if test -z "$whole_archive_flag_spec"; then
7368 func_show_eval '${RM}r "$gentop"'
7369 fi
7370 fi
7371
7372 exit $EXIT_SUCCESS
7373 fi
7374
7375 # Create links to the real library.
7376 for linkname in $linknames; do
7377 if test "$realname" != "$linkname"; then
7378 func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
7379 fi
7380 done
7381
7382 # If -module or -export-dynamic was specified, set the dlname.
7383 if test "$module" = yes || test "$export_dynamic" = yes; then
7384 # On all known operating systems, these are identical.
7385 dlname="$soname"
7386 fi
7387 fi
7388 ;;
7389
7390 obj)
7391 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7392 func_warning "\`-dlopen' is ignored for objects"
7393 fi
7394
7395 case " $deplibs" in
7396 *\ -l* | *\ -L*)
7397 func_warning "\`-l' and \`-L' are ignored for objects" ;;
7398 esac
7399
7400 test -n "$rpath" && \
7401 func_warning "\`-rpath' is ignored for objects"
7402
7403 test -n "$xrpath" && \
7404 func_warning "\`-R' is ignored for objects"
7405
7406 test -n "$vinfo" && \
7407 func_warning "\`-version-info' is ignored for objects"
7408
7409 test -n "$release" && \
7410 func_warning "\`-release' is ignored for objects"
7411
7412 case $output in
7413 *.lo)
7414 test -n "$objs$old_deplibs" && \
7415 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
7416
7417 libobj=$output
7418 func_lo2o "$libobj"
7419 obj=$func_lo2o_result
7420 ;;
7421 *)
7422 libobj=
7423 obj="$output"
7424 ;;
7425 esac
7426
7427 # Delete the old objects.
7428 $opt_dry_run || $RM $obj $libobj
7429
7430 # Objects from convenience libraries. This assumes
7431 # single-version convenience libraries. Whenever we create
7432 # different ones for PIC/non-PIC, this we'll have to duplicate
7433 # the extraction.
7434 reload_conv_objs=
7435 gentop=
7436 # reload_cmds runs $LD directly, so let us get rid of
7437 # -Wl from whole_archive_flag_spec and hope we can get by with
7438 # turning comma into space..
7439 wl=
7440
7441 if test -n "$convenience"; then
7442 if test -n "$whole_archive_flag_spec"; then
7443 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
7444 reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
7445 else
7446 gentop="$output_objdir/${obj}x"
7447 generated="$generated $gentop"
7448
7449 func_extract_archives $gentop $convenience
7450 reload_conv_objs="$reload_objs $func_extract_archives_result"
7451 fi
7452 fi
7453
7454 # Create the old-style object.
7455 reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
7456
7457 output="$obj"
7458 func_execute_cmds "$reload_cmds" 'exit $?'
7459
7460 # Exit if we aren't doing a library object file.
7461 if test -z "$libobj"; then
7462 if test -n "$gentop"; then
7463 func_show_eval '${RM}r "$gentop"'
7464 fi
7465
7466 exit $EXIT_SUCCESS
7467 fi
7468
7469 if test "$build_libtool_libs" != yes; then
7470 if test -n "$gentop"; then
7471 func_show_eval '${RM}r "$gentop"'
7472 fi
7473
7474 # Create an invalid libtool object if no PIC, so that we don't
7475 # accidentally link it into a program.
7476 # $show "echo timestamp > $libobj"
7477 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
7478 exit $EXIT_SUCCESS
7479 fi
7480
7481 if test -n "$pic_flag" || test "$pic_mode" != default; then
7482 # Only do commands if we really have different PIC objects.
7483 reload_objs="$libobjs $reload_conv_objs"
7484 output="$libobj"
7485 func_execute_cmds "$reload_cmds" 'exit $?'
7486 fi
7487
7488 if test -n "$gentop"; then
7489 func_show_eval '${RM}r "$gentop"'
7490 fi
7491
7492 exit $EXIT_SUCCESS
7493 ;;
7494
7495 prog)
7496 case $host in
7497 *cygwin*) func_stripname '' '.exe' "$output"
7498 output=$func_stripname_result.exe;;
7499 esac
7500 test -n "$vinfo" && \
7501 func_warning "\`-version-info' is ignored for programs"
7502
7503 test -n "$release" && \
7504 func_warning "\`-release' is ignored for programs"
7505
7506 test "$preload" = yes \
7507 && test "$dlopen_support" = unknown \
7508 && test "$dlopen_self" = unknown \
7509 && test "$dlopen_self_static" = unknown && \
7510 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
7511
7512 case $host in
7513 *-*-rhapsody* | *-*-darwin1.[012])
7514 # On Rhapsody replace the C library is the System framework
7515 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7516 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7517 ;;
7518 esac
7519
7520 case $host in
7521 *-*-darwin*)
7522 # Don't allow lazy linking, it breaks C++ global constructors
7523 # But is supposedly fixed on 10.4 or later (yay!).
7524 if test "$tagname" = CXX ; then
7525 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
7526 10.[0123])
7527 compile_command="$compile_command ${wl}-bind_at_load"
7528 finalize_command="$finalize_command ${wl}-bind_at_load"
7529 ;;
7530 esac
7531 fi
7532 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7533 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7534 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7535 ;;
7536 esac
7537
7538
7539 # move library search paths that coincide with paths to not yet
7540 # installed libraries to the beginning of the library search list
7541 new_libs=
7542 for path in $notinst_path; do
7543 case " $new_libs " in
7544 *" -L$path/$objdir "*) ;;
7545 *)
7546 case " $compile_deplibs " in
7547 *" -L$path/$objdir "*)
7548 new_libs="$new_libs -L$path/$objdir" ;;
7549 esac
7550 ;;
7551 esac
7552 done
7553 for deplib in $compile_deplibs; do
7554 case $deplib in
7555 -L*)
7556 case " $new_libs " in
7557 *" $deplib "*) ;;
7558 *) new_libs="$new_libs $deplib" ;;
7559 esac
7560 ;;
7561 *) new_libs="$new_libs $deplib" ;;
7562 esac
7563 done
7564 compile_deplibs="$new_libs"
7565
7566
7567 compile_command="$compile_command $compile_deplibs"
7568 finalize_command="$finalize_command $finalize_deplibs"
7569
7570 if test -n "$rpath$xrpath"; then
7571 # If the user specified any rpath flags, then add them.
7572 for libdir in $rpath $xrpath; do
7573 # This is the magic to use -rpath.
7574 case "$finalize_rpath " in
7575 *" $libdir "*) ;;
7576 *) finalize_rpath="$finalize_rpath $libdir" ;;
7577 esac
7578 done
7579 fi
7580
7581 # Now hardcode the library paths
7582 rpath=
7583 hardcode_libdirs=
7584 for libdir in $compile_rpath $finalize_rpath; do
7585 if test -n "$hardcode_libdir_flag_spec"; then
7586 if test -n "$hardcode_libdir_separator"; then
7587 if test -z "$hardcode_libdirs"; then
7588 hardcode_libdirs="$libdir"
7589 else
7590 # Just accumulate the unique libdirs.
7591 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
7592 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7593 ;;
7594 *)
7595 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
7596 ;;
7597 esac
7598 fi
7599 else
7600 eval flag=\"$hardcode_libdir_flag_spec\"
7601 rpath="$rpath $flag"
7602 fi
7603 elif test -n "$runpath_var"; then
7604 case "$perm_rpath " in
7605 *" $libdir "*) ;;
7606 *) perm_rpath="$perm_rpath $libdir" ;;
7607 esac
7608 fi
7609 case $host in
7610 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
7611 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
7612 case :$dllsearchpath: in
7613 *":$libdir:"*) ;;
7614 ::) dllsearchpath=$libdir;;
7615 *) dllsearchpath="$dllsearchpath:$libdir";;
7616 esac
7617 case :$dllsearchpath: in
7618 *":$testbindir:"*) ;;
7619 ::) dllsearchpath=$testbindir;;
7620 *) dllsearchpath="$dllsearchpath:$testbindir";;
7621 esac
7622 ;;
7623 esac
7624 done
7625 # Substitute the hardcoded libdirs into the rpath.
7626 if test -n "$hardcode_libdir_separator" &&
7627 test -n "$hardcode_libdirs"; then
7628 libdir="$hardcode_libdirs"
7629 eval rpath=\" $hardcode_libdir_flag_spec\"
7630 fi
7631 compile_rpath="$rpath"
7632
7633 rpath=
7634 hardcode_libdirs=
7635 for libdir in $finalize_rpath; do
7636 if test -n "$hardcode_libdir_flag_spec"; then
7637 if test -n "$hardcode_libdir_separator"; then
7638 if test -z "$hardcode_libdirs"; then
7639 hardcode_libdirs="$libdir"
7640 else
7641 # Just accumulate the unique libdirs.
7642 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
7643 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7644 ;;
7645 *)
7646 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
7647 ;;
7648 esac
7649 fi
7650 else
7651 eval flag=\"$hardcode_libdir_flag_spec\"
7652 rpath="$rpath $flag"
7653 fi
7654 elif test -n "$runpath_var"; then
7655 case "$finalize_perm_rpath " in
7656 *" $libdir "*) ;;
7657 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
7658 esac
7659 fi
7660 done
7661 # Substitute the hardcoded libdirs into the rpath.
7662 if test -n "$hardcode_libdir_separator" &&
7663 test -n "$hardcode_libdirs"; then
7664 libdir="$hardcode_libdirs"
7665 eval rpath=\" $hardcode_libdir_flag_spec\"
7666 fi
7667 finalize_rpath="$rpath"
7668
7669 if test -n "$libobjs" && test "$build_old_libs" = yes; then
7670 # Transform all the library objects into standard objects.
7671 compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7672 finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7673 fi
7674
7675 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
7676
7677 # template prelinking step
7678 if test -n "$prelink_cmds"; then
7679 func_execute_cmds "$prelink_cmds" 'exit $?'
7680 fi
7681
7682 wrappers_required=yes
7683 case $host in
7684 *cygwin* | *mingw* )
7685 if test "$build_libtool_libs" != yes; then
7686 wrappers_required=no
7687 fi
7688 ;;
7689 *cegcc)
7690 # Disable wrappers for cegcc, we are cross compiling anyway.
7691 wrappers_required=no
7692 ;;
7693 *)
7694 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
7695 wrappers_required=no
7696 fi
7697 ;;
7698 esac
7699 if test "$wrappers_required" = no; then
7700 # Replace the output file specification.
7701 compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7702 link_command="$compile_command$compile_rpath"
7703
7704 # We have no uninstalled library dependencies, so finalize right now.
7705 exit_status=0
7706 func_show_eval "$link_command" 'exit_status=$?'
7707
7708 # Delete the generated files.
7709 if test -f "$output_objdir/${outputname}S.${objext}"; then
7710 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
7711 fi
7712
7713 exit $exit_status
7714 fi
7715
7716 if test -n "$compile_shlibpath$finalize_shlibpath"; then
7717 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
7718 fi
7719 if test -n "$finalize_shlibpath"; then
7720 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
7721 fi
7722
7723 compile_var=
7724 finalize_var=
7725 if test -n "$runpath_var"; then
7726 if test -n "$perm_rpath"; then
7727 # We should set the runpath_var.
7728 rpath=
7729 for dir in $perm_rpath; do
7730 rpath="$rpath$dir:"
7731 done
7732 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
7733 fi
7734 if test -n "$finalize_perm_rpath"; then
7735 # We should set the runpath_var.
7736 rpath=
7737 for dir in $finalize_perm_rpath; do
7738 rpath="$rpath$dir:"
7739 done
7740 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
7741 fi
7742 fi
7743
7744 if test "$no_install" = yes; then
7745 # We don't need to create a wrapper script.
7746 link_command="$compile_var$compile_command$compile_rpath"
7747 # Replace the output file specification.
7748 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7749 # Delete the old output file.
7750 $opt_dry_run || $RM $output
7751 # Link the executable and exit
7752 func_show_eval "$link_command" 'exit $?'
7753 exit $EXIT_SUCCESS
7754 fi
7755
7756 if test "$hardcode_action" = relink; then
7757 # Fast installation is not supported
7758 link_command="$compile_var$compile_command$compile_rpath"
7759 relink_command="$finalize_var$finalize_command$finalize_rpath"
7760
7761 func_warning "this platform does not like uninstalled shared libraries"
7762 func_warning "\`$output' will be relinked during installation"
7763 else
7764 if test "$fast_install" != no; then
7765 link_command="$finalize_var$compile_command$finalize_rpath"
7766 if test "$fast_install" = yes; then
7767 relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
7768 else
7769 # fast_install is set to needless
7770 relink_command=
7771 fi
7772 else
7773 link_command="$compile_var$compile_command$compile_rpath"
7774 relink_command="$finalize_var$finalize_command$finalize_rpath"
7775 fi
7776 fi
7777
7778 # Replace the output file specification.
7779 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
7780
7781 # Delete the old output files.
7782 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
7783
7784 func_show_eval "$link_command" 'exit $?'
7785
7786 # Now create the wrapper script.
7787 func_verbose "creating $output"
7788
7789 # Quote the relink command for shipping.
7790 if test -n "$relink_command"; then
7791 # Preserve any variables that may affect compiler behavior
7792 for var in $variables_saved_for_relink; do
7793 if eval test -z \"\${$var+set}\"; then
7794 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
7795 elif eval var_value=\$$var; test -z "$var_value"; then
7796 relink_command="$var=; export $var; $relink_command"
7797 else
7798 func_quote_for_eval "$var_value"
7799 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
7800 fi
7801 done
7802 relink_command="(cd `pwd`; $relink_command)"
7803 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7804 fi
7805
7806 # Quote $ECHO for shipping.
7807 if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7808 case $progpath in
7809 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7810 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7811 esac
7812 qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7813 else
7814 qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
7815 fi
7816
7817 # Only actually do things if not in dry run mode.
7818 $opt_dry_run || {
7819 # win32 will think the script is a binary if it has
7820 # a .exe suffix, so we strip it off here.
7821 case $output in
7822 *.exe) func_stripname '' '.exe' "$output"
7823 output=$func_stripname_result ;;
7824 esac
7825 # test for cygwin because mv fails w/o .exe extensions
7826 case $host in
7827 *cygwin*)
7828 exeext=.exe
7829 func_stripname '' '.exe' "$outputname"
7830 outputname=$func_stripname_result ;;
7831 *) exeext= ;;
7832 esac
7833 case $host in
7834 *cygwin* | *mingw* )
7835 func_dirname_and_basename "$output" "" "."
7836 output_name=$func_basename_result
7837 output_path=$func_dirname_result
7838 cwrappersource="$output_path/$objdir/lt-$output_name.c"
7839 cwrapper="$output_path/$output_name.exe"
7840 $RM $cwrappersource $cwrapper
7841 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
7842
7843 func_emit_cwrapperexe_src > $cwrappersource
7844
7845 # The wrapper executable is built using the $host compiler,
7846 # because it contains $host paths and files. If cross-
7847 # compiling, it, like the target executable, must be
7848 # executed on the $host or under an emulation environment.
7849 $opt_dry_run || {
7850 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
7851 $STRIP $cwrapper
7852 }
7853
7854 # Now, create the wrapper script for func_source use:
7855 func_ltwrapper_scriptname $cwrapper
7856 $RM $func_ltwrapper_scriptname_result
7857 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
7858 $opt_dry_run || {
7859 # note: this script will not be executed, so do not chmod.
7860 if test "x$build" = "x$host" ; then
7861 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
7862 else
7863 func_emit_wrapper no > $func_ltwrapper_scriptname_result
7864 fi
7865 }
7866 ;;
7867 * )
7868 $RM $output
7869 trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
7870
7871 func_emit_wrapper no > $output
7872 chmod +x $output
7873 ;;
7874 esac
7875 }
7876 exit $EXIT_SUCCESS
7877 ;;
7878 esac
7879
7880 # See if we need to build an old-fashioned archive.
7881 for oldlib in $oldlibs; do
7882
7883 if test "$build_libtool_libs" = convenience; then
7884 oldobjs="$libobjs_save $symfileobj"
7885 addlibs="$convenience"
7886 build_libtool_libs=no
7887 else
7888 if test "$build_libtool_libs" = module; then
7889 oldobjs="$libobjs_save"
7890 build_libtool_libs=no
7891 else
7892 oldobjs="$old_deplibs $non_pic_objects"
7893 if test "$preload" = yes && test -f "$symfileobj"; then
7894 oldobjs="$oldobjs $symfileobj"
7895 fi
7896 fi
7897 addlibs="$old_convenience"
7898 fi
7899
7900 if test -n "$addlibs"; then
7901 gentop="$output_objdir/${outputname}x"
7902 generated="$generated $gentop"
7903
7904 func_extract_archives $gentop $addlibs
7905 oldobjs="$oldobjs $func_extract_archives_result"
7906 fi
7907
7908 # Do each command in the archive commands.
7909 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
7910 cmds=$old_archive_from_new_cmds
7911 else
7912
7913 # Add any objects from preloaded convenience libraries
7914 if test -n "$dlprefiles"; then
7915 gentop="$output_objdir/${outputname}x"
7916 generated="$generated $gentop"
7917
7918 func_extract_archives $gentop $dlprefiles
7919 oldobjs="$oldobjs $func_extract_archives_result"
7920 fi
7921
7922 # POSIX demands no paths to be encoded in archives. We have
7923 # to avoid creating archives with duplicate basenames if we
7924 # might have to extract them afterwards, e.g., when creating a
7925 # static archive out of a convenience library, or when linking
7926 # the entirety of a libtool archive into another (currently
7927 # not supported by libtool).
7928 if (for obj in $oldobjs
7929 do
7930 func_basename "$obj"
7931 $ECHO "$func_basename_result"
7932 done | sort | sort -uc >/dev/null 2>&1); then
7933 :
7934 else
7935 $ECHO "copying selected object files to avoid basename conflicts..."
7936 gentop="$output_objdir/${outputname}x"
7937 generated="$generated $gentop"
7938 func_mkdir_p "$gentop"
7939 save_oldobjs=$oldobjs
7940 oldobjs=
7941 counter=1
7942 for obj in $save_oldobjs
7943 do
7944 func_basename "$obj"
7945 objbase="$func_basename_result"
7946 case " $oldobjs " in
7947 " ") oldobjs=$obj ;;
7948 *[\ /]"$objbase "*)
7949 while :; do
7950 # Make sure we don't pick an alternate name that also
7951 # overlaps.
7952 newobj=lt$counter-$objbase
7953 func_arith $counter + 1
7954 counter=$func_arith_result
7955 case " $oldobjs " in
7956 *[\ /]"$newobj "*) ;;
7957 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
7958 esac
7959 done
7960 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
7961 oldobjs="$oldobjs $gentop/$newobj"
7962 ;;
7963 *) oldobjs="$oldobjs $obj" ;;
7964 esac
7965 done
7966 fi
7967 eval cmds=\"$old_archive_cmds\"
7968
7969 func_len " $cmds"
7970 len=$func_len_result
7971 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7972 cmds=$old_archive_cmds
7973 else
7974 # the command line is too long to link in one step, link in parts
7975 func_verbose "using piecewise archive linking..."
7976 save_RANLIB=$RANLIB
7977 RANLIB=:
7978 objlist=
7979 concat_cmds=
7980 save_oldobjs=$oldobjs
7981 oldobjs=
7982 # Is there a better way of finding the last object in the list?
7983 for obj in $save_oldobjs
7984 do
7985 last_oldobj=$obj
7986 done
7987 eval test_cmds=\"$old_archive_cmds\"
7988 func_len " $test_cmds"
7989 len0=$func_len_result
7990 len=$len0
7991 for obj in $save_oldobjs
7992 do
7993 func_len " $obj"
7994 func_arith $len + $func_len_result
7995 len=$func_arith_result
7996 func_append objlist " $obj"
7997 if test "$len" -lt "$max_cmd_len"; then
7998 :
7999 else
8000 # the above command should be used before it gets too long
8001 oldobjs=$objlist
8002 if test "$obj" = "$last_oldobj" ; then
8003 RANLIB=$save_RANLIB
8004 fi
8005 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8006 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
8007 objlist=
8008 len=$len0
8009 fi
8010 done
8011 RANLIB=$save_RANLIB
8012 oldobjs=$objlist
8013 if test "X$oldobjs" = "X" ; then
8014 eval cmds=\"\$concat_cmds\"
8015 else
8016 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
8017 fi
8018 fi
8019 fi
8020 func_execute_cmds "$cmds" 'exit $?'
8021 done
8022
8023 test -n "$generated" && \
8024 func_show_eval "${RM}r$generated"
8025
8026 # Now create the libtool archive.
8027 case $output in
8028 *.la)
8029 old_library=
8030 test "$build_old_libs" = yes && old_library="$libname.$libext"
8031 func_verbose "creating $output"
8032
8033 # Preserve any variables that may affect compiler behavior
8034 for var in $variables_saved_for_relink; do
8035 if eval test -z \"\${$var+set}\"; then
8036 relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
8037 elif eval var_value=\$$var; test -z "$var_value"; then
8038 relink_command="$var=; export $var; $relink_command"
8039 else
8040 func_quote_for_eval "$var_value"
8041 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
8042 fi
8043 done
8044 # Quote the link command for shipping.
8045 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8046 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
8047 if test "$hardcode_automatic" = yes ; then
8048 relink_command=
8049 fi
8050
8051 # Only create the output if not a dry run.
8052 $opt_dry_run || {
8053 for installed in no yes; do
8054 if test "$installed" = yes; then
8055 if test -z "$install_libdir"; then
8056 break
8057 fi
8058 output="$output_objdir/$outputname"i
8059 # Replace all uninstalled libtool libraries with the installed ones
8060 newdependency_libs=
8061 for deplib in $dependency_libs; do
8062 case $deplib in
8063 *.la)
8064 func_basename "$deplib"
8065 name="$func_basename_result"
8066 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8067 test -z "$libdir" && \
8068 func_fatal_error "\`$deplib' is not a valid libtool archive"
8069 newdependency_libs="$newdependency_libs $libdir/$name"
8070 ;;
8071 *) newdependency_libs="$newdependency_libs $deplib" ;;
8072 esac
8073 done
8074 dependency_libs="$newdependency_libs"
8075 newdlfiles=
8076
8077 for lib in $dlfiles; do
8078 case $lib in
8079 *.la)
8080 func_basename "$lib"
8081 name="$func_basename_result"
8082 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8083 test -z "$libdir" && \
8084 func_fatal_error "\`$lib' is not a valid libtool archive"
8085 newdlfiles="$newdlfiles $libdir/$name"
8086 ;;
8087 *) newdlfiles="$newdlfiles $lib" ;;
8088 esac
8089 done
8090 dlfiles="$newdlfiles"
8091 newdlprefiles=
8092 for lib in $dlprefiles; do
8093 case $lib in
8094 *.la)
8095 # Only pass preopened files to the pseudo-archive (for
8096 # eventual linking with the app. that links it) if we
8097 # didn't already link the preopened objects directly into
8098 # the library:
8099 func_basename "$lib"
8100 name="$func_basename_result"
8101 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8102 test -z "$libdir" && \
8103 func_fatal_error "\`$lib' is not a valid libtool archive"
8104 newdlprefiles="$newdlprefiles $libdir/$name"
8105 ;;
8106 esac
8107 done
8108 dlprefiles="$newdlprefiles"
8109 else
8110 newdlfiles=
8111 for lib in $dlfiles; do
8112 case $lib in
8113 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8114 *) abs=`pwd`"/$lib" ;;
8115 esac
8116 newdlfiles="$newdlfiles $abs"
8117 done
8118 dlfiles="$newdlfiles"
8119 newdlprefiles=
8120 for lib in $dlprefiles; do
8121 case $lib in
8122 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8123 *) abs=`pwd`"/$lib" ;;
8124 esac
8125 newdlprefiles="$newdlprefiles $abs"
8126 done
8127 dlprefiles="$newdlprefiles"
8128 fi
8129 $RM $output
8130 # place dlname in correct position for cygwin
8131 tdlname=$dlname
8132 case $host,$output,$installed,$module,$dlname in
8133 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
8134 esac
8135 $ECHO > $output "\
8136# $outputname - a libtool library file
8137# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
8138#
8139# Please DO NOT delete this file!
8140# It is necessary for linking the library.
8141
8142# The name that we can dlopen(3).
8143dlname='$tdlname'
8144
8145# Names of this library.
8146library_names='$library_names'
8147
8148# The name of the static archive.
8149old_library='$old_library'
8150
8151# Linker flags that can not go in dependency_libs.
8152inherited_linker_flags='$new_inherited_linker_flags'
8153
8154# Libraries that this one depends upon.
8155dependency_libs='$dependency_libs'
8156
8157# Names of additional weak libraries provided by this library
8158weak_library_names='$weak_libs'
8159
8160# Version information for $libname.
8161current=$current
8162age=$age
8163revision=$revision
8164
8165# Is this an already installed library?
8166installed=$installed
8167
8168# Should we warn about portability when linking against -modules?
8169shouldnotlink=$module
8170
8171# Files to dlopen/dlpreopen
8172dlopen='$dlfiles'
8173dlpreopen='$dlprefiles'
8174
8175# Directory that this library needs to be installed in:
8176libdir='$install_libdir'"
8177 if test "$installed" = no && test "$need_relink" = yes; then
8178 $ECHO >> $output "\
8179relink_command=\"$relink_command\""
8180 fi
8181 done
8182 }
8183
8184 # Do a symbolic link so that the libtool archive can be found in
8185 # LD_LIBRARY_PATH before the program is installed.
8186 func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
8187 ;;
8188 esac
8189 exit $EXIT_SUCCESS
8190}
8191
8192{ test "$mode" = link || test "$mode" = relink; } &&
8193 func_mode_link ${1+"$@"}
8194
8195
8196# func_mode_uninstall arg...
8197func_mode_uninstall ()
8198{
8199 $opt_debug
8200 RM="$nonopt"
8201 files=
8202 rmforce=
8203 exit_status=0
8204
8205 # This variable tells wrapper scripts just to set variables rather
8206 # than running their programs.
8207 libtool_install_magic="$magic"
8208
8209 for arg
8210 do
8211 case $arg in
8212 -f) RM="$RM $arg"; rmforce=yes ;;
8213 -*) RM="$RM $arg" ;;
8214 *) files="$files $arg" ;;
8215 esac
8216 done
8217
8218 test -z "$RM" && \
8219 func_fatal_help "you must specify an RM program"
8220
8221 rmdirs=
8222
8223 origobjdir="$objdir"
8224 for file in $files; do
8225 func_dirname "$file" "" "."
8226 dir="$func_dirname_result"
8227 if test "X$dir" = X.; then
8228 objdir="$origobjdir"
8229 else
8230 objdir="$dir/$origobjdir"
8231 fi
8232 func_basename "$file"
8233 name="$func_basename_result"
8234 test "$mode" = uninstall && objdir="$dir"
8235
8236 # Remember objdir for removal later, being careful to avoid duplicates
8237 if test "$mode" = clean; then
8238 case " $rmdirs " in
8239 *" $objdir "*) ;;
8240 *) rmdirs="$rmdirs $objdir" ;;
8241 esac
8242 fi
8243
8244 # Don't error if the file doesn't exist and rm -f was used.
8245 if { test -L "$file"; } >/dev/null 2>&1 ||
8246 { test -h "$file"; } >/dev/null 2>&1 ||
8247 test -f "$file"; then
8248 :
8249 elif test -d "$file"; then
8250 exit_status=1
8251 continue
8252 elif test "$rmforce" = yes; then
8253 continue
8254 fi
8255
8256 rmfiles="$file"
8257
8258 case $name in
8259 *.la)
8260 # Possibly a libtool archive, so verify it.
8261 if func_lalib_p "$file"; then
8262 func_source $dir/$name
8263
8264 # Delete the libtool libraries and symlinks.
8265 for n in $library_names; do
8266 rmfiles="$rmfiles $objdir/$n"
8267 done
8268 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8269
8270 case "$mode" in
8271 clean)
8272 case " $library_names " in
8273 # " " in the beginning catches empty $dlname
8274 *" $dlname "*) ;;
8275 *) rmfiles="$rmfiles $objdir/$dlname" ;;
8276 esac
8277 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
8278 ;;
8279 uninstall)
8280 if test -n "$library_names"; then
8281 # Do each command in the postuninstall commands.
8282 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
8283 fi
8284
8285 if test -n "$old_library"; then
8286 # Do each command in the old_postuninstall commands.
8287 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
8288 fi
8289 # FIXME: should reinstall the best remaining shared library.
8290 ;;
8291 esac
8292 fi
8293 ;;
8294
8295 *.lo)
8296 # Possibly a libtool object, so verify it.
8297 if func_lalib_p "$file"; then
8298
8299 # Read the .lo file
8300 func_source $dir/$name
8301
8302 # Add PIC object to the list of files to remove.
8303 if test -n "$pic_object" &&
8304 test "$pic_object" != none; then
8305 rmfiles="$rmfiles $dir/$pic_object"
8306 fi
8307
8308 # Add non-PIC object to the list of files to remove.
8309 if test -n "$non_pic_object" &&
8310 test "$non_pic_object" != none; then
8311 rmfiles="$rmfiles $dir/$non_pic_object"
8312 fi
8313 fi
8314 ;;
8315
8316 *)
8317 if test "$mode" = clean ; then
8318 noexename=$name
8319 case $file in
8320 *.exe)
8321 func_stripname '' '.exe' "$file"
8322 file=$func_stripname_result
8323 func_stripname '' '.exe' "$name"
8324 noexename=$func_stripname_result
8325 # $file with .exe has already been added to rmfiles,
8326 # add $file without .exe
8327 rmfiles="$rmfiles $file"
8328 ;;
8329 esac
8330 # Do a test to see if this is a libtool program.
8331 if func_ltwrapper_p "$file"; then
8332 if func_ltwrapper_executable_p "$file"; then
8333 func_ltwrapper_scriptname "$file"
8334 relink_command=
8335 func_source $func_ltwrapper_scriptname_result
8336 rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
8337 else
8338 relink_command=
8339 func_source $dir/$noexename
8340 fi
8341
8342 # note $name still contains .exe if it was in $file originally
8343 # as does the version of $file that was added into $rmfiles
8344 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
8345 if test "$fast_install" = yes && test -n "$relink_command"; then
8346 rmfiles="$rmfiles $objdir/lt-$name"
8347 fi
8348 if test "X$noexename" != "X$name" ; then
8349 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
8350 fi
8351 fi
8352 fi
8353 ;;
8354 esac
8355 func_show_eval "$RM $rmfiles" 'exit_status=1'
8356 done
8357 objdir="$origobjdir"
8358
8359 # Try to remove the ${objdir}s in the directories where we deleted files
8360 for dir in $rmdirs; do
8361 if test -d "$dir"; then
8362 func_show_eval "rmdir $dir >/dev/null 2>&1"
8363 fi
8364 done
8365
8366 exit $exit_status
8367}
8368
8369{ test "$mode" = uninstall || test "$mode" = clean; } &&
8370 func_mode_uninstall ${1+"$@"}
8371
8372test -z "$mode" && {
8373 help="$generic_help"
8374 func_fatal_help "you must specify a MODE"
8375}
8376
8377test -z "$exec_cmd" && \
8378 func_fatal_help "invalid operation mode \`$mode'"
8379
8380if test -n "$exec_cmd"; then
8381 eval exec "$exec_cmd"
8382 exit $EXIT_FAILURE
8383fi
8384
8385exit $exit_status
8386
8387
8388# The TAGs below are defined such that we never get into a situation
8389# in which we disable both kinds of libraries. Given conflicting
8390# choices, we go for a static library, that is the most portable,
8391# since we can't tell whether shared libraries were disabled because
8392# the user asked for that or because the platform doesn't support
8393# them. This is particularly important on AIX, because we don't
8394# support having both static and shared libraries enabled at the same
8395# time on that platform, so we default to a shared-only configuration.
8396# If a disable-shared tag is given, we'll fallback to a static-only
8397# configuration. But we'll never go from static-only to shared-only.
8398
8399# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
8400build_libtool_libs=no
8401build_old_libs=yes
8402# ### END LIBTOOL TAG CONFIG: disable-shared
8403
8404# ### BEGIN LIBTOOL TAG CONFIG: disable-static
8405build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
8406# ### END LIBTOOL TAG CONFIG: disable-static
8407
8408# Local Variables:
8409# mode:shell-script
8410# sh-indentation:2
8411# End:
8412# vi:sw=2
8413
diff --git a/libraries/eet/m4/ac_attribute.m4 b/libraries/eet/m4/ac_attribute.m4
new file mode 100644
index 0000000..23479a9
--- /dev/null
+++ b/libraries/eet/m4/ac_attribute.m4
@@ -0,0 +1,47 @@
1dnl Copyright (C) 2004-2008 Kim Woelders
2dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
3dnl That code is public domain and can be freely used or copied.
4dnl Originally snatched from somewhere...
5
6dnl Macro for checking if the compiler supports __attribute__
7
8dnl Usage: AC_C___ATTRIBUTE__
9dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__
10dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is
11dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused))
12dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is
13dnl defined to nothing.
14
15AC_DEFUN([AC_C___ATTRIBUTE__],
16[
17
18AC_MSG_CHECKING([for __attribute__])
19
20AC_CACHE_VAL([ac_cv___attribute__],
21 [AC_TRY_COMPILE(
22 [
23#include <stdlib.h>
24
25int func(int x);
26int foo(int x __attribute__ ((unused)))
27{
28 exit(1);
29}
30 ],
31 [],
32 [ac_cv___attribute__="yes"],
33 [ac_cv___attribute__="no"]
34 )])
35
36AC_MSG_RESULT($ac_cv___attribute__)
37
38if test "x${ac_cv___attribute__}" = "xyes" ; then
39 AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__])
40 AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused])
41 else
42 AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused])
43fi
44
45])
46
47dnl End of ac_attribute.m4
diff --git a/libraries/eet/m4/ac_path_generic.m4 b/libraries/eet/m4/ac_path_generic.m4
new file mode 100644
index 0000000..d427241
--- /dev/null
+++ b/libraries/eet/m4/ac_path_generic.m4
@@ -0,0 +1,137 @@
1dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
2dnl
3dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
4dnl
5dnl The script must support `--cflags' and `--libs' args.
6dnl If MINIMUM-VERSION is specified, the script must also support the
7dnl `--version' arg.
8dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
9dnl it must also support `--prefix' and `--exec-prefix'.
10dnl (In other words, it must be like gtk-config.)
11dnl
12dnl For example:
13dnl
14dnl AC_PATH_GENERIC(Foo, 1.0.0)
15dnl
16dnl would run `foo-config --version' and check that it is at least 1.0.0
17dnl
18dnl If so, the following would then be defined:
19dnl
20dnl FOO_CFLAGS to `foo-config --cflags`
21dnl FOO_LIBS to `foo-config --libs`
22dnl
23dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
24dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
25dnl
26dnl @author Angus Lees <gusl@cse.unsw.edu.au>
27
28AC_DEFUN([AC_PATH_GENERIC],
29[dnl
30dnl we're going to need uppercase, lowercase and user-friendly versions of the
31dnl string `LIBRARY'
32pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
33pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
34
35dnl
36dnl Get the cflags and libraries from the LIBRARY-config script
37dnl
38AC_ARG_WITH(DOWN-prefix,
39 [ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
40 DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
41AC_ARG_WITH(DOWN-exec-prefix,
42 [ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)],
43 DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="")
44
45 if test x$DOWN[]_config_exec_prefix != x ; then
46 DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
47 if test x${UP[]_CONFIG+set} != xset ; then
48 UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config
49 fi
50 fi
51 if test x$DOWN[]_config_prefix != x ; then
52 DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix"
53 if test x${UP[]_CONFIG+set} != xset ; then
54 UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config
55 fi
56 fi
57
58 AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no)
59 ifelse([$2], ,
60 AC_MSG_CHECKING(for $1),
61 AC_MSG_CHECKING(for $1 - version >= $2)
62 )
63 no_[]DOWN=""
64 if test "$UP[]_CONFIG" = "no" ; then
65 no_[]DOWN=yes
66 else
67 UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
68 UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
69 ifelse([$2], , ,[
70 DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \
71 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
72 DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \
73 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
74 DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \
75 --version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
76 DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])"
77 DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])"
78 DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])"
79
80 # Compare wanted version to what config script returned.
81 # If I knew what library was being run, i'd probably also compile
82 # a test program at this point (which also extracted and tested
83 # the version in some library-specific way)
84 if test "$DOWN[]_config_major_version" -lt \
85 "$DOWN[]_wanted_major_version" \
86 -o \( "$DOWN[]_config_major_version" -eq \
87 "$DOWN[]_wanted_major_version" \
88 -a "$DOWN[]_config_minor_version" -lt \
89 "$DOWN[]_wanted_minor_version" \) \
90 -o \( "$DOWN[]_config_major_version" -eq \
91 "$DOWN[]_wanted_major_version" \
92 -a "$DOWN[]_config_minor_version" -eq \
93 "$DOWN[]_wanted_minor_version" \
94 -a "$DOWN[]_config_micro_version" -lt \
95 "$DOWN[]_wanted_micro_version" \) ; then
96 # older version found
97 no_[]DOWN=yes
98 echo -n "*** An old version of $1 "
99 echo -n "($DOWN[]_config_major_version"
100 echo -n ".$DOWN[]_config_minor_version"
101 echo ".$DOWN[]_config_micro_version) was found."
102 echo -n "*** You need a version of $1 newer than "
103 echo -n "$DOWN[]_wanted_major_version"
104 echo -n ".$DOWN[]_wanted_minor_version"
105 echo ".$DOWN[]_wanted_micro_version."
106 echo "***"
107 echo "*** If you have already installed a sufficiently new version, this error"
108 echo "*** probably means that the wrong copy of the DOWN-config shell script is"
109 echo "*** being found. The easiest way to fix this is to remove the old version"
110 echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the"
111 echo "*** correct copy of DOWN-config. (In this case, you will have to"
112 echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
113 echo "*** so that the correct libraries are found at run-time)"
114 fi
115 ])
116 fi
117 if test "x$no_[]DOWN" = x ; then
118 AC_MSG_RESULT(yes)
119 ifelse([$3], , :, [$3])
120 else
121 AC_MSG_RESULT(no)
122 if test "$UP[]_CONFIG" = "no" ; then
123 echo "*** The DOWN-config script installed by $1 could not be found"
124 echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in"
125 echo "*** your path, or set the UP[]_CONFIG environment variable to the"
126 echo "*** full path to DOWN-config."
127 fi
128 UP[]_CFLAGS=""
129 UP[]_LIBS=""
130 ifelse([$4], , :, [$4])
131 fi
132 AC_SUBST(UP[]_CFLAGS)
133 AC_SUBST(UP[]_LIBS)
134
135 popdef([UP])
136 popdef([DOWN])
137])
diff --git a/libraries/eet/m4/efl_binary.m4 b/libraries/eet/m4/efl_binary.m4
new file mode 100644
index 0000000..fc2f200
--- /dev/null
+++ b/libraries/eet/m4/efl_binary.m4
@@ -0,0 +1,79 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that checks if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary)
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_binary (- is transformed into _)
9dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_BIN],
12[
13
14m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
16
17have_[]m4_defn([DOWN])="yes"
18
19dnl configure option
20
21AC_ARG_ENABLE([$1],
22 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
23 [
24 if test "x${enableval}" = "xyes" ; then
25 have_[]m4_defn([DOWN])="yes"
26 else
27 have_[]m4_defn([DOWN])="no"
28 fi
29 ])
30
31AC_MSG_CHECKING([whether to build ]DOWN[ binary])
32AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
33
34if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
35 UP[]_PRG=DOWN[${EXEEXT}]
36fi
37
38AC_SUBST(UP[]_PRG)
39
40AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
41
42AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3])
43
44])
45
46dnl Macro that specifies the binary to be used
47
48dnl Usage: EFL_WITH_BIN(binary, package, msg)
49dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
50dnl Define with_binary (- is transformed into _)
51dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
52
53AC_DEFUN([EFL_WITH_BIN],
54[
55
56m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
57m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
58
59AC_REQUIRE([PKG_PROG_PKG_CONFIG])
60AC_MSG_NOTICE([$PKG_CONFIG])
61
62with_[]m4_defn([DOWN])=m4_esyscmd($PKG_CONFIG --variable=prefix $2)/bin/m4_defn([DOWN])
63
64dnl configure option
65
66AC_ARG_WITH([$1],
67 [AC_HELP_STRING([--with-$1-bin=PATH], [specify a specific path to ]DOWN)],
68 [
69 with_[]m4_defn([DOWN])=$withval
70 _efl_msg="( explicitely set)"
71 ])
72
73AC_MSG_NOTICE([$msg: ]m4_defn([DOWN])[$_efl_msg])
74
75AC_SUBST(with_[]m4_defn([DOWN]))
76
77AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$4], [$5])
78
79])
diff --git a/libraries/eet/m4/efl_compiler_flag.m4 b/libraries/eet/m4/efl_compiler_flag.m4
new file mode 100644
index 0000000..618c6a6
--- /dev/null
+++ b/libraries/eet/m4/efl_compiler_flag.m4
@@ -0,0 +1,57 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl and Albin Tonnerre <albin dot tonnerre at gmail dot com>
3dnl That code is public domain and can be freely used or copied.
4
5dnl Macro that checks if a compiler flag is supported by the compiler.
6
7dnl Usage: EFL_COMPILER_FLAG(flag)
8dnl flag is added to CFLAGS if supported.
9
10AC_DEFUN([EFL_COMPILER_FLAG],
11[
12
13CFLAGS_save="${CFLAGS}"
14CFLAGS="${CFLAGS} $1"
15
16AC_LANG_PUSH([C])
17AC_MSG_CHECKING([whether the compiler supports $1])
18
19AC_COMPILE_IFELSE(
20 [AC_LANG_PROGRAM([[]])],
21 [have_flag="yes"],
22 [have_flag="no"])
23AC_MSG_RESULT([${have_flag}])
24
25if test "x${have_flag}" = "xno" ; then
26 CFLAGS="${CFLAGS_save}"
27fi
28AC_LANG_POP([C])
29
30])
31
32dnl Macro that checks if a linker flag is supported by the compiler.
33
34dnl Usage: EFL_LINKER_FLAG(flag)
35dnl flag is added to CFLAGS if supported (will be passed to ld anyway).
36
37AC_DEFUN([EFL_LINKER_FLAG],
38[
39
40CFLAGS_save="${CFLAGS}"
41CFLAGS="${CFLAGS} $1"
42
43AC_LANG_PUSH([C])
44AC_MSG_CHECKING([whether the compiler supports $1])
45
46AC_LINK_IFELSE(
47 [AC_LANG_PROGRAM([[]])],
48 [have_flag="yes"],
49 [have_flag="no"])
50AC_MSG_RESULT([${have_flag}])
51
52if test "x${have_flag}" = "xno" ; then
53 CFLAGS="${CFLAGS_save}"
54fi
55AC_LANG_POP([C])
56
57])
diff --git a/libraries/eet/m4/efl_coverage.m4 b/libraries/eet/m4/efl_coverage.m4
new file mode 100644
index 0000000..85d0321
--- /dev/null
+++ b/libraries/eet/m4/efl_coverage.m4
@@ -0,0 +1,62 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if coverage support is wanted and, if yes, if
5dnl lcov is available.
6
7dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl The parameter 'tests' is used if a dependency is needed. If set to "yes",
9dnl the dependency is available.
10dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables
11dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE
12
13AC_DEFUN([EFL_CHECK_COVERAGE],
14[
15
16dnl configure option
17
18AC_ARG_ENABLE([coverage],
19 [AC_HELP_STRING([--enable-coverage], [enable coverage profiling instrumentation @<:@default=disabled@:>@])],
20 [
21 if test "x${enableval}" = "xyes" ; then
22 _efl_enable_coverage="yes"
23 else
24 _efl_enable_coverage="no"
25 fi
26 ],
27 [_efl_enable_coverage="no"])
28
29AC_MSG_CHECKING([whether to use profiling instrumentation])
30AC_MSG_RESULT([$_efl_enable_coverage])
31
32dnl lcov check
33
34if test "x$_efl_enable_coverage" = "xyes" && test ! "x$1" = "xyes" ; then
35 AC_MSG_WARN([Coverage report requested but tests not being built, disable profiling instrumentation.])
36 AC_MSG_WARN([Run configure with --enable-tests])
37 _efl_enable_coverage="no"
38fi
39
40if test "x$_efl_enable_coverage" = "xyes" ; then
41 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
42 if test "x$have_lcov" = "xyes" ; then
43 EFL_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
44 EFL_COVERAGE_LIBS="-lgcov"
45# remove any optimisation flag and force debug symbols
46 EFL_DEBUG_CFLAGS="-g -O0 -DDEBUG"
47 else
48 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
49 _efl_enable_coverage="no"
50 fi
51fi
52
53dnl Substitution
54AC_SUBST(EFL_COVERAGE_CFLAGS)
55AC_SUBST(EFL_COVERAGE_LIBS)
56
57AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
58
59AS_IF([test "x$_efl_enable_coverage" = "xyes"], [$2], [$3])
60])
61
62dnl End of efl_coverage.m4
diff --git a/libraries/eet/m4/efl_doxygen.m4 b/libraries/eet/m4/efl_doxygen.m4
new file mode 100644
index 0000000..7324af3
--- /dev/null
+++ b/libraries/eet/m4/efl_doxygen.m4
@@ -0,0 +1,94 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if doxygen is available or not.
5
6dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Test for the doxygen program
8dnl Defines efl_doxygen
9dnl Defines the automake conditionnal EFL_BUILD_DOC
10dnl
11AC_DEFUN([EFL_CHECK_DOXYGEN],
12[
13
14dnl
15dnl Disable the build of the documentation
16dnl
17AC_ARG_ENABLE([doc],
18 [AC_HELP_STRING(
19 [--disable-doc],
20 [Disable documentation build @<:@default=enabled@:>@])],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 efl_enable_doc="yes"
24 else
25 efl_enable_doc="no"
26 fi
27 ],
28 [efl_enable_doc="yes"])
29
30AC_MSG_CHECKING([whether to build documentation])
31AC_MSG_RESULT([${efl_enable_doc}])
32
33if test "x${efl_enable_doc}" = "xyes" ; then
34
35dnl Specify the file name, without path
36
37 efl_doxygen="doxygen"
38
39 AC_ARG_WITH([doxygen],
40 [AC_HELP_STRING(
41 [--with-doxygen=FILE],
42 [doxygen program to use @<:@default=doxygen@:>@])],
43
44dnl Check the given doxygen program.
45
46 [efl_doxygen=${withval}
47 AC_CHECK_PROG([efl_have_doxygen],
48 [${efl_doxygen}],
49 [yes],
50 [no])
51 if test "x${efl_have_doxygen}" = "xno" ; then
52 echo "WARNING:"
53 echo "The doxygen program you specified:"
54 echo "${efl_doxygen}"
55 echo "was not found. Please check the path and make sure "
56 echo "the program exists and is executable."
57 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
58 fi
59 ],
60 [AC_CHECK_PROG([efl_have_doxygen],
61 [${efl_doxygen}],
62 [yes],
63 [no])
64 if test "x${efl_have_doxygen}" = "xno" ; then
65 echo "WARNING:"
66 echo "The doxygen program was not found in your execute path."
67 echo "You may have doxygen installed somewhere not covered by your path."
68 echo ""
69 echo "If this is the case make sure you have the packages installed, AND"
70 echo "that the doxygen program is in your execute path (see your"
71 echo "shell manual page on setting the \$PATH environment variable), OR"
72 echo "alternatively, specify the program to use with --with-doxygen."
73 AC_MSG_WARN([no doxygen detected. Documentation will not be built])
74 fi
75 ])
76else
77 efl_have_doxygen="no"
78fi
79
80dnl
81dnl Substitution
82dnl
83AC_SUBST([efl_doxygen])
84
85if ! test "x${efl_have_doxygen}" = "xyes" ; then
86 efl_enable_doc="no"
87fi
88
89AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_have_doxygen}" = "xyes")
90
91AS_IF([test "x$efl_have_doxygen" = "xyes"], [$1], [$2])
92])
93
94dnl End of efl_doxygen.m4
diff --git a/libraries/eet/m4/efl_fnmatch.m4 b/libraries/eet/m4/efl_fnmatch.m4
new file mode 100644
index 0000000..a92ac6b
--- /dev/null
+++ b/libraries/eet/m4/efl_fnmatch.m4
@@ -0,0 +1,31 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if fnmatch functions are available or not.
5
6dnl Usage: EFL_CHECK_FNMATCH([, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(EFL_FNMATCH_LIBS)
8
9AC_DEFUN([EFL_CHECK_FNMATCH],
10[
11
12AC_CHECK_HEADER([fnmatch.h], [_efl_have_fnmatch="yes"], [_efl_have_fnmatch="no"])
13
14if test "x${_efl_have_fnmatch}" = "xyes" ; then
15 AC_SEARCH_LIBS([fnmatch],
16 [fnmatch evil iberty],
17 [_efl_have_fnmatch="yes"],
18 [_efl_have_fnmatch="no"])
19fi
20
21EFL_FNMATCH_LIBS=""
22
23if (! test "x${ac_cv_search_fnmatch}" = "xnone required") && (! test "x${ac_cv_search_fnmatch}" = "xno") && (! test "x${ac_cv_search_fnmatch}" = "x-levil") ; then
24 EFL_FNMATCH_LIBS=${ac_cv_search_fnmatch}
25fi
26
27AC_SUBST(EFL_FNMATCH_LIBS)
28
29AS_IF([test "x$_efl_have_fnmatch" = "xyes"], [$1], [$2])
30
31])
diff --git a/libraries/eet/m4/efl_path_max.m4 b/libraries/eet/m4/efl_path_max.m4
new file mode 100644
index 0000000..f57bfd2
--- /dev/null
+++ b/libraries/eet/m4/efl_path_max.m4
@@ -0,0 +1,36 @@
1dnl Check for PATH_MAX in limits.h, and define a default value if not found
2dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
3
4dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
5dnl
6dnl If PATH_MAX is not defined in <limits.h>, defines it
7dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
8dnl to using 4096
9
10AC_DEFUN([EFL_CHECK_PATH_MAX],
11[
12
13default_max=m4_default([$1], "4096")
14AC_LANG_PUSH([C])
15
16AC_MSG_CHECKING([for PATH_MAX in limits.h])
17AC_COMPILE_IFELSE(
18 [AC_LANG_PROGRAM(
19 [[
20#include <limits.h>
21 ]],
22 [[
23int i = PATH_MAX;
24 ]])],
25 [AC_MSG_RESULT([yes])],
26 [
27 AC_DEFINE_UNQUOTED([PATH_MAX],
28 [${default_max}],
29 [default value since PATH_MAX is not defined])
30 AC_MSG_RESULT([no: using ${default_max}])
31 ])
32
33AC_LANG_POP([C])
34
35])
36dnl end of efl_path_max.m4
diff --git a/libraries/eet/m4/efl_tests.m4 b/libraries/eet/m4/efl_tests.m4
new file mode 100644
index 0000000..3a4dfe2
--- /dev/null
+++ b/libraries/eet/m4/efl_tests.m4
@@ -0,0 +1,43 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if tests programs are wanted and if yes, if
5dnl the Check library is available.
6
7dnl Usage: EFL_CHECK_TESTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl Define the automake conditionnal EFL_ENABLE_TESTS
9
10AC_DEFUN([EFL_CHECK_TESTS],
11[
12
13dnl configure option
14
15AC_ARG_ENABLE([tests],
16 [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])],
17 [
18 if test "x${enableval}" = "xyes" ; then
19 _efl_enable_tests="yes"
20 else
21 _efl_enable_tests="no"
22 fi
23 ],
24 [_efl_enable_tests="no"])
25
26AC_MSG_CHECKING([whether tests are built])
27AC_MSG_RESULT([${_efl_enable_tests}])
28
29AC_REQUIRE([PKG_PROG_PKG_CONFIG])
30
31if test "x${_efl_enable_tests}" = "xyes" ; then
32 PKG_CHECK_MODULES([CHECK],
33 [check >= 0.9.5],
34 [dummy="yes"],
35 [_efl_enable_tests="no"])
36fi
37
38AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
39
40AS_IF([test "x$_efl_enable_tests" = "xyes"], [$1], [$2])
41])
42
43dnl End of efl_tests.m4
diff --git a/libraries/eet/m4/libtool.m4 b/libraries/eet/m4/libtool.m4
new file mode 100644
index 0000000..a3fee53
--- /dev/null
+++ b/libraries/eet/m4/libtool.m4
@@ -0,0 +1,7377 @@
1# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2#
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4# 2006, 2007, 2008 Free Software Foundation, Inc.
5# Written by Gordon Matzigkeit, 1996
6#
7# This file is free software; the Free Software Foundation gives
8# unlimited permission to copy and/or distribute it, with or without
9# modifications, as long as this notice is preserved.
10
11m4_define([_LT_COPYING], [dnl
12# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13# 2006, 2007, 2008 Free Software Foundation, Inc.
14# Written by Gordon Matzigkeit, 1996
15#
16# This file is part of GNU Libtool.
17#
18# GNU Libtool is free software; you can redistribute it and/or
19# modify it under the terms of the GNU General Public License as
20# published by the Free Software Foundation; either version 2 of
21# the License, or (at your option) any later version.
22#
23# As a special exception to the GNU General Public License,
24# if you distribute this file as part of a program or library that
25# is built using GNU Libtool, you may include this file under the
26# same distribution terms that you use for the rest of that program.
27#
28# GNU Libtool is distributed in the hope that it will be useful,
29# but WITHOUT ANY WARRANTY; without even the implied warranty of
30# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31# GNU General Public License for more details.
32#
33# You should have received a copy of the GNU General Public License
34# along with GNU Libtool; see the file COPYING. If not, a copy
35# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
36# obtained by writing to the Free Software Foundation, Inc.,
37# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
38])
39
40# serial 56 LT_INIT
41
42
43# LT_PREREQ(VERSION)
44# ------------------
45# Complain and exit if this libtool version is less that VERSION.
46m4_defun([LT_PREREQ],
47[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
48 [m4_default([$3],
49 [m4_fatal([Libtool version $1 or higher is required],
50 63)])],
51 [$2])])
52
53
54# _LT_CHECK_BUILDDIR
55# ------------------
56# Complain if the absolute build directory name contains unusual characters
57m4_defun([_LT_CHECK_BUILDDIR],
58[case `pwd` in
59 *\ * | *\ *)
60 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
61esac
62])
63
64
65# LT_INIT([OPTIONS])
66# ------------------
67AC_DEFUN([LT_INIT],
68[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
69AC_BEFORE([$0], [LT_LANG])dnl
70AC_BEFORE([$0], [LT_OUTPUT])dnl
71AC_BEFORE([$0], [LTDL_INIT])dnl
72m4_require([_LT_CHECK_BUILDDIR])dnl
73
74dnl Autoconf doesn't catch unexpanded LT_ macros by default:
75m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
76m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
77dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
78dnl unless we require an AC_DEFUNed macro:
79AC_REQUIRE([LTOPTIONS_VERSION])dnl
80AC_REQUIRE([LTSUGAR_VERSION])dnl
81AC_REQUIRE([LTVERSION_VERSION])dnl
82AC_REQUIRE([LTOBSOLETE_VERSION])dnl
83m4_require([_LT_PROG_LTMAIN])dnl
84
85dnl Parse OPTIONS
86_LT_SET_OPTIONS([$0], [$1])
87
88# This can be used to rebuild libtool when needed
89LIBTOOL_DEPS="$ltmain"
90
91# Always use our own libtool.
92LIBTOOL='$(SHELL) $(top_builddir)/libtool'
93AC_SUBST(LIBTOOL)dnl
94
95_LT_SETUP
96
97# Only expand once:
98m4_define([LT_INIT])
99])# LT_INIT
100
101# Old names:
102AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
103AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
104dnl aclocal-1.4 backwards compatibility:
105dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
106dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
107
108
109# _LT_CC_BASENAME(CC)
110# -------------------
111# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
112m4_defun([_LT_CC_BASENAME],
113[for cc_temp in $1""; do
114 case $cc_temp in
115 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
117 \-*) ;;
118 *) break;;
119 esac
120done
121cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
122])
123
124
125# _LT_FILEUTILS_DEFAULTS
126# ----------------------
127# It is okay to use these file commands and assume they have been set
128# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
129m4_defun([_LT_FILEUTILS_DEFAULTS],
130[: ${CP="cp -f"}
131: ${MV="mv -f"}
132: ${RM="rm -f"}
133])# _LT_FILEUTILS_DEFAULTS
134
135
136# _LT_SETUP
137# ---------
138m4_defun([_LT_SETUP],
139[AC_REQUIRE([AC_CANONICAL_HOST])dnl
140AC_REQUIRE([AC_CANONICAL_BUILD])dnl
141_LT_DECL([], [host_alias], [0], [The host system])dnl
142_LT_DECL([], [host], [0])dnl
143_LT_DECL([], [host_os], [0])dnl
144dnl
145_LT_DECL([], [build_alias], [0], [The build system])dnl
146_LT_DECL([], [build], [0])dnl
147_LT_DECL([], [build_os], [0])dnl
148dnl
149AC_REQUIRE([AC_PROG_CC])dnl
150AC_REQUIRE([LT_PATH_LD])dnl
151AC_REQUIRE([LT_PATH_NM])dnl
152dnl
153AC_REQUIRE([AC_PROG_LN_S])dnl
154test -z "$LN_S" && LN_S="ln -s"
155_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
156dnl
157AC_REQUIRE([LT_CMD_MAX_LEN])dnl
158_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
159_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
160dnl
161m4_require([_LT_FILEUTILS_DEFAULTS])dnl
162m4_require([_LT_CHECK_SHELL_FEATURES])dnl
163m4_require([_LT_CMD_RELOAD])dnl
164m4_require([_LT_CHECK_MAGIC_METHOD])dnl
165m4_require([_LT_CMD_OLD_ARCHIVE])dnl
166m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
167
168_LT_CONFIG_LIBTOOL_INIT([
169# See if we are running on zsh, and set the options which allow our
170# commands through without removal of \ escapes INIT.
171if test -n "\${ZSH_VERSION+set}" ; then
172 setopt NO_GLOB_SUBST
173fi
174])
175if test -n "${ZSH_VERSION+set}" ; then
176 setopt NO_GLOB_SUBST
177fi
178
179_LT_CHECK_OBJDIR
180
181m4_require([_LT_TAG_COMPILER])dnl
182_LT_PROG_ECHO_BACKSLASH
183
184case $host_os in
185aix3*)
186 # AIX sometimes has problems with the GCC collect2 program. For some
187 # reason, if we set the COLLECT_NAMES environment variable, the problems
188 # vanish in a puff of smoke.
189 if test "X${COLLECT_NAMES+set}" != Xset; then
190 COLLECT_NAMES=
191 export COLLECT_NAMES
192 fi
193 ;;
194esac
195
196# Sed substitution that helps us do robust quoting. It backslashifies
197# metacharacters that are still active within double-quoted strings.
198sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
199
200# Same as above, but do not quote variable references.
201double_quote_subst='s/\([["`\\]]\)/\\\1/g'
202
203# Sed substitution to delay expansion of an escaped shell variable in a
204# double_quote_subst'ed string.
205delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
206
207# Sed substitution to delay expansion of an escaped single quote.
208delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
209
210# Sed substitution to avoid accidental globbing in evaled expressions
211no_glob_subst='s/\*/\\\*/g'
212
213# Global variables:
214ofile=libtool
215can_build_shared=yes
216
217# All known linkers require a `.a' archive for static linking (except MSVC,
218# which needs '.lib').
219libext=a
220
221with_gnu_ld="$lt_cv_prog_gnu_ld"
222
223old_CC="$CC"
224old_CFLAGS="$CFLAGS"
225
226# Set sane defaults for various variables
227test -z "$CC" && CC=cc
228test -z "$LTCC" && LTCC=$CC
229test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
230test -z "$LD" && LD=ld
231test -z "$ac_objext" && ac_objext=o
232
233_LT_CC_BASENAME([$compiler])
234
235# Only perform the check for file, if the check method requires it
236test -z "$MAGIC_CMD" && MAGIC_CMD=file
237case $deplibs_check_method in
238file_magic*)
239 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
240 _LT_PATH_MAGIC
241 fi
242 ;;
243esac
244
245# Use C for the default configuration in the libtool script
246LT_SUPPORTED_TAG([CC])
247_LT_LANG_C_CONFIG
248_LT_LANG_DEFAULT_CONFIG
249_LT_CONFIG_COMMANDS
250])# _LT_SETUP
251
252
253# _LT_PROG_LTMAIN
254# ---------------
255# Note that this code is called both from `configure', and `config.status'
256# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
257# `config.status' has no value for ac_aux_dir unless we are using Automake,
258# so we pass a copy along to make sure it has a sensible value anyway.
259m4_defun([_LT_PROG_LTMAIN],
260[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
261_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
262ltmain="$ac_aux_dir/ltmain.sh"
263])# _LT_PROG_LTMAIN
264
265
266## ------------------------------------- ##
267## Accumulate code for creating libtool. ##
268## ------------------------------------- ##
269
270# So that we can recreate a full libtool script including additional
271# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
272# in macros and then make a single call at the end using the `libtool'
273# label.
274
275
276# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
277# ----------------------------------------
278# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
279m4_define([_LT_CONFIG_LIBTOOL_INIT],
280[m4_ifval([$1],
281 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
282 [$1
283])])])
284
285# Initialize.
286m4_define([_LT_OUTPUT_LIBTOOL_INIT])
287
288
289# _LT_CONFIG_LIBTOOL([COMMANDS])
290# ------------------------------
291# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
292m4_define([_LT_CONFIG_LIBTOOL],
293[m4_ifval([$1],
294 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
295 [$1
296])])])
297
298# Initialize.
299m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
300
301
302# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
303# -----------------------------------------------------
304m4_defun([_LT_CONFIG_SAVE_COMMANDS],
305[_LT_CONFIG_LIBTOOL([$1])
306_LT_CONFIG_LIBTOOL_INIT([$2])
307])
308
309
310# _LT_FORMAT_COMMENT([COMMENT])
311# -----------------------------
312# Add leading comment marks to the start of each line, and a trailing
313# full-stop to the whole comment if one is not present already.
314m4_define([_LT_FORMAT_COMMENT],
315[m4_ifval([$1], [
316m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
317 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
318)])
319
320
321
322## ------------------------ ##
323## FIXME: Eliminate VARNAME ##
324## ------------------------ ##
325
326
327# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
328# -------------------------------------------------------------------
329# CONFIGNAME is the name given to the value in the libtool script.
330# VARNAME is the (base) name used in the configure script.
331# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
332# VARNAME. Any other value will be used directly.
333m4_define([_LT_DECL],
334[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
335 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
336 [m4_ifval([$1], [$1], [$2])])
337 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
338 m4_ifval([$4],
339 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
340 lt_dict_add_subkey([lt_decl_dict], [$2],
341 [tagged?], [m4_ifval([$5], [yes], [no])])])
342])
343
344
345# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
346# --------------------------------------------------------
347m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
348
349
350# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
351# ------------------------------------------------
352m4_define([lt_decl_tag_varnames],
353[_lt_decl_filter([tagged?], [yes], $@)])
354
355
356# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
357# ---------------------------------------------------------
358m4_define([_lt_decl_filter],
359[m4_case([$#],
360 [0], [m4_fatal([$0: too few arguments: $#])],
361 [1], [m4_fatal([$0: too few arguments: $#: $1])],
362 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
363 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
364 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
365])
366
367
368# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
369# --------------------------------------------------
370m4_define([lt_decl_quote_varnames],
371[_lt_decl_filter([value], [1], $@)])
372
373
374# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
375# ---------------------------------------------------
376m4_define([lt_decl_dquote_varnames],
377[_lt_decl_filter([value], [2], $@)])
378
379
380# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
381# ---------------------------------------------------
382m4_define([lt_decl_varnames_tagged],
383[m4_assert([$# <= 2])dnl
384_$0(m4_quote(m4_default([$1], [[, ]])),
385 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
386 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
387m4_define([_lt_decl_varnames_tagged],
388[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
389
390
391# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
392# ------------------------------------------------
393m4_define([lt_decl_all_varnames],
394[_$0(m4_quote(m4_default([$1], [[, ]])),
395 m4_if([$2], [],
396 m4_quote(lt_decl_varnames),
397 m4_quote(m4_shift($@))))[]dnl
398])
399m4_define([_lt_decl_all_varnames],
400[lt_join($@, lt_decl_varnames_tagged([$1],
401 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
402])
403
404
405# _LT_CONFIG_STATUS_DECLARE([VARNAME])
406# ------------------------------------
407# Quote a variable value, and forward it to `config.status' so that its
408# declaration there will have the same value as in `configure'. VARNAME
409# must have a single quote delimited value for this to work.
410m4_define([_LT_CONFIG_STATUS_DECLARE],
411[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
412
413
414# _LT_CONFIG_STATUS_DECLARATIONS
415# ------------------------------
416# We delimit libtool config variables with single quotes, so when
417# we write them to config.status, we have to be sure to quote all
418# embedded single quotes properly. In configure, this macro expands
419# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
420#
421# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
422m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
423[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
424 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
425
426
427# _LT_LIBTOOL_TAGS
428# ----------------
429# Output comment and list of tags supported by the script
430m4_defun([_LT_LIBTOOL_TAGS],
431[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
432available_tags="_LT_TAGS"dnl
433])
434
435
436# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
437# -----------------------------------
438# Extract the dictionary values for VARNAME (optionally with TAG) and
439# expand to a commented shell variable setting:
440#
441# # Some comment about what VAR is for.
442# visible_name=$lt_internal_name
443m4_define([_LT_LIBTOOL_DECLARE],
444[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
445 [description])))[]dnl
446m4_pushdef([_libtool_name],
447 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
448m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
449 [0], [_libtool_name=[$]$1],
450 [1], [_libtool_name=$lt_[]$1],
451 [2], [_libtool_name=$lt_[]$1],
452 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
453m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
454])
455
456
457# _LT_LIBTOOL_CONFIG_VARS
458# -----------------------
459# Produce commented declarations of non-tagged libtool config variables
460# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
461# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
462# section) are produced by _LT_LIBTOOL_TAG_VARS.
463m4_defun([_LT_LIBTOOL_CONFIG_VARS],
464[m4_foreach([_lt_var],
465 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
466 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
467
468
469# _LT_LIBTOOL_TAG_VARS(TAG)
470# -------------------------
471m4_define([_LT_LIBTOOL_TAG_VARS],
472[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
473 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
474
475
476# _LT_TAGVAR(VARNAME, [TAGNAME])
477# ------------------------------
478m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
479
480
481# _LT_CONFIG_COMMANDS
482# -------------------
483# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
484# variables for single and double quote escaping we saved from calls
485# to _LT_DECL, we can put quote escaped variables declarations
486# into `config.status', and then the shell code to quote escape them in
487# for loops in `config.status'. Finally, any additional code accumulated
488# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
489m4_defun([_LT_CONFIG_COMMANDS],
490[AC_PROVIDE_IFELSE([LT_OUTPUT],
491 dnl If the libtool generation code has been placed in $CONFIG_LT,
492 dnl instead of duplicating it all over again into config.status,
493 dnl then we will have config.status run $CONFIG_LT later, so it
494 dnl needs to know what name is stored there:
495 [AC_CONFIG_COMMANDS([libtool],
496 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
497 dnl If the libtool generation code is destined for config.status,
498 dnl expand the accumulated commands and init code now:
499 [AC_CONFIG_COMMANDS([libtool],
500 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
501])#_LT_CONFIG_COMMANDS
502
503
504# Initialize.
505m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
506[
507
508# The HP-UX ksh and POSIX shell print the target directory to stdout
509# if CDPATH is set.
510(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
511
512sed_quote_subst='$sed_quote_subst'
513double_quote_subst='$double_quote_subst'
514delay_variable_subst='$delay_variable_subst'
515_LT_CONFIG_STATUS_DECLARATIONS
516LTCC='$LTCC'
517LTCFLAGS='$LTCFLAGS'
518compiler='$compiler_DEFAULT'
519
520# Quote evaled strings.
521for var in lt_decl_all_varnames([[ \
522]], lt_decl_quote_varnames); do
523 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
524 *[[\\\\\\\`\\"\\\$]]*)
525 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
526 ;;
527 *)
528 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
529 ;;
530 esac
531done
532
533# Double-quote double-evaled strings.
534for var in lt_decl_all_varnames([[ \
535]], lt_decl_dquote_varnames); do
536 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
537 *[[\\\\\\\`\\"\\\$]]*)
538 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
539 ;;
540 *)
541 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
542 ;;
543 esac
544done
545
546# Fix-up fallback echo if it was mangled by the above quoting rules.
547case \$lt_ECHO in
548*'\\\[$]0 --fallback-echo"')dnl "
549 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
550 ;;
551esac
552
553_LT_OUTPUT_LIBTOOL_INIT
554])
555
556
557# LT_OUTPUT
558# ---------
559# This macro allows early generation of the libtool script (before
560# AC_OUTPUT is called), incase it is used in configure for compilation
561# tests.
562AC_DEFUN([LT_OUTPUT],
563[: ${CONFIG_LT=./config.lt}
564AC_MSG_NOTICE([creating $CONFIG_LT])
565cat >"$CONFIG_LT" <<_LTEOF
566#! $SHELL
567# Generated by $as_me.
568# Run this file to recreate a libtool stub with the current configuration.
569
570lt_cl_silent=false
571SHELL=\${CONFIG_SHELL-$SHELL}
572_LTEOF
573
574cat >>"$CONFIG_LT" <<\_LTEOF
575AS_SHELL_SANITIZE
576_AS_PREPARE
577
578exec AS_MESSAGE_FD>&1
579exec AS_MESSAGE_LOG_FD>>config.log
580{
581 echo
582 AS_BOX([Running $as_me.])
583} >&AS_MESSAGE_LOG_FD
584
585lt_cl_help="\
586\`$as_me' creates a local libtool stub from the current configuration,
587for use in further configure time tests before the real libtool is
588generated.
589
590Usage: $[0] [[OPTIONS]]
591
592 -h, --help print this help, then exit
593 -V, --version print version number, then exit
594 -q, --quiet do not print progress messages
595 -d, --debug don't remove temporary files
596
597Report bugs to <bug-libtool@gnu.org>."
598
599lt_cl_version="\
600m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
601m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
602configured by $[0], generated by m4_PACKAGE_STRING.
603
604Copyright (C) 2008 Free Software Foundation, Inc.
605This config.lt script is free software; the Free Software Foundation
606gives unlimited permision to copy, distribute and modify it."
607
608while test $[#] != 0
609do
610 case $[1] in
611 --version | --v* | -V )
612 echo "$lt_cl_version"; exit 0 ;;
613 --help | --h* | -h )
614 echo "$lt_cl_help"; exit 0 ;;
615 --debug | --d* | -d )
616 debug=: ;;
617 --quiet | --q* | --silent | --s* | -q )
618 lt_cl_silent=: ;;
619
620 -*) AC_MSG_ERROR([unrecognized option: $[1]
621Try \`$[0] --help' for more information.]) ;;
622
623 *) AC_MSG_ERROR([unrecognized argument: $[1]
624Try \`$[0] --help' for more information.]) ;;
625 esac
626 shift
627done
628
629if $lt_cl_silent; then
630 exec AS_MESSAGE_FD>/dev/null
631fi
632_LTEOF
633
634cat >>"$CONFIG_LT" <<_LTEOF
635_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
636_LTEOF
637
638cat >>"$CONFIG_LT" <<\_LTEOF
639AC_MSG_NOTICE([creating $ofile])
640_LT_OUTPUT_LIBTOOL_COMMANDS
641AS_EXIT(0)
642_LTEOF
643chmod +x "$CONFIG_LT"
644
645# configure is writing to config.log, but config.lt does its own redirection,
646# appending to config.log, which fails on DOS, as config.log is still kept
647# open by configure. Here we exec the FD to /dev/null, effectively closing
648# config.log, so it can be properly (re)opened and appended to by config.lt.
649if test "$no_create" != yes; then
650 lt_cl_success=:
651 test "$silent" = yes &&
652 lt_config_lt_args="$lt_config_lt_args --quiet"
653 exec AS_MESSAGE_LOG_FD>/dev/null
654 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
655 exec AS_MESSAGE_LOG_FD>>config.log
656 $lt_cl_success || AS_EXIT(1)
657fi
658])# LT_OUTPUT
659
660
661# _LT_CONFIG(TAG)
662# ---------------
663# If TAG is the built-in tag, create an initial libtool script with a
664# default configuration from the untagged config vars. Otherwise add code
665# to config.status for appending the configuration named by TAG from the
666# matching tagged config vars.
667m4_defun([_LT_CONFIG],
668[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
669_LT_CONFIG_SAVE_COMMANDS([
670 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
671 m4_if(_LT_TAG, [C], [
672 # See if we are running on zsh, and set the options which allow our
673 # commands through without removal of \ escapes.
674 if test -n "${ZSH_VERSION+set}" ; then
675 setopt NO_GLOB_SUBST
676 fi
677
678 cfgfile="${ofile}T"
679 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
680 $RM "$cfgfile"
681
682 cat <<_LT_EOF >> "$cfgfile"
683#! $SHELL
684
685# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
686# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
687# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
688# NOTE: Changes made to this file will be lost: look at ltmain.sh.
689#
690_LT_COPYING
691_LT_LIBTOOL_TAGS
692
693# ### BEGIN LIBTOOL CONFIG
694_LT_LIBTOOL_CONFIG_VARS
695_LT_LIBTOOL_TAG_VARS
696# ### END LIBTOOL CONFIG
697
698_LT_EOF
699
700 case $host_os in
701 aix3*)
702 cat <<\_LT_EOF >> "$cfgfile"
703# AIX sometimes has problems with the GCC collect2 program. For some
704# reason, if we set the COLLECT_NAMES environment variable, the problems
705# vanish in a puff of smoke.
706if test "X${COLLECT_NAMES+set}" != Xset; then
707 COLLECT_NAMES=
708 export COLLECT_NAMES
709fi
710_LT_EOF
711 ;;
712 esac
713
714 _LT_PROG_LTMAIN
715
716 # We use sed instead of cat because bash on DJGPP gets confused if
717 # if finds mixed CR/LF and LF-only lines. Since sed operates in
718 # text mode, it properly converts lines to CR/LF. This bash problem
719 # is reportedly fixed, but why not run on old versions too?
720 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
721 || (rm -f "$cfgfile"; exit 1)
722
723 _LT_PROG_XSI_SHELLFNS
724
725 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
726 || (rm -f "$cfgfile"; exit 1)
727
728 mv -f "$cfgfile" "$ofile" ||
729 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
730 chmod +x "$ofile"
731],
732[cat <<_LT_EOF >> "$ofile"
733
734dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
735dnl in a comment (ie after a #).
736# ### BEGIN LIBTOOL TAG CONFIG: $1
737_LT_LIBTOOL_TAG_VARS(_LT_TAG)
738# ### END LIBTOOL TAG CONFIG: $1
739_LT_EOF
740])dnl /m4_if
741],
742[m4_if([$1], [], [
743 PACKAGE='$PACKAGE'
744 VERSION='$VERSION'
745 TIMESTAMP='$TIMESTAMP'
746 RM='$RM'
747 ofile='$ofile'], [])
748])dnl /_LT_CONFIG_SAVE_COMMANDS
749])# _LT_CONFIG
750
751
752# LT_SUPPORTED_TAG(TAG)
753# ---------------------
754# Trace this macro to discover what tags are supported by the libtool
755# --tag option, using:
756# autoconf --trace 'LT_SUPPORTED_TAG:$1'
757AC_DEFUN([LT_SUPPORTED_TAG], [])
758
759
760# C support is built-in for now
761m4_define([_LT_LANG_C_enabled], [])
762m4_define([_LT_TAGS], [])
763
764
765# LT_LANG(LANG)
766# -------------
767# Enable libtool support for the given language if not already enabled.
768AC_DEFUN([LT_LANG],
769[AC_BEFORE([$0], [LT_OUTPUT])dnl
770m4_case([$1],
771 [C], [_LT_LANG(C)],
772 [C++], [_LT_LANG(CXX)],
773 [Java], [_LT_LANG(GCJ)],
774 [Fortran 77], [_LT_LANG(F77)],
775 [Fortran], [_LT_LANG(FC)],
776 [Windows Resource], [_LT_LANG(RC)],
777 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
778 [_LT_LANG($1)],
779 [m4_fatal([$0: unsupported language: "$1"])])])dnl
780])# LT_LANG
781
782
783# _LT_LANG(LANGNAME)
784# ------------------
785m4_defun([_LT_LANG],
786[m4_ifdef([_LT_LANG_]$1[_enabled], [],
787 [LT_SUPPORTED_TAG([$1])dnl
788 m4_append([_LT_TAGS], [$1 ])dnl
789 m4_define([_LT_LANG_]$1[_enabled], [])dnl
790 _LT_LANG_$1_CONFIG($1)])dnl
791])# _LT_LANG
792
793
794# _LT_LANG_DEFAULT_CONFIG
795# -----------------------
796m4_defun([_LT_LANG_DEFAULT_CONFIG],
797[AC_PROVIDE_IFELSE([AC_PROG_CXX],
798 [LT_LANG(CXX)],
799 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
800
801AC_PROVIDE_IFELSE([AC_PROG_F77],
802 [LT_LANG(F77)],
803 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
804
805AC_PROVIDE_IFELSE([AC_PROG_FC],
806 [LT_LANG(FC)],
807 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
808
809dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
810dnl pulling things in needlessly.
811AC_PROVIDE_IFELSE([AC_PROG_GCJ],
812 [LT_LANG(GCJ)],
813 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
814 [LT_LANG(GCJ)],
815 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
816 [LT_LANG(GCJ)],
817 [m4_ifdef([AC_PROG_GCJ],
818 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
819 m4_ifdef([A][M_PROG_GCJ],
820 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
821 m4_ifdef([LT_PROG_GCJ],
822 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
823
824AC_PROVIDE_IFELSE([LT_PROG_RC],
825 [LT_LANG(RC)],
826 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
827])# _LT_LANG_DEFAULT_CONFIG
828
829# Obsolete macros:
830AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
831AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
832AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
833AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
834dnl aclocal-1.4 backwards compatibility:
835dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
836dnl AC_DEFUN([AC_LIBTOOL_F77], [])
837dnl AC_DEFUN([AC_LIBTOOL_FC], [])
838dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
839
840
841# _LT_TAG_COMPILER
842# ----------------
843m4_defun([_LT_TAG_COMPILER],
844[AC_REQUIRE([AC_PROG_CC])dnl
845
846_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
847_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
848_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
849_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
850
851# If no C compiler was specified, use CC.
852LTCC=${LTCC-"$CC"}
853
854# If no C compiler flags were specified, use CFLAGS.
855LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
856
857# Allow CC to be a program name with arguments.
858compiler=$CC
859])# _LT_TAG_COMPILER
860
861
862# _LT_COMPILER_BOILERPLATE
863# ------------------------
864# Check for compiler boilerplate output or warnings with
865# the simple compiler test code.
866m4_defun([_LT_COMPILER_BOILERPLATE],
867[m4_require([_LT_DECL_SED])dnl
868ac_outfile=conftest.$ac_objext
869echo "$lt_simple_compile_test_code" >conftest.$ac_ext
870eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
871_lt_compiler_boilerplate=`cat conftest.err`
872$RM conftest*
873])# _LT_COMPILER_BOILERPLATE
874
875
876# _LT_LINKER_BOILERPLATE
877# ----------------------
878# Check for linker boilerplate output or warnings with
879# the simple link test code.
880m4_defun([_LT_LINKER_BOILERPLATE],
881[m4_require([_LT_DECL_SED])dnl
882ac_outfile=conftest.$ac_objext
883echo "$lt_simple_link_test_code" >conftest.$ac_ext
884eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
885_lt_linker_boilerplate=`cat conftest.err`
886$RM -r conftest*
887])# _LT_LINKER_BOILERPLATE
888
889# _LT_REQUIRED_DARWIN_CHECKS
890# -------------------------
891m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
892 case $host_os in
893 rhapsody* | darwin*)
894 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
895 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
896 AC_CHECK_TOOL([LIPO], [lipo], [:])
897 AC_CHECK_TOOL([OTOOL], [otool], [:])
898 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
899 _LT_DECL([], [DSYMUTIL], [1],
900 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
901 _LT_DECL([], [NMEDIT], [1],
902 [Tool to change global to local symbols on Mac OS X])
903 _LT_DECL([], [LIPO], [1],
904 [Tool to manipulate fat objects and archives on Mac OS X])
905 _LT_DECL([], [OTOOL], [1],
906 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
907 _LT_DECL([], [OTOOL64], [1],
908 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
909
910 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
911 [lt_cv_apple_cc_single_mod=no
912 if test -z "${LT_MULTI_MODULE}"; then
913 # By default we will add the -single_module flag. You can override
914 # by either setting the environment variable LT_MULTI_MODULE
915 # non-empty at configure time, or by adding -multi_module to the
916 # link flags.
917 rm -rf libconftest.dylib*
918 echo "int foo(void){return 1;}" > conftest.c
919 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
920-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
921 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
922 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
923 _lt_result=$?
924 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
925 lt_cv_apple_cc_single_mod=yes
926 else
927 cat conftest.err >&AS_MESSAGE_LOG_FD
928 fi
929 rm -rf libconftest.dylib*
930 rm -f conftest.*
931 fi])
932 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
933 [lt_cv_ld_exported_symbols_list],
934 [lt_cv_ld_exported_symbols_list=no
935 save_LDFLAGS=$LDFLAGS
936 echo "_main" > conftest.sym
937 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
938 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
939 [lt_cv_ld_exported_symbols_list=yes],
940 [lt_cv_ld_exported_symbols_list=no])
941 LDFLAGS="$save_LDFLAGS"
942 ])
943 case $host_os in
944 rhapsody* | darwin1.[[012]])
945 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
946 darwin1.*)
947 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
948 darwin*) # darwin 5.x on
949 # if running on 10.5 or later, the deployment target defaults
950 # to the OS version, if on x86, and 10.4, the deployment
951 # target defaults to 10.4. Don't you love it?
952 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
953 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
954 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
955 10.[[012]]*)
956 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
957 10.*)
958 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
959 esac
960 ;;
961 esac
962 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
963 _lt_dar_single_mod='$single_module'
964 fi
965 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
966 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
967 else
968 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
969 fi
970 if test "$DSYMUTIL" != ":"; then
971 _lt_dsymutil='~$DSYMUTIL $lib || :'
972 else
973 _lt_dsymutil=
974 fi
975 ;;
976 esac
977])
978
979
980# _LT_DARWIN_LINKER_FEATURES
981# --------------------------
982# Checks for linker and compiler features on darwin
983m4_defun([_LT_DARWIN_LINKER_FEATURES],
984[
985 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
986 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
987 _LT_TAGVAR(hardcode_direct, $1)=no
988 _LT_TAGVAR(hardcode_automatic, $1)=yes
989 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
990 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
991 _LT_TAGVAR(link_all_deplibs, $1)=yes
992 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
993 case $cc_basename in
994 ifort*) _lt_dar_can_shared=yes ;;
995 *) _lt_dar_can_shared=$GCC ;;
996 esac
997 if test "$_lt_dar_can_shared" = "yes"; then
998 output_verbose_link_cmd=echo
999 _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}"
1000 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1001 _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}"
1002 _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}"
1003 m4_if([$1], [CXX],
1004[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1005 _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}"
1006 _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}"
1007 fi
1008],[])
1009 else
1010 _LT_TAGVAR(ld_shlibs, $1)=no
1011 fi
1012])
1013
1014# _LT_SYS_MODULE_PATH_AIX
1015# -----------------------
1016# Links a minimal program and checks the executable
1017# for the system default hardcoded library path. In most cases,
1018# this is /usr/lib:/lib, but when the MPI compilers are used
1019# the location of the communication and MPI libs are included too.
1020# If we don't find anything, use the default library path according
1021# to the aix ld manual.
1022m4_defun([_LT_SYS_MODULE_PATH_AIX],
1023[m4_require([_LT_DECL_SED])dnl
1024AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1025lt_aix_libpath_sed='
1026 /Import File Strings/,/^$/ {
1027 /^0/ {
1028 s/^0 *\(.*\)$/\1/
1029 p
1030 }
1031 }'
1032aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1033# Check for a 64-bit object if we didn't find anything.
1034if test -z "$aix_libpath"; then
1035 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1036fi],[])
1037if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1038])# _LT_SYS_MODULE_PATH_AIX
1039
1040
1041# _LT_SHELL_INIT(ARG)
1042# -------------------
1043m4_define([_LT_SHELL_INIT],
1044[ifdef([AC_DIVERSION_NOTICE],
1045 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1046 [AC_DIVERT_PUSH(NOTICE)])
1047$1
1048AC_DIVERT_POP
1049])# _LT_SHELL_INIT
1050
1051
1052# _LT_PROG_ECHO_BACKSLASH
1053# -----------------------
1054# Add some code to the start of the generated configure script which
1055# will find an echo command which doesn't interpret backslashes.
1056m4_defun([_LT_PROG_ECHO_BACKSLASH],
1057[_LT_SHELL_INIT([
1058# Check that we are running under the correct shell.
1059SHELL=${CONFIG_SHELL-/bin/sh}
1060
1061case X$lt_ECHO in
1062X*--fallback-echo)
1063 # Remove one level of quotation (which was required for Make).
1064 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1065 ;;
1066esac
1067
1068ECHO=${lt_ECHO-echo}
1069if test "X[$]1" = X--no-reexec; then
1070 # Discard the --no-reexec flag, and continue.
1071 shift
1072elif test "X[$]1" = X--fallback-echo; then
1073 # Avoid inline document here, it may be left over
1074 :
1075elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1076 # Yippee, $ECHO works!
1077 :
1078else
1079 # Restart under the correct shell.
1080 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1081fi
1082
1083if test "X[$]1" = X--fallback-echo; then
1084 # used as fallback echo
1085 shift
1086 cat <<_LT_EOF
1087[$]*
1088_LT_EOF
1089 exit 0
1090fi
1091
1092# The HP-UX ksh and POSIX shell print the target directory to stdout
1093# if CDPATH is set.
1094(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1095
1096if test -z "$lt_ECHO"; then
1097 if test "X${echo_test_string+set}" != Xset; then
1098 # find a string as large as possible, as long as the shell can cope with it
1099 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1100 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1101 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1102 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1103 then
1104 break
1105 fi
1106 done
1107 fi
1108
1109 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1110 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1111 test "X$echo_testing_string" = "X$echo_test_string"; then
1112 :
1113 else
1114 # The Solaris, AIX, and Digital Unix default echo programs unquote
1115 # backslashes. This makes it impossible to quote backslashes using
1116 # echo "$something" | sed 's/\\/\\\\/g'
1117 #
1118 # So, first we look for a working echo in the user's PATH.
1119
1120 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1121 for dir in $PATH /usr/ucb; do
1122 IFS="$lt_save_ifs"
1123 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1124 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1125 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1126 test "X$echo_testing_string" = "X$echo_test_string"; then
1127 ECHO="$dir/echo"
1128 break
1129 fi
1130 done
1131 IFS="$lt_save_ifs"
1132
1133 if test "X$ECHO" = Xecho; then
1134 # We didn't find a better echo, so look for alternatives.
1135 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1136 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1137 test "X$echo_testing_string" = "X$echo_test_string"; then
1138 # This shell has a builtin print -r that does the trick.
1139 ECHO='print -r'
1140 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1141 test "X$CONFIG_SHELL" != X/bin/ksh; then
1142 # If we have ksh, try running configure again with it.
1143 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1144 export ORIGINAL_CONFIG_SHELL
1145 CONFIG_SHELL=/bin/ksh
1146 export CONFIG_SHELL
1147 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1148 else
1149 # Try using printf.
1150 ECHO='printf %s\n'
1151 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1152 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1153 test "X$echo_testing_string" = "X$echo_test_string"; then
1154 # Cool, printf works
1155 :
1156 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1157 test "X$echo_testing_string" = 'X\t' &&
1158 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1159 test "X$echo_testing_string" = "X$echo_test_string"; then
1160 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1161 export CONFIG_SHELL
1162 SHELL="$CONFIG_SHELL"
1163 export SHELL
1164 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1165 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1166 test "X$echo_testing_string" = 'X\t' &&
1167 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1168 test "X$echo_testing_string" = "X$echo_test_string"; then
1169 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1170 else
1171 # maybe with a smaller string...
1172 prev=:
1173
1174 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1175 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1176 then
1177 break
1178 fi
1179 prev="$cmd"
1180 done
1181
1182 if test "$prev" != 'sed 50q "[$]0"'; then
1183 echo_test_string=`eval $prev`
1184 export echo_test_string
1185 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1186 else
1187 # Oops. We lost completely, so just stick with echo.
1188 ECHO=echo
1189 fi
1190 fi
1191 fi
1192 fi
1193 fi
1194fi
1195
1196# Copy echo and quote the copy suitably for passing to libtool from
1197# the Makefile, instead of quoting the original, which is used later.
1198lt_ECHO=$ECHO
1199if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1200 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1201fi
1202
1203AC_SUBST(lt_ECHO)
1204])
1205_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1206_LT_DECL([], [ECHO], [1],
1207 [An echo program that does not interpret backslashes])
1208])# _LT_PROG_ECHO_BACKSLASH
1209
1210
1211# _LT_ENABLE_LOCK
1212# ---------------
1213m4_defun([_LT_ENABLE_LOCK],
1214[AC_ARG_ENABLE([libtool-lock],
1215 [AS_HELP_STRING([--disable-libtool-lock],
1216 [avoid locking (might break parallel builds)])])
1217test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1218
1219# Some flags need to be propagated to the compiler or linker for good
1220# libtool support.
1221case $host in
1222ia64-*-hpux*)
1223 # Find out which ABI we are using.
1224 echo 'int i;' > conftest.$ac_ext
1225 if AC_TRY_EVAL(ac_compile); then
1226 case `/usr/bin/file conftest.$ac_objext` in
1227 *ELF-32*)
1228 HPUX_IA64_MODE="32"
1229 ;;
1230 *ELF-64*)
1231 HPUX_IA64_MODE="64"
1232 ;;
1233 esac
1234 fi
1235 rm -rf conftest*
1236 ;;
1237*-*-irix6*)
1238 # Find out which ABI we are using.
1239 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1240 if AC_TRY_EVAL(ac_compile); then
1241 if test "$lt_cv_prog_gnu_ld" = yes; then
1242 case `/usr/bin/file conftest.$ac_objext` in
1243 *32-bit*)
1244 LD="${LD-ld} -melf32bsmip"
1245 ;;
1246 *N32*)
1247 LD="${LD-ld} -melf32bmipn32"
1248 ;;
1249 *64-bit*)
1250 LD="${LD-ld} -melf64bmip"
1251 ;;
1252 esac
1253 else
1254 case `/usr/bin/file conftest.$ac_objext` in
1255 *32-bit*)
1256 LD="${LD-ld} -32"
1257 ;;
1258 *N32*)
1259 LD="${LD-ld} -n32"
1260 ;;
1261 *64-bit*)
1262 LD="${LD-ld} -64"
1263 ;;
1264 esac
1265 fi
1266 fi
1267 rm -rf conftest*
1268 ;;
1269
1270x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1271s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1272 # Find out which ABI we are using.
1273 echo 'int i;' > conftest.$ac_ext
1274 if AC_TRY_EVAL(ac_compile); then
1275 case `/usr/bin/file conftest.o` in
1276 *32-bit*)
1277 case $host in
1278 x86_64-*kfreebsd*-gnu)
1279 LD="${LD-ld} -m elf_i386_fbsd"
1280 ;;
1281 x86_64-*linux*)
1282 LD="${LD-ld} -m elf_i386"
1283 ;;
1284 ppc64-*linux*|powerpc64-*linux*)
1285 LD="${LD-ld} -m elf32ppclinux"
1286 ;;
1287 s390x-*linux*)
1288 LD="${LD-ld} -m elf_s390"
1289 ;;
1290 sparc64-*linux*)
1291 LD="${LD-ld} -m elf32_sparc"
1292 ;;
1293 esac
1294 ;;
1295 *64-bit*)
1296 case $host in
1297 x86_64-*kfreebsd*-gnu)
1298 LD="${LD-ld} -m elf_x86_64_fbsd"
1299 ;;
1300 x86_64-*linux*)
1301 LD="${LD-ld} -m elf_x86_64"
1302 ;;
1303 ppc*-*linux*|powerpc*-*linux*)
1304 LD="${LD-ld} -m elf64ppc"
1305 ;;
1306 s390*-*linux*|s390*-*tpf*)
1307 LD="${LD-ld} -m elf64_s390"
1308 ;;
1309 sparc*-*linux*)
1310 LD="${LD-ld} -m elf64_sparc"
1311 ;;
1312 esac
1313 ;;
1314 esac
1315 fi
1316 rm -rf conftest*
1317 ;;
1318
1319*-*-sco3.2v5*)
1320 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1321 SAVE_CFLAGS="$CFLAGS"
1322 CFLAGS="$CFLAGS -belf"
1323 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1324 [AC_LANG_PUSH(C)
1325 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1326 AC_LANG_POP])
1327 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1328 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1329 CFLAGS="$SAVE_CFLAGS"
1330 fi
1331 ;;
1332sparc*-*solaris*)
1333 # Find out which ABI we are using.
1334 echo 'int i;' > conftest.$ac_ext
1335 if AC_TRY_EVAL(ac_compile); then
1336 case `/usr/bin/file conftest.o` in
1337 *64-bit*)
1338 case $lt_cv_prog_gnu_ld in
1339 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1340 *)
1341 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1342 LD="${LD-ld} -64"
1343 fi
1344 ;;
1345 esac
1346 ;;
1347 esac
1348 fi
1349 rm -rf conftest*
1350 ;;
1351esac
1352
1353need_locks="$enable_libtool_lock"
1354])# _LT_ENABLE_LOCK
1355
1356
1357# _LT_CMD_OLD_ARCHIVE
1358# -------------------
1359m4_defun([_LT_CMD_OLD_ARCHIVE],
1360[AC_CHECK_TOOL(AR, ar, false)
1361test -z "$AR" && AR=ar
1362test -z "$AR_FLAGS" && AR_FLAGS=cru
1363_LT_DECL([], [AR], [1], [The archiver])
1364_LT_DECL([], [AR_FLAGS], [1])
1365
1366AC_CHECK_TOOL(STRIP, strip, :)
1367test -z "$STRIP" && STRIP=:
1368_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1369
1370AC_CHECK_TOOL(RANLIB, ranlib, :)
1371test -z "$RANLIB" && RANLIB=:
1372_LT_DECL([], [RANLIB], [1],
1373 [Commands used to install an old-style archive])
1374
1375# Determine commands to create old-style static archives.
1376old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1377old_postinstall_cmds='chmod 644 $oldlib'
1378old_postuninstall_cmds=
1379
1380if test -n "$RANLIB"; then
1381 case $host_os in
1382 openbsd*)
1383 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1384 ;;
1385 *)
1386 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1387 ;;
1388 esac
1389 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1390fi
1391_LT_DECL([], [old_postinstall_cmds], [2])
1392_LT_DECL([], [old_postuninstall_cmds], [2])
1393_LT_TAGDECL([], [old_archive_cmds], [2],
1394 [Commands used to build an old-style archive])
1395])# _LT_CMD_OLD_ARCHIVE
1396
1397
1398# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1399# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1400# ----------------------------------------------------------------
1401# Check whether the given compiler option works
1402AC_DEFUN([_LT_COMPILER_OPTION],
1403[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1404m4_require([_LT_DECL_SED])dnl
1405AC_CACHE_CHECK([$1], [$2],
1406 [$2=no
1407 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1408 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1409 lt_compiler_flag="$3"
1410 # Insert the option either (1) after the last *FLAGS variable, or
1411 # (2) before a word containing "conftest.", or (3) at the end.
1412 # Note that $ac_compile itself does not contain backslashes and begins
1413 # with a dollar sign (not a hyphen), so the echo should work correctly.
1414 # The option is referenced via a variable to avoid confusing sed.
1415 lt_compile=`echo "$ac_compile" | $SED \
1416 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1417 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1418 -e 's:$: $lt_compiler_flag:'`
1419 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1420 (eval "$lt_compile" 2>conftest.err)
1421 ac_status=$?
1422 cat conftest.err >&AS_MESSAGE_LOG_FD
1423 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1424 if (exit $ac_status) && test -s "$ac_outfile"; then
1425 # The compiler can only warn and ignore the option if not recognized
1426 # So say no if there are warnings other than the usual output.
1427 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1428 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1429 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1430 $2=yes
1431 fi
1432 fi
1433 $RM conftest*
1434])
1435
1436if test x"[$]$2" = xyes; then
1437 m4_if([$5], , :, [$5])
1438else
1439 m4_if([$6], , :, [$6])
1440fi
1441])# _LT_COMPILER_OPTION
1442
1443# Old name:
1444AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1445dnl aclocal-1.4 backwards compatibility:
1446dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1447
1448
1449# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1450# [ACTION-SUCCESS], [ACTION-FAILURE])
1451# ----------------------------------------------------
1452# Check whether the given linker option works
1453AC_DEFUN([_LT_LINKER_OPTION],
1454[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1455m4_require([_LT_DECL_SED])dnl
1456AC_CACHE_CHECK([$1], [$2],
1457 [$2=no
1458 save_LDFLAGS="$LDFLAGS"
1459 LDFLAGS="$LDFLAGS $3"
1460 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1461 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1462 # The linker can only warn and ignore the option if not recognized
1463 # So say no if there are warnings
1464 if test -s conftest.err; then
1465 # Append any errors to the config.log.
1466 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1467 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1468 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1469 if diff conftest.exp conftest.er2 >/dev/null; then
1470 $2=yes
1471 fi
1472 else
1473 $2=yes
1474 fi
1475 fi
1476 $RM -r conftest*
1477 LDFLAGS="$save_LDFLAGS"
1478])
1479
1480if test x"[$]$2" = xyes; then
1481 m4_if([$4], , :, [$4])
1482else
1483 m4_if([$5], , :, [$5])
1484fi
1485])# _LT_LINKER_OPTION
1486
1487# Old name:
1488AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1489dnl aclocal-1.4 backwards compatibility:
1490dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1491
1492
1493# LT_CMD_MAX_LEN
1494#---------------
1495AC_DEFUN([LT_CMD_MAX_LEN],
1496[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1497# find the maximum length of command line arguments
1498AC_MSG_CHECKING([the maximum length of command line arguments])
1499AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1500 i=0
1501 teststring="ABCD"
1502
1503 case $build_os in
1504 msdosdjgpp*)
1505 # On DJGPP, this test can blow up pretty badly due to problems in libc
1506 # (any single argument exceeding 2000 bytes causes a buffer overrun
1507 # during glob expansion). Even if it were fixed, the result of this
1508 # check would be larger than it should be.
1509 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1510 ;;
1511
1512 gnu*)
1513 # Under GNU Hurd, this test is not required because there is
1514 # no limit to the length of command line arguments.
1515 # Libtool will interpret -1 as no limit whatsoever
1516 lt_cv_sys_max_cmd_len=-1;
1517 ;;
1518
1519 cygwin* | mingw* | cegcc*)
1520 # On Win9x/ME, this test blows up -- it succeeds, but takes
1521 # about 5 minutes as the teststring grows exponentially.
1522 # Worse, since 9x/ME are not pre-emptively multitasking,
1523 # you end up with a "frozen" computer, even though with patience
1524 # the test eventually succeeds (with a max line length of 256k).
1525 # Instead, let's just punt: use the minimum linelength reported by
1526 # all of the supported platforms: 8192 (on NT/2K/XP).
1527 lt_cv_sys_max_cmd_len=8192;
1528 ;;
1529
1530 amigaos*)
1531 # On AmigaOS with pdksh, this test takes hours, literally.
1532 # So we just punt and use a minimum line length of 8192.
1533 lt_cv_sys_max_cmd_len=8192;
1534 ;;
1535
1536 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1537 # This has been around since 386BSD, at least. Likely further.
1538 if test -x /sbin/sysctl; then
1539 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1540 elif test -x /usr/sbin/sysctl; then
1541 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1542 else
1543 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1544 fi
1545 # And add a safety zone
1546 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1547 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1548 ;;
1549
1550 interix*)
1551 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1552 lt_cv_sys_max_cmd_len=196608
1553 ;;
1554
1555 osf*)
1556 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1557 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1558 # nice to cause kernel panics so lets avoid the loop below.
1559 # First set a reasonable default.
1560 lt_cv_sys_max_cmd_len=16384
1561 #
1562 if test -x /sbin/sysconfig; then
1563 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1564 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1565 esac
1566 fi
1567 ;;
1568 sco3.2v5*)
1569 lt_cv_sys_max_cmd_len=102400
1570 ;;
1571 sysv5* | sco5v6* | sysv4.2uw2*)
1572 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1573 if test -n "$kargmax"; then
1574 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1575 else
1576 lt_cv_sys_max_cmd_len=32768
1577 fi
1578 ;;
1579 *)
1580 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1581 if test -n "$lt_cv_sys_max_cmd_len"; then
1582 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1583 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1584 else
1585 # Make teststring a little bigger before we do anything with it.
1586 # a 1K string should be a reasonable start.
1587 for i in 1 2 3 4 5 6 7 8 ; do
1588 teststring=$teststring$teststring
1589 done
1590 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1591 # If test is not a shell built-in, we'll probably end up computing a
1592 # maximum length that is only half of the actual maximum length, but
1593 # we can't tell.
1594 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1595 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1596 test $i != 17 # 1/2 MB should be enough
1597 do
1598 i=`expr $i + 1`
1599 teststring=$teststring$teststring
1600 done
1601 # Only check the string length outside the loop.
1602 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1603 teststring=
1604 # Add a significant safety factor because C++ compilers can tack on
1605 # massive amounts of additional arguments before passing them to the
1606 # linker. It appears as though 1/2 is a usable value.
1607 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1608 fi
1609 ;;
1610 esac
1611])
1612if test -n $lt_cv_sys_max_cmd_len ; then
1613 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1614else
1615 AC_MSG_RESULT(none)
1616fi
1617max_cmd_len=$lt_cv_sys_max_cmd_len
1618_LT_DECL([], [max_cmd_len], [0],
1619 [What is the maximum length of a command?])
1620])# LT_CMD_MAX_LEN
1621
1622# Old name:
1623AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1624dnl aclocal-1.4 backwards compatibility:
1625dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1626
1627
1628# _LT_HEADER_DLFCN
1629# ----------------
1630m4_defun([_LT_HEADER_DLFCN],
1631[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1632])# _LT_HEADER_DLFCN
1633
1634
1635# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1636# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1637# ----------------------------------------------------------------
1638m4_defun([_LT_TRY_DLOPEN_SELF],
1639[m4_require([_LT_HEADER_DLFCN])dnl
1640if test "$cross_compiling" = yes; then :
1641 [$4]
1642else
1643 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1644 lt_status=$lt_dlunknown
1645 cat > conftest.$ac_ext <<_LT_EOF
1646[#line __oline__ "configure"
1647#include "confdefs.h"
1648
1649#if HAVE_DLFCN_H
1650#include <dlfcn.h>
1651#endif
1652
1653#include <stdio.h>
1654
1655#ifdef RTLD_GLOBAL
1656# define LT_DLGLOBAL RTLD_GLOBAL
1657#else
1658# ifdef DL_GLOBAL
1659# define LT_DLGLOBAL DL_GLOBAL
1660# else
1661# define LT_DLGLOBAL 0
1662# endif
1663#endif
1664
1665/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1666 find out it does not work in some platform. */
1667#ifndef LT_DLLAZY_OR_NOW
1668# ifdef RTLD_LAZY
1669# define LT_DLLAZY_OR_NOW RTLD_LAZY
1670# else
1671# ifdef DL_LAZY
1672# define LT_DLLAZY_OR_NOW DL_LAZY
1673# else
1674# ifdef RTLD_NOW
1675# define LT_DLLAZY_OR_NOW RTLD_NOW
1676# else
1677# ifdef DL_NOW
1678# define LT_DLLAZY_OR_NOW DL_NOW
1679# else
1680# define LT_DLLAZY_OR_NOW 0
1681# endif
1682# endif
1683# endif
1684# endif
1685#endif
1686
1687void fnord() { int i=42;}
1688int main ()
1689{
1690 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1691 int status = $lt_dlunknown;
1692
1693 if (self)
1694 {
1695 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1696 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1697 /* dlclose (self); */
1698 }
1699 else
1700 puts (dlerror ());
1701
1702 return status;
1703}]
1704_LT_EOF
1705 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1706 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1707 lt_status=$?
1708 case x$lt_status in
1709 x$lt_dlno_uscore) $1 ;;
1710 x$lt_dlneed_uscore) $2 ;;
1711 x$lt_dlunknown|x*) $3 ;;
1712 esac
1713 else :
1714 # compilation failed
1715 $3
1716 fi
1717fi
1718rm -fr conftest*
1719])# _LT_TRY_DLOPEN_SELF
1720
1721
1722# LT_SYS_DLOPEN_SELF
1723# ------------------
1724AC_DEFUN([LT_SYS_DLOPEN_SELF],
1725[m4_require([_LT_HEADER_DLFCN])dnl
1726if test "x$enable_dlopen" != xyes; then
1727 enable_dlopen=unknown
1728 enable_dlopen_self=unknown
1729 enable_dlopen_self_static=unknown
1730else
1731 lt_cv_dlopen=no
1732 lt_cv_dlopen_libs=
1733
1734 case $host_os in
1735 beos*)
1736 lt_cv_dlopen="load_add_on"
1737 lt_cv_dlopen_libs=
1738 lt_cv_dlopen_self=yes
1739 ;;
1740
1741 mingw* | pw32* | cegcc*)
1742 lt_cv_dlopen="LoadLibrary"
1743 lt_cv_dlopen_libs=
1744 ;;
1745
1746 cygwin*)
1747 lt_cv_dlopen="dlopen"
1748 lt_cv_dlopen_libs=
1749 ;;
1750
1751 darwin*)
1752 # if libdl is installed we need to link against it
1753 AC_CHECK_LIB([dl], [dlopen],
1754 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1755 lt_cv_dlopen="dyld"
1756 lt_cv_dlopen_libs=
1757 lt_cv_dlopen_self=yes
1758 ])
1759 ;;
1760
1761 *)
1762 AC_CHECK_FUNC([shl_load],
1763 [lt_cv_dlopen="shl_load"],
1764 [AC_CHECK_LIB([dld], [shl_load],
1765 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1766 [AC_CHECK_FUNC([dlopen],
1767 [lt_cv_dlopen="dlopen"],
1768 [AC_CHECK_LIB([dl], [dlopen],
1769 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1770 [AC_CHECK_LIB([svld], [dlopen],
1771 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1772 [AC_CHECK_LIB([dld], [dld_link],
1773 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1774 ])
1775 ])
1776 ])
1777 ])
1778 ])
1779 ;;
1780 esac
1781
1782 if test "x$lt_cv_dlopen" != xno; then
1783 enable_dlopen=yes
1784 else
1785 enable_dlopen=no
1786 fi
1787
1788 case $lt_cv_dlopen in
1789 dlopen)
1790 save_CPPFLAGS="$CPPFLAGS"
1791 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1792
1793 save_LDFLAGS="$LDFLAGS"
1794 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1795
1796 save_LIBS="$LIBS"
1797 LIBS="$lt_cv_dlopen_libs $LIBS"
1798
1799 AC_CACHE_CHECK([whether a program can dlopen itself],
1800 lt_cv_dlopen_self, [dnl
1801 _LT_TRY_DLOPEN_SELF(
1802 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1803 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1804 ])
1805
1806 if test "x$lt_cv_dlopen_self" = xyes; then
1807 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1808 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1809 lt_cv_dlopen_self_static, [dnl
1810 _LT_TRY_DLOPEN_SELF(
1811 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1812 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1813 ])
1814 fi
1815
1816 CPPFLAGS="$save_CPPFLAGS"
1817 LDFLAGS="$save_LDFLAGS"
1818 LIBS="$save_LIBS"
1819 ;;
1820 esac
1821
1822 case $lt_cv_dlopen_self in
1823 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1824 *) enable_dlopen_self=unknown ;;
1825 esac
1826
1827 case $lt_cv_dlopen_self_static in
1828 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1829 *) enable_dlopen_self_static=unknown ;;
1830 esac
1831fi
1832_LT_DECL([dlopen_support], [enable_dlopen], [0],
1833 [Whether dlopen is supported])
1834_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1835 [Whether dlopen of programs is supported])
1836_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1837 [Whether dlopen of statically linked programs is supported])
1838])# LT_SYS_DLOPEN_SELF
1839
1840# Old name:
1841AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1842dnl aclocal-1.4 backwards compatibility:
1843dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1844
1845
1846# _LT_COMPILER_C_O([TAGNAME])
1847# ---------------------------
1848# Check to see if options -c and -o are simultaneously supported by compiler.
1849# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1850m4_defun([_LT_COMPILER_C_O],
1851[m4_require([_LT_DECL_SED])dnl
1852m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1853m4_require([_LT_TAG_COMPILER])dnl
1854AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1855 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1856 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1857 $RM -r conftest 2>/dev/null
1858 mkdir conftest
1859 cd conftest
1860 mkdir out
1861 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1862
1863 lt_compiler_flag="-o out/conftest2.$ac_objext"
1864 # Insert the option either (1) after the last *FLAGS variable, or
1865 # (2) before a word containing "conftest.", or (3) at the end.
1866 # Note that $ac_compile itself does not contain backslashes and begins
1867 # with a dollar sign (not a hyphen), so the echo should work correctly.
1868 lt_compile=`echo "$ac_compile" | $SED \
1869 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1870 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1871 -e 's:$: $lt_compiler_flag:'`
1872 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1873 (eval "$lt_compile" 2>out/conftest.err)
1874 ac_status=$?
1875 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1876 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1877 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1878 then
1879 # The compiler can only warn and ignore the option if not recognized
1880 # So say no if there are warnings
1881 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1882 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1883 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1884 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1885 fi
1886 fi
1887 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1888 $RM conftest*
1889 # SGI C++ compiler will create directory out/ii_files/ for
1890 # template instantiation
1891 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1892 $RM out/* && rmdir out
1893 cd ..
1894 $RM -r conftest
1895 $RM conftest*
1896])
1897_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1898 [Does compiler simultaneously support -c and -o options?])
1899])# _LT_COMPILER_C_O
1900
1901
1902# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1903# ----------------------------------
1904# Check to see if we can do hard links to lock some files if needed
1905m4_defun([_LT_COMPILER_FILE_LOCKS],
1906[m4_require([_LT_ENABLE_LOCK])dnl
1907m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1908_LT_COMPILER_C_O([$1])
1909
1910hard_links="nottested"
1911if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1912 # do not overwrite the value of need_locks provided by the user
1913 AC_MSG_CHECKING([if we can lock with hard links])
1914 hard_links=yes
1915 $RM conftest*
1916 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1917 touch conftest.a
1918 ln conftest.a conftest.b 2>&5 || hard_links=no
1919 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1920 AC_MSG_RESULT([$hard_links])
1921 if test "$hard_links" = no; then
1922 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1923 need_locks=warn
1924 fi
1925else
1926 need_locks=no
1927fi
1928_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1929])# _LT_COMPILER_FILE_LOCKS
1930
1931
1932# _LT_CHECK_OBJDIR
1933# ----------------
1934m4_defun([_LT_CHECK_OBJDIR],
1935[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1936[rm -f .libs 2>/dev/null
1937mkdir .libs 2>/dev/null
1938if test -d .libs; then
1939 lt_cv_objdir=.libs
1940else
1941 # MS-DOS does not allow filenames that begin with a dot.
1942 lt_cv_objdir=_libs
1943fi
1944rmdir .libs 2>/dev/null])
1945objdir=$lt_cv_objdir
1946_LT_DECL([], [objdir], [0],
1947 [The name of the directory that contains temporary libtool files])dnl
1948m4_pattern_allow([LT_OBJDIR])dnl
1949AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1950 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1951])# _LT_CHECK_OBJDIR
1952
1953
1954# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1955# --------------------------------------
1956# Check hardcoding attributes.
1957m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1958[AC_MSG_CHECKING([how to hardcode library paths into programs])
1959_LT_TAGVAR(hardcode_action, $1)=
1960if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1961 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1962 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1963
1964 # We can hardcode non-existent directories.
1965 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1966 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1967 # have to relink, otherwise we might link with an installed library
1968 # when we should be linking with a yet-to-be-installed one
1969 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1970 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1971 # Linking always hardcodes the temporary library directory.
1972 _LT_TAGVAR(hardcode_action, $1)=relink
1973 else
1974 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1975 _LT_TAGVAR(hardcode_action, $1)=immediate
1976 fi
1977else
1978 # We cannot hardcode anything, or else we can only hardcode existing
1979 # directories.
1980 _LT_TAGVAR(hardcode_action, $1)=unsupported
1981fi
1982AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1983
1984if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1985 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1986 # Fast installation is not supported
1987 enable_fast_install=no
1988elif test "$shlibpath_overrides_runpath" = yes ||
1989 test "$enable_shared" = no; then
1990 # Fast installation is not necessary
1991 enable_fast_install=needless
1992fi
1993_LT_TAGDECL([], [hardcode_action], [0],
1994 [How to hardcode a shared library path into an executable])
1995])# _LT_LINKER_HARDCODE_LIBPATH
1996
1997
1998# _LT_CMD_STRIPLIB
1999# ----------------
2000m4_defun([_LT_CMD_STRIPLIB],
2001[m4_require([_LT_DECL_EGREP])
2002striplib=
2003old_striplib=
2004AC_MSG_CHECKING([whether stripping libraries is possible])
2005if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2006 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2007 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2008 AC_MSG_RESULT([yes])
2009else
2010# FIXME - insert some real tests, host_os isn't really good enough
2011 case $host_os in
2012 darwin*)
2013 if test -n "$STRIP" ; then
2014 striplib="$STRIP -x"
2015 old_striplib="$STRIP -S"
2016 AC_MSG_RESULT([yes])
2017 else
2018 AC_MSG_RESULT([no])
2019 fi
2020 ;;
2021 *)
2022 AC_MSG_RESULT([no])
2023 ;;
2024 esac
2025fi
2026_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2027_LT_DECL([], [striplib], [1])
2028])# _LT_CMD_STRIPLIB
2029
2030
2031# _LT_SYS_DYNAMIC_LINKER([TAG])
2032# -----------------------------
2033# PORTME Fill in your ld.so characteristics
2034m4_defun([_LT_SYS_DYNAMIC_LINKER],
2035[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2036m4_require([_LT_DECL_EGREP])dnl
2037m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2038m4_require([_LT_DECL_OBJDUMP])dnl
2039m4_require([_LT_DECL_SED])dnl
2040AC_MSG_CHECKING([dynamic linker characteristics])
2041m4_if([$1],
2042 [], [
2043if test "$GCC" = yes; then
2044 case $host_os in
2045 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2046 *) lt_awk_arg="/^libraries:/" ;;
2047 esac
2048 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2049 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2050 # if the path contains ";" then we assume it to be the separator
2051 # otherwise default to the standard path separator (i.e. ":") - it is
2052 # assumed that no part of a normal pathname contains ";" but that should
2053 # okay in the real world where ";" in dirpaths is itself problematic.
2054 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2055 else
2056 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2057 fi
2058 # Ok, now we have the path, separated by spaces, we can step through it
2059 # and add multilib dir if necessary.
2060 lt_tmp_lt_search_path_spec=
2061 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2062 for lt_sys_path in $lt_search_path_spec; do
2063 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2064 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2065 else
2066 test -d "$lt_sys_path" && \
2067 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2068 fi
2069 done
2070 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2071BEGIN {RS=" "; FS="/|\n";} {
2072 lt_foo="";
2073 lt_count=0;
2074 for (lt_i = NF; lt_i > 0; lt_i--) {
2075 if ($lt_i != "" && $lt_i != ".") {
2076 if ($lt_i == "..") {
2077 lt_count++;
2078 } else {
2079 if (lt_count == 0) {
2080 lt_foo="/" $lt_i lt_foo;
2081 } else {
2082 lt_count--;
2083 }
2084 }
2085 }
2086 }
2087 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2088 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2089}'`
2090 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2091else
2092 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2093fi])
2094library_names_spec=
2095libname_spec='lib$name'
2096soname_spec=
2097shrext_cmds=".so"
2098postinstall_cmds=
2099postuninstall_cmds=
2100finish_cmds=
2101finish_eval=
2102shlibpath_var=
2103shlibpath_overrides_runpath=unknown
2104version_type=none
2105dynamic_linker="$host_os ld.so"
2106sys_lib_dlsearch_path_spec="/lib /usr/lib"
2107need_lib_prefix=unknown
2108hardcode_into_libs=no
2109
2110# when you set need_version to no, make sure it does not cause -set_version
2111# flags to be left without arguments
2112need_version=unknown
2113
2114case $host_os in
2115aix3*)
2116 version_type=linux
2117 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2118 shlibpath_var=LIBPATH
2119
2120 # AIX 3 has no versioning support, so we append a major version to the name.
2121 soname_spec='${libname}${release}${shared_ext}$major'
2122 ;;
2123
2124aix[[4-9]]*)
2125 version_type=linux
2126 need_lib_prefix=no
2127 need_version=no
2128 hardcode_into_libs=yes
2129 if test "$host_cpu" = ia64; then
2130 # AIX 5 supports IA64
2131 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2132 shlibpath_var=LD_LIBRARY_PATH
2133 else
2134 # With GCC up to 2.95.x, collect2 would create an import file
2135 # for dependence libraries. The import file would start with
2136 # the line `#! .'. This would cause the generated library to
2137 # depend on `.', always an invalid library. This was fixed in
2138 # development snapshots of GCC prior to 3.0.
2139 case $host_os in
2140 aix4 | aix4.[[01]] | aix4.[[01]].*)
2141 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2142 echo ' yes '
2143 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2144 :
2145 else
2146 can_build_shared=no
2147 fi
2148 ;;
2149 esac
2150 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2151 # soname into executable. Probably we can add versioning support to
2152 # collect2, so additional links can be useful in future.
2153 if test "$aix_use_runtimelinking" = yes; then
2154 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2155 # instead of lib<name>.a to let people know that these are not
2156 # typical AIX shared libraries.
2157 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2158 else
2159 # We preserve .a as extension for shared libraries through AIX4.2
2160 # and later when we are not doing run time linking.
2161 library_names_spec='${libname}${release}.a $libname.a'
2162 soname_spec='${libname}${release}${shared_ext}$major'
2163 fi
2164 shlibpath_var=LIBPATH
2165 fi
2166 ;;
2167
2168amigaos*)
2169 case $host_cpu in
2170 powerpc)
2171 # Since July 2007 AmigaOS4 officially supports .so libraries.
2172 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2173 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2174 ;;
2175 m68k)
2176 library_names_spec='$libname.ixlibrary $libname.a'
2177 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2178 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2179 ;;
2180 esac
2181 ;;
2182
2183beos*)
2184 library_names_spec='${libname}${shared_ext}'
2185 dynamic_linker="$host_os ld.so"
2186 shlibpath_var=LIBRARY_PATH
2187 ;;
2188
2189bsdi[[45]]*)
2190 version_type=linux
2191 need_version=no
2192 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2193 soname_spec='${libname}${release}${shared_ext}$major'
2194 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2195 shlibpath_var=LD_LIBRARY_PATH
2196 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2197 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2198 # the default ld.so.conf also contains /usr/contrib/lib and
2199 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2200 # libtool to hard-code these into programs
2201 ;;
2202
2203cygwin* | mingw* | pw32* | cegcc*)
2204 version_type=windows
2205 shrext_cmds=".dll"
2206 need_version=no
2207 need_lib_prefix=no
2208
2209 case $GCC,$host_os in
2210 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2211 library_names_spec='$libname.dll.a'
2212 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2213 postinstall_cmds='base_file=`basename \${file}`~
2214 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2215 dldir=$destdir/`dirname \$dlpath`~
2216 test -d \$dldir || mkdir -p \$dldir~
2217 $install_prog $dir/$dlname \$dldir/$dlname~
2218 chmod a+x \$dldir/$dlname~
2219 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2220 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2221 fi'
2222 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2223 dlpath=$dir/\$dldll~
2224 $RM \$dlpath'
2225 shlibpath_overrides_runpath=yes
2226
2227 case $host_os in
2228 cygwin*)
2229 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2230 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2231 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2232 ;;
2233 mingw* | cegcc*)
2234 # MinGW DLLs use traditional 'lib' prefix
2235 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2236 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2237 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2238 # It is most probably a Windows format PATH printed by
2239 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2240 # path with ; separators, and with drive letters. We can handle the
2241 # drive letters (cygwin fileutils understands them), so leave them,
2242 # especially as we might pass files found there to a mingw objdump,
2243 # which wouldn't understand a cygwinified path. Ahh.
2244 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2245 else
2246 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2247 fi
2248 ;;
2249 pw32*)
2250 # pw32 DLLs use 'pw' prefix rather than 'lib'
2251 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2252 ;;
2253 esac
2254 ;;
2255
2256 *)
2257 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2258 ;;
2259 esac
2260 dynamic_linker='Win32 ld.exe'
2261 # FIXME: first we should search . and the directory the executable is in
2262 shlibpath_var=PATH
2263 ;;
2264
2265darwin* | rhapsody*)
2266 dynamic_linker="$host_os dyld"
2267 version_type=darwin
2268 need_lib_prefix=no
2269 need_version=no
2270 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2271 soname_spec='${libname}${release}${major}$shared_ext'
2272 shlibpath_overrides_runpath=yes
2273 shlibpath_var=DYLD_LIBRARY_PATH
2274 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2275m4_if([$1], [],[
2276 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2277 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2278 ;;
2279
2280dgux*)
2281 version_type=linux
2282 need_lib_prefix=no
2283 need_version=no
2284 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2285 soname_spec='${libname}${release}${shared_ext}$major'
2286 shlibpath_var=LD_LIBRARY_PATH
2287 ;;
2288
2289freebsd1*)
2290 dynamic_linker=no
2291 ;;
2292
2293freebsd* | dragonfly*)
2294 # DragonFly does not have aout. When/if they implement a new
2295 # versioning mechanism, adjust this.
2296 if test -x /usr/bin/objformat; then
2297 objformat=`/usr/bin/objformat`
2298 else
2299 case $host_os in
2300 freebsd[[123]]*) objformat=aout ;;
2301 *) objformat=elf ;;
2302 esac
2303 fi
2304 version_type=freebsd-$objformat
2305 case $version_type in
2306 freebsd-elf*)
2307 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2308 need_version=no
2309 need_lib_prefix=no
2310 ;;
2311 freebsd-*)
2312 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2313 need_version=yes
2314 ;;
2315 esac
2316 shlibpath_var=LD_LIBRARY_PATH
2317 case $host_os in
2318 freebsd2*)
2319 shlibpath_overrides_runpath=yes
2320 ;;
2321 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2322 shlibpath_overrides_runpath=yes
2323 hardcode_into_libs=yes
2324 ;;
2325 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2326 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2327 shlibpath_overrides_runpath=no
2328 hardcode_into_libs=yes
2329 ;;
2330 *) # from 4.6 on, and DragonFly
2331 shlibpath_overrides_runpath=yes
2332 hardcode_into_libs=yes
2333 ;;
2334 esac
2335 ;;
2336
2337gnu*)
2338 version_type=linux
2339 need_lib_prefix=no
2340 need_version=no
2341 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2342 soname_spec='${libname}${release}${shared_ext}$major'
2343 shlibpath_var=LD_LIBRARY_PATH
2344 hardcode_into_libs=yes
2345 ;;
2346
2347hpux9* | hpux10* | hpux11*)
2348 # Give a soname corresponding to the major version so that dld.sl refuses to
2349 # link against other versions.
2350 version_type=sunos
2351 need_lib_prefix=no
2352 need_version=no
2353 case $host_cpu in
2354 ia64*)
2355 shrext_cmds='.so'
2356 hardcode_into_libs=yes
2357 dynamic_linker="$host_os dld.so"
2358 shlibpath_var=LD_LIBRARY_PATH
2359 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2360 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2361 soname_spec='${libname}${release}${shared_ext}$major'
2362 if test "X$HPUX_IA64_MODE" = X32; then
2363 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2364 else
2365 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2366 fi
2367 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2368 ;;
2369 hppa*64*)
2370 shrext_cmds='.sl'
2371 hardcode_into_libs=yes
2372 dynamic_linker="$host_os dld.sl"
2373 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2374 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2375 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376 soname_spec='${libname}${release}${shared_ext}$major'
2377 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2378 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2379 ;;
2380 *)
2381 shrext_cmds='.sl'
2382 dynamic_linker="$host_os dld.sl"
2383 shlibpath_var=SHLIB_PATH
2384 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2385 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2386 soname_spec='${libname}${release}${shared_ext}$major'
2387 ;;
2388 esac
2389 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2390 postinstall_cmds='chmod 555 $lib'
2391 ;;
2392
2393interix[[3-9]]*)
2394 version_type=linux
2395 need_lib_prefix=no
2396 need_version=no
2397 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2398 soname_spec='${libname}${release}${shared_ext}$major'
2399 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2400 shlibpath_var=LD_LIBRARY_PATH
2401 shlibpath_overrides_runpath=no
2402 hardcode_into_libs=yes
2403 ;;
2404
2405irix5* | irix6* | nonstopux*)
2406 case $host_os in
2407 nonstopux*) version_type=nonstopux ;;
2408 *)
2409 if test "$lt_cv_prog_gnu_ld" = yes; then
2410 version_type=linux
2411 else
2412 version_type=irix
2413 fi ;;
2414 esac
2415 need_lib_prefix=no
2416 need_version=no
2417 soname_spec='${libname}${release}${shared_ext}$major'
2418 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2419 case $host_os in
2420 irix5* | nonstopux*)
2421 libsuff= shlibsuff=
2422 ;;
2423 *)
2424 case $LD in # libtool.m4 will add one of these switches to LD
2425 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2426 libsuff= shlibsuff= libmagic=32-bit;;
2427 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2428 libsuff=32 shlibsuff=N32 libmagic=N32;;
2429 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2430 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2431 *) libsuff= shlibsuff= libmagic=never-match;;
2432 esac
2433 ;;
2434 esac
2435 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2436 shlibpath_overrides_runpath=no
2437 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2438 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2439 hardcode_into_libs=yes
2440 ;;
2441
2442# No shared lib support for Linux oldld, aout, or coff.
2443linux*oldld* | linux*aout* | linux*coff*)
2444 dynamic_linker=no
2445 ;;
2446
2447# This must be Linux ELF.
2448linux* | k*bsd*-gnu | kopensolaris*-gnu)
2449 version_type=linux
2450 need_lib_prefix=no
2451 need_version=no
2452 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2453 soname_spec='${libname}${release}${shared_ext}$major'
2454 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2455 shlibpath_var=LD_LIBRARY_PATH
2456 shlibpath_overrides_runpath=no
2457 # Some binutils ld are patched to set DT_RUNPATH
2458 save_LDFLAGS=$LDFLAGS
2459 save_libdir=$libdir
2460 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2461 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2462 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2463 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2464 [shlibpath_overrides_runpath=yes])])
2465 LDFLAGS=$save_LDFLAGS
2466 libdir=$save_libdir
2467
2468 # This implies no fast_install, which is unacceptable.
2469 # Some rework will be needed to allow for fast_install
2470 # before this can be enabled.
2471 hardcode_into_libs=yes
2472
2473 # Append ld.so.conf contents to the search path
2474 if test -f /etc/ld.so.conf; then
2475 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;/^$/d' | tr '\n' ' '`
2476 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2477 fi
2478
2479 # We used to test for /lib/ld.so.1 and disable shared libraries on
2480 # powerpc, because MkLinux only supported shared libraries with the
2481 # GNU dynamic linker. Since this was broken with cross compilers,
2482 # most powerpc-linux boxes support dynamic linking these days and
2483 # people can always --disable-shared, the test was removed, and we
2484 # assume the GNU/Linux dynamic linker is in use.
2485 dynamic_linker='GNU/Linux ld.so'
2486 ;;
2487
2488netbsdelf*-gnu)
2489 version_type=linux
2490 need_lib_prefix=no
2491 need_version=no
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2493 soname_spec='${libname}${release}${shared_ext}$major'
2494 shlibpath_var=LD_LIBRARY_PATH
2495 shlibpath_overrides_runpath=no
2496 hardcode_into_libs=yes
2497 dynamic_linker='NetBSD ld.elf_so'
2498 ;;
2499
2500netbsd*)
2501 version_type=sunos
2502 need_lib_prefix=no
2503 need_version=no
2504 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2505 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2506 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2507 dynamic_linker='NetBSD (a.out) ld.so'
2508 else
2509 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2510 soname_spec='${libname}${release}${shared_ext}$major'
2511 dynamic_linker='NetBSD ld.elf_so'
2512 fi
2513 shlibpath_var=LD_LIBRARY_PATH
2514 shlibpath_overrides_runpath=yes
2515 hardcode_into_libs=yes
2516 ;;
2517
2518newsos6)
2519 version_type=linux
2520 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2521 shlibpath_var=LD_LIBRARY_PATH
2522 shlibpath_overrides_runpath=yes
2523 ;;
2524
2525*nto* | *qnx*)
2526 version_type=qnx
2527 need_lib_prefix=no
2528 need_version=no
2529 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2530 soname_spec='${libname}${release}${shared_ext}$major'
2531 shlibpath_var=LD_LIBRARY_PATH
2532 shlibpath_overrides_runpath=no
2533 hardcode_into_libs=yes
2534 dynamic_linker='ldqnx.so'
2535 ;;
2536
2537openbsd*)
2538 version_type=sunos
2539 sys_lib_dlsearch_path_spec="/usr/lib"
2540 need_lib_prefix=no
2541 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2542 case $host_os in
2543 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2544 *) need_version=no ;;
2545 esac
2546 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2547 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2548 shlibpath_var=LD_LIBRARY_PATH
2549 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2550 case $host_os in
2551 openbsd2.[[89]] | openbsd2.[[89]].*)
2552 shlibpath_overrides_runpath=no
2553 ;;
2554 *)
2555 shlibpath_overrides_runpath=yes
2556 ;;
2557 esac
2558 else
2559 shlibpath_overrides_runpath=yes
2560 fi
2561 ;;
2562
2563os2*)
2564 libname_spec='$name'
2565 shrext_cmds=".dll"
2566 need_lib_prefix=no
2567 library_names_spec='$libname${shared_ext} $libname.a'
2568 dynamic_linker='OS/2 ld.exe'
2569 shlibpath_var=LIBPATH
2570 ;;
2571
2572osf3* | osf4* | osf5*)
2573 version_type=osf
2574 need_lib_prefix=no
2575 need_version=no
2576 soname_spec='${libname}${release}${shared_ext}$major'
2577 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2578 shlibpath_var=LD_LIBRARY_PATH
2579 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2580 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2581 ;;
2582
2583rdos*)
2584 dynamic_linker=no
2585 ;;
2586
2587solaris*)
2588 version_type=linux
2589 need_lib_prefix=no
2590 need_version=no
2591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2592 soname_spec='${libname}${release}${shared_ext}$major'
2593 shlibpath_var=LD_LIBRARY_PATH
2594 shlibpath_overrides_runpath=yes
2595 hardcode_into_libs=yes
2596 # ldd complains unless libraries are executable
2597 postinstall_cmds='chmod +x $lib'
2598 ;;
2599
2600sunos4*)
2601 version_type=sunos
2602 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2603 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2604 shlibpath_var=LD_LIBRARY_PATH
2605 shlibpath_overrides_runpath=yes
2606 if test "$with_gnu_ld" = yes; then
2607 need_lib_prefix=no
2608 fi
2609 need_version=yes
2610 ;;
2611
2612sysv4 | sysv4.3*)
2613 version_type=linux
2614 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2615 soname_spec='${libname}${release}${shared_ext}$major'
2616 shlibpath_var=LD_LIBRARY_PATH
2617 case $host_vendor in
2618 sni)
2619 shlibpath_overrides_runpath=no
2620 need_lib_prefix=no
2621 runpath_var=LD_RUN_PATH
2622 ;;
2623 siemens)
2624 need_lib_prefix=no
2625 ;;
2626 motorola)
2627 need_lib_prefix=no
2628 need_version=no
2629 shlibpath_overrides_runpath=no
2630 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2631 ;;
2632 esac
2633 ;;
2634
2635sysv4*MP*)
2636 if test -d /usr/nec ;then
2637 version_type=linux
2638 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2639 soname_spec='$libname${shared_ext}.$major'
2640 shlibpath_var=LD_LIBRARY_PATH
2641 fi
2642 ;;
2643
2644sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2645 version_type=freebsd-elf
2646 need_lib_prefix=no
2647 need_version=no
2648 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2649 soname_spec='${libname}${release}${shared_ext}$major'
2650 shlibpath_var=LD_LIBRARY_PATH
2651 shlibpath_overrides_runpath=yes
2652 hardcode_into_libs=yes
2653 if test "$with_gnu_ld" = yes; then
2654 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2655 else
2656 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2657 case $host_os in
2658 sco3.2v5*)
2659 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2660 ;;
2661 esac
2662 fi
2663 sys_lib_dlsearch_path_spec='/usr/lib'
2664 ;;
2665
2666tpf*)
2667 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2668 version_type=linux
2669 need_lib_prefix=no
2670 need_version=no
2671 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2672 shlibpath_var=LD_LIBRARY_PATH
2673 shlibpath_overrides_runpath=no
2674 hardcode_into_libs=yes
2675 ;;
2676
2677uts4*)
2678 version_type=linux
2679 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2680 soname_spec='${libname}${release}${shared_ext}$major'
2681 shlibpath_var=LD_LIBRARY_PATH
2682 ;;
2683
2684*)
2685 dynamic_linker=no
2686 ;;
2687esac
2688AC_MSG_RESULT([$dynamic_linker])
2689test "$dynamic_linker" = no && can_build_shared=no
2690
2691variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2692if test "$GCC" = yes; then
2693 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2694fi
2695
2696if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2697 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2698fi
2699if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2700 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2701fi
2702
2703_LT_DECL([], [variables_saved_for_relink], [1],
2704 [Variables whose values should be saved in libtool wrapper scripts and
2705 restored at link time])
2706_LT_DECL([], [need_lib_prefix], [0],
2707 [Do we need the "lib" prefix for modules?])
2708_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2709_LT_DECL([], [version_type], [0], [Library versioning type])
2710_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2711_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2712_LT_DECL([], [shlibpath_overrides_runpath], [0],
2713 [Is shlibpath searched before the hard-coded library search path?])
2714_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2715_LT_DECL([], [library_names_spec], [1],
2716 [[List of archive names. First name is the real one, the rest are links.
2717 The last name is the one that the linker finds with -lNAME]])
2718_LT_DECL([], [soname_spec], [1],
2719 [[The coded name of the library, if different from the real name]])
2720_LT_DECL([], [postinstall_cmds], [2],
2721 [Command to use after installation of a shared archive])
2722_LT_DECL([], [postuninstall_cmds], [2],
2723 [Command to use after uninstallation of a shared archive])
2724_LT_DECL([], [finish_cmds], [2],
2725 [Commands used to finish a libtool library installation in a directory])
2726_LT_DECL([], [finish_eval], [1],
2727 [[As "finish_cmds", except a single script fragment to be evaled but
2728 not shown]])
2729_LT_DECL([], [hardcode_into_libs], [0],
2730 [Whether we should hardcode library paths into libraries])
2731_LT_DECL([], [sys_lib_search_path_spec], [2],
2732 [Compile-time system search path for libraries])
2733_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2734 [Run-time system search path for libraries])
2735])# _LT_SYS_DYNAMIC_LINKER
2736
2737
2738# _LT_PATH_TOOL_PREFIX(TOOL)
2739# --------------------------
2740# find a file program which can recognize shared library
2741AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2742[m4_require([_LT_DECL_EGREP])dnl
2743AC_MSG_CHECKING([for $1])
2744AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2745[case $MAGIC_CMD in
2746[[\\/*] | ?:[\\/]*])
2747 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2748 ;;
2749*)
2750 lt_save_MAGIC_CMD="$MAGIC_CMD"
2751 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2752dnl $ac_dummy forces splitting on constant user-supplied paths.
2753dnl POSIX.2 word splitting is done only on the output of word expansions,
2754dnl not every word. This closes a longstanding sh security hole.
2755 ac_dummy="m4_if([$2], , $PATH, [$2])"
2756 for ac_dir in $ac_dummy; do
2757 IFS="$lt_save_ifs"
2758 test -z "$ac_dir" && ac_dir=.
2759 if test -f $ac_dir/$1; then
2760 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2761 if test -n "$file_magic_test_file"; then
2762 case $deplibs_check_method in
2763 "file_magic "*)
2764 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2765 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2766 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2767 $EGREP "$file_magic_regex" > /dev/null; then
2768 :
2769 else
2770 cat <<_LT_EOF 1>&2
2771
2772*** Warning: the command libtool uses to detect shared libraries,
2773*** $file_magic_cmd, produces output that libtool cannot recognize.
2774*** The result is that libtool may fail to recognize shared libraries
2775*** as such. This will affect the creation of libtool libraries that
2776*** depend on shared libraries, but programs linked with such libtool
2777*** libraries will work regardless of this problem. Nevertheless, you
2778*** may want to report the problem to your system manager and/or to
2779*** bug-libtool@gnu.org
2780
2781_LT_EOF
2782 fi ;;
2783 esac
2784 fi
2785 break
2786 fi
2787 done
2788 IFS="$lt_save_ifs"
2789 MAGIC_CMD="$lt_save_MAGIC_CMD"
2790 ;;
2791esac])
2792MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2793if test -n "$MAGIC_CMD"; then
2794 AC_MSG_RESULT($MAGIC_CMD)
2795else
2796 AC_MSG_RESULT(no)
2797fi
2798_LT_DECL([], [MAGIC_CMD], [0],
2799 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2800])# _LT_PATH_TOOL_PREFIX
2801
2802# Old name:
2803AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2804dnl aclocal-1.4 backwards compatibility:
2805dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2806
2807
2808# _LT_PATH_MAGIC
2809# --------------
2810# find a file program which can recognize a shared library
2811m4_defun([_LT_PATH_MAGIC],
2812[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2813if test -z "$lt_cv_path_MAGIC_CMD"; then
2814 if test -n "$ac_tool_prefix"; then
2815 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2816 else
2817 MAGIC_CMD=:
2818 fi
2819fi
2820])# _LT_PATH_MAGIC
2821
2822
2823# LT_PATH_LD
2824# ----------
2825# find the pathname to the GNU or non-GNU linker
2826AC_DEFUN([LT_PATH_LD],
2827[AC_REQUIRE([AC_PROG_CC])dnl
2828AC_REQUIRE([AC_CANONICAL_HOST])dnl
2829AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2830m4_require([_LT_DECL_SED])dnl
2831m4_require([_LT_DECL_EGREP])dnl
2832
2833AC_ARG_WITH([gnu-ld],
2834 [AS_HELP_STRING([--with-gnu-ld],
2835 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2836 [test "$withval" = no || with_gnu_ld=yes],
2837 [with_gnu_ld=no])dnl
2838
2839ac_prog=ld
2840if test "$GCC" = yes; then
2841 # Check if gcc -print-prog-name=ld gives a path.
2842 AC_MSG_CHECKING([for ld used by $CC])
2843 case $host in
2844 *-*-mingw*)
2845 # gcc leaves a trailing carriage return which upsets mingw
2846 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2847 *)
2848 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2849 esac
2850 case $ac_prog in
2851 # Accept absolute paths.
2852 [[\\/]]* | ?:[[\\/]]*)
2853 re_direlt='/[[^/]][[^/]]*/\.\./'
2854 # Canonicalize the pathname of ld
2855 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2856 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2857 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2858 done
2859 test -z "$LD" && LD="$ac_prog"
2860 ;;
2861 "")
2862 # If it fails, then pretend we aren't using GCC.
2863 ac_prog=ld
2864 ;;
2865 *)
2866 # If it is relative, then search for the first ld in PATH.
2867 with_gnu_ld=unknown
2868 ;;
2869 esac
2870elif test "$with_gnu_ld" = yes; then
2871 AC_MSG_CHECKING([for GNU ld])
2872else
2873 AC_MSG_CHECKING([for non-GNU ld])
2874fi
2875AC_CACHE_VAL(lt_cv_path_LD,
2876[if test -z "$LD"; then
2877 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2878 for ac_dir in $PATH; do
2879 IFS="$lt_save_ifs"
2880 test -z "$ac_dir" && ac_dir=.
2881 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2882 lt_cv_path_LD="$ac_dir/$ac_prog"
2883 # Check to see if the program is GNU ld. I'd rather use --version,
2884 # but apparently some variants of GNU ld only accept -v.
2885 # Break only if it was the GNU/non-GNU ld that we prefer.
2886 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2887 *GNU* | *'with BFD'*)
2888 test "$with_gnu_ld" != no && break
2889 ;;
2890 *)
2891 test "$with_gnu_ld" != yes && break
2892 ;;
2893 esac
2894 fi
2895 done
2896 IFS="$lt_save_ifs"
2897else
2898 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2899fi])
2900LD="$lt_cv_path_LD"
2901if test -n "$LD"; then
2902 AC_MSG_RESULT($LD)
2903else
2904 AC_MSG_RESULT(no)
2905fi
2906test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2907_LT_PATH_LD_GNU
2908AC_SUBST([LD])
2909
2910_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2911])# LT_PATH_LD
2912
2913# Old names:
2914AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2915AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2916dnl aclocal-1.4 backwards compatibility:
2917dnl AC_DEFUN([AM_PROG_LD], [])
2918dnl AC_DEFUN([AC_PROG_LD], [])
2919
2920
2921# _LT_PATH_LD_GNU
2922#- --------------
2923m4_defun([_LT_PATH_LD_GNU],
2924[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2925[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2926case `$LD -v 2>&1 </dev/null` in
2927*GNU* | *'with BFD'*)
2928 lt_cv_prog_gnu_ld=yes
2929 ;;
2930*)
2931 lt_cv_prog_gnu_ld=no
2932 ;;
2933esac])
2934with_gnu_ld=$lt_cv_prog_gnu_ld
2935])# _LT_PATH_LD_GNU
2936
2937
2938# _LT_CMD_RELOAD
2939# --------------
2940# find reload flag for linker
2941# -- PORTME Some linkers may need a different reload flag.
2942m4_defun([_LT_CMD_RELOAD],
2943[AC_CACHE_CHECK([for $LD option to reload object files],
2944 lt_cv_ld_reload_flag,
2945 [lt_cv_ld_reload_flag='-r'])
2946reload_flag=$lt_cv_ld_reload_flag
2947case $reload_flag in
2948"" | " "*) ;;
2949*) reload_flag=" $reload_flag" ;;
2950esac
2951reload_cmds='$LD$reload_flag -o $output$reload_objs'
2952case $host_os in
2953 darwin*)
2954 if test "$GCC" = yes; then
2955 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2956 else
2957 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2958 fi
2959 ;;
2960esac
2961_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2962_LT_DECL([], [reload_cmds], [2])dnl
2963])# _LT_CMD_RELOAD
2964
2965
2966# _LT_CHECK_MAGIC_METHOD
2967# ----------------------
2968# how to check for library dependencies
2969# -- PORTME fill in with the dynamic library characteristics
2970m4_defun([_LT_CHECK_MAGIC_METHOD],
2971[m4_require([_LT_DECL_EGREP])
2972m4_require([_LT_DECL_OBJDUMP])
2973AC_CACHE_CHECK([how to recognize dependent libraries],
2974lt_cv_deplibs_check_method,
2975[lt_cv_file_magic_cmd='$MAGIC_CMD'
2976lt_cv_file_magic_test_file=
2977lt_cv_deplibs_check_method='unknown'
2978# Need to set the preceding variable on all platforms that support
2979# interlibrary dependencies.
2980# 'none' -- dependencies not supported.
2981# `unknown' -- same as none, but documents that we really don't know.
2982# 'pass_all' -- all dependencies passed with no checks.
2983# 'test_compile' -- check by making test program.
2984# 'file_magic [[regex]]' -- check by looking for files in library path
2985# which responds to the $file_magic_cmd with a given extended regex.
2986# If you have `file' or equivalent on your system and you're not sure
2987# whether `pass_all' will *always* work, you probably want this one.
2988
2989case $host_os in
2990aix[[4-9]]*)
2991 lt_cv_deplibs_check_method=pass_all
2992 ;;
2993
2994beos*)
2995 lt_cv_deplibs_check_method=pass_all
2996 ;;
2997
2998bsdi[[45]]*)
2999 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3000 lt_cv_file_magic_cmd='/usr/bin/file -L'
3001 lt_cv_file_magic_test_file=/shlib/libc.so
3002 ;;
3003
3004cygwin*)
3005 # func_win32_libid is a shell function defined in ltmain.sh
3006 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3007 lt_cv_file_magic_cmd='func_win32_libid'
3008 ;;
3009
3010mingw* | pw32*)
3011 # Base MSYS/MinGW do not provide the 'file' command needed by
3012 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3013 # unless we find 'file', for example because we are cross-compiling.
3014 if ( file / ) >/dev/null 2>&1; then
3015 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3016 lt_cv_file_magic_cmd='func_win32_libid'
3017 else
3018 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3019 lt_cv_file_magic_cmd='$OBJDUMP -f'
3020 fi
3021 ;;
3022
3023cegcc)
3024 # use the weaker test based on 'objdump'. See mingw*.
3025 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3026 lt_cv_file_magic_cmd='$OBJDUMP -f'
3027 ;;
3028
3029darwin* | rhapsody*)
3030 lt_cv_deplibs_check_method=pass_all
3031 ;;
3032
3033freebsd* | dragonfly*)
3034 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3035 case $host_cpu in
3036 i*86 )
3037 # Not sure whether the presence of OpenBSD here was a mistake.
3038 # Let's accept both of them until this is cleared up.
3039 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3040 lt_cv_file_magic_cmd=/usr/bin/file
3041 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3042 ;;
3043 esac
3044 else
3045 lt_cv_deplibs_check_method=pass_all
3046 fi
3047 ;;
3048
3049gnu*)
3050 lt_cv_deplibs_check_method=pass_all
3051 ;;
3052
3053hpux10.20* | hpux11*)
3054 lt_cv_file_magic_cmd=/usr/bin/file
3055 case $host_cpu in
3056 ia64*)
3057 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3058 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3059 ;;
3060 hppa*64*)
3061 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3062 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3063 ;;
3064 *)
3065 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3066 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3067 ;;
3068 esac
3069 ;;
3070
3071interix[[3-9]]*)
3072 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3073 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3074 ;;
3075
3076irix5* | irix6* | nonstopux*)
3077 case $LD in
3078 *-32|*"-32 ") libmagic=32-bit;;
3079 *-n32|*"-n32 ") libmagic=N32;;
3080 *-64|*"-64 ") libmagic=64-bit;;
3081 *) libmagic=never-match;;
3082 esac
3083 lt_cv_deplibs_check_method=pass_all
3084 ;;
3085
3086# This must be Linux ELF.
3087linux* | k*bsd*-gnu | kopensolaris*-gnu)
3088 lt_cv_deplibs_check_method=pass_all
3089 ;;
3090
3091netbsd* | netbsdelf*-gnu)
3092 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3093 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3094 else
3095 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3096 fi
3097 ;;
3098
3099newos6*)
3100 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3101 lt_cv_file_magic_cmd=/usr/bin/file
3102 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3103 ;;
3104
3105*nto* | *qnx*)
3106 lt_cv_deplibs_check_method=pass_all
3107 ;;
3108
3109openbsd*)
3110 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3111 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3112 else
3113 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3114 fi
3115 ;;
3116
3117osf3* | osf4* | osf5*)
3118 lt_cv_deplibs_check_method=pass_all
3119 ;;
3120
3121rdos*)
3122 lt_cv_deplibs_check_method=pass_all
3123 ;;
3124
3125solaris*)
3126 lt_cv_deplibs_check_method=pass_all
3127 ;;
3128
3129sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3130 lt_cv_deplibs_check_method=pass_all
3131 ;;
3132
3133sysv4 | sysv4.3*)
3134 case $host_vendor in
3135 motorola)
3136 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]]'
3137 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3138 ;;
3139 ncr)
3140 lt_cv_deplibs_check_method=pass_all
3141 ;;
3142 sequent)
3143 lt_cv_file_magic_cmd='/bin/file'
3144 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3145 ;;
3146 sni)
3147 lt_cv_file_magic_cmd='/bin/file'
3148 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3149 lt_cv_file_magic_test_file=/lib/libc.so
3150 ;;
3151 siemens)
3152 lt_cv_deplibs_check_method=pass_all
3153 ;;
3154 pc)
3155 lt_cv_deplibs_check_method=pass_all
3156 ;;
3157 esac
3158 ;;
3159
3160tpf*)
3161 lt_cv_deplibs_check_method=pass_all
3162 ;;
3163esac
3164])
3165file_magic_cmd=$lt_cv_file_magic_cmd
3166deplibs_check_method=$lt_cv_deplibs_check_method
3167test -z "$deplibs_check_method" && deplibs_check_method=unknown
3168
3169_LT_DECL([], [deplibs_check_method], [1],
3170 [Method to check whether dependent libraries are shared objects])
3171_LT_DECL([], [file_magic_cmd], [1],
3172 [Command to use when deplibs_check_method == "file_magic"])
3173])# _LT_CHECK_MAGIC_METHOD
3174
3175
3176# LT_PATH_NM
3177# ----------
3178# find the pathname to a BSD- or MS-compatible name lister
3179AC_DEFUN([LT_PATH_NM],
3180[AC_REQUIRE([AC_PROG_CC])dnl
3181AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3182[if test -n "$NM"; then
3183 # Let the user override the test.
3184 lt_cv_path_NM="$NM"
3185else
3186 lt_nm_to_check="${ac_tool_prefix}nm"
3187 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3188 lt_nm_to_check="$lt_nm_to_check nm"
3189 fi
3190 for lt_tmp_nm in $lt_nm_to_check; do
3191 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3192 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3193 IFS="$lt_save_ifs"
3194 test -z "$ac_dir" && ac_dir=.
3195 tmp_nm="$ac_dir/$lt_tmp_nm"
3196 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3197 # Check to see if the nm accepts a BSD-compat flag.
3198 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3199 # nm: unknown option "B" ignored
3200 # Tru64's nm complains that /dev/null is an invalid object file
3201 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3202 */dev/null* | *'Invalid file or object type'*)
3203 lt_cv_path_NM="$tmp_nm -B"
3204 break
3205 ;;
3206 *)
3207 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3208 */dev/null*)
3209 lt_cv_path_NM="$tmp_nm -p"
3210 break
3211 ;;
3212 *)
3213 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3214 continue # so that we can try to find one that supports BSD flags
3215 ;;
3216 esac
3217 ;;
3218 esac
3219 fi
3220 done
3221 IFS="$lt_save_ifs"
3222 done
3223 : ${lt_cv_path_NM=no}
3224fi])
3225if test "$lt_cv_path_NM" != "no"; then
3226 NM="$lt_cv_path_NM"
3227else
3228 # Didn't find any BSD compatible name lister, look for dumpbin.
3229 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3230 AC_SUBST([DUMPBIN])
3231 if test "$DUMPBIN" != ":"; then
3232 NM="$DUMPBIN"
3233 fi
3234fi
3235test -z "$NM" && NM=nm
3236AC_SUBST([NM])
3237_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3238
3239AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3240 [lt_cv_nm_interface="BSD nm"
3241 echo "int some_variable = 0;" > conftest.$ac_ext
3242 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3243 (eval "$ac_compile" 2>conftest.err)
3244 cat conftest.err >&AS_MESSAGE_LOG_FD
3245 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3246 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3247 cat conftest.err >&AS_MESSAGE_LOG_FD
3248 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3249 cat conftest.out >&AS_MESSAGE_LOG_FD
3250 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3251 lt_cv_nm_interface="MS dumpbin"
3252 fi
3253 rm -f conftest*])
3254])# LT_PATH_NM
3255
3256# Old names:
3257AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3258AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3259dnl aclocal-1.4 backwards compatibility:
3260dnl AC_DEFUN([AM_PROG_NM], [])
3261dnl AC_DEFUN([AC_PROG_NM], [])
3262
3263
3264# LT_LIB_M
3265# --------
3266# check for math library
3267AC_DEFUN([LT_LIB_M],
3268[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3269LIBM=
3270case $host in
3271*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3272 # These system don't have libm, or don't need it
3273 ;;
3274*-ncr-sysv4.3*)
3275 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3276 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3277 ;;
3278*)
3279 AC_CHECK_LIB(m, cos, LIBM="-lm")
3280 ;;
3281esac
3282AC_SUBST([LIBM])
3283])# LT_LIB_M
3284
3285# Old name:
3286AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3287dnl aclocal-1.4 backwards compatibility:
3288dnl AC_DEFUN([AC_CHECK_LIBM], [])
3289
3290
3291# _LT_COMPILER_NO_RTTI([TAGNAME])
3292# -------------------------------
3293m4_defun([_LT_COMPILER_NO_RTTI],
3294[m4_require([_LT_TAG_COMPILER])dnl
3295
3296_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3297
3298if test "$GCC" = yes; then
3299 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3300
3301 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3302 lt_cv_prog_compiler_rtti_exceptions,
3303 [-fno-rtti -fno-exceptions], [],
3304 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3305fi
3306_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3307 [Compiler flag to turn off builtin functions])
3308])# _LT_COMPILER_NO_RTTI
3309
3310
3311# _LT_CMD_GLOBAL_SYMBOLS
3312# ----------------------
3313m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3314[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3315AC_REQUIRE([AC_PROG_CC])dnl
3316AC_REQUIRE([LT_PATH_NM])dnl
3317AC_REQUIRE([LT_PATH_LD])dnl
3318m4_require([_LT_DECL_SED])dnl
3319m4_require([_LT_DECL_EGREP])dnl
3320m4_require([_LT_TAG_COMPILER])dnl
3321
3322# Check for command to grab the raw symbol name followed by C symbol from nm.
3323AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3324AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3325[
3326# These are sane defaults that work on at least a few old systems.
3327# [They come from Ultrix. What could be older than Ultrix?!! ;)]
3328
3329# Character class describing NM global symbol codes.
3330symcode='[[BCDEGRST]]'
3331
3332# Regexp to match symbols that can be accessed directly from C.
3333sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3334
3335# Define system-specific variables.
3336case $host_os in
3337aix*)
3338 symcode='[[BCDT]]'
3339 ;;
3340cygwin* | mingw* | pw32* | cegcc*)
3341 symcode='[[ABCDGISTW]]'
3342 ;;
3343hpux*)
3344 if test "$host_cpu" = ia64; then
3345 symcode='[[ABCDEGRST]]'
3346 fi
3347 ;;
3348irix* | nonstopux*)
3349 symcode='[[BCDEGRST]]'
3350 ;;
3351osf*)
3352 symcode='[[BCDEGQRST]]'
3353 ;;
3354solaris*)
3355 symcode='[[BDRT]]'
3356 ;;
3357sco3.2v5*)
3358 symcode='[[DT]]'
3359 ;;
3360sysv4.2uw2*)
3361 symcode='[[DT]]'
3362 ;;
3363sysv5* | sco5v6* | unixware* | OpenUNIX*)
3364 symcode='[[ABDT]]'
3365 ;;
3366sysv4)
3367 symcode='[[DFNSTU]]'
3368 ;;
3369esac
3370
3371# If we're using GNU nm, then use its standard symbol codes.
3372case `$NM -V 2>&1` in
3373*GNU* | *'with BFD'*)
3374 symcode='[[ABCDGIRSTW]]' ;;
3375esac
3376
3377# Transform an extracted symbol line into a proper C declaration.
3378# Some systems (esp. on ia64) link data and code symbols differently,
3379# so use this general approach.
3380lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3381
3382# Transform an extracted symbol line into symbol name and symbol address
3383lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3384lt_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'"
3385
3386# Handle CRLF in mingw tool chain
3387opt_cr=
3388case $build_os in
3389mingw*)
3390 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3391 ;;
3392esac
3393
3394# Try without a prefix underscore, then with it.
3395for ac_symprfx in "" "_"; do
3396
3397 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3398 symxfrm="\\1 $ac_symprfx\\2 \\2"
3399
3400 # Write the raw and C identifiers.
3401 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3402 # Fake it for dumpbin and say T for any non-static function
3403 # and D for any global variable.
3404 # Also find C++ and __fastcall symbols from MSVC++,
3405 # which start with @ or ?.
3406 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3407" {last_section=section; section=\$ 3};"\
3408" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3409" \$ 0!~/External *\|/{next};"\
3410" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3411" {if(hide[section]) next};"\
3412" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3413" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3414" s[1]~/^[@?]/{print s[1], s[1]; next};"\
3415" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3416" ' prfx=^$ac_symprfx]"
3417 else
3418 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3419 fi
3420
3421 # Check to see that the pipe works correctly.
3422 pipe_works=no
3423
3424 rm -f conftest*
3425 cat > conftest.$ac_ext <<_LT_EOF
3426#ifdef __cplusplus
3427extern "C" {
3428#endif
3429char nm_test_var;
3430void nm_test_func(void);
3431void nm_test_func(void){}
3432#ifdef __cplusplus
3433}
3434#endif
3435int main(){nm_test_var='a';nm_test_func();return(0);}
3436_LT_EOF
3437
3438 if AC_TRY_EVAL(ac_compile); then
3439 # Now try to grab the symbols.
3440 nlist=conftest.nm
3441 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3442 # Try sorting and uniquifying the output.
3443 if sort "$nlist" | uniq > "$nlist"T; then
3444 mv -f "$nlist"T "$nlist"
3445 else
3446 rm -f "$nlist"T
3447 fi
3448
3449 # Make sure that we snagged all the symbols we need.
3450 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3451 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3452 cat <<_LT_EOF > conftest.$ac_ext
3453#ifdef __cplusplus
3454extern "C" {
3455#endif
3456
3457_LT_EOF
3458 # Now generate the symbol file.
3459 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3460
3461 cat <<_LT_EOF >> conftest.$ac_ext
3462
3463/* The mapping between symbol names and symbols. */
3464const struct {
3465 const char *name;
3466 void *address;
3467}
3468lt__PROGRAM__LTX_preloaded_symbols[[]] =
3469{
3470 { "@PROGRAM@", (void *) 0 },
3471_LT_EOF
3472 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3473 cat <<\_LT_EOF >> conftest.$ac_ext
3474 {0, (void *) 0}
3475};
3476
3477/* This works around a problem in FreeBSD linker */
3478#ifdef FREEBSD_WORKAROUND
3479static const void *lt_preloaded_setup() {
3480 return lt__PROGRAM__LTX_preloaded_symbols;
3481}
3482#endif
3483
3484#ifdef __cplusplus
3485}
3486#endif
3487_LT_EOF
3488 # Now try linking the two files.
3489 mv conftest.$ac_objext conftstm.$ac_objext
3490 lt_save_LIBS="$LIBS"
3491 lt_save_CFLAGS="$CFLAGS"
3492 LIBS="conftstm.$ac_objext"
3493 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3494 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3495 pipe_works=yes
3496 fi
3497 LIBS="$lt_save_LIBS"
3498 CFLAGS="$lt_save_CFLAGS"
3499 else
3500 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3501 fi
3502 else
3503 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3504 fi
3505 else
3506 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3507 fi
3508 else
3509 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3510 cat conftest.$ac_ext >&5
3511 fi
3512 rm -rf conftest* conftst*
3513
3514 # Do not use the global_symbol_pipe unless it works.
3515 if test "$pipe_works" = yes; then
3516 break
3517 else
3518 lt_cv_sys_global_symbol_pipe=
3519 fi
3520done
3521])
3522if test -z "$lt_cv_sys_global_symbol_pipe"; then
3523 lt_cv_sys_global_symbol_to_cdecl=
3524fi
3525if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3526 AC_MSG_RESULT(failed)
3527else
3528 AC_MSG_RESULT(ok)
3529fi
3530
3531_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3532 [Take the output of nm and produce a listing of raw symbols and C names])
3533_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3534 [Transform the output of nm in a proper C declaration])
3535_LT_DECL([global_symbol_to_c_name_address],
3536 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3537 [Transform the output of nm in a C name address pair])
3538_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3539 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3540 [Transform the output of nm in a C name address pair when lib prefix is needed])
3541]) # _LT_CMD_GLOBAL_SYMBOLS
3542
3543
3544# _LT_COMPILER_PIC([TAGNAME])
3545# ---------------------------
3546m4_defun([_LT_COMPILER_PIC],
3547[m4_require([_LT_TAG_COMPILER])dnl
3548_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3549_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3550_LT_TAGVAR(lt_prog_compiler_static, $1)=
3551
3552AC_MSG_CHECKING([for $compiler option to produce PIC])
3553m4_if([$1], [CXX], [
3554 # C++ specific cases for pic, static, wl, etc.
3555 if test "$GXX" = yes; then
3556 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3557 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3558
3559 case $host_os in
3560 aix*)
3561 # All AIX code is PIC.
3562 if test "$host_cpu" = ia64; then
3563 # AIX 5 now supports IA64 processor
3564 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3565 fi
3566 ;;
3567
3568 amigaos*)
3569 case $host_cpu in
3570 powerpc)
3571 # see comment about AmigaOS4 .so support
3572 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3573 ;;
3574 m68k)
3575 # FIXME: we need at least 68020 code to build shared libraries, but
3576 # adding the `-m68020' flag to GCC prevents building anything better,
3577 # like `-m68040'.
3578 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3579 ;;
3580 esac
3581 ;;
3582
3583 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3584 # PIC is the default for these OSes.
3585 ;;
3586 mingw* | cygwin* | os2* | pw32* | cegcc*)
3587 # This hack is so that the source file can tell whether it is being
3588 # built for inclusion in a dll (and should export symbols for example).
3589 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3590 # (--disable-auto-import) libraries
3591 m4_if([$1], [GCJ], [],
3592 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3593 ;;
3594 darwin* | rhapsody*)
3595 # PIC is the default on this platform
3596 # Common symbols not allowed in MH_DYLIB files
3597 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3598 ;;
3599 *djgpp*)
3600 # DJGPP does not support shared libraries at all
3601 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3602 ;;
3603 interix[[3-9]]*)
3604 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3605 # Instead, we relocate shared libraries at runtime.
3606 ;;
3607 sysv4*MP*)
3608 if test -d /usr/nec; then
3609 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3610 fi
3611 ;;
3612 hpux*)
3613 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3614 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3615 # sets the default TLS model and affects inlining.
3616 case $host_cpu in
3617 hppa*64*)
3618 ;;
3619 *)
3620 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3621 ;;
3622 esac
3623 ;;
3624 *qnx* | *nto*)
3625 # QNX uses GNU C++, but need to define -shared option too, otherwise
3626 # it will coredump.
3627 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3628 ;;
3629 *)
3630 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3631 ;;
3632 esac
3633 else
3634 case $host_os in
3635 aix[[4-9]]*)
3636 # All AIX code is PIC.
3637 if test "$host_cpu" = ia64; then
3638 # AIX 5 now supports IA64 processor
3639 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3640 else
3641 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3642 fi
3643 ;;
3644 chorus*)
3645 case $cc_basename in
3646 cxch68*)
3647 # Green Hills C++ Compiler
3648 # _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"
3649 ;;
3650 esac
3651 ;;
3652 dgux*)
3653 case $cc_basename in
3654 ec++*)
3655 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3656 ;;
3657 ghcx*)
3658 # Green Hills C++ Compiler
3659 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3660 ;;
3661 *)
3662 ;;
3663 esac
3664 ;;
3665 freebsd* | dragonfly*)
3666 # FreeBSD uses GNU C++
3667 ;;
3668 hpux9* | hpux10* | hpux11*)
3669 case $cc_basename in
3670 CC*)
3671 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3672 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3673 if test "$host_cpu" != ia64; then
3674 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3675 fi
3676 ;;
3677 aCC*)
3678 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3679 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3680 case $host_cpu in
3681 hppa*64*|ia64*)
3682 # +Z the default
3683 ;;
3684 *)
3685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3686 ;;
3687 esac
3688 ;;
3689 *)
3690 ;;
3691 esac
3692 ;;
3693 interix*)
3694 # This is c89, which is MS Visual C++ (no shared libs)
3695 # Anyone wants to do a port?
3696 ;;
3697 irix5* | irix6* | nonstopux*)
3698 case $cc_basename in
3699 CC*)
3700 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3701 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3702 # CC pic flag -KPIC is the default.
3703 ;;
3704 *)
3705 ;;
3706 esac
3707 ;;
3708 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3709 case $cc_basename in
3710 KCC*)
3711 # KAI C++ Compiler
3712 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3713 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3714 ;;
3715 ecpc* )
3716 # old Intel C++ for x86_64 which still supported -KPIC.
3717 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3718 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3719 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3720 ;;
3721 icpc* )
3722 # Intel C++, used to be incompatible with GCC.
3723 # ICC 10 doesn't accept -KPIC any more.
3724 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3725 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3726 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3727 ;;
3728 pgCC* | pgcpp*)
3729 # Portland Group C++ compiler
3730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3731 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3732 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3733 ;;
3734 cxx*)
3735 # Compaq C++
3736 # Make sure the PIC flag is empty. It appears that all Alpha
3737 # Linux and Compaq Tru64 Unix objects are PIC.
3738 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3740 ;;
3741 xlc* | xlC*)
3742 # IBM XL 8.0 on PPC
3743 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3745 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3746 ;;
3747 *)
3748 case `$CC -V 2>&1 | sed 5q` in
3749 *Sun\ C*)
3750 # Sun C++ 5.9
3751 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3752 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3753 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3754 ;;
3755 esac
3756 ;;
3757 esac
3758 ;;
3759 lynxos*)
3760 ;;
3761 m88k*)
3762 ;;
3763 mvs*)
3764 case $cc_basename in
3765 cxx*)
3766 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3767 ;;
3768 *)
3769 ;;
3770 esac
3771 ;;
3772 netbsd* | netbsdelf*-gnu)
3773 ;;
3774 *qnx* | *nto*)
3775 # QNX uses GNU C++, but need to define -shared option too, otherwise
3776 # it will coredump.
3777 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3778 ;;
3779 osf3* | osf4* | osf5*)
3780 case $cc_basename in
3781 KCC*)
3782 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3783 ;;
3784 RCC*)
3785 # Rational C++ 2.4.1
3786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3787 ;;
3788 cxx*)
3789 # Digital/Compaq C++
3790 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3791 # Make sure the PIC flag is empty. It appears that all Alpha
3792 # Linux and Compaq Tru64 Unix objects are PIC.
3793 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3794 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3795 ;;
3796 *)
3797 ;;
3798 esac
3799 ;;
3800 psos*)
3801 ;;
3802 solaris*)
3803 case $cc_basename in
3804 CC*)
3805 # Sun C++ 4.2, 5.x and Centerline C++
3806 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3807 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3808 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3809 ;;
3810 gcx*)
3811 # Green Hills C++ Compiler
3812 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3813 ;;
3814 *)
3815 ;;
3816 esac
3817 ;;
3818 sunos4*)
3819 case $cc_basename in
3820 CC*)
3821 # Sun C++ 4.x
3822 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3823 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3824 ;;
3825 lcc*)
3826 # Lucid
3827 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3828 ;;
3829 *)
3830 ;;
3831 esac
3832 ;;
3833 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3834 case $cc_basename in
3835 CC*)
3836 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3837 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3838 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3839 ;;
3840 esac
3841 ;;
3842 tandem*)
3843 case $cc_basename in
3844 NCC*)
3845 # NonStop-UX NCC 3.20
3846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3847 ;;
3848 *)
3849 ;;
3850 esac
3851 ;;
3852 vxworks*)
3853 ;;
3854 *)
3855 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3856 ;;
3857 esac
3858 fi
3859],
3860[
3861 if test "$GCC" = yes; then
3862 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3863 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3864
3865 case $host_os in
3866 aix*)
3867 # All AIX code is PIC.
3868 if test "$host_cpu" = ia64; then
3869 # AIX 5 now supports IA64 processor
3870 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3871 fi
3872 ;;
3873
3874 amigaos*)
3875 case $host_cpu in
3876 powerpc)
3877 # see comment about AmigaOS4 .so support
3878 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3879 ;;
3880 m68k)
3881 # FIXME: we need at least 68020 code to build shared libraries, but
3882 # adding the `-m68020' flag to GCC prevents building anything better,
3883 # like `-m68040'.
3884 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3885 ;;
3886 esac
3887 ;;
3888
3889 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3890 # PIC is the default for these OSes.
3891 ;;
3892
3893 mingw* | cygwin* | pw32* | os2* | cegcc*)
3894 # This hack is so that the source file can tell whether it is being
3895 # built for inclusion in a dll (and should export symbols for example).
3896 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3897 # (--disable-auto-import) libraries
3898 m4_if([$1], [GCJ], [],
3899 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3900 ;;
3901
3902 darwin* | rhapsody*)
3903 # PIC is the default on this platform
3904 # Common symbols not allowed in MH_DYLIB files
3905 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3906 ;;
3907
3908 hpux*)
3909 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3910 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3911 # sets the default TLS model and affects inlining.
3912 case $host_cpu in
3913 hppa*64*)
3914 # +Z the default
3915 ;;
3916 *)
3917 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3918 ;;
3919 esac
3920 ;;
3921
3922 interix[[3-9]]*)
3923 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3924 # Instead, we relocate shared libraries at runtime.
3925 ;;
3926
3927 msdosdjgpp*)
3928 # Just because we use GCC doesn't mean we suddenly get shared libraries
3929 # on systems that don't support them.
3930 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3931 enable_shared=no
3932 ;;
3933
3934 *nto* | *qnx*)
3935 # QNX uses GNU C++, but need to define -shared option too, otherwise
3936 # it will coredump.
3937 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3938 ;;
3939
3940 sysv4*MP*)
3941 if test -d /usr/nec; then
3942 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3943 fi
3944 ;;
3945
3946 *)
3947 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3948 ;;
3949 esac
3950 else
3951 # PORTME Check for flag to pass linker flags through the system compiler.
3952 case $host_os in
3953 aix*)
3954 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3955 if test "$host_cpu" = ia64; then
3956 # AIX 5 now supports IA64 processor
3957 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3958 else
3959 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3960 fi
3961 ;;
3962
3963 mingw* | cygwin* | pw32* | os2* | cegcc*)
3964 # This hack is so that the source file can tell whether it is being
3965 # built for inclusion in a dll (and should export symbols for example).
3966 m4_if([$1], [GCJ], [],
3967 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3968 ;;
3969
3970 hpux9* | hpux10* | hpux11*)
3971 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3972 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3973 # not for PA HP-UX.
3974 case $host_cpu in
3975 hppa*64*|ia64*)
3976 # +Z the default
3977 ;;
3978 *)
3979 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3980 ;;
3981 esac
3982 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3983 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3984 ;;
3985
3986 irix5* | irix6* | nonstopux*)
3987 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3988 # PIC (with -KPIC) is the default.
3989 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3990 ;;
3991
3992 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3993 case $cc_basename in
3994 # old Intel for x86_64 which still supported -KPIC.
3995 ecc*)
3996 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3997 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3998 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3999 ;;
4000 # icc used to be incompatible with GCC.
4001 # ICC 10 doesn't accept -KPIC any more.
4002 icc* | ifort*)
4003 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4004 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4005 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4006 ;;
4007 # Lahey Fortran 8.1.
4008 lf95*)
4009 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4011 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4012 ;;
4013 pgcc* | pgf77* | pgf90* | pgf95*)
4014 # Portland Group compilers (*not* the Pentium gcc compiler,
4015 # which looks to be a dead project)
4016 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4018 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4019 ;;
4020 ccc*)
4021 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4022 # All Alpha code is PIC.
4023 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4024 ;;
4025 xl*)
4026 # IBM XL C 8.0/Fortran 10.1 on PPC
4027 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4029 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4030 ;;
4031 *)
4032 case `$CC -V 2>&1 | sed 5q` in
4033 *Sun\ C*)
4034 # Sun C 5.9
4035 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4036 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4037 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4038 ;;
4039 *Sun\ F*)
4040 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4042 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4044 ;;
4045 esac
4046 ;;
4047 esac
4048 ;;
4049
4050 newsos6)
4051 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4052 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4053 ;;
4054
4055 *nto* | *qnx*)
4056 # QNX uses GNU C++, but need to define -shared option too, otherwise
4057 # it will coredump.
4058 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4059 ;;
4060
4061 osf3* | osf4* | osf5*)
4062 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4063 # All OSF/1 code is PIC.
4064 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4065 ;;
4066
4067 rdos*)
4068 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4069 ;;
4070
4071 solaris*)
4072 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4073 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4074 case $cc_basename in
4075 f77* | f90* | f95*)
4076 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4077 *)
4078 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4079 esac
4080 ;;
4081
4082 sunos4*)
4083 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4084 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4085 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4086 ;;
4087
4088 sysv4 | sysv4.2uw2* | sysv4.3*)
4089 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4090 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4091 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4092 ;;
4093
4094 sysv4*MP*)
4095 if test -d /usr/nec ;then
4096 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4097 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4098 fi
4099 ;;
4100
4101 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4102 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4103 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4104 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4105 ;;
4106
4107 unicos*)
4108 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4109 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4110 ;;
4111
4112 uts4*)
4113 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4114 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4115 ;;
4116
4117 *)
4118 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4119 ;;
4120 esac
4121 fi
4122])
4123case $host_os in
4124 # For platforms which do not support PIC, -DPIC is meaningless:
4125 *djgpp*)
4126 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4127 ;;
4128 *)
4129 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4130 ;;
4131esac
4132AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4133_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4134 [How to pass a linker flag through the compiler])
4135
4136#
4137# Check to make sure the PIC flag actually works.
4138#
4139if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4140 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4141 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4142 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4143 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4144 "" | " "*) ;;
4145 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4146 esac],
4147 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4148 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4149fi
4150_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4151 [Additional compiler flags for building library objects])
4152
4153#
4154# Check to make sure the static flag actually works.
4155#
4156wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4157_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4158 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4159 $lt_tmp_static_flag,
4160 [],
4161 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4162_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4163 [Compiler flag to prevent dynamic linking])
4164])# _LT_COMPILER_PIC
4165
4166
4167# _LT_LINKER_SHLIBS([TAGNAME])
4168# ----------------------------
4169# See if the linker supports building shared libraries.
4170m4_defun([_LT_LINKER_SHLIBS],
4171[AC_REQUIRE([LT_PATH_LD])dnl
4172AC_REQUIRE([LT_PATH_NM])dnl
4173m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4174m4_require([_LT_DECL_EGREP])dnl
4175m4_require([_LT_DECL_SED])dnl
4176m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4177m4_require([_LT_TAG_COMPILER])dnl
4178AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4179m4_if([$1], [CXX], [
4180 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4181 case $host_os in
4182 aix[[4-9]]*)
4183 # If we're using GNU nm, then we don't want the "-C" option.
4184 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4185 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4186 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4187 else
4188 _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'
4189 fi
4190 ;;
4191 pw32*)
4192 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4193 ;;
4194 cygwin* | mingw* | cegcc*)
4195 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4196 ;;
4197 linux* | k*bsd*-gnu)
4198 _LT_TAGVAR(link_all_deplibs, $1)=no
4199 ;;
4200 *)
4201 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4202 ;;
4203 esac
4204 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4205], [
4206 runpath_var=
4207 _LT_TAGVAR(allow_undefined_flag, $1)=
4208 _LT_TAGVAR(always_export_symbols, $1)=no
4209 _LT_TAGVAR(archive_cmds, $1)=
4210 _LT_TAGVAR(archive_expsym_cmds, $1)=
4211 _LT_TAGVAR(compiler_needs_object, $1)=no
4212 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4213 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4214 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4215 _LT_TAGVAR(hardcode_automatic, $1)=no
4216 _LT_TAGVAR(hardcode_direct, $1)=no
4217 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4219 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4220 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4221 _LT_TAGVAR(hardcode_minus_L, $1)=no
4222 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4223 _LT_TAGVAR(inherit_rpath, $1)=no
4224 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4225 _LT_TAGVAR(module_cmds, $1)=
4226 _LT_TAGVAR(module_expsym_cmds, $1)=
4227 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4228 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4229 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4230 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4231 # include_expsyms should be a list of space-separated symbols to be *always*
4232 # included in the symbol list
4233 _LT_TAGVAR(include_expsyms, $1)=
4234 # exclude_expsyms can be an extended regexp of symbols to exclude
4235 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4236 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4237 # as well as any symbol that contains `d'.
4238 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4239 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4240 # platforms (ab)use it in PIC code, but their linkers get confused if
4241 # the symbol is explicitly referenced. Since portable code cannot
4242 # rely on this symbol name, it's probably fine to never include it in
4243 # preloaded symbol tables.
4244 # Exclude shared library initialization/finalization symbols.
4245dnl Note also adjust exclude_expsyms for C++ above.
4246 extract_expsyms_cmds=
4247
4248 case $host_os in
4249 cygwin* | mingw* | pw32* | cegcc*)
4250 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4251 # When not using gcc, we currently assume that we are using
4252 # Microsoft Visual C++.
4253 if test "$GCC" != yes; then
4254 with_gnu_ld=no
4255 fi
4256 ;;
4257 interix*)
4258 # we just hope/assume this is gcc and not c89 (= MSVC++)
4259 with_gnu_ld=yes
4260 ;;
4261 openbsd*)
4262 with_gnu_ld=no
4263 ;;
4264 linux* | k*bsd*-gnu)
4265 _LT_TAGVAR(link_all_deplibs, $1)=no
4266 ;;
4267 esac
4268
4269 _LT_TAGVAR(ld_shlibs, $1)=yes
4270 if test "$with_gnu_ld" = yes; then
4271 # If archive_cmds runs LD, not CC, wlarc should be empty
4272 wlarc='${wl}'
4273
4274 # Set some defaults for GNU ld with shared library support. These
4275 # are reset later if shared libraries are not supported. Putting them
4276 # here allows them to be overridden if necessary.
4277 runpath_var=LD_RUN_PATH
4278 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4279 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4280 # ancient GNU ld didn't support --whole-archive et. al.
4281 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4282 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4283 else
4284 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4285 fi
4286 supports_anon_versioning=no
4287 case `$LD -v 2>&1` in
4288 *GNU\ gold*) supports_anon_versioning=yes ;;
4289 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4290 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4291 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4292 *\ 2.11.*) ;; # other 2.11 versions
4293 *) supports_anon_versioning=yes ;;
4294 esac
4295
4296 # See if GNU ld supports shared libraries.
4297 case $host_os in
4298 aix[[3-9]]*)
4299 # On AIX/PPC, the GNU linker is very broken
4300 if test "$host_cpu" != ia64; then
4301 _LT_TAGVAR(ld_shlibs, $1)=no
4302 cat <<_LT_EOF 1>&2
4303
4304*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4305*** to be unable to reliably create shared libraries on AIX.
4306*** Therefore, libtool is disabling shared libraries support. If you
4307*** really care for shared libraries, you may want to modify your PATH
4308*** so that a non-GNU linker is found, and then restart.
4309
4310_LT_EOF
4311 fi
4312 ;;
4313
4314 amigaos*)
4315 case $host_cpu in
4316 powerpc)
4317 # see comment about AmigaOS4 .so support
4318 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4319 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4320 ;;
4321 m68k)
4322 _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)'
4323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4324 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4325 ;;
4326 esac
4327 ;;
4328
4329 beos*)
4330 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4331 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4332 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4333 # support --undefined. This deserves some investigation. FIXME
4334 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4335 else
4336 _LT_TAGVAR(ld_shlibs, $1)=no
4337 fi
4338 ;;
4339
4340 cygwin* | mingw* | pw32* | cegcc*)
4341 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4342 # as there is no search path for DLLs.
4343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4344 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4345 _LT_TAGVAR(always_export_symbols, $1)=no
4346 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4347 _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'
4348
4349 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4350 _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'
4351 # If the export-symbols file already is a .def file (1st line
4352 # is EXPORTS), use it as is; otherwise, prepend...
4353 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4354 cp $export_symbols $output_objdir/$soname.def;
4355 else
4356 echo EXPORTS > $output_objdir/$soname.def;
4357 cat $export_symbols >> $output_objdir/$soname.def;
4358 fi~
4359 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4360 else
4361 _LT_TAGVAR(ld_shlibs, $1)=no
4362 fi
4363 ;;
4364
4365 interix[[3-9]]*)
4366 _LT_TAGVAR(hardcode_direct, $1)=no
4367 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4369 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4370 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4371 # Instead, shared libraries are loaded at an image base (0x10000000 by
4372 # default) and relocated if they conflict, which is a slow very memory
4373 # consuming and fragmenting process. To avoid this, we pick a random,
4374 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4375 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4376 _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'
4377 _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'
4378 ;;
4379
4380 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4381 tmp_diet=no
4382 if test "$host_os" = linux-dietlibc; then
4383 case $cc_basename in
4384 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4385 esac
4386 fi
4387 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4388 && test "$tmp_diet" = no
4389 then
4390 tmp_addflag=
4391 tmp_sharedflag='-shared'
4392 case $cc_basename,$host_cpu in
4393 pgcc*) # Portland Group C compiler
4394 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4395 tmp_addflag=' $pic_flag'
4396 ;;
4397 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4398 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4399 tmp_addflag=' $pic_flag -Mnomain' ;;
4400 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4401 tmp_addflag=' -i_dynamic' ;;
4402 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4403 tmp_addflag=' -i_dynamic -nofor_main' ;;
4404 ifc* | ifort*) # Intel Fortran compiler
4405 tmp_addflag=' -nofor_main' ;;
4406 lf95*) # Lahey Fortran 8.1
4407 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4408 tmp_sharedflag='--shared' ;;
4409 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4410 tmp_sharedflag='-qmkshrobj'
4411 tmp_addflag= ;;
4412 esac
4413 case `$CC -V 2>&1 | sed 5q` in
4414 *Sun\ C*) # Sun C 5.9
4415 _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4416 _LT_TAGVAR(compiler_needs_object, $1)=yes
4417 tmp_sharedflag='-G' ;;
4418 *Sun\ F*) # Sun Fortran 8.3
4419 tmp_sharedflag='-G' ;;
4420 esac
4421 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4422
4423 if test "x$supports_anon_versioning" = xyes; then
4424 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4425 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4426 echo "local: *; };" >> $output_objdir/$libname.ver~
4427 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4428 fi
4429
4430 case $cc_basename in
4431 xlf*)
4432 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4433 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4434 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4435 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4436 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4437 if test "x$supports_anon_versioning" = xyes; then
4438 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4439 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4440 echo "local: *; };" >> $output_objdir/$libname.ver~
4441 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4442 fi
4443 ;;
4444 esac
4445 else
4446 _LT_TAGVAR(ld_shlibs, $1)=no
4447 fi
4448 ;;
4449
4450 netbsd* | netbsdelf*-gnu)
4451 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4452 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4453 wlarc=
4454 else
4455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4456 _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'
4457 fi
4458 ;;
4459
4460 solaris*)
4461 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4462 _LT_TAGVAR(ld_shlibs, $1)=no
4463 cat <<_LT_EOF 1>&2
4464
4465*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4466*** create shared libraries on Solaris systems. Therefore, libtool
4467*** is disabling shared libraries support. We urge you to upgrade GNU
4468*** binutils to release 2.9.1 or newer. Another option is to modify
4469*** your PATH or compiler configuration so that the native linker is
4470*** used, and then restart.
4471
4472_LT_EOF
4473 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4474 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4475 _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'
4476 else
4477 _LT_TAGVAR(ld_shlibs, $1)=no
4478 fi
4479 ;;
4480
4481 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4482 case `$LD -v 2>&1` in
4483 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4484 _LT_TAGVAR(ld_shlibs, $1)=no
4485 cat <<_LT_EOF 1>&2
4486
4487*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4488*** reliably create shared libraries on SCO systems. Therefore, libtool
4489*** is disabling shared libraries support. We urge you to upgrade GNU
4490*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4491*** your PATH or compiler configuration so that the native linker is
4492*** used, and then restart.
4493
4494_LT_EOF
4495 ;;
4496 *)
4497 # For security reasons, it is highly recommended that you always
4498 # use absolute paths for naming shared libraries, and exclude the
4499 # DT_RUNPATH tag from executables and libraries. But doing so
4500 # requires that you compile everything twice, which is a pain.
4501 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4502 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4503 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4504 _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'
4505 else
4506 _LT_TAGVAR(ld_shlibs, $1)=no
4507 fi
4508 ;;
4509 esac
4510 ;;
4511
4512 sunos4*)
4513 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4514 wlarc=
4515 _LT_TAGVAR(hardcode_direct, $1)=yes
4516 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4517 ;;
4518
4519 *)
4520 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4521 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4522 _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'
4523 else
4524 _LT_TAGVAR(ld_shlibs, $1)=no
4525 fi
4526 ;;
4527 esac
4528
4529 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4530 runpath_var=
4531 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4532 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4533 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4534 fi
4535 else
4536 # PORTME fill in a description of your system's linker (not GNU ld)
4537 case $host_os in
4538 aix3*)
4539 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4540 _LT_TAGVAR(always_export_symbols, $1)=yes
4541 _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'
4542 # Note: this linker hardcodes the directories in LIBPATH if there
4543 # are no directories specified by -L.
4544 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4545 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4546 # Neither direct hardcoding nor static linking is supported with a
4547 # broken collect2.
4548 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4549 fi
4550 ;;
4551
4552 aix[[4-9]]*)
4553 if test "$host_cpu" = ia64; then
4554 # On IA64, the linker does run time linking by default, so we don't
4555 # have to do anything special.
4556 aix_use_runtimelinking=no
4557 exp_sym_flag='-Bexport'
4558 no_entry_flag=""
4559 else
4560 # If we're using GNU nm, then we don't want the "-C" option.
4561 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4562 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4563 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4564 else
4565 _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'
4566 fi
4567 aix_use_runtimelinking=no
4568
4569 # Test if we are trying to use run time linking or normal
4570 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4571 # need to do runtime linking.
4572 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4573 for ld_flag in $LDFLAGS; do
4574 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4575 aix_use_runtimelinking=yes
4576 break
4577 fi
4578 done
4579 ;;
4580 esac
4581
4582 exp_sym_flag='-bexport'
4583 no_entry_flag='-bnoentry'
4584 fi
4585
4586 # When large executables or shared objects are built, AIX ld can
4587 # have problems creating the table of contents. If linking a library
4588 # or program results in "error TOC overflow" add -mminimal-toc to
4589 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4590 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4591
4592 _LT_TAGVAR(archive_cmds, $1)=''
4593 _LT_TAGVAR(hardcode_direct, $1)=yes
4594 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4595 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4596 _LT_TAGVAR(link_all_deplibs, $1)=yes
4597 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4598
4599 if test "$GCC" = yes; then
4600 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4601 # We only want to do this on AIX 4.2 and lower, the check
4602 # below for broken collect2 doesn't work under 4.3+
4603 collect2name=`${CC} -print-prog-name=collect2`
4604 if test -f "$collect2name" &&
4605 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4606 then
4607 # We have reworked collect2
4608 :
4609 else
4610 # We have old collect2
4611 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4612 # It fails to find uninstalled libraries when the uninstalled
4613 # path is not listed in the libpath. Setting hardcode_minus_L
4614 # to unsupported forces relinking
4615 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4616 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4617 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4618 fi
4619 ;;
4620 esac
4621 shared_flag='-shared'
4622 if test "$aix_use_runtimelinking" = yes; then
4623 shared_flag="$shared_flag "'${wl}-G'
4624 fi
4625 _LT_TAGVAR(link_all_deplibs, $1)=no
4626 else
4627 # not using gcc
4628 if test "$host_cpu" = ia64; then
4629 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4630 # chokes on -Wl,-G. The following line is correct:
4631 shared_flag='-G'
4632 else
4633 if test "$aix_use_runtimelinking" = yes; then
4634 shared_flag='${wl}-G'
4635 else
4636 shared_flag='${wl}-bM:SRE'
4637 fi
4638 fi
4639 fi
4640
4641 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4642 # It seems that -bexpall does not export symbols beginning with
4643 # underscore (_), so it is better to generate a list of symbols to export.
4644 _LT_TAGVAR(always_export_symbols, $1)=yes
4645 if test "$aix_use_runtimelinking" = yes; then
4646 # Warning - without using the other runtime loading flags (-brtl),
4647 # -berok will link without error, but may produce a broken library.
4648 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4649 # Determine the default libpath from the value encoded in an
4650 # empty executable.
4651 _LT_SYS_MODULE_PATH_AIX
4652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4653 _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4654 else
4655 if test "$host_cpu" = ia64; then
4656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4657 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4658 _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"
4659 else
4660 # Determine the default libpath from the value encoded in an
4661 # empty executable.
4662 _LT_SYS_MODULE_PATH_AIX
4663 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4664 # Warning - without using the other run time loading flags,
4665 # -berok will link without error, but may produce a broken library.
4666 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4667 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4668 # Exported symbols can be pulled into shared objects from archives
4669 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4670 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4671 # This is similar to how AIX traditionally builds its shared libraries.
4672 _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'
4673 fi
4674 fi
4675 ;;
4676
4677 amigaos*)
4678 case $host_cpu in
4679 powerpc)
4680 # see comment about AmigaOS4 .so support
4681 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4682 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4683 ;;
4684 m68k)
4685 _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)'
4686 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4687 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4688 ;;
4689 esac
4690 ;;
4691
4692 bsdi[[45]]*)
4693 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4694 ;;
4695
4696 cygwin* | mingw* | pw32* | cegcc*)
4697 # When not using gcc, we currently assume that we are using
4698 # Microsoft Visual C++.
4699 # hardcode_libdir_flag_spec is actually meaningless, as there is
4700 # no search path for DLLs.
4701 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4702 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4703 # Tell ltmain to make .lib files, not .a files.
4704 libext=lib
4705 # Tell ltmain to make .dll files, not .so files.
4706 shrext_cmds=".dll"
4707 # FIXME: Setting linknames here is a bad hack.
4708 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4709 # The linker will automatically build a .lib file if we build a DLL.
4710 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4711 # FIXME: Should let the user specify the lib program.
4712 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4713 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4714 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4715 ;;
4716
4717 darwin* | rhapsody*)
4718 _LT_DARWIN_LINKER_FEATURES($1)
4719 ;;
4720
4721 dgux*)
4722 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4723 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4724 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4725 ;;
4726
4727 freebsd1*)
4728 _LT_TAGVAR(ld_shlibs, $1)=no
4729 ;;
4730
4731 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4732 # support. Future versions do this automatically, but an explicit c++rt0.o
4733 # does not break anything, and helps significantly (at the cost of a little
4734 # extra space).
4735 freebsd2.2*)
4736 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4737 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4738 _LT_TAGVAR(hardcode_direct, $1)=yes
4739 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4740 ;;
4741
4742 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4743 freebsd2*)
4744 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4745 _LT_TAGVAR(hardcode_direct, $1)=yes
4746 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4747 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4748 ;;
4749
4750 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4751 freebsd* | dragonfly*)
4752 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4753 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4754 _LT_TAGVAR(hardcode_direct, $1)=yes
4755 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4756 ;;
4757
4758 hpux9*)
4759 if test "$GCC" = yes; then
4760 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4761 else
4762 _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'
4763 fi
4764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4765 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4766 _LT_TAGVAR(hardcode_direct, $1)=yes
4767
4768 # hardcode_minus_L: Not really in the search PATH,
4769 # but as the default location of the library.
4770 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4771 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4772 ;;
4773
4774 hpux10*)
4775 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4776 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4777 else
4778 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4779 fi
4780 if test "$with_gnu_ld" = no; then
4781 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4782 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4783 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4784 _LT_TAGVAR(hardcode_direct, $1)=yes
4785 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4786 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4787 # hardcode_minus_L: Not really in the search PATH,
4788 # but as the default location of the library.
4789 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4790 fi
4791 ;;
4792
4793 hpux11*)
4794 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4795 case $host_cpu in
4796 hppa*64*)
4797 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4798 ;;
4799 ia64*)
4800 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4801 ;;
4802 *)
4803 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4804 ;;
4805 esac
4806 else
4807 case $host_cpu in
4808 hppa*64*)
4809 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4810 ;;
4811 ia64*)
4812 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4813 ;;
4814 *)
4815 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4816 ;;
4817 esac
4818 fi
4819 if test "$with_gnu_ld" = no; then
4820 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4821 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4822
4823 case $host_cpu in
4824 hppa*64*|ia64*)
4825 _LT_TAGVAR(hardcode_direct, $1)=no
4826 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4827 ;;
4828 *)
4829 _LT_TAGVAR(hardcode_direct, $1)=yes
4830 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4831 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4832
4833 # hardcode_minus_L: Not really in the search PATH,
4834 # but as the default location of the library.
4835 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4836 ;;
4837 esac
4838 fi
4839 ;;
4840
4841 irix5* | irix6* | nonstopux*)
4842 if test "$GCC" = yes; then
4843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4844 # Try to use the -exported_symbol ld option, if it does not
4845 # work, assume that -exports_file does not work either and
4846 # implicitly export all symbols.
4847 save_LDFLAGS="$LDFLAGS"
4848 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4849 AC_LINK_IFELSE(int foo(void) {},
4850 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4851 )
4852 LDFLAGS="$save_LDFLAGS"
4853 else
4854 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4855 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4856 fi
4857 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4859 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4860 _LT_TAGVAR(inherit_rpath, $1)=yes
4861 _LT_TAGVAR(link_all_deplibs, $1)=yes
4862 ;;
4863
4864 netbsd* | netbsdelf*-gnu)
4865 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4866 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4867 else
4868 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4869 fi
4870 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4871 _LT_TAGVAR(hardcode_direct, $1)=yes
4872 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4873 ;;
4874
4875 newsos6)
4876 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4877 _LT_TAGVAR(hardcode_direct, $1)=yes
4878 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4879 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4880 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4881 ;;
4882
4883 *nto* | *qnx*)
4884 ;;
4885
4886 openbsd*)
4887 if test -f /usr/libexec/ld.so; then
4888 _LT_TAGVAR(hardcode_direct, $1)=yes
4889 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4890 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4891 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4892 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4893 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4895 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4896 else
4897 case $host_os in
4898 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4899 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4900 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4901 ;;
4902 *)
4903 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4905 ;;
4906 esac
4907 fi
4908 else
4909 _LT_TAGVAR(ld_shlibs, $1)=no
4910 fi
4911 ;;
4912
4913 os2*)
4914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4915 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4916 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4917 _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'
4918 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4919 ;;
4920
4921 osf3*)
4922 if test "$GCC" = yes; then
4923 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4925 else
4926 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4927 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4928 fi
4929 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4930 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4931 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4932 ;;
4933
4934 osf4* | osf5*) # as osf3* with the addition of -msym flag
4935 if test "$GCC" = yes; then
4936 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4937 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4939 else
4940 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4941 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4942 _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~
4943 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4944
4945 # Both c and cxx compiler support -rpath directly
4946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4947 fi
4948 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4949 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4950 ;;
4951
4952 solaris*)
4953 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4954 if test "$GCC" = yes; then
4955 wlarc='${wl}'
4956 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4957 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4958 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4959 else
4960 case `$CC -V 2>&1` in
4961 *"Compilers 5.0"*)
4962 wlarc=''
4963 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4964 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4965 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4966 ;;
4967 *)
4968 wlarc='${wl}'
4969 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4970 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4971 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4972 ;;
4973 esac
4974 fi
4975 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4976 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4977 case $host_os in
4978 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4979 *)
4980 # The compiler driver will combine and reorder linker options,
4981 # but understands `-z linker_flag'. GCC discards it without `$wl',
4982 # but is careful enough not to reorder.
4983 # Supported since Solaris 2.6 (maybe 2.5.1?)
4984 if test "$GCC" = yes; then
4985 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4986 else
4987 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4988 fi
4989 ;;
4990 esac
4991 _LT_TAGVAR(link_all_deplibs, $1)=yes
4992 ;;
4993
4994 sunos4*)
4995 if test "x$host_vendor" = xsequent; then
4996 # Use $CC to link under sequent, because it throws in some extra .o
4997 # files that make .init and .fini sections work.
4998 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4999 else
5000 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5001 fi
5002 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5003 _LT_TAGVAR(hardcode_direct, $1)=yes
5004 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5005 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5006 ;;
5007
5008 sysv4)
5009 case $host_vendor in
5010 sni)
5011 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5012 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5013 ;;
5014 siemens)
5015 ## LD is ld it makes a PLAMLIB
5016 ## CC just makes a GrossModule.
5017 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5018 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5019 _LT_TAGVAR(hardcode_direct, $1)=no
5020 ;;
5021 motorola)
5022 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5023 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5024 ;;
5025 esac
5026 runpath_var='LD_RUN_PATH'
5027 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5028 ;;
5029
5030 sysv4.3*)
5031 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5032 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5033 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5034 ;;
5035
5036 sysv4*MP*)
5037 if test -d /usr/nec; then
5038 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5039 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5040 runpath_var=LD_RUN_PATH
5041 hardcode_runpath_var=yes
5042 _LT_TAGVAR(ld_shlibs, $1)=yes
5043 fi
5044 ;;
5045
5046 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5047 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5048 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5049 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5050 runpath_var='LD_RUN_PATH'
5051
5052 if test "$GCC" = yes; then
5053 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5054 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5055 else
5056 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5057 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5058 fi
5059 ;;
5060
5061 sysv5* | sco3.2v5* | sco5v6*)
5062 # Note: We can NOT use -z defs as we might desire, because we do not
5063 # link with -lc, and that would cause any symbols used from libc to
5064 # always be unresolved, which means just about no library would
5065 # ever link correctly. If we're not using GNU ld we use -z text
5066 # though, which does catch some bad symbols but isn't as heavy-handed
5067 # as -z defs.
5068 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5069 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5070 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5071 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5072 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5073 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5074 _LT_TAGVAR(link_all_deplibs, $1)=yes
5075 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5076 runpath_var='LD_RUN_PATH'
5077
5078 if test "$GCC" = yes; then
5079 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5080 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5081 else
5082 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5083 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5084 fi
5085 ;;
5086
5087 uts4*)
5088 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5090 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5091 ;;
5092
5093 *)
5094 _LT_TAGVAR(ld_shlibs, $1)=no
5095 ;;
5096 esac
5097
5098 if test x$host_vendor = xsni; then
5099 case $host in
5100 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5101 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5102 ;;
5103 esac
5104 fi
5105 fi
5106])
5107AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5108test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5109
5110_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5111
5112_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5113_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5114_LT_DECL([], [extract_expsyms_cmds], [2],
5115 [The commands to extract the exported symbol list from a shared archive])
5116
5117#
5118# Do we need to explicitly link libc?
5119#
5120case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5121x|xyes)
5122 # Assume -lc should be added
5123 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5124
5125 if test "$enable_shared" = yes && test "$GCC" = yes; then
5126 case $_LT_TAGVAR(archive_cmds, $1) in
5127 *'~'*)
5128 # FIXME: we may have to deal with multi-command sequences.
5129 ;;
5130 '$CC '*)
5131 # Test whether the compiler implicitly links with -lc since on some
5132 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5133 # to ld, don't add -lc before -lgcc.
5134 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5135 $RM conftest*
5136 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5137
5138 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5139 soname=conftest
5140 lib=conftest
5141 libobjs=conftest.$ac_objext
5142 deplibs=
5143 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5144 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5145 compiler_flags=-v
5146 linker_flags=-v
5147 verstring=
5148 output_objdir=.
5149 libname=conftest
5150 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5151 _LT_TAGVAR(allow_undefined_flag, $1)=
5152 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5153 then
5154 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5155 else
5156 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5157 fi
5158 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5159 else
5160 cat conftest.err 1>&5
5161 fi
5162 $RM conftest*
5163 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5164 ;;
5165 esac
5166 fi
5167 ;;
5168esac
5169
5170_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5171 [Whether or not to add -lc for building shared libraries])
5172_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5173 [enable_shared_with_static_runtimes], [0],
5174 [Whether or not to disallow shared libs when runtime libs are static])
5175_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5176 [Compiler flag to allow reflexive dlopens])
5177_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5178 [Compiler flag to generate shared objects directly from archives])
5179_LT_TAGDECL([], [compiler_needs_object], [1],
5180 [Whether the compiler copes with passing no objects directly])
5181_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5182 [Create an old-style archive from a shared archive])
5183_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5184 [Create a temporary old-style archive to link instead of a shared archive])
5185_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5186_LT_TAGDECL([], [archive_expsym_cmds], [2])
5187_LT_TAGDECL([], [module_cmds], [2],
5188 [Commands used to build a loadable module if different from building
5189 a shared archive.])
5190_LT_TAGDECL([], [module_expsym_cmds], [2])
5191_LT_TAGDECL([], [with_gnu_ld], [1],
5192 [Whether we are building with GNU ld or not])
5193_LT_TAGDECL([], [allow_undefined_flag], [1],
5194 [Flag that allows shared libraries with undefined symbols to be built])
5195_LT_TAGDECL([], [no_undefined_flag], [1],
5196 [Flag that enforces no undefined symbols])
5197_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5198 [Flag to hardcode $libdir into a binary during linking.
5199 This must work even if $libdir does not exist])
5200_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5201 [[If ld is used when linking, flag to hardcode $libdir into a binary
5202 during linking. This must work even if $libdir does not exist]])
5203_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5204 [Whether we need a single "-rpath" flag with a separated argument])
5205_LT_TAGDECL([], [hardcode_direct], [0],
5206 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5207 DIR into the resulting binary])
5208_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5209 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5210 DIR into the resulting binary and the resulting library dependency is
5211 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5212 library is relocated])
5213_LT_TAGDECL([], [hardcode_minus_L], [0],
5214 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5215 into the resulting binary])
5216_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5217 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5218 into the resulting binary])
5219_LT_TAGDECL([], [hardcode_automatic], [0],
5220 [Set to "yes" if building a shared library automatically hardcodes DIR
5221 into the library and all subsequent libraries and executables linked
5222 against it])
5223_LT_TAGDECL([], [inherit_rpath], [0],
5224 [Set to yes if linker adds runtime paths of dependent libraries
5225 to runtime path list])
5226_LT_TAGDECL([], [link_all_deplibs], [0],
5227 [Whether libtool must link a program against all its dependency libraries])
5228_LT_TAGDECL([], [fix_srcfile_path], [1],
5229 [Fix the shell variable $srcfile for the compiler])
5230_LT_TAGDECL([], [always_export_symbols], [0],
5231 [Set to "yes" if exported symbols are required])
5232_LT_TAGDECL([], [export_symbols_cmds], [2],
5233 [The commands to list exported symbols])
5234_LT_TAGDECL([], [exclude_expsyms], [1],
5235 [Symbols that should not be listed in the preloaded symbols])
5236_LT_TAGDECL([], [include_expsyms], [1],
5237 [Symbols that must always be exported])
5238_LT_TAGDECL([], [prelink_cmds], [2],
5239 [Commands necessary for linking programs (against libraries) with templates])
5240_LT_TAGDECL([], [file_list_spec], [1],
5241 [Specify filename containing input files])
5242dnl FIXME: Not yet implemented
5243dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5244dnl [Compiler flag to generate thread safe objects])
5245])# _LT_LINKER_SHLIBS
5246
5247
5248# _LT_LANG_C_CONFIG([TAG])
5249# ------------------------
5250# Ensure that the configuration variables for a C compiler are suitably
5251# defined. These variables are subsequently used by _LT_CONFIG to write
5252# the compiler configuration to `libtool'.
5253m4_defun([_LT_LANG_C_CONFIG],
5254[m4_require([_LT_DECL_EGREP])dnl
5255lt_save_CC="$CC"
5256AC_LANG_PUSH(C)
5257
5258# Source file extension for C test sources.
5259ac_ext=c
5260
5261# Object file extension for compiled C test sources.
5262objext=o
5263_LT_TAGVAR(objext, $1)=$objext
5264
5265# Code to be used in simple compile tests
5266lt_simple_compile_test_code="int some_variable = 0;"
5267
5268# Code to be used in simple link tests
5269lt_simple_link_test_code='int main(){return(0);}'
5270
5271_LT_TAG_COMPILER
5272# Save the default compiler, since it gets overwritten when the other
5273# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5274compiler_DEFAULT=$CC
5275
5276# save warnings/boilerplate of simple test code
5277_LT_COMPILER_BOILERPLATE
5278_LT_LINKER_BOILERPLATE
5279
5280## CAVEAT EMPTOR:
5281## There is no encapsulation within the following macros, do not change
5282## the running order or otherwise move them around unless you know exactly
5283## what you are doing...
5284if test -n "$compiler"; then
5285 _LT_COMPILER_NO_RTTI($1)
5286 _LT_COMPILER_PIC($1)
5287 _LT_COMPILER_C_O($1)
5288 _LT_COMPILER_FILE_LOCKS($1)
5289 _LT_LINKER_SHLIBS($1)
5290 _LT_SYS_DYNAMIC_LINKER($1)
5291 _LT_LINKER_HARDCODE_LIBPATH($1)
5292 LT_SYS_DLOPEN_SELF
5293 _LT_CMD_STRIPLIB
5294
5295 # Report which library types will actually be built
5296 AC_MSG_CHECKING([if libtool supports shared libraries])
5297 AC_MSG_RESULT([$can_build_shared])
5298
5299 AC_MSG_CHECKING([whether to build shared libraries])
5300 test "$can_build_shared" = "no" && enable_shared=no
5301
5302 # On AIX, shared libraries and static libraries use the same namespace, and
5303 # are all built from PIC.
5304 case $host_os in
5305 aix3*)
5306 test "$enable_shared" = yes && enable_static=no
5307 if test -n "$RANLIB"; then
5308 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5309 postinstall_cmds='$RANLIB $lib'
5310 fi
5311 ;;
5312
5313 aix[[4-9]]*)
5314 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5315 test "$enable_shared" = yes && enable_static=no
5316 fi
5317 ;;
5318 esac
5319 AC_MSG_RESULT([$enable_shared])
5320
5321 AC_MSG_CHECKING([whether to build static libraries])
5322 # Make sure either enable_shared or enable_static is yes.
5323 test "$enable_shared" = yes || enable_static=yes
5324 AC_MSG_RESULT([$enable_static])
5325
5326 _LT_CONFIG($1)
5327fi
5328AC_LANG_POP
5329CC="$lt_save_CC"
5330])# _LT_LANG_C_CONFIG
5331
5332
5333# _LT_PROG_CXX
5334# ------------
5335# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5336# compiler, we have our own version here.
5337m4_defun([_LT_PROG_CXX],
5338[
5339pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5340AC_PROG_CXX
5341if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5342 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5343 (test "X$CXX" != "Xg++"))) ; then
5344 AC_PROG_CXXCPP
5345else
5346 _lt_caught_CXX_error=yes
5347fi
5348popdef([AC_MSG_ERROR])
5349])# _LT_PROG_CXX
5350
5351dnl aclocal-1.4 backwards compatibility:
5352dnl AC_DEFUN([_LT_PROG_CXX], [])
5353
5354
5355# _LT_LANG_CXX_CONFIG([TAG])
5356# --------------------------
5357# Ensure that the configuration variables for a C++ compiler are suitably
5358# defined. These variables are subsequently used by _LT_CONFIG to write
5359# the compiler configuration to `libtool'.
5360m4_defun([_LT_LANG_CXX_CONFIG],
5361[AC_REQUIRE([_LT_PROG_CXX])dnl
5362m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5363m4_require([_LT_DECL_EGREP])dnl
5364
5365AC_LANG_PUSH(C++)
5366_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5367_LT_TAGVAR(allow_undefined_flag, $1)=
5368_LT_TAGVAR(always_export_symbols, $1)=no
5369_LT_TAGVAR(archive_expsym_cmds, $1)=
5370_LT_TAGVAR(compiler_needs_object, $1)=no
5371_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5372_LT_TAGVAR(hardcode_direct, $1)=no
5373_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5374_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5375_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5376_LT_TAGVAR(hardcode_libdir_separator, $1)=
5377_LT_TAGVAR(hardcode_minus_L, $1)=no
5378_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5379_LT_TAGVAR(hardcode_automatic, $1)=no
5380_LT_TAGVAR(inherit_rpath, $1)=no
5381_LT_TAGVAR(module_cmds, $1)=
5382_LT_TAGVAR(module_expsym_cmds, $1)=
5383_LT_TAGVAR(link_all_deplibs, $1)=unknown
5384_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5385_LT_TAGVAR(no_undefined_flag, $1)=
5386_LT_TAGVAR(whole_archive_flag_spec, $1)=
5387_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5388
5389# Source file extension for C++ test sources.
5390ac_ext=cpp
5391
5392# Object file extension for compiled C++ test sources.
5393objext=o
5394_LT_TAGVAR(objext, $1)=$objext
5395
5396# No sense in running all these tests if we already determined that
5397# the CXX compiler isn't working. Some variables (like enable_shared)
5398# are currently assumed to apply to all compilers on this platform,
5399# and will be corrupted by setting them based on a non-working compiler.
5400if test "$_lt_caught_CXX_error" != yes; then
5401 # Code to be used in simple compile tests
5402 lt_simple_compile_test_code="int some_variable = 0;"
5403
5404 # Code to be used in simple link tests
5405 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5406
5407 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5408 _LT_TAG_COMPILER
5409
5410 # save warnings/boilerplate of simple test code
5411 _LT_COMPILER_BOILERPLATE
5412 _LT_LINKER_BOILERPLATE
5413
5414 # Allow CC to be a program name with arguments.
5415 lt_save_CC=$CC
5416 lt_save_LD=$LD
5417 lt_save_GCC=$GCC
5418 GCC=$GXX
5419 lt_save_with_gnu_ld=$with_gnu_ld
5420 lt_save_path_LD=$lt_cv_path_LD
5421 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5422 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5423 else
5424 $as_unset lt_cv_prog_gnu_ld
5425 fi
5426 if test -n "${lt_cv_path_LDCXX+set}"; then
5427 lt_cv_path_LD=$lt_cv_path_LDCXX
5428 else
5429 $as_unset lt_cv_path_LD
5430 fi
5431 test -z "${LDCXX+set}" || LD=$LDCXX
5432 CC=${CXX-"c++"}
5433 compiler=$CC
5434 _LT_TAGVAR(compiler, $1)=$CC
5435 _LT_CC_BASENAME([$compiler])
5436
5437 if test -n "$compiler"; then
5438 # We don't want -fno-exception when compiling C++ code, so set the
5439 # no_builtin_flag separately
5440 if test "$GXX" = yes; then
5441 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5442 else
5443 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5444 fi
5445
5446 if test "$GXX" = yes; then
5447 # Set up default GNU C++ configuration
5448
5449 LT_PATH_LD
5450
5451 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5452 # archiving commands below assume that GNU ld is being used.
5453 if test "$with_gnu_ld" = yes; then
5454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5455 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5456
5457 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5458 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5459
5460 # If archive_cmds runs LD, not CC, wlarc should be empty
5461 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5462 # investigate it a little bit more. (MM)
5463 wlarc='${wl}'
5464
5465 # ancient GNU ld didn't support --whole-archive et. al.
5466 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5467 $GREP 'no-whole-archive' > /dev/null; then
5468 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5469 else
5470 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5471 fi
5472 else
5473 with_gnu_ld=no
5474 wlarc=
5475
5476 # A generic and very simple default shared library creation
5477 # command for GNU C++ for the case where it uses the native
5478 # linker, instead of GNU ld. If possible, this setting should
5479 # overridden to take advantage of the native linker features on
5480 # the platform it is being used on.
5481 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5482 fi
5483
5484 # Commands to make compiler produce verbose output that lists
5485 # what "hidden" libraries, object files and flags are used when
5486 # linking a shared library.
5487 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5488
5489 else
5490 GXX=no
5491 with_gnu_ld=no
5492 wlarc=
5493 fi
5494
5495 # PORTME: fill in a description of your system's C++ link characteristics
5496 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5497 _LT_TAGVAR(ld_shlibs, $1)=yes
5498 case $host_os in
5499 aix3*)
5500 # FIXME: insert proper C++ library support
5501 _LT_TAGVAR(ld_shlibs, $1)=no
5502 ;;
5503 aix[[4-9]]*)
5504 if test "$host_cpu" = ia64; then
5505 # On IA64, the linker does run time linking by default, so we don't
5506 # have to do anything special.
5507 aix_use_runtimelinking=no
5508 exp_sym_flag='-Bexport'
5509 no_entry_flag=""
5510 else
5511 aix_use_runtimelinking=no
5512
5513 # Test if we are trying to use run time linking or normal
5514 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5515 # need to do runtime linking.
5516 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5517 for ld_flag in $LDFLAGS; do
5518 case $ld_flag in
5519 *-brtl*)
5520 aix_use_runtimelinking=yes
5521 break
5522 ;;
5523 esac
5524 done
5525 ;;
5526 esac
5527
5528 exp_sym_flag='-bexport'
5529 no_entry_flag='-bnoentry'
5530 fi
5531
5532 # When large executables or shared objects are built, AIX ld can
5533 # have problems creating the table of contents. If linking a library
5534 # or program results in "error TOC overflow" add -mminimal-toc to
5535 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5536 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5537
5538 _LT_TAGVAR(archive_cmds, $1)=''
5539 _LT_TAGVAR(hardcode_direct, $1)=yes
5540 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5541 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5542 _LT_TAGVAR(link_all_deplibs, $1)=yes
5543 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5544
5545 if test "$GXX" = yes; then
5546 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5547 # We only want to do this on AIX 4.2 and lower, the check
5548 # below for broken collect2 doesn't work under 4.3+
5549 collect2name=`${CC} -print-prog-name=collect2`
5550 if test -f "$collect2name" &&
5551 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5552 then
5553 # We have reworked collect2
5554 :
5555 else
5556 # We have old collect2
5557 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5558 # It fails to find uninstalled libraries when the uninstalled
5559 # path is not listed in the libpath. Setting hardcode_minus_L
5560 # to unsupported forces relinking
5561 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5562 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5563 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5564 fi
5565 esac
5566 shared_flag='-shared'
5567 if test "$aix_use_runtimelinking" = yes; then
5568 shared_flag="$shared_flag "'${wl}-G'
5569 fi
5570 else
5571 # not using gcc
5572 if test "$host_cpu" = ia64; then
5573 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5574 # chokes on -Wl,-G. The following line is correct:
5575 shared_flag='-G'
5576 else
5577 if test "$aix_use_runtimelinking" = yes; then
5578 shared_flag='${wl}-G'
5579 else
5580 shared_flag='${wl}-bM:SRE'
5581 fi
5582 fi
5583 fi
5584
5585 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5586 # It seems that -bexpall does not export symbols beginning with
5587 # underscore (_), so it is better to generate a list of symbols to
5588 # export.
5589 _LT_TAGVAR(always_export_symbols, $1)=yes
5590 if test "$aix_use_runtimelinking" = yes; then
5591 # Warning - without using the other runtime loading flags (-brtl),
5592 # -berok will link without error, but may produce a broken library.
5593 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5594 # Determine the default libpath from the value encoded in an empty
5595 # executable.
5596 _LT_SYS_MODULE_PATH_AIX
5597 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5598
5599 _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5600 else
5601 if test "$host_cpu" = ia64; then
5602 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5603 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5604 _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"
5605 else
5606 # Determine the default libpath from the value encoded in an
5607 # empty executable.
5608 _LT_SYS_MODULE_PATH_AIX
5609 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5610 # Warning - without using the other run time loading flags,
5611 # -berok will link without error, but may produce a broken library.
5612 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5613 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5614 # Exported symbols can be pulled into shared objects from archives
5615 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5616 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5617 # This is similar to how AIX traditionally builds its shared
5618 # libraries.
5619 _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'
5620 fi
5621 fi
5622 ;;
5623
5624 beos*)
5625 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5626 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5627 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5628 # support --undefined. This deserves some investigation. FIXME
5629 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5630 else
5631 _LT_TAGVAR(ld_shlibs, $1)=no
5632 fi
5633 ;;
5634
5635 chorus*)
5636 case $cc_basename in
5637 *)
5638 # FIXME: insert proper C++ library support
5639 _LT_TAGVAR(ld_shlibs, $1)=no
5640 ;;
5641 esac
5642 ;;
5643
5644 cygwin* | mingw* | pw32* | cegcc*)
5645 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5646 # as there is no search path for DLLs.
5647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5648 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5649 _LT_TAGVAR(always_export_symbols, $1)=no
5650 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5651
5652 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5653 _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'
5654 # If the export-symbols file already is a .def file (1st line
5655 # is EXPORTS), use it as is; otherwise, prepend...
5656 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5657 cp $export_symbols $output_objdir/$soname.def;
5658 else
5659 echo EXPORTS > $output_objdir/$soname.def;
5660 cat $export_symbols >> $output_objdir/$soname.def;
5661 fi~
5662 $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'
5663 else
5664 _LT_TAGVAR(ld_shlibs, $1)=no
5665 fi
5666 ;;
5667 darwin* | rhapsody*)
5668 _LT_DARWIN_LINKER_FEATURES($1)
5669 ;;
5670
5671 dgux*)
5672 case $cc_basename in
5673 ec++*)
5674 # FIXME: insert proper C++ library support
5675 _LT_TAGVAR(ld_shlibs, $1)=no
5676 ;;
5677 ghcx*)
5678 # Green Hills C++ Compiler
5679 # FIXME: insert proper C++ library support
5680 _LT_TAGVAR(ld_shlibs, $1)=no
5681 ;;
5682 *)
5683 # FIXME: insert proper C++ library support
5684 _LT_TAGVAR(ld_shlibs, $1)=no
5685 ;;
5686 esac
5687 ;;
5688
5689 freebsd[[12]]*)
5690 # C++ shared libraries reported to be fairly broken before
5691 # switch to ELF
5692 _LT_TAGVAR(ld_shlibs, $1)=no
5693 ;;
5694
5695 freebsd-elf*)
5696 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5697 ;;
5698
5699 freebsd* | dragonfly*)
5700 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5701 # conventions
5702 _LT_TAGVAR(ld_shlibs, $1)=yes
5703 ;;
5704
5705 gnu*)
5706 ;;
5707
5708 hpux9*)
5709 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5710 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5711 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5712 _LT_TAGVAR(hardcode_direct, $1)=yes
5713 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5714 # but as the default
5715 # location of the library.
5716
5717 case $cc_basename in
5718 CC*)
5719 # FIXME: insert proper C++ library support
5720 _LT_TAGVAR(ld_shlibs, $1)=no
5721 ;;
5722 aCC*)
5723 _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'
5724 # Commands to make compiler produce verbose output that lists
5725 # what "hidden" libraries, object files and flags are used when
5726 # linking a shared library.
5727 #
5728 # There doesn't appear to be a way to prevent this compiler from
5729 # explicitly linking system object files so we need to strip them
5730 # from the output so that they don't get included in the library
5731 # dependencies.
5732 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; $ECHO "X$list" | $Xsed'
5733 ;;
5734 *)
5735 if test "$GXX" = yes; then
5736 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5737 else
5738 # FIXME: insert proper C++ library support
5739 _LT_TAGVAR(ld_shlibs, $1)=no
5740 fi
5741 ;;
5742 esac
5743 ;;
5744
5745 hpux10*|hpux11*)
5746 if test $with_gnu_ld = no; then
5747 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5748 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5749
5750 case $host_cpu in
5751 hppa*64*|ia64*)
5752 ;;
5753 *)
5754 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5755 ;;
5756 esac
5757 fi
5758 case $host_cpu in
5759 hppa*64*|ia64*)
5760 _LT_TAGVAR(hardcode_direct, $1)=no
5761 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5762 ;;
5763 *)
5764 _LT_TAGVAR(hardcode_direct, $1)=yes
5765 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5766 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5767 # but as the default
5768 # location of the library.
5769 ;;
5770 esac
5771
5772 case $cc_basename in
5773 CC*)
5774 # FIXME: insert proper C++ library support
5775 _LT_TAGVAR(ld_shlibs, $1)=no
5776 ;;
5777 aCC*)
5778 case $host_cpu in
5779 hppa*64*)
5780 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5781 ;;
5782 ia64*)
5783 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5784 ;;
5785 *)
5786 _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'
5787 ;;
5788 esac
5789 # Commands to make compiler produce verbose output that lists
5790 # what "hidden" libraries, object files and flags are used when
5791 # linking a shared library.
5792 #
5793 # There doesn't appear to be a way to prevent this compiler from
5794 # explicitly linking system object files so we need to strip them
5795 # from the output so that they don't get included in the library
5796 # dependencies.
5797 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5798 ;;
5799 *)
5800 if test "$GXX" = yes; then
5801 if test $with_gnu_ld = no; then
5802 case $host_cpu in
5803 hppa*64*)
5804 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5805 ;;
5806 ia64*)
5807 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5808 ;;
5809 *)
5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5811 ;;
5812 esac
5813 fi
5814 else
5815 # FIXME: insert proper C++ library support
5816 _LT_TAGVAR(ld_shlibs, $1)=no
5817 fi
5818 ;;
5819 esac
5820 ;;
5821
5822 interix[[3-9]]*)
5823 _LT_TAGVAR(hardcode_direct, $1)=no
5824 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5825 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5826 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5827 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5828 # Instead, shared libraries are loaded at an image base (0x10000000 by
5829 # default) and relocated if they conflict, which is a slow very memory
5830 # consuming and fragmenting process. To avoid this, we pick a random,
5831 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5832 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5833 _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'
5834 _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'
5835 ;;
5836 irix5* | irix6*)
5837 case $cc_basename in
5838 CC*)
5839 # SGI C++
5840 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5841
5842 # Archives containing C++ object files must be created using
5843 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5844 # necessary to make sure instantiated templates are included
5845 # in the archive.
5846 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5847 ;;
5848 *)
5849 if test "$GXX" = yes; then
5850 if test "$with_gnu_ld" = no; then
5851 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5852 else
5853 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5854 fi
5855 fi
5856 _LT_TAGVAR(link_all_deplibs, $1)=yes
5857 ;;
5858 esac
5859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5860 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5861 _LT_TAGVAR(inherit_rpath, $1)=yes
5862 ;;
5863
5864 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5865 case $cc_basename in
5866 KCC*)
5867 # Kuck and Associates, Inc. (KAI) C++ Compiler
5868
5869 # KCC will only create a shared library if the output file
5870 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5871 # to its proper name (with version) after linking.
5872 _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'
5873 _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'
5874 # Commands to make compiler produce verbose output that lists
5875 # what "hidden" libraries, object files and flags are used when
5876 # linking a shared library.
5877 #
5878 # There doesn't appear to be a way to prevent this compiler from
5879 # explicitly linking system object files so we need to strip them
5880 # from the output so that they don't get included in the library
5881 # dependencies.
5882 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5883
5884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5885 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5886
5887 # Archives containing C++ object files must be created using
5888 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5889 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5890 ;;
5891 icpc* | ecpc* )
5892 # Intel C++
5893 with_gnu_ld=yes
5894 # version 8.0 and above of icpc choke on multiply defined symbols
5895 # if we add $predep_objects and $postdep_objects, however 7.1 and
5896 # earlier do not add the objects themselves.
5897 case `$CC -V 2>&1` in
5898 *"Version 7."*)
5899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5900 _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'
5901 ;;
5902 *) # Version 8.0 or newer
5903 tmp_idyn=
5904 case $host_cpu in
5905 ia64*) tmp_idyn=' -i_dynamic';;
5906 esac
5907 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5908 _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'
5909 ;;
5910 esac
5911 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5912 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5913 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5914 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5915 ;;
5916 pgCC* | pgcpp*)
5917 # Portland Group C++ compiler
5918 case `$CC -V` in
5919 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5920 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5921 rm -rf $tpldir~
5922 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5923 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5924 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5925 rm -rf $tpldir~
5926 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5927 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5928 $RANLIB $oldlib'
5929 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5930 rm -rf $tpldir~
5931 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5932 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5933 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5934 rm -rf $tpldir~
5935 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5936 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5937 ;;
5938 *) # Version 6 will use weak symbols
5939 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5940 _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'
5941 ;;
5942 esac
5943
5944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5945 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5946 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5947 ;;
5948 cxx*)
5949 # Compaq C++
5950 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5951 _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'
5952
5953 runpath_var=LD_RUN_PATH
5954 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5955 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5956
5957 # Commands to make compiler produce verbose output that lists
5958 # what "hidden" libraries, object files and flags are used when
5959 # linking a shared library.
5960 #
5961 # There doesn't appear to be a way to prevent this compiler from
5962 # explicitly linking system object files so we need to strip them
5963 # from the output so that they don't get included in the library
5964 # dependencies.
5965 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5966 ;;
5967 xl*)
5968 # IBM XL 8.0 on PPC, with GNU ld
5969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5970 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5971 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5972 if test "x$supports_anon_versioning" = xyes; then
5973 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5974 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5975 echo "local: *; };" >> $output_objdir/$libname.ver~
5976 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5977 fi
5978 ;;
5979 *)
5980 case `$CC -V 2>&1 | sed 5q` in
5981 *Sun\ C*)
5982 # Sun C++ 5.9
5983 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5984 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5985 _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'
5986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5987 _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5988 _LT_TAGVAR(compiler_needs_object, $1)=yes
5989
5990 # Not sure whether something based on
5991 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5992 # would be better.
5993 output_verbose_link_cmd='echo'
5994
5995 # Archives containing C++ object files must be created using
5996 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5997 # necessary to make sure instantiated templates are included
5998 # in the archive.
5999 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6000 ;;
6001 esac
6002 ;;
6003 esac
6004 ;;
6005
6006 lynxos*)
6007 # FIXME: insert proper C++ library support
6008 _LT_TAGVAR(ld_shlibs, $1)=no
6009 ;;
6010
6011 m88k*)
6012 # FIXME: insert proper C++ library support
6013 _LT_TAGVAR(ld_shlibs, $1)=no
6014 ;;
6015
6016 mvs*)
6017 case $cc_basename in
6018 cxx*)
6019 # FIXME: insert proper C++ library support
6020 _LT_TAGVAR(ld_shlibs, $1)=no
6021 ;;
6022 *)
6023 # FIXME: insert proper C++ library support
6024 _LT_TAGVAR(ld_shlibs, $1)=no
6025 ;;
6026 esac
6027 ;;
6028
6029 netbsd*)
6030 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6031 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6032 wlarc=
6033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6034 _LT_TAGVAR(hardcode_direct, $1)=yes
6035 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6036 fi
6037 # Workaround some broken pre-1.5 toolchains
6038 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6039 ;;
6040
6041 *nto* | *qnx*)
6042 _LT_TAGVAR(ld_shlibs, $1)=yes
6043 ;;
6044
6045 openbsd2*)
6046 # C++ shared libraries are fairly broken
6047 _LT_TAGVAR(ld_shlibs, $1)=no
6048 ;;
6049
6050 openbsd*)
6051 if test -f /usr/libexec/ld.so; then
6052 _LT_TAGVAR(hardcode_direct, $1)=yes
6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6054 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6055 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6056 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6057 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6058 _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'
6059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6060 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6061 fi
6062 output_verbose_link_cmd=echo
6063 else
6064 _LT_TAGVAR(ld_shlibs, $1)=no
6065 fi
6066 ;;
6067
6068 osf3* | osf4* | osf5*)
6069 case $cc_basename in
6070 KCC*)
6071 # Kuck and Associates, Inc. (KAI) C++ Compiler
6072
6073 # KCC will only create a shared library if the output file
6074 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6075 # to its proper name (with version) after linking.
6076 _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'
6077
6078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6079 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6080
6081 # Archives containing C++ object files must be created using
6082 # the KAI C++ compiler.
6083 case $host in
6084 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6085 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6086 esac
6087 ;;
6088 RCC*)
6089 # Rational C++ 2.4.1
6090 # FIXME: insert proper C++ library support
6091 _LT_TAGVAR(ld_shlibs, $1)=no
6092 ;;
6093 cxx*)
6094 case $host in
6095 osf3*)
6096 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6097 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6099 ;;
6100 *)
6101 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6102 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6103 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6104 echo "-hidden">> $lib.exp~
6105 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6106 $RM $lib.exp'
6107 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6108 ;;
6109 esac
6110
6111 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6112
6113 # Commands to make compiler produce verbose output that lists
6114 # what "hidden" libraries, object files and flags are used when
6115 # linking a shared library.
6116 #
6117 # There doesn't appear to be a way to prevent this compiler from
6118 # explicitly linking system object files so we need to strip them
6119 # from the output so that they don't get included in the library
6120 # dependencies.
6121 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6122 ;;
6123 *)
6124 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6125 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6126 case $host in
6127 osf3*)
6128 _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6129 ;;
6130 *)
6131 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6132 ;;
6133 esac
6134
6135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6136 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6137
6138 # Commands to make compiler produce verbose output that lists
6139 # what "hidden" libraries, object files and flags are used when
6140 # linking a shared library.
6141 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6142
6143 else
6144 # FIXME: insert proper C++ library support
6145 _LT_TAGVAR(ld_shlibs, $1)=no
6146 fi
6147 ;;
6148 esac
6149 ;;
6150
6151 psos*)
6152 # FIXME: insert proper C++ library support
6153 _LT_TAGVAR(ld_shlibs, $1)=no
6154 ;;
6155
6156 sunos4*)
6157 case $cc_basename in
6158 CC*)
6159 # Sun C++ 4.x
6160 # FIXME: insert proper C++ library support
6161 _LT_TAGVAR(ld_shlibs, $1)=no
6162 ;;
6163 lcc*)
6164 # Lucid
6165 # FIXME: insert proper C++ library support
6166 _LT_TAGVAR(ld_shlibs, $1)=no
6167 ;;
6168 *)
6169 # FIXME: insert proper C++ library support
6170 _LT_TAGVAR(ld_shlibs, $1)=no
6171 ;;
6172 esac
6173 ;;
6174
6175 solaris*)
6176 case $cc_basename in
6177 CC*)
6178 # Sun C++ 4.2, 5.x and Centerline C++
6179 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6180 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6181 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6182 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6183 $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'
6184
6185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6186 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6187 case $host_os in
6188 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6189 *)
6190 # The compiler driver will combine and reorder linker options,
6191 # but understands `-z linker_flag'.
6192 # Supported since Solaris 2.6 (maybe 2.5.1?)
6193 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6194 ;;
6195 esac
6196 _LT_TAGVAR(link_all_deplibs, $1)=yes
6197
6198 output_verbose_link_cmd='echo'
6199
6200 # Archives containing C++ object files must be created using
6201 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6202 # necessary to make sure instantiated templates are included
6203 # in the archive.
6204 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6205 ;;
6206 gcx*)
6207 # Green Hills C++ Compiler
6208 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6209
6210 # The C++ compiler must be used to create the archive.
6211 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6212 ;;
6213 *)
6214 # GNU C++ compiler with Solaris linker
6215 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6216 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6217 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6218 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6219 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6220 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6221
6222 # Commands to make compiler produce verbose output that lists
6223 # what "hidden" libraries, object files and flags are used when
6224 # linking a shared library.
6225 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6226 else
6227 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6228 # platform.
6229 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6230 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6231 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6232
6233 # Commands to make compiler produce verbose output that lists
6234 # what "hidden" libraries, object files and flags are used when
6235 # linking a shared library.
6236 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6237 fi
6238
6239 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6240 case $host_os in
6241 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6242 *)
6243 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6244 ;;
6245 esac
6246 fi
6247 ;;
6248 esac
6249 ;;
6250
6251 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6252 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6253 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6254 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6255 runpath_var='LD_RUN_PATH'
6256
6257 case $cc_basename in
6258 CC*)
6259 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6260 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6261 ;;
6262 *)
6263 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6264 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6265 ;;
6266 esac
6267 ;;
6268
6269 sysv5* | sco3.2v5* | sco5v6*)
6270 # Note: We can NOT use -z defs as we might desire, because we do not
6271 # link with -lc, and that would cause any symbols used from libc to
6272 # always be unresolved, which means just about no library would
6273 # ever link correctly. If we're not using GNU ld we use -z text
6274 # though, which does catch some bad symbols but isn't as heavy-handed
6275 # as -z defs.
6276 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6277 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6278 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6279 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6280 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6281 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6282 _LT_TAGVAR(link_all_deplibs, $1)=yes
6283 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6284 runpath_var='LD_RUN_PATH'
6285
6286 case $cc_basename in
6287 CC*)
6288 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6289 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6290 ;;
6291 *)
6292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6293 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6294 ;;
6295 esac
6296 ;;
6297
6298 tandem*)
6299 case $cc_basename in
6300 NCC*)
6301 # NonStop-UX NCC 3.20
6302 # FIXME: insert proper C++ library support
6303 _LT_TAGVAR(ld_shlibs, $1)=no
6304 ;;
6305 *)
6306 # FIXME: insert proper C++ library support
6307 _LT_TAGVAR(ld_shlibs, $1)=no
6308 ;;
6309 esac
6310 ;;
6311
6312 vxworks*)
6313 # FIXME: insert proper C++ library support
6314 _LT_TAGVAR(ld_shlibs, $1)=no
6315 ;;
6316
6317 *)
6318 # FIXME: insert proper C++ library support
6319 _LT_TAGVAR(ld_shlibs, $1)=no
6320 ;;
6321 esac
6322
6323 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6324 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6325
6326 _LT_TAGVAR(GCC, $1)="$GXX"
6327 _LT_TAGVAR(LD, $1)="$LD"
6328
6329 ## CAVEAT EMPTOR:
6330 ## There is no encapsulation within the following macros, do not change
6331 ## the running order or otherwise move them around unless you know exactly
6332 ## what you are doing...
6333 _LT_SYS_HIDDEN_LIBDEPS($1)
6334 _LT_COMPILER_PIC($1)
6335 _LT_COMPILER_C_O($1)
6336 _LT_COMPILER_FILE_LOCKS($1)
6337 _LT_LINKER_SHLIBS($1)
6338 _LT_SYS_DYNAMIC_LINKER($1)
6339 _LT_LINKER_HARDCODE_LIBPATH($1)
6340
6341 _LT_CONFIG($1)
6342 fi # test -n "$compiler"
6343
6344 CC=$lt_save_CC
6345 LDCXX=$LD
6346 LD=$lt_save_LD
6347 GCC=$lt_save_GCC
6348 with_gnu_ld=$lt_save_with_gnu_ld
6349 lt_cv_path_LDCXX=$lt_cv_path_LD
6350 lt_cv_path_LD=$lt_save_path_LD
6351 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6352 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6353fi # test "$_lt_caught_CXX_error" != yes
6354
6355AC_LANG_POP
6356])# _LT_LANG_CXX_CONFIG
6357
6358
6359# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6360# ---------------------------------
6361# Figure out "hidden" library dependencies from verbose
6362# compiler output when linking a shared library.
6363# Parse the compiler output and extract the necessary
6364# objects, libraries and library flags.
6365m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6366[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6367# Dependencies to place before and after the object being linked:
6368_LT_TAGVAR(predep_objects, $1)=
6369_LT_TAGVAR(postdep_objects, $1)=
6370_LT_TAGVAR(predeps, $1)=
6371_LT_TAGVAR(postdeps, $1)=
6372_LT_TAGVAR(compiler_lib_search_path, $1)=
6373
6374dnl we can't use the lt_simple_compile_test_code here,
6375dnl because it contains code intended for an executable,
6376dnl not a library. It's possible we should let each
6377dnl tag define a new lt_????_link_test_code variable,
6378dnl but it's only used here...
6379m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6380int a;
6381void foo (void) { a = 0; }
6382_LT_EOF
6383], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6384class Foo
6385{
6386public:
6387 Foo (void) { a = 0; }
6388private:
6389 int a;
6390};
6391_LT_EOF
6392], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6393 subroutine foo
6394 implicit none
6395 integer*4 a
6396 a=0
6397 return
6398 end
6399_LT_EOF
6400], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6401 subroutine foo
6402 implicit none
6403 integer a
6404 a=0
6405 return
6406 end
6407_LT_EOF
6408], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6409public class foo {
6410 private int a;
6411 public void bar (void) {
6412 a = 0;
6413 }
6414};
6415_LT_EOF
6416])
6417dnl Parse the compiler output and extract the necessary
6418dnl objects, libraries and library flags.
6419if AC_TRY_EVAL(ac_compile); then
6420 # Parse the compiler output and extract the necessary
6421 # objects, libraries and library flags.
6422
6423 # Sentinel used to keep track of whether or not we are before
6424 # the conftest object file.
6425 pre_test_object_deps_done=no
6426
6427 for p in `eval "$output_verbose_link_cmd"`; do
6428 case $p in
6429
6430 -L* | -R* | -l*)
6431 # Some compilers place space between "-{L,R}" and the path.
6432 # Remove the space.
6433 if test $p = "-L" ||
6434 test $p = "-R"; then
6435 prev=$p
6436 continue
6437 else
6438 prev=
6439 fi
6440
6441 if test "$pre_test_object_deps_done" = no; then
6442 case $p in
6443 -L* | -R*)
6444 # Internal compiler library paths should come after those
6445 # provided the user. The postdeps already come after the
6446 # user supplied libs so there is no need to process them.
6447 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6448 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6449 else
6450 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6451 fi
6452 ;;
6453 # The "-l" case would never come before the object being
6454 # linked, so don't bother handling this case.
6455 esac
6456 else
6457 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6458 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6459 else
6460 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6461 fi
6462 fi
6463 ;;
6464
6465 *.$objext)
6466 # This assumes that the test object file only shows up
6467 # once in the compiler output.
6468 if test "$p" = "conftest.$objext"; then
6469 pre_test_object_deps_done=yes
6470 continue
6471 fi
6472
6473 if test "$pre_test_object_deps_done" = no; then
6474 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6475 _LT_TAGVAR(predep_objects, $1)="$p"
6476 else
6477 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6478 fi
6479 else
6480 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6481 _LT_TAGVAR(postdep_objects, $1)="$p"
6482 else
6483 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6484 fi
6485 fi
6486 ;;
6487
6488 *) ;; # Ignore the rest.
6489
6490 esac
6491 done
6492
6493 # Clean up.
6494 rm -f a.out a.exe
6495else
6496 echo "libtool.m4: error: problem compiling $1 test program"
6497fi
6498
6499$RM -f confest.$objext
6500
6501# PORTME: override above test on systems where it is broken
6502m4_if([$1], [CXX],
6503[case $host_os in
6504interix[[3-9]]*)
6505 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6506 # hack all around it, let's just trust "g++" to DTRT.
6507 _LT_TAGVAR(predep_objects,$1)=
6508 _LT_TAGVAR(postdep_objects,$1)=
6509 _LT_TAGVAR(postdeps,$1)=
6510 ;;
6511
6512linux*)
6513 case `$CC -V 2>&1 | sed 5q` in
6514 *Sun\ C*)
6515 # Sun C++ 5.9
6516
6517 # The more standards-conforming stlport4 library is
6518 # incompatible with the Cstd library. Avoid specifying
6519 # it if it's in CXXFLAGS. Ignore libCrun as
6520 # -library=stlport4 depends on it.
6521 case " $CXX $CXXFLAGS " in
6522 *" -library=stlport4 "*)
6523 solaris_use_stlport4=yes
6524 ;;
6525 esac
6526
6527 if test "$solaris_use_stlport4" != yes; then
6528 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6529 fi
6530 ;;
6531 esac
6532 ;;
6533
6534solaris*)
6535 case $cc_basename in
6536 CC*)
6537 # The more standards-conforming stlport4 library is
6538 # incompatible with the Cstd library. Avoid specifying
6539 # it if it's in CXXFLAGS. Ignore libCrun as
6540 # -library=stlport4 depends on it.
6541 case " $CXX $CXXFLAGS " in
6542 *" -library=stlport4 "*)
6543 solaris_use_stlport4=yes
6544 ;;
6545 esac
6546
6547 # Adding this requires a known-good setup of shared libraries for
6548 # Sun compiler versions before 5.6, else PIC objects from an old
6549 # archive will be linked into the output, leading to subtle bugs.
6550 if test "$solaris_use_stlport4" != yes; then
6551 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6552 fi
6553 ;;
6554 esac
6555 ;;
6556esac
6557])
6558
6559case " $_LT_TAGVAR(postdeps, $1) " in
6560*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6561esac
6562 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6563if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6564 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6565fi
6566_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6567 [The directories searched by this compiler when creating a shared library])
6568_LT_TAGDECL([], [predep_objects], [1],
6569 [Dependencies to place before and after the objects being linked to
6570 create a shared library])
6571_LT_TAGDECL([], [postdep_objects], [1])
6572_LT_TAGDECL([], [predeps], [1])
6573_LT_TAGDECL([], [postdeps], [1])
6574_LT_TAGDECL([], [compiler_lib_search_path], [1],
6575 [The library search path used internally by the compiler when linking
6576 a shared library])
6577])# _LT_SYS_HIDDEN_LIBDEPS
6578
6579
6580# _LT_PROG_F77
6581# ------------
6582# Since AC_PROG_F77 is broken, in that it returns the empty string
6583# if there is no fortran compiler, we have our own version here.
6584m4_defun([_LT_PROG_F77],
6585[
6586pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6587AC_PROG_F77
6588if test -z "$F77" || test "X$F77" = "Xno"; then
6589 _lt_disable_F77=yes
6590fi
6591popdef([AC_MSG_ERROR])
6592])# _LT_PROG_F77
6593
6594dnl aclocal-1.4 backwards compatibility:
6595dnl AC_DEFUN([_LT_PROG_F77], [])
6596
6597
6598# _LT_LANG_F77_CONFIG([TAG])
6599# --------------------------
6600# Ensure that the configuration variables for a Fortran 77 compiler are
6601# suitably defined. These variables are subsequently used by _LT_CONFIG
6602# to write the compiler configuration to `libtool'.
6603m4_defun([_LT_LANG_F77_CONFIG],
6604[AC_REQUIRE([_LT_PROG_F77])dnl
6605AC_LANG_PUSH(Fortran 77)
6606
6607_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6608_LT_TAGVAR(allow_undefined_flag, $1)=
6609_LT_TAGVAR(always_export_symbols, $1)=no
6610_LT_TAGVAR(archive_expsym_cmds, $1)=
6611_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6612_LT_TAGVAR(hardcode_direct, $1)=no
6613_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6614_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6615_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6616_LT_TAGVAR(hardcode_libdir_separator, $1)=
6617_LT_TAGVAR(hardcode_minus_L, $1)=no
6618_LT_TAGVAR(hardcode_automatic, $1)=no
6619_LT_TAGVAR(inherit_rpath, $1)=no
6620_LT_TAGVAR(module_cmds, $1)=
6621_LT_TAGVAR(module_expsym_cmds, $1)=
6622_LT_TAGVAR(link_all_deplibs, $1)=unknown
6623_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6624_LT_TAGVAR(no_undefined_flag, $1)=
6625_LT_TAGVAR(whole_archive_flag_spec, $1)=
6626_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6627
6628# Source file extension for f77 test sources.
6629ac_ext=f
6630
6631# Object file extension for compiled f77 test sources.
6632objext=o
6633_LT_TAGVAR(objext, $1)=$objext
6634
6635# No sense in running all these tests if we already determined that
6636# the F77 compiler isn't working. Some variables (like enable_shared)
6637# are currently assumed to apply to all compilers on this platform,
6638# and will be corrupted by setting them based on a non-working compiler.
6639if test "$_lt_disable_F77" != yes; then
6640 # Code to be used in simple compile tests
6641 lt_simple_compile_test_code="\
6642 subroutine t
6643 return
6644 end
6645"
6646
6647 # Code to be used in simple link tests
6648 lt_simple_link_test_code="\
6649 program t
6650 end
6651"
6652
6653 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6654 _LT_TAG_COMPILER
6655
6656 # save warnings/boilerplate of simple test code
6657 _LT_COMPILER_BOILERPLATE
6658 _LT_LINKER_BOILERPLATE
6659
6660 # Allow CC to be a program name with arguments.
6661 lt_save_CC="$CC"
6662 lt_save_GCC=$GCC
6663 CC=${F77-"f77"}
6664 compiler=$CC
6665 _LT_TAGVAR(compiler, $1)=$CC
6666 _LT_CC_BASENAME([$compiler])
6667 GCC=$G77
6668 if test -n "$compiler"; then
6669 AC_MSG_CHECKING([if libtool supports shared libraries])
6670 AC_MSG_RESULT([$can_build_shared])
6671
6672 AC_MSG_CHECKING([whether to build shared libraries])
6673 test "$can_build_shared" = "no" && enable_shared=no
6674
6675 # On AIX, shared libraries and static libraries use the same namespace, and
6676 # are all built from PIC.
6677 case $host_os in
6678 aix3*)
6679 test "$enable_shared" = yes && enable_static=no
6680 if test -n "$RANLIB"; then
6681 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6682 postinstall_cmds='$RANLIB $lib'
6683 fi
6684 ;;
6685 aix[[4-9]]*)
6686 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6687 test "$enable_shared" = yes && enable_static=no
6688 fi
6689 ;;
6690 esac
6691 AC_MSG_RESULT([$enable_shared])
6692
6693 AC_MSG_CHECKING([whether to build static libraries])
6694 # Make sure either enable_shared or enable_static is yes.
6695 test "$enable_shared" = yes || enable_static=yes
6696 AC_MSG_RESULT([$enable_static])
6697
6698 _LT_TAGVAR(GCC, $1)="$G77"
6699 _LT_TAGVAR(LD, $1)="$LD"
6700
6701 ## CAVEAT EMPTOR:
6702 ## There is no encapsulation within the following macros, do not change
6703 ## the running order or otherwise move them around unless you know exactly
6704 ## what you are doing...
6705 _LT_COMPILER_PIC($1)
6706 _LT_COMPILER_C_O($1)
6707 _LT_COMPILER_FILE_LOCKS($1)
6708 _LT_LINKER_SHLIBS($1)
6709 _LT_SYS_DYNAMIC_LINKER($1)
6710 _LT_LINKER_HARDCODE_LIBPATH($1)
6711
6712 _LT_CONFIG($1)
6713 fi # test -n "$compiler"
6714
6715 GCC=$lt_save_GCC
6716 CC="$lt_save_CC"
6717fi # test "$_lt_disable_F77" != yes
6718
6719AC_LANG_POP
6720])# _LT_LANG_F77_CONFIG
6721
6722
6723# _LT_PROG_FC
6724# -----------
6725# Since AC_PROG_FC is broken, in that it returns the empty string
6726# if there is no fortran compiler, we have our own version here.
6727m4_defun([_LT_PROG_FC],
6728[
6729pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6730AC_PROG_FC
6731if test -z "$FC" || test "X$FC" = "Xno"; then
6732 _lt_disable_FC=yes
6733fi
6734popdef([AC_MSG_ERROR])
6735])# _LT_PROG_FC
6736
6737dnl aclocal-1.4 backwards compatibility:
6738dnl AC_DEFUN([_LT_PROG_FC], [])
6739
6740
6741# _LT_LANG_FC_CONFIG([TAG])
6742# -------------------------
6743# Ensure that the configuration variables for a Fortran compiler are
6744# suitably defined. These variables are subsequently used by _LT_CONFIG
6745# to write the compiler configuration to `libtool'.
6746m4_defun([_LT_LANG_FC_CONFIG],
6747[AC_REQUIRE([_LT_PROG_FC])dnl
6748AC_LANG_PUSH(Fortran)
6749
6750_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6751_LT_TAGVAR(allow_undefined_flag, $1)=
6752_LT_TAGVAR(always_export_symbols, $1)=no
6753_LT_TAGVAR(archive_expsym_cmds, $1)=
6754_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6755_LT_TAGVAR(hardcode_direct, $1)=no
6756_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6757_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6758_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6759_LT_TAGVAR(hardcode_libdir_separator, $1)=
6760_LT_TAGVAR(hardcode_minus_L, $1)=no
6761_LT_TAGVAR(hardcode_automatic, $1)=no
6762_LT_TAGVAR(inherit_rpath, $1)=no
6763_LT_TAGVAR(module_cmds, $1)=
6764_LT_TAGVAR(module_expsym_cmds, $1)=
6765_LT_TAGVAR(link_all_deplibs, $1)=unknown
6766_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6767_LT_TAGVAR(no_undefined_flag, $1)=
6768_LT_TAGVAR(whole_archive_flag_spec, $1)=
6769_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6770
6771# Source file extension for fc test sources.
6772ac_ext=${ac_fc_srcext-f}
6773
6774# Object file extension for compiled fc test sources.
6775objext=o
6776_LT_TAGVAR(objext, $1)=$objext
6777
6778# No sense in running all these tests if we already determined that
6779# the FC compiler isn't working. Some variables (like enable_shared)
6780# are currently assumed to apply to all compilers on this platform,
6781# and will be corrupted by setting them based on a non-working compiler.
6782if test "$_lt_disable_FC" != yes; then
6783 # Code to be used in simple compile tests
6784 lt_simple_compile_test_code="\
6785 subroutine t
6786 return
6787 end
6788"
6789
6790 # Code to be used in simple link tests
6791 lt_simple_link_test_code="\
6792 program t
6793 end
6794"
6795
6796 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6797 _LT_TAG_COMPILER
6798
6799 # save warnings/boilerplate of simple test code
6800 _LT_COMPILER_BOILERPLATE
6801 _LT_LINKER_BOILERPLATE
6802
6803 # Allow CC to be a program name with arguments.
6804 lt_save_CC="$CC"
6805 lt_save_GCC=$GCC
6806 CC=${FC-"f95"}
6807 compiler=$CC
6808 GCC=$ac_cv_fc_compiler_gnu
6809
6810 _LT_TAGVAR(compiler, $1)=$CC
6811 _LT_CC_BASENAME([$compiler])
6812
6813 if test -n "$compiler"; then
6814 AC_MSG_CHECKING([if libtool supports shared libraries])
6815 AC_MSG_RESULT([$can_build_shared])
6816
6817 AC_MSG_CHECKING([whether to build shared libraries])
6818 test "$can_build_shared" = "no" && enable_shared=no
6819
6820 # On AIX, shared libraries and static libraries use the same namespace, and
6821 # are all built from PIC.
6822 case $host_os in
6823 aix3*)
6824 test "$enable_shared" = yes && enable_static=no
6825 if test -n "$RANLIB"; then
6826 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6827 postinstall_cmds='$RANLIB $lib'
6828 fi
6829 ;;
6830 aix[[4-9]]*)
6831 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6832 test "$enable_shared" = yes && enable_static=no
6833 fi
6834 ;;
6835 esac
6836 AC_MSG_RESULT([$enable_shared])
6837
6838 AC_MSG_CHECKING([whether to build static libraries])
6839 # Make sure either enable_shared or enable_static is yes.
6840 test "$enable_shared" = yes || enable_static=yes
6841 AC_MSG_RESULT([$enable_static])
6842
6843 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6844 _LT_TAGVAR(LD, $1)="$LD"
6845
6846 ## CAVEAT EMPTOR:
6847 ## There is no encapsulation within the following macros, do not change
6848 ## the running order or otherwise move them around unless you know exactly
6849 ## what you are doing...
6850 _LT_SYS_HIDDEN_LIBDEPS($1)
6851 _LT_COMPILER_PIC($1)
6852 _LT_COMPILER_C_O($1)
6853 _LT_COMPILER_FILE_LOCKS($1)
6854 _LT_LINKER_SHLIBS($1)
6855 _LT_SYS_DYNAMIC_LINKER($1)
6856 _LT_LINKER_HARDCODE_LIBPATH($1)
6857
6858 _LT_CONFIG($1)
6859 fi # test -n "$compiler"
6860
6861 GCC=$lt_save_GCC
6862 CC="$lt_save_CC"
6863fi # test "$_lt_disable_FC" != yes
6864
6865AC_LANG_POP
6866])# _LT_LANG_FC_CONFIG
6867
6868
6869# _LT_LANG_GCJ_CONFIG([TAG])
6870# --------------------------
6871# Ensure that the configuration variables for the GNU Java Compiler compiler
6872# are suitably defined. These variables are subsequently used by _LT_CONFIG
6873# to write the compiler configuration to `libtool'.
6874m4_defun([_LT_LANG_GCJ_CONFIG],
6875[AC_REQUIRE([LT_PROG_GCJ])dnl
6876AC_LANG_SAVE
6877
6878# Source file extension for Java test sources.
6879ac_ext=java
6880
6881# Object file extension for compiled Java test sources.
6882objext=o
6883_LT_TAGVAR(objext, $1)=$objext
6884
6885# Code to be used in simple compile tests
6886lt_simple_compile_test_code="class foo {}"
6887
6888# Code to be used in simple link tests
6889lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6890
6891# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6892_LT_TAG_COMPILER
6893
6894# save warnings/boilerplate of simple test code
6895_LT_COMPILER_BOILERPLATE
6896_LT_LINKER_BOILERPLATE
6897
6898# Allow CC to be a program name with arguments.
6899lt_save_CC="$CC"
6900lt_save_GCC=$GCC
6901GCC=yes
6902CC=${GCJ-"gcj"}
6903compiler=$CC
6904_LT_TAGVAR(compiler, $1)=$CC
6905_LT_TAGVAR(LD, $1)="$LD"
6906_LT_CC_BASENAME([$compiler])
6907
6908# GCJ did not exist at the time GCC didn't implicitly link libc in.
6909_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6910
6911_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6912
6913## CAVEAT EMPTOR:
6914## There is no encapsulation within the following macros, do not change
6915## the running order or otherwise move them around unless you know exactly
6916## what you are doing...
6917if test -n "$compiler"; then
6918 _LT_COMPILER_NO_RTTI($1)
6919 _LT_COMPILER_PIC($1)
6920 _LT_COMPILER_C_O($1)
6921 _LT_COMPILER_FILE_LOCKS($1)
6922 _LT_LINKER_SHLIBS($1)
6923 _LT_LINKER_HARDCODE_LIBPATH($1)
6924
6925 _LT_CONFIG($1)
6926fi
6927
6928AC_LANG_RESTORE
6929
6930GCC=$lt_save_GCC
6931CC="$lt_save_CC"
6932])# _LT_LANG_GCJ_CONFIG
6933
6934
6935# _LT_LANG_RC_CONFIG([TAG])
6936# -------------------------
6937# Ensure that the configuration variables for the Windows resource compiler
6938# are suitably defined. These variables are subsequently used by _LT_CONFIG
6939# to write the compiler configuration to `libtool'.
6940m4_defun([_LT_LANG_RC_CONFIG],
6941[AC_REQUIRE([LT_PROG_RC])dnl
6942AC_LANG_SAVE
6943
6944# Source file extension for RC test sources.
6945ac_ext=rc
6946
6947# Object file extension for compiled RC test sources.
6948objext=o
6949_LT_TAGVAR(objext, $1)=$objext
6950
6951# Code to be used in simple compile tests
6952lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6953
6954# Code to be used in simple link tests
6955lt_simple_link_test_code="$lt_simple_compile_test_code"
6956
6957# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6958_LT_TAG_COMPILER
6959
6960# save warnings/boilerplate of simple test code
6961_LT_COMPILER_BOILERPLATE
6962_LT_LINKER_BOILERPLATE
6963
6964# Allow CC to be a program name with arguments.
6965lt_save_CC="$CC"
6966lt_save_GCC=$GCC
6967GCC=
6968CC=${RC-"windres"}
6969compiler=$CC
6970_LT_TAGVAR(compiler, $1)=$CC
6971_LT_CC_BASENAME([$compiler])
6972_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6973
6974if test -n "$compiler"; then
6975 :
6976 _LT_CONFIG($1)
6977fi
6978
6979GCC=$lt_save_GCC
6980AC_LANG_RESTORE
6981CC="$lt_save_CC"
6982])# _LT_LANG_RC_CONFIG
6983
6984
6985# LT_PROG_GCJ
6986# -----------
6987AC_DEFUN([LT_PROG_GCJ],
6988[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6989 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6990 [AC_CHECK_TOOL(GCJ, gcj,)
6991 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6992 AC_SUBST(GCJFLAGS)])])[]dnl
6993])
6994
6995# Old name:
6996AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6997dnl aclocal-1.4 backwards compatibility:
6998dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6999
7000
7001# LT_PROG_RC
7002# ----------
7003AC_DEFUN([LT_PROG_RC],
7004[AC_CHECK_TOOL(RC, windres,)
7005])
7006
7007# Old name:
7008AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7009dnl aclocal-1.4 backwards compatibility:
7010dnl AC_DEFUN([LT_AC_PROG_RC], [])
7011
7012
7013# _LT_DECL_EGREP
7014# --------------
7015# If we don't have a new enough Autoconf to choose the best grep
7016# available, choose the one first in the user's PATH.
7017m4_defun([_LT_DECL_EGREP],
7018[AC_REQUIRE([AC_PROG_EGREP])dnl
7019AC_REQUIRE([AC_PROG_FGREP])dnl
7020test -z "$GREP" && GREP=grep
7021_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7022_LT_DECL([], [EGREP], [1], [An ERE matcher])
7023_LT_DECL([], [FGREP], [1], [A literal string matcher])
7024dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7025AC_SUBST([GREP])
7026])
7027
7028
7029# _LT_DECL_OBJDUMP
7030# --------------
7031# If we don't have a new enough Autoconf to choose the best objdump
7032# available, choose the one first in the user's PATH.
7033m4_defun([_LT_DECL_OBJDUMP],
7034[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7035test -z "$OBJDUMP" && OBJDUMP=objdump
7036_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7037AC_SUBST([OBJDUMP])
7038])
7039
7040
7041# _LT_DECL_SED
7042# ------------
7043# Check for a fully-functional sed program, that truncates
7044# as few characters as possible. Prefer GNU sed if found.
7045m4_defun([_LT_DECL_SED],
7046[AC_PROG_SED
7047test -z "$SED" && SED=sed
7048Xsed="$SED -e 1s/^X//"
7049_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7050_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7051 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7052])# _LT_DECL_SED
7053
7054m4_ifndef([AC_PROG_SED], [
7055############################################################
7056# NOTE: This macro has been submitted for inclusion into #
7057# GNU Autoconf as AC_PROG_SED. When it is available in #
7058# a released version of Autoconf we should remove this #
7059# macro and use it instead. #
7060############################################################
7061
7062m4_defun([AC_PROG_SED],
7063[AC_MSG_CHECKING([for a sed that does not truncate output])
7064AC_CACHE_VAL(lt_cv_path_SED,
7065[# Loop through the user's path and test for sed and gsed.
7066# Then use that list of sed's as ones to test for truncation.
7067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7068for as_dir in $PATH
7069do
7070 IFS=$as_save_IFS
7071 test -z "$as_dir" && as_dir=.
7072 for lt_ac_prog in sed gsed; do
7073 for ac_exec_ext in '' $ac_executable_extensions; do
7074 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7075 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7076 fi
7077 done
7078 done
7079done
7080IFS=$as_save_IFS
7081lt_ac_max=0
7082lt_ac_count=0
7083# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7084# along with /bin/sed that truncates output.
7085for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7086 test ! -f $lt_ac_sed && continue
7087 cat /dev/null > conftest.in
7088 lt_ac_count=0
7089 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7090 # Check for GNU sed and select it if it is found.
7091 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7092 lt_cv_path_SED=$lt_ac_sed
7093 break
7094 fi
7095 while true; do
7096 cat conftest.in conftest.in >conftest.tmp
7097 mv conftest.tmp conftest.in
7098 cp conftest.in conftest.nl
7099 echo >>conftest.nl
7100 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7101 cmp -s conftest.out conftest.nl || break
7102 # 10000 chars as input seems more than enough
7103 test $lt_ac_count -gt 10 && break
7104 lt_ac_count=`expr $lt_ac_count + 1`
7105 if test $lt_ac_count -gt $lt_ac_max; then
7106 lt_ac_max=$lt_ac_count
7107 lt_cv_path_SED=$lt_ac_sed
7108 fi
7109 done
7110done
7111])
7112SED=$lt_cv_path_SED
7113AC_SUBST([SED])
7114AC_MSG_RESULT([$SED])
7115])#AC_PROG_SED
7116])#m4_ifndef
7117
7118# Old name:
7119AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7120dnl aclocal-1.4 backwards compatibility:
7121dnl AC_DEFUN([LT_AC_PROG_SED], [])
7122
7123
7124# _LT_CHECK_SHELL_FEATURES
7125# ------------------------
7126# Find out whether the shell is Bourne or XSI compatible,
7127# or has some other useful features.
7128m4_defun([_LT_CHECK_SHELL_FEATURES],
7129[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7130# Try some XSI features
7131xsi_shell=no
7132( _lt_dummy="a/b/c"
7133 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7134 = c,a/b,, \
7135 && eval 'test $(( 1 + 1 )) -eq 2 \
7136 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7137 && xsi_shell=yes
7138AC_MSG_RESULT([$xsi_shell])
7139_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7140
7141AC_MSG_CHECKING([whether the shell understands "+="])
7142lt_shell_append=no
7143( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7144 >/dev/null 2>&1 \
7145 && lt_shell_append=yes
7146AC_MSG_RESULT([$lt_shell_append])
7147_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7148
7149if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7150 lt_unset=unset
7151else
7152 lt_unset=false
7153fi
7154_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7155
7156# test EBCDIC or ASCII
7157case `echo X|tr X '\101'` in
7158 A) # ASCII based system
7159 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7160 lt_SP2NL='tr \040 \012'
7161 lt_NL2SP='tr \015\012 \040\040'
7162 ;;
7163 *) # EBCDIC based system
7164 lt_SP2NL='tr \100 \n'
7165 lt_NL2SP='tr \r\n \100\100'
7166 ;;
7167esac
7168_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7169_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7170])# _LT_CHECK_SHELL_FEATURES
7171
7172
7173# _LT_PROG_XSI_SHELLFNS
7174# ---------------------
7175# Bourne and XSI compatible variants of some useful shell functions.
7176m4_defun([_LT_PROG_XSI_SHELLFNS],
7177[case $xsi_shell in
7178 yes)
7179 cat << \_LT_EOF >> "$cfgfile"
7180
7181# func_dirname file append nondir_replacement
7182# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7183# otherwise set result to NONDIR_REPLACEMENT.
7184func_dirname ()
7185{
7186 case ${1} in
7187 */*) func_dirname_result="${1%/*}${2}" ;;
7188 * ) func_dirname_result="${3}" ;;
7189 esac
7190}
7191
7192# func_basename file
7193func_basename ()
7194{
7195 func_basename_result="${1##*/}"
7196}
7197
7198# func_dirname_and_basename file append nondir_replacement
7199# perform func_basename and func_dirname in a single function
7200# call:
7201# dirname: Compute the dirname of FILE. If nonempty,
7202# add APPEND to the result, otherwise set result
7203# to NONDIR_REPLACEMENT.
7204# value returned in "$func_dirname_result"
7205# basename: Compute filename of FILE.
7206# value retuned in "$func_basename_result"
7207# Implementation must be kept synchronized with func_dirname
7208# and func_basename. For efficiency, we do not delegate to
7209# those functions but instead duplicate the functionality here.
7210func_dirname_and_basename ()
7211{
7212 case ${1} in
7213 */*) func_dirname_result="${1%/*}${2}" ;;
7214 * ) func_dirname_result="${3}" ;;
7215 esac
7216 func_basename_result="${1##*/}"
7217}
7218
7219# func_stripname prefix suffix name
7220# strip PREFIX and SUFFIX off of NAME.
7221# PREFIX and SUFFIX must not contain globbing or regex special
7222# characters, hashes, percent signs, but SUFFIX may contain a leading
7223# dot (in which case that matches only a dot).
7224func_stripname ()
7225{
7226 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7227 # positional parameters, so assign one to ordinary parameter first.
7228 func_stripname_result=${3}
7229 func_stripname_result=${func_stripname_result#"${1}"}
7230 func_stripname_result=${func_stripname_result%"${2}"}
7231}
7232
7233# func_opt_split
7234func_opt_split ()
7235{
7236 func_opt_split_opt=${1%%=*}
7237 func_opt_split_arg=${1#*=}
7238}
7239
7240# func_lo2o object
7241func_lo2o ()
7242{
7243 case ${1} in
7244 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7245 *) func_lo2o_result=${1} ;;
7246 esac
7247}
7248
7249# func_xform libobj-or-source
7250func_xform ()
7251{
7252 func_xform_result=${1%.*}.lo
7253}
7254
7255# func_arith arithmetic-term...
7256func_arith ()
7257{
7258 func_arith_result=$(( $[*] ))
7259}
7260
7261# func_len string
7262# STRING may not start with a hyphen.
7263func_len ()
7264{
7265 func_len_result=${#1}
7266}
7267
7268_LT_EOF
7269 ;;
7270 *) # Bourne compatible functions.
7271 cat << \_LT_EOF >> "$cfgfile"
7272
7273# func_dirname file append nondir_replacement
7274# Compute the dirname of FILE. If nonempty, add APPEND to the result,
7275# otherwise set result to NONDIR_REPLACEMENT.
7276func_dirname ()
7277{
7278 # Extract subdirectory from the argument.
7279 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7280 if test "X$func_dirname_result" = "X${1}"; then
7281 func_dirname_result="${3}"
7282 else
7283 func_dirname_result="$func_dirname_result${2}"
7284 fi
7285}
7286
7287# func_basename file
7288func_basename ()
7289{
7290 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7291}
7292
7293dnl func_dirname_and_basename
7294dnl A portable version of this function is already defined in general.m4sh
7295dnl so there is no need for it here.
7296
7297# func_stripname prefix suffix name
7298# strip PREFIX and SUFFIX off of NAME.
7299# PREFIX and SUFFIX must not contain globbing or regex special
7300# characters, hashes, percent signs, but SUFFIX may contain a leading
7301# dot (in which case that matches only a dot).
7302# func_strip_suffix prefix name
7303func_stripname ()
7304{
7305 case ${2} in
7306 .*) func_stripname_result=`$ECHO "X${3}" \
7307 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7308 *) func_stripname_result=`$ECHO "X${3}" \
7309 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7310 esac
7311}
7312
7313# sed scripts:
7314my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7315my_sed_long_arg='1s/^-[[^=]]*=//'
7316
7317# func_opt_split
7318func_opt_split ()
7319{
7320 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7321 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7322}
7323
7324# func_lo2o object
7325func_lo2o ()
7326{
7327 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7328}
7329
7330# func_xform libobj-or-source
7331func_xform ()
7332{
7333 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7334}
7335
7336# func_arith arithmetic-term...
7337func_arith ()
7338{
7339 func_arith_result=`expr "$[@]"`
7340}
7341
7342# func_len string
7343# STRING may not start with a hyphen.
7344func_len ()
7345{
7346 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7347}
7348
7349_LT_EOF
7350esac
7351
7352case $lt_shell_append in
7353 yes)
7354 cat << \_LT_EOF >> "$cfgfile"
7355
7356# func_append var value
7357# Append VALUE to the end of shell variable VAR.
7358func_append ()
7359{
7360 eval "$[1]+=\$[2]"
7361}
7362_LT_EOF
7363 ;;
7364 *)
7365 cat << \_LT_EOF >> "$cfgfile"
7366
7367# func_append var value
7368# Append VALUE to the end of shell variable VAR.
7369func_append ()
7370{
7371 eval "$[1]=\$$[1]\$[2]"
7372}
7373
7374_LT_EOF
7375 ;;
7376 esac
7377])
diff --git a/libraries/eet/m4/ltoptions.m4 b/libraries/eet/m4/ltoptions.m4
new file mode 100644
index 0000000..34151a3
--- /dev/null
+++ b/libraries/eet/m4/ltoptions.m4
@@ -0,0 +1,368 @@
1# Helper functions for option handling. -*- Autoconf -*-
2#
3# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
4# Written by Gary V. Vaughan, 2004
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# serial 6 ltoptions.m4
11
12# This is to help aclocal find these macros, as it can't see m4_define.
13AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17# ------------------------------------------
18m4_define([_LT_MANGLE_OPTION],
19[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23# ---------------------------------------
24# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25# matching handler defined, dispatch to it. Other OPTION-NAMEs are
26# saved as a flag.
27m4_define([_LT_SET_OPTION],
28[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32])
33
34
35# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36# ------------------------------------------------------------
37# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38m4_define([_LT_IF_OPTION],
39[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43# -------------------------------------------------------
44# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45# are set.
46m4_define([_LT_UNLESS_OPTIONS],
47[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51])[]dnl
52])
53
54
55# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56# ----------------------------------------
57# OPTION-LIST is a space-separated list of Libtool options associated
58# with MACRO-NAME. If any OPTION has a matching handler declared with
59# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60# the unknown option and exit.
61m4_defun([_LT_SET_OPTIONS],
62[# Set options
63m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85])# _LT_SET_OPTIONS
86
87
88## --------------------------------- ##
89## Macros to handle LT_INIT options. ##
90## --------------------------------- ##
91
92# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93# -----------------------------------------
94m4_define([_LT_MANGLE_DEFUN],
95[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99# -----------------------------------------------
100m4_define([LT_OPTION_DEFINE],
101[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102])# LT_OPTION_DEFINE
103
104
105# dlopen
106# ------
107LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108])
109
110AU_DEFUN([AC_LIBTOOL_DLOPEN],
111[_LT_SET_OPTION([LT_INIT], [dlopen])
112AC_DIAGNOSE([obsolete],
113[$0: Remove this warning and the call to _LT_SET_OPTION when you
114put the `dlopen' option into LT_INIT's first parameter.])
115])
116
117dnl aclocal-1.4 backwards compatibility:
118dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121# win32-dll
122# ---------
123# Declare package support for building win32 dll's.
124LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125[enable_win32_dll=yes
126
127case $host in
128*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133esac
134
135test -z "$AS" && AS=as
136_LT_DECL([], [AS], [0], [Assembler program])dnl
137
138test -z "$DLLTOOL" && DLLTOOL=dlltool
139_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
140
141test -z "$OBJDUMP" && OBJDUMP=objdump
142_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
143])# win32-dll
144
145AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146[AC_REQUIRE([AC_CANONICAL_HOST])dnl
147_LT_SET_OPTION([LT_INIT], [win32-dll])
148AC_DIAGNOSE([obsolete],
149[$0: Remove this warning and the call to _LT_SET_OPTION when you
150put the `win32-dll' option into LT_INIT's first parameter.])
151])
152
153dnl aclocal-1.4 backwards compatibility:
154dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157# _LT_ENABLE_SHARED([DEFAULT])
158# ----------------------------
159# implement the --enable-shared flag, and supports the `shared' and
160# `disable-shared' LT_INIT options.
161# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162m4_define([_LT_ENABLE_SHARED],
163[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188])# _LT_ENABLE_SHARED
189
190LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193# Old names:
194AC_DEFUN([AC_ENABLE_SHARED],
195[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196])
197
198AC_DEFUN([AC_DISABLE_SHARED],
199[_LT_SET_OPTION([LT_INIT], [disable-shared])
200])
201
202AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205dnl aclocal-1.4 backwards compatibility:
206dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211# _LT_ENABLE_STATIC([DEFAULT])
212# ----------------------------
213# implement the --enable-static flag, and support the `static' and
214# `disable-static' LT_INIT options.
215# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216m4_define([_LT_ENABLE_STATIC],
217[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242])# _LT_ENABLE_STATIC
243
244LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247# Old names:
248AC_DEFUN([AC_ENABLE_STATIC],
249[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250])
251
252AC_DEFUN([AC_DISABLE_STATIC],
253[_LT_SET_OPTION([LT_INIT], [disable-static])
254])
255
256AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259dnl aclocal-1.4 backwards compatibility:
260dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265# _LT_ENABLE_FAST_INSTALL([DEFAULT])
266# ----------------------------------
267# implement the --enable-fast-install flag, and support the `fast-install'
268# and `disable-fast-install' LT_INIT options.
269# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270m4_define([_LT_ENABLE_FAST_INSTALL],
271[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294_LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296])# _LT_ENABLE_FAST_INSTALL
297
298LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301# Old names:
302AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304AC_DIAGNOSE([obsolete],
305[$0: Remove this warning and the call to _LT_SET_OPTION when you put
306the `fast-install' option into LT_INIT's first parameter.])
307])
308
309AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311AC_DIAGNOSE([obsolete],
312[$0: Remove this warning and the call to _LT_SET_OPTION when you put
313the `disable-fast-install' option into LT_INIT's first parameter.])
314])
315
316dnl aclocal-1.4 backwards compatibility:
317dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321# _LT_WITH_PIC([MODE])
322# --------------------
323# implement the --with-pic flag, and support the `pic-only' and `no-pic'
324# LT_INIT options.
325# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326m4_define([_LT_WITH_PIC],
327[AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [pic_mode="$withval"],
331 [pic_mode=default])
332
333test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
334
335_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
336])# _LT_WITH_PIC
337
338LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
339LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
340
341# Old name:
342AU_DEFUN([AC_LIBTOOL_PICMODE],
343[_LT_SET_OPTION([LT_INIT], [pic-only])
344AC_DIAGNOSE([obsolete],
345[$0: Remove this warning and the call to _LT_SET_OPTION when you
346put the `pic-only' option into LT_INIT's first parameter.])
347])
348
349dnl aclocal-1.4 backwards compatibility:
350dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
351
352## ----------------- ##
353## LTDL_INIT Options ##
354## ----------------- ##
355
356m4_define([_LTDL_MODE], [])
357LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
358 [m4_define([_LTDL_MODE], [nonrecursive])])
359LT_OPTION_DEFINE([LTDL_INIT], [recursive],
360 [m4_define([_LTDL_MODE], [recursive])])
361LT_OPTION_DEFINE([LTDL_INIT], [subproject],
362 [m4_define([_LTDL_MODE], [subproject])])
363
364m4_define([_LTDL_TYPE], [])
365LT_OPTION_DEFINE([LTDL_INIT], [installable],
366 [m4_define([_LTDL_TYPE], [installable])])
367LT_OPTION_DEFINE([LTDL_INIT], [convenience],
368 [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/libraries/eet/m4/ltsugar.m4 b/libraries/eet/m4/ltsugar.m4
new file mode 100644
index 0000000..9000a05
--- /dev/null
+++ b/libraries/eet/m4/ltsugar.m4
@@ -0,0 +1,123 @@
1# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
2#
3# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
4# Written by Gary V. Vaughan, 2004
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# serial 6 ltsugar.m4
11
12# This is to help aclocal find these macros, as it can't see m4_define.
13AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
14
15
16# lt_join(SEP, ARG1, [ARG2...])
17# -----------------------------
18# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
19# associated separator.
20# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
21# versions in m4sugar had bugs.
22m4_define([lt_join],
23[m4_if([$#], [1], [],
24 [$#], [2], [[$2]],
25 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
26m4_define([_lt_join],
27[m4_if([$#$2], [2], [],
28 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
29
30
31# lt_car(LIST)
32# lt_cdr(LIST)
33# ------------
34# Manipulate m4 lists.
35# These macros are necessary as long as will still need to support
36# Autoconf-2.59 which quotes differently.
37m4_define([lt_car], [[$1]])
38m4_define([lt_cdr],
39[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
40 [$#], 1, [],
41 [m4_dquote(m4_shift($@))])])
42m4_define([lt_unquote], $1)
43
44
45# lt_append(MACRO-NAME, STRING, [SEPARATOR])
46# ------------------------------------------
47# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
48# Note that neither SEPARATOR nor STRING are expanded; they are appended
49# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
50# No SEPARATOR is output if MACRO-NAME was previously undefined (different
51# than defined and empty).
52#
53# This macro is needed until we can rely on Autoconf 2.62, since earlier
54# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
55m4_define([lt_append],
56[m4_define([$1],
57 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
58
59
60
61# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
62# ----------------------------------------------------------
63# Produce a SEP delimited list of all paired combinations of elements of
64# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
65# has the form PREFIXmINFIXSUFFIXn.
66# Needed until we can rely on m4_combine added in Autoconf 2.62.
67m4_define([lt_combine],
68[m4_if(m4_eval([$# > 3]), [1],
69 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
70[[m4_foreach([_Lt_prefix], [$2],
71 [m4_foreach([_Lt_suffix],
72 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
73 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
74
75
76# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
77# -----------------------------------------------------------------------
78# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
79# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
80m4_define([lt_if_append_uniq],
81[m4_ifdef([$1],
82 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
83 [lt_append([$1], [$2], [$3])$4],
84 [$5])],
85 [lt_append([$1], [$2], [$3])$4])])
86
87
88# lt_dict_add(DICT, KEY, VALUE)
89# -----------------------------
90m4_define([lt_dict_add],
91[m4_define([$1($2)], [$3])])
92
93
94# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95# --------------------------------------------
96m4_define([lt_dict_add_subkey],
97[m4_define([$1($2:$3)], [$4])])
98
99
100# lt_dict_fetch(DICT, KEY, [SUBKEY])
101# ----------------------------------
102m4_define([lt_dict_fetch],
103[m4_ifval([$3],
104 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
105 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
106
107
108# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
109# -----------------------------------------------------------------
110m4_define([lt_if_dict_fetch],
111[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
112 [$5],
113 [$6])])
114
115
116# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
117# --------------------------------------------------------------
118m4_define([lt_dict_filter],
119[m4_if([$5], [], [],
120 [lt_join(m4_quote(m4_default([$4], [[, ]])),
121 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
122 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123])
diff --git a/libraries/eet/m4/ltversion.m4 b/libraries/eet/m4/ltversion.m4
new file mode 100644
index 0000000..f3c5309
--- /dev/null
+++ b/libraries/eet/m4/ltversion.m4
@@ -0,0 +1,23 @@
1# ltversion.m4 -- version numbers -*- Autoconf -*-
2#
3# Copyright (C) 2004 Free Software Foundation, Inc.
4# Written by Scott James Remnant, 2004
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# Generated from ltversion.in.
11
12# serial 3017 ltversion.m4
13# This file is part of GNU Libtool
14
15m4_define([LT_PACKAGE_VERSION], [2.2.6b])
16m4_define([LT_PACKAGE_REVISION], [1.3017])
17
18AC_DEFUN([LTVERSION_VERSION],
19[macro_version='2.2.6b'
20macro_revision='1.3017'
21_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
22_LT_DECL(, macro_revision, 0)
23])
diff --git a/libraries/eet/m4/lt~obsolete.m4 b/libraries/eet/m4/lt~obsolete.m4
new file mode 100644
index 0000000..637bb20
--- /dev/null
+++ b/libraries/eet/m4/lt~obsolete.m4
@@ -0,0 +1,92 @@
1# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
2#
3# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
4# Written by Scott James Remnant, 2004.
5#
6# This file is free software; the Free Software Foundation gives
7# unlimited permission to copy and/or distribute it, with or without
8# modifications, as long as this notice is preserved.
9
10# serial 4 lt~obsolete.m4
11
12# These exist entirely to fool aclocal when bootstrapping libtool.
13#
14# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
15# which have later been changed to m4_define as they aren't part of the
16# exported API, or moved to Autoconf or Automake where they belong.
17#
18# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
19# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
20# using a macro with the same name in our local m4/libtool.m4 it'll
21# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
22# and doesn't know about Autoconf macros at all.)
23#
24# So we provide this file, which has a silly filename so it's always
25# included after everything else. This provides aclocal with the
26# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
27# because those macros already exist, or will be overwritten later.
28# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
29#
30# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
31# Yes, that means every name once taken will need to remain here until
32# we give up compatibility with versions before 1.7, at which point
33# we need to keep only those names which we still refer to.
34
35# This is to help aclocal find these macros, as it can't see m4_define.
36AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
37
38m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
39m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
40m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
41m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
42m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
43m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
44m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
45m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
46m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
47m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
48m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
49m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
50m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
51m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
52m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
53m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
54m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
55m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
56m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
57m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
58m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
59m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
60m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
61m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
62m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
63m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
64m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
65m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
66m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
67m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
68m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
69m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
70m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
71m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
72m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
73m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
74m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
75m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
76m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
77m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
78m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
79m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
80m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
81m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
82m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
83m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
84m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
85m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
86m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
87m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
88m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
89m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
90m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
91m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
92m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/libraries/eet/missing b/libraries/eet/missing
new file mode 100755
index 0000000..28055d2
--- /dev/null
+++ b/libraries/eet/missing
@@ -0,0 +1,376 @@
1#! /bin/sh
2# Common stub for a few missing GNU programs while installing.
3
4scriptversion=2009-04-28.21; # UTC
5
6# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
7# 2008, 2009 Free Software Foundation, Inc.
8# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
9
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2, or (at your option)
13# any later version.
14
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23# As a special exception to the GNU General Public License, if you
24# distribute this file as part of a program that contains a
25# configuration script generated by Autoconf, you may include it under
26# the same distribution terms that you use for the rest of that program.
27
28if test $# -eq 0; then
29 echo 1>&2 "Try \`$0 --help' for more information"
30 exit 1
31fi
32
33run=:
34sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
35sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
36
37# In the cases where this matters, `missing' is being run in the
38# srcdir already.
39if test -f configure.ac; then
40 configure_ac=configure.ac
41else
42 configure_ac=configure.in
43fi
44
45msg="missing on your system"
46
47case $1 in
48--run)
49 # Try to run requested program, and just exit if it succeeds.
50 run=
51 shift
52 "$@" && exit 0
53 # Exit code 63 means version mismatch. This often happens
54 # when the user try to use an ancient version of a tool on
55 # a file that requires a minimum version. In this case we
56 # we should proceed has if the program had been absent, or
57 # if --run hadn't been passed.
58 if test $? = 63; then
59 run=:
60 msg="probably too old"
61 fi
62 ;;
63
64 -h|--h|--he|--hel|--help)
65 echo "\
66$0 [OPTION]... PROGRAM [ARGUMENT]...
67
68Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
69error status if there is no known handling for PROGRAM.
70
71Options:
72 -h, --help display this help and exit
73 -v, --version output version information and exit
74 --run try to run the given command, and emulate it if it fails
75
76Supported PROGRAM values:
77 aclocal touch file \`aclocal.m4'
78 autoconf touch file \`configure'
79 autoheader touch file \`config.h.in'
80 autom4te touch the output file, or create a stub one
81 automake touch all \`Makefile.in' files
82 bison create \`y.tab.[ch]', if possible, from existing .[ch]
83 flex create \`lex.yy.c', if possible, from existing .c
84 help2man touch the output file
85 lex create \`lex.yy.c', if possible, from existing .c
86 makeinfo touch the output file
87 tar try tar, gnutar, gtar, then tar without non-portable flags
88 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
89
90Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
91\`g' are ignored when checking the name.
92
93Send bug reports to <bug-automake@gnu.org>."
94 exit $?
95 ;;
96
97 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
98 echo "missing $scriptversion (GNU Automake)"
99 exit $?
100 ;;
101
102 -*)
103 echo 1>&2 "$0: Unknown \`$1' option"
104 echo 1>&2 "Try \`$0 --help' for more information"
105 exit 1
106 ;;
107
108esac
109
110# normalize program name to check for.
111program=`echo "$1" | sed '
112 s/^gnu-//; t
113 s/^gnu//; t
114 s/^g//; t'`
115
116# Now exit if we have it, but it failed. Also exit now if we
117# don't have it and --version was passed (most likely to detect
118# the program). This is about non-GNU programs, so use $1 not
119# $program.
120case $1 in
121 lex*|yacc*)
122 # Not GNU programs, they don't have --version.
123 ;;
124
125 tar*)
126 if test -n "$run"; then
127 echo 1>&2 "ERROR: \`tar' requires --run"
128 exit 1
129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130 exit 1
131 fi
132 ;;
133
134 *)
135 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
136 # We have it, but it failed.
137 exit 1
138 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
139 # Could not run --version or --help. This is probably someone
140 # running `$TOOL --version' or `$TOOL --help' to check whether
141 # $TOOL exists and not knowing $TOOL uses missing.
142 exit 1
143 fi
144 ;;
145esac
146
147# If it does not exist, or fails to run (possibly an outdated version),
148# try to emulate it.
149case $program in
150 aclocal*)
151 echo 1>&2 "\
152WARNING: \`$1' is $msg. You should only need it if
153 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
154 to install the \`Automake' and \`Perl' packages. Grab them from
155 any GNU archive site."
156 touch aclocal.m4
157 ;;
158
159 autoconf*)
160 echo 1>&2 "\
161WARNING: \`$1' is $msg. You should only need it if
162 you modified \`${configure_ac}'. You might want to install the
163 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
164 archive site."
165 touch configure
166 ;;
167
168 autoheader*)
169 echo 1>&2 "\
170WARNING: \`$1' is $msg. You should only need it if
171 you modified \`acconfig.h' or \`${configure_ac}'. You might want
172 to install the \`Autoconf' and \`GNU m4' packages. Grab them
173 from any GNU archive site."
174 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
175 test -z "$files" && files="config.h"
176 touch_files=
177 for f in $files; do
178 case $f in
179 *:*) touch_files="$touch_files "`echo "$f" |
180 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
181 *) touch_files="$touch_files $f.in";;
182 esac
183 done
184 touch $touch_files
185 ;;
186
187 automake*)
188 echo 1>&2 "\
189WARNING: \`$1' is $msg. You should only need it if
190 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
191 You might want to install the \`Automake' and \`Perl' packages.
192 Grab them from any GNU archive site."
193 find . -type f -name Makefile.am -print |
194 sed 's/\.am$/.in/' |
195 while read f; do touch "$f"; done
196 ;;
197
198 autom4te*)
199 echo 1>&2 "\
200WARNING: \`$1' is needed, but is $msg.
201 You might have modified some files without having the
202 proper tools for further handling them.
203 You can get \`$1' as part of \`Autoconf' from any GNU
204 archive site."
205
206 file=`echo "$*" | sed -n "$sed_output"`
207 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
208 if test -f "$file"; then
209 touch $file
210 else
211 test -z "$file" || exec >$file
212 echo "#! /bin/sh"
213 echo "# Created by GNU Automake missing as a replacement of"
214 echo "# $ $@"
215 echo "exit 0"
216 chmod +x $file
217 exit 1
218 fi
219 ;;
220
221 bison*|yacc*)
222 echo 1>&2 "\
223WARNING: \`$1' $msg. You should only need it if
224 you modified a \`.y' file. You may need the \`Bison' package
225 in order for those modifications to take effect. You can get
226 \`Bison' from any GNU archive site."
227 rm -f y.tab.c y.tab.h
228 if test $# -ne 1; then
229 eval LASTARG="\${$#}"
230 case $LASTARG in
231 *.y)
232 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
233 if test -f "$SRCFILE"; then
234 cp "$SRCFILE" y.tab.c
235 fi
236 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
237 if test -f "$SRCFILE"; then
238 cp "$SRCFILE" y.tab.h
239 fi
240 ;;
241 esac
242 fi
243 if test ! -f y.tab.h; then
244 echo >y.tab.h
245 fi
246 if test ! -f y.tab.c; then
247 echo 'main() { return 0; }' >y.tab.c
248 fi
249 ;;
250
251 lex*|flex*)
252 echo 1>&2 "\
253WARNING: \`$1' is $msg. You should only need it if
254 you modified a \`.l' file. You may need the \`Flex' package
255 in order for those modifications to take effect. You can get
256 \`Flex' from any GNU archive site."
257 rm -f lex.yy.c
258 if test $# -ne 1; then
259 eval LASTARG="\${$#}"
260 case $LASTARG in
261 *.l)
262 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
263 if test -f "$SRCFILE"; then
264 cp "$SRCFILE" lex.yy.c
265 fi
266 ;;
267 esac
268 fi
269 if test ! -f lex.yy.c; then
270 echo 'main() { return 0; }' >lex.yy.c
271 fi
272 ;;
273
274 help2man*)
275 echo 1>&2 "\
276WARNING: \`$1' is $msg. You should only need it if
277 you modified a dependency of a manual page. You may need the
278 \`Help2man' package in order for those modifications to take
279 effect. You can get \`Help2man' from any GNU archive site."
280
281 file=`echo "$*" | sed -n "$sed_output"`
282 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
283 if test -f "$file"; then
284 touch $file
285 else
286 test -z "$file" || exec >$file
287 echo ".ab help2man is required to generate this page"
288 exit $?
289 fi
290 ;;
291
292 makeinfo*)
293 echo 1>&2 "\
294WARNING: \`$1' is $msg. You should only need it if
295 you modified a \`.texi' or \`.texinfo' file, or any other file
296 indirectly affecting the aspect of the manual. The spurious
297 call might also be the consequence of using a buggy \`make' (AIX,
298 DU, IRIX). You might want to install the \`Texinfo' package or
299 the \`GNU make' package. Grab either from any GNU archive site."
300 # The file to touch is that specified with -o ...
301 file=`echo "$*" | sed -n "$sed_output"`
302 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
303 if test -z "$file"; then
304 # ... or it is the one specified with @setfilename ...
305 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
306 file=`sed -n '
307 /^@setfilename/{
308 s/.* \([^ ]*\) *$/\1/
309 p
310 q
311 }' $infile`
312 # ... or it is derived from the source name (dir/f.texi becomes f.info)
313 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
314 fi
315 # If the file does not exist, the user really needs makeinfo;
316 # let's fail without touching anything.
317 test -f $file || exit 1
318 touch $file
319 ;;
320
321 tar*)
322 shift
323
324 # We have already tried tar in the generic part.
325 # Look for gnutar/gtar before invocation to avoid ugly error
326 # messages.
327 if (gnutar --version > /dev/null 2>&1); then
328 gnutar "$@" && exit 0
329 fi
330 if (gtar --version > /dev/null 2>&1); then
331 gtar "$@" && exit 0
332 fi
333 firstarg="$1"
334 if shift; then
335 case $firstarg in
336 *o*)
337 firstarg=`echo "$firstarg" | sed s/o//`
338 tar "$firstarg" "$@" && exit 0
339 ;;
340 esac
341 case $firstarg in
342 *h*)
343 firstarg=`echo "$firstarg" | sed s/h//`
344 tar "$firstarg" "$@" && exit 0
345 ;;
346 esac
347 fi
348
349 echo 1>&2 "\
350WARNING: I can't seem to be able to run \`tar' with the given arguments.
351 You may want to install GNU tar or Free paxutils, or check the
352 command line arguments."
353 exit 1
354 ;;
355
356 *)
357 echo 1>&2 "\
358WARNING: \`$1' is needed, and is $msg.
359 You might have modified some files without having the
360 proper tools for further handling them. Check the \`README' file,
361 it often tells you about the needed prerequisites for installing
362 this package. You may also peek at any GNU archive site, in case
363 some other package would contain this missing \`$1' program."
364 exit 1
365 ;;
366esac
367
368exit 0
369
370# Local variables:
371# eval: (add-hook 'write-file-hooks 'time-stamp)
372# time-stamp-start: "scriptversion="
373# time-stamp-format: "%:y-%02m-%02d.%02H"
374# time-stamp-time-zone: "UTC"
375# time-stamp-end: "; # UTC"
376# End:
diff --git a/libraries/eet/sha1-for-source.txt b/libraries/eet/sha1-for-source.txt
new file mode 100644
index 0000000..c9ecae4
--- /dev/null
+++ b/libraries/eet/sha1-for-source.txt
@@ -0,0 +1 @@
bbbb3fea6997bc0cb3a5a1ce4ad00d7419b5e935
diff --git a/libraries/eet/src/Makefile.am b/libraries/eet/src/Makefile.am
new file mode 100644
index 0000000..d98d3b6
--- /dev/null
+++ b/libraries/eet/src/Makefile.am
@@ -0,0 +1,3 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3SUBDIRS = lib bin tests examples
diff --git a/libraries/eet/src/Makefile.in b/libraries/eet/src/Makefile.in
new file mode 100644
index 0000000..0a28065
--- /dev/null
+++ b/libraries/eet/src/Makefile.in
@@ -0,0 +1,606 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
40 $(top_srcdir)/m4/ac_path_generic.m4 \
41 $(top_srcdir)/m4/efl_binary.m4 \
42 $(top_srcdir)/m4/efl_compiler_flag.m4 \
43 $(top_srcdir)/m4/efl_coverage.m4 \
44 $(top_srcdir)/m4/efl_doxygen.m4 \
45 $(top_srcdir)/m4/efl_fnmatch.m4 \
46 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
47 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
48 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
49 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
50am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
51 $(ACLOCAL_M4)
52mkinstalldirs = $(install_sh) -d
53CONFIG_HEADER = $(top_builddir)/config.h
54CONFIG_CLEAN_FILES =
55CONFIG_CLEAN_VPATH_FILES =
56AM_V_GEN = $(am__v_GEN_$(V))
57am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
58am__v_GEN_0 = @echo " GEN " $@;
59AM_V_at = $(am__v_at_$(V))
60am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
61am__v_at_0 = @
62SOURCES =
63DIST_SOURCES =
64RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
65 html-recursive info-recursive install-data-recursive \
66 install-dvi-recursive install-exec-recursive \
67 install-html-recursive install-info-recursive \
68 install-pdf-recursive install-ps-recursive install-recursive \
69 installcheck-recursive installdirs-recursive pdf-recursive \
70 ps-recursive uninstall-recursive
71RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
72 distclean-recursive maintainer-clean-recursive
73AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
74 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
75 distdir
76ETAGS = etags
77CTAGS = ctags
78DIST_SUBDIRS = $(SUBDIRS)
79DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
80am__relativize = \
81 dir0=`pwd`; \
82 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
83 sed_rest='s,^[^/]*/*,,'; \
84 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
85 sed_butlast='s,/*[^/]*$$,,'; \
86 while test -n "$$dir1"; do \
87 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
88 if test "$$first" != "."; then \
89 if test "$$first" = ".."; then \
90 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
91 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
92 else \
93 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
94 if test "$$first2" = "$$first"; then \
95 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
96 else \
97 dir2="../$$dir2"; \
98 fi; \
99 dir0="$$dir0"/"$$first"; \
100 fi; \
101 fi; \
102 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
103 done; \
104 reldir="$$dir2"
105ACLOCAL = @ACLOCAL@
106ALLOCA = @ALLOCA@
107AMTAR = @AMTAR@
108AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
109AR = @AR@
110AS = @AS@
111AUTOCONF = @AUTOCONF@
112AUTOHEADER = @AUTOHEADER@
113AUTOMAKE = @AUTOMAKE@
114AWK = @AWK@
115CC = @CC@
116CCDEPMODE = @CCDEPMODE@
117CFLAGS = @CFLAGS@
118CHECK_CFLAGS = @CHECK_CFLAGS@
119CHECK_LIBS = @CHECK_LIBS@
120CPP = @CPP@
121CPPFLAGS = @CPPFLAGS@
122CYGPATH_W = @CYGPATH_W@
123DEBUG_CFLAGS = @DEBUG_CFLAGS@
124DEFS = @DEFS@
125DEPDIR = @DEPDIR@
126DLLTOOL = @DLLTOOL@
127DSYMUTIL = @DSYMUTIL@
128DUMPBIN = @DUMPBIN@
129ECHO_C = @ECHO_C@
130ECHO_N = @ECHO_N@
131ECHO_T = @ECHO_T@
132EET_CFLAGS = @EET_CFLAGS@
133EET_CPPFLAGS = @EET_CPPFLAGS@
134EET_LIBS = @EET_LIBS@
135EET_PRG = @EET_PRG@
136EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
137EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
138EFL_EET_BUILD = @EFL_EET_BUILD@
139EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
140EGREP = @EGREP@
141EINA_CFLAGS = @EINA_CFLAGS@
142EINA_LIBS = @EINA_LIBS@
143EVIL_CFLAGS = @EVIL_CFLAGS@
144EVIL_LIBS = @EVIL_LIBS@
145EXEEXT = @EXEEXT@
146FGREP = @FGREP@
147GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
148GNUTLS_LIBS = @GNUTLS_LIBS@
149GREP = @GREP@
150INSTALL = @INSTALL@
151INSTALL_DATA = @INSTALL_DATA@
152INSTALL_PROGRAM = @INSTALL_PROGRAM@
153INSTALL_SCRIPT = @INSTALL_SCRIPT@
154INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
155LD = @LD@
156LDFLAGS = @LDFLAGS@
157LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
158LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
159LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
160LIBOBJS = @LIBOBJS@
161LIBS = @LIBS@
162LIBTOOL = @LIBTOOL@
163LIPO = @LIPO@
164LN_S = @LN_S@
165LTLIBOBJS = @LTLIBOBJS@
166MAKEINFO = @MAKEINFO@
167MKDIR_P = @MKDIR_P@
168NM = @NM@
169NMEDIT = @NMEDIT@
170OBJDUMP = @OBJDUMP@
171OBJEXT = @OBJEXT@
172OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
173OPENSSL_LIBS = @OPENSSL_LIBS@
174OTOOL = @OTOOL@
175OTOOL64 = @OTOOL64@
176PACKAGE = @PACKAGE@
177PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
178PACKAGE_NAME = @PACKAGE_NAME@
179PACKAGE_STRING = @PACKAGE_STRING@
180PACKAGE_TARNAME = @PACKAGE_TARNAME@
181PACKAGE_URL = @PACKAGE_URL@
182PACKAGE_VERSION = @PACKAGE_VERSION@
183PATH_SEPARATOR = @PATH_SEPARATOR@
184PKG_CONFIG = @PKG_CONFIG@
185PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
186PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
187RANLIB = @RANLIB@
188SED = @SED@
189SET_MAKE = @SET_MAKE@
190SHELL = @SHELL@
191STRIP = @STRIP@
192VERSION = @VERSION@
193VMAJ = @VMAJ@
194abs_builddir = @abs_builddir@
195abs_srcdir = @abs_srcdir@
196abs_top_builddir = @abs_top_builddir@
197abs_top_srcdir = @abs_top_srcdir@
198ac_ct_CC = @ac_ct_CC@
199ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
200am__include = @am__include@
201am__leading_dot = @am__leading_dot@
202am__quote = @am__quote@
203am__tar = @am__tar@
204am__untar = @am__untar@
205bindir = @bindir@
206build = @build@
207build_alias = @build_alias@
208build_cpu = @build_cpu@
209build_os = @build_os@
210build_vendor = @build_vendor@
211builddir = @builddir@
212datadir = @datadir@
213datarootdir = @datarootdir@
214docdir = @docdir@
215dvidir = @dvidir@
216efl_doxygen = @efl_doxygen@
217efl_have_doxygen = @efl_have_doxygen@
218exec_prefix = @exec_prefix@
219have_lcov = @have_lcov@
220host = @host@
221host_alias = @host_alias@
222host_cpu = @host_cpu@
223host_os = @host_os@
224host_vendor = @host_vendor@
225htmldir = @htmldir@
226includedir = @includedir@
227infodir = @infodir@
228install_sh = @install_sh@
229libdir = @libdir@
230libexecdir = @libexecdir@
231localedir = @localedir@
232localstatedir = @localstatedir@
233lt_ECHO = @lt_ECHO@
234lt_enable_auto_import = @lt_enable_auto_import@
235mandir = @mandir@
236mkdir_p = @mkdir_p@
237oldincludedir = @oldincludedir@
238pdfdir = @pdfdir@
239pkgconfig_requires_private = @pkgconfig_requires_private@
240prefix = @prefix@
241program_transform_name = @program_transform_name@
242psdir = @psdir@
243release_info = @release_info@
244requirement_eet = @requirement_eet@
245sbindir = @sbindir@
246sharedstatedir = @sharedstatedir@
247srcdir = @srcdir@
248sysconfdir = @sysconfdir@
249target_alias = @target_alias@
250top_build_prefix = @top_build_prefix@
251top_builddir = @top_builddir@
252top_srcdir = @top_srcdir@
253version_info = @version_info@
254MAINTAINERCLEANFILES = Makefile.in
255SUBDIRS = lib bin tests examples
256all: all-recursive
257
258.SUFFIXES:
259$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
260 @for dep in $?; do \
261 case '$(am__configure_deps)' in \
262 *$$dep*) \
263 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
264 && { if test -f $@; then exit 0; else break; fi; }; \
265 exit 1;; \
266 esac; \
267 done; \
268 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
269 $(am__cd) $(top_srcdir) && \
270 $(AUTOMAKE) --gnu src/Makefile
271.PRECIOUS: Makefile
272Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
273 @case '$?' in \
274 *config.status*) \
275 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
276 *) \
277 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
278 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
279 esac;
280
281$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
282 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
283
284$(top_srcdir)/configure: $(am__configure_deps)
285 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
286$(ACLOCAL_M4): $(am__aclocal_m4_deps)
287 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
288$(am__aclocal_m4_deps):
289
290mostlyclean-libtool:
291 -rm -f *.lo
292
293clean-libtool:
294 -rm -rf .libs _libs
295
296# This directory's subdirectories are mostly independent; you can cd
297# into them and run `make' without going through this Makefile.
298# To change the values of `make' variables: instead of editing Makefiles,
299# (1) if the variable is set in `config.status', edit `config.status'
300# (which will cause the Makefiles to be regenerated when you run `make');
301# (2) otherwise, pass the desired values on the `make' command line.
302$(RECURSIVE_TARGETS):
303 @fail= failcom='exit 1'; \
304 for f in x $$MAKEFLAGS; do \
305 case $$f in \
306 *=* | --[!k]*);; \
307 *k*) failcom='fail=yes';; \
308 esac; \
309 done; \
310 dot_seen=no; \
311 target=`echo $@ | sed s/-recursive//`; \
312 list='$(SUBDIRS)'; for subdir in $$list; do \
313 echo "Making $$target in $$subdir"; \
314 if test "$$subdir" = "."; then \
315 dot_seen=yes; \
316 local_target="$$target-am"; \
317 else \
318 local_target="$$target"; \
319 fi; \
320 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
321 || eval $$failcom; \
322 done; \
323 if test "$$dot_seen" = "no"; then \
324 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
325 fi; test -z "$$fail"
326
327$(RECURSIVE_CLEAN_TARGETS):
328 @fail= failcom='exit 1'; \
329 for f in x $$MAKEFLAGS; do \
330 case $$f in \
331 *=* | --[!k]*);; \
332 *k*) failcom='fail=yes';; \
333 esac; \
334 done; \
335 dot_seen=no; \
336 case "$@" in \
337 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
338 *) list='$(SUBDIRS)' ;; \
339 esac; \
340 rev=''; for subdir in $$list; do \
341 if test "$$subdir" = "."; then :; else \
342 rev="$$subdir $$rev"; \
343 fi; \
344 done; \
345 rev="$$rev ."; \
346 target=`echo $@ | sed s/-recursive//`; \
347 for subdir in $$rev; do \
348 echo "Making $$target in $$subdir"; \
349 if test "$$subdir" = "."; then \
350 local_target="$$target-am"; \
351 else \
352 local_target="$$target"; \
353 fi; \
354 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
355 || eval $$failcom; \
356 done && test -z "$$fail"
357tags-recursive:
358 list='$(SUBDIRS)'; for subdir in $$list; do \
359 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
360 done
361ctags-recursive:
362 list='$(SUBDIRS)'; for subdir in $$list; do \
363 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
364 done
365
366ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
367 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
368 unique=`for i in $$list; do \
369 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
370 done | \
371 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
372 END { if (nonempty) { for (i in files) print i; }; }'`; \
373 mkid -fID $$unique
374tags: TAGS
375
376TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
377 $(TAGS_FILES) $(LISP)
378 set x; \
379 here=`pwd`; \
380 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
381 include_option=--etags-include; \
382 empty_fix=.; \
383 else \
384 include_option=--include; \
385 empty_fix=; \
386 fi; \
387 list='$(SUBDIRS)'; for subdir in $$list; do \
388 if test "$$subdir" = .; then :; else \
389 test ! -f $$subdir/TAGS || \
390 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
391 fi; \
392 done; \
393 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
394 unique=`for i in $$list; do \
395 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
396 done | \
397 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
398 END { if (nonempty) { for (i in files) print i; }; }'`; \
399 shift; \
400 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
401 test -n "$$unique" || unique=$$empty_fix; \
402 if test $$# -gt 0; then \
403 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
404 "$$@" $$unique; \
405 else \
406 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
407 $$unique; \
408 fi; \
409 fi
410ctags: CTAGS
411CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
412 $(TAGS_FILES) $(LISP)
413 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
414 unique=`for i in $$list; do \
415 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
416 done | \
417 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
418 END { if (nonempty) { for (i in files) print i; }; }'`; \
419 test -z "$(CTAGS_ARGS)$$unique" \
420 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
421 $$unique
422
423GTAGS:
424 here=`$(am__cd) $(top_builddir) && pwd` \
425 && $(am__cd) $(top_srcdir) \
426 && gtags -i $(GTAGS_ARGS) "$$here"
427
428distclean-tags:
429 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
430
431distdir: $(DISTFILES)
432 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
433 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
434 list='$(DISTFILES)'; \
435 dist_files=`for file in $$list; do echo $$file; done | \
436 sed -e "s|^$$srcdirstrip/||;t" \
437 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
438 case $$dist_files in \
439 */*) $(MKDIR_P) `echo "$$dist_files" | \
440 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
441 sort -u` ;; \
442 esac; \
443 for file in $$dist_files; do \
444 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
445 if test -d $$d/$$file; then \
446 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
447 if test -d "$(distdir)/$$file"; then \
448 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
449 fi; \
450 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
451 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
452 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
453 fi; \
454 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
455 else \
456 test -f "$(distdir)/$$file" \
457 || cp -p $$d/$$file "$(distdir)/$$file" \
458 || exit 1; \
459 fi; \
460 done
461 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
462 if test "$$subdir" = .; then :; else \
463 test -d "$(distdir)/$$subdir" \
464 || $(MKDIR_P) "$(distdir)/$$subdir" \
465 || exit 1; \
466 fi; \
467 done
468 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
469 if test "$$subdir" = .; then :; else \
470 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
471 $(am__relativize); \
472 new_distdir=$$reldir; \
473 dir1=$$subdir; dir2="$(top_distdir)"; \
474 $(am__relativize); \
475 new_top_distdir=$$reldir; \
476 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
477 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
478 ($(am__cd) $$subdir && \
479 $(MAKE) $(AM_MAKEFLAGS) \
480 top_distdir="$$new_top_distdir" \
481 distdir="$$new_distdir" \
482 am__remove_distdir=: \
483 am__skip_length_check=: \
484 am__skip_mode_fix=: \
485 distdir) \
486 || exit 1; \
487 fi; \
488 done
489check-am: all-am
490check: check-recursive
491all-am: Makefile
492installdirs: installdirs-recursive
493installdirs-am:
494install: install-recursive
495install-exec: install-exec-recursive
496install-data: install-data-recursive
497uninstall: uninstall-recursive
498
499install-am: all-am
500 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
501
502installcheck: installcheck-recursive
503install-strip:
504 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
505 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
506 `test -z '$(STRIP)' || \
507 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
508mostlyclean-generic:
509
510clean-generic:
511
512distclean-generic:
513 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
514 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
515
516maintainer-clean-generic:
517 @echo "This command is intended for maintainers to use"
518 @echo "it deletes files that may require special tools to rebuild."
519 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
520clean: clean-recursive
521
522clean-am: clean-generic clean-libtool mostlyclean-am
523
524distclean: distclean-recursive
525 -rm -f Makefile
526distclean-am: clean-am distclean-generic distclean-tags
527
528dvi: dvi-recursive
529
530dvi-am:
531
532html: html-recursive
533
534html-am:
535
536info: info-recursive
537
538info-am:
539
540install-data-am:
541
542install-dvi: install-dvi-recursive
543
544install-dvi-am:
545
546install-exec-am:
547
548install-html: install-html-recursive
549
550install-html-am:
551
552install-info: install-info-recursive
553
554install-info-am:
555
556install-man:
557
558install-pdf: install-pdf-recursive
559
560install-pdf-am:
561
562install-ps: install-ps-recursive
563
564install-ps-am:
565
566installcheck-am:
567
568maintainer-clean: maintainer-clean-recursive
569 -rm -f Makefile
570maintainer-clean-am: distclean-am maintainer-clean-generic
571
572mostlyclean: mostlyclean-recursive
573
574mostlyclean-am: mostlyclean-generic mostlyclean-libtool
575
576pdf: pdf-recursive
577
578pdf-am:
579
580ps: ps-recursive
581
582ps-am:
583
584uninstall-am:
585
586.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
587 install-am install-strip tags-recursive
588
589.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
590 all all-am check check-am clean clean-generic clean-libtool \
591 ctags ctags-recursive distclean distclean-generic \
592 distclean-libtool distclean-tags distdir dvi dvi-am html \
593 html-am info info-am install install-am install-data \
594 install-data-am install-dvi install-dvi-am install-exec \
595 install-exec-am install-html install-html-am install-info \
596 install-info-am install-man install-pdf install-pdf-am \
597 install-ps install-ps-am install-strip installcheck \
598 installcheck-am installdirs installdirs-am maintainer-clean \
599 maintainer-clean-generic mostlyclean mostlyclean-generic \
600 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
601 uninstall uninstall-am
602
603
604# Tell versions [3.59,3.63) of GNU make to not export all variables.
605# Otherwise a system limit (for SysV at least) may be exceeded.
606.NOEXPORT:
diff --git a/libraries/eet/src/bin/Makefile.am b/libraries/eet/src/bin/Makefile.am
new file mode 100644
index 0000000..ba7d67e
--- /dev/null
+++ b/libraries/eet/src/bin/Makefile.am
@@ -0,0 +1,21 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I$(top_srcdir) \
6-I$(top_srcdir)/bin \
7-I$(top_srcdir)/src/lib \
8-DPACKAGE_BIN_DIR=\"$(bindir)\" \
9-DPACKAGE_LIB_DIR=\"$(libdir)\" \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11@EET_CPPFLAGS@ \
12@EINA_CFLAGS@ \
13@EVIL_CFLAGS@
14
15bin_PROGRAMS = @EET_PRG@
16EXTRA_PROGRAMS = eet
17
18eet_SOURCES = eet_main.c
19eet_CFLAGS = @EET_CFLAGS@
20eet_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @EVIL_LIBS@
21eet_LDFLAGS = @lt_enable_auto_import@
diff --git a/libraries/eet/src/bin/Makefile.in b/libraries/eet/src/bin/Makefile.in
new file mode 100644
index 0000000..9273fac
--- /dev/null
+++ b/libraries/eet/src/bin/Makefile.in
@@ -0,0 +1,605 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37EXTRA_PROGRAMS = eet$(EXEEXT)
38subdir = src/bin
39DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
42 $(top_srcdir)/m4/ac_path_generic.m4 \
43 $(top_srcdir)/m4/efl_binary.m4 \
44 $(top_srcdir)/m4/efl_compiler_flag.m4 \
45 $(top_srcdir)/m4/efl_coverage.m4 \
46 $(top_srcdir)/m4/efl_doxygen.m4 \
47 $(top_srcdir)/m4/efl_fnmatch.m4 \
48 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
49 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
50 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
51 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58am__installdirs = "$(DESTDIR)$(bindir)"
59PROGRAMS = $(bin_PROGRAMS)
60am_eet_OBJECTS = eet-eet_main.$(OBJEXT)
61eet_OBJECTS = $(am_eet_OBJECTS)
62eet_DEPENDENCIES = $(top_builddir)/src/lib/libeet.la
63AM_V_lt = $(am__v_lt_$(V))
64am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
65am__v_lt_0 = --silent
66eet_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
67 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(eet_CFLAGS) $(CFLAGS) \
68 $(eet_LDFLAGS) $(LDFLAGS) -o $@
69DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
70depcomp = $(SHELL) $(top_srcdir)/depcomp
71am__depfiles_maybe = depfiles
72am__mv = mv -f
73COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
74 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
75LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
76 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
77 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
78 $(AM_CFLAGS) $(CFLAGS)
79AM_V_CC = $(am__v_CC_$(V))
80am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
81am__v_CC_0 = @echo " CC " $@;
82AM_V_at = $(am__v_at_$(V))
83am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
84am__v_at_0 = @
85CCLD = $(CC)
86LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
87 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
88 $(AM_LDFLAGS) $(LDFLAGS) -o $@
89AM_V_CCLD = $(am__v_CCLD_$(V))
90am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
91am__v_CCLD_0 = @echo " CCLD " $@;
92AM_V_GEN = $(am__v_GEN_$(V))
93am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
94am__v_GEN_0 = @echo " GEN " $@;
95SOURCES = $(eet_SOURCES)
96DIST_SOURCES = $(eet_SOURCES)
97ETAGS = etags
98CTAGS = ctags
99DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
100ACLOCAL = @ACLOCAL@
101ALLOCA = @ALLOCA@
102AMTAR = @AMTAR@
103AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
104AR = @AR@
105AS = @AS@
106AUTOCONF = @AUTOCONF@
107AUTOHEADER = @AUTOHEADER@
108AUTOMAKE = @AUTOMAKE@
109AWK = @AWK@
110CC = @CC@
111CCDEPMODE = @CCDEPMODE@
112CFLAGS = @CFLAGS@
113CHECK_CFLAGS = @CHECK_CFLAGS@
114CHECK_LIBS = @CHECK_LIBS@
115CPP = @CPP@
116CPPFLAGS = @CPPFLAGS@
117CYGPATH_W = @CYGPATH_W@
118DEBUG_CFLAGS = @DEBUG_CFLAGS@
119DEFS = @DEFS@
120DEPDIR = @DEPDIR@
121DLLTOOL = @DLLTOOL@
122DSYMUTIL = @DSYMUTIL@
123DUMPBIN = @DUMPBIN@
124ECHO_C = @ECHO_C@
125ECHO_N = @ECHO_N@
126ECHO_T = @ECHO_T@
127EET_CFLAGS = @EET_CFLAGS@
128EET_CPPFLAGS = @EET_CPPFLAGS@
129EET_LIBS = @EET_LIBS@
130EET_PRG = @EET_PRG@
131EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
132EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
133EFL_EET_BUILD = @EFL_EET_BUILD@
134EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
135EGREP = @EGREP@
136EINA_CFLAGS = @EINA_CFLAGS@
137EINA_LIBS = @EINA_LIBS@
138EVIL_CFLAGS = @EVIL_CFLAGS@
139EVIL_LIBS = @EVIL_LIBS@
140EXEEXT = @EXEEXT@
141FGREP = @FGREP@
142GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
143GNUTLS_LIBS = @GNUTLS_LIBS@
144GREP = @GREP@
145INSTALL = @INSTALL@
146INSTALL_DATA = @INSTALL_DATA@
147INSTALL_PROGRAM = @INSTALL_PROGRAM@
148INSTALL_SCRIPT = @INSTALL_SCRIPT@
149INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
150LD = @LD@
151LDFLAGS = @LDFLAGS@
152LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
153LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
154LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
155LIBOBJS = @LIBOBJS@
156LIBS = @LIBS@
157LIBTOOL = @LIBTOOL@
158LIPO = @LIPO@
159LN_S = @LN_S@
160LTLIBOBJS = @LTLIBOBJS@
161MAKEINFO = @MAKEINFO@
162MKDIR_P = @MKDIR_P@
163NM = @NM@
164NMEDIT = @NMEDIT@
165OBJDUMP = @OBJDUMP@
166OBJEXT = @OBJEXT@
167OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
168OPENSSL_LIBS = @OPENSSL_LIBS@
169OTOOL = @OTOOL@
170OTOOL64 = @OTOOL64@
171PACKAGE = @PACKAGE@
172PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
173PACKAGE_NAME = @PACKAGE_NAME@
174PACKAGE_STRING = @PACKAGE_STRING@
175PACKAGE_TARNAME = @PACKAGE_TARNAME@
176PACKAGE_URL = @PACKAGE_URL@
177PACKAGE_VERSION = @PACKAGE_VERSION@
178PATH_SEPARATOR = @PATH_SEPARATOR@
179PKG_CONFIG = @PKG_CONFIG@
180PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
181PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
182RANLIB = @RANLIB@
183SED = @SED@
184SET_MAKE = @SET_MAKE@
185SHELL = @SHELL@
186STRIP = @STRIP@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189abs_builddir = @abs_builddir@
190abs_srcdir = @abs_srcdir@
191abs_top_builddir = @abs_top_builddir@
192abs_top_srcdir = @abs_top_srcdir@
193ac_ct_CC = @ac_ct_CC@
194ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
195am__include = @am__include@
196am__leading_dot = @am__leading_dot@
197am__quote = @am__quote@
198am__tar = @am__tar@
199am__untar = @am__untar@
200bindir = @bindir@
201build = @build@
202build_alias = @build_alias@
203build_cpu = @build_cpu@
204build_os = @build_os@
205build_vendor = @build_vendor@
206builddir = @builddir@
207datadir = @datadir@
208datarootdir = @datarootdir@
209docdir = @docdir@
210dvidir = @dvidir@
211efl_doxygen = @efl_doxygen@
212efl_have_doxygen = @efl_have_doxygen@
213exec_prefix = @exec_prefix@
214have_lcov = @have_lcov@
215host = @host@
216host_alias = @host_alias@
217host_cpu = @host_cpu@
218host_os = @host_os@
219host_vendor = @host_vendor@
220htmldir = @htmldir@
221includedir = @includedir@
222infodir = @infodir@
223install_sh = @install_sh@
224libdir = @libdir@
225libexecdir = @libexecdir@
226localedir = @localedir@
227localstatedir = @localstatedir@
228lt_ECHO = @lt_ECHO@
229lt_enable_auto_import = @lt_enable_auto_import@
230mandir = @mandir@
231mkdir_p = @mkdir_p@
232oldincludedir = @oldincludedir@
233pdfdir = @pdfdir@
234pkgconfig_requires_private = @pkgconfig_requires_private@
235prefix = @prefix@
236program_transform_name = @program_transform_name@
237psdir = @psdir@
238release_info = @release_info@
239requirement_eet = @requirement_eet@
240sbindir = @sbindir@
241sharedstatedir = @sharedstatedir@
242srcdir = @srcdir@
243sysconfdir = @sysconfdir@
244target_alias = @target_alias@
245top_build_prefix = @top_build_prefix@
246top_builddir = @top_builddir@
247top_srcdir = @top_srcdir@
248version_info = @version_info@
249MAINTAINERCLEANFILES = Makefile.in
250AM_CPPFLAGS = \
251-I$(top_srcdir) \
252-I$(top_srcdir)/bin \
253-I$(top_srcdir)/src/lib \
254-DPACKAGE_BIN_DIR=\"$(bindir)\" \
255-DPACKAGE_LIB_DIR=\"$(libdir)\" \
256-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
257@EET_CPPFLAGS@ \
258@EINA_CFLAGS@ \
259@EVIL_CFLAGS@
260
261bin_PROGRAMS = @EET_PRG@
262eet_SOURCES = eet_main.c
263eet_CFLAGS = @EET_CFLAGS@
264eet_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @EVIL_LIBS@
265eet_LDFLAGS = @lt_enable_auto_import@
266all: all-am
267
268.SUFFIXES:
269.SUFFIXES: .c .lo .o .obj
270$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
271 @for dep in $?; do \
272 case '$(am__configure_deps)' in \
273 *$$dep*) \
274 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
275 && { if test -f $@; then exit 0; else break; fi; }; \
276 exit 1;; \
277 esac; \
278 done; \
279 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/Makefile'; \
280 $(am__cd) $(top_srcdir) && \
281 $(AUTOMAKE) --gnu src/bin/Makefile
282.PRECIOUS: Makefile
283Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
284 @case '$?' in \
285 *config.status*) \
286 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
287 *) \
288 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
289 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
290 esac;
291
292$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
293 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
294
295$(top_srcdir)/configure: $(am__configure_deps)
296 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
297$(ACLOCAL_M4): $(am__aclocal_m4_deps)
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
299$(am__aclocal_m4_deps):
300install-binPROGRAMS: $(bin_PROGRAMS)
301 @$(NORMAL_INSTALL)
302 test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
303 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
304 for p in $$list; do echo "$$p $$p"; done | \
305 sed 's/$(EXEEXT)$$//' | \
306 while read p p1; do if test -f $$p || test -f $$p1; \
307 then echo "$$p"; echo "$$p"; else :; fi; \
308 done | \
309 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
310 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
311 sed 'N;N;N;s,\n, ,g' | \
312 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
313 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
314 if ($$2 == $$4) files[d] = files[d] " " $$1; \
315 else { print "f", $$3 "/" $$4, $$1; } } \
316 END { for (d in files) print "f", d, files[d] }' | \
317 while read type dir files; do \
318 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
319 test -z "$$files" || { \
320 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
321 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
322 } \
323 ; done
324
325uninstall-binPROGRAMS:
326 @$(NORMAL_UNINSTALL)
327 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
328 files=`for p in $$list; do echo "$$p"; done | \
329 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
330 -e 's/$$/$(EXEEXT)/' `; \
331 test -n "$$list" || exit 0; \
332 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
333 cd "$(DESTDIR)$(bindir)" && rm -f $$files
334
335clean-binPROGRAMS:
336 @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
337 echo " rm -f" $$list; \
338 rm -f $$list || exit $$?; \
339 test -n "$(EXEEXT)" || exit 0; \
340 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
341 echo " rm -f" $$list; \
342 rm -f $$list
343eet$(EXEEXT): $(eet_OBJECTS) $(eet_DEPENDENCIES)
344 @rm -f eet$(EXEEXT)
345 $(AM_V_CCLD)$(eet_LINK) $(eet_OBJECTS) $(eet_LDADD) $(LIBS)
346
347mostlyclean-compile:
348 -rm -f *.$(OBJEXT)
349
350distclean-compile:
351 -rm -f *.tab.c
352
353@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-eet_main.Po@am__quote@
354
355.c.o:
356@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
357@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
358@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
359@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
360@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
361@am__fastdepCC_FALSE@ $(COMPILE) -c $<
362
363.c.obj:
364@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
365@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
366@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
367@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
368@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
369@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
370
371.c.lo:
372@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
373@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
374@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
375@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
376@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
377@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
378
379eet-eet_main.o: eet_main.c
380@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -MT eet-eet_main.o -MD -MP -MF $(DEPDIR)/eet-eet_main.Tpo -c -o eet-eet_main.o `test -f 'eet_main.c' || echo '$(srcdir)/'`eet_main.c
381@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eet-eet_main.Tpo $(DEPDIR)/eet-eet_main.Po
382@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
383@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_main.c' object='eet-eet_main.o' libtool=no @AMDEPBACKSLASH@
384@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
385@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -c -o eet-eet_main.o `test -f 'eet_main.c' || echo '$(srcdir)/'`eet_main.c
386
387eet-eet_main.obj: eet_main.c
388@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -MT eet-eet_main.obj -MD -MP -MF $(DEPDIR)/eet-eet_main.Tpo -c -o eet-eet_main.obj `if test -f 'eet_main.c'; then $(CYGPATH_W) 'eet_main.c'; else $(CYGPATH_W) '$(srcdir)/eet_main.c'; fi`
389@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/eet-eet_main.Tpo $(DEPDIR)/eet-eet_main.Po
390@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
391@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_main.c' object='eet-eet_main.obj' libtool=no @AMDEPBACKSLASH@
392@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
393@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(eet_CFLAGS) $(CFLAGS) -c -o eet-eet_main.obj `if test -f 'eet_main.c'; then $(CYGPATH_W) 'eet_main.c'; else $(CYGPATH_W) '$(srcdir)/eet_main.c'; fi`
394
395mostlyclean-libtool:
396 -rm -f *.lo
397
398clean-libtool:
399 -rm -rf .libs _libs
400
401ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
402 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
403 unique=`for i in $$list; do \
404 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
405 done | \
406 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
407 END { if (nonempty) { for (i in files) print i; }; }'`; \
408 mkid -fID $$unique
409tags: TAGS
410
411TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
412 $(TAGS_FILES) $(LISP)
413 set x; \
414 here=`pwd`; \
415 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
416 unique=`for i in $$list; do \
417 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
418 done | \
419 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
420 END { if (nonempty) { for (i in files) print i; }; }'`; \
421 shift; \
422 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
423 test -n "$$unique" || unique=$$empty_fix; \
424 if test $$# -gt 0; then \
425 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
426 "$$@" $$unique; \
427 else \
428 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
429 $$unique; \
430 fi; \
431 fi
432ctags: CTAGS
433CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
434 $(TAGS_FILES) $(LISP)
435 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
436 unique=`for i in $$list; do \
437 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
438 done | \
439 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
440 END { if (nonempty) { for (i in files) print i; }; }'`; \
441 test -z "$(CTAGS_ARGS)$$unique" \
442 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
443 $$unique
444
445GTAGS:
446 here=`$(am__cd) $(top_builddir) && pwd` \
447 && $(am__cd) $(top_srcdir) \
448 && gtags -i $(GTAGS_ARGS) "$$here"
449
450distclean-tags:
451 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
452
453distdir: $(DISTFILES)
454 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
455 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
456 list='$(DISTFILES)'; \
457 dist_files=`for file in $$list; do echo $$file; done | \
458 sed -e "s|^$$srcdirstrip/||;t" \
459 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
460 case $$dist_files in \
461 */*) $(MKDIR_P) `echo "$$dist_files" | \
462 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
463 sort -u` ;; \
464 esac; \
465 for file in $$dist_files; do \
466 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
467 if test -d $$d/$$file; then \
468 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
469 if test -d "$(distdir)/$$file"; then \
470 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
471 fi; \
472 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
473 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
474 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
475 fi; \
476 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
477 else \
478 test -f "$(distdir)/$$file" \
479 || cp -p $$d/$$file "$(distdir)/$$file" \
480 || exit 1; \
481 fi; \
482 done
483check-am: all-am
484check: check-am
485all-am: Makefile $(PROGRAMS)
486installdirs:
487 for dir in "$(DESTDIR)$(bindir)"; do \
488 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
489 done
490install: install-am
491install-exec: install-exec-am
492install-data: install-data-am
493uninstall: uninstall-am
494
495install-am: all-am
496 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
497
498installcheck: installcheck-am
499install-strip:
500 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
501 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
502 `test -z '$(STRIP)' || \
503 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
504mostlyclean-generic:
505
506clean-generic:
507
508distclean-generic:
509 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
510 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
511
512maintainer-clean-generic:
513 @echo "This command is intended for maintainers to use"
514 @echo "it deletes files that may require special tools to rebuild."
515 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
516clean: clean-am
517
518clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
519
520distclean: distclean-am
521 -rm -rf ./$(DEPDIR)
522 -rm -f Makefile
523distclean-am: clean-am distclean-compile distclean-generic \
524 distclean-tags
525
526dvi: dvi-am
527
528dvi-am:
529
530html: html-am
531
532html-am:
533
534info: info-am
535
536info-am:
537
538install-data-am:
539
540install-dvi: install-dvi-am
541
542install-dvi-am:
543
544install-exec-am: install-binPROGRAMS
545
546install-html: install-html-am
547
548install-html-am:
549
550install-info: install-info-am
551
552install-info-am:
553
554install-man:
555
556install-pdf: install-pdf-am
557
558install-pdf-am:
559
560install-ps: install-ps-am
561
562install-ps-am:
563
564installcheck-am:
565
566maintainer-clean: maintainer-clean-am
567 -rm -rf ./$(DEPDIR)
568 -rm -f Makefile
569maintainer-clean-am: distclean-am maintainer-clean-generic
570
571mostlyclean: mostlyclean-am
572
573mostlyclean-am: mostlyclean-compile mostlyclean-generic \
574 mostlyclean-libtool
575
576pdf: pdf-am
577
578pdf-am:
579
580ps: ps-am
581
582ps-am:
583
584uninstall-am: uninstall-binPROGRAMS
585
586.MAKE: install-am install-strip
587
588.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
589 clean-generic clean-libtool ctags distclean distclean-compile \
590 distclean-generic distclean-libtool distclean-tags distdir dvi \
591 dvi-am html html-am info info-am install install-am \
592 install-binPROGRAMS install-data install-data-am install-dvi \
593 install-dvi-am install-exec install-exec-am install-html \
594 install-html-am install-info install-info-am install-man \
595 install-pdf install-pdf-am install-ps install-ps-am \
596 install-strip installcheck installcheck-am installdirs \
597 maintainer-clean maintainer-clean-generic mostlyclean \
598 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
599 pdf pdf-am ps ps-am tags uninstall uninstall-am \
600 uninstall-binPROGRAMS
601
602
603# Tell versions [3.59,3.63) of GNU make to not export all variables.
604# Otherwise a system limit (for SysV at least) may be exceeded.
605.NOEXPORT:
diff --git a/libraries/eet/src/bin/eet_main.c b/libraries/eet/src/bin/eet_main.c
new file mode 100644
index 0000000..7ab5555
--- /dev/null
+++ b/libraries/eet/src/bin/eet_main.c
@@ -0,0 +1,413 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <string.h>
8
9#ifdef HAVE_UNISTD_H
10# include <unistd.h>
11#endif /* ifdef HAVE_UNISTD_H */
12
13#ifdef HAVE_EVIL
14# include <Evil.h>
15#endif /* ifdef HAVE_EVIL */
16
17#include <Eet.h>
18
19static int _eet_main_log_dom = -1;
20
21#ifdef EET_DEFAULT_LOG_COLOR
22#undef EET_DEFAULT_LOG_COLOR
23#endif /* ifdef EET_DEFAULT_LOG_COLOR */
24#define EET_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
25#ifdef ERR
26#undef ERR
27#endif /* ifdef ERR */
28#define ERR(...) EINA_LOG_DOM_ERR(_eet_main_log_dom, __VA_ARGS__)
29#ifdef DBG
30#undef DBG
31#endif /* ifdef DBG */
32#define DBG(...) EINA_LOG_DOM_DBG(_eet_main_log_dom, __VA_ARGS__)
33#ifdef INF
34#undef INF
35#endif /* ifdef INF */
36#define INF(...) EINA_LOG_DOM_INFO(_eet_main_log_dom, __VA_ARGS__)
37#ifdef WRN
38#undef WRN
39#endif /* ifdef WRN */
40#define WRN(...) EINA_LOG_DOM_WARN(_eet_main_log_dom, __VA_ARGS__)
41#ifdef CRIT
42#undef CRIT
43#endif /* ifdef CRIT */
44#define CRIT(...) EINA_LOG_DOM_CRIT(_eet_main_log_dom, __VA_ARGS__)
45
46static void
47do_eet_list(const char *file)
48{
49 int i, num;
50 char **list;
51 Eet_File *ef;
52
53 ef = eet_open(file, EET_FILE_MODE_READ);
54 if (!ef)
55 {
56 ERR("cannot open for reading: %s", file);
57 exit(-1);
58 }
59
60 list = eet_list(ef, "*", &num);
61 if (list)
62 {
63 for (i = 0; i < num; i++)
64 printf("%s\n", list[i]);
65 free(list);
66 }
67
68 eet_close(ef);
69} /* do_eet_list */
70
71static void
72do_eet_extract(const char *file,
73 const char *key,
74 const char *out,
75 const char *crypto_key)
76{
77 Eet_File *ef;
78 void *data;
79 int size = 0;
80 FILE *f;
81
82 ef = eet_open(file, EET_FILE_MODE_READ);
83 if (!ef)
84 {
85 ERR("cannot open for reading: %s", file);
86 exit(-1);
87 }
88
89 data = eet_read_cipher(ef, key, &size, crypto_key);
90 if (!data)
91 {
92 ERR("cannot read key %s", key);
93 exit(-1);
94 }
95
96 f = fopen(out, "wb");
97 if (!f)
98 {
99 ERR("cannot open %s", out);
100 exit(-1);
101 }
102
103 if (fwrite(data, size, 1, f) != 1)
104 {
105 ERR("cannot write to %s", out);
106 exit(-1);
107 }
108
109 fclose(f);
110 free(data);
111 eet_close(ef);
112} /* do_eet_extract */
113
114static void
115do_eet_decode_dump(void *data,
116 const char *str)
117{
118 fputs(str, (FILE *)data);
119} /* do_eet_decode_dump */
120
121static void
122do_eet_decode(const char *file,
123 const char *key,
124 const char *out,
125 const char *crypto_key)
126{
127 Eet_File *ef;
128 FILE *f;
129
130 ef = eet_open(file, EET_FILE_MODE_READ);
131 if (!ef)
132 {
133 ERR("cannot open for reading: %s", file);
134 exit(-1);
135 }
136
137 f = fopen(out, "wb");
138 if (!f)
139 {
140 ERR("cannot open %s", out);
141 exit(-1);
142 }
143
144 if (!eet_data_dump_cipher(ef, key, crypto_key, do_eet_decode_dump, f))
145 {
146 ERR("cannot write to %s", out);
147 exit(-1);
148 }
149
150 fclose(f);
151 eet_close(ef);
152} /* do_eet_decode */
153
154static void
155do_eet_insert(const char *file,
156 const char *key,
157 const char *out,
158 int compress,
159 const char *crypto_key)
160{
161 Eet_File *ef;
162 void *data;
163 int size = 0;
164 FILE *f;
165
166 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
167 if (!ef)
168 ef = eet_open(file, EET_FILE_MODE_WRITE);
169
170 if (!ef)
171 {
172 ERR("cannot open for read+write: %s", file);
173 exit(-1);
174 }
175
176 f = fopen(out, "rb");
177 if (!f)
178 {
179 ERR("cannot open %s", out);
180 exit(-1);
181 }
182
183 fseek(f, 0, SEEK_END);
184 size = ftell(f);
185 rewind(f);
186 data = malloc(size);
187 if (!data)
188 {
189 ERR("cannot allocate %i bytes", size);
190 exit(-1);
191 }
192
193 if (fread(data, size, 1, f) != 1)
194 {
195 ERR("cannot read file %s", out);
196 exit(-1);
197 }
198
199 fclose(f);
200 eet_write_cipher(ef, key, data, size, compress, crypto_key);
201 free(data);
202 eet_close(ef);
203} /* do_eet_insert */
204
205static void
206do_eet_encode(const char *file,
207 const char *key,
208 const char *out,
209 int compress,
210 const char *crypto_key)
211{
212 Eet_File *ef;
213 char *text;
214 int textlen = 0;
215 int size = 0;
216 FILE *f;
217
218 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
219 if (!ef)
220 ef = eet_open(file, EET_FILE_MODE_WRITE);
221
222 if (!ef)
223 {
224 ERR("cannot open for read+write: %s", file);
225 exit(-1);
226 }
227
228 f = fopen(out, "rb");
229 if (!f)
230 {
231 ERR("cannot open %s", out);
232 exit(-1);
233 }
234
235 fseek(f, 0, SEEK_END);
236 textlen = ftell(f);
237 rewind(f);
238 text = malloc(textlen);
239 if (!text)
240 {
241 ERR("cannot allocate %i bytes", size);
242 exit(-1);
243 }
244
245 if (fread(text, textlen, 1, f) != 1)
246 {
247 ERR("cannot read file %s", out);
248 exit(-1);
249 }
250
251 fclose(f);
252 if (!eet_data_undump_cipher(ef, key, crypto_key, text, textlen, compress))
253 {
254 ERR("cannot parse %s", out);
255 exit(-1);
256 }
257
258 free(text);
259 eet_close(ef);
260} /* do_eet_encode */
261
262static void
263do_eet_remove(const char *file,
264 const char *key)
265{
266 Eet_File *ef;
267
268 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
269 if (!ef)
270 {
271 ERR("cannot open for read+write: %s", file);
272 exit(-1);
273 }
274
275 eet_delete(ef, key);
276 eet_close(ef);
277} /* do_eet_remove */
278
279static void
280do_eet_check(const char *file)
281{
282 Eet_File *ef;
283 const void *der;
284 int der_length;
285 int sign_length;
286
287 ef = eet_open(file, EET_FILE_MODE_READ);
288 if (!ef)
289 {
290 ERR("checking signature of `%s` failed", file);
291 exit(-1);
292 }
293
294 der = eet_identity_x509(ef, &der_length);
295
296 fprintf(stdout, "Certificate length %i.\n", der_length);
297 eet_identity_certificate_print(der, der_length, stdout);
298
299 eet_identity_signature(ef, &sign_length);
300 fprintf(stdout, "Signature length %i.\n", sign_length);
301
302 eet_close(ef);
303} /* do_eet_check */
304
305static void
306do_eet_sign(const char *file,
307 const char *private_key,
308 const char *public_key)
309{
310 Eet_File *ef;
311 Eet_Key *key;
312
313 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
314 if (!ef)
315 {
316 ERR("cannot open for read+write: %s.", file);
317 exit(-1);
318 }
319
320 key = eet_identity_open(public_key, private_key, NULL);
321 if (!key)
322 {
323 ERR("cannot open key '%s:%s'.", public_key, private_key);
324 exit(-1);
325 }
326
327 fprintf(stdout, "Using the following key to sign `%s`.\n", file);
328 eet_identity_print(key, stdout);
329
330 eet_identity_set(ef, key);
331
332 eet_close(ef);
333} /* do_eet_sign */
334
335int
336main(int argc,
337 char **argv)
338{
339 if (!eet_init())
340 return -1;
341
342 _eet_main_log_dom = eina_log_domain_register("eet_main", EINA_COLOR_CYAN);
343 if(_eet_main_log_dom < -1)
344 {
345 EINA_LOG_ERR("Impossible to create a log domain for eet_main.");
346 eet_shutdown();
347 return -1;
348 }
349
350 if (argc < 2)
351 {
352help:
353 printf(
354 "Usage:\n"
355 " eet -l FILE.EET list all keys in FILE.EET\n"
356 " eet -x FILE.EET KEY OUT-FILE [CRYPTO_KEY] extract data stored in KEY in FILE.EET and write to OUT-FILE\n"
357 " eet -d FILE.EET KEY OUT-FILE [CRYPTO_KEY] extract and decode data stored in KEY in FILE.EET and write to OUT-FILE\n"
358 " eet -i FILE.EET KEY IN-FILE COMPRESS [CRYPTO_KEY] insert data to KEY in FILE.EET from IN-FILE and if COMPRESS is 1, compress it\n"
359 " eet -e FILE.EET KEY IN-FILE COMPRESS [CRYPTO_KEY] insert and encode to KEY in FILE.EET from IN-FILE and if COMPRESS is 1, compress it\n"
360 " eet -r FILE.EET KEY remove KEY in FILE.EET\n"
361 " eet -c FILE.EET report and check the signature information of an eet file\n"
362 " eet -s FILE.EET PRIVATE_KEY PUBLIC_KEY sign FILE.EET with PRIVATE_KEY and attach PUBLIC_KEY as it's certificate\n"
363 );
364 eet_shutdown();
365 return -1;
366 }
367
368 if ((!strncmp(argv[1], "-h", 2)))
369 goto help;
370 else if ((!strcmp(argv[1], "-l")) && (argc > 2))
371 do_eet_list(argv[2]);
372 else if ((!strcmp(argv[1], "-x")) && (argc > 4))
373 {
374 if (argc > 5)
375 do_eet_extract(argv[2], argv[3], argv[4], argv[5]);
376 else
377 do_eet_extract(argv[2], argv[3], argv[4], NULL);
378 }
379 else if ((!strcmp(argv[1], "-d")) && (argc > 4))
380 {
381 if (argc > 5)
382 do_eet_decode(argv[2], argv[3], argv[4], argv[5]);
383 else
384 do_eet_decode(argv[2], argv[3], argv[4], NULL);
385 }
386 else if ((!strcmp(argv[1], "-i")) && (argc > 5))
387 {
388 if (argc > 6)
389 do_eet_insert(argv[2], argv[3], argv[4], atoi(argv[5]), argv[6]);
390 else
391 do_eet_insert(argv[2], argv[3], argv[4], atoi(argv[5]), NULL);
392 }
393 else if ((!strcmp(argv[1], "-e")) && (argc > 5))
394 {
395 if (argc > 6)
396 do_eet_encode(argv[2], argv[3], argv[4], atoi(argv[5]), argv[6]);
397 else
398 do_eet_encode(argv[2], argv[3], argv[4], atoi(argv[5]), NULL);
399 }
400 else if ((!strcmp(argv[1], "-r")) && (argc > 3))
401 do_eet_remove(argv[2], argv[3]);
402 else if ((!strcmp(argv[1], "-c")) && (argc > 2))
403 do_eet_check(argv[2]);
404 else if ((!strcmp(argv[1], "-s")) && (argc > 4))
405 do_eet_sign(argv[2], argv[3], argv[4]);
406 else
407 goto help;
408
409 eina_log_domain_unregister(_eet_main_log_dom);
410 eet_shutdown();
411 return 0;
412} /* main */
413
diff --git a/libraries/eet/src/examples/Makefile.am b/libraries/eet/src/examples/Makefile.am
new file mode 100644
index 0000000..8279445
--- /dev/null
+++ b/libraries/eet/src/examples/Makefile.am
@@ -0,0 +1,50 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3pkglibdir = $(datadir)/$(PACKAGE)/examples
4
5if BUILD_EXAMPLES
6AM_CPPFLAGS = \
7-I. \
8-I$(top_srcdir)/src/lib \
9@EINA_CFLAGS@
10
11pkglib_PROGRAMS = eet_basic eet_file eet_data_simple eet_data_nested eet_data_file_descriptor_01 eet_data_file_descriptor_02 eet_data_cipher_decipher
12
13eet_basic_SOURCES = eet-basic.c
14eet_basic_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
15
16eet_file_SOURCES = eet-file.c
17eet_file_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
18
19eet_data_simple_SOURCES = eet-data-simple.c
20eet_data_simple_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
21
22eet_data_nested_SOURCES = eet-data-nested.c
23eet_data_nested_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
24
25eet_data_file_descriptor_01_SOURCES = eet-data-file_descriptor_01.c
26eet_data_file_descriptor_01_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
27
28eet_data_file_descriptor_02_SOURCES = eet-data-file_descriptor_02.c
29eet_data_file_descriptor_02_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
30
31eet_data_cipher_decipher_SOURCES = eet-data-cipher_decipher.c
32eet_data_cipher_decipher_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
33
34endif
35
36filesdir = $(datadir)/$(PACKAGE)/examples
37files_DATA =
38
39if INSTALL_EXAMPLES
40
41files_DATA += \
42eet-basic.c \
43eet-file.c \
44eet-data-simple.c \
45eet-data-nested.c \
46eet-data-file_descriptor_01.c \
47eet-data-file_descriptor_02.c \
48eet-data-cipher_decipher.c
49
50endif
diff --git a/libraries/eet/src/examples/Makefile.in b/libraries/eet/src/examples/Makefile.in
new file mode 100644
index 0000000..d24b728
--- /dev/null
+++ b/libraries/eet/src/examples/Makefile.in
@@ -0,0 +1,728 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37@BUILD_EXAMPLES_TRUE@pkglib_PROGRAMS = eet_basic$(EXEEXT) \
38@BUILD_EXAMPLES_TRUE@ eet_file$(EXEEXT) \
39@BUILD_EXAMPLES_TRUE@ eet_data_simple$(EXEEXT) \
40@BUILD_EXAMPLES_TRUE@ eet_data_nested$(EXEEXT) \
41@BUILD_EXAMPLES_TRUE@ eet_data_file_descriptor_01$(EXEEXT) \
42@BUILD_EXAMPLES_TRUE@ eet_data_file_descriptor_02$(EXEEXT) \
43@BUILD_EXAMPLES_TRUE@ eet_data_cipher_decipher$(EXEEXT)
44@INSTALL_EXAMPLES_TRUE@am__append_1 = \
45@INSTALL_EXAMPLES_TRUE@eet-basic.c \
46@INSTALL_EXAMPLES_TRUE@eet-file.c \
47@INSTALL_EXAMPLES_TRUE@eet-data-simple.c \
48@INSTALL_EXAMPLES_TRUE@eet-data-nested.c \
49@INSTALL_EXAMPLES_TRUE@eet-data-file_descriptor_01.c \
50@INSTALL_EXAMPLES_TRUE@eet-data-file_descriptor_02.c \
51@INSTALL_EXAMPLES_TRUE@eet-data-cipher_decipher.c
52
53subdir = src/examples
54DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
55ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
56am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
57 $(top_srcdir)/m4/ac_path_generic.m4 \
58 $(top_srcdir)/m4/efl_binary.m4 \
59 $(top_srcdir)/m4/efl_compiler_flag.m4 \
60 $(top_srcdir)/m4/efl_coverage.m4 \
61 $(top_srcdir)/m4/efl_doxygen.m4 \
62 $(top_srcdir)/m4/efl_fnmatch.m4 \
63 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
64 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
65 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
66 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
67am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
68 $(ACLOCAL_M4)
69mkinstalldirs = $(install_sh) -d
70CONFIG_HEADER = $(top_builddir)/config.h
71CONFIG_CLEAN_FILES =
72CONFIG_CLEAN_VPATH_FILES =
73am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"
74PROGRAMS = $(pkglib_PROGRAMS)
75am__eet_basic_SOURCES_DIST = eet-basic.c
76@BUILD_EXAMPLES_TRUE@am_eet_basic_OBJECTS = eet-basic.$(OBJEXT)
77eet_basic_OBJECTS = $(am_eet_basic_OBJECTS)
78@BUILD_EXAMPLES_TRUE@eet_basic_DEPENDENCIES = \
79@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libeet.la
80AM_V_lt = $(am__v_lt_$(V))
81am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
82am__v_lt_0 = --silent
83am__eet_data_cipher_decipher_SOURCES_DIST = \
84 eet-data-cipher_decipher.c
85@BUILD_EXAMPLES_TRUE@am_eet_data_cipher_decipher_OBJECTS = \
86@BUILD_EXAMPLES_TRUE@ eet-data-cipher_decipher.$(OBJEXT)
87eet_data_cipher_decipher_OBJECTS = \
88 $(am_eet_data_cipher_decipher_OBJECTS)
89@BUILD_EXAMPLES_TRUE@eet_data_cipher_decipher_DEPENDENCIES = \
90@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libeet.la
91am__eet_data_file_descriptor_01_SOURCES_DIST = \
92 eet-data-file_descriptor_01.c
93@BUILD_EXAMPLES_TRUE@am_eet_data_file_descriptor_01_OBJECTS = \
94@BUILD_EXAMPLES_TRUE@ eet-data-file_descriptor_01.$(OBJEXT)
95eet_data_file_descriptor_01_OBJECTS = \
96 $(am_eet_data_file_descriptor_01_OBJECTS)
97@BUILD_EXAMPLES_TRUE@eet_data_file_descriptor_01_DEPENDENCIES = \
98@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libeet.la
99am__eet_data_file_descriptor_02_SOURCES_DIST = \
100 eet-data-file_descriptor_02.c
101@BUILD_EXAMPLES_TRUE@am_eet_data_file_descriptor_02_OBJECTS = \
102@BUILD_EXAMPLES_TRUE@ eet-data-file_descriptor_02.$(OBJEXT)
103eet_data_file_descriptor_02_OBJECTS = \
104 $(am_eet_data_file_descriptor_02_OBJECTS)
105@BUILD_EXAMPLES_TRUE@eet_data_file_descriptor_02_DEPENDENCIES = \
106@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libeet.la
107am__eet_data_nested_SOURCES_DIST = eet-data-nested.c
108@BUILD_EXAMPLES_TRUE@am_eet_data_nested_OBJECTS = \
109@BUILD_EXAMPLES_TRUE@ eet-data-nested.$(OBJEXT)
110eet_data_nested_OBJECTS = $(am_eet_data_nested_OBJECTS)
111@BUILD_EXAMPLES_TRUE@eet_data_nested_DEPENDENCIES = \
112@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libeet.la
113am__eet_data_simple_SOURCES_DIST = eet-data-simple.c
114@BUILD_EXAMPLES_TRUE@am_eet_data_simple_OBJECTS = \
115@BUILD_EXAMPLES_TRUE@ eet-data-simple.$(OBJEXT)
116eet_data_simple_OBJECTS = $(am_eet_data_simple_OBJECTS)
117@BUILD_EXAMPLES_TRUE@eet_data_simple_DEPENDENCIES = \
118@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libeet.la
119am__eet_file_SOURCES_DIST = eet-file.c
120@BUILD_EXAMPLES_TRUE@am_eet_file_OBJECTS = eet-file.$(OBJEXT)
121eet_file_OBJECTS = $(am_eet_file_OBJECTS)
122@BUILD_EXAMPLES_TRUE@eet_file_DEPENDENCIES = \
123@BUILD_EXAMPLES_TRUE@ $(top_builddir)/src/lib/libeet.la
124DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
125depcomp = $(SHELL) $(top_srcdir)/depcomp
126am__depfiles_maybe = depfiles
127am__mv = mv -f
128COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
129 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
130LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
131 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
132 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
133 $(AM_CFLAGS) $(CFLAGS)
134AM_V_CC = $(am__v_CC_$(V))
135am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
136am__v_CC_0 = @echo " CC " $@;
137AM_V_at = $(am__v_at_$(V))
138am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
139am__v_at_0 = @
140CCLD = $(CC)
141LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
142 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
143 $(AM_LDFLAGS) $(LDFLAGS) -o $@
144AM_V_CCLD = $(am__v_CCLD_$(V))
145am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
146am__v_CCLD_0 = @echo " CCLD " $@;
147AM_V_GEN = $(am__v_GEN_$(V))
148am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
149am__v_GEN_0 = @echo " GEN " $@;
150SOURCES = $(eet_basic_SOURCES) $(eet_data_cipher_decipher_SOURCES) \
151 $(eet_data_file_descriptor_01_SOURCES) \
152 $(eet_data_file_descriptor_02_SOURCES) \
153 $(eet_data_nested_SOURCES) $(eet_data_simple_SOURCES) \
154 $(eet_file_SOURCES)
155DIST_SOURCES = $(am__eet_basic_SOURCES_DIST) \
156 $(am__eet_data_cipher_decipher_SOURCES_DIST) \
157 $(am__eet_data_file_descriptor_01_SOURCES_DIST) \
158 $(am__eet_data_file_descriptor_02_SOURCES_DIST) \
159 $(am__eet_data_nested_SOURCES_DIST) \
160 $(am__eet_data_simple_SOURCES_DIST) \
161 $(am__eet_file_SOURCES_DIST)
162am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
163am__vpath_adj = case $$p in \
164 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
165 *) f=$$p;; \
166 esac;
167am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
168am__install_max = 40
169am__nobase_strip_setup = \
170 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
171am__nobase_strip = \
172 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
173am__nobase_list = $(am__nobase_strip_setup); \
174 for p in $$list; do echo "$$p $$p"; done | \
175 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
176 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
177 if (++n[$$2] == $(am__install_max)) \
178 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
179 END { for (dir in files) print dir, files[dir] }'
180am__base_list = \
181 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
182 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
183DATA = $(files_DATA)
184ETAGS = etags
185CTAGS = ctags
186DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
187pkglibdir = $(datadir)/$(PACKAGE)/examples
188ACLOCAL = @ACLOCAL@
189ALLOCA = @ALLOCA@
190AMTAR = @AMTAR@
191AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
192AR = @AR@
193AS = @AS@
194AUTOCONF = @AUTOCONF@
195AUTOHEADER = @AUTOHEADER@
196AUTOMAKE = @AUTOMAKE@
197AWK = @AWK@
198CC = @CC@
199CCDEPMODE = @CCDEPMODE@
200CFLAGS = @CFLAGS@
201CHECK_CFLAGS = @CHECK_CFLAGS@
202CHECK_LIBS = @CHECK_LIBS@
203CPP = @CPP@
204CPPFLAGS = @CPPFLAGS@
205CYGPATH_W = @CYGPATH_W@
206DEBUG_CFLAGS = @DEBUG_CFLAGS@
207DEFS = @DEFS@
208DEPDIR = @DEPDIR@
209DLLTOOL = @DLLTOOL@
210DSYMUTIL = @DSYMUTIL@
211DUMPBIN = @DUMPBIN@
212ECHO_C = @ECHO_C@
213ECHO_N = @ECHO_N@
214ECHO_T = @ECHO_T@
215EET_CFLAGS = @EET_CFLAGS@
216EET_CPPFLAGS = @EET_CPPFLAGS@
217EET_LIBS = @EET_LIBS@
218EET_PRG = @EET_PRG@
219EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
220EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
221EFL_EET_BUILD = @EFL_EET_BUILD@
222EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
223EGREP = @EGREP@
224EINA_CFLAGS = @EINA_CFLAGS@
225EINA_LIBS = @EINA_LIBS@
226EVIL_CFLAGS = @EVIL_CFLAGS@
227EVIL_LIBS = @EVIL_LIBS@
228EXEEXT = @EXEEXT@
229FGREP = @FGREP@
230GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
231GNUTLS_LIBS = @GNUTLS_LIBS@
232GREP = @GREP@
233INSTALL = @INSTALL@
234INSTALL_DATA = @INSTALL_DATA@
235INSTALL_PROGRAM = @INSTALL_PROGRAM@
236INSTALL_SCRIPT = @INSTALL_SCRIPT@
237INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
238LD = @LD@
239LDFLAGS = @LDFLAGS@
240LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
241LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
242LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
243LIBOBJS = @LIBOBJS@
244LIBS = @LIBS@
245LIBTOOL = @LIBTOOL@
246LIPO = @LIPO@
247LN_S = @LN_S@
248LTLIBOBJS = @LTLIBOBJS@
249MAKEINFO = @MAKEINFO@
250MKDIR_P = @MKDIR_P@
251NM = @NM@
252NMEDIT = @NMEDIT@
253OBJDUMP = @OBJDUMP@
254OBJEXT = @OBJEXT@
255OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
256OPENSSL_LIBS = @OPENSSL_LIBS@
257OTOOL = @OTOOL@
258OTOOL64 = @OTOOL64@
259PACKAGE = @PACKAGE@
260PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
261PACKAGE_NAME = @PACKAGE_NAME@
262PACKAGE_STRING = @PACKAGE_STRING@
263PACKAGE_TARNAME = @PACKAGE_TARNAME@
264PACKAGE_URL = @PACKAGE_URL@
265PACKAGE_VERSION = @PACKAGE_VERSION@
266PATH_SEPARATOR = @PATH_SEPARATOR@
267PKG_CONFIG = @PKG_CONFIG@
268PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
269PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
270RANLIB = @RANLIB@
271SED = @SED@
272SET_MAKE = @SET_MAKE@
273SHELL = @SHELL@
274STRIP = @STRIP@
275VERSION = @VERSION@
276VMAJ = @VMAJ@
277abs_builddir = @abs_builddir@
278abs_srcdir = @abs_srcdir@
279abs_top_builddir = @abs_top_builddir@
280abs_top_srcdir = @abs_top_srcdir@
281ac_ct_CC = @ac_ct_CC@
282ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
283am__include = @am__include@
284am__leading_dot = @am__leading_dot@
285am__quote = @am__quote@
286am__tar = @am__tar@
287am__untar = @am__untar@
288bindir = @bindir@
289build = @build@
290build_alias = @build_alias@
291build_cpu = @build_cpu@
292build_os = @build_os@
293build_vendor = @build_vendor@
294builddir = @builddir@
295datadir = @datadir@
296datarootdir = @datarootdir@
297docdir = @docdir@
298dvidir = @dvidir@
299efl_doxygen = @efl_doxygen@
300efl_have_doxygen = @efl_have_doxygen@
301exec_prefix = @exec_prefix@
302have_lcov = @have_lcov@
303host = @host@
304host_alias = @host_alias@
305host_cpu = @host_cpu@
306host_os = @host_os@
307host_vendor = @host_vendor@
308htmldir = @htmldir@
309includedir = @includedir@
310infodir = @infodir@
311install_sh = @install_sh@
312libdir = @libdir@
313libexecdir = @libexecdir@
314localedir = @localedir@
315localstatedir = @localstatedir@
316lt_ECHO = @lt_ECHO@
317lt_enable_auto_import = @lt_enable_auto_import@
318mandir = @mandir@
319mkdir_p = @mkdir_p@
320oldincludedir = @oldincludedir@
321pdfdir = @pdfdir@
322pkgconfig_requires_private = @pkgconfig_requires_private@
323prefix = @prefix@
324program_transform_name = @program_transform_name@
325psdir = @psdir@
326release_info = @release_info@
327requirement_eet = @requirement_eet@
328sbindir = @sbindir@
329sharedstatedir = @sharedstatedir@
330srcdir = @srcdir@
331sysconfdir = @sysconfdir@
332target_alias = @target_alias@
333top_build_prefix = @top_build_prefix@
334top_builddir = @top_builddir@
335top_srcdir = @top_srcdir@
336version_info = @version_info@
337MAINTAINERCLEANFILES = Makefile.in
338@BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = \
339@BUILD_EXAMPLES_TRUE@-I. \
340@BUILD_EXAMPLES_TRUE@-I$(top_srcdir)/src/lib \
341@BUILD_EXAMPLES_TRUE@@EINA_CFLAGS@
342
343@BUILD_EXAMPLES_TRUE@eet_basic_SOURCES = eet-basic.c
344@BUILD_EXAMPLES_TRUE@eet_basic_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
345@BUILD_EXAMPLES_TRUE@eet_file_SOURCES = eet-file.c
346@BUILD_EXAMPLES_TRUE@eet_file_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
347@BUILD_EXAMPLES_TRUE@eet_data_simple_SOURCES = eet-data-simple.c
348@BUILD_EXAMPLES_TRUE@eet_data_simple_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
349@BUILD_EXAMPLES_TRUE@eet_data_nested_SOURCES = eet-data-nested.c
350@BUILD_EXAMPLES_TRUE@eet_data_nested_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
351@BUILD_EXAMPLES_TRUE@eet_data_file_descriptor_01_SOURCES = eet-data-file_descriptor_01.c
352@BUILD_EXAMPLES_TRUE@eet_data_file_descriptor_01_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
353@BUILD_EXAMPLES_TRUE@eet_data_file_descriptor_02_SOURCES = eet-data-file_descriptor_02.c
354@BUILD_EXAMPLES_TRUE@eet_data_file_descriptor_02_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
355@BUILD_EXAMPLES_TRUE@eet_data_cipher_decipher_SOURCES = eet-data-cipher_decipher.c
356@BUILD_EXAMPLES_TRUE@eet_data_cipher_decipher_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@
357filesdir = $(datadir)/$(PACKAGE)/examples
358files_DATA = $(am__append_1)
359all: all-am
360
361.SUFFIXES:
362.SUFFIXES: .c .lo .o .obj
363$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
364 @for dep in $?; do \
365 case '$(am__configure_deps)' in \
366 *$$dep*) \
367 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
368 && { if test -f $@; then exit 0; else break; fi; }; \
369 exit 1;; \
370 esac; \
371 done; \
372 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/examples/Makefile'; \
373 $(am__cd) $(top_srcdir) && \
374 $(AUTOMAKE) --gnu src/examples/Makefile
375.PRECIOUS: Makefile
376Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
377 @case '$?' in \
378 *config.status*) \
379 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
380 *) \
381 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
382 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
383 esac;
384
385$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
386 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
387
388$(top_srcdir)/configure: $(am__configure_deps)
389 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
390$(ACLOCAL_M4): $(am__aclocal_m4_deps)
391 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
392$(am__aclocal_m4_deps):
393install-pkglibPROGRAMS: $(pkglib_PROGRAMS)
394 @$(NORMAL_INSTALL)
395 test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
396 @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \
397 for p in $$list; do echo "$$p $$p"; done | \
398 sed 's/$(EXEEXT)$$//' | \
399 while read p p1; do if test -f $$p || test -f $$p1; \
400 then echo "$$p"; echo "$$p"; else :; fi; \
401 done | \
402 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
403 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
404 sed 'N;N;N;s,\n, ,g' | \
405 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
406 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
407 if ($$2 == $$4) files[d] = files[d] " " $$1; \
408 else { print "f", $$3 "/" $$4, $$1; } } \
409 END { for (d in files) print "f", d, files[d] }' | \
410 while read type dir files; do \
411 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
412 test -z "$$files" || { \
413 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \
414 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \
415 } \
416 ; done
417
418uninstall-pkglibPROGRAMS:
419 @$(NORMAL_UNINSTALL)
420 @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \
421 files=`for p in $$list; do echo "$$p"; done | \
422 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
423 -e 's/$$/$(EXEEXT)/' `; \
424 test -n "$$list" || exit 0; \
425 echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
426 cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
427
428clean-pkglibPROGRAMS:
429 @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \
430 echo " rm -f" $$list; \
431 rm -f $$list || exit $$?; \
432 test -n "$(EXEEXT)" || exit 0; \
433 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
434 echo " rm -f" $$list; \
435 rm -f $$list
436eet_basic$(EXEEXT): $(eet_basic_OBJECTS) $(eet_basic_DEPENDENCIES)
437 @rm -f eet_basic$(EXEEXT)
438 $(AM_V_CCLD)$(LINK) $(eet_basic_OBJECTS) $(eet_basic_LDADD) $(LIBS)
439eet_data_cipher_decipher$(EXEEXT): $(eet_data_cipher_decipher_OBJECTS) $(eet_data_cipher_decipher_DEPENDENCIES)
440 @rm -f eet_data_cipher_decipher$(EXEEXT)
441 $(AM_V_CCLD)$(LINK) $(eet_data_cipher_decipher_OBJECTS) $(eet_data_cipher_decipher_LDADD) $(LIBS)
442eet_data_file_descriptor_01$(EXEEXT): $(eet_data_file_descriptor_01_OBJECTS) $(eet_data_file_descriptor_01_DEPENDENCIES)
443 @rm -f eet_data_file_descriptor_01$(EXEEXT)
444 $(AM_V_CCLD)$(LINK) $(eet_data_file_descriptor_01_OBJECTS) $(eet_data_file_descriptor_01_LDADD) $(LIBS)
445eet_data_file_descriptor_02$(EXEEXT): $(eet_data_file_descriptor_02_OBJECTS) $(eet_data_file_descriptor_02_DEPENDENCIES)
446 @rm -f eet_data_file_descriptor_02$(EXEEXT)
447 $(AM_V_CCLD)$(LINK) $(eet_data_file_descriptor_02_OBJECTS) $(eet_data_file_descriptor_02_LDADD) $(LIBS)
448eet_data_nested$(EXEEXT): $(eet_data_nested_OBJECTS) $(eet_data_nested_DEPENDENCIES)
449 @rm -f eet_data_nested$(EXEEXT)
450 $(AM_V_CCLD)$(LINK) $(eet_data_nested_OBJECTS) $(eet_data_nested_LDADD) $(LIBS)
451eet_data_simple$(EXEEXT): $(eet_data_simple_OBJECTS) $(eet_data_simple_DEPENDENCIES)
452 @rm -f eet_data_simple$(EXEEXT)
453 $(AM_V_CCLD)$(LINK) $(eet_data_simple_OBJECTS) $(eet_data_simple_LDADD) $(LIBS)
454eet_file$(EXEEXT): $(eet_file_OBJECTS) $(eet_file_DEPENDENCIES)
455 @rm -f eet_file$(EXEEXT)
456 $(AM_V_CCLD)$(LINK) $(eet_file_OBJECTS) $(eet_file_LDADD) $(LIBS)
457
458mostlyclean-compile:
459 -rm -f *.$(OBJEXT)
460
461distclean-compile:
462 -rm -f *.tab.c
463
464@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-basic.Po@am__quote@
465@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-data-cipher_decipher.Po@am__quote@
466@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-data-file_descriptor_01.Po@am__quote@
467@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-data-file_descriptor_02.Po@am__quote@
468@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-data-nested.Po@am__quote@
469@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-data-simple.Po@am__quote@
470@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet-file.Po@am__quote@
471
472.c.o:
473@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
474@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
475@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
476@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
477@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
478@am__fastdepCC_FALSE@ $(COMPILE) -c $<
479
480.c.obj:
481@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
482@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
483@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
484@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
485@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
486@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
487
488.c.lo:
489@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
490@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
491@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
492@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
493@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
494@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
495
496mostlyclean-libtool:
497 -rm -f *.lo
498
499clean-libtool:
500 -rm -rf .libs _libs
501install-filesDATA: $(files_DATA)
502 @$(NORMAL_INSTALL)
503 test -z "$(filesdir)" || $(MKDIR_P) "$(DESTDIR)$(filesdir)"
504 @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \
505 for p in $$list; do \
506 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
507 echo "$$d$$p"; \
508 done | $(am__base_list) | \
509 while read files; do \
510 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filesdir)'"; \
511 $(INSTALL_DATA) $$files "$(DESTDIR)$(filesdir)" || exit $$?; \
512 done
513
514uninstall-filesDATA:
515 @$(NORMAL_UNINSTALL)
516 @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \
517 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
518 test -n "$$files" || exit 0; \
519 echo " ( cd '$(DESTDIR)$(filesdir)' && rm -f" $$files ")"; \
520 cd "$(DESTDIR)$(filesdir)" && rm -f $$files
521
522ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
523 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
524 unique=`for i in $$list; do \
525 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
526 done | \
527 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
528 END { if (nonempty) { for (i in files) print i; }; }'`; \
529 mkid -fID $$unique
530tags: TAGS
531
532TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
533 $(TAGS_FILES) $(LISP)
534 set x; \
535 here=`pwd`; \
536 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
537 unique=`for i in $$list; do \
538 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
539 done | \
540 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
541 END { if (nonempty) { for (i in files) print i; }; }'`; \
542 shift; \
543 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
544 test -n "$$unique" || unique=$$empty_fix; \
545 if test $$# -gt 0; then \
546 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
547 "$$@" $$unique; \
548 else \
549 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
550 $$unique; \
551 fi; \
552 fi
553ctags: CTAGS
554CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
555 $(TAGS_FILES) $(LISP)
556 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
557 unique=`for i in $$list; do \
558 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
559 done | \
560 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
561 END { if (nonempty) { for (i in files) print i; }; }'`; \
562 test -z "$(CTAGS_ARGS)$$unique" \
563 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
564 $$unique
565
566GTAGS:
567 here=`$(am__cd) $(top_builddir) && pwd` \
568 && $(am__cd) $(top_srcdir) \
569 && gtags -i $(GTAGS_ARGS) "$$here"
570
571distclean-tags:
572 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
573
574distdir: $(DISTFILES)
575 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
576 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
577 list='$(DISTFILES)'; \
578 dist_files=`for file in $$list; do echo $$file; done | \
579 sed -e "s|^$$srcdirstrip/||;t" \
580 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
581 case $$dist_files in \
582 */*) $(MKDIR_P) `echo "$$dist_files" | \
583 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
584 sort -u` ;; \
585 esac; \
586 for file in $$dist_files; do \
587 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
588 if test -d $$d/$$file; then \
589 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
590 if test -d "$(distdir)/$$file"; then \
591 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
592 fi; \
593 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
594 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
595 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
596 fi; \
597 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
598 else \
599 test -f "$(distdir)/$$file" \
600 || cp -p $$d/$$file "$(distdir)/$$file" \
601 || exit 1; \
602 fi; \
603 done
604check-am: all-am
605check: check-am
606all-am: Makefile $(PROGRAMS) $(DATA)
607installdirs:
608 for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \
609 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
610 done
611install: install-am
612install-exec: install-exec-am
613install-data: install-data-am
614uninstall: uninstall-am
615
616install-am: all-am
617 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
618
619installcheck: installcheck-am
620install-strip:
621 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
622 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
623 `test -z '$(STRIP)' || \
624 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
625mostlyclean-generic:
626
627clean-generic:
628
629distclean-generic:
630 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
631 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
632
633maintainer-clean-generic:
634 @echo "This command is intended for maintainers to use"
635 @echo "it deletes files that may require special tools to rebuild."
636 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
637clean: clean-am
638
639clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \
640 mostlyclean-am
641
642distclean: distclean-am
643 -rm -rf ./$(DEPDIR)
644 -rm -f Makefile
645distclean-am: clean-am distclean-compile distclean-generic \
646 distclean-tags
647
648dvi: dvi-am
649
650dvi-am:
651
652html: html-am
653
654html-am:
655
656info: info-am
657
658info-am:
659
660install-data-am: install-filesDATA
661
662install-dvi: install-dvi-am
663
664install-dvi-am:
665
666install-exec-am: install-pkglibPROGRAMS
667
668install-html: install-html-am
669
670install-html-am:
671
672install-info: install-info-am
673
674install-info-am:
675
676install-man:
677
678install-pdf: install-pdf-am
679
680install-pdf-am:
681
682install-ps: install-ps-am
683
684install-ps-am:
685
686installcheck-am:
687
688maintainer-clean: maintainer-clean-am
689 -rm -rf ./$(DEPDIR)
690 -rm -f Makefile
691maintainer-clean-am: distclean-am maintainer-clean-generic
692
693mostlyclean: mostlyclean-am
694
695mostlyclean-am: mostlyclean-compile mostlyclean-generic \
696 mostlyclean-libtool
697
698pdf: pdf-am
699
700pdf-am:
701
702ps: ps-am
703
704ps-am:
705
706uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS
707
708.MAKE: install-am install-strip
709
710.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
711 clean-libtool clean-pkglibPROGRAMS ctags distclean \
712 distclean-compile distclean-generic distclean-libtool \
713 distclean-tags distdir dvi dvi-am html html-am info info-am \
714 install install-am install-data install-data-am install-dvi \
715 install-dvi-am install-exec install-exec-am install-filesDATA \
716 install-html install-html-am install-info install-info-am \
717 install-man install-pdf install-pdf-am install-pkglibPROGRAMS \
718 install-ps install-ps-am install-strip installcheck \
719 installcheck-am installdirs maintainer-clean \
720 maintainer-clean-generic mostlyclean mostlyclean-compile \
721 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
722 tags uninstall uninstall-am uninstall-filesDATA \
723 uninstall-pkglibPROGRAMS
724
725
726# Tell versions [3.59,3.63) of GNU make to not export all variables.
727# Otherwise a system limit (for SysV at least) may be exceeded.
728.NOEXPORT:
diff --git a/libraries/eet/src/examples/eet-basic.c b/libraries/eet/src/examples/eet-basic.c
new file mode 100644
index 0000000..05ff397
--- /dev/null
+++ b/libraries/eet/src/examples/eet-basic.c
@@ -0,0 +1,40 @@
1#include <Eet.h>
2
3int
4main(void)
5{
6 Eet_File *ef;
7 char *ret;
8 int size;
9 char *entries[] =
10 {
11 "Entry 1",
12 "Big text string here compared to others",
13 "Eet is cool"
14 };
15
16 eet_init();
17
18 // blindly open an file for output and write strings with their NUL char
19 ef = eet_open("test.eet", EET_FILE_MODE_WRITE);
20 eet_write(ef, "Entry 1", entries[0], strlen(entries[0]) + 1, 0);
21 eet_write(ef, "Entry 2", entries[1], strlen(entries[1]) + 1, 1);
22 eet_write(ef, "Entry 3", entries[2], strlen(entries[2]) + 1, 0);
23 eet_close(ef);
24
25 // open the file again and blindly get the entries we wrote
26 ef = eet_open("test.eet", EET_FILE_MODE_READ);
27 ret = eet_read(ef, "Entry 1", &size);
28 printf("%s\n", ret);
29 free(ret);
30 ret = eet_read(ef, "Entry 2", &size);
31 printf("%s\n", ret);
32 free(ret);
33 ret = eet_read(ef, "Entry 3", &size);
34 printf("%s\n", ret);
35 free(ret);
36 eet_close(ef);
37
38 eet_shutdown();
39}
40
diff --git a/libraries/eet/src/examples/eet-data-cipher_decipher.c b/libraries/eet/src/examples/eet-data-cipher_decipher.c
new file mode 100644
index 0000000..2ef965c
--- /dev/null
+++ b/libraries/eet/src/examples/eet-data-cipher_decipher.c
@@ -0,0 +1,119 @@
1/*
2 * build: gcc -o eet_data_file_cipher_decipher eet-data-file_cipher_decipher.c `pkg-config --cflags --libs eet eina`
3 */
4
5#include <Eina.h>
6#include <Eet.h>
7#include <stdio.h>
8#include <limits.h>
9#include <sys/types.h>
10#include <sys/stat.h>
11#include <unistd.h>
12
13int
14main(void)
15{
16 const char *buffer = "Here is a string of data to save !";
17 const char *key = "This is a crypto key";
18 const char *key_bad = "This is another crypto key";
19
20 char *file = strdup("/tmp/eet_cipher_example_XXXXX");
21 Eet_File *ef;
22 char *test;
23 int size;
24
25 eet_init();
26
27 if (!(file = tmpnam(file)))
28 {
29 fprintf(
30 stderr, "ERROR: could not create temporary file (%s).\n", file);
31 goto panic;
32 }
33
34 /* Crypt an eet file. */
35 ef = eet_open(file, EET_FILE_MODE_WRITE);
36 if (!ef)
37 {
38 fprintf(
39 stderr, "ERROR: could not access file (%s).\n", file);
40 goto error;
41 }
42
43 if (!eet_write_cipher(ef, "keys/tests", buffer, strlen(buffer) + 1, 0, key))
44 {
45 fprintf(
46 stderr, "ERROR: could not access file (%s).\n", file);
47 goto error;
48 }
49
50 eet_close(ef);
51
52 /* Decrypt an eet file. */
53 ef = eet_open(file, EET_FILE_MODE_READ);
54 if (!ef)
55 {
56 fprintf(
57 stderr, "ERROR: could not access file (%s).\n", file);
58 goto error;
59 }
60
61 test = eet_read_cipher(ef, "keys/tests", &size, key);
62 if (!test)
63 {
64 fprintf(
65 stderr, "ERROR: could decript contents on file %s, with key %s.\n",
66 file, key);
67 goto error;
68 }
69
70 if (size != (int)strlen(buffer) + 1)
71 {
72 fprintf(
73 stderr, "ERROR: something is wrong with the decripted data\n");
74 goto error;
75 }
76
77 if (memcmp(test, buffer, strlen(buffer) + 1) != 0)
78 {
79 fprintf(
80 stderr, "ERROR: something is wrong with the decripted data\n");
81 goto error;
82 }
83
84 eet_close(ef);
85
86 /* Decrypt an eet file, now using our BAD key!! */
87 ef = eet_open(file, EET_FILE_MODE_READ);
88 if (!ef)
89 {
90 fprintf(
91 stderr, "ERROR: could not access file (%s).\n", file);
92 goto error;
93 }
94
95 test = eet_read_cipher(ef, "keys/tests", &size, key_bad);
96
97 if (size == (int)strlen(buffer) + 1)
98 if (memcmp(test, buffer, strlen(buffer) + 1) == 0)
99 {
100 fprintf(
101 stderr, "ERROR: something is wrong with the contents of %s, as"
102 " we accessed it with a different key and it decripted our"
103 " information right.\n", file);
104 goto error;
105 }
106
107 eet_close(ef);
108
109error:
110 if (unlink(file) != 0)
111 {
112 fprintf(
113 stderr, "ERROR: could not unlink file (%s).\n", file);
114 }
115
116panic:
117 eet_shutdown();
118}
119
diff --git a/libraries/eet/src/examples/eet-data-file_descriptor_01.c b/libraries/eet/src/examples/eet-data-file_descriptor_01.c
new file mode 100644
index 0000000..4b5b75f
--- /dev/null
+++ b/libraries/eet/src/examples/eet-data-file_descriptor_01.c
@@ -0,0 +1,529 @@
1/*
2 * build: gcc -o eet_data_file_descriptor eet-data-file_descriptor.c `pkg-config --cflags --libs eet eina`
3 */
4#include <Eina.h>
5#include <Eet.h>
6#include <stdio.h>
7#include <limits.h>
8#include <sys/types.h>
9#include <sys/stat.h>
10#include <unistd.h>
11
12// complex real-world structures based on elmdentica database
13typedef struct
14{
15 const char *screen_name;
16 const char *name;
17 const char *message;
18 unsigned int id;
19 unsigned int status_id;
20 unsigned int date;
21 unsigned int timeline;
22} My_Message;
23
24typedef struct
25{
26 const char *dm_to;
27 const char *message;
28} My_Post;
29
30typedef struct
31{
32 unsigned int id;
33 const char *name;
34 Eina_List *messages;
35 My_Post *posts;
36 int posts_count;
37} My_Account;
38
39typedef struct
40{
41 unsigned int version; // it is recommended to use versioned configuration!
42 Eina_Hash *accounts;
43} My_Cache;
44
45// string that represents the entry in eet file, you might like to have
46// different profiles or so in the same file, this is possible with
47// different strings
48static const char MY_CACHE_FILE_ENTRY[] = "cache";
49
50// keep the descriptor static global, so it can be
51// shared by different functions (load/save) of this and only this
52// file.
53static Eet_Data_Descriptor *_my_cache_descriptor;
54static Eet_Data_Descriptor *_my_account_descriptor;
55static Eet_Data_Descriptor *_my_message_descriptor;
56static Eet_Data_Descriptor *_my_post_descriptor;
57
58// keep file handle alive, so mmap()ed strings are all alive as well
59static Eet_File *_my_cache_file = NULL;
60static Eet_Dictionary *_my_cache_dict = NULL;
61
62static void
63_my_cache_descriptor_init(void)
64{
65 Eet_Data_Descriptor_Class eddc;
66
67 // The FILE variant is good for caches and things that are just
68 // appended, but needs to take care when changing strings and files must
69 // be kept open so mmap()ed strings will be kept alive.
70 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, My_Cache);
71 _my_cache_descriptor = eet_data_descriptor_file_new(&eddc);
72
73 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, My_Account);
74 _my_account_descriptor = eet_data_descriptor_file_new(&eddc);
75
76 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, My_Message);
77 _my_message_descriptor = eet_data_descriptor_file_new(&eddc);
78
79 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, My_Post);
80 _my_post_descriptor = eet_data_descriptor_file_new(&eddc);
81
82 // Describe the members to be saved:
83 // Use a temporary macro so we don't type a lot, also avoid errors:
84
85#define ADD_BASIC(member, eet_type) \
86 EET_DATA_DESCRIPTOR_ADD_BASIC \
87 (_my_message_descriptor, My_Message, # member, member, eet_type)
88 ADD_BASIC(screen_name, EET_T_STRING);
89 ADD_BASIC(name, EET_T_STRING);
90 ADD_BASIC(message, EET_T_STRING);
91 ADD_BASIC(id, EET_T_UINT);
92 ADD_BASIC(status_id, EET_T_UINT);
93 ADD_BASIC(date, EET_T_UINT);
94 ADD_BASIC(timeline, EET_T_UINT);
95#undef ADD_BASIC
96
97#define ADD_BASIC(member, eet_type) \
98 EET_DATA_DESCRIPTOR_ADD_BASIC \
99 (_my_post_descriptor, My_Post, # member, member, eet_type)
100 ADD_BASIC(dm_to, EET_T_STRING);
101 ADD_BASIC(message, EET_T_STRING);
102#undef ADD_BASIC
103
104#define ADD_BASIC(member, eet_type) \
105 EET_DATA_DESCRIPTOR_ADD_BASIC \
106 (_my_account_descriptor, My_Account, # member, member, eet_type)
107 ADD_BASIC(name, EET_T_STRING);
108 ADD_BASIC(id, EET_T_UINT);
109#undef ADD_BASIC
110
111 EET_DATA_DESCRIPTOR_ADD_LIST
112 (_my_account_descriptor, My_Account, "messages", messages,
113 _my_message_descriptor);
114 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY
115 (_my_account_descriptor, My_Account, "posts", posts,
116 _my_post_descriptor);
117
118#define ADD_BASIC(member, eet_type) \
119 EET_DATA_DESCRIPTOR_ADD_BASIC \
120 (_my_cache_descriptor, My_Cache, # member, member, eet_type)
121 ADD_BASIC(version, EET_T_UINT);
122#undef ADD_BASIC
123
124 EET_DATA_DESCRIPTOR_ADD_HASH
125 (_my_cache_descriptor, My_Cache, "accounts", accounts,
126 _my_account_descriptor);
127} /* _my_cache_descriptor_init */
128
129static void
130_my_cache_descriptor_shutdown(void)
131{
132 eet_data_descriptor_free(_my_cache_descriptor);
133 eet_data_descriptor_free(_my_account_descriptor);
134 eet_data_descriptor_free(_my_message_descriptor);
135 eet_data_descriptor_free(_my_post_descriptor);
136} /* _my_cache_descriptor_shutdown */
137
138// need to check if the pointer came from mmaped area in eet_dictionary
139// or it was allocated with eina_stringshare_add()
140static void
141_eet_string_free(const char *str)
142{
143 if (!str)
144 return;
145
146 if ((_my_cache_dict) && (eet_dictionary_string_check(_my_cache_dict, str)))
147 return;
148
149 eina_stringshare_del(str);
150} /* _eet_string_free */
151
152static My_Message *
153_my_message_new(const char *message)
154{
155 My_Message *msg = calloc(1, sizeof(My_Message));
156 if (!msg)
157 {
158 fprintf(stderr, "ERROR: could not calloc My_Message\n");
159 return NULL;
160 }
161
162 msg->message = eina_stringshare_add(message);
163 return msg;
164} /* _my_message_new */
165
166static void
167_my_message_free(My_Message *msg)
168{
169 _eet_string_free(msg->screen_name);
170 _eet_string_free(msg->name);
171 _eet_string_free(msg->message);
172 free(msg);
173} /* _my_message_free */
174
175static Eina_Bool
176_my_post_add(My_Account *acc,
177 const char *message)
178{
179 int new_count = acc->posts_count + 1;
180 My_Post *post = realloc(acc->posts, new_count * sizeof(My_Post));
181 if (!post)
182 {
183 fprintf(stderr, "ERROR: could add My_Post\n");
184 return EINA_FALSE;
185 }
186
187 post[acc->posts_count].message = eina_stringshare_add(message);
188 post[acc->posts_count].dm_to = NULL;
189 acc->posts_count = new_count;
190 acc->posts = post;
191 return EINA_TRUE;
192} /* _my_post_new */
193
194static void
195_my_post_free(My_Post *post)
196{
197 _eet_string_free(post->dm_to);
198 _eet_string_free(post->message);
199} /* _my_post_free */
200
201static My_Account *
202_my_account_new(const char *name)
203{
204 My_Account *acc = calloc(1, sizeof(My_Account));
205 if (!acc)
206 {
207 fprintf(stderr, "ERROR: could not calloc My_Account\n");
208 return NULL;
209 }
210
211 acc->name = eina_stringshare_add(name);
212 return acc;
213} /* _my_account_new */
214
215static void
216_my_account_free(My_Account *acc)
217{
218 My_Message *m;
219 int i;
220
221 _eet_string_free(acc->name);
222
223 EINA_LIST_FREE(acc->messages, m)
224 _my_message_free(m);
225
226 for (i = 0; i < acc->posts_count; i++)
227 _my_post_free(&acc->posts[i]);
228 free(acc->posts);
229
230 free(acc);
231} /* _my_account_free */
232
233static My_Cache *
234_my_cache_new(void)
235{
236 My_Cache *my_cache = calloc(1, sizeof(My_Cache));
237 if (!my_cache)
238 {
239 fprintf(stderr, "ERROR: could not calloc My_Cache\n");
240 return NULL;
241 }
242
243 my_cache->accounts = eina_hash_string_small_new(NULL);
244
245 my_cache->version = 1;
246 return my_cache;
247} /* _my_cache_new */
248
249static Eina_Bool
250_my_cache_account_free_cb(const Eina_Hash *hash,
251 const void *key,
252 void *data,
253 void *fdata)
254{
255 _my_account_free(data);
256 return EINA_TRUE;
257}
258
259static void
260_my_cache_free(My_Cache *my_cache)
261{
262 My_Account *acc;
263 eina_hash_foreach(my_cache->accounts, _my_cache_account_free_cb, NULL);
264 eina_hash_free(my_cache->accounts);
265 free(my_cache);
266} /* _my_cache_free */
267
268static My_Account *
269_my_cache_account_find(My_Cache *my_cache,
270 const char *name)
271{
272 return eina_hash_find(my_cache->accounts, name);
273} /* _my_cache_account_find */
274
275static My_Cache *
276_my_cache_load(const char *filename)
277{
278 My_Cache *my_cache;
279 Eet_File *ef = eet_open(filename, EET_FILE_MODE_READ);
280 if (!ef)
281 {
282 fprintf(stderr, "ERROR: could not open '%s' for read\n", filename);
283 return NULL;
284 }
285
286 my_cache = eet_data_read(ef, _my_cache_descriptor, MY_CACHE_FILE_ENTRY);
287 if (!my_cache)
288 {
289 eet_close(ef);
290 return NULL;
291 }
292
293 if (my_cache->version < 1)
294 {
295 fprintf(stderr,
296 "WARNING: version %#x was too old, upgrading it to %#x\n",
297 my_cache->version, 1);
298
299 my_cache->version = 1;
300 }
301
302 if (_my_cache_file)
303 eet_close(_my_cache_file);
304
305 _my_cache_file = ef;
306 _my_cache_dict = eet_dictionary_get(ef);
307
308 return my_cache;
309} /* _my_cache_load */
310
311static Eina_Bool
312_my_cache_save(const My_Cache *my_cache,
313 const char *filename)
314{
315 char tmp[PATH_MAX];
316 Eet_File *ef;
317 Eina_Bool ret;
318 unsigned int i, len;
319 struct stat st;
320
321 len = eina_strlcpy(tmp, filename, sizeof(tmp));
322 if (len + 12 >= (int)sizeof(tmp))
323 {
324 fprintf(stderr, "ERROR: file name is too big: %s\n", filename);
325 return EINA_FALSE;
326 }
327
328 i = 0;
329 do
330 {
331 snprintf(tmp + len, 12, ".%u", i);
332 i++;
333 }
334 while (stat(tmp, &st) == 0);
335
336 ef = eet_open(tmp, EET_FILE_MODE_WRITE);
337 if (!ef)
338 {
339 fprintf(stderr, "ERROR: could not open '%s' for write\n", tmp);
340 return EINA_FALSE;
341 }
342
343 ret = eet_data_write
344 (ef, _my_cache_descriptor, MY_CACHE_FILE_ENTRY, my_cache, EINA_TRUE);
345
346 // VERY IMPORTANT NOTE:
347 // after eet_close(), all strings mmaped from file will be GONE, invalid!
348 // you'll need to free the old cache and open the new one.
349 // For cache this is okay, as you should be saving not so often or just
350 // at end.
351 //
352 // This is a trade off, you save memory by using mmap()ed strings, but
353 // you have to care about this.
354 eet_close(ef);
355
356 if (ret)
357 {
358 unlink(filename);
359 rename(tmp, filename);
360 }
361
362 return ret;
363} /* _my_cache_save */
364
365int
366main(int argc,
367 char *argv[])
368{
369 My_Cache *my_cache;
370 const Eina_List *l_acc;
371 Eina_Iterator *it;
372 My_Account *acc;
373 int ret = 0;
374
375 if (argc < 3)
376 {
377 fprintf(stderr,
378 "Usage:\n\t%s <input> <output> [action] [action-params]\n\n"
379 "Where actions and their parameters:\n"
380 "\tacc <name>\n"
381 "\tpost <account-name> <message>\n"
382 "\tmessage <account-name> <message>\n"
383 "\n",
384 argv[0]);
385 return -1;
386 }
387
388 eina_init();
389 eet_init();
390 _my_cache_descriptor_init();
391
392 my_cache = _my_cache_load(argv[1]);
393 if (!my_cache)
394 {
395 printf("creating new cache.\n");
396 my_cache = _my_cache_new();
397 if (!my_cache)
398 {
399 ret = -2;
400 goto end;
401 }
402 }
403
404 if (argc > 3)
405 {
406 if (strcmp(argv[3], "acc") == 0)
407 {
408 if (argc == 5)
409 {
410 My_Account *acc = _my_cache_account_find(my_cache, argv[4]);
411 if (!acc)
412 {
413 acc = _my_account_new(argv[4]);
414 eina_hash_direct_add(my_cache->accounts, acc->name, acc);
415 }
416 else
417 fprintf(stderr, "ERROR: account '%s' already exists.\n",
418 argv[4]);
419 }
420 else
421 fprintf(stderr,
422 "ERROR: wrong number of parameters (%d).\n",
423 argc);
424 }
425 else if (strcmp(argv[3], "post") == 0)
426 {
427 if (argc == 6)
428 {
429 My_Account *acc = _my_cache_account_find(my_cache, argv[4]);
430 if (acc)
431 {
432 _my_post_add(acc, argv[5]);
433 }
434 else
435 fprintf(stderr, "ERROR: unknown account: '%s'\n", argv[4]);
436 }
437 else
438 fprintf(stderr,
439 "ERROR: wrong number of parameters (%d).\n",
440 argc);
441 }
442 else if (strcmp(argv[3], "message") == 0)
443 {
444 if (argc == 6)
445 {
446 My_Account *acc = _my_cache_account_find(my_cache, argv[4]);
447 if (acc)
448 {
449 My_Message *msg = _my_message_new(argv[5]);
450 acc->messages = eina_list_append(acc->messages, msg);
451 }
452 else
453 fprintf(stderr, "ERROR: unknown account: '%s'\n", argv[4]);
454 }
455 else
456 fprintf(stderr,
457 "ERROR: wrong number of parameters (%d).\n",
458 argc);
459 }
460 else
461 fprintf(stderr, "ERROR: unknown action '%s'\n", argv[2]);
462 }
463
464 printf("My_Cache:\n"
465 "\tversion.: %#x\n"
466 "\taccounts: %u\n",
467 my_cache->version,
468 eina_hash_population(my_cache->accounts));
469 it = eina_hash_iterator_data_new(my_cache->accounts);
470 EINA_ITERATOR_FOREACH(it, acc)
471 {
472 const My_Post *post;
473
474 printf("\t > %-#8x '%.20s' stats: m=%u, p=%u\n",
475 acc->id, acc->name ? acc->name : "",
476 eina_list_count(acc->messages),
477 acc->posts_count);
478
479 if (eina_list_count(acc->messages))
480 {
481 const Eina_List *l;
482 const My_Message *msg;
483 printf("\t |messages:\n");
484
485 EINA_LIST_FOREACH(acc->messages, l, msg)
486 {
487 printf("\t | %-8x '%s' [%s]: '%.20s'\n",
488 msg->id,
489 msg->name ? msg->name : "",
490 msg->screen_name ? msg->screen_name : "",
491 msg->message ? msg->message : "");
492 }
493 }
494
495 if (acc->posts_count)
496 {
497 const My_Post *post;
498 int i;
499 printf("\t |posts:\n");
500
501 for (i = 0; i < acc->posts_count; i++)
502 {
503 post = &acc->posts[i];
504 if (post->dm_to)
505 printf("\t | @%s: '%.20s'\n", post->dm_to, post->message);
506 else
507 printf("\t | '%.20s'\n", post->message);
508 }
509 }
510
511 printf("\n");
512 }
513 eina_iterator_free(it);
514
515 if (!_my_cache_save(my_cache, argv[2]))
516 ret = -3;
517
518 _my_cache_free(my_cache);
519
520end:
521 if (_my_cache_file)
522 eet_close(_my_cache_file);
523 _my_cache_descriptor_shutdown();
524 eet_shutdown();
525 eina_shutdown();
526
527 return ret;
528} /* main */
529
diff --git a/libraries/eet/src/examples/eet-data-file_descriptor_02.c b/libraries/eet/src/examples/eet-data-file_descriptor_02.c
new file mode 100644
index 0000000..65ba79e
--- /dev/null
+++ b/libraries/eet/src/examples/eet-data-file_descriptor_02.c
@@ -0,0 +1,944 @@
1/*
2 * build: gcc -o eet_data_file_descriptor_02 eet-data-file_descriptor_02.c `pkg-config --cflags --libs eet eina`
3 */
4
5#include <Eina.h>
6#include <Eet.h>
7#include <stdio.h>
8#include <limits.h>
9#include <sys/types.h>
10#include <sys/stat.h>
11#include <unistd.h>
12
13typedef enum _Example_Data_Type Example_Data_Type;
14typedef struct _Example_Variant_Type Example_Variant_Type;
15typedef struct _Example_Variant Example_Variant;
16typedef struct _Example_Union Example_Union;
17typedef struct _Example_Struct1 Example_Struct1;
18typedef struct _Example_Struct2 Example_Struct2;
19typedef struct _Example_Struct3 Example_Struct3;
20typedef struct _Example_Lists Example_Lists;
21
22enum _Example_Data_Type
23{
24 EET_UNKNOWN = 0,
25 EET_STRUCT1,
26 EET_STRUCT2,
27 EET_STRUCT3
28};
29
30struct
31{
32 Example_Data_Type u;
33 const char *name;
34} eet_mapping[] = {
35 { EET_STRUCT1, "ST1" },
36 { EET_STRUCT2, "ST2" },
37 { EET_STRUCT3, "ST3" },
38 { EET_UNKNOWN, NULL }
39};
40
41struct _Example_Struct1
42{
43 double val1;
44 int stuff;
45 const char *s1;
46};
47
48struct _Example_Struct2
49{
50 Eina_Bool b1;
51 unsigned long long v1;
52};
53
54struct _Example_Struct3
55{
56 int body;
57};
58
59struct _Example_Union
60{
61 Example_Data_Type type;
62
63 union {
64 Example_Struct1 st1;
65 Example_Struct2 st2;
66 Example_Struct3 st3;
67 } u;
68};
69
70struct _Example_Variant_Type
71{
72 const char *type;
73 Eina_Bool unknow : 1;
74};
75
76struct _Example_Variant
77{
78 Example_Variant_Type t;
79
80 void *data; /* differently than the union type, we
81 * don't need to pre-allocate the memory
82 * for the field*/
83};
84
85struct _Example_Lists
86{
87 Eina_List *union_list;
88 Eina_List *variant_list;
89};
90
91static void
92_st1_set(Example_Struct1 *st1,
93 double v1,
94 int v2,
95 const char *v3)
96{
97 st1->val1 = v1;
98 st1->stuff = v2;
99 st1->s1 = v3;
100} /* _st1_set */
101
102static void
103_st2_set(Example_Struct2 *st2,
104 Eina_Bool v1,
105 unsigned long long v2)
106{
107 st2->b1 = v1;
108 st2->v1 = v2;
109} /* _st2_set */
110
111static void
112_st3_set(Example_Struct3 *st3,
113 int v1)
114{
115 st3->body = v1;
116} /* _st3_set */
117
118static const char *
119/* union
120 type_get() */
121_union_type_get(const void *data,
122 Eina_Bool *unknow)
123{
124 const Example_Data_Type *u = data;
125 int i;
126
127 if (unknow)
128 *unknow = EINA_FALSE;
129
130 for (i = 0; eet_mapping[i].name != NULL; ++i)
131 if (*u == eet_mapping[i].u)
132 return eet_mapping[i].name;
133
134 if (unknow)
135 *unknow = EINA_TRUE;
136
137 return NULL;
138} /* _union_type_get */
139
140static Eina_Bool
141_union_type_set(const char *type,
142 void *data,
143 Eina_Bool unknow)
144{
145 Example_Data_Type *u = data;
146 int i;
147
148 if (unknow)
149 return EINA_FALSE;
150
151 for (i = 0; eet_mapping[i].name != NULL; ++i)
152 if (strcmp(eet_mapping[i].name, type) == 0)
153 {
154 *u = eet_mapping[i].u;
155 return EINA_TRUE;
156 }
157
158 return EINA_FALSE;
159} /* _union_type_set */
160
161static const char *
162_variant_type_get(const void *data,
163 Eina_Bool *unknow)
164{
165 const Example_Variant_Type *type = data;
166 int i;
167
168 if (unknow)
169 *unknow = type->unknow;
170
171 for (i = 0; eet_mapping[i].name != NULL; ++i)
172 if (strcmp(type->type, eet_mapping[i].name) == 0)
173 return eet_mapping[i].name;
174
175 if (unknow)
176 *unknow = EINA_FALSE;
177
178 return type->type;
179} /* _variant_type_get */
180
181static Eina_Bool
182_variant_type_set(const char *type,
183 void *data,
184 Eina_Bool unknow)
185{
186 Example_Variant_Type *vt = data;
187
188 vt->type = type;
189 vt->unknow = unknow;
190 return EINA_TRUE;
191} /* _variant_type_set */
192
193static Eet_Data_Descriptor *
194_st1_dd(void)
195{
196 Eet_Data_Descriptor_Class eddc;
197 Eet_Data_Descriptor *res;
198
199 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Example_Struct1);
200 res = eet_data_descriptor_file_new(&eddc);
201 EET_DATA_DESCRIPTOR_ADD_BASIC(
202 res, Example_Struct1, "val1", val1, EET_T_DOUBLE);
203 EET_DATA_DESCRIPTOR_ADD_BASIC(
204 res, Example_Struct1, "stuff", stuff, EET_T_INT);
205 EET_DATA_DESCRIPTOR_ADD_BASIC(
206 res, Example_Struct1, "s1", s1, EET_T_STRING);
207
208 return res;
209} /* _st1_dd */
210
211static Eet_Data_Descriptor *
212_st2_dd(void)
213{
214 Eet_Data_Descriptor_Class eddc;
215 Eet_Data_Descriptor *res;
216
217 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Example_Struct2);
218 res = eet_data_descriptor_file_new(&eddc);
219 EET_DATA_DESCRIPTOR_ADD_BASIC(
220 res, Example_Struct2, "b1", b1, EET_T_UCHAR);
221 EET_DATA_DESCRIPTOR_ADD_BASIC(
222 res, Example_Struct2, "v1", v1, EET_T_ULONG_LONG);
223
224 return res;
225} /* _st2_dd */
226
227static Eet_Data_Descriptor *
228_st3_dd(void)
229{
230 Eet_Data_Descriptor_Class eddc;
231 Eet_Data_Descriptor *res;
232
233 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Example_Struct3);
234 res = eet_data_descriptor_file_new(&eddc);
235 EET_DATA_DESCRIPTOR_ADD_BASIC(
236 res, Example_Struct3, "body", body, EET_T_INT);
237
238 return res;
239} /* _st3_dd */
240
241/* string that represents the entry in the eet file. you might like to
242 * have different profiles or so in the same file, this is possible
243 * with different strings
244 */
245static const char CACHE_FILE_ENTRY[] = "cache";
246
247/* keep the descriptor static global, so it can be shared by different
248 * functions (load/save) of this and only this file.
249 */
250static Eet_Data_Descriptor *_lists_descriptor;
251static Eet_Data_Descriptor *_struct_1_descriptor;
252static Eet_Data_Descriptor *_struct_2_descriptor;
253static Eet_Data_Descriptor *_struct_3_descriptor;
254static Eet_Data_Descriptor *_union_descriptor;
255static Eet_Data_Descriptor *_variant_descriptor;
256static Eet_Data_Descriptor *_union_unified_descriptor;
257static Eet_Data_Descriptor *_variant_unified_descriptor;
258
259/* keep file handle alive, so mmap()ed strings are all alive as
260 * well */
261static Eet_File *_cache_file = NULL;
262static Eet_Dictionary *_cache_dict = NULL;
263
264static void
265/* declaring types */
266_data_descriptors_init(void)
267{
268 Eet_Data_Descriptor_Class eddc;
269
270 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Example_Lists);
271 _lists_descriptor = eet_data_descriptor_file_new(&eddc);
272
273 _struct_1_descriptor = _st1_dd();
274 _struct_2_descriptor = _st2_dd();
275 _struct_3_descriptor = _st3_dd();
276
277 /* for union */
278 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Example_Union);
279 _union_descriptor = eet_data_descriptor_file_new(&eddc);
280
281 eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
282 eddc.func.type_get = _union_type_get;
283 eddc.func.type_set = _union_type_set;
284 _union_unified_descriptor = eet_data_descriptor_file_new(&eddc);
285
286 EET_DATA_DESCRIPTOR_ADD_MAPPING(
287 _union_unified_descriptor, "ST1", _struct_1_descriptor);
288 EET_DATA_DESCRIPTOR_ADD_MAPPING(
289 _union_unified_descriptor, "ST2", _struct_2_descriptor);
290 EET_DATA_DESCRIPTOR_ADD_MAPPING(
291 _union_unified_descriptor, "ST3", _struct_3_descriptor);
292
293 EET_DATA_DESCRIPTOR_ADD_UNION(
294 _union_descriptor, Example_Union, "u", u, type,
295 _union_unified_descriptor);
296
297 EET_DATA_DESCRIPTOR_ADD_LIST(
298 _lists_descriptor, Example_Lists, "union_list", union_list,
299 _union_descriptor);
300
301 /* for variant */
302 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Example_Variant);
303 _variant_descriptor = eet_data_descriptor_file_new(&eddc);
304
305 eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
306 eddc.func.type_get = _variant_type_get;
307 eddc.func.type_set = _variant_type_set;
308 _variant_unified_descriptor = eet_data_descriptor_stream_new(&eddc);
309
310 EET_DATA_DESCRIPTOR_ADD_MAPPING(
311 _variant_unified_descriptor, "ST1", _struct_1_descriptor);
312 EET_DATA_DESCRIPTOR_ADD_MAPPING(
313 _variant_unified_descriptor, "ST2", _struct_2_descriptor);
314 EET_DATA_DESCRIPTOR_ADD_MAPPING(
315 _variant_unified_descriptor, "ST3", _struct_3_descriptor);
316
317 EET_DATA_DESCRIPTOR_ADD_VARIANT(
318 _variant_descriptor, Example_Variant, "data", data, t,
319 _variant_unified_descriptor);
320
321 EET_DATA_DESCRIPTOR_ADD_LIST(
322 _lists_descriptor, Example_Lists, "variant_list", variant_list,
323 _variant_descriptor);
324} /* _data_descriptors_init */
325
326static void
327_data_descriptors_shutdown(void)
328{
329 eet_data_descriptor_free(_lists_descriptor);
330 eet_data_descriptor_free(_struct_1_descriptor);
331 eet_data_descriptor_free(_struct_2_descriptor);
332 eet_data_descriptor_free(_struct_3_descriptor);
333 eet_data_descriptor_free(_union_descriptor);
334 eet_data_descriptor_free(_variant_descriptor);
335 eet_data_descriptor_free(_union_unified_descriptor);
336 eet_data_descriptor_free(_variant_unified_descriptor);
337} /* _data_descriptors_shutdown */
338
339/* need to check if the pointer came from mmap()ed area in
340 * eet_dictionary or it was allocated with eina_stringshare_add()
341 */
342static void
343_string_free(const char *str)
344{
345 if (!str)
346 return;
347
348 if ((_cache_dict) && (eet_dictionary_string_check(_cache_dict, str)))
349 return;
350
351 eina_stringshare_del(str);
352} /* _string_free */
353
354static Example_Union *
355_union_1_new(const char *v1,
356 const char *v2,
357 const char *v3)
358{
359 Example_Union *un = calloc(1, sizeof(Example_Union));
360 if (!un)
361 {
362 fprintf(
363 stderr, "ERROR: could not allocate an Example_Union struct.\n");
364 return NULL;
365 }
366
367 un->type = EET_STRUCT1;
368 _st1_set(&(un->u.st1), atof(v1), atoi(v2), eina_stringshare_add(v3));
369
370 return un;
371}
372
373static Example_Union *
374_union_2_new(const char *v1,
375 const char *v2)
376{
377 Example_Union *un = calloc(1, sizeof(Example_Union));
378 if (!un)
379 {
380 fprintf(
381 stderr, "ERROR: could not allocate an Example_Union struct.\n");
382 return NULL;
383 }
384
385 un->type = EET_STRUCT2;
386 _st2_set(&(un->u.st2), atoi(v1), atoi(v2));
387
388 return un;
389}
390
391static Example_Union *
392_union_3_new(const char *v1)
393{
394 Example_Union *un = calloc(1, sizeof(Example_Union));
395 if (!un)
396 {
397 fprintf(
398 stderr, "ERROR: could not allocate an Example_Union struct.\n");
399 return NULL;
400 }
401
402 un->type = EET_STRUCT3;
403 _st3_set(&(un->u.st3), atoi(v1));
404
405 return un;
406}
407
408static Example_Variant *
409_variant_1_new(const char *v1,
410 const char *v2,
411 const char *v3)
412{
413 Example_Struct1 *st1;
414 Example_Variant *va = calloc(1, sizeof(Example_Variant));
415 if (!va)
416 {
417 fprintf(
418 stderr, "ERROR: could not allocate an Example_Variant struct.\n");
419 return NULL;
420 }
421
422 va = calloc(1, sizeof (Example_Variant));
423 va->t.type = eet_mapping[0].name;
424 st1 = calloc(1, sizeof (Example_Struct1));
425 _st1_set(st1, atof(v1), atoi(v2), eina_stringshare_add(v3));
426 va->data = st1;
427
428 return va;
429}
430
431static Example_Variant *
432_variant_2_new(const char *v1,
433 const char *v2)
434{
435 printf("varinant 2 new\n");
436
437 Example_Struct2 *st2;
438 Example_Variant *va = calloc(1, sizeof(Example_Variant));
439 if (!va)
440 {
441 fprintf(
442 stderr, "ERROR: could not allocate an Example_Variant struct.\n");
443 return NULL;
444 }
445
446 va = calloc(1, sizeof (Example_Variant));
447
448 va->t.type = eet_mapping[1].name;
449
450 printf("type gets %s\n", va->t.type);
451
452 st2 = calloc(1, sizeof (Example_Struct2));
453 _st2_set(st2, atoi(v1), atoi(v2));
454 va->data = st2;
455
456 return va;
457}
458
459static Example_Variant *
460_variant_3_new(const char *v1)
461{
462 Example_Struct3 *st3;
463 Example_Variant *va = calloc(1, sizeof(Example_Variant));
464 if (!va)
465 {
466 fprintf(
467 stderr, "ERROR: could not allocate an Example_Variant struct.\n");
468 return NULL;
469 }
470
471 va = calloc(1, sizeof (Example_Variant));
472 va->t.type = eet_mapping[2].name;
473 st3 = calloc(1, sizeof (Example_Struct3));
474 _st3_set(st3, atoi(v1));
475 va->data = st3;
476
477 return va;
478}
479
480static Example_Lists *
481_data_new(void)
482{
483 Example_Lists *example_lists = calloc(1, sizeof(Example_Lists));
484 if (!example_lists)
485 {
486 fprintf(stderr, "ERROR: could not allocate a Example_Lists struct.\n");
487 return NULL;
488 }
489
490 return example_lists;
491} /* _data_new */
492
493static void
494_union_free(Example_Union *un)
495{
496 if (un->type == EET_STRUCT1)
497 {
498 Example_Struct1 *st1 = &(un->u.st1);
499 _string_free(st1->s1);
500 }
501
502 free(un);
503}
504
505static void
506_variant_free(Example_Variant *va)
507{
508 if (!strcmp(va->t.type, eet_mapping[0].name))
509 {
510 Example_Struct1 *st1 = va->data;
511 _string_free(st1->s1);
512 }
513
514 free(va->data);
515 free(va);
516}
517
518static void
519_data_free(Example_Lists *cache)
520{
521 Example_Union *un;
522 Example_Variant *va;
523
524 EINA_LIST_FREE(cache->union_list, un)
525 _union_free(un);
526
527 EINA_LIST_FREE(cache->variant_list, va)
528 _variant_free(va);
529
530 free(cache);
531} /* _data_free */
532
533static Example_Lists *
534_data_load(const char *filename)
535{
536 Example_Lists *data;
537 Eet_File *ef = eet_open(filename, EET_FILE_MODE_READ);
538 if (!ef)
539 {
540 fprintf(stderr, "ERROR: could not open '%s' for read\n", filename);
541 return NULL;
542 }
543
544 data = eet_data_read(ef, _lists_descriptor, CACHE_FILE_ENTRY);
545 if (!data)
546 {
547 eet_close(ef);
548 return NULL;
549 }
550
551 if (_cache_file)
552 eet_close(_cache_file);
553
554 _cache_file = ef;
555 _cache_dict = eet_dictionary_get(ef);
556
557 return data;
558} /* _data_load */
559
560static Eina_Bool
561_data_save(const Example_Lists *cache,
562 const char *filename)
563{
564 char tmp[PATH_MAX];
565 Eet_File *ef;
566 Eina_Bool ret;
567 unsigned int i, len;
568 struct stat st;
569
570 len = eina_strlcpy(tmp, filename, sizeof(tmp));
571 if (len + 12 >= (int)sizeof(tmp))
572 {
573 fprintf(stderr, "ERROR: file name is too big: %s\n", filename);
574 return EINA_FALSE;
575 }
576
577 i = 0;
578 do
579 {
580 snprintf(tmp + len, 12, ".%u", i);
581 i++;
582 }
583 while (stat(tmp, &st) == 0);
584
585 ef = eet_open(tmp, EET_FILE_MODE_WRITE);
586 if (!ef)
587 {
588 fprintf(stderr, "ERROR: could not open '%s' for write\n", tmp);
589 return EINA_FALSE;
590 }
591
592 ret = eet_data_write
593 (ef, _lists_descriptor, CACHE_FILE_ENTRY, cache, EINA_TRUE);
594
595 eet_close(ef);
596
597 if (ret)
598 {
599 unlink(filename);
600 rename(tmp, filename);
601 }
602
603 return ret;
604} /* _data_save */
605
606static void
607_print_union(const Example_Union *un)
608{
609 printf("\t | type: %s'\n", eet_mapping[un->type - 1].name);
610
611 switch (un->type)
612 {
613 case EET_STRUCT1:
614 printf("\t\t val1: %f\n", un->u.st1.val1);
615 printf("\t\t stuff: %d\n", un->u.st1.stuff);
616 printf("\t\t s1: %s\n", un->u.st1.s1);
617 break;
618
619 case EET_STRUCT2:
620 printf("\t\t val1: %i\n", un->u.st2.b1);
621 printf("\t\t stuff: %lli\n", un->u.st2.v1);
622 break;
623
624 case EET_STRUCT3:
625 printf("\t\t val1: %i\n", un->u.st3.body);
626 break;
627
628 default:
629 return;
630 }
631}
632
633static void
634_print_variant(const Example_Variant *va)
635{
636 printf("\t | type: %s'\n", va->t.type);
637
638 switch (va->t.type[2])
639 {
640 case '1':
641 {
642 Example_Struct1 *st1 = va->data;
643
644 printf("\t\t val1: %f\n", st1->val1);
645 printf("\t\t stuff: %d\n", st1->stuff);
646 printf("\t\t s1: %s\n", st1->s1);
647 }
648 break;
649
650 case '2':
651 {
652 Example_Struct2 *st2 = va->data;
653
654 printf("\t\t val1: %i\n", st2->b1);
655 printf("\t\t stuff: %lli\n", st2->v1);
656 }
657 break;
658
659 case '3':
660 {
661 Example_Struct3 *st3 = va->data;
662
663 printf("\t\t val1: %i\n", st3->body);
664 }
665 break;
666
667 default:
668 return;
669 }
670}
671
672int
673main(int argc,
674 char *argv[])
675{
676 Example_Lists *data_lists;
677 int ret = 0;
678
679 if (argc < 3)
680 {
681 fprintf(stderr,
682 "Usage:\n\t%s <input> <output> [action action-params]\n\n"
683 "where actions and their parameters are:\n"
684 "\tunion <type> [fields]\n"
685 "\tvariant <type> [fields]\n"
686 "\n",
687 argv[0]);
688 return -1;
689 }
690
691 eina_init();
692 eet_init();
693 _data_descriptors_init();
694
695 data_lists = _data_load(argv[1]);
696 if (!data_lists)
697 {
698 printf("Creating new data lists.\n");
699 data_lists = _data_new();
700 if (!data_lists)
701 {
702 ret = -2;
703 goto end;
704 }
705 }
706
707 if (argc > 3)
708 {
709 if (strcmp(argv[3], "union") == 0)
710 {
711 if (argc > 4)
712 {
713 int type = atoi(argv[4]);
714 Example_Union *un;
715
716 if (type < EET_STRUCT1 || type > EET_STRUCT3)
717 {
718 fprintf(stderr,
719 "ERROR: invalid type parameter (%s).\n",
720 argv[4]);
721 goto cont;
722 }
723
724 switch (type)
725 {
726 case 1:
727 if (argc != 8)
728 {
729 fprintf(
730 stderr, "ERROR: wrong number of parameters"
731 " (%d).\n", argc);
732 goto cont;
733 }
734
735 un = _union_1_new(
736 argv[5], argv[6], argv[7]);
737 if (!un)
738 {
739 fprintf(
740 stderr, "ERROR: could not create the "
741 "requested union.\n");
742 goto cont;
743 }
744 data_lists->union_list =
745 eina_list_append(data_lists->union_list, un);
746 break;
747
748 case 2:
749 if (argc != 7)
750 {
751 fprintf(
752 stderr, "ERROR: wrong number of parameters"
753 " (%d).\n", argc);
754 goto cont;
755 }
756
757 un = _union_2_new(argv[5], argv[6]);
758 if (!un)
759 {
760 fprintf(
761 stderr, "ERROR: could not create the "
762 "requested union.\n");
763 goto cont;
764 }
765 data_lists->union_list =
766 eina_list_append(data_lists->union_list, un);
767 break;
768
769 case 3:
770 if (argc != 6)
771 {
772 fprintf(
773 stderr, "ERROR: wrong number of parameters"
774 " (%d).\n", argc);
775 goto cont;
776 }
777
778 un = _union_3_new(argv[5]);
779 if (!un)
780 {
781 fprintf(
782 stderr, "ERROR: could not create the "
783 "requested union.\n");
784 goto cont;
785 }
786 data_lists->union_list =
787 eina_list_append(data_lists->union_list, un);
788 break;
789
790 default:
791 fprintf(
792 stderr, "ERROR: bad type of of struct passed\n");
793 goto cont;
794 }
795 }
796 else
797 fprintf(stderr,
798 "ERROR: wrong number of parameters (%d).\n",
799 argc);
800 }
801 else if (strcmp(argv[3], "variant") == 0)
802 {
803 if (argc > 4)
804 {
805 int type = atoi(argv[4]);
806 Example_Variant *va;
807
808 if (type < EET_STRUCT1 || type > EET_STRUCT3)
809 {
810 fprintf(stderr,
811 "ERROR: invalid type parameter (%s).\n",
812 argv[4]);
813 goto cont;
814 }
815
816 switch (type)
817 {
818 case 1:
819 if (argc != 8)
820 {
821 fprintf(
822 stderr, "ERROR: wrong number of parameters"
823 " (%d).\n", argc);
824 goto cont;
825 }
826
827 va = _variant_1_new(
828 argv[5], argv[6], argv[7]);
829 if (!va)
830 {
831 fprintf(
832 stderr, "ERROR: could not create the "
833 "requested variant.\n");
834 goto cont;
835 }
836 data_lists->variant_list =
837 eina_list_append(data_lists->variant_list, va);
838 break;
839
840 case 2:
841 if (argc != 7)
842 {
843 fprintf(
844 stderr, "ERROR: wrong number of parameters"
845 " (%d).\n", argc);
846 goto cont;
847 }
848
849 va = _variant_2_new(argv[5], argv[6]);
850 if (!va)
851 {
852 fprintf(
853 stderr, "ERROR: could not create the "
854 "requested variant.\n");
855 goto cont;
856 }
857 data_lists->variant_list =
858 eina_list_append(data_lists->variant_list, va);
859 break;
860
861 case 3:
862 if (argc != 6)
863 {
864 fprintf(
865 stderr, "ERROR: wrong number of parameters"
866 " (%d).\n", argc);
867 goto cont;
868 }
869
870 va = _variant_3_new(argv[5]);
871 if (!va)
872 {
873 fprintf(
874 stderr, "ERROR: could not create the "
875 "requested variant.\n");
876 goto cont;
877 }
878 data_lists->variant_list =
879 eina_list_append(data_lists->variant_list, va);
880 break;
881
882 default:
883 fprintf(
884 stderr, "ERROR: bad type of of struct passed\n");
885 goto cont;
886 }
887 }
888 else
889 fprintf(stderr,
890 "ERROR: wrong number of parameters (%d).\n",
891 argc);
892 }
893 else
894 fprintf(stderr, "ERROR: unknown action '%s'\n", argv[3]);
895 }
896
897cont:
898 printf("Cached data:\n");
899
900 printf("\tstats: unions=%u, variants=%u\n",
901 eina_list_count(data_lists->union_list),
902 eina_list_count(data_lists->variant_list));
903
904 if (eina_list_count(data_lists->union_list))
905 {
906 const Eina_List *l;
907 const Example_Union *un;
908 printf("\t * union list:\n");
909
910 EINA_LIST_FOREACH(data_lists->union_list, l, un)
911 {
912 _print_union(un);
913 }
914 }
915
916 if (eina_list_count(data_lists->variant_list))
917 {
918 const Eina_List *l;
919 const Example_Variant *un;
920 printf("\t * variant list:\n");
921
922 EINA_LIST_FOREACH(data_lists->variant_list, l, un)
923 {
924 _print_variant(un);
925 }
926 }
927
928 printf("\n");
929
930 if (!_data_save(data_lists, argv[2]))
931 ret = -3;
932
933 _data_free(data_lists);
934
935end:
936 if (_cache_file)
937 eet_close(_cache_file);
938 _data_descriptors_shutdown();
939 eet_shutdown();
940 eina_shutdown();
941
942 return ret;
943} /* main */
944
diff --git a/libraries/eet/src/examples/eet-data-nested.c b/libraries/eet/src/examples/eet-data-nested.c
new file mode 100644
index 0000000..a6b0e12
--- /dev/null
+++ b/libraries/eet/src/examples/eet-data-nested.c
@@ -0,0 +1,272 @@
1/*
2 * build: gcc -o eet_data_nested eet-data-nested.c `pkg-config --cflags --libs eet eina`
3 */
4#include <Eina.h>
5#include <Eet.h>
6#include <stdio.h>
7#include <limits.h>
8#include <sys/types.h>
9#include <sys/stat.h>
10#include <unistd.h>
11
12// The struct that will be loaded and saved.
13// note that only the members described in the eet_data_descriptor
14// will be automatically handled. The other members will have their
15// space reserved and zeroed (as it uses calloc()), but not
16// saved or loaded from eet files.
17typedef struct
18{
19 unsigned int version; // it is recommended to use versioned configuration!
20 const char *name;
21 int id;
22 int not_saved_value; // example of not saved data inside!
23 Eina_Bool enabled;
24 Eina_List *subs;
25} My_Conf_Type;
26
27typedef struct
28{
29 const char *server;
30 int port;
31} My_Conf_Subtype;
32
33// string that represents the entry in eet file, you might like to have
34// different profiles or so in the same file, this is possible with
35// different strings
36static const char MY_CONF_FILE_ENTRY[] = "config";
37
38// keep the descriptor static global, so it can be
39// shared by different functions (load/save) of this and only this
40// file.
41static Eet_Data_Descriptor *_my_conf_descriptor;
42static Eet_Data_Descriptor *_my_conf_sub_descriptor;
43
44static void
45_my_conf_descriptor_init(void)
46{
47 Eet_Data_Descriptor_Class eddc;
48
49 // The class describe the functions to use to create the type and its
50 // full allocated size.
51 //
52 // Eina types are very convenient, so use them to create the descriptor,
53 // so we get eina_list, eina_hash and eina_stringshare automatically!
54 //
55 // The STREAM variant is better for configuration files as the values
56 // will likely change a lot.
57 //
58 // The other variant, FILE, is good for caches and things that are just
59 // appended, but needs to take care when changing strings and files must
60 // be kept open so mmap()ed strings will be kept alive.
61 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, My_Conf_Type);
62 _my_conf_descriptor = eet_data_descriptor_stream_new(&eddc);
63
64 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, My_Conf_Subtype);
65 _my_conf_sub_descriptor = eet_data_descriptor_stream_new(&eddc);
66
67 // Describe the members to be saved:
68 // Use a temporary macro so we don't type a lot, also avoid errors:
69#define MY_CONF_ADD_BASIC(member, eet_type) \
70 EET_DATA_DESCRIPTOR_ADD_BASIC \
71 (_my_conf_descriptor, My_Conf_Type, # member, member, eet_type)
72#define MY_CONF_SUB_ADD_BASIC(member, eet_type) \
73 EET_DATA_DESCRIPTOR_ADD_BASIC \
74 (_my_conf_sub_descriptor, My_Conf_Subtype, # member, member, eet_type)
75
76 MY_CONF_SUB_ADD_BASIC(server, EET_T_STRING);
77 MY_CONF_SUB_ADD_BASIC(port, EET_T_INT);
78
79 MY_CONF_ADD_BASIC(version, EET_T_UINT);
80 MY_CONF_ADD_BASIC(name, EET_T_STRING);
81 MY_CONF_ADD_BASIC(id, EET_T_INT);
82 MY_CONF_ADD_BASIC(enabled, EET_T_UCHAR);
83
84 // And add the sub descriptor as a linked list at 'subs' in the main struct
85 EET_DATA_DESCRIPTOR_ADD_LIST
86 (_my_conf_descriptor, My_Conf_Type, "subs", subs, _my_conf_sub_descriptor);
87
88#undef MY_CONF_ADD_BASIC
89#undef MY_CONF_SUB_ADD_BASIC
90} /* _my_conf_descriptor_init */
91
92static void
93_my_conf_descriptor_shutdown(void)
94{
95 eet_data_descriptor_free(_my_conf_sub_descriptor);
96 eet_data_descriptor_free(_my_conf_descriptor);
97} /* _my_conf_descriptor_shutdown */
98
99static My_Conf_Type *
100_my_conf_new(void)
101{
102 My_Conf_Type *my_conf = calloc(1, sizeof(My_Conf_Type));
103 My_Conf_Subtype *sub;
104 if (!my_conf)
105 {
106 fprintf(stderr, "ERROR: could not calloc My_Conf_Type\n");
107 return NULL;
108 }
109
110 my_conf->version = 0x112233;
111 my_conf->enabled = EINA_TRUE;
112
113 sub = calloc(1, sizeof(My_Conf_Subtype));
114 if (sub)
115 {
116 sub->server = eina_stringshare_add("my-server.com");
117 sub->port = 1234;
118 my_conf->subs = eina_list_append(my_conf->subs, sub);
119 }
120
121 return my_conf;
122} /* _my_conf_new */
123
124static void
125_my_conf_free(My_Conf_Type *my_conf)
126{
127 My_Conf_Subtype *sub;
128 EINA_LIST_FREE(my_conf->subs, sub)
129 {
130 eina_stringshare_del(sub->server);
131 free(sub);
132 }
133
134 eina_stringshare_del(my_conf->name);
135 free(my_conf);
136} /* _my_conf_free */
137
138static My_Conf_Type *
139_my_conf_load(const char *filename)
140{
141 My_Conf_Type *my_conf;
142 Eet_File *ef = eet_open(filename, EET_FILE_MODE_READ);
143 if (!ef)
144 {
145 fprintf(stderr, "ERROR: could not open '%s' for read\n", filename);
146 return NULL;
147 }
148
149 my_conf = eet_data_read(ef, _my_conf_descriptor, MY_CONF_FILE_ENTRY);
150 if (!my_conf)
151 goto end;
152
153 if (my_conf->version < 0x112233)
154 {
155 fprintf(stderr,
156 "WARNING: version %#x was too old, upgrading it to %#x\n",
157 my_conf->version, 0x112233);
158
159 my_conf->version = 0x112233;
160 my_conf->enabled = EINA_TRUE;
161 }
162
163end:
164 eet_close(ef);
165 return my_conf;
166} /* _my_conf_load */
167
168static Eina_Bool
169_my_conf_save(const My_Conf_Type *my_conf,
170 const char *filename)
171{
172 char tmp[PATH_MAX];
173 Eet_File *ef;
174 Eina_Bool ret;
175 unsigned int i, len;
176 struct stat st;
177
178 len = eina_strlcpy(tmp, filename, sizeof(tmp));
179 if (len + 12 >= (int)sizeof(tmp))
180 {
181 fprintf(stderr, "ERROR: file name is too big: %s\n", filename);
182 return EINA_FALSE;
183 }
184
185 i = 0;
186 do
187 {
188 snprintf(tmp + len, 12, ".%u", i);
189 i++;
190 }
191 while (stat(tmp, &st) == 0);
192
193 ef = eet_open(tmp, EET_FILE_MODE_WRITE);
194 if (!ef)
195 {
196 fprintf(stderr, "ERROR: could not open '%s' for write\n", tmp);
197 return EINA_FALSE;
198 }
199
200 ret = eet_data_write
201 (ef, _my_conf_descriptor, MY_CONF_FILE_ENTRY, my_conf, EINA_TRUE);
202 eet_close(ef);
203
204 if (ret)
205 {
206 unlink(filename);
207 rename(tmp, filename);
208 }
209
210 return ret;
211} /* _my_conf_save */
212
213int
214main(int argc,
215 char *argv[])
216{
217 My_Conf_Type *my_conf;
218 const My_Conf_Subtype *sub;
219 const Eina_List *l;
220 int ret = 0;
221
222 if (argc != 3)
223 {
224 fprintf(stderr, "Usage:\n\t%s <input> <output>\n\n", argv[0]);
225 return -1;
226 }
227
228 eina_init();
229 eet_init();
230 _my_conf_descriptor_init();
231
232 my_conf = _my_conf_load(argv[1]);
233 if (!my_conf)
234 {
235 printf("creating new configuration.\n");
236 my_conf = _my_conf_new();
237 if (!my_conf)
238 {
239 ret = -2;
240 goto end;
241 }
242 }
243
244 printf("My_Conf_Type:\n"
245 "\tversion: %#x\n"
246 "\tname...: '%s'\n"
247 "\tid.....: %d\n"
248 "\tenabled: %hhu\n"
249 "\tsubs...:\n",
250 my_conf->version,
251 my_conf->name ? my_conf->name : "",
252 my_conf->id,
253 my_conf->enabled);
254
255 EINA_LIST_FOREACH(my_conf->subs, l, sub)
256 printf("\t\tserver: '%s', port: %d\n",
257 sub->server ? sub->server : "",
258 sub->port);
259
260 if (!_my_conf_save(my_conf, argv[2]))
261 ret = -3;
262
263 _my_conf_free(my_conf);
264
265end:
266 _my_conf_descriptor_shutdown();
267 eet_shutdown();
268 eina_shutdown();
269
270 return ret;
271} /* main */
272
diff --git a/libraries/eet/src/examples/eet-data-simple.c b/libraries/eet/src/examples/eet-data-simple.c
new file mode 100644
index 0000000..1951fc0
--- /dev/null
+++ b/libraries/eet/src/examples/eet-data-simple.c
@@ -0,0 +1,224 @@
1/*
2 * build: gcc -o eet_data_simple eet-data-simple.c `pkg-config --cflags --libs eet eina`
3 */
4#include <Eina.h>
5#include <Eet.h>
6#include <stdio.h>
7#include <limits.h>
8#include <sys/types.h>
9#include <sys/stat.h>
10#include <unistd.h>
11
12// The struct that will be loaded and saved.
13// note that only the members described in the eet_data_descriptor
14// will be automatically handled. The other members will have their
15// space reserved and zeroed (as it uses calloc()), but not
16// saved or loaded from eet files.
17typedef struct
18{
19 unsigned int version; // it is recommended to use versioned configuration!
20 const char *name;
21 int id;
22 int not_saved_value; // example of not saved data inside!
23 Eina_Bool enabled;
24} My_Conf_Type;
25
26// string that represents the entry in eet file, you might like to have
27// different profiles or so in the same file, this is possible with
28// different strings
29static const char MY_CONF_FILE_ENTRY[] = "config";
30
31// keep the descriptor static global, so it can be
32// shared by different functions (load/save) of this and only this
33// file.
34static Eet_Data_Descriptor *_my_conf_descriptor;
35
36static void
37_my_conf_descriptor_init(void)
38{
39 Eet_Data_Descriptor_Class eddc;
40
41 // The class describe the functions to use to create the type and its
42 // full allocated size.
43 //
44 // Eina types are very convenient, so use them to create the descriptor,
45 // so we get eina_list, eina_hash and eina_stringshare automatically!
46 //
47 // The STREAM variant is better for configuration files as the values
48 // will likely change a lot.
49 //
50 // The other variant, FILE, is good for caches and things that are just
51 // appended, but needs to take care when changing strings and files must
52 // be kept open so mmap()ed strings will be kept alive.
53 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, My_Conf_Type);
54 _my_conf_descriptor = eet_data_descriptor_stream_new(&eddc);
55
56 // Describe the members to be saved:
57 // Use a temporary macro so we don't type a lot, also avoid errors:
58#define MY_CONF_ADD_BASIC(member, eet_type) \
59 EET_DATA_DESCRIPTOR_ADD_BASIC \
60 (_my_conf_descriptor, My_Conf_Type, # member, member, eet_type)
61
62 MY_CONF_ADD_BASIC(version, EET_T_UINT);
63 MY_CONF_ADD_BASIC(name, EET_T_STRING);
64 MY_CONF_ADD_BASIC(id, EET_T_INT);
65 MY_CONF_ADD_BASIC(enabled, EET_T_UCHAR);
66
67#undef MY_CONF_ADD_BASIC
68} /* _my_conf_descriptor_init */
69
70static void
71_my_conf_descriptor_shutdown(void)
72{
73 eet_data_descriptor_free(_my_conf_descriptor);
74} /* _my_conf_descriptor_shutdown */
75
76static My_Conf_Type *
77_my_conf_new(void)
78{
79 My_Conf_Type *my_conf = calloc(1, sizeof(My_Conf_Type));
80 if (!my_conf)
81 {
82 fprintf(stderr, "ERROR: could not calloc My_Conf_Type\n");
83 return NULL;
84 }
85
86 my_conf->version = 0x112233;
87 my_conf->enabled = EINA_TRUE;
88 return my_conf;
89} /* _my_conf_new */
90
91static void
92_my_conf_free(My_Conf_Type *my_conf)
93{
94 eina_stringshare_del(my_conf->name);
95 free(my_conf);
96} /* _my_conf_free */
97
98static My_Conf_Type *
99_my_conf_load(const char *filename)
100{
101 My_Conf_Type *my_conf;
102 Eet_File *ef = eet_open(filename, EET_FILE_MODE_READ);
103 if (!ef)
104 {
105 fprintf(stderr, "ERROR: could not open '%s' for read\n", filename);
106 return NULL;
107 }
108
109 my_conf = eet_data_read(ef, _my_conf_descriptor, MY_CONF_FILE_ENTRY);
110 if (!my_conf)
111 goto end;
112
113 if (my_conf->version < 0x112233)
114 {
115 fprintf(stderr,
116 "WARNING: version %#x was too old, upgrading it to %#x\n",
117 my_conf->version, 0x112233);
118
119 my_conf->version = 0x112233;
120 my_conf->enabled = EINA_TRUE;
121 }
122
123end:
124 eet_close(ef);
125 return my_conf;
126} /* _my_conf_load */
127
128static Eina_Bool
129_my_conf_save(const My_Conf_Type *my_conf,
130 const char *filename)
131{
132 char tmp[PATH_MAX];
133 Eet_File *ef;
134 Eina_Bool ret;
135 unsigned int i, len;
136 struct stat st;
137
138 len = eina_strlcpy(tmp, filename, sizeof(tmp));
139 if (len + 12 >= (int)sizeof(tmp))
140 {
141 fprintf(stderr, "ERROR: file name is too big: %s\n", filename);
142 return EINA_FALSE;
143 }
144
145 i = 0;
146 do
147 {
148 snprintf(tmp + len, 12, ".%u", i);
149 i++;
150 }
151 while (stat(tmp, &st) == 0);
152
153 ef = eet_open(tmp, EET_FILE_MODE_WRITE);
154 if (!ef)
155 {
156 fprintf(stderr, "ERROR: could not open '%s' for write\n", tmp);
157 return EINA_FALSE;
158 }
159
160 ret = eet_data_write
161 (ef, _my_conf_descriptor, MY_CONF_FILE_ENTRY, my_conf, EINA_TRUE);
162 eet_close(ef);
163
164 if (ret)
165 {
166 unlink(filename);
167 rename(tmp, filename);
168 }
169
170 return ret;
171} /* _my_conf_save */
172
173int
174main(int argc,
175 char *argv[])
176{
177 My_Conf_Type *my_conf;
178 int ret = 0;
179
180 if (argc != 3)
181 {
182 fprintf(stderr, "Usage:\n\t%s <input> <output>\n\n", argv[0]);
183 return -1;
184 }
185
186 eina_init();
187 eet_init();
188 _my_conf_descriptor_init();
189
190 my_conf = _my_conf_load(argv[1]);
191 if (!my_conf)
192 {
193 printf("creating new configuration.\n");
194 my_conf = _my_conf_new();
195 if (!my_conf)
196 {
197 ret = -2;
198 goto end;
199 }
200 }
201
202 printf("My_Conf_Type:\n"
203 "\tversion: %#x\n"
204 "\tname...: '%s'\n"
205 "\tid.....: %d\n"
206 "\tenabled: %hhu\n",
207 my_conf->version,
208 my_conf->name ? my_conf->name : "",
209 my_conf->id,
210 my_conf->enabled);
211
212 if (!_my_conf_save(my_conf, argv[2]))
213 ret = -3;
214
215 _my_conf_free(my_conf);
216
217end:
218 _my_conf_descriptor_shutdown();
219 eet_shutdown();
220 eina_shutdown();
221
222 return ret;
223} /* main */
224
diff --git a/libraries/eet/src/examples/eet-file.c b/libraries/eet/src/examples/eet-file.c
new file mode 100644
index 0000000..740c179
--- /dev/null
+++ b/libraries/eet/src/examples/eet-file.c
@@ -0,0 +1,127 @@
1/*
2 * build: gcc -o eet_file eet-file.c `pkg-config --cflags --libs eet`
3 */
4#include <Eet.h>
5#include <stdio.h>
6#include <string.h>
7
8static int
9create_eet_file(void)
10{
11 Eet_File *ef;
12 char buf[1024], *ptr;
13 int size, len, i;
14 const char *some_strings[] = {
15 "And some more strings",
16 "spread across several",
17 "elements of an array!"
18 };
19 const char some_data[] =
20 "\x1e\xe7\x0f\x42\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x35"
21 "\x00\x00\x00\xa0\x00\x00\x00\xa0\x00\x00\x00\x24\x00\x00\x00\x11"
22 "\x00\x00\x00\x00\x2f\x6d\x69\x73\x74\x65\x72\x69\x6f\x75\x73\x2f"
23 "\x64\x61\x74\x61\x00\x41\x6e\x20\x45\x45\x54\x20\x69\x6e\x73\x69"
24 "\x64\x65\x20\x6f\x66\x20\x61\x6e\x20\x45\x45\x54\x21\x0a\x54\x68"
25 "\x69\x73\x20\x77\x61\x73\x6e\x27\x74\x20\x72\x65\x61\x6c\x6c\x79"
26 "\x20\x75\x73\x65\x66\x75\x6c\x20\x62\x75\x74\x20\x69\x74\x20\x68"
27 "\x65\x6c\x70\x65\x64\x20\x74\x6f\x20\x73\x68\x6f\x77\x20\x68\x6f"
28 "\x77\x0a\x74\x6f\x20\x75\x73\x65\x20\x65\x65\x74\x5f\x6d\x65\x6d"
29 "\x6f\x70\x65\x6e\x5f\x72\x65\x61\x64\x28\x29\x20\x74\x6f\x20\x6f"
30 "\x70\x65\x6e\x20\x61\x6e\x20\x65\x65\x74\x20\x66\x69\x6c\x65\x20"
31 "\x66\x72\x6f\x6d\x0a\x64\x61\x74\x61\x20\x61\x6c\x72\x65\x61\x64"
32 "\x79\x20\x6c\x6f\x61\x64\x65\x64\x20\x69\x6e\x20\x6d\x65\x6d\x6f"
33 "\x72\x79\x2e\x0a\x00";
34
35 ef = eet_open("/tmp/my_file.eet", EET_FILE_MODE_WRITE);
36 if (!ef) return 0;
37
38 strcpy(buf, "Here is a string of data to save!");
39 size = eet_write(ef, "/key/to_store/at", buf, sizeof(buf), 1);
40 if (!size)
41 {
42 fprintf(stderr, "Error writing data!\n");
43 eet_close(ef);
44 return 0;
45 }
46 len = strlen(buf);
47 printf("strlen() = %d, eet_write() = %d\n", len, size);
48
49 ptr = buf;
50 for (i = 0; i < 3; i++)
51 {
52 len = strlen(some_strings[i]) + 1;
53 memcpy(ptr, some_strings[i], len);
54 ptr += len;
55 }
56 eet_write(ef, "/several/strings", buf, sizeof(buf), 1);
57 eet_sync(ef);
58
59 eet_write(ef, "/some/mysterious/data", some_data, sizeof(some_data) - 1, 1);
60
61 eet_delete(ef, "/several/strings");
62
63 return eet_close(ef) == EET_ERROR_NONE;
64}
65
66int
67main(void)
68{
69 Eet_File *ef;
70 char *ret, **list;
71 int size, num, i;
72
73 eet_init();
74
75 if (!create_eet_file())
76 return -1;
77
78 ef = eet_open("/tmp/my_file.eet", EET_FILE_MODE_READ);
79 if (!ef) return -1;
80
81 list = eet_list(ef, "*", &num);
82 if (list)
83 {
84 for (i = 0; i < num; i++)
85 printf("Key stored: %s\n", list[i]);
86 free(list);
87 }
88
89 ret = eet_read(ef, "/key/to_store/at", &size);
90 if (ret)
91 {
92 printf("Data read (%i bytes):\n%s\n", size, ret);
93 free(ret);
94 }
95
96 ret = eet_read(ef, "/several/strings", &size);
97 if (ret)
98 {
99 printf("More data read (%i bytes):\n%s\n", size, ret);
100 free(ret);
101 }
102
103 ret = eet_read(ef, "/some/mysterious/data", &size);
104 if (ret)
105 {
106 Eet_File *ef2;
107
108 ef2 = eet_memopen_read(ret, size);
109
110 num = eet_num_entries(ef2);
111 printf("Mysterious data has %d entries\n", num);
112
113 printf("Mysterious data:\n%s\n",
114 (char *)eet_read_direct(ef2, "/mysterious/data", NULL));
115
116 eet_close(ef2);
117
118 free(ret);
119 }
120
121 eet_close(ef);
122
123 eet_shutdown();
124
125 return 0;
126}
127
diff --git a/libraries/eet/src/lib/Eet.h b/libraries/eet/src/lib/Eet.h
new file mode 100644
index 0000000..8fda1e0
--- /dev/null
+++ b/libraries/eet/src/lib/Eet.h
@@ -0,0 +1,4156 @@
1/**
2 @brief Eet Data Handling Library Public API Calls
3
4 These routines are used for Eet Library interaction
5
6 @mainpage Eet Library Documentation
7
8 @version 1.5.0
9 @date 2000-2011
10
11 Please see the @ref authors page for contact details.
12
13 @section toc Table of Contents
14
15 @li @ref intro
16 @li @ref example
17 @li @ref compiling
18 @li @ref install
19 @li @ref next_steps
20 @li @ref intro_example
21
22 @section intro What is Eet?
23
24 It is a tiny library designed to write an arbitrary set of chunks of data
25 to a file and optionally compress each chunk (very much like a zip file)
26 and allow fast random-access reading of the file later on. It does not
27 do zip as a zip itself has more complexity than is needed, and it was much
28 simpler to implement this once here.
29
30 Eet is extremely fast, small and simple. Eet files can be very small and
31 highly compressed, making them very optimal for just sending across the
32 internet without having to archive, compress or decompress and install them.
33 They allow for lightning-fast random-acess reads once created, making them
34 perfect for storing data that is written once (or rarely) and read many
35 times, but the program does not want to have to read it all in at once.
36
37 It also can encode and decode data structures in memory, as well as image
38 data for saving to Eet files or sending across the network to other
39 machines, or just writing to arbitrary files on the system. All data is
40 encoded in a platform independent way and can be written and read by any
41 architecture.
42
43 @section example A simple example on using Eet
44
45 Here is a simple example on how to use Eet to save a series of strings to a
46 file and load them again. The advantage of using Eet over just
47 fprintf() and
48 fscanf() is that not only can these entries be strings, they need no special
49 parsing to handle delimiter characters or escaping, they can be binary data,
50 image data, data structures containing integers, strings, other data
51 structures, linked lists and much more, without the programmer having to
52 worry about parsing, and best of all, Eet is very fast.
53
54 This is just a very simple example that doesn't show all of the capabilities
55 of Eet, but it serves to illustrate its simplicity.
56
57 @include eet-basic.c
58
59 @section compiling How to compile using Eet ?
60
61 Eet is a library your application links to. The procedure for this is very
62 simple. You simply have to compile your application with the appropriate
63 compiler flags that the @p pkg-config script outputs. For example:
64
65 Compiling C or C++ files into object files:
66
67 @verbatim
68 gcc -c -o main.o main.c `pkg-config --cflags eet`
69 @endverbatim
70
71 Linking object files into a binary executable:
72
73 @verbatim
74 gcc -o my_application main.o `pkg-config --libs eet`
75 @endverbatim
76
77 You simply have to make sure that pkg-config is in your shell's PATH (see
78 the manual page for your appropriate shell) and eet.pc in /usr/lib/pkgconfig
79 or its path is in the PKG_CONFIG_PATH environment variable. It's that simple
80 to link and use Eet once you have written your code to use it.
81
82 Since the program is linked to Eet, it is now able to use any advertised
83 API calls to serialize your data.
84
85 You should make sure you add any extra compile and link flags to your
86 compile commands that your application may need as well. The above example
87 is only guaranteed to make Eet add it's own requirements.
88
89
90 @section install How is it installed?
91
92 Simple:
93
94 @verbatim
95 ./configure
96 make
97 su -
98 ...
99 make install
100 @endverbatim
101
102 @section next_steps Next Steps
103
104 After you understood what Eet is and installed it in your system you
105 should proceed understanding the programming interface. We'd recommend
106 you to take a while to learn Eina
107 (http://docs.enlightenment.org/auto/eina/) as it is very convenient
108 and optimized, and Eet provides integration with it.
109
110 Recommended reading:
111
112 @li @ref Eet_File_Group to know the basics to open and save files.
113 @li @ref Eet_Data_Group to know the convenient way to serialize and
114 parse your data structures automatically. Just create your
115 descriptors and let Eet do the work for you.
116
117 @section intro_example Introductory Examples
118
119 @ref Examples
120
121 @todo Document data format for images and data structures.
122
123 */
124
125/**
126 @page authors Authors
127 @author Carsten Haitzler <raster@@rasterman.com>
128 @author David Goodlad <dgoodlad@@gmail.com>
129 @author Cedric Bail <cedric.bail@@free.fr>
130 @author Arnaud de Turckheim <quarium@@gmail.com>
131 @author Luis Felipe Strano Moraes <lfelipe@@profusion.mobi>
132 @author Chidambar Zinnoury <illogict@@online.fr>
133 @author Vincent Torri <vtorri@@univ-evry.fr>
134 @author Gustavo Sverzut Barbieri <barbieri@@profusion.mobi>
135 @author Raphael Kubo da Costa <kubo@@profusion.mobi>
136 @author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
137 @author Albin "Lutin" Tonnerre <albin.tonnerre@@gmail.com>
138 @author Adam Simpkins <adam@@adamsimpkins.net>
139 @author Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
140
141 Please contact <enlightenment-devel@lists.sourceforge.net> to get in
142 contact with the developers and maintainers.
143 */
144
145#ifndef _EET_H
146#define _EET_H
147
148#include <stdlib.h>
149#include <stdio.h>
150#include <Eina.h>
151
152#ifdef EAPI
153# undef EAPI
154#endif /* ifdef EAPI */
155
156#ifdef _WIN32
157# ifdef EFL_EET_BUILD
158# ifdef DLL_EXPORT
159# define EAPI __declspec(dllexport)
160# else /* ifdef DLL_EXPORT */
161# define EAPI
162# endif /* ! DLL_EXPORT */
163# else /* ifdef EFL_EET_BUILD */
164# define EAPI __declspec(dllimport)
165# endif /* ! EFL_EET_BUILD */
166#else /* ifdef _WIN32 */
167# ifdef __GNUC__
168# if __GNUC__ >= 4
169# define EAPI __attribute__ ((visibility("default")))
170# else /* if __GNUC__ >= 4 */
171# define EAPI
172# endif /* if __GNUC__ >= 4 */
173# else /* ifdef __GNUC__ */
174# define EAPI
175# endif /* ifdef __GNUC__ */
176#endif /* ! _WIN32 */
177
178#ifdef __cplusplus
179extern "C" {
180#endif /* ifdef __cplusplus */
181
182/**
183 * @file Eet.h
184 * @brief The file that provides the eet functions.
185 *
186 * This header provides the Eet management functions.
187 *
188 */
189
190#define EET_VERSION_MAJOR 1
191#define EET_VERSION_MINOR 4
192/**
193 * @typedef Eet_Version
194 *
195 * This is the Eet version information structure that can be used at
196 * runtime to detect which version of eet is being used and adapt
197 * appropriately as follows for example:
198 *
199 * @code
200 * #if defined(EET_VERSION_MAJOR) && (EET_VERSION_MAJOR >= 1) && defined(EET_VERSION_MINOR) && (EET_VERSION_MINOR > 2)
201 * printf("Eet version: %i.%i.%i\n",
202 * eet_version->major,
203 * eet_version->minor,
204 * eet_version->micro);
205 * if (eet_version->revision > 0)
206 * {
207 * printf(" Built from SVN revision # %i\n", eet_version->revision);
208 * }
209 * #endif
210 * @endcode
211 *
212 * Note the #if check can be dropped if your program refuses to compile or
213 * work with an Eet version less than 1.3.0.
214 */
215typedef struct _Eet_Version
216{
217 int major; /** < major (binary or source incompatible changes) */
218 int minor; /** < minor (new features, bugfixes, major improvements version) */
219 int micro; /** < micro (bugfix, internal improvements, no new features version) */
220 int revision; /** < svn revision (0 if a proper rlease or the svn revsion number Eet is built from) */
221} Eet_Version;
222
223EAPI extern Eet_Version *eet_version;
224
225/**
226 * @defgroup Eet_Group Top level functions
227 * Functions that affect Eet as a whole.
228 *
229 * @{
230 */
231
232/**
233 * @enum _Eet_Error
234 * All the error identifiers known by Eet.
235 */
236typedef enum _Eet_Error
237{
238 EET_ERROR_NONE, /**< No error, it's all fine! */
239 EET_ERROR_BAD_OBJECT, /**< Given object or handle is NULL or invalid */
240 EET_ERROR_EMPTY, /**< There was nothing to do */
241 EET_ERROR_NOT_WRITABLE, /**< Could not write to file or file is #EET_FILE_MODE_READ */
242 EET_ERROR_OUT_OF_MEMORY, /**< Could not allocate memory */
243 EET_ERROR_WRITE_ERROR, /**< Failed to write data to destination */
244 EET_ERROR_WRITE_ERROR_FILE_TOO_BIG, /**< Failed to write file since it is too big */
245 EET_ERROR_WRITE_ERROR_IO_ERROR, /**< Failed to write due a generic Input/Output error */
246 EET_ERROR_WRITE_ERROR_OUT_OF_SPACE, /**< Failed to write due out of space */
247 EET_ERROR_WRITE_ERROR_FILE_CLOSED, /**< Failed to write because file was closed */
248 EET_ERROR_MMAP_FAILED, /**< Could not mmap file */
249 EET_ERROR_X509_ENCODING_FAILED, /**< Could not encode using X509 */
250 EET_ERROR_SIGNATURE_FAILED, /**< Could not validate signature */
251 EET_ERROR_INVALID_SIGNATURE, /**< Signature is invalid */
252 EET_ERROR_NOT_SIGNED, /**< File or contents are not signed */
253 EET_ERROR_NOT_IMPLEMENTED, /**< Function is not implemented */
254 EET_ERROR_PRNG_NOT_SEEDED, /**< Could not introduce random seed */
255 EET_ERROR_ENCRYPT_FAILED, /**< Could not encrypt contents */
256 EET_ERROR_DECRYPT_FAILED /**< Could not decrypt contents */
257} Eet_Error; /**< Eet error identifiers */
258
259/**
260 * @}
261 */
262
263/**
264 * Initialize the EET library.
265 *
266 * The first time this function is called, it will perform all the internal
267 * initialization required for the library to function properly and incrememnt
268 * the initializiation counter. Any subsequent call only increment this counter
269 * and return its new value, so it's safe to call this function more than once.
270 *
271 * @return The new init count. Will be 0 if initialization failed.
272 *
273 * @since 1.0.0
274 * @ingroup Eet_Group
275 */
276EAPI int
277eet_init(void);
278
279/**
280 * Shut down the EET library.
281 *
282 * If eet_init() was called more than once for the running application,
283 * eet_shutdown() will decrement the initialization counter and return its
284 * new value, without doing anything else. When the counter reaches 0, all
285 * of the internal elements will be shutdown and any memory used freed.
286 *
287 * @return The new init count.
288 *
289 * @since 1.0.0
290 * @ingroup Eet_Group
291 */
292EAPI int
293eet_shutdown(void);
294
295/**
296 * Clear eet cache
297 *
298 * For a faster access to previously accessed data, Eet keeps an internal
299 * cache of files. These files will be freed automatically only when
300 * they are unused and the cache gets full, in order based on the last time
301 * they were used.
302 * On systems with little memory this may present an unnecessary constraint,
303 * so eet_clearcache() is available for users to reclaim the memory used by
304 * files that are no longer needed. Those that were open using
305 * ::EET_FILE_MODE_WRITE or ::EET_FILE_MODE_READ_WRITE and have modifications,
306 * will be written down to disk before flushing them from memory.
307 *
308 * @since 1.0.0
309 * @ingroup Eet_Group
310 */
311EAPI void
312eet_clearcache(void);
313
314/**
315 * @defgroup Eet_File_Group Eet File Main Functions
316 *
317 * Functions to create, destroy and do basic manipulation of
318 * #Eet_File handles.
319 *
320 * This sections explains how to use the most basic Eet functions, which
321 * are used to work with eet files, read data from them, store it back in or
322 * take a look at what entries it contains, without making use of the
323 * serialization capabilities explained in @ref Eet_Data_Group.
324 *
325 * The following example will serve as an introduction to most, if not all,
326 * of these functions.
327 *
328 * If you are only using Eet, this is the only header you need to include.
329 * @dontinclude eet-file.c
330 * @skipline Eet.h
331 *
332 * Now let's create ourselves an eet file to play with. The following function
333 * shows step by step how to open a file and write some data in it.
334 * First, we define our file handler and some other things we'll put in it.
335 * @line static int
336 * @skip Eet_File
337 * @until ";
338 * @skip eet_open
339 *
340 * We open a new file in write mode, and if it fails, we just return, since
341 * there's not much more we can do about it..
342 * @until return
343 *
344 * Now, we need to write some data in our file. For now, strings will suffice,
345 * so let's just dump a bunch of them in there.
346 * @until }
347 *
348 * As you can see, we copied a string into our static buffer, which is a bit
349 * bigger than the full length of the string, and then told Eet to write it
350 * into the file, compressed, returning the size of the data written into the
351 * file.
352 * This is all to show that Eet treats data as just data. It doesn't matter
353 * what that data represents (for now), it's all just bytes for it. As running
354 * the following code will show, we took a string of around 30 bytes and put it
355 * in a buffer of 1024 bytes, but the returned size won't be any of those.
356 * @until printf
357 *
358 * Next, we copy into our buffer our set of strings, including their null
359 * terminators and write them into the file. No error checking for the sake
360 * of brevitiy. And a call to eet_sync() to make sure all out data is
361 * properly written down to disk, even though we haven't yet closed the file.
362 * @until eet_sync
363 *
364 * One more write, this time our large array of binary data and... well, I
365 * couldn't come up with a valid use of the last set of strings we stored,
366 * so let's take it out from the file with eet_delete().
367 * @until eet_delete
368 *
369 * Finally, we close the file, saving any changes back to disk and return.
370 * Notice how, if there's any error closing the file or saving its contents,
371 * the return value from the function will be a false one, which later on
372 * will make the program exit with an error code.
373 * @until return
374 *
375 * Moving onto our main function, we will open the same file and read it back.
376 * Trivial, but it'll show how we can do so in more than one way. We'll skip
377 * the variable declarations, as they aren't very different from what we've
378 * seen already.
379 *
380 * We start from the beginning by initializing Eet so things in general work.
381 * Forgetting to do so will result in weird results or crashes when calling
382 * any eet function, so if you experience something like that, the first thing
383 * to look at is whether eet_init() is missing.
384 * Then we call our @p create_eet_file function, described above, to make
385 * sure we have something to work with. If the function fails it will return
386 * 0 and we just exit, since nothing from here onwards will work anyway.
387 * @skip eet_init
388 * @until return
389 *
390 * Let's take a look now at what entries our file has. For this, we use
391 * eet_list(), which will return a list of strings, each being the name of
392 * one entry. Since we skipped before, it may be worth noting that @p list
393 * is declared as a @p char **.
394 * The @p num parameter will, of course, have the number of entries contained
395 * in our file.
396 * If everything's fine, we'll get our list and print it to the screen, and
397 * once done with it, we free the list. That's just the list, not its contents,
398 * as they are internal strings used by Eet and trying to free them will surely
399 * break things.
400 * @until }
401 *
402 * Reading back plain data is simple. Just a call to eet_read() with the file
403 * to read from, and the name of the entry we are interested in. We get back
404 * our data and the passed @p size parameter will contain the size of it. If
405 * the data was stored compressed, it will decompressed first.
406 * @until }
407 *
408 * Another simple read for the set of strings from before, except those were
409 * deleted, so we should get a NULL return and continue normally.
410 * @until }
411 *
412 * Finally, we'll get our binary data in the same way we got the strings. Once
413 * again, it makes no difference for Eet what the data is, it's up to us to
414 * know how to handle it.
415 * @until {
416 *
417 * Now some cheating, we know that this data is an Eet file because, well...
418 * we just know it. So we are going to open it and take a look at its insides.
419 * For this, eet_open() won't work, as it needs to have a file on disk to read
420 * from and all we have is some data in RAM.
421 *
422 * So how do we do? One way would be to create a normal file and write down
423 * our data, then open it with eet_open(). Another, faster and more efficient
424 * if all we want to do is read the file, is to use eet_memopen_read().
425 * @until memopen
426 *
427 * As you can see, the size we got from our previous read was put to good use
428 * this time. Unlike the first one where all we had were strings, the size
429 * of the data read only serves to demonstrate that we are reading back the
430 * entire size of our original @p buf variable.
431 *
432 * A little peeking to see how many entries the file has and to make an
433 * example of eet_num_entries() to get that number when we don't care about
434 * their names.
435 * @until printf
436 *
437 * More cheating follows. Just like we knew this was an Eet file, we also know
438 * what key to read from, and ontop of that we know that the data in it is not
439 * compressed.
440 * Knowing all this allows us to take some shortcuts.
441 * @until read_direct
442 *
443 * That's a direct print of our data, whatever that data is. We don't want
444 * to worry about having to free it later, so we just used eet_direct_read()
445 * to tell Eet to gives a pointer to the internal data in the file, without
446 * duplicating it. Since we said that data was not compressed, we shouldn't
447 * worry about printing garbage to the screen (and yes, we also know the data
448 * is yet another string).
449 * We also don't care about the size of the data as it was stored in the file,
450 * so we passed NULL as the size parameter.
451 * One very important note about this, however, is that we don't care about
452 * the size parameter because the data in the file contains the null
453 * terminator for the string. So when using Eet to store strings this way,
454 * it's very important to consider whether you will keep that final null
455 * byte, or to always get the size read and do the necessary checks and copies.
456 * It's up to the user and the particular use cases to decide how this will
457 * be done.
458 *
459 * With everything done, close this second file and free the data used to open
460 * it. And this is important, we can't free that data until we are done with
461 * the file, as Eet is using it. When opening with eet_memopen_read(), the data
462 * passed to it must be available for as long as the the file is open.
463 * @until }
464 *
465 * Finally, we close the first file, shutdown all internal resources used by
466 * Eet and leave our main function, thus terminating our program.
467 * @until return
468 *
469 * You can look at the full code of the example @ref eet-file.c "here".
470 * @{
471 */
472
473/**
474 * @enum _Eet_File_Mode
475 * Modes that a file can be opened.
476 */
477typedef enum _Eet_File_Mode
478{
479 EET_FILE_MODE_INVALID = -1,
480 EET_FILE_MODE_READ, /**< File is read-only. */
481 EET_FILE_MODE_WRITE, /**< File is write-only. */
482 EET_FILE_MODE_READ_WRITE /**< File is for both read and write */
483} Eet_File_Mode; /**< Modes that a file can be opened. */
484
485/**
486 * @typedef Eet_File
487 * Opaque handle that defines an Eet file (or memory).
488 *
489 * This handle will be returned by the functions eet_open() and
490 * eet_memopen_read() and is used by every other function that affects the
491 * file in any way. When you are done with it, call eet_close() to clsoe it
492 * and, if the file was open for writing, write down to disk any changes made
493 * to it.
494 *
495 * @see eet_open()
496 * @see eet_memopen_read()
497 * @see eet_close()
498 */
499typedef struct _Eet_File Eet_File;
500
501/**
502 * @typedef Eet_Dictionary
503 * Opaque handle that defines a file-backed (mmaped) dictionary of strings.
504 */
505typedef struct _Eet_Dictionary Eet_Dictionary;
506
507/**
508 * @}
509 */
510
511/**
512 * Open an eet file on disk, and returns a handle to it.
513 * @param file The file path to the eet file. eg: @c "/tmp/file.eet".
514 * @param mode The mode for opening. Either #EET_FILE_MODE_READ,
515 * #EET_FILE_MODE_WRITE or #EET_FILE_MODE_READ_WRITE.
516 * @return An opened eet file handle.
517 * @ingroup Eet_File_Group
518 *
519 * This function will open an exiting eet file for reading, and build
520 * the directory table in memory and return a handle to the file, if it
521 * exists and can be read, and no memory errors occur on the way, otherwise
522 * NULL will be returned.
523 *
524 * It will also open an eet file for writing. This will, if successful,
525 * delete the original file and replace it with a new empty file, till
526 * the eet file handle is closed or flushed. If it cannot be opened for
527 * writing or a memory error occurs, NULL is returned.
528 *
529 * You can also open the file for read/write. If you then write a key that
530 * does not exist it will be created, if the key exists it will be replaced
531 * by the new data.
532 *
533 * If the same file is opened multiple times, then the same file handle will
534 * be returned as eet maintains an internal list of all currently open
535 * files. Note that it considers files opened for read only and those opened
536 * for read/write and write only as 2 separate sets. Those that do not write
537 * to the file and those that do. Eet will allow 2 handles to the same file
538 * if they are in the 2 separate lists/groups. That means opening a file for
539 * read only looks in the read only set, and returns a handle to that file
540 * handle and increments its reference count. If you open a file for read/write
541 * or write only it looks in the write set and returns a handle after
542 * incrementing the reference count. You need to close an eet file handle
543 * as many times as it has been opened to maintain correct reference counts.
544 * Files whose modified timestamp or size do not match those of the existing
545 * referenced file handles will not be returned and a new handle will be
546 * returned instead.
547 *
548 * @since 1.0.0
549 */
550EAPI Eet_File *
551eet_open(const char *file,
552 Eet_File_Mode mode);
553
554/**
555 * Open an eet file directly from a memory location. The data is not copied,
556 * so you must keep it around as long as the eet file is open. There is
557 * currently no cache for this kind of Eet_File, so it's reopened every time
558 * you use eet_memopen_read.
559 * Files opened this way will always be in read-only mode.
560 *
561 * @since 1.1.0
562 * @ingroup Eet_File_Group
563 */
564EAPI Eet_File *
565eet_memopen_read(const void *data,
566 size_t size);
567
568/**
569 * Get the mode an Eet_File was opened with.
570 * @param ef A valid eet file handle.
571 * @return The mode ef was opened with.
572 *
573 * @since 1.0.0
574 * @ingroup Eet_File_Group
575 */
576EAPI Eet_File_Mode
577eet_mode_get(Eet_File *ef);
578
579/**
580 * Close an eet file handle and flush and writes pending.
581 * @param ef A valid eet file handle.
582 *
583 * This function will flush any pending writes to disk if the eet file
584 * was opened for write, and free all data associated with the file handle
585 * and file, and close the file.
586 *
587 * If the eet file handle is not valid nothing will be done.
588 *
589 * @since 1.0.0
590 * @ingroup Eet_File_Group
591 */
592EAPI Eet_Error
593eet_close(Eet_File *ef);
594
595/**
596 * Sync content of an eet file handle, flushing pending writes.
597 * @param ef A valid eet file handle.
598 *
599 * This function will flush any pending writes to disk. The eet file must
600 * be opened for write.
601 *
602 * If the eet file handle is not valid nothing will be done.
603 *
604 * @since 1.2.4
605 * @ingroup Eet_File_Group
606 */
607EAPI Eet_Error
608eet_sync(Eet_File *ef);
609
610/**
611 * Return a handle to the shared string dictionary of the Eet file
612 * @param ef A valid eet file handle.
613 * @return A handle to the dictionary of the file
614 *
615 * This function returns a handle to the dictionary of an Eet file whose
616 * handle is @p ef, if a dictionary exists. NULL is returned otherwise or
617 * if the file handle is known to be invalid.
618 *
619 * @see eet_dictionary_string_check() to know if given string came
620 * from the dictionary or it was dynamically allocated using
621 * the #Eet_Data_Descriptor_Class instructrions.
622 *
623 * @since 1.0.0
624 * @ingroup Eet_File_Group
625 */
626EAPI Eet_Dictionary *
627eet_dictionary_get(Eet_File *ef);
628
629/**
630 * Check if a given string comes from a given dictionary
631 * @param ed A valid dictionary handle
632 * @param string A valid 0 byte terminated C string
633 * @return 1 if it is in the dictionary, 0 otherwise
634 *
635 * This checks the given dictionary to see if the given string is actually
636 * inside that dictionary (i.e. comes from it) and returns 1 if it does.
637 * If the dictionary handle is invalid, the string is NULL or the string is
638 * not in the dictionary, 0 is returned.
639 *
640 * @since 1.0.0
641 * @ingroup Eet_File_Group
642 */
643EAPI int
644eet_dictionary_string_check(Eet_Dictionary *ed,
645 const char *string);
646
647/**
648 * Read a specified entry from an eet file and return data
649 * @param ef A valid eet file handle opened for reading.
650 * @param name Name of the entry. eg: "/base/file_i_want".
651 * @param size_ret Number of bytes read from entry and returned.
652 * @return The data stored in that entry in the eet file.
653 *
654 * This function finds an entry in the eet file that is stored under the
655 * name specified, and returns that data, decompressed, if successful.
656 * NULL is returned if the lookup fails or if memory errors are
657 * encountered. It is the job of the calling program to call free() on
658 * the returned data. The number of bytes in the returned data chunk are
659 * placed in size_ret.
660 *
661 * If the eet file handle is not valid NULL is returned and size_ret is
662 * filled with 0.
663 *
664 * @see eet_read_cipher()
665 *
666 * @since 1.0.0
667 * @ingroup Eet_File_Group
668 */
669EAPI void *
670eet_read(Eet_File *ef,
671 const char *name,
672 int *size_ret);
673
674/**
675 * Read a specified entry from an eet file and return data
676 * @param ef A valid eet file handle opened for reading.
677 * @param name Name of the entry. eg: "/base/file_i_want".
678 * @param size_ret Number of bytes read from entry and returned.
679 * @return The data stored in that entry in the eet file.
680 *
681 * This function finds an entry in the eet file that is stored under the
682 * name specified, and returns that data if not compressed and successful.
683 * NULL is returned if the lookup fails or if memory errors are
684 * encountered or if the data is comrpessed. The calling program must never
685 * call free() on the returned data. The number of bytes in the returned
686 * data chunk are placed in size_ret.
687 *
688 * If the eet file handle is not valid NULL is returned and size_ret is
689 * filled with 0.
690 *
691 * @since 1.0.0
692 * @ingroup Eet_File_Group
693 */
694EAPI const void *
695eet_read_direct(Eet_File *ef,
696 const char *name,
697 int *size_ret);
698
699/**
700 * Write a specified entry to an eet file handle
701 * @param ef A valid eet file handle opened for writing.
702 * @param name Name of the entry. eg: "/base/file_i_want".
703 * @param data Pointer to the data to be stored.
704 * @param size Length in bytes in the data to be stored.
705 * @param compress Compression flags (1 == compress, 0 = don't compress).
706 * @return bytes written on successful write, 0 on failure.
707 *
708 * This function will write the specified chunk of data to the eet file
709 * and return greater than 0 on success. 0 will be returned on failure.
710 *
711 * The eet file handle must be a valid file handle for an eet file opened
712 * for writing. If it is not, 0 will be returned and no action will be
713 * performed.
714 *
715 * Name, and data must not be NULL, and size must be > 0. If these
716 * conditions are not met, 0 will be returned.
717 *
718 * The data will be copied (and optionally compressed) in ram, pending
719 * a flush to disk (it will stay in ram till the eet file handle is
720 * closed though).
721 *
722 * @see eet_write_cipher()
723 *
724 * @since 1.0.0
725 * @ingroup Eet_File_Group
726 */
727EAPI int
728eet_write(Eet_File *ef,
729 const char *name,
730 const void *data,
731 int size,
732 int compress);
733
734/**
735 * Delete a specified entry from an Eet file being written or re-written
736 * @param ef A valid eet file handle opened for writing.
737 * @param name Name of the entry. eg: "/base/file_i_want".
738 * @return Success or failure of the delete.
739 *
740 * This function will delete the specified chunk of data from the eet file
741 * and return greater than 0 on success. 0 will be returned on failure.
742 *
743 * The eet file handle must be a valid file handle for an eet file opened
744 * for writing. If it is not, 0 will be returned and no action will be
745 * performed.
746 *
747 * Name, must not be NULL, otherwise 0 will be returned.
748 *
749 * @since 1.0.0
750 * @ingroup Eet_File_Group
751 */
752EAPI int
753eet_delete(Eet_File *ef,
754 const char *name);
755
756/**
757 * Alias a specific section to another one. Destination may exist or not,
758 * no check are done.
759 * @param ef A valid eet file handle opened for writing.
760 * @param name Name of the new entry. eg: "/base/file_i_want".
761 * @param destination Actual source of the aliased entry eg: "/base/the_real_stuff_i_want".
762 * @param compress Compression flags (1 == compress, 0 = don't compress).
763 * @return EINA_TRUE on success, EINA_FALSE on failure.
764 *
765 * Name and Destination must not be NULL, otherwise EINA_FALSE will be returned.
766 * The equivalent of this would be calling 'ln -s destination name'
767 *
768 * @since 1.3.3
769 * @ingroup Eet_File_Group
770 */
771EAPI Eina_Bool
772eet_alias(Eet_File *ef,
773 const char *name,
774 const char *destination,
775 int compress);
776
777/**
778 * Retrieve the destination name of an alias
779 * @param ef A valid eet file handle opened for writing
780 * @param name Name of the entry. eg: "/base/file_i_want"
781 * @return Destination of the alias. eg: "/base/the_real_stuff_i_want", NULL on failure
782 *
783 * Name must not be NULL, otherwise NULL will be returned.
784 *
785 * @since 1.5
786 * @ingroup Eet_File_Group
787 */
788EAPI const char *
789eet_alias_get(Eet_File *ef,
790 const char *name);
791
792/**
793 * List all entries in eet file matching shell glob.
794 * @param ef A valid eet file handle.
795 * @param glob A shell glob to match against.
796 * @param count_ret Number of entries found to match.
797 * @return Pointer to an array of strings.
798 *
799 * This function will list all entries in the eet file matching the
800 * supplied shell glob and return an allocated list of their names, if
801 * there are any, and if no memory errors occur.
802 *
803 * The eet file handle must be valid and glob must not be NULL, or NULL
804 * will be returned and count_ret will be filled with 0.
805 *
806 * The calling program must call free() on the array returned, but NOT
807 * on the string pointers in the array. They are taken as read-only
808 * internals from the eet file handle. They are only valid as long as
809 * the file handle is not closed. When it is closed those pointers in the
810 * array are now not valid and should not be used.
811 *
812 * On success the array returned will have a list of string pointers
813 * that are the names of the entries that matched, and count_ret will have
814 * the number of entries in this array placed in it.
815 *
816 * Hint: an easy way to list all entries in an eet file is to use a glob
817 * value of "*".
818 *
819 * @since 1.0.0
820 * @ingroup Eet_File_Group
821 */
822EAPI char **
823eet_list(Eet_File *ef,
824 const char *glob,
825 int *count_ret);
826
827/**
828 * Return the number of entries in the specified eet file.
829 * @param ef A valid eet file handle.
830 * @return Number of entries in ef or -1 if the number of entries
831 * cannot be read due to open mode restrictions.
832 *
833 * @since 1.0.0
834 * @ingroup Eet_File_Group
835 */
836EAPI int
837eet_num_entries(Eet_File *ef);
838
839/**
840 * @defgroup Eet_File_Cipher_Group Eet File Ciphered Main Functions
841 *
842 * Most of the @ref Eet_File_Group have alternative versions that
843 * accounts for ciphers to protect their content.
844 *
845 * @see @ref Eet_Cipher_Group
846 *
847 * @ingroup Eet_File_Group
848 */
849
850/**
851 * Read a specified entry from an eet file and return data using a cipher.
852 * @param ef A valid eet file handle opened for reading.
853 * @param name Name of the entry. eg: "/base/file_i_want".
854 * @param size_ret Number of bytes read from entry and returned.
855 * @param cipher_key The key to use as cipher.
856 * @return The data stored in that entry in the eet file.
857 *
858 * This function finds an entry in the eet file that is stored under the
859 * name specified, and returns that data, decompressed, if successful.
860 * NULL is returned if the lookup fails or if memory errors are
861 * encountered. It is the job of the calling program to call free() on
862 * the returned data. The number of bytes in the returned data chunk are
863 * placed in size_ret.
864 *
865 * If the eet file handle is not valid NULL is returned and size_ret is
866 * filled with 0.
867 *
868 * @see eet_read()
869 *
870 * @since 1.0.0
871 * @ingroup Eet_File_Cipher_Group
872 */
873EAPI void *
874eet_read_cipher(Eet_File *ef,
875 const char *name,
876 int *size_ret,
877 const char *cipher_key);
878
879/**
880 * Write a specified entry to an eet file handle using a cipher.
881 * @param ef A valid eet file handle opened for writing.
882 * @param name Name of the entry. eg: "/base/file_i_want".
883 * @param data Pointer to the data to be stored.
884 * @param size Length in bytes in the data to be stored.
885 * @param compress Compression flags (1 == compress, 0 = don't compress).
886 * @param cipher_key The key to use as cipher.
887 * @return bytes written on successful write, 0 on failure.
888 *
889 * This function will write the specified chunk of data to the eet file
890 * and return greater than 0 on success. 0 will be returned on failure.
891 *
892 * The eet file handle must be a valid file handle for an eet file opened
893 * for writing. If it is not, 0 will be returned and no action will be
894 * performed.
895 *
896 * Name, and data must not be NULL, and size must be > 0. If these
897 * conditions are not met, 0 will be returned.
898 *
899 * The data will be copied (and optionally compressed) in ram, pending
900 * a flush to disk (it will stay in ram till the eet file handle is
901 * closed though).
902 *
903 * @see eet_write()
904 *
905 * @since 1.0.0
906 * @ingroup Eet_File_Cipher_Group
907 */
908EAPI int
909eet_write_cipher(Eet_File *ef,
910 const char *name,
911 const void *data,
912 int size,
913 int compress,
914 const char *cipher_key);
915
916/**
917 * @defgroup Eet_File_Image_Group Image Store and Load
918 *
919 * Eet efficiently stores and loads images, including alpha
920 * channels and lossy compressions.
921 *
922 * Eet can handle both lossy compression with different levels of quality and
923 * non-lossy compression with different compression levels. It's also possible,
924 * given an image data, to only read its header to get the image information
925 * without decoding the entire content for it.
926 *
927 * The encode family of functions will take an image raw buffer and its
928 * parameters and compress it in memory, returning the new buffer.
929 * Likewise, the decode functions will read from the given location in memory
930 * and return the uncompressed image.
931 *
932 * The read and write functions will, respectively, encode and decode to or
933 * from an Eet file, under the specified key.
934 *
935 * These functions are fairly low level and the same functionality can be
936 * achieved using Evas and Edje, making it much easier to work with images
937 * as well as not needing to worry about things like scaling them.
938 */
939
940/**
941 * Read just the header data for an image and dont decode the pixels.
942 * @param ef A valid eet file handle opened for reading.
943 * @param name Name of the entry. eg: "/base/file_i_want".
944 * @param w A pointer to the unsigned int to hold the width in pixels.
945 * @param h A pointer to the unsigned int to hold the height in pixels.
946 * @param alpha A pointer to the int to hold the alpha flag.
947 * @param compress A pointer to the int to hold the compression amount.
948 * @param quality A pointer to the int to hold the quality amount.
949 * @param lossy A pointer to the int to hold the lossiness flag.
950 * @return 1 on successful decode, 0 otherwise
951 *
952 * Reads and decodes the image header data stored under the given key and
953 * Eet file.
954 *
955 * The information decoded is placed in each of the parameters, which must be
956 * provided. The width and height, measured in pixels, will be stored under
957 * the variables pointed by @p w and @p h, respectively. If the read or
958 * decode of the header fails, this values will be 0. The @p alpha parameter
959 * will be 1 or 0, denoting if the alpha channel of the image is used or not.
960 * If the image was losslessly compressed, the @p compress parameter will hold
961 * the compression amount used, ranging from 0 to 9 and @p lossy will be 0.
962 * In the case of lossy compression, @p lossy will be 1, and the compression
963 * quality will be placed under @p quality, with a value ranging from 0 to 100.
964 *
965 * @see eet_data_image_header_decode()
966 * @see eet_data_image_header_read_cipher()
967 *
968 * @since 1.0.0
969 * @ingroup Eet_File_Image_Group
970 */
971EAPI int
972eet_data_image_header_read(Eet_File *ef,
973 const char *name,
974 unsigned int *w,
975 unsigned int *h,
976 int *alpha,
977 int *compress,
978 int *quality,
979 int *lossy);
980
981/**
982 * Read image data from the named key in the eet file.
983 * @param ef A valid eet file handle opened for reading.
984 * @param name Name of the entry. eg: "/base/file_i_want".
985 * @param w A pointer to the unsigned int to hold the width in pixels.
986 * @param h A pointer to the unsigned int to hold the height in pixels.
987 * @param alpha A pointer to the int to hold the alpha flag.
988 * @param compress A pointer to the int to hold the compression amount.
989 * @param quality A pointer to the int to hold the quality amount.
990 * @param lossy A pointer to the int to hold the lossiness flag.
991 * @return The image pixel data decoded
992 *
993 * Reads and decodes the image stored in the given Eet file under the named
994 * key.
995 *
996 * The returned pixel data is a linear array of pixels starting from the
997 * top-left of the image, scanning row by row from left to right. Each pile
998 * is a 32bit value, with the high byte being the alpha channel, the next being
999 * red, then green, and the low byte being blue.
1000 *
1001 * The rest of the parameters are the same as in eet_data_image_header_read().
1002 *
1003 * On success the function returns a pointer to the image data decoded. The
1004 * calling application is responsible for calling free() on the image data
1005 * when it is done with it. On failure NULL is returned and the parameter
1006 * values may not contain any sensible data.
1007 *
1008 * @see eet_data_image_header_read()
1009 * @see eet_data_image_decode()
1010 * @see eet_data_image_read_cipher()
1011 * @see eet_data_image_read_to_surface()
1012 *
1013 * @since 1.0.0
1014 * @ingroup Eet_File_Image_Group
1015 */
1016EAPI void *
1017eet_data_image_read(Eet_File *ef,
1018 const char *name,
1019 unsigned int *w,
1020 unsigned int *h,
1021 int *alpha,
1022 int *compress,
1023 int *quality,
1024 int *lossy);
1025
1026/**
1027 * Read image data from the named key in the eet file and store it in the given buffer.
1028 * @param ef A valid eet file handle opened for reading.
1029 * @param name Name of the entry. eg: "/base/file_i_want".
1030 * @param src_x The starting x coordinate from where to dump the stream.
1031 * @param src_y The starting y coordinate from where to dump the stream.
1032 * @param d A pointer to the pixel surface.
1033 * @param w The expected width in pixels of the pixel surface to decode.
1034 * @param h The expected height in pixels of the pixel surface to decode.
1035 * @param row_stride The length of a pixels line in the destination surface.
1036 * @param alpha A pointer to the int to hold the alpha flag.
1037 * @param compress A pointer to the int to hold the compression amount.
1038 * @param quality A pointer to the int to hold the quality amount.
1039 * @param lossy A pointer to the int to hold the lossiness flag.
1040 * @return 1 on success, 0 otherwise.
1041 *
1042 * Reads and decodes the image stored in the given Eet file, placing the
1043 * resulting pixel data in the buffer pointed by the user.
1044 *
1045 * Like eet_data_image_read(), it takes the image data stored under the
1046 * @p name key in the @p ef file, but instead of returning a new buffer with
1047 * the pixel data, it places the result in the buffer pointed by @p d, which
1048 * must be provided by the user and of sufficient size to hold the requested
1049 * portion of the image.
1050 *
1051 * The @p src_x and @p src_y parameters indicate the top-left corner of the
1052 * section of the image to decode. These have to be higher or equal than 0 and
1053 * less than the respective total width and height of the image. The width
1054 * and height of the section of the image to decode are given in @p w and @p h
1055 * and also can't be higher than the total width and height of the image.
1056 *
1057 * The @p row_stride parameter indicates the length in bytes of each line in
1058 * the destination buffer and it has to be at least @p w * 4.
1059 *
1060 * All the other parameters are the same as in eet_data_image_read().
1061 *
1062 * On success the function returns 1, and 0 on failure. On failure the
1063 * parameter values may not contain any sensible data.
1064 *
1065 * @see eet_data_image_read()
1066 * @see eet_data_image_decode()
1067 * @see eet_data_image_decode_to_surface()
1068 * @see eet_data_image_read_to_surface_cipher()
1069 *
1070 * @since 1.0.2
1071 * @ingroup Eet_File_Image_Group
1072 */
1073EAPI int
1074eet_data_image_read_to_surface(Eet_File *ef,
1075 const char *name,
1076 unsigned int src_x,
1077 unsigned int src_y,
1078 unsigned int *d,
1079 unsigned int w,
1080 unsigned int h,
1081 unsigned int row_stride,
1082 int *alpha,
1083 int *compress,
1084 int *quality,
1085 int *lossy);
1086
1087/**
1088 * Write image data to the named key in an eet file.
1089 * @param ef A valid eet file handle opened for writing.
1090 * @param name Name of the entry. eg: "/base/file_i_want".
1091 * @param data A pointer to the image pixel data.
1092 * @param w The width of the image in pixels.
1093 * @param h The height of the image in pixels.
1094 * @param alpha The alpha channel flag.
1095 * @param compress The compression amount.
1096 * @param quality The quality encoding amount.
1097 * @param lossy The lossiness flag.
1098 * @return Success if the data was encoded and written or not.
1099 *
1100 * This function takes image pixel data and encodes it in an eet file
1101 * stored under the supplied name key, and returns how many bytes were
1102 * actually written to encode the image data.
1103 *
1104 * The data expected is the same format as returned by eet_data_image_read.
1105 * If this is not the case weird things may happen. Width and height must
1106 * be between 1 and 8000 pixels. The alpha flags can be 0 or 1 (0 meaning
1107 * the alpha values are not useful and 1 meaning they are). Compress can
1108 * be from 0 to 9 (0 meaning no compression, 9 meaning full compression).
1109 * This is only used if the image is not lossily encoded. Quality is used on
1110 * lossy compression and should be a value from 0 to 100. The lossy flag
1111 * can be 0 or 1. 0 means encode losslessly and 1 means to encode with
1112 * image quality loss (but then have a much smaller encoding).
1113 *
1114 * On success this function returns the number of bytes that were required
1115 * to encode the image data, or on failure it returns 0.
1116 *
1117 * @see eet_data_image_read()
1118 * @see eet_data_image_encode()
1119 * @see eet_data_image_write_cipher()
1120 *
1121 * @since 1.0.0
1122 * @ingroup Eet_File_Image_Group
1123 */
1124EAPI int
1125eet_data_image_write(Eet_File *ef,
1126 const char *name,
1127 const void *data,
1128 unsigned int w,
1129 unsigned int h,
1130 int alpha,
1131 int compress,
1132 int quality,
1133 int lossy);
1134
1135/**
1136 * Decode Image data header only to get information.
1137 * @param data The encoded pixel data.
1138 * @param size The size, in bytes, of the encoded pixel data.
1139 * @param w A pointer to the unsigned int to hold the width in pixels.
1140 * @param h A pointer to the unsigned int to hold the height in pixels.
1141 * @param alpha A pointer to the int to hold the alpha flag.
1142 * @param compress A pointer to the int to hold the compression amount.
1143 * @param quality A pointer to the int to hold the quality amount.
1144 * @param lossy A pointer to the int to hold the lossiness flag.
1145 * @return 1 on success, 0 on failure.
1146 *
1147 * This function works exactly like eet_data_image_header_read(), but instead
1148 * of reading from an Eet file, it takes the buffer of size @p size pointed
1149 * by @p data, which must be a valid Eet encoded image.
1150 *
1151 * On success the function returns 1 indicating the header was read and
1152 * decoded properly, or 0 on failure.
1153 *
1154 * @see eet_data_image_header_read()
1155 * @see eet_data_image_header_decode_cipher()
1156 *
1157 * @since 1.0.0
1158 * @ingroup Eet_File_Image_Group
1159 */
1160EAPI int
1161eet_data_image_header_decode(const void *data,
1162 int size,
1163 unsigned int *w,
1164 unsigned int *h,
1165 int *alpha,
1166 int *compress,
1167 int *quality,
1168 int *lossy);
1169
1170/**
1171 * Decode Image data into pixel data.
1172 * @param data The encoded pixel data.
1173 * @param size The size, in bytes, of the encoded pixel data.
1174 * @param w A pointer to the unsigned int to hold the width in pixels.
1175 * @param h A pointer to the unsigned int to hold the height in pixels.
1176 * @param alpha A pointer to the int to hold the alpha flag.
1177 * @param compress A pointer to the int to hold the compression amount.
1178 * @param quality A pointer to the int to hold the quality amount.
1179 * @param lossy A pointer to the int to hold the lossiness flag.
1180 * @return The image pixel data decoded
1181 *
1182 * This function takes encoded pixel data and decodes it into raw RGBA
1183 * pixels on success.
1184 *
1185 * It works exactly like eet_data_image_read(), but it takes the encoded
1186 * data in the @p data buffer of size @p size, instead of reading from a file.
1187 * All the others parameters are also the same.
1188 *
1189 * On success the function returns a pointer to the image data decoded. The
1190 * calling application is responsible for calling free() on the image data
1191 * when it is done with it. On failure NULL is returned and the parameter
1192 * values may not contain any sensible data.
1193 *
1194 * @see eet_data_image_read()
1195 * @see eet_data_image_decode_cipher()
1196 *
1197 * @since 1.0.0
1198 * @ingroup Eet_File_Image_Group
1199 */
1200EAPI void *
1201eet_data_image_decode(const void *data,
1202 int size,
1203 unsigned int *w,
1204 unsigned int *h,
1205 int *alpha,
1206 int *compress,
1207 int *quality,
1208 int *lossy);
1209
1210/**
1211 * Decode Image data into pixel data and stores in the given buffer.
1212 * @param data The encoded pixel data.
1213 * @param size The size, in bytes, of the encoded pixel data.
1214 * @param src_x The starting x coordinate from where to dump the stream.
1215 * @param src_y The starting y coordinate from where to dump the stream.
1216 * @param d A pointer to the pixel surface.
1217 * @param w The expected width in pixels of the pixel surface to decode.
1218 * @param h The expected height in pixels of the pixel surface to decode.
1219 * @param row_stride The length of a pixels line in the destination surface.
1220 * @param alpha A pointer to the int to hold the alpha flag.
1221 * @param compress A pointer to the int to hold the compression amount.
1222 * @param quality A pointer to the int to hold the quality amount.
1223 * @param lossy A pointer to the int to hold the lossiness flag.
1224 * @return 1 on success, 0 otherwise.
1225 *
1226 * Like eet_data_image_read_to_surface(), but reading the given @p data buffer
1227 * instead of a file.
1228 *
1229 * On success the function returns 1, and 0 on failure. On failure the
1230 * parameter values may not contain any sensible data.
1231 *
1232 * @see eet_data_image_read_to_surface()
1233 * @see eet_data_image_decode_to_surface_cipher()
1234 *
1235 * @since 1.0.2
1236 * @ingroup Eet_File_Image_Group
1237 */
1238EAPI int
1239eet_data_image_decode_to_surface(const void *data,
1240 int size,
1241 unsigned int src_x,
1242 unsigned int src_y,
1243 unsigned int *d,
1244 unsigned int w,
1245 unsigned int h,
1246 unsigned int row_stride,
1247 int *alpha,
1248 int *compress,
1249 int *quality,
1250 int *lossy);
1251
1252/**
1253 * Encode image data for storage or transmission.
1254 * @param data A pointer to the image pixel data.
1255 * @param size_ret A pointer to an int to hold the size of the returned data.
1256 * @param w The width of the image in pixels.
1257 * @param h The height of the image in pixels.
1258 * @param alpha The alpha channel flag.
1259 * @param compress The compression amount.
1260 * @param quality The quality encoding amount.
1261 * @param lossy The lossiness flag.
1262 * @return The encoded image data.
1263 *
1264 * This function stakes image pixel data and encodes it with compression and
1265 * possible loss of quality (as a trade off for size) for storage or
1266 * transmission to another system.
1267 *
1268 * It works like eet_data_image_write(), but instead of writing the encoded
1269 * image into an Eet file, it allocates a new buffer of the size required and
1270 * returns the encoded data in it.
1271 *
1272 * On success this function returns a pointer to the encoded data that you
1273 * can free with free() when no longer needed.
1274 *
1275 * @see eet_data_image_write()
1276 * @see eet_data_image_read()
1277 * @see eet_data_image_encode_cipher()
1278 *
1279 * @since 1.0.0
1280 * @ingroup Eet_File_Image_Group
1281 */
1282EAPI void *
1283eet_data_image_encode(const void *data,
1284 int *size_ret,
1285 unsigned int w,
1286 unsigned int h,
1287 int alpha,
1288 int compress,
1289 int quality,
1290 int lossy);
1291
1292/**
1293 * @defgroup Eet_File_Image_Cipher_Group Image Store and Load using a Cipher
1294 *
1295 * Most of the @ref Eet_File_Image_Group have alternative versions
1296 * that accounts for ciphers to protect their content.
1297 *
1298 * @see @ref Eet_Cipher_Group
1299 *
1300 * @ingroup Eet_File_Image_Group
1301 */
1302
1303/**
1304 * Read just the header data for an image and dont decode the pixels using a cipher.
1305 * @param ef A valid eet file handle opened for reading.
1306 * @param name Name of the entry. eg: "/base/file_i_want".
1307 * @param cipher_key The key to use as cipher.
1308 * @param w A pointer to the unsigned int to hold the width in pixels.
1309 * @param h A pointer to the unsigned int to hold the height in pixels.
1310 * @param alpha A pointer to the int to hold the alpha flag.
1311 * @param compress A pointer to the int to hold the compression amount.
1312 * @param quality A pointer to the int to hold the quality amount.
1313 * @param lossy A pointer to the int to hold the lossiness flag.
1314 * @return 1 on successful decode, 0 otherwise
1315 *
1316 * This function reads an image from an eet file stored under the named
1317 * key in the eet file and return a pointer to the decompressed pixel data.
1318 *
1319 * The other parameters of the image (width, height etc.) are placed into
1320 * the values pointed to (they must be supplied). The pixel data is a linear
1321 * array of pixels starting from the top-left of the image scanning row by
1322 * row from left to right. Each pixel is a 32bit value, with the high byte
1323 * being the alpha channel, the next being red, then green, and the low byte
1324 * being blue. The width and height are measured in pixels and will be
1325 * greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes
1326 * that the alpha channel is not used. 1 denotes that it is significant.
1327 * Compress is filled with the compression value/amount the image was
1328 * stored with. The quality value is filled with the quality encoding of
1329 * the image file (0 - 100). The lossy flags is either 0 or 1 as to if
1330 * the image was encoded lossily or not.
1331 *
1332 * On success the function returns 1 indicating the header was read and
1333 * decoded properly, or 0 on failure.
1334 *
1335 * @see eet_data_image_header_read()
1336 *
1337 * @since 1.0.0
1338 * @ingroup Eet_File_Image_Cipher_Group
1339 */
1340EAPI int
1341eet_data_image_header_read_cipher(Eet_File *ef,
1342 const char *name,
1343 const char *cipher_key,
1344 unsigned int *w,
1345 unsigned int *h,
1346 int *alpha,
1347 int *compress,
1348 int *quality,
1349 int *lossy);
1350
1351/**
1352 * Read image data from the named key in the eet file using a cipher.
1353 * @param ef A valid eet file handle opened for reading.
1354 * @param name Name of the entry. eg: "/base/file_i_want".
1355 * @param cipher_key The key to use as cipher.
1356 * @param w A pointer to the unsigned int to hold the width in pixels.
1357 * @param h A pointer to the unsigned int to hold the height in pixels.
1358 * @param alpha A pointer to the int to hold the alpha flag.
1359 * @param compress A pointer to the int to hold the compression amount.
1360 * @param quality A pointer to the int to hold the quality amount.
1361 * @param lossy A pointer to the int to hold the lossiness flag.
1362 * @return The image pixel data decoded
1363 *
1364 * This function reads an image from an eet file stored under the named
1365 * key in the eet file and return a pointer to the decompressed pixel data.
1366 *
1367 * The other parameters of the image (width, height etc.) are placed into
1368 * the values pointed to (they must be supplied). The pixel data is a linear
1369 * array of pixels starting from the top-left of the image scanning row by
1370 * row from left to right. Each pixel is a 32bit value, with the high byte
1371 * being the alpha channel, the next being red, then green, and the low byte
1372 * being blue. The width and height are measured in pixels and will be
1373 * greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes
1374 * that the alpha channel is not used. 1 denotes that it is significant.
1375 * Compress is filled with the compression value/amount the image was
1376 * stored with. The quality value is filled with the quality encoding of
1377 * the image file (0 - 100). The lossy flags is either 0 or 1 as to if
1378 * the image was encoded lossily or not.
1379 *
1380 * On success the function returns a pointer to the image data decoded. The
1381 * calling application is responsible for calling free() on the image data
1382 * when it is done with it. On failure NULL is returned and the parameter
1383 * values may not contain any sensible data.
1384 *
1385 * @see eet_data_image_read()
1386 *
1387 * @since 1.0.0
1388 * @ingroup Eet_File_Image_Cipher_Group
1389 */
1390EAPI void *
1391eet_data_image_read_cipher(Eet_File *ef,
1392 const char *name,
1393 const char *cipher_key,
1394 unsigned int *w,
1395 unsigned int *h,
1396 int *alpha,
1397 int *compress,
1398 int *quality,
1399 int *lossy);
1400
1401/**
1402 * Read image data from the named key in the eet file using a cipher.
1403 * @param ef A valid eet file handle opened for reading.
1404 * @param name Name of the entry. eg: "/base/file_i_want".
1405 * @param cipher_key The key to use as cipher.
1406 * @param src_x The starting x coordinate from where to dump the stream.
1407 * @param src_y The starting y coordinate from where to dump the stream.
1408 * @param d A pointer to the pixel surface.
1409 * @param w The expected width in pixels of the pixel surface to decode.
1410 * @param h The expected height in pixels of the pixel surface to decode.
1411 * @param row_stride The length of a pixels line in the destination surface.
1412 * @param alpha A pointer to the int to hold the alpha flag.
1413 * @param compress A pointer to the int to hold the compression amount.
1414 * @param quality A pointer to the int to hold the quality amount.
1415 * @param lossy A pointer to the int to hold the lossiness flag.
1416 * @return 1 on success, 0 otherwise.
1417 *
1418 * This function reads an image from an eet file stored under the named
1419 * key in the eet file and return a pointer to the decompressed pixel data.
1420 *
1421 * The other parameters of the image (width, height etc.) are placed into
1422 * the values pointed to (they must be supplied). The pixel data is a linear
1423 * array of pixels starting from the top-left of the image scanning row by
1424 * row from left to right. Each pixel is a 32bit value, with the high byte
1425 * being the alpha channel, the next being red, then green, and the low byte
1426 * being blue. The width and height are measured in pixels and will be
1427 * greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes
1428 * that the alpha channel is not used. 1 denotes that it is significant.
1429 * Compress is filled with the compression value/amount the image was
1430 * stored with. The quality value is filled with the quality encoding of
1431 * the image file (0 - 100). The lossy flags is either 0 or 1 as to if
1432 * the image was encoded lossily or not.
1433 *
1434 * On success the function returns 1, and 0 on failure. On failure the
1435 * parameter values may not contain any sensible data.
1436 *
1437 * @see eet_data_image_read_to_surface()
1438 *
1439 * @since 1.0.2
1440 * @ingroup Eet_File_Image_Cipher_Group
1441 */
1442EAPI int
1443eet_data_image_read_to_surface_cipher(Eet_File *ef,
1444 const char *name,
1445 const char *cipher_key,
1446 unsigned int src_x,
1447 unsigned int src_y,
1448 unsigned int *d,
1449 unsigned int w,
1450 unsigned int h,
1451 unsigned int row_stride,
1452 int *alpha,
1453 int *compress,
1454 int *quality,
1455 int *lossy);
1456
1457/**
1458 * Write image data to the named key in an eet file using a cipher.
1459 * @param ef A valid eet file handle opened for writing.
1460 * @param name Name of the entry. eg: "/base/file_i_want".
1461 * @param cipher_key The key to use as cipher.
1462 * @param data A pointer to the image pixel data.
1463 * @param w The width of the image in pixels.
1464 * @param h The height of the image in pixels.
1465 * @param alpha The alpha channel flag.
1466 * @param compress The compression amount.
1467 * @param quality The quality encoding amount.
1468 * @param lossy The lossiness flag.
1469 * @return Success if the data was encoded and written or not.
1470 *
1471 * This function takes image pixel data and encodes it in an eet file
1472 * stored under the supplied name key, and returns how many bytes were
1473 * actually written to encode the image data.
1474 *
1475 * The data expected is the same format as returned by eet_data_image_read.
1476 * If this is not the case weird things may happen. Width and height must
1477 * be between 1 and 8000 pixels. The alpha flags can be 0 or 1 (0 meaning
1478 * the alpha values are not useful and 1 meaning they are). Compress can
1479 * be from 0 to 9 (0 meaning no compression, 9 meaning full compression).
1480 * This is only used if the image is not lossily encoded. Quality is used on
1481 * lossy compression and should be a value from 0 to 100. The lossy flag
1482 * can be 0 or 1. 0 means encode losslessly and 1 means to encode with
1483 * image quality loss (but then have a much smaller encoding).
1484 *
1485 * On success this function returns the number of bytes that were required
1486 * to encode the image data, or on failure it returns 0.
1487 *
1488 * @see eet_data_image_write()
1489 *
1490 * @since 1.0.0
1491 * @ingroup Eet_File_Image_Cipher_Group
1492 */
1493EAPI int
1494eet_data_image_write_cipher(Eet_File *ef,
1495 const char *name,
1496 const char *cipher_key,
1497 const void *data,
1498 unsigned int w,
1499 unsigned int h,
1500 int alpha,
1501 int compress,
1502 int quality,
1503 int lossy);
1504
1505/**
1506 * Decode Image data header only to get information using a cipher.
1507 * @param data The encoded pixel data.
1508 * @param cipher_key The key to use as cipher.
1509 * @param size The size, in bytes, of the encoded pixel data.
1510 * @param w A pointer to the unsigned int to hold the width in pixels.
1511 * @param h A pointer to the unsigned int to hold the height in pixels.
1512 * @param alpha A pointer to the int to hold the alpha flag.
1513 * @param compress A pointer to the int to hold the compression amount.
1514 * @param quality A pointer to the int to hold the quality amount.
1515 * @param lossy A pointer to the int to hold the lossiness flag.
1516 * @return 1 on success, 0 on failure.
1517 *
1518 * This function takes encoded pixel data and decodes it into raw RGBA
1519 * pixels on success.
1520 *
1521 * The other parameters of the image (width, height etc.) are placed into
1522 * the values pointed to (they must be supplied). The pixel data is a linear
1523 * array of pixels starting from the top-left of the image scanning row by
1524 * row from left to right. Each pixel is a 32bit value, with the high byte
1525 * being the alpha channel, the next being red, then green, and the low byte
1526 * being blue. The width and height are measured in pixels and will be
1527 * greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes
1528 * that the alpha channel is not used. 1 denotes that it is significant.
1529 * Compress is filled with the compression value/amount the image was
1530 * stored with. The quality value is filled with the quality encoding of
1531 * the image file (0 - 100). The lossy flags is either 0 or 1 as to if
1532 * the image was encoded lossily or not.
1533 *
1534 * On success the function returns 1 indicating the header was read and
1535 * decoded properly, or 0 on failure.
1536 *
1537 * @see eet_data_image_header_decode()
1538 *
1539 * @since 1.0.0
1540 * @ingroup Eet_File_Image_Cipher_Group
1541 */
1542EAPI int
1543eet_data_image_header_decode_cipher(const void *data,
1544 const char *cipher_key,
1545 int size,
1546 unsigned int *w,
1547 unsigned int *h,
1548 int *alpha,
1549 int *compress,
1550 int *quality,
1551 int *lossy);
1552
1553/**
1554 * Decode Image data into pixel data using a cipher.
1555 * @param data The encoded pixel data.
1556 * @param cipher_key The key to use as cipher.
1557 * @param size The size, in bytes, of the encoded pixel data.
1558 * @param w A pointer to the unsigned int to hold the width in pixels.
1559 * @param h A pointer to the unsigned int to hold the height in pixels.
1560 * @param alpha A pointer to the int to hold the alpha flag.
1561 * @param compress A pointer to the int to hold the compression amount.
1562 * @param quality A pointer to the int to hold the quality amount.
1563 * @param lossy A pointer to the int to hold the lossiness flag.
1564 * @return The image pixel data decoded
1565 *
1566 * This function takes encoded pixel data and decodes it into raw RGBA
1567 * pixels on success.
1568 *
1569 * The other parameters of the image (width, height etc.) are placed into
1570 * the values pointed to (they must be supplied). The pixel data is a linear
1571 * array of pixels starting from the top-left of the image scanning row by
1572 * row from left to right. Each pixel is a 32bit value, with the high byte
1573 * being the alpha channel, the next being red, then green, and the low byte
1574 * being blue. The width and height are measured in pixels and will be
1575 * greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes
1576 * that the alpha channel is not used. 1 denotes that it is significant.
1577 * Compress is filled with the compression value/amount the image was
1578 * stored with. The quality value is filled with the quality encoding of
1579 * the image file (0 - 100). The lossy flags is either 0 or 1 as to if
1580 * the image was encoded lossily or not.
1581 *
1582 * On success the function returns a pointer to the image data decoded. The
1583 * calling application is responsible for calling free() on the image data
1584 * when it is done with it. On failure NULL is returned and the parameter
1585 * values may not contain any sensible data.
1586 *
1587 * @see eet_data_image_decode()
1588 *
1589 * @since 1.0.0
1590 * @ingroup Eet_File_Image_Cipher_Group
1591 */
1592EAPI void *
1593eet_data_image_decode_cipher(const void *data,
1594 const char *cipher_key,
1595 int size,
1596 unsigned int *w,
1597 unsigned int *h,
1598 int *alpha,
1599 int *compress,
1600 int *quality,
1601 int *lossy);
1602
1603/**
1604 * Decode Image data into pixel data using a cipher.
1605 * @param data The encoded pixel data.
1606 * @param cipher_key The key to use as cipher.
1607 * @param size The size, in bytes, of the encoded pixel data.
1608 * @param src_x The starting x coordinate from where to dump the stream.
1609 * @param src_y The starting y coordinate from where to dump the stream.
1610 * @param d A pointer to the pixel surface.
1611 * @param w The expected width in pixels of the pixel surface to decode.
1612 * @param h The expected height in pixels of the pixel surface to decode.
1613 * @param row_stride The length of a pixels line in the destination surface.
1614 * @param alpha A pointer to the int to hold the alpha flag.
1615 * @param compress A pointer to the int to hold the compression amount.
1616 * @param quality A pointer to the int to hold the quality amount.
1617 * @param lossy A pointer to the int to hold the lossiness flag.
1618 * @return 1 on success, 0 otherwise.
1619 *
1620 * This function takes encoded pixel data and decodes it into raw RGBA
1621 * pixels on success.
1622 *
1623 * The other parameters of the image (alpha, compress etc.) are placed into
1624 * the values pointed to (they must be supplied). The pixel data is a linear
1625 * array of pixels starting from the top-left of the image scanning row by
1626 * row from left to right. Each pixel is a 32bit value, with the high byte
1627 * being the alpha channel, the next being red, then green, and the low byte
1628 * being blue. The width and height are measured in pixels and will be
1629 * greater than 0 when returned. The alpha flag is either 0 or 1. 0 denotes
1630 * that the alpha channel is not used. 1 denotes that it is significant.
1631 * Compress is filled with the compression value/amount the image was
1632 * stored with. The quality value is filled with the quality encoding of
1633 * the image file (0 - 100). The lossy flags is either 0 or 1 as to if
1634 * the image was encoded lossily or not.
1635 *
1636 * On success the function returns 1, and 0 on failure. On failure the
1637 * parameter values may not contain any sensible data.
1638 *
1639 * @see eet_data_image_decode_to_surface()
1640 *
1641 * @since 1.0.2
1642 * @ingroup Eet_File_Image_Cipher_Group
1643 */
1644EAPI int
1645eet_data_image_decode_to_surface_cipher(const void *data,
1646 const char *cipher_key,
1647 int size,
1648 unsigned int src_x,
1649 unsigned int src_y,
1650 unsigned int *d,
1651 unsigned int w,
1652 unsigned int h,
1653 unsigned int row_stride,
1654 int *alpha,
1655 int *compress,
1656 int *quality,
1657 int *lossy);
1658
1659/**
1660 * Encode image data for storage or transmission using a cipher.
1661 * @param data A pointer to the image pixel data.
1662 * @param cipher_key The key to use as cipher.
1663 * @param size_ret A pointer to an int to hold the size of the returned data.
1664 * @param w The width of the image in pixels.
1665 * @param h The height of the image in pixels.
1666 * @param alpha The alpha channel flag.
1667 * @param compress The compression amount.
1668 * @param quality The quality encoding amount.
1669 * @param lossy The lossiness flag.
1670 * @return The encoded image data.
1671 *
1672 * This function stakes image pixel data and encodes it with compression and
1673 * possible loss of quality (as a trade off for size) for storage or
1674 * transmission to another system.
1675 *
1676 * The data expected is the same format as returned by eet_data_image_read.
1677 * If this is not the case weird things may happen. Width and height must
1678 * be between 1 and 8000 pixels. The alpha flags can be 0 or 1 (0 meaning
1679 * the alpha values are not useful and 1 meaning they are). Compress can
1680 * be from 0 to 9 (0 meaning no compression, 9 meaning full compression).
1681 * This is only used if the image is not lossily encoded. Quality is used on
1682 * lossy compression and should be a value from 0 to 100. The lossy flag
1683 * can be 0 or 1. 0 means encode losslessly and 1 means to encode with
1684 * image quality loss (but then have a much smaller encoding).
1685 *
1686 * On success this function returns a pointer to the encoded data that you
1687 * can free with free() when no longer needed.
1688 *
1689 * @see eet_data_image_encode()
1690 *
1691 * @since 1.0.0
1692 * @ingroup Eet_File_Image_Cipher_Group
1693 */
1694EAPI void *
1695eet_data_image_encode_cipher(const void *data,
1696 const char *cipher_key,
1697 unsigned int w,
1698 unsigned int h,
1699 int alpha,
1700 int compress,
1701 int quality,
1702 int lossy,
1703 int *size_ret);
1704
1705/**
1706 * @defgroup Eet_Cipher_Group Cipher, Identity and Protection Mechanisms
1707 *
1708 * Eet allows one to protect entries of an #Eet_File
1709 * individually. This may be used to ensure data was not tampered or
1710 * that third party does not read your data.
1711 *
1712 * @see @ref Eet_File_Cipher_Group
1713 * @see @ref Eet_File_Image_Cipher_Group
1714 *
1715 * @{
1716 */
1717
1718/**
1719 * @typedef Eet_Key
1720 * Opaque handle that defines an identity (also known as key)
1721 * in Eet's cipher system.
1722 */
1723typedef struct _Eet_Key Eet_Key;
1724
1725/**
1726 * @}
1727 */
1728
1729/**
1730 * Callback used to request if needed the password of a private key.
1731 *
1732 * @param buffer the buffer where to store the password.
1733 * @param size the maximum password size (size of buffer, including '@\0').
1734 * @param rwflag if the buffer is also readable or just writable.
1735 * @param data currently unused, may contain some context in future.
1736 * @return 1 on success and password was set to @p buffer, 0 on failure.
1737 *
1738 * @since 1.2.0
1739 * @ingroup Eet_Cipher_Group
1740 */
1741typedef int (*Eet_Key_Password_Callback)(char *buffer, int size, int rwflag, void *data);
1742
1743/**
1744 * Create an Eet_Key needed for signing an eet file.
1745 *
1746 * The certificate should provide the public that match the private key.
1747 * No verification is done to ensure that.
1748 *
1749 * @param certificate_file The file where to find the certificate.
1750 * @param private_key_file The file that contains the private key.
1751 * @param cb Function to callback if password is required to unlock
1752 * private key.
1753 * @return A key handle to use, or @c NULL on failure.
1754 *
1755 * @see eet_identity_close()
1756 *
1757 * @since 1.2.0
1758 * @ingroup Eet_Cipher_Group
1759 */
1760EAPI Eet_Key *
1761eet_identity_open(const char *certificate_file,
1762 const char *private_key_file,
1763 Eet_Key_Password_Callback cb);
1764
1765/**
1766 * Close and release all ressource used by an Eet_Key. An
1767 * reference counter prevent it from being freed until all file
1768 * using it are also closed.
1769 *
1770 * @param key the key handle to close and free resources.
1771 *
1772 * @since 1.2.0
1773 * @ingroup Eet_Cipher_Group
1774 */
1775EAPI void
1776eet_identity_close(Eet_Key *key);
1777
1778/**
1779 * Set a key to sign a file
1780 *
1781 * @param ef the file to set the identity.
1782 * @param key the key handle to set as identity.
1783 * @return #EET_ERROR_BAD_OBJECT if @p ef is invalid or
1784 * #EET_ERROR_NONE on success.
1785 *
1786 * @since 1.2.0
1787 * @ingroup Eet_Cipher_Group
1788 */
1789EAPI Eet_Error
1790eet_identity_set(Eet_File *ef,
1791 Eet_Key *key);
1792
1793/**
1794 * Display both private and public key of an Eet_Key.
1795 *
1796 * @param key the handle to print.
1797 * @param out where to print.
1798 *
1799 * @since 1.2.0
1800 * @ingroup Eet_Cipher_Group
1801 */
1802EAPI void
1803eet_identity_print(Eet_Key *key,
1804 FILE *out);
1805
1806/**
1807 * Get the x509 der certificate associated with an Eet_File. Will return NULL
1808 * if the file is not signed.
1809 *
1810 * @param ef The file handle to query.
1811 * @param der_length The length of returned data, may be @c NULL.
1812 * @return the x509 certificate or @c NULL on error.
1813 *
1814 * @since 1.2.0
1815 * @ingroup Eet_Cipher_Group
1816 */
1817EAPI const void *
1818eet_identity_x509(Eet_File *ef,
1819 int *der_length);
1820
1821/**
1822 * Get the raw signature associated with an Eet_File. Will return NULL
1823 * if the file is not signed.
1824 *
1825 * @param ef The file handle to query.
1826 * @param signature_length The length of returned data, may be @c NULL.
1827 * @return the raw signature or @c NULL on error.
1828 *
1829 * @ingroup Eet_Cipher_Group
1830 */
1831EAPI const void *
1832eet_identity_signature(Eet_File *ef,
1833 int *signature_length);
1834
1835/**
1836 * Get the SHA1 associated with a file. Could be the one used to
1837 * sign the data or if the data where not signed, it will be the
1838 * SHA1 of the file.
1839 *
1840 * @param ef The file handle to query.
1841 * @param sha1_length The length of returned data, may be @c NULL.
1842 * @return the associated SHA1 or @c NULL on error.
1843 *
1844 * @since 1.2.0
1845 * @ingroup Eet_Cipher_Group
1846 */
1847EAPI const void *
1848eet_identity_sha1(Eet_File *ef,
1849 int *sha1_length);
1850
1851/**
1852 * Display the x509 der certificate to out.
1853 *
1854 * @param certificate the x509 certificate to print
1855 * @param der_length The length the certificate.
1856 * @param out where to print.
1857 *
1858 * @since 1.2.0
1859 * @ingroup Eet_Cipher_Group
1860 */
1861EAPI void
1862eet_identity_certificate_print(const unsigned char *certificate,
1863 int der_length,
1864 FILE *out);
1865
1866/**
1867 * @defgroup Eet_Data_Group Eet Data Serialization
1868 *
1869 * Convenience functions to serialize and parse complex data
1870 * structures to binary blobs.
1871 *
1872 * While Eet core just handles binary blobs, it is often required
1873 * to save some structured data of different types, such as
1874 * strings, integers, lists, hashes and so on.
1875 *
1876 * Eet can serialize and then parse data types given some
1877 * construction instructions. These are defined in two levels:
1878 *
1879 * - #Eet_Data_Descriptor_Class to tell generic memory handling,
1880 * such as the size of the type, how to allocate memory, strings,
1881 * lists, hashes and so on.
1882 *
1883 * - #Eet_Data_Descriptor to tell inside such type, the members and
1884 * their offsets inside the memory blob, their types and
1885 * names. These members can be simple types or other
1886 * #Eet_Data_Descriptor, allowing hierarchical types to be
1887 * defined.
1888 *
1889 * Given that C provides no introspection, this process can be
1890 * quite cumbersome, so we provide lots of macros and convenience
1891 * functions to aid creating the types.
1892 *
1893 * We make now a quick overview of some of the most commonly used elements
1894 * of this part of the library. A simple example of a configuration system
1895 * will work as a somewhat real life example that is still simple enough to
1896 * follow.
1897 * Only the relevant sections will be shown here, but you can get the full
1898 * code @ref eet-data-simple.c "here".
1899 *
1900 * Ignoring the included headers, we'll begin by defining our configuration
1901 * struct.
1902 * @dontinclude eet-data-simple.c
1903 * @skip typedef
1904 * @until }
1905 *
1906 * When using Eet, you don't think in matters of what data the program needs
1907 * to run and which you would like to store. It's all the same and if it makes
1908 * more sense to keep them together, it's perfectly fine to do so. At the time
1909 * of telling Eet how your data is comprised you can leave out the things
1910 * that are runtime only and let Eet take care of the rest for you.
1911 *
1912 * The key used to store the config follows, as well as the variable used to
1913 * store our data descriptor.
1914 * This last one is very important. It's the one thing that Eet will use to
1915 * identify your data, both at the time of writing it to the file and when
1916 * loading from it.
1917 * @skipline MY_CONF
1918 * @skipline Eet_Data_Descriptor
1919 *
1920 * Now we'll see how to create this descriptor, so Eet knows how to handle
1921 * our data later on.
1922 * Begin our function by declaring an Eet_Data_Descriptor_Class, which is
1923 * used to create the actual descriptor. This class contains the name of
1924 * our data type, its size and several functions that dictate how Eet should
1925 * handle memory to allocate the necessary bits to bring our data to life.
1926 * You, as a user, will very hardly set this class' contents directly. The
1927 * most common scenario is to use one of the provided macros that set it using
1928 * the Eina data types, so that's what we'll be doing across all our examples.
1929 * @skip static void
1930 * @until eet_data_descriptor_stream_new
1931 *
1932 * Now that we have our descriptor, we need to make it describe something.
1933 * We do so by telling it which members of our struct we want it to know about
1934 * and their types.
1935 * The eet_data_descriptor_element_add() function takes care of this, but it's
1936 * too cumbersome for normal use, so several macros are provided that make
1937 * it easier to handle. Even with them, however, code can get very repetitive
1938 * and it's not uncommon to define custom macros using them to save on typing.
1939 * @skip #define
1940 * @until }
1941 *
1942 * Now our descriptor knows about the parts of our structure that we are
1943 * interesting in saving. You can see that not all of them are there, yet Eet
1944 * will find those that need saving and do the right thing. When loading our
1945 * data, any non-described fields in the structure will be zeroed, so there's
1946 * no need to worry about garbage memory in them.
1947 * Refer to the documentation of #EET_DATA_DESCRIPTOR_ADD_BASIC to understand
1948 * what our macro does.
1949 *
1950 * We are done with our descriptor init function and it's proper to have the
1951 * relevant shutdown. Proper coding guidelines indiciate that all memory
1952 * allocated should be freed when the program ends, and since you will most
1953 * likely keep your descriptor around for the life or your application, it's
1954 * only right to free it at the end.
1955 * @skip static void
1956 * @until }
1957 *
1958 * Not listed here, but included in the full example are functions to create
1959 * a blank configuration and free it. The first one will only be used when
1960 * no file exists to load from, or nothing is found in it, but the latter is
1961 * used regardless of where our data comes from. Unless you are reading direct
1962 * data from the Eet file, you will be in charge of freeing anything loaded
1963 * from it.
1964 *
1965 * Now it's time to look at how we can load our config from some file.
1966 * Begin by opening the Eet file normally.
1967 * @skip static My_Conf_Type
1968 * @until }
1969 *
1970 * And now we need to read the data from the file and decode it using our
1971 * descriptor. Fortunately, that's all done in one single step.
1972 * @until goto
1973 *
1974 * And that's it for all Eet cares about. But since we are dealing with a
1975 * common case, as is save and load of user configurations, the next fragment
1976 * of code shows why we have a version field in our struct, and how you can
1977 * use it to load older configuration files and update them as needed.
1978 * @until }
1979 *
1980 * Finally, clsoe the file and return the newly loaded config data.
1981 * @until }
1982 *
1983 * Saving data is just as easy. The full version of the following function
1984 * includes code to save to a temporary file first, so you can be sure not
1985 * to lose all your data in the case of a failure mid-writing. You can look
1986 * at it @ref eet-data-simple.c "here".
1987 * @skip static Eina_Bool
1988 * @until {
1989 * @skipline Eina_Bool ret
1990 * @skip eet_open
1991 * @until eet_close
1992 * @skip return
1993 * @until }
1994 *
1995 * To close, our main function, which doesn't do much. Just take some arguments
1996 * from the command line with the name of the file to load and another one
1997 * where to save again. If input file doesn't exist, a new config structure
1998 * will be created and saved to our output file.
1999 * @skip int main
2000 * @until return ret
2001 * @until }
2002 *
2003 * The following is a list of more advanced and detailed examples.
2004 * @li @ref eet_data_nested_example
2005 * @li @ref eet_data_file_descriptor
2006 * @li @ref Example_Eet_Data_File_Descriptor_02
2007 * @li @ref Example_Eet_Data_Cipher_Decipher
2008 */
2009
2010/**
2011 * @page eet_data_nested_example Nested structures and Eet Data Descriptors
2012 *
2013 * We've seen already a simple example of how to use Eet Data Descriptors
2014 * to handle our structures, but it didn't show how this works when you
2015 * have structures inside other structures.
2016 *
2017 * Now, there's a very simple case of this, for when you have inline structs
2018 * to keep your big structure more organized, you don't need anything else
2019 * besides what @ref eet-data-simple.c "this simple example does".
2020 * Just use something like @p some_struct.sub_struct.member when adding the
2021 * member to the descriptor and it will work.
2022 *
2023 * For example:
2024 * @code
2025 * typedef struct
2026 * {
2027 * int a_number;
2028 * char *a_string;
2029 * struct {
2030 * int other_num;
2031 * int one_more;
2032 * } sub;
2033 * } some_struct;
2034 *
2035 * void some_function()
2036 * {
2037 * ...
2038 * my_desc = eet_data_descriptor_stream_new(&eddc);
2039 * EET_DATA_DESCRIPTOR_ADD_BASIC(my_desc, some_struct, "a_number",
2040 * a_number, EET_T_INT);
2041 * EET_DATA_DESCRIPTOR_ADD_BASIC(my_desc, some_struct, "a_string",
2042 * a_string, EET_T_STRING);
2043 * EET_DATA_DESCRIPTOR_ADD_BASIC(my_desc, some_struct, "sub.other_num",
2044 * sub.other_num, EET_T_INT);
2045 * EET_DATA_DESCRIPTOR_ADD_BASIC(my_desc, some_struct, "sub.one_more",
2046 * sub.one_more", EET_T_INT);
2047 * ...
2048 * }
2049 * @endcode
2050 *
2051 * But this is not what we are here for today. When we talk about nested
2052 * structures, what we really want are things like lists and hashes to be
2053 * taken into consideration automatically, and all their contents saved and
2054 * loaded just like ordinary integers and strings are.
2055 *
2056 * And of course, Eet can do that, and considering the work it saves you as a
2057 * programmer, we could say it's even easier to do than handling just integers.
2058 *
2059 * Let's begin with our example then, which is not all too different from the
2060 * simple one introduced earlier.
2061 *
2062 * We won't ignore the headers this time to show how easy it is to use Eina
2063 * data types with Eet, but we'll still skip most of the code that is not
2064 * pertinent to what we want to show now, but as usual, you can get it full
2065 * by follwing @ref eet-data-nested.c "this link".
2066 *
2067 * @dontinclude eet-data-nested.c
2068 * @skipline Eina.h
2069 * @skipline Eet.h
2070 * @skip typedef struct
2071 * @until } My_Conf_Subtype
2072 *
2073 * Extremely similar to our previous example. Just a new struct in there, and
2074 * a pointer to a list in the one we already had. Handling a list of subtypes
2075 * is easy on our program, but now we'll see what Eet needs to work with them
2076 * (Hint: it's easy too).
2077 * @skip _my_conf_descriptor
2078 * @until _my_conf_sub_descriptor
2079 *
2080 * Since we have two structures now, it's only natural that we'll need two
2081 * descriptors. One for each, which will be defined exactly as before.
2082 * @skip static void
2083 * @until eddc
2084 * @skip EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET
2085 * @until _my_conf_sub_descriptor
2086 *
2087 * We create our descriptors, each for one type, and as before, we are going to
2088 * use a simple macro to set their contents, to save on typing.
2089 * @skip #define
2090 * @until EET_T_UCHAR
2091 *
2092 * So far, nothing new. We have our descriptors and we know already how to
2093 * save them separately. But what we want is to link them together, and even
2094 * more so, we want our main type to hold a list of more than one of the new
2095 * sub type. So how do we do that?
2096 *
2097 * Simple enough, we tell Eet that our main descriptor will hold a list, of
2098 * which each node will point to some type described by our new descriptor.
2099 * @skip EET_DATA_DESCRIPTOR_ADD_LIST
2100 * @until _my_conf_sub_descriptor
2101 *
2102 * And that's all. We are closing the function now so as to not leave dangling
2103 * curly braces, but there's nothing more to show in this example. Only other
2104 * additions are the necessary code to free our new data, but you can see it
2105 * in the full code listing.
2106 * @until }
2107 */
2108
2109/**
2110 * @page eet_data_file_descriptor Advanced use of Eet Data Descriptors
2111 *
2112 * A real life example is usually the best way to see how things are used,
2113 * but they also involve a lot more code than what needs to be shown, so
2114 * instead of going that way, we'll be borrowing some pieces from one in
2115 * the following example. It's been slightly modified from the original
2116 * source to show more of the varied ways in which Eet can handle our data.
2117 *
2118 * @ref eet-data-file_descriptor_01.c "This example" shows a cache of user
2119 * accounts and messages received, and it's a bit more interactive than
2120 * previous examples.
2121 *
2122 * Let's begin by looking at the structures we'll be using. First we have
2123 * one to define the messages the user receives and one for the one he posts.
2124 * Straight forward and nothing new here.
2125 * @dontinclude eet-data-file_descriptor_01.c
2126 * @skip typedef
2127 * @until My_Post
2128 *
2129 * One more to declare the account itself. This one will contain a list of
2130 * all messages received, and the posts we make ourselves will be kept in an
2131 * array. No special reason other than to show how to use arrays with Eet.
2132 * @until My_Account
2133 *
2134 * Finally, the main structure to hold our cache of accounts. We'll be looking
2135 * for these accounts by their names, so let's keep them in a hash, using
2136 * that name as the key.
2137 * @until My_Cache
2138 *
2139 * As explained before, we need one descriptor for each struct we want Eet
2140 * to handle, but this time we also want to keep around our Eet file and its
2141 * string dictionary. You will see why in a moment.
2142 * @skip Eet_Data_Descriptor
2143 * @until _my_post_descriptor
2144 * @skip Eet_File
2145 * @until Eet_Dictionary
2146 *
2147 * The differences begin now. They aren't much, but we'll be creating our
2148 * descriptors differently. Things can be added to our cache, but we won't
2149 * be modifying the current contents, so we can consider the data read from
2150 * it to be read-only, and thus allow Eet to save time and memory by not
2151 * duplicating thins unnecessary.
2152 * @skip static void
2153 * @until _my_post_descriptor
2154 *
2155 * As the comment in the code explains, we are asking Eet to give us strings
2156 * directly from the mapped file, which avoids having to load it in memory
2157 * and data duplication.
2158 * Of course, there are things to take into account when doing things this
2159 * way, and they will be mentioned as we encounter those special cases.
2160 *
2161 * Next comes the actual description of our data, just like we did in the
2162 * previous examples.
2163 * @skip #define
2164 * @until #undef
2165 * @until #define
2166 * @until #undef
2167 *
2168 * And the account struct's description doesn't add much new, but it's worth
2169 * commenting on it.
2170 * @skip #define
2171 * @until _my_post_descriptor
2172 *
2173 * How to add a list we've seen before, but now we are also adding an array.
2174 * There's nothing really special about it, but it's important to note that
2175 * the EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY is used to add arrays of variable
2176 * length to a descriptor. That is, arrays just like the one we defined.
2177 * Since there's no way in C to know how long they are, we need to keep
2178 * track of the count ourselves and Eet needs to know how to do so as well.
2179 * That's what the @p posts_count member of our struct is for. When adding
2180 * our array member, this macro will look for another variable in the struct
2181 * named just like the array, but with @p _count attached to the end.
2182 * When saving our data, Eet will know how many elements the array contains
2183 * by looking into this count variable. When loading back from a file, this
2184 * variable will be set to the right number of elements.
2185 *
2186 * Another option for arrays is to use EET_DATA_DESCRIPTOR_ADD_ARRAY, which
2187 * takes care of fixed sized arrays.
2188 * For example, let's suppose that we want to keep track of only the last
2189 * ten posts the user sent, and we declare our account struct as follows
2190 * @code
2191 * typedef struct
2192 * {
2193 * unsigned int id;
2194 * const char *name;
2195 * Eina_List *messages;
2196 * My_Post posts[10];
2197 * } My_Account;
2198 * @endcode
2199 * Then we would add the array to our descriptor with
2200 * @code
2201 * EET_DATA_DESCRIPTOR_ADD_ARRAY(_my_account_descriptor, My_Account, "posts",
2202 * posts, _my_post_descriptor);
2203 * @endcode
2204 *
2205 * Notice how this time we don't have a @p posts_count variable in our struct.
2206 * We could have it for the program to keep track of how many posts the
2207 * array actually contains, but Eet no longer needs it. Being defined that
2208 * way the array is already taking up all the memory needed for the ten
2209 * elements, and it is possible in C to determine how much it is in code.
2210 * When saving our data, Eet will just dump the entire memory blob into the
2211 * file, regardless of how much of it is really used. So it's important to
2212 * take into consideration this kind of things when defining your data types.
2213 * Each has its uses, its advantages and disadvantages and it's up to you
2214 * to decide which to use.
2215 *
2216 * Now, going back to our example, we have to finish adding our data to the
2217 * descriptors. We are only missing the main one for the cache, which
2218 * contains our hash of accounts.
2219 * Unless you are using your own hash functions when setting the descriptor
2220 * class, always use hashes with string type keys.
2221 * @skip #define
2222 * @until }
2223 *
2224 * If you remember, we told Eet not to duplicate memory when possible at the
2225 * time of loading back our data. But this doesn't mean everything will be
2226 * loaded straight from disk and we don't have to worry about freeing it.
2227 * Data in the Eet file is compressed and encoded, so it still needs to be
2228 * decoded and memory will be allocated to convert it back into something we
2229 * can use. We also need to take care of anything we add in the current
2230 * instance of the program.
2231 * To summarize, any string we get from Eet is likely to be a pointer to the
2232 * internal dictionary, and trying to free it will, in the best case, crash
2233 * our application right away.
2234 *
2235 * So how do we know if we have to free a string? We check if it's part of
2236 * the dictionary, and if it's not there we can be sure it's safe to get
2237 * rid of it.
2238 * @skip static void
2239 * @skip }
2240 * @skip static void
2241 * @until }
2242 *
2243 * See how this is used when adding a new message to our cache.
2244 * @skip static My_Message
2245 * @until return msg
2246 * @until free(msg)
2247 * @until }
2248 *
2249 * Skipping all the utility functions used by our program (remember you can
2250 * look at the full example @ref eet-data-file_descriptor_01.c "here") we get to
2251 * our cache loading code. Nothing out of the ordinary at first, just the
2252 * same old open file, read data using our main descriptor to decode it
2253 * into something we can use and check version of loaded data and if it doesn't
2254 * match, do something accordingly.
2255 * @skip static My_Cache
2256 * @until }
2257 * @until }
2258 * @until }
2259 *
2260 * Then comes the interesting part. Remember how we kept two more global
2261 * variables with our descriptors? One of them we already used to check if
2262 * it was right to free a string or not, but we didn't know where it came from.
2263 * Loading our data straight from the mmapped file means that we can't close
2264 * it until we are done using it, so we need to keep its handler around until
2265 * then. It also means that any changes done to the file can, and will,
2266 * invalidate all our pointers to the file backed data, so if we add something
2267 * and save the file, we need to reload our cache.
2268 *
2269 * Thus our load function checks if we had an open file, if there is it gets
2270 * closed and our variable is updated to the new handler. Then we get the
2271 * string dictionary we use to check if a string is part of it or not.
2272 * Updating any references to the cache data is up you as a programmer to
2273 * handle properly, there's nothing Eet can do in this situation.
2274 * @until }
2275 *
2276 * The save function doesn't have anything new, and all that's left after it
2277 * is the main program, which doesn't really have anything of interest within
2278 * the scope of what we are learning.
2279 */
2280
2281/**
2282 * @addtogroup Eet_Data_Group
2283 * @{
2284 */
2285#define EET_T_UNKNOW 0 /**< Unknown data encoding type */
2286#define EET_T_CHAR 1 /**< Data type: char */
2287#define EET_T_SHORT 2 /**< Data type: short */
2288#define EET_T_INT 3 /**< Data type: int */
2289#define EET_T_LONG_LONG 4 /**< Data type: long long */
2290#define EET_T_FLOAT 5 /**< Data type: float */
2291#define EET_T_DOUBLE 6 /**< Data type: double */
2292#define EET_T_UCHAR 7 /**< Data type: unsigned char */
2293#define EET_T_USHORT 8 /**< Data type: unsigned short */
2294#define EET_T_UINT 9 /**< Data type: unsigned int */
2295#define EET_T_ULONG_LONG 10 /**< Data type: unsigned long long */
2296#define EET_T_STRING 11 /**< Data type: char * */
2297#define EET_T_INLINED_STRING 12 /**< Data type: char * (but compressed inside the resulting eet) */
2298#define EET_T_NULL 13 /**< Data type: (void *) (only use it if you know why) */
2299#define EET_T_F32P32 14 /**< Data type: fixed point 32.32 */
2300#define EET_T_F16P16 15 /**< Data type: fixed point 16.16 */
2301#define EET_T_F8P24 16 /**< Data type: fixed point 8.24 */
2302#define EET_T_LAST 18 /**< Last data type */
2303
2304#define EET_G_UNKNOWN 100 /**< Unknown group data encoding type */
2305#define EET_G_ARRAY 101 /**< Fixed size array group type */
2306#define EET_G_VAR_ARRAY 102 /**< Variable size array group type */
2307#define EET_G_LIST 103 /**< Linked list group type */
2308#define EET_G_HASH 104 /**< Hash table group type */
2309#define EET_G_UNION 105 /**< Union group type */
2310#define EET_G_VARIANT 106 /**< Selectable subtype group */
2311#define EET_G_LAST 107 /**< Last group type */
2312
2313#define EET_I_LIMIT 128 /**< Other type exist but are reserved for internal purpose. */
2314
2315/**
2316 * @typedef Eet_Data_Descriptor
2317 *
2318 * Opaque handle that have information on a type members.
2319 *
2320 * Descriptors are created using an #Eet_Data_Descriptor_Class, and they
2321 * describe the contents of the structure that will be serialized by Eet.
2322 * Not all members need be described by it, just those that should be handled
2323 * by Eet. This way it's possible to have one structure with both data to be
2324 * saved to a file, like application configuration, and runtime information
2325 * that would be meaningless to store, but is appropriate to keep together
2326 * during the program execution.
2327 * The members are added by means of
2328 * EET_DATA_DESCRIPTOR_ADD_BASIC(), EET_DATA_DESCRIPTOR_ADD_SUB(),
2329 * EET_DATA_DESCRIPTOR_ADD_LIST(), EET_DATA_DESCRIPTOR_ADD_HASH()
2330 * or eet_data_descriptor_element_add().
2331 *
2332 * @see eet_data_descriptor_stream_new()
2333 * @see eet_data_descriptor_file_new()
2334 * @see eet_data_descriptor_free()
2335 */
2336typedef struct _Eet_Data_Descriptor Eet_Data_Descriptor;
2337
2338/**
2339 * @def EET_DATA_DESCRIPTOR_CLASS_VERSION
2340 * The version of #Eet_Data_Descriptor_Class at the time of the
2341 * distribution of the sources. One should define this to its
2342 * version member so it is compatible with abi changes, or at least
2343 * will not crash with them.
2344 */
2345#define EET_DATA_DESCRIPTOR_CLASS_VERSION 4
2346
2347/**
2348 * @typedef Eet_Data_Descriptor_Class
2349 *
2350 * Instructs Eet about memory management for different needs under
2351 * serialization and parse process.
2352 */
2353typedef struct _Eet_Data_Descriptor_Class Eet_Data_Descriptor_Class;
2354
2355typedef int (*Eet_Descriptor_Hash_Foreach_Callback_Callback)(void *h, const char *k, void *dt, void *fdt);
2356
2357typedef void * (*Eet_Descriptor_Mem_Alloc_Callback)(size_t size);
2358typedef void (*Eet_Descriptor_Mem_Free_Callback)(void *mem);
2359typedef char * (*Eet_Descriptor_Str_Alloc_Callback)(const char *str);
2360typedef void (*Eet_Descriptor_Str_Free_Callback)(const char *str);
2361typedef void * (*Eet_Descriptor_List_Next_Callback)(void *l);
2362typedef void * (*Eet_Descriptor_List_Append_Callback)(void *l, void *d);
2363typedef void * (*Eet_Descriptor_List_Data_Callback)(void *l);
2364typedef void * (*Eet_Descriptor_List_Free_Callback)(void *l);
2365typedef void (*Eet_Descriptor_Hash_Foreach_Callback)(void *h, Eet_Descriptor_Hash_Foreach_Callback_Callback func, void *fdt);
2366typedef void * (*Eet_Descriptor_Hash_Add_Callback)(void *h, const char *k, void *d);
2367typedef void (*Eet_Descriptor_Hash_Free_Callback)(void *h);
2368typedef char * (*Eet_Descriptor_Str_Direct_Alloc_Callback)(const char *str);
2369typedef void (*Eet_Descriptor_Str_Direct_Free_Callback)(const char *str);
2370typedef const char * (*Eet_Descriptor_Type_Get_Callback)(const void *data, Eina_Bool *unknow);
2371typedef Eina_Bool (*Eet_Descriptor_Type_Set_Callback)(const char *type, void *data, Eina_Bool unknow);
2372typedef void * (*Eet_Descriptor_Array_Alloc_Callback)(size_t size);
2373typedef void (*Eet_Descriptor_Array_Free_Callback)(void *mem);
2374/**
2375 * @struct _Eet_Data_Descriptor_Class
2376 *
2377 * Instructs Eet about memory management for different needs under
2378 * serialization and parse process.
2379 *
2380 * The list and hash methods match the Eina API, so for a more detalied
2381 * reference on them, look at the Eina_List and Eina_Hash documentation,
2382 * respectively.
2383 * For the most part these will be used with the standard Eina functions,
2384 * so using EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET() and
2385 * EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET() will set up everything
2386 * accordingly.
2387 */
2388struct _Eet_Data_Descriptor_Class
2389{
2390 int version; /**< ABI version. Should always be set to #EET_DATA_DESCRIPTOR_CLASS_VERSION */
2391 const char *name; /**< Name of the user data type to be serialized */
2392 int size; /**< Size in bytes of the user data type to be serialized */
2393 struct
2394 {
2395 Eet_Descriptor_Mem_Alloc_Callback mem_alloc; /**< how to allocate memory (usually malloc()) */
2396 Eet_Descriptor_Mem_Free_Callback mem_free; /**< how to free memory (usually free()) */
2397 Eet_Descriptor_Str_Alloc_Callback str_alloc; /**< how to allocate a string */
2398 Eet_Descriptor_Str_Free_Callback str_free; /**< how to free a string */
2399 Eet_Descriptor_List_Next_Callback list_next; /**< how to iterate to the next element of a list. Receives and should return the list node. */
2400 Eet_Descriptor_List_Append_Callback list_append; /**< how to append data @p d to list which head node is @p l */
2401 Eet_Descriptor_List_Data_Callback list_data; /**< retrieves the data from node @p l */
2402 Eet_Descriptor_List_Free_Callback list_free; /**< free all the nodes from the list which head node is @p l */
2403 Eet_Descriptor_Hash_Foreach_Callback hash_foreach; /**< iterates over all elements in the hash @p h in no specific order */
2404 Eet_Descriptor_Hash_Add_Callback hash_add; /**< add a new data @p d with key @p k in hash @p h */
2405 Eet_Descriptor_Hash_Free_Callback hash_free; /**< free all entries from the hash @p h */
2406 Eet_Descriptor_Str_Direct_Alloc_Callback str_direct_alloc; /**< how to allocate a string directly from file backed/mmaped region pointed by @p str */
2407 Eet_Descriptor_Str_Direct_Free_Callback str_direct_free; /**< how to free a string returned by str_direct_alloc */
2408 Eet_Descriptor_Type_Get_Callback type_get; /**< get the type, as used in the union or variant mapping, that should be used to store the given data into the eet file. */
2409 Eet_Descriptor_Type_Set_Callback type_set; /**< called when loading a mapped type with the given @p type used to describe the type in the descriptor */
2410 Eet_Descriptor_Array_Alloc_Callback array_alloc; /**< how to allocate memory for array (usually malloc()) */
2411 Eet_Descriptor_Array_Free_Callback array_free; /**< how to free memory for array (usually free()) */
2412 } func;
2413};
2414
2415/**
2416 * @}
2417 */
2418
2419/**
2420 * Create a new empty data structure descriptor.
2421 * @param name The string name of this data structure (most be a
2422 * global constant and never change).
2423 * @param size The size of the struct (in bytes).
2424 * @param func_list_next The function to get the next list node.
2425 * @param func_list_append The function to append a member to a list.
2426 * @param func_list_data The function to get the data from a list node.
2427 * @param func_list_free The function to free an entire linked list.
2428 * @param func_hash_foreach The function to iterate through all
2429 * hash table entries.
2430 * @param func_hash_add The function to add a member to a hash table.
2431 * @param func_hash_free The function to free an entire hash table.
2432 * @return A new empty data descriptor.
2433 *
2434 * This function creates a new data descriptore and returns a handle to the
2435 * new data descriptor. On creation it will be empty, containing no contents
2436 * describing anything other than the shell of the data structure.
2437 *
2438 * You add structure members to the data descriptor using the macros
2439 * EET_DATA_DESCRIPTOR_ADD_BASIC(), EET_DATA_DESCRIPTOR_ADD_SUB() and
2440 * EET_DATA_DESCRIPTOR_ADD_LIST(), depending on what type of member you are
2441 * adding to the description.
2442 *
2443 * Once you have described all the members of a struct you want loaded, or
2444 * saved eet can load and save those members for you, encode them into
2445 * endian-independent serialised data chunks for transmission across a
2446 * a network or more.
2447 *
2448 * The function pointers to the list and hash table functions are only
2449 * needed if you use those data types, else you can pass NULL instead.
2450 *
2451 * @since 1.0.0
2452 * @ingroup Eet_Data_Group
2453 *
2454 * @deprecated use eet_data_descriptor_stream_new() or
2455 * eet_data_descriptor_file_new()
2456 */
2457EINA_DEPRECATED EAPI Eet_Data_Descriptor *
2458eet_data_descriptor_new(const char *name,
2459 int size,
2460 Eet_Descriptor_List_Next_Callback func_list_next,
2461 Eet_Descriptor_List_Append_Callback func_list_append,
2462 Eet_Descriptor_List_Data_Callback func_list_data,
2463 Eet_Descriptor_List_Free_Callback func_list_free,
2464 Eet_Descriptor_Hash_Foreach_Callback func_hash_foreach,
2465 Eet_Descriptor_Hash_Add_Callback func_hash_add,
2466 Eet_Descriptor_Hash_Free_Callback func_hash_free);
2467/*
2468 * FIXME:
2469 *
2470 * moving to this api from the old above. this will break things when the
2471 * move happens - but be warned
2472 */
2473EINA_DEPRECATED EAPI Eet_Data_Descriptor *
2474 eet_data_descriptor2_new(const Eet_Data_Descriptor_Class *eddc);
2475EINA_DEPRECATED EAPI Eet_Data_Descriptor *
2476 eet_data_descriptor3_new(const Eet_Data_Descriptor_Class *eddc);
2477
2478/**
2479 * This function creates a new data descriptor and returns a handle to the
2480 * new data descriptor. On creation it will be empty, containing no contents
2481 * describing anything other than the shell of the data structure.
2482 * @param eddc The class from where to create the data descriptor.
2483 *
2484 * You add structure members to the data descriptor using the macros
2485 * EET_DATA_DESCRIPTOR_ADD_BASIC(), EET_DATA_DESCRIPTOR_ADD_SUB() and
2486 * EET_DATA_DESCRIPTOR_ADD_LIST(), depending on what type of member you are
2487 * adding to the description.
2488 *
2489 * Once you have described all the members of a struct you want loaded or
2490 * savedi, eet can load and save those members for you, encode them into
2491 * endian-independent serialised data chunks for transmission across a
2492 * a network or more.
2493 *
2494 * This function specially ignores str_direct_alloc and str_direct_free. It
2495 * is useful when the eet_data you are reading doesn't have a dictionary,
2496 * like network stream or IPC. It also mean that all string will be allocated
2497 * and duplicated in memory.
2498 *
2499 * @since 1.2.3
2500 * @ingroup Eet_Data_Group
2501 */
2502EAPI Eet_Data_Descriptor *
2503eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class *eddc);
2504
2505/**
2506 * This function creates a new data descriptor and returns a handle to the
2507 * new data descriptor. On creation it will be empty, containing no contents
2508 * describing anything other than the shell of the data structure.
2509 * @param eddc The class from where to create the data descriptor.
2510 *
2511 * You add structure members to the data descriptor using the macros
2512 * EET_DATA_DESCRIPTOR_ADD_BASIC(), EET_DATA_DESCRIPTOR_ADD_SUB() and
2513 * EET_DATA_DESCRIPTOR_ADD_LIST(), depending on what type of member you are
2514 * adding to the description.
2515 *
2516 * Once you have described all the members of a struct you want loaded or
2517 * savedi, eet can load and save those members for you, encode them into
2518 * endian-independent serialised data chunks for transmission across a
2519 * a network or more.
2520 *
2521 * This function uses str_direct_alloc and str_direct_free. It is
2522 * useful when the eet_data you are reading come from a file and
2523 * have a dictionary. This will reduce memory use and improve the
2524 * possibility for the OS to page this string out.
2525 * However, the load speed and memory saving comes with some drawbacks to keep
2526 * in mind. If you never modify the contents of the structures loaded from
2527 * the file, all you need to remember is that closing the eet file will make
2528 * the strings go away. On the other hand, should you need to free a string,
2529 * before doing so you have to verify that it's not part of the eet dictionary.
2530 * You can do this in the following way, assuming @p ef is a valid Eet_File
2531 * and @p str is a string loaded from said file.
2532 *
2533 * @code
2534 * void eet_string_free(Eet_File *ef, const char *str)
2535 * {
2536 * Eet_Dictionary *dict = eet_dictionary_get(ef);
2537 * if (dict && eet_dictionary_string_check(dict, str))
2538 * {
2539 * // The file contains a dictionary and the given string is a part of
2540 * // of it, so we can't free it, just return.
2541 * return;
2542 * }
2543 * // We assume eina_stringshare was used on the descriptor
2544 * eina_stringshare_del(str);
2545 * }
2546 * @endcode
2547 *
2548 * @since 1.2.3
2549 * @ingroup Eet_Data_Group
2550 */
2551EAPI Eet_Data_Descriptor *
2552eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class *eddc);
2553
2554/**
2555 * This function is an helper that set all the parameters of an
2556 * Eet_Data_Descriptor_Class correctly when you use Eina data type
2557 * with a stream.
2558 * @param eddc The Eet_Data_Descriptor_Class you want to set.
2559 * @param eddc_size The size of the Eet_Data_Descriptor_Class at the compilation time.
2560 * @param name The name of the structure described by this class.
2561 * @param size The size of the structure described by this class.
2562 * @return EINA_TRUE if the structure was correctly set (The only
2563 * reason that could make it fail is if you did give wrong
2564 * parameter).
2565 *
2566 * @note Unless there's a very specific reason to use this function directly,
2567 * the EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET macro is recommended.
2568 *
2569 * @since 1.2.3
2570 * @ingroup Eet_Data_Group
2571 */
2572EAPI Eina_Bool
2573eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc,
2574 unsigned int eddc_size,
2575 const char *name,
2576 int size);
2577
2578/**
2579 * This macro is an helper that set all the parameter of an
2580 * Eet_Data_Descriptor_Class correctly when you use Eina data type
2581 * with stream.
2582 * @param clas The Eet_Data_Descriptor_Class you want to set.
2583 * @param type The type of the structure described by this class.
2584 * @return EINA_TRUE if the structure was correctly set (The only
2585 * reason that could make it fail is if you did give wrong
2586 * parameter).
2587 *
2588 * @see eet_data_descriptor_stream_new
2589 * @since 1.2.3
2590 * @ingroup Eet_Data_Group
2591 */
2592#define EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(clas, type) \
2593 (eet_eina_stream_data_descriptor_class_set(clas, sizeof (*(clas)), # type, sizeof(type)))
2594
2595/**
2596 * This function is an helper that set all the parameter of an
2597 * Eet_Data_Descriptor_Class correctly when you use Eina data type
2598 * with a file.
2599 * @param eddc The Eet_Data_Descriptor_Class you want to set.
2600 * @param eddc_size The size of the Eet_Data_Descriptor_Class at the compilation time.
2601 * @param name The name of the structure described by this class.
2602 * @param size The size of the structure described by this class.
2603 * @return EINA_TRUE if the structure was correctly set (The only
2604 * reason that could make it fail is if you did give wrong
2605 * parameter).
2606 *
2607 * @note Unless there's a very specific reason to use this function directly,
2608 * the EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET macro is recommended.
2609 *
2610 * @since 1.2.3
2611 * @ingroup Eet_Data_Group
2612 */
2613EAPI Eina_Bool
2614eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc,
2615 unsigned int eddc_size,
2616 const char *name,
2617 int size);
2618
2619/**
2620 * This macro is an helper that set all the parameter of an
2621 * Eet_Data_Descriptor_Class correctly when you use Eina data type
2622 * with file.
2623 * @param clas The Eet_Data_Descriptor_Class you want to set.
2624 * @param type The type of the structure described by this class.
2625 * @return EINA_TRUE if the structure was correctly set (The only
2626 * reason that could make it fail is if you did give wrong
2627 * parameter).
2628 *
2629 * @see eet_data_descriptor_file_new
2630 * @since 1.2.3
2631 * @ingroup Eet_Data_Group
2632 */
2633#define EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(clas, type) \
2634 (eet_eina_file_data_descriptor_class_set(clas, sizeof (*(clas)), # type, sizeof(type)))
2635
2636/**
2637 * This function frees a data descriptor when it is not needed anymore.
2638 * @param edd The data descriptor to free.
2639 *
2640 * This function takes a data descriptor handle as a parameter and frees all
2641 * data allocated for the data descriptor and the handle itself. After this
2642 * call the descriptor is no longer valid.
2643 *
2644 * @since 1.0.0
2645 * @ingroup Eet_Data_Group
2646 */
2647EAPI void
2648eet_data_descriptor_free(Eet_Data_Descriptor *edd);
2649
2650/**
2651 * This function is an internal used by macros.
2652 *
2653 * This function is used by macros EET_DATA_DESCRIPTOR_ADD_BASIC(),
2654 * EET_DATA_DESCRIPTOR_ADD_SUB() and EET_DATA_DESCRIPTOR_ADD_LIST(). It is
2655 * complex to use by hand and should be left to be used by the macros, and
2656 * thus is not documented.
2657 *
2658 * @param edd The data descriptor handle to add element (member).
2659 * @param name The name of element to be serialized.
2660 * @param type The type of element to be serialized, like
2661 * #EET_T_INT. If #EET_T_UNKNOW, then it is considered to be a
2662 * group, list or hash.
2663 * @param group_type If element type is #EET_T_UNKNOW, then the @p
2664 * group_type will speficy if it is a list (#EET_G_LIST),
2665 * array (#EET_G_ARRAY) and so on. If #EET_G_UNKNOWN, then
2666 * the member is a subtype (pointer to another type defined by
2667 * another #Eet_Data_Descriptor).
2668 * @param offset byte offset inside the source memory to be serialized.
2669 * @param count number of elements (if #EET_G_ARRAY or #EET_G_VAR_ARRAY).
2670 * @param counter_name variable that defines the name of number of elements.
2671 * @param subtype If contains a subtype, then its data descriptor.
2672 *
2673 * @since 1.0.0
2674 * @ingroup Eet_Data_Group
2675 */
2676EAPI void
2677eet_data_descriptor_element_add(Eet_Data_Descriptor *edd,
2678 const char *name,
2679 int type,
2680 int group_type,
2681 int offset,
2682 /* int count_offset, */
2683 int count,
2684 const char *counter_name,
2685 Eet_Data_Descriptor *subtype);
2686
2687/**
2688 * Read a data structure from an eet file and decodes it.
2689 * @param ef The eet file handle to read from.
2690 * @param edd The data descriptor handle to use when decoding.
2691 * @param name The key the data is stored under in the eet file.
2692 * @return A pointer to the decoded data structure.
2693 *
2694 * This function decodes a data structure stored in an eet file, returning
2695 * a pointer to it if it decoded successfully, or NULL on failure. This
2696 * can save a programmer dozens of hours of work in writing configuration
2697 * file parsing and writing code, as eet does all that work for the program
2698 * and presents a program-friendly data structure, just as the programmer
2699 * likes. Eet can handle members being added or deleted from the data in
2700 * storage and safely zero-fills unfilled members if they were not found
2701 * in the data. It checks sizes and headers whenever it reads data, allowing
2702 * the programmer to not worry about corrupt data.
2703 *
2704 * Once a data structure has been described by the programmer with the
2705 * fields they wish to save or load, storing or retrieving a data structure
2706 * from an eet file, or from a chunk of memory is as simple as a single
2707 * function call.
2708 *
2709 * @see eet_data_read_cipher()
2710 *
2711 * @since 1.0.0
2712 * @ingroup Eet_Data_Group
2713 */
2714EAPI void *
2715eet_data_read(Eet_File *ef,
2716 Eet_Data_Descriptor *edd,
2717 const char *name);
2718
2719/**
2720 * Write a data structure from memory and store in an eet file.
2721 * @param ef The eet file handle to write to.
2722 * @param edd The data descriptor to use when encoding.
2723 * @param name The key to store the data under in the eet file.
2724 * @param data A pointer to the data structure to ssave and encode.
2725 * @param compress Compression flags for storage.
2726 * @return bytes written on successful write, 0 on failure.
2727 *
2728 * This function is the reverse of eet_data_read(), saving a data structure
2729 * to an eet file. The file must have been opening in write mode and the data
2730 * will be kept in memory until the file is either closed or eet_sync() is
2731 * called to flush any unwritten changes.
2732 *
2733 * @see eet_data_write_cipher()
2734 *
2735 * @since 1.0.0
2736 * @ingroup Eet_Data_Group
2737 */
2738EAPI int
2739eet_data_write(Eet_File *ef,
2740 Eet_Data_Descriptor *edd,
2741 const char *name,
2742 const void *data,
2743 int compress);
2744
2745typedef void (*Eet_Dump_Callback)(void *data, const char *str);
2746
2747/**
2748 * Dump an eet encoded data structure into ascii text
2749 * @param data_in The pointer to the data to decode into a struct.
2750 * @param size_in The size of the data pointed to in bytes.
2751 * @param dumpfunc The function to call passed a string when new
2752 * data is converted to text
2753 * @param dumpdata The data to pass to the @p dumpfunc callback.
2754 * @return 1 on success, 0 on failure
2755 *
2756 * This function will take a chunk of data encoded by
2757 * eet_data_descriptor_encode() and convert it into human readable
2758 * ascii text. It does this by calling the @p dumpfunc callback
2759 * for all new text that is generated. This callback should append
2760 * to any existing text buffer and will be passed the pointer @p
2761 * dumpdata as a parameter as well as a string with new text to be
2762 * appended.
2763 *
2764 * Example:
2765 *
2766 * @code
2767 * void output(void *data, const char *string)
2768 * {
2769 * printf("%s", string);
2770 * }
2771 *
2772 * void dump(const char *file)
2773 * {
2774 * FILE *f;
2775 * int len;
2776 * void *data;
2777 *
2778 * f = fopen(file, "r");
2779 * fseek(f, 0, SEEK_END);
2780 * len = ftell(f);
2781 * rewind(f);
2782 * data = malloc(len);
2783 * fread(data, len, 1, f);
2784 * fclose(f);
2785 * eet_data_text_dump(data, len, output, NULL);
2786 * }
2787 * @endcode
2788 *
2789 * @see eet_data_text_dump_cipher()
2790 *
2791 * @since 1.0.0
2792 * @ingroup Eet_Data_Group
2793 */
2794EAPI int
2795eet_data_text_dump(const void *data_in,
2796 int size_in,
2797 Eet_Dump_Callback dumpfunc,
2798 void *dumpdata);
2799
2800/**
2801 * Take an ascii encoding from eet_data_text_dump() and re-encode in binary.
2802 * @param text The pointer to the string data to parse and encode.
2803 * @param textlen The size of the string in bytes (not including 0
2804 * byte terminator).
2805 * @param size_ret This gets filled in with the encoded data blob
2806 * size in bytes.
2807 * @return The encoded data on success, NULL on failure.
2808 *
2809 * This function will parse the string pointed to by @p text and return
2810 * an encoded data lump the same way eet_data_descriptor_encode() takes an
2811 * in-memory data struct and encodes into a binary blob. @p text is a normal
2812 * C string.
2813 *
2814 * @see eet_data_text_undump_cipher()
2815 *
2816 * @since 1.0.0
2817 * @ingroup Eet_Data_Group
2818 */
2819EAPI void *
2820eet_data_text_undump(const char *text,
2821 int textlen,
2822 int *size_ret);
2823
2824/**
2825 * Dump an eet encoded data structure from an eet file into ascii text
2826 * @param ef A valid eet file handle.
2827 * @param name Name of the entry. eg: "/base/file_i_want".
2828 * @param dumpfunc The function to call passed a string when new
2829 * data is converted to text
2830 * @param dumpdata The data to pass to the @p dumpfunc callback.
2831 * @return 1 on success, 0 on failure
2832 *
2833 * This function will take an open and valid eet file from
2834 * eet_open() request the data encoded by
2835 * eet_data_descriptor_encode() corresponding to the key @p name
2836 * and convert it into human readable ascii text. It does this by
2837 * calling the @p dumpfunc callback for all new text that is
2838 * generated. This callback should append to any existing text
2839 * buffer and will be passed the pointer @p dumpdata as a parameter
2840 * as well as a string with new text to be appended.
2841 *
2842 * @see eet_data_dump_cipher()
2843 *
2844 * @since 1.0.0
2845 * @ingroup Eet_Data_Group
2846 */
2847EAPI int
2848eet_data_dump(Eet_File *ef,
2849 const char *name,
2850 Eet_Dump_Callback dumpfunc,
2851 void *dumpdata);
2852
2853/**
2854 * Take an ascii encoding from eet_data_dump() and re-encode in binary.
2855 * @param ef A valid eet file handle.
2856 * @param name Name of the entry. eg: "/base/file_i_want".
2857 * @param text The pointer to the string data to parse and encode.
2858 * @param textlen The size of the string in bytes (not including 0
2859 * byte terminator).
2860 * @param compress Compression flags (1 == compress, 0 = don't compress).
2861 * @return 1 on success, 0 on failure
2862 *
2863 * This function will parse the string pointed to by @p text,
2864 * encode it the same way eet_data_descriptor_encode() takes an
2865 * in-memory data struct and encodes into a binary blob.
2866 *
2867 * The data (optionally compressed) will be in ram, pending a flush to
2868 * disk (it will stay in ram till the eet file handle is closed though).
2869 *
2870 * @see eet_data_undump_cipher()
2871 *
2872 * @since 1.0.0
2873 * @ingroup Eet_Data_Group
2874 */
2875EAPI int
2876eet_data_undump(Eet_File *ef,
2877 const char *name,
2878 const char *text,
2879 int textlen,
2880 int compress);
2881
2882/**
2883 * Decode a data structure from an arbitrary location in memory.
2884 * @param edd The data descriptor to use when decoding.
2885 * @param data_in The pointer to the data to decode into a struct.
2886 * @param size_in The size of the data pointed to in bytes.
2887 * @return NULL on failure, or a valid decoded struct pointer on success.
2888 *
2889 * This function will decode a data structure that has been encoded using
2890 * eet_data_descriptor_encode(), and return a data structure with all its
2891 * elements filled out, if successful, or NULL on failure.
2892 *
2893 * The data to be decoded is stored at the memory pointed to by @p data_in,
2894 * and is described by the descriptor pointed to by @p edd. The data size is
2895 * passed in as the value to @p size_in, ande must be greater than 0 to
2896 * succeed.
2897 *
2898 * This function is useful for decoding data structures delivered to the
2899 * application by means other than an eet file, such as an IPC or socket
2900 * connection, raw files, shared memory etc.
2901 *
2902 * Please see eet_data_read() for more information.
2903 *
2904 * @see eet_data_descriptor_decode_cipher()
2905 *
2906 * @since 1.0.0
2907 * @ingroup Eet_Data_Group
2908 */
2909EAPI void *
2910eet_data_descriptor_decode(Eet_Data_Descriptor *edd,
2911 const void *data_in,
2912 int size_in);
2913
2914/**
2915 * Encode a dsata struct to memory and return that encoded data.
2916 * @param edd The data descriptor to use when encoding.
2917 * @param data_in The pointer to the struct to encode into data.
2918 * @param size_ret pointer to the an int to be filled with the decoded size.
2919 * @return NULL on failure, or a valid encoded data chunk on success.
2920 *
2921 * This function takes a data structutre in memory and encodes it into a
2922 * serialised chunk of data that can be decoded again by
2923 * eet_data_descriptor_decode(). This is useful for being able to transmit
2924 * data structures across sockets, pipes, IPC or shared file mechanisms,
2925 * without having to worry about memory space, machine type, endianess etc.
2926 *
2927 * The parameter @p edd must point to a valid data descriptor, and
2928 * @p data_in must point to the right data structure to encode. If not, the
2929 * encoding may fail.
2930 *
2931 * On success a non NULL valid pointer is returned and what @p size_ret
2932 * points to is set to the size of this decoded data, in bytes. When the
2933 * encoded data is no longer needed, call free() on it. On failure NULL is
2934 * returned and what @p size_ret points to is set to 0.
2935 *
2936 * Please see eet_data_write() for more information.
2937 *
2938 * @see eet_data_descriptor_encode_cipher()
2939 *
2940 * @since 1.0.0
2941 * @ingroup Eet_Data_Group
2942 */
2943EAPI void *
2944eet_data_descriptor_encode(Eet_Data_Descriptor *edd,
2945 const void *data_in,
2946 int *size_ret);
2947
2948/**
2949 * Add a basic data element to a data descriptor.
2950 * @param edd The data descriptor to add the type to.
2951 * @param struct_type The type of the struct.
2952 * @param name The string name to use to encode/decode this member
2953 * (must be a constant global and never change).
2954 * @param member The struct member itself to be encoded.
2955 * @param type The type of the member to encode.
2956 *
2957 * This macro is a convenience macro provided to add a member to
2958 * the data descriptor @p edd. The type of the structure is
2959 * provided as the @p struct_type parameter (for example: struct
2960 * my_struct). The @p name parameter defines a string that will be
2961 * used to uniquely name that member of the struct (it is suggested
2962 * to use the struct member itself). The @p member parameter is
2963 * the actual struct member itself (for example: values), and @p type is the
2964 * basic data type of the member which must be one of: EET_T_CHAR, EET_T_SHORT,
2965 * EET_T_INT, EET_T_LONG_LONG, EET_T_FLOAT, EET_T_DOUBLE, EET_T_UCHAR,
2966 * EET_T_USHORT, EET_T_UINT, EET_T_ULONG_LONG or EET_T_STRING.
2967 *
2968 * @since 1.0.0
2969 * @ingroup Eet_Data_Group
2970 */
2971#define EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct_type, name, member, type) \
2972 do { \
2973 struct_type ___ett; \
2974 eet_data_descriptor_element_add(edd, name, type, EET_G_UNKNOWN, \
2975 (char *)(& (___ett.member)) - \
2976 (char *)(& (___ett)), \
2977 0, /* 0, */ NULL, NULL); \
2978 } while(0)
2979
2980/**
2981 * Add a sub-element type to a data descriptor
2982 * @param edd The data descriptor to add the type to.
2983 * @param struct_type The type of the struct.
2984 * @param name The string name to use to encode/decode this member
2985 * (must be a constant global and never change).
2986 * @param member The struct member itself to be encoded.
2987 * @param subtype The type of sub-type struct to add.
2988 *
2989 * This macro lets you easily add a sub-type (a struct that's pointed to
2990 * by this one). All the parameters are the same as for
2991 * EET_DATA_DESCRIPTOR_ADD_BASIC(), with the @p subtype being the exception.
2992 * This must be the data descriptor of the struct that is pointed to by
2993 * this element.
2994 *
2995 * @since 1.0.0
2996 * @ingroup Eet_Data_Group
2997 */
2998#define EET_DATA_DESCRIPTOR_ADD_SUB(edd, struct_type, name, member, subtype) \
2999 do { \
3000 struct_type ___ett; \
3001 eet_data_descriptor_element_add(edd, name, EET_T_UNKNOW, EET_G_UNKNOWN, \
3002 (char *)(& (___ett.member)) - \
3003 (char *)(& (___ett)), \
3004 0, /* 0, */ NULL, subtype); \
3005 } while (0)
3006
3007/**
3008 * Add a linked list type to a data descriptor
3009 * @param edd The data descriptor to add the type to.
3010 * @param struct_type The type of the struct.
3011 * @param name The string name to use to encode/decode this member
3012 * (must be a constant global and never change).
3013 * @param member The struct member itself to be encoded.
3014 * @param subtype The type of linked list member to add.
3015 *
3016 * This macro lets you easily add a linked list of other data types. All the
3017 * parameters are the same as for EET_DATA_DESCRIPTOR_ADD_BASIC(), with the
3018 * @p subtype being the exception. This must be the data descriptor of the
3019 * element that is in each member of the linked list to be stored.
3020 *
3021 * @since 1.0.0
3022 * @ingroup Eet_Data_Group
3023 */
3024#define EET_DATA_DESCRIPTOR_ADD_LIST(edd, struct_type, name, member, subtype) \
3025 do { \
3026 struct_type ___ett; \
3027 eet_data_descriptor_element_add(edd, name, EET_T_UNKNOW, EET_G_LIST, \
3028 (char *)(& (___ett.member)) - \
3029 (char *)(& (___ett)), \
3030 0, /* 0, */ NULL, subtype); \
3031 } while (0)
3032
3033/**
3034 * Add a linked list of string to a data descriptor
3035 * @param edd The data descriptor to add the type to.
3036 * @param struct_type The type of the struct.
3037 * @param name The string name to use to encode/decode this member
3038 * (must be a constant global and never change).
3039 * @param member The struct member itself to be encoded.
3040 *
3041 * This macro lets you easily add a linked list of char *. All the
3042 * parameters are the same as for EET_DATA_DESCRIPTOR_ADD_BASIC().
3043 *
3044 * @since 1.5.0
3045 * @ingroup Eet_Data_Group
3046 */
3047#define EET_DATA_DESCRIPTOR_ADD_LIST_STRING(edd, struct_type, name, member) \
3048 do { \
3049 struct_type ___ett; \
3050 eet_data_descriptor_element_add(edd, name, EET_T_STRING, EET_G_LIST, \
3051 (char *)(& (___ett.member)) - \
3052 (char *)(& (___ett)), \
3053 0, /* 0, */ NULL, NULL); \
3054 } while (0)
3055
3056/**
3057 * Add a hash type to a data descriptor
3058 * @param edd The data descriptor to add the type to.
3059 * @param struct_type The type of the struct.
3060 * @param name The string name to use to encode/decode this member
3061 * (must be a constant global and never change).
3062 * @param member The struct member itself to be encoded.
3063 * @param subtype The type of hash member to add.
3064 *
3065 * This macro lets you easily add a hash of other data types. All the
3066 * parameters are the same as for EET_DATA_DESCRIPTOR_ADD_BASIC(), with the
3067 * @p subtype being the exception. This must be the data descriptor of the
3068 * element that is in each member of the hash to be stored.
3069 * The hash keys must be strings.
3070 *
3071 * @since 1.0.0
3072 * @ingroup Eet_Data_Group
3073 */
3074#define EET_DATA_DESCRIPTOR_ADD_HASH(edd, struct_type, name, member, subtype) \
3075 do { \
3076 struct_type ___ett; \
3077 eet_data_descriptor_element_add(edd, name, EET_T_UNKNOW, EET_G_HASH, \
3078 (char *)(& (___ett.member)) - \
3079 (char *)(& (___ett)), \
3080 0, /* 0, */ NULL, subtype); \
3081 } while (0)
3082
3083/**
3084 * Add a hash of string to a data descriptor
3085 * @param edd The data descriptor to add the type to.
3086 * @param struct_type The type of the struct.
3087 * @param name The string name to use to encode/decode this member
3088 * (must be a constant global and never change).
3089 * @param member The struct member itself to be encoded.
3090 *
3091 * This macro lets you easily add a hash of string elements. All the
3092 * parameters are the same as for EET_DATA_DESCRIPTOR_ADD_HASH().
3093 *
3094 * @since 1.3.4
3095 * @ingroup Eet_Data_Group
3096 */
3097#define EET_DATA_DESCRIPTOR_ADD_HASH_STRING(edd, struct_type, name, member) \
3098 do { \
3099 struct_type ___ett; \
3100 eet_data_descriptor_element_add(edd, name, EET_T_STRING, EET_G_HASH, \
3101 (char *)(& (___ett.member)) - \
3102 (char *)(& (___ett)), \
3103 0, /* 0, */ NULL, NULL); \
3104 } while (0)
3105
3106/**
3107 * Add an array of basic data elements to a data descriptor.
3108 * @param edd The data descriptor to add the type to.
3109 * @param struct_type The type of the struct.
3110 * @param name The string name to use to encode/decode this member
3111 * (must be a constant global and never change).
3112 * @param member The struct member itself to be encoded.
3113 * @param type The type of the member to encode.
3114 *
3115 * This macro lets you easily add a fixed size array of basic data
3116 * types. All the parameters are the same as for
3117 * EET_DATA_DESCRIPTOR_ADD_BASIC().
3118 * The array must be defined with a fixed size in the declaration of the
3119 * struct containing it.
3120 *
3121 * @since 1.5.0
3122 * @ingroup Eet_Data_Group
3123 */
3124#define EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(edd, struct_type, name, member, type) \
3125 do { \
3126 struct_type ___ett; \
3127 eet_data_descriptor_element_add(edd, name, type, EET_G_ARRAY, \
3128 (char *)(& (___ett.member)) - \
3129 (char *)(& (___ett)), \
3130 sizeof(___ett.member) / \
3131 sizeof(___ett.member[0]), \
3132 NULL, NULL); \
3133 } while(0)
3134
3135/**
3136 * Add a fixed size array type to a data descriptor
3137 * @param edd The data descriptor to add the type to.
3138 * @param struct_type The type of the struct.
3139 * @param name The string name to use to encode/decode this member
3140 * (must be a constant global and never change).
3141 * @param member The struct member itself to be encoded.
3142 * @param subtype The type of hash member to add.
3143 *
3144 * This macro lets you easily add a fixed size array of other data
3145 * types. All the parameters are the same as for
3146 * EET_DATA_DESCRIPTOR_ADD_BASIC(), with the @p subtype being the
3147 * exception. This must be the data descriptor of the element that
3148 * is in each member of the array to be stored.
3149 * The array must be defined with a fixed size in the declaration of the
3150 * struct containing it.
3151 *
3152 * @since 1.0.2
3153 * @ingroup Eet_Data_Group
3154 */
3155#define EET_DATA_DESCRIPTOR_ADD_ARRAY(edd, struct_type, name, member, subtype) \
3156 do { \
3157 struct_type ___ett; \
3158 eet_data_descriptor_element_add(edd, name, EET_T_UNKNOW, EET_G_ARRAY, \
3159 (char *)(& (___ett.member)) - \
3160 (char *)(& (___ett)), \
3161 /* 0, */ sizeof(___ett.member) / \
3162 sizeof(___ett.member[0]), NULL, subtype); \
3163 } while (0)
3164
3165/**
3166 * Add a variable size array type to a data descriptor
3167 * @param edd The data descriptor to add the type to.
3168 * @param struct_type The type of the struct.
3169 * @param name The string name to use to encode/decode this member
3170 * (must be a constant global and never change).
3171 * @param member The struct member itself to be encoded.
3172 * @param subtype The type of hash member to add.
3173 *
3174 * This macro lets you easily add a variable size array of other data
3175 * types. All the parameters are the same as for
3176 * EET_DATA_DESCRIPTOR_ADD_BASIC(), with the @p subtype being the
3177 * exception. This must be the data descriptor of the element that
3178 * is in each member of the array to be stored. This assumes you have
3179 * a struct member (of type EET_T_INT) called member_count (note the
3180 * _count appended to the member) that holds the number of items in
3181 * the array. This array will be allocated separately to the struct it
3182 * is in.
3183 *
3184 * @since 1.0.2
3185 * @ingroup Eet_Data_Group
3186 */
3187#define EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(edd, struct_type, name, member, subtype) \
3188 do { \
3189 struct_type ___ett; \
3190 eet_data_descriptor_element_add(edd, \
3191 name, \
3192 EET_T_UNKNOW, \
3193 EET_G_VAR_ARRAY, \
3194 (char *)(& (___ett.member)) - \
3195 (char *)(& (___ett)), \
3196 (char *)(& (___ett.member ## _count)) - \
3197 (char *)(& (___ett)), \
3198 /* 0, */ NULL, \
3199 subtype); \
3200 } while (0)
3201
3202/**
3203 * Add a variable size array type to a data descriptor
3204 * @param edd The data descriptor to add the type to.
3205 * @param struct_type The type of the struct.
3206 * @param name The string name to use to encode/decode this member
3207 * (must be a constant global and never change).
3208 * @param member The struct member itself to be encoded.
3209 *
3210 * This macro lets you easily add a variable size array of strings. All
3211 * the parameters are the same as for EET_DATA_DESCRIPTOR_ADD_BASIC().
3212 *
3213 * @since 1.4.0
3214 * @ingroup Eet_Data_Group
3215 */
3216#define EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY_STRING(edd, struct_type, name, member) \
3217 do { \
3218 struct_type ___ett; \
3219 eet_data_descriptor_element_add(edd, \
3220 name, \
3221 EET_T_STRING, \
3222 EET_G_VAR_ARRAY, \
3223 (char *)(& (___ett.member)) - \
3224 (char *)(& (___ett)), \
3225 (char *)(& (___ett.member ## _count)) - \
3226 (char *)(& (___ett)), \
3227 /* 0, */ NULL, \
3228 NULL); \
3229 } while (0)
3230
3231/**
3232 * Add an union type to a data descriptor
3233 * @param edd The data descriptor to add the type to.
3234 * @param struct_type The type of the struct.
3235 * @param name The string name to use to encode/decode this member
3236 * (must be a constant global and never change).
3237 * @param member The struct member itself to be encoded.
3238 * @param type_member The member that give hints on what is in the union.
3239 * @param unified_type Describe all possible type the union could handle.
3240 *
3241 * This macro lets you easily add an union with a member that specify what is inside.
3242 * The @p unified_type is an Eet_Data_Descriptor, but only the entry that match the name
3243 * returned by type_get will be used for each serialized data. The type_get and type_set
3244 * callback of unified_type should be defined.
3245 *
3246 * @since 1.2.4
3247 * @ingroup Eet_Data_Group
3248 * @see Eet_Data_Descriptor_Class
3249 */
3250#define EET_DATA_DESCRIPTOR_ADD_UNION(edd, struct_type, name, member, type_member, unified_type) \
3251 do { \
3252 struct_type ___ett; \
3253 eet_data_descriptor_element_add(edd, name, EET_T_UNKNOW, EET_G_UNION, \
3254 (char *)(& (___ett.member)) - \
3255 (char *)(& (___ett)), \
3256 (char *)(& (___ett.type_member)) - \
3257 (char *)(& (___ett)), \
3258 NULL, unified_type); \
3259 } while (0)
3260
3261/**
3262 * Add a automatically selectable type to a data descriptor
3263 * @param edd The data descriptor to add the type to.
3264 * @param struct_type The type of the struct.
3265 * @param name The string name to use to encode/decode this member
3266 * (must be a constant global and never change).
3267 * @param member The struct member itself to be encoded.
3268 * @param type_member The member that give hints on what is in the union.
3269 * @param unified_type Describe all possible type the union could handle.
3270 *
3271 * This macro lets you easily define what the content of @p member points to depending of
3272 * the content of @p type_member. The type_get and type_set callback of unified_type should
3273 * be defined. If the the type is not know at the time of restoring it, eet will still call
3274 * type_set of @p unified_type but the pointer will be set to a serialized binary representation
3275 * of what eet know. This make it possible, to save this pointer again by just returning the string
3276 * given previously and telling it by setting unknow to EINA_TRUE.
3277 *
3278 * @since 1.2.4
3279 * @ingroup Eet_Data_Group
3280 * @see Eet_Data_Descriptor_Class
3281 */
3282#define EET_DATA_DESCRIPTOR_ADD_VARIANT(edd, struct_type, name, member, type_member, unified_type) \
3283 do { \
3284 struct_type ___ett; \
3285 eet_data_descriptor_element_add(edd, name, EET_T_UNKNOW, EET_G_VARIANT, \
3286 (char *)(& (___ett.member)) - \
3287 (char *)(& (___ett)), \
3288 (char *)(& (___ett.type_member)) - \
3289 (char *)(& (___ett)), \
3290 NULL, unified_type); \
3291 } while (0)
3292
3293/**
3294 * Add a mapping to a data descriptor that will be used by union, variant or inherited type
3295 * @param unified_type The data descriptor to add the mapping to.
3296 * @param name The string name to get/set type.
3297 * @param subtype The matching data descriptor.
3298 *
3299 * @since 1.2.4
3300 * @ingroup Eet_Data_Group
3301 * @see Eet_Data_Descriptor_Class
3302 */
3303#define EET_DATA_DESCRIPTOR_ADD_MAPPING(unified_type, name, subtype) \
3304 eet_data_descriptor_element_add(unified_type, \
3305 name, \
3306 EET_T_UNKNOW, \
3307 EET_G_UNKNOWN, \
3308 0, \
3309 0, \
3310 NULL, \
3311 subtype)
3312
3313/**
3314 * @defgroup Eet_Data_Cipher_Group Eet Data Serialization using A Ciphers
3315 *
3316 * Most of the @ref Eet_Data_Group have alternative versions that
3317 * accounts for ciphers to protect their content.
3318 *
3319 * @see @ref Eet_Cipher_Group
3320 *
3321 * @ingroup Eet_Data_Group
3322 */
3323
3324/**
3325 * Read a data structure from an eet file and decodes it using a cipher.
3326 * @param ef The eet file handle to read from.
3327 * @param edd The data descriptor handle to use when decoding.
3328 * @param name The key the data is stored under in the eet file.
3329 * @param cipher_key The key to use as cipher.
3330 * @return A pointer to the decoded data structure.
3331 *
3332 * This function decodes a data structure stored in an eet file, returning
3333 * a pointer to it if it decoded successfully, or NULL on failure. This
3334 * can save a programmer dozens of hours of work in writing configuration
3335 * file parsing and writing code, as eet does all that work for the program
3336 * and presents a program-friendly data structure, just as the programmer
3337 * likes. Eet can handle members being added or deleted from the data in
3338 * storage and safely zero-fills unfilled members if they were not found
3339 * in the data. It checks sizes and headers whenever it reads data, allowing
3340 * the programmer to not worry about corrupt data.
3341 *
3342 * Once a data structure has been described by the programmer with the
3343 * fields they wish to save or load, storing or retrieving a data structure
3344 * from an eet file, or from a chunk of memory is as simple as a single
3345 * function call.
3346 *
3347 * @see eet_data_read()
3348 *
3349 * @since 1.0.0
3350 * @ingroup Eet_Data_Cipher_Group
3351 */
3352EAPI void *
3353eet_data_read_cipher(Eet_File *ef,
3354 Eet_Data_Descriptor *edd,
3355 const char *name,
3356 const char *cipher_key);
3357
3358/**
3359 * Read a data structure from an eet extended attribute and decodes it using a cipher.
3360 * @param filename The file to extract the extended attribute from.
3361 * @param attribute The attribute to get the data from.
3362 * @param edd The data descriptor handle to use when decoding.
3363 * @param cipher_key The key to use as cipher.
3364 * @return A pointer to the decoded data structure.
3365 *
3366 * This function decodes a data structure stored in an eet extended attribute,
3367 * returning a pointer to it if it decoded successfully, or NULL on failure.
3368 * Eet can handle members being added or deleted from the data in
3369 * storage and safely zero-fills unfilled members if they were not found
3370 * in the data. It checks sizes and headers whenever it reads data, allowing
3371 * the programmer to not worry about corrupt data.
3372 *
3373 * Once a data structure has been described by the programmer with the
3374 * fields they wish to save or load, storing or retrieving a data structure
3375 * from an eet file, from a chunk of memory or from an extended attribute
3376 * is as simple as a single function call.
3377 *
3378 * @since 1.5.0
3379 * @ingroup Eet_Data_Cipher_Group
3380 */
3381EAPI void *
3382eet_data_xattr_cipher_get(const char *filename,
3383 const char *attribute,
3384 Eet_Data_Descriptor *edd,
3385 const char *cipher_key);
3386
3387/**
3388 * Write a data structure from memory and store in an eet file
3389 * using a cipher.
3390 * @param ef The eet file handle to write to.
3391 * @param edd The data descriptor to use when encoding.
3392 * @param name The key to store the data under in the eet file.
3393 * @param cipher_key The key to use as cipher.
3394 * @param data A pointer to the data structure to ssave and encode.
3395 * @param compress Compression flags for storage.
3396 * @return bytes written on successful write, 0 on failure.
3397 *
3398 * This function is the reverse of eet_data_read_cipher(), saving a data structure
3399 * to an eet file.
3400 *
3401 * @since 1.0.0
3402 * @ingroup Eet_Data_Cipher_Group
3403 */
3404EAPI int
3405eet_data_write_cipher(Eet_File *ef,
3406 Eet_Data_Descriptor *edd,
3407 const char *name,
3408 const char *cipher_key,
3409 const void *data,
3410 int compress);
3411
3412/**
3413 * Write a data structure from memory and store in an eet extended attribute
3414 * using a cipher.
3415 * @param filename The file to write the extended attribute to.
3416 * @param attribute The attribute to store the data to.
3417 * @param edd The data descriptor to use when encoding.
3418 * @param cipher_key The key to use as cipher.
3419 * @param data A pointer to the data structure to ssave and encode.
3420 * @param flags The policy to use when setting the data.
3421 * @return EINA_TRUE on success, EINA_FALSE on failure.
3422 *
3423 * This function is the reverse of eet_data_xattr_cipher_get(), saving a data structure
3424 * to an eet extended attribute.
3425 *
3426 * @since 1.5.0
3427 * @ingroup Eet_Data_Cipher_Group
3428 */
3429EAPI Eina_Bool
3430eet_data_xattr_cipher_set(const char *filename,
3431 const char *attribute,
3432 Eet_Data_Descriptor *edd,
3433 const char *cipher_key,
3434 const void *data,
3435 Eina_Xattr_Flags flags);
3436
3437/**
3438 * Dump an eet encoded data structure into ascii text using a cipher.
3439 * @param data_in The pointer to the data to decode into a struct.
3440 * @param cipher_key The key to use as cipher.
3441 * @param size_in The size of the data pointed to in bytes.
3442 * @param dumpfunc The function to call passed a string when new
3443 * data is converted to text
3444 * @param dumpdata The data to pass to the @p dumpfunc callback.
3445 * @return 1 on success, 0 on failure
3446 *
3447 * This function will take a chunk of data encoded by
3448 * eet_data_descriptor_encode() and convert it into human readable
3449 * ascii text. It does this by calling the @p dumpfunc callback
3450 * for all new text that is generated. This callback should append
3451 * to any existing text buffer and will be passed the pointer @p
3452 * dumpdata as a parameter as well as a string with new text to be
3453 * appended.
3454 *
3455 * Example:
3456 *
3457 * @code
3458 * void output(void *data, const char *string)
3459 * {
3460 * printf("%s", string);
3461 * }
3462 *
3463 * void dump(const char *file)
3464 * {
3465 * FILE *f;
3466 * int len;
3467 * void *data;
3468 *
3469 * f = fopen(file, "r");
3470 * fseek(f, 0, SEEK_END);
3471 * len = ftell(f);
3472 * rewind(f);
3473 * data = malloc(len);
3474 * fread(data, len, 1, f);
3475 * fclose(f);
3476 * eet_data_text_dump_cipher(data, cipher_key, len, output, NULL);
3477 * }
3478 * @endcode
3479 *
3480 * @see eet_data_text_dump()
3481 *
3482 * @since 1.0.0
3483 * @ingroup Eet_Data_Cipher_Group
3484 */
3485EAPI int
3486eet_data_text_dump_cipher(const void *data_in,
3487 const char *cipher_key,
3488 int size_in,
3489 Eet_Dump_Callback dumpfunc,
3490 void *dumpdata);
3491
3492/**
3493 * Take an ascii encoding from eet_data_text_dump() and re-encode
3494 * in binary using a cipher.
3495 * @param text The pointer to the string data to parse and encode.
3496 * @param cipher_key The key to use as cipher.
3497 * @param textlen The size of the string in bytes (not including 0
3498 * byte terminator).
3499 * @param size_ret This gets filled in with the encoded data blob
3500 * size in bytes.
3501 * @return The encoded data on success, NULL on failure.
3502 *
3503 * This function will parse the string pointed to by @p text and return
3504 * an encoded data lump the same way eet_data_descriptor_encode() takes an
3505 * in-memory data struct and encodes into a binary blob. @p text is a normal
3506 * C string.
3507 *
3508 * @see eet_data_text_undump()
3509 *
3510 * @since 1.0.0
3511 * @ingroup Eet_Data_Cipher_Group
3512 */
3513EAPI void *
3514eet_data_text_undump_cipher(const char *text,
3515 const char *cipher_key,
3516 int textlen,
3517 int *size_ret);
3518
3519/**
3520 * Dump an eet encoded data structure from an eet file into ascii
3521 * text using a cipher.
3522 * @param ef A valid eet file handle.
3523 * @param name Name of the entry. eg: "/base/file_i_want".
3524 * @param cipher_key The key to use as cipher.
3525 * @param dumpfunc The function to call passed a string when new
3526 * data is converted to text
3527 * @param dumpdata The data to pass to the @p dumpfunc callback.
3528 * @return 1 on success, 0 on failure
3529 *
3530 * This function will take an open and valid eet file from
3531 * eet_open() request the data encoded by
3532 * eet_data_descriptor_encode() corresponding to the key @p name
3533 * and convert it into human readable ascii text. It does this by
3534 * calling the @p dumpfunc callback for all new text that is
3535 * generated. This callback should append to any existing text
3536 * buffer and will be passed the pointer @p dumpdata as a parameter
3537 * as well as a string with new text to be appended.
3538 *
3539 * @see eet_data_dump()
3540 *
3541 * @since 1.0.0
3542 * @ingroup Eet_Data_Cipher_Group
3543 */
3544EAPI int
3545eet_data_dump_cipher(Eet_File *ef,
3546 const char *name,
3547 const char *cipher_key,
3548 Eet_Dump_Callback dumpfunc,
3549 void *dumpdata);
3550
3551/**
3552 * Take an ascii encoding from eet_data_dump() and re-encode in
3553 * binary using a cipher.
3554 * @param ef A valid eet file handle.
3555 * @param name Name of the entry. eg: "/base/file_i_want".
3556 * @param cipher_key The key to use as cipher.
3557 * @param text The pointer to the string data to parse and encode.
3558 * @param textlen The size of the string in bytes (not including 0
3559 * byte terminator).
3560 * @param compress Compression flags (1 == compress, 0 = don't compress).
3561 * @return 1 on success, 0 on failure
3562 *
3563 * This function will parse the string pointed to by @p text,
3564 * encode it the same way eet_data_descriptor_encode() takes an
3565 * in-memory data struct and encodes into a binary blob.
3566 *
3567 * The data (optionally compressed) will be in ram, pending a flush to
3568 * disk (it will stay in ram till the eet file handle is closed though).
3569 *
3570 * @see eet_data_undump()
3571 *
3572 * @since 1.0.0
3573 * @ingroup Eet_Data_Cipher_Group
3574 */
3575EAPI int
3576eet_data_undump_cipher(Eet_File *ef,
3577 const char *name,
3578 const char *cipher_key,
3579 const char *text,
3580 int textlen,
3581 int compress);
3582
3583/**
3584 * Decode a data structure from an arbitrary location in memory
3585 * using a cipher.
3586 * @param edd The data descriptor to use when decoding.
3587 * @param data_in The pointer to the data to decode into a struct.
3588 * @param cipher_key The key to use as cipher.
3589 * @param size_in The size of the data pointed to in bytes.
3590 * @return NULL on failure, or a valid decoded struct pointer on success.
3591 *
3592 * This function will decode a data structure that has been encoded using
3593 * eet_data_descriptor_encode(), and return a data structure with all its
3594 * elements filled out, if successful, or NULL on failure.
3595 *
3596 * The data to be decoded is stored at the memory pointed to by @p data_in,
3597 * and is described by the descriptor pointed to by @p edd. The data size is
3598 * passed in as the value to @p size_in, ande must be greater than 0 to
3599 * succeed.
3600 *
3601 * This function is useful for decoding data structures delivered to the
3602 * application by means other than an eet file, such as an IPC or socket
3603 * connection, raw files, shared memory etc.
3604 *
3605 * Please see eet_data_read() for more information.
3606 *
3607 * @see eet_data_descriptor_decode()
3608 *
3609 * @since 1.0.0
3610 * @ingroup Eet_Data_Cipher_Group
3611 */
3612EAPI void *
3613eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd,
3614 const void *data_in,
3615 const char *cipher_key,
3616 int size_in);
3617
3618/**
3619 * Encode a data struct to memory and return that encoded data
3620 * using a cipher.
3621 * @param edd The data descriptor to use when encoding.
3622 * @param data_in The pointer to the struct to encode into data.
3623 * @param cipher_key The key to use as cipher.
3624 * @param size_ret pointer to the an int to be filled with the decoded size.
3625 * @return NULL on failure, or a valid encoded data chunk on success.
3626 *
3627 * This function takes a data structutre in memory and encodes it into a
3628 * serialised chunk of data that can be decoded again by
3629 * eet_data_descriptor_decode(). This is useful for being able to transmit
3630 * data structures across sockets, pipes, IPC or shared file mechanisms,
3631 * without having to worry about memory space, machine type, endianess etc.
3632 *
3633 * The parameter @p edd must point to a valid data descriptor, and
3634 * @p data_in must point to the right data structure to encode. If not, the
3635 * encoding may fail.
3636 *
3637 * On success a non NULL valid pointer is returned and what @p size_ret
3638 * points to is set to the size of this decoded data, in bytes. When the
3639 * encoded data is no longer needed, call free() on it. On failure NULL is
3640 * returned and what @p size_ret points to is set to 0.
3641 *
3642 * Please see eet_data_write() for more information.
3643 *
3644 * @see eet_data_descriptor_encode()
3645 *
3646 * @since 1.0.0
3647 * @ingroup Eet_Data_Cipher_Group
3648 */
3649EAPI void *
3650eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd,
3651 const void *data_in,
3652 const char *cipher_key,
3653 int *size_ret);
3654
3655/**
3656 * @defgroup Eet_Node_Group Low-level Serialization Structures.
3657 *
3658 * Functions that create, destroy and manipulate serialization nodes
3659 * used by @ref Eet_Data_Group.
3660 *
3661 * @{
3662 */
3663
3664/**
3665 * @typedef Eet_Node
3666 * Opaque handle to manage serialization node.
3667 */
3668typedef struct _Eet_Node Eet_Node;
3669
3670/**
3671 * @typedef Eet_Node_Data
3672 * Contains an union that can fit any kind of node.
3673 */
3674typedef struct _Eet_Node_Data Eet_Node_Data;
3675
3676/**
3677 * @struct _Eet_Node_Data
3678 * Contains an union that can fit any kind of node.
3679 */
3680struct _Eet_Node_Data
3681{
3682 union {
3683 char c;
3684 short s;
3685 int i;
3686 long long l;
3687 float f;
3688 double d;
3689 unsigned char uc;
3690 unsigned short us;
3691 unsigned int ui;
3692 unsigned long long ul;
3693 const char *str;
3694 } value;
3695};
3696
3697/**
3698 * @}
3699 */
3700
3701/**
3702 * TODO FIX ME
3703 * @ingroup Eet_Node_Group
3704 */
3705EAPI Eet_Node *
3706eet_node_char_new(const char *name,
3707 char c);
3708
3709/**
3710 * TODO FIX ME
3711 * @ingroup Eet_Node_Group
3712 */
3713EAPI Eet_Node *
3714eet_node_short_new(const char *name,
3715 short s);
3716
3717/**
3718 * TODO FIX ME
3719 * @ingroup Eet_Node_Group
3720 */
3721EAPI Eet_Node *
3722eet_node_int_new(const char *name,
3723 int i);
3724
3725/**
3726 * TODO FIX ME
3727 * @ingroup Eet_Node_Group
3728 */
3729EAPI Eet_Node *
3730eet_node_long_long_new(const char *name,
3731 long long l);
3732
3733/**
3734 * TODO FIX ME
3735 * @ingroup Eet_Node_Group
3736 */
3737EAPI Eet_Node *
3738eet_node_float_new(const char *name,
3739 float f);
3740
3741/**
3742 * TODO FIX ME
3743 * @ingroup Eet_Node_Group
3744 */
3745EAPI Eet_Node *
3746eet_node_double_new(const char *name,
3747 double d);
3748
3749/**
3750 * TODO FIX ME
3751 * @ingroup Eet_Node_Group
3752 */
3753EAPI Eet_Node *
3754eet_node_unsigned_char_new(const char *name,
3755 unsigned char uc);
3756
3757/**
3758 * TODO FIX ME
3759 * @ingroup Eet_Node_Group
3760 */
3761EAPI Eet_Node *
3762eet_node_unsigned_short_new(const char *name,
3763 unsigned short us);
3764
3765/**
3766 * TODO FIX ME
3767 * @ingroup Eet_Node_Group
3768 */
3769EAPI Eet_Node *
3770eet_node_unsigned_int_new(const char *name,
3771 unsigned int ui);
3772
3773/**
3774 * TODO FIX ME
3775 * @ingroup Eet_Node_Group
3776 */
3777EAPI Eet_Node *
3778eet_node_unsigned_long_long_new(const char *name,
3779 unsigned long long l);
3780
3781/**
3782 * TODO FIX ME
3783 * @ingroup Eet_Node_Group
3784 */
3785EAPI Eet_Node *
3786eet_node_string_new(const char *name,
3787 const char *str);
3788
3789/**
3790 * TODO FIX ME
3791 * @ingroup Eet_Node_Group
3792 */
3793EAPI Eet_Node *
3794eet_node_inlined_string_new(const char *name,
3795 const char *str);
3796
3797/**
3798 * TODO FIX ME
3799 * @ingroup Eet_Node_Group
3800 */
3801EAPI Eet_Node *
3802eet_node_null_new(const char *name);
3803
3804/**
3805 * TODO FIX ME
3806 * @ingroup Eet_Node_Group
3807 */
3808EAPI Eet_Node *
3809eet_node_list_new(const char *name,
3810 Eina_List *nodes);
3811
3812/**
3813 * TODO FIX ME
3814 * @ingroup Eet_Node_Group
3815 */
3816EAPI Eet_Node *
3817eet_node_array_new(const char *name,
3818 int count,
3819 Eina_List *nodes);
3820
3821/**
3822 * TODO FIX ME
3823 * @ingroup Eet_Node_Group
3824 */
3825EAPI Eet_Node *
3826eet_node_var_array_new(const char *name,
3827 Eina_List *nodes);
3828
3829/**
3830 * TODO FIX ME
3831 * @ingroup Eet_Node_Group
3832 */
3833EAPI Eet_Node *
3834eet_node_hash_new(const char *name,
3835 const char *key,
3836 Eet_Node *node);
3837
3838/**
3839 * TODO FIX ME
3840 * @ingroup Eet_Node_Group
3841 */
3842EAPI Eet_Node *
3843eet_node_struct_new(const char *name,
3844 Eina_List *nodes);
3845
3846/**
3847 * TODO FIX ME
3848 * @ingroup Eet_Node_Group
3849 */
3850EAPI Eet_Node *
3851eet_node_struct_child_new(const char *parent,
3852 Eet_Node *child);
3853
3854/**
3855 * @brief Get a node's child nodes
3856 * @param node The node
3857 * @return The first child node which contains a pointer to the
3858 * next child node and the parent.
3859 * @since 1.5
3860 */
3861EAPI Eet_Node *
3862eet_node_children_get(Eet_Node *node);
3863
3864/**
3865 * @brief Get the next node in a list of nodes
3866 * @param node The node
3867 * @return A node which contains a pointer to the
3868 * next child node and the parent.
3869 * @since 1.5
3870 */
3871EAPI Eet_Node *
3872eet_node_next_get(Eet_Node *node);
3873
3874/**
3875 * @brief Get the parent node of a node
3876 * @param node The node
3877 * @return The parent node of @p node
3878 * @since 1.5
3879 */
3880EAPI Eet_Node *
3881eet_node_parent_get(Eet_Node *node);
3882
3883/**
3884 * TODO FIX ME
3885 * @ingroup Eet_Node_Group
3886 */
3887EAPI void
3888eet_node_list_append(Eet_Node *parent,
3889 const char *name,
3890 Eet_Node *child);
3891
3892/**
3893 * TODO FIX ME
3894 * @ingroup Eet_Node_Group
3895 */
3896EAPI void
3897eet_node_struct_append(Eet_Node *parent,
3898 const char *name,
3899 Eet_Node *child);
3900
3901/**
3902 * TODO FIX ME
3903 * @ingroup Eet_Node_Group
3904 */
3905EAPI void
3906eet_node_hash_add(Eet_Node *parent,
3907 const char *name,
3908 const char *key,
3909 Eet_Node *child);
3910
3911/**
3912 * TODO FIX ME
3913 * @ingroup Eet_Node_Group
3914 */
3915EAPI void
3916eet_node_dump(Eet_Node *n,
3917 int dumplevel,
3918 Eet_Dump_Callback dumpfunc,
3919 void *dumpdata);
3920
3921/**
3922 * @brief Return the type of a node
3923 * @param node The node
3924 * @return The node's type (EET_T_$TYPE)
3925 * @since 1.5
3926 */
3927EAPI int
3928eet_node_type_get(Eet_Node *node);
3929
3930/**
3931 * @brief Return the node's data
3932 * @param node The node
3933 * @return The data contained in the node
3934 * @since 1.5
3935 */
3936EAPI Eet_Node_Data *
3937eet_node_value_get(Eet_Node *node);
3938
3939/**
3940 * TODO FIX ME
3941 * @ingroup Eet_Node_Group
3942 */
3943EAPI void
3944eet_node_del(Eet_Node *n);
3945
3946/**
3947 * TODO FIX ME
3948 * @ingroup Eet_Node_Group
3949 */
3950EAPI void *
3951eet_data_node_encode_cipher(Eet_Node *node,
3952 const char *cipher_key,
3953 int *size_ret);
3954
3955/**
3956 * TODO FIX ME
3957 * @ingroup Eet_Node_Group
3958 */
3959EAPI Eet_Node *
3960eet_data_node_decode_cipher(const void *data_in,
3961 const char *cipher_key,
3962 int size_in);
3963
3964/**
3965 * TODO FIX ME
3966 * @ingroup Eet_Node_Group
3967 */
3968EAPI Eet_Node *
3969eet_data_node_read_cipher(Eet_File *ef,
3970 const char *name,
3971 const char *cipher_key);
3972
3973/**
3974 * TODO FIX ME
3975 * @ingroup Eet_Node_Group
3976 */
3977EAPI int
3978eet_data_node_write_cipher(Eet_File *ef,
3979 const char *name,
3980 const char *cipher_key,
3981 Eet_Node *node,
3982 int compress);
3983
3984/* EXPERIMENTAL: THIS API MAY CHANGE IN THE FUTURE, USE IT ONLY IF YOU KNOW WHAT YOU ARE DOING. */
3985
3986/**
3987 * @typedef Eet_Node_Walk
3988 * Describes how to walk trees of #Eet_Node.
3989 */
3990typedef struct _Eet_Node_Walk Eet_Node_Walk;
3991
3992typedef void * (*Eet_Node_Walk_Struct_Alloc_Callback)(const char *type, void *user_data);
3993typedef void (*Eet_Node_Walk_Struct_Add_Callback)(void *parent, const char *name, void *child, void *user_data);
3994typedef void * (*Eet_Node_Walk_Array_Callback)(Eina_Bool variable, const char *name, int count, void *user_data);
3995typedef void (*Eet_Node_Walk_Insert_Callback)(void *array, int index, void *child, void *user_data);
3996typedef void * (*Eet_Node_Walk_List_Callback)(const char *name, void *user_data);
3997typedef void (*Eet_Node_Walk_Append_Callback)(void *list, void *child, void *user_data);
3998typedef void * (*Eet_Node_Walk_Hash_Callback)(void *parent, const char *name, const char *key, void *value, void *user_data);
3999typedef void * (*Eet_Node_Walk_Simple_Callback)(int type, Eet_Node_Data *data, void *user_data);
4000
4001/**
4002 * @struct _Eet_Node_Walk
4003 * Describes how to walk trees of #Eet_Node.
4004 */
4005struct _Eet_Node_Walk
4006{
4007 Eet_Node_Walk_Struct_Alloc_Callback struct_alloc;
4008 Eet_Node_Walk_Struct_Add_Callback struct_add;
4009 Eet_Node_Walk_Array_Callback array;
4010 Eet_Node_Walk_Insert_Callback insert;
4011 Eet_Node_Walk_List_Callback list;
4012 Eet_Node_Walk_Append_Callback append;
4013 Eet_Node_Walk_Hash_Callback hash;
4014 Eet_Node_Walk_Simple_Callback simple;
4015};
4016
4017EAPI void *
4018eet_node_walk(void *parent,
4019 const char *name,
4020 Eet_Node *root,
4021 Eet_Node_Walk *cb,
4022 void *user_data);
4023
4024/*******/
4025
4026/**
4027 * @defgroup Eet_Connection_Group Helper function to use eet over a network link
4028 *
4029 * Function that reconstruct and prepare packet of @ref Eet_Data_Group to be send.
4030 *
4031 */
4032
4033/**
4034 * @typedef Eet_Connection
4035 * Opaque handle to track paquet for a specific connection.
4036 *
4037 * @ingroup Eet_Connection_Group
4038 */
4039typedef struct _Eet_Connection Eet_Connection;
4040
4041/**
4042 * @typedef Eet_Read_Cb
4043 * Called back when an @ref Eet_Data_Group has been received completly and could be used.
4044 *
4045 * @ingroup Eet_Connection_Group
4046 */
4047typedef Eina_Bool Eet_Read_Cb (const void *eet_data, size_t size, void *user_data);
4048
4049/**
4050 * @typedef Eet_Write_Cb
4051 * Called back when a packet containing @ref Eet_Data_Group data is ready to be send.
4052 *
4053 * @ingroup Eet_Connection_Group
4054 */
4055typedef Eina_Bool Eet_Write_Cb (const void *data, size_t size, void *user_data);
4056
4057/**
4058 * Instanciate a new connection to track.
4059 * @param eet_read_cb Function to call when one Eet_Data packet has been fully assemble.
4060 * @param eet_write_cb Function to call when one Eet_Data packet is ready to be send over the wire.
4061 * @param user_data Pointer provided to both functions to be used as a context handler.
4062 * @return NULL on failure, or a valid Eet_Connection handler.
4063 *
4064 * For every connection to track you will need a separate Eet_Connection provider.
4065 *
4066 * @since 1.2.4
4067 * @ingroup Eet_Connection_Group
4068 */
4069EAPI Eet_Connection *
4070eet_connection_new(Eet_Read_Cb *eet_read_cb,
4071 Eet_Write_Cb *eet_write_cb,
4072 const void *user_data);
4073
4074/**
4075 * Process a raw packet received over the link
4076 * @param conn Connection handler to track.
4077 * @param data Raw data packet.
4078 * @param size The size of that packet.
4079 * @return 0 on complete success, any other value indicate where in the stream it got wrong (It could be before that packet).
4080 *
4081 * Every time you receive a packet related to your connection, you should pass
4082 * it to that function so that it could process and assemble packet has you
4083 * receive it. It will automatically call Eet_Read_Cb when one is fully received.
4084 *
4085 * @since 1.2.4
4086 * @ingroup Eet_Connection_Group
4087 */
4088EAPI int
4089eet_connection_received(Eet_Connection *conn,
4090 const void *data,
4091 size_t size);
4092
4093/**
4094 * Convert a complex structure and prepare it to be send.
4095 * @param conn Connection handler to track.
4096 * @param edd The data descriptor to use when encoding.
4097 * @param data_in The pointer to the struct to encode into data.
4098 * @param cipher_key The key to use as cipher.
4099 * @return EINA_TRUE if the data where correctly send, EINA_FALSE if they don't.
4100 *
4101 * This function serialize data_in with edd, assemble the packet and call
4102 * Eet_Write_Cb when ready. The data passed Eet_Write_Cb are temporary allocated
4103 * and will vanish just after the return of the callback.
4104 *
4105 * @see eet_data_descriptor_encode_cipher
4106 *
4107 * @since 1.2.4
4108 * @ingroup Eet_Connection_Group
4109 */
4110EAPI Eina_Bool
4111eet_connection_send(Eet_Connection *conn,
4112 Eet_Data_Descriptor *edd,
4113 const void *data_in,
4114 const char *cipher_key);
4115
4116/**
4117 * Convert a Eet_Node tree and prepare it to be send.
4118 * @param conn Connection handler to track.
4119 * @param node The data tree to use when encoding.
4120 * @param cipher_key The key to use as cipher.
4121 * @return EINA_TRUE if the data where correctly send, EINA_FALSE if they don't.
4122 *
4123 * This function serialize node, assemble the packet and call
4124 * Eet_Write_Cb when ready. The data passed Eet_Write_Cb are temporary allocated
4125 * and will vanish just after the return of the callback.
4126 *
4127 * @see eet_data_node_encode_cipher
4128 *
4129 * @since 1.2.4
4130 * @ingroup Eet_Connection_Group
4131 */
4132EAPI Eina_Bool
4133eet_connection_node_send(Eet_Connection *conn,
4134 Eet_Node *node,
4135 const char *cipher_key);
4136
4137/**
4138 * Close a connection and lost its track.
4139 * @param conn Connection handler to close.
4140 * @param on_going Signal if a partial packet wasn't completed.
4141 * @return the user_data passed to both callback.
4142 *
4143 * @since 1.2.4
4144 * @ingroup Eet_Connection_Group
4145 */
4146EAPI void *
4147eet_connection_close(Eet_Connection *conn,
4148 Eina_Bool *on_going);
4149
4150/***************************************************************************/
4151
4152#ifdef __cplusplus
4153}
4154#endif /* ifdef __cplusplus */
4155
4156#endif /* ifndef _EET_H */
diff --git a/libraries/eet/src/lib/Eet_private.h b/libraries/eet/src/lib/Eet_private.h
new file mode 100644
index 0000000..83f4c18
--- /dev/null
+++ b/libraries/eet/src/lib/Eet_private.h
@@ -0,0 +1,191 @@
1#ifndef _EET_PRIVATE_H
2#define _EET_PRIVATE_H
3
4#include <Eina.h>
5
6typedef enum _Eet_Convert_Type Eet_Convert_Type;
7
8enum _Eet_Convert_Type
9{
10 EET_D_NOTHING = 0,
11 EET_D_FLOAT = 1 << 1,
12 EET_D_DOUBLE = 1 << 2,
13 EET_D_FIXED_POINT = 1 << 4
14};
15
16typedef struct _Eet_String Eet_String;
17typedef struct _Eet_Convert Eet_Convert;
18
19struct _Eet_Convert
20{
21 float f;
22 double d;
23 Eina_F32p32 fp;
24
25 Eet_Convert_Type type;
26};
27
28struct _Eet_String
29{
30 const char *str;
31
32 int len;
33
34 int next;
35 int prev;
36
37 unsigned char hash;
38 unsigned char allocated : 1;
39};
40struct _Eet_Dictionary
41{
42 Eet_String *all;
43 Eina_Hash *converts;
44
45 int size;
46 int offset;
47
48 int hash[256];
49
50 int count;
51 int total;
52
53 const char *start;
54 const char *end;
55};
56
57struct _Eet_Node
58{
59 int type;
60 int count;
61 const char *name;
62 const char *key;
63 Eet_Node *values;
64 Eet_Node *next;
65 Eet_Node *parent;
66 Eet_Node_Data data;
67};
68
69/*
70 * variable and macros used for the eina_log module
71 */
72extern int _eet_log_dom_global;
73
74/*
75 * Macros that are used everywhere
76 *
77 * the first four macros are the general macros for the lib
78 */
79#ifdef EET_DEFAULT_LOG_COLOR
80# undef EET_DEFAULT_LOG_COLOR
81#endif /* ifdef EET_DEFAULT_LOG_COLOR */
82#define EET_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
83#ifdef ERR
84# undef ERR
85#endif /* ifdef ERR */
86#define ERR(...) EINA_LOG_DOM_ERR(_eet_log_dom_global, __VA_ARGS__)
87#ifdef DBG
88# undef DBG
89#endif /* ifdef DBG */
90#define DBG(...) EINA_LOG_DOM_DBG(_eet_log_dom_global, __VA_ARGS__)
91#ifdef INF
92# undef INF
93#endif /* ifdef INF */
94#define INF(...) EINA_LOG_DOM_INFO(_eet_log_dom_global, __VA_ARGS__)
95#ifdef WRN
96# undef WRN
97#endif /* ifdef WRN */
98#define WRN(...) EINA_LOG_DOM_WARN(_eet_log_dom_global, __VA_ARGS__)
99#ifdef CRIT
100# undef CRIT
101#endif /* ifdef CRIT */
102#define CRIT(...) EINA_LOG_DOM_CRIT(_eet_log_dom_global, __VA_ARGS__)
103
104Eet_Dictionary *
105 eet_dictionary_add(void);
106void
107 eet_dictionary_free(Eet_Dictionary *ed);
108int
109 eet_dictionary_string_add(Eet_Dictionary *ed,
110 const char *string);
111int
112eet_dictionary_string_get_size(const Eet_Dictionary *ed,
113 int index);
114const char *
115eet_dictionary_string_get_char(const Eet_Dictionary *ed,
116 int index);
117Eina_Bool
118eet_dictionary_string_get_float(const Eet_Dictionary *ed,
119 int index,
120 float *result);
121Eina_Bool
122eet_dictionary_string_get_double(const Eet_Dictionary *ed,
123 int index,
124 double *result);
125Eina_Bool
126eet_dictionary_string_get_fp(const Eet_Dictionary *ed,
127 int index,
128 Eina_F32p32 *result);
129int
130eet_dictionary_string_get_hash(const Eet_Dictionary *ed,
131 int index);
132
133int _eet_hash_gen(const char *key,
134 int hash_size);
135
136const void *
137eet_identity_check(const void *data_base,
138 unsigned int data_length,
139 void **sha1,
140 int *sha1_length,
141 const void *signature_base,
142 unsigned int signature_length,
143 const void **raw_signature_base,
144 unsigned int *raw_signature_length,
145 int *x509_length);
146void *
147eet_identity_compute_sha1(const void *data_base,
148 unsigned int data_length,
149 int *sha1_length);
150Eet_Error
151eet_cipher(const void *data,
152 unsigned int size,
153 const char *key,
154 unsigned int length,
155 void **result,
156 unsigned int *result_length);
157Eet_Error
158eet_decipher(const void *data,
159 unsigned int size,
160 const char *key,
161 unsigned int length,
162 void **result,
163 unsigned int *result_length);
164Eet_Error
165eet_identity_sign(FILE *fp,
166 Eet_Key *key);
167void
168 eet_identity_unref(Eet_Key *key);
169void
170 eet_identity_ref(Eet_Key *key);
171
172void
173 eet_node_shutdown(void);
174int
175 eet_node_init(void);
176Eet_Node *
177 eet_node_new(void);
178void
179 eet_node_free(Eet_Node *node);
180
181#ifndef PATH_MAX
182# define PATH_MAX 4096
183#endif /* ifndef PATH_MAX */
184
185#ifdef DNDEBUG
186# define EET_ASSERT(Test, Do) if (Test == 0) {Do; }
187#else /* ifdef DNDEBUG */
188# define EET_ASSERT(Test, Do) if (Test == 0) {abort(); }
189#endif /* ifdef DNDEBUG */
190
191#endif /* ifndef _EET_PRIVATE_H */
diff --git a/libraries/eet/src/lib/Makefile.am b/libraries/eet/src/lib/Makefile.am
new file mode 100644
index 0000000..4633749
--- /dev/null
+++ b/libraries/eet/src/lib/Makefile.am
@@ -0,0 +1,162 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_builddir)/src/lib \
8-DPACKAGE_BIN_DIR=\"$(bindir)\" \
9-DPACKAGE_LIB_DIR=\"$(libdir)\" \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11@EVIL_CFLAGS@ \
12@EINA_CFLAGS@ \
13@EET_CPPFLAGS@ \
14@EFL_EET_BUILD@ \
15@EFL_COVERAGE_CFLAGS@ \
16@OPENSSL_CFLAGS@ \
17@GNUTLS_CFLAGS@
18
19includes_HEADERS = Eet.h
20includesdir = $(includedir)/eet-@VMAJ@
21
22lib_LTLIBRARIES = libeet.la
23
24base_sources = \
25eet_lib.c \
26eet_data.c \
27eet_image.c \
28eet_cipher.c \
29eet_dictionary.c \
30eet_node.c \
31eet_utils.c \
32eet_connection.c
33
34if EET_AMALGAMATION
35nodist_libeet_la_SOURCES = eet_amalgamation.c
36
37eet_amalgamation.c: $(base_sources) Makefile
38 -rm -f eet_amalgamation.c
39
40 @echo "#ifdef HAVE_CONFIG_H" >> eet_amalgamation.c
41 @echo "# include \"config.h\"" >> eet_amalgamation.c
42 @echo "#endif" >> eet_amalgamation.c
43
44 @echo "#ifdef HAVE_ALLOCA_H" >> eet_amalgamation.c
45 @echo "# include <alloca.h>" >> eet_amalgamation.c
46 @echo "#elif defined __GNUC__" >> eet_amalgamation.c
47 @echo "# define alloca __builtin_alloca" >> eet_amalgamation.c
48 @echo "#elif defined _AIX" >> eet_amalgamation.c
49 @echo "# define alloca __alloca" >> eet_amalgamation.c
50 @echo "#elif defined _MSC_VER" >> eet_amalgamation.c
51 @echo "# include <malloc.h>" >> eet_amalgamation.c
52 @echo "# define alloca _alloca" >> eet_amalgamation.c
53 @echo "#else" >> eet_amalgamation.c
54 @echo "# include <stddef.h>" >> eet_amalgamation.c
55 @echo "# ifdef __cplusplus" >> eet_amalgamation.c
56 @echo "#extern \"C\"" >> eet_amalgamation.c
57 @echo "# endif" >> eet_amalgamation.c
58 @echo "#void *alloca (size_t);" >> eet_amalgamation.c
59 @echo "#endif" >> eet_amalgamation.c
60
61 @echo "#include <stdio.h>" >> eet_amalgamation.c
62 @echo "#include <string.h>" >> eet_amalgamation.c
63 @echo "#include <math.h>" >> eet_amalgamation.c
64 @echo "#include <ctype.h>" >> eet_amalgamation.c
65 @echo "#include <limits.h>" >> eet_amalgamation.c
66 @echo "#include <sys/types.h>" >> eet_amalgamation.c
67 @echo "#include <sys/stat.h>" >> eet_amalgamation.c
68 @echo "#ifdef HAVE_SIGNATURE" >> eet_amalgamation.c
69 @echo "# include <sys/mman.h>" >> eet_amalgamation.c
70 @echo "#endif" >> eet_amalgamation.c
71 @echo "#include <setjmp.h>" >> eet_amalgamation.c
72 @echo "#include <errno.h>" >> eet_amalgamation.c
73 @echo "#include <time.h>" >> eet_amalgamation.c
74 @echo "#include <fnmatch.h>" >> eet_amalgamation.c
75 @echo "#include <fcntl.h>" >> eet_amalgamation.c
76
77 @echo "#ifdef _WIN32" >> eet_amalgamation.c
78 @echo "# include <winsock2.h>" >> eet_amalgamation.c
79 @echo "#endif" >> eet_amalgamation.c
80
81 @echo "#ifndef _MSC_VER" >> eet_amalgamation.c
82 @echo "# include <unistd.h>" >> eet_amalgamation.c
83 @echo "#endif" >> eet_amalgamation.c
84
85 @echo "#ifdef HAVE_NETINET_IN_H" >> eet_amalgamation.c
86 @echo "# include <netinet/in.h>" >> eet_amalgamation.c
87 @echo "#endif" >> eet_amalgamation.c
88
89 @echo "#ifdef HAVE_GNUTLS" >> eet_amalgamation.c
90 @echo "# include <gnutls/gnutls.h>" >> eet_amalgamation.c
91 @echo "# include <gcrypt.h>" >> eet_amalgamation.c
92 @echo "#endif" >> eet_amalgamation.c
93
94 @echo "#ifdef HAVE_OPENSSL" >> eet_amalgamation.c
95 @echo "# include <openssl/err.h>" >> eet_amalgamation.c
96 @echo "# include <openssl/evp.h>" >> eet_amalgamation.c
97 @echo "# include <openssl/sha.h>" >> eet_amalgamation.c
98 @echo "#endif" >> eet_amalgamation.c
99
100 @echo "#ifdef HAVE_SIGNATURE" >> eet_amalgamation.c
101 @echo "# ifdef HAVE_GNUTLS" >> eet_amalgamation.c
102 @echo "# include <gnutls/gnutls.h>" >> eet_amalgamation.c
103 @echo "# include <gnutls/x509.h>" >> eet_amalgamation.c
104 @echo "# else" >> eet_amalgamation.c
105 @echo "# include <openssl/rsa.h>" >> eet_amalgamation.c
106 @echo "# include <openssl/objects.h>" >> eet_amalgamation.c
107 @echo "# include <openssl/err.h>" >> eet_amalgamation.c
108 @echo "# include <openssl/ssl.h>" >> eet_amalgamation.c
109 @echo "# include <openssl/dh.h>" >> eet_amalgamation.c
110 @echo "# include <openssl/dsa.h>" >> eet_amalgamation.c
111 @echo "# include <openssl/evp.h>" >> eet_amalgamation.c
112 @echo "# include <openssl/x509.h>" >> eet_amalgamation.c
113 @echo "# include <openssl/pem.h>" >> eet_amalgamation.c
114 @echo "# endif" >> eet_amalgamation.c
115 @echo "#endif" >> eet_amalgamation.c
116
117 @echo "#ifdef HAVE_CIPHER" >> eet_amalgamation.c
118 @echo "# ifdef HAVE_GNUTLS" >> eet_amalgamation.c
119 @echo "# include <gnutls/x509.h>" >> eet_amalgamation.c
120 @echo "# include <gcrypt.h>" >> eet_amalgamation.c
121 @echo "# else" >> eet_amalgamation.c
122 @echo "# include <openssl/evp.h>" >> eet_amalgamation.c
123 @echo "# include <openssl/hmac.h>" >> eet_amalgamation.c
124 @echo "# include <openssl/rand.h>" >> eet_amalgamation.c
125 @echo "# endif" >> eet_amalgamation.c
126 @echo "#endif" >> eet_amalgamation.c
127
128 @echo "#include <zlib.h>" >> eet_amalgamation.c
129 @echo "#include <jpeglib.h>" >> eet_amalgamation.c
130
131 @echo "#ifdef HAVE_EVIL" >> eet_amalgamation.c
132 @echo "# include <Evil.h>" >> eet_amalgamation.c
133 @echo "#endif" >> eet_amalgamation.c
134
135 @echo "#include <Eet.h>" >> eet_amalgamation.c
136
137 @echo "#include \"Eet_private.h\"" >> eet_amalgamation.c
138 @echo "#include \"Eet.h\"" >> eet_amalgamation.c
139
140 @for f in $(base_sources); do \
141 if [ `echo $$f | sed -e 's/^...\(.\).*/\1/'` != '/' ]; then \
142 file="$(srcdir)/$$f" ; \
143 else \
144 file="$$f" ; \
145 fi ; \
146 echo "/* file: $$file */" >> eet_amalgamation.c; \
147 grep -v -e '^# *include \+.\(config\|\|Evil\|Eina\|stdio\|string\|math\|ctype\|limits\|sys/types\|sys/stat\|sys/mman\|setjmp\|errno\|time\|fnmatch\|fcntl\|winsock2\|unistd\|netinet/in\|gnutls/gnutls\|gcrypt\|gnutls/x509\|openssl/rsa\|openssl/objects\|openssl/err\|openssl/ssl\|openssl/dh\|openssl/dsa\|openssl/evp\|openssl/pem\|openssl/sha\|openssl/hmac\|openssl/x509\|openssl/rand\|zlib\|jpeglib\|Eet_private\|Eet\)[.]h.*' $$file >> eet_amalgamation.c; \
148 done
149 @echo "eet_amalgamation.c generated"
150
151else
152libeet_la_SOURCES = $(base_sources)
153endif
154
155libeet_la_CFLAGS = @EET_CFLAGS@ @DEBUG_CFLAGS@
156libeet_la_LIBADD = @GNUTLS_LIBS@ @OPENSSL_LIBS@ @EFL_COVERAGE_LIBS@ @EET_LIBS@ @EINA_LIBS@ @EVIL_LIBS@ -lz -ljpeg -lm
157libeet_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
158
159EXTRA_DIST = Eet_private.h
160
161clean-local:
162 @rm -rf *.gcno eet_amalgamation.c
diff --git a/libraries/eet/src/lib/Makefile.in b/libraries/eet/src/lib/Makefile.in
new file mode 100644
index 0000000..f80bcd8
--- /dev/null
+++ b/libraries/eet/src/lib/Makefile.in
@@ -0,0 +1,846 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
23pkglibexecdir = $(libexecdir)/@PACKAGE@
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = @build@
37host_triplet = @host@
38subdir = src/lib
39DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \
40 $(srcdir)/Makefile.in
41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
43 $(top_srcdir)/m4/ac_path_generic.m4 \
44 $(top_srcdir)/m4/efl_binary.m4 \
45 $(top_srcdir)/m4/efl_compiler_flag.m4 \
46 $(top_srcdir)/m4/efl_coverage.m4 \
47 $(top_srcdir)/m4/efl_doxygen.m4 \
48 $(top_srcdir)/m4/efl_fnmatch.m4 \
49 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
50 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
51 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
52 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
60am__vpath_adj = case $$p in \
61 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
62 *) f=$$p;; \
63 esac;
64am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
65am__install_max = 40
66am__nobase_strip_setup = \
67 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
68am__nobase_strip = \
69 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
70am__nobase_list = $(am__nobase_strip_setup); \
71 for p in $$list; do echo "$$p $$p"; done | \
72 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
73 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
74 if (++n[$$2] == $(am__install_max)) \
75 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
76 END { for (dir in files) print dir, files[dir] }'
77am__base_list = \
78 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
79 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
80am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
81LTLIBRARIES = $(lib_LTLIBRARIES)
82libeet_la_DEPENDENCIES =
83am__libeet_la_SOURCES_DIST = eet_lib.c eet_data.c eet_image.c \
84 eet_cipher.c eet_dictionary.c eet_node.c eet_utils.c \
85 eet_connection.c
86am__objects_1 = libeet_la-eet_lib.lo libeet_la-eet_data.lo \
87 libeet_la-eet_image.lo libeet_la-eet_cipher.lo \
88 libeet_la-eet_dictionary.lo libeet_la-eet_node.lo \
89 libeet_la-eet_utils.lo libeet_la-eet_connection.lo
90@EET_AMALGAMATION_FALSE@am_libeet_la_OBJECTS = $(am__objects_1)
91@EET_AMALGAMATION_TRUE@nodist_libeet_la_OBJECTS = \
92@EET_AMALGAMATION_TRUE@ libeet_la-eet_amalgamation.lo
93libeet_la_OBJECTS = $(am_libeet_la_OBJECTS) \
94 $(nodist_libeet_la_OBJECTS)
95AM_V_lt = $(am__v_lt_$(V))
96am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
97am__v_lt_0 = --silent
98libeet_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
99 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libeet_la_CFLAGS) \
100 $(CFLAGS) $(libeet_la_LDFLAGS) $(LDFLAGS) -o $@
101DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
102depcomp = $(SHELL) $(top_srcdir)/depcomp
103am__depfiles_maybe = depfiles
104am__mv = mv -f
105COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
106 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
107LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
108 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
109 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
110 $(AM_CFLAGS) $(CFLAGS)
111AM_V_CC = $(am__v_CC_$(V))
112am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
113am__v_CC_0 = @echo " CC " $@;
114AM_V_at = $(am__v_at_$(V))
115am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
116am__v_at_0 = @
117CCLD = $(CC)
118LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
119 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
120 $(AM_LDFLAGS) $(LDFLAGS) -o $@
121AM_V_CCLD = $(am__v_CCLD_$(V))
122am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
123am__v_CCLD_0 = @echo " CCLD " $@;
124AM_V_GEN = $(am__v_GEN_$(V))
125am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
126am__v_GEN_0 = @echo " GEN " $@;
127SOURCES = $(libeet_la_SOURCES) $(nodist_libeet_la_SOURCES)
128DIST_SOURCES = $(am__libeet_la_SOURCES_DIST)
129HEADERS = $(includes_HEADERS)
130ETAGS = etags
131CTAGS = ctags
132DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
133ACLOCAL = @ACLOCAL@
134ALLOCA = @ALLOCA@
135AMTAR = @AMTAR@
136AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
137AR = @AR@
138AS = @AS@
139AUTOCONF = @AUTOCONF@
140AUTOHEADER = @AUTOHEADER@
141AUTOMAKE = @AUTOMAKE@
142AWK = @AWK@
143CC = @CC@
144CCDEPMODE = @CCDEPMODE@
145CFLAGS = @CFLAGS@
146CHECK_CFLAGS = @CHECK_CFLAGS@
147CHECK_LIBS = @CHECK_LIBS@
148CPP = @CPP@
149CPPFLAGS = @CPPFLAGS@
150CYGPATH_W = @CYGPATH_W@
151DEBUG_CFLAGS = @DEBUG_CFLAGS@
152DEFS = @DEFS@
153DEPDIR = @DEPDIR@
154DLLTOOL = @DLLTOOL@
155DSYMUTIL = @DSYMUTIL@
156DUMPBIN = @DUMPBIN@
157ECHO_C = @ECHO_C@
158ECHO_N = @ECHO_N@
159ECHO_T = @ECHO_T@
160EET_CFLAGS = @EET_CFLAGS@
161EET_CPPFLAGS = @EET_CPPFLAGS@
162EET_LIBS = @EET_LIBS@
163EET_PRG = @EET_PRG@
164EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
165EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
166EFL_EET_BUILD = @EFL_EET_BUILD@
167EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
168EGREP = @EGREP@
169EINA_CFLAGS = @EINA_CFLAGS@
170EINA_LIBS = @EINA_LIBS@
171EVIL_CFLAGS = @EVIL_CFLAGS@
172EVIL_LIBS = @EVIL_LIBS@
173EXEEXT = @EXEEXT@
174FGREP = @FGREP@
175GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
176GNUTLS_LIBS = @GNUTLS_LIBS@
177GREP = @GREP@
178INSTALL = @INSTALL@
179INSTALL_DATA = @INSTALL_DATA@
180INSTALL_PROGRAM = @INSTALL_PROGRAM@
181INSTALL_SCRIPT = @INSTALL_SCRIPT@
182INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
183LD = @LD@
184LDFLAGS = @LDFLAGS@
185LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
186LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
187LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
188LIBOBJS = @LIBOBJS@
189LIBS = @LIBS@
190LIBTOOL = @LIBTOOL@
191LIPO = @LIPO@
192LN_S = @LN_S@
193LTLIBOBJS = @LTLIBOBJS@
194MAKEINFO = @MAKEINFO@
195MKDIR_P = @MKDIR_P@
196NM = @NM@
197NMEDIT = @NMEDIT@
198OBJDUMP = @OBJDUMP@
199OBJEXT = @OBJEXT@
200OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
201OPENSSL_LIBS = @OPENSSL_LIBS@
202OTOOL = @OTOOL@
203OTOOL64 = @OTOOL64@
204PACKAGE = @PACKAGE@
205PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
206PACKAGE_NAME = @PACKAGE_NAME@
207PACKAGE_STRING = @PACKAGE_STRING@
208PACKAGE_TARNAME = @PACKAGE_TARNAME@
209PACKAGE_URL = @PACKAGE_URL@
210PACKAGE_VERSION = @PACKAGE_VERSION@
211PATH_SEPARATOR = @PATH_SEPARATOR@
212PKG_CONFIG = @PKG_CONFIG@
213PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
214PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
215RANLIB = @RANLIB@
216SED = @SED@
217SET_MAKE = @SET_MAKE@
218SHELL = @SHELL@
219STRIP = @STRIP@
220VERSION = @VERSION@
221VMAJ = @VMAJ@
222abs_builddir = @abs_builddir@
223abs_srcdir = @abs_srcdir@
224abs_top_builddir = @abs_top_builddir@
225abs_top_srcdir = @abs_top_srcdir@
226ac_ct_CC = @ac_ct_CC@
227ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
228am__include = @am__include@
229am__leading_dot = @am__leading_dot@
230am__quote = @am__quote@
231am__tar = @am__tar@
232am__untar = @am__untar@
233bindir = @bindir@
234build = @build@
235build_alias = @build_alias@
236build_cpu = @build_cpu@
237build_os = @build_os@
238build_vendor = @build_vendor@
239builddir = @builddir@
240datadir = @datadir@
241datarootdir = @datarootdir@
242docdir = @docdir@
243dvidir = @dvidir@
244efl_doxygen = @efl_doxygen@
245efl_have_doxygen = @efl_have_doxygen@
246exec_prefix = @exec_prefix@
247have_lcov = @have_lcov@
248host = @host@
249host_alias = @host_alias@
250host_cpu = @host_cpu@
251host_os = @host_os@
252host_vendor = @host_vendor@
253htmldir = @htmldir@
254includedir = @includedir@
255infodir = @infodir@
256install_sh = @install_sh@
257libdir = @libdir@
258libexecdir = @libexecdir@
259localedir = @localedir@
260localstatedir = @localstatedir@
261lt_ECHO = @lt_ECHO@
262lt_enable_auto_import = @lt_enable_auto_import@
263mandir = @mandir@
264mkdir_p = @mkdir_p@
265oldincludedir = @oldincludedir@
266pdfdir = @pdfdir@
267pkgconfig_requires_private = @pkgconfig_requires_private@
268prefix = @prefix@
269program_transform_name = @program_transform_name@
270psdir = @psdir@
271release_info = @release_info@
272requirement_eet = @requirement_eet@
273sbindir = @sbindir@
274sharedstatedir = @sharedstatedir@
275srcdir = @srcdir@
276sysconfdir = @sysconfdir@
277target_alias = @target_alias@
278top_build_prefix = @top_build_prefix@
279top_builddir = @top_builddir@
280top_srcdir = @top_srcdir@
281version_info = @version_info@
282MAINTAINERCLEANFILES = Makefile.in
283AM_CPPFLAGS = \
284-I. \
285-I$(top_srcdir)/src/lib \
286-I$(top_builddir)/src/lib \
287-DPACKAGE_BIN_DIR=\"$(bindir)\" \
288-DPACKAGE_LIB_DIR=\"$(libdir)\" \
289-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
290@EVIL_CFLAGS@ \
291@EINA_CFLAGS@ \
292@EET_CPPFLAGS@ \
293@EFL_EET_BUILD@ \
294@EFL_COVERAGE_CFLAGS@ \
295@OPENSSL_CFLAGS@ \
296@GNUTLS_CFLAGS@
297
298includes_HEADERS = Eet.h
299includesdir = $(includedir)/eet-@VMAJ@
300lib_LTLIBRARIES = libeet.la
301base_sources = \
302eet_lib.c \
303eet_data.c \
304eet_image.c \
305eet_cipher.c \
306eet_dictionary.c \
307eet_node.c \
308eet_utils.c \
309eet_connection.c
310
311@EET_AMALGAMATION_TRUE@nodist_libeet_la_SOURCES = eet_amalgamation.c
312@EET_AMALGAMATION_FALSE@libeet_la_SOURCES = $(base_sources)
313libeet_la_CFLAGS = @EET_CFLAGS@ @DEBUG_CFLAGS@
314libeet_la_LIBADD = @GNUTLS_LIBS@ @OPENSSL_LIBS@ @EFL_COVERAGE_LIBS@ @EET_LIBS@ @EINA_LIBS@ @EVIL_LIBS@ -lz -ljpeg -lm
315libeet_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
316EXTRA_DIST = Eet_private.h
317all: all-am
318
319.SUFFIXES:
320.SUFFIXES: .c .lo .o .obj
321$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
322 @for dep in $?; do \
323 case '$(am__configure_deps)' in \
324 *$$dep*) \
325 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
326 && { if test -f $@; then exit 0; else break; fi; }; \
327 exit 1;; \
328 esac; \
329 done; \
330 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \
331 $(am__cd) $(top_srcdir) && \
332 $(AUTOMAKE) --gnu src/lib/Makefile
333.PRECIOUS: Makefile
334Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
335 @case '$?' in \
336 *config.status*) \
337 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
338 *) \
339 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
340 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
341 esac;
342
343$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
344 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
345
346$(top_srcdir)/configure: $(am__configure_deps)
347 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
348$(ACLOCAL_M4): $(am__aclocal_m4_deps)
349 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
350$(am__aclocal_m4_deps):
351install-libLTLIBRARIES: $(lib_LTLIBRARIES)
352 @$(NORMAL_INSTALL)
353 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
354 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
355 list2=; for p in $$list; do \
356 if test -f $$p; then \
357 list2="$$list2 $$p"; \
358 else :; fi; \
359 done; \
360 test -z "$$list2" || { \
361 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
362 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
363 }
364
365uninstall-libLTLIBRARIES:
366 @$(NORMAL_UNINSTALL)
367 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
368 for p in $$list; do \
369 $(am__strip_dir) \
370 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
371 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
372 done
373
374clean-libLTLIBRARIES:
375 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
376 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
377 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
378 test "$$dir" != "$$p" || dir=.; \
379 echo "rm -f \"$${dir}/so_locations\""; \
380 rm -f "$${dir}/so_locations"; \
381 done
382libeet.la: $(libeet_la_OBJECTS) $(libeet_la_DEPENDENCIES)
383 $(AM_V_CCLD)$(libeet_la_LINK) -rpath $(libdir) $(libeet_la_OBJECTS) $(libeet_la_LIBADD) $(LIBS)
384
385mostlyclean-compile:
386 -rm -f *.$(OBJEXT)
387
388distclean-compile:
389 -rm -f *.tab.c
390
391@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_amalgamation.Plo@am__quote@
392@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_cipher.Plo@am__quote@
393@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_connection.Plo@am__quote@
394@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_data.Plo@am__quote@
395@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_dictionary.Plo@am__quote@
396@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_image.Plo@am__quote@
397@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_lib.Plo@am__quote@
398@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_node.Plo@am__quote@
399@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_utils.Plo@am__quote@
400
401.c.o:
402@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
403@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
404@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
405@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
406@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
407@am__fastdepCC_FALSE@ $(COMPILE) -c $<
408
409.c.obj:
410@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
411@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
412@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
413@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
414@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
415@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
416
417.c.lo:
418@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
419@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
420@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
421@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
422@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
423@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
424
425libeet_la-eet_lib.lo: eet_lib.c
426@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_lib.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_lib.Tpo -c -o libeet_la-eet_lib.lo `test -f 'eet_lib.c' || echo '$(srcdir)/'`eet_lib.c
427@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_lib.Tpo $(DEPDIR)/libeet_la-eet_lib.Plo
428@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
429@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_lib.c' object='libeet_la-eet_lib.lo' libtool=yes @AMDEPBACKSLASH@
430@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
431@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_lib.lo `test -f 'eet_lib.c' || echo '$(srcdir)/'`eet_lib.c
432
433libeet_la-eet_data.lo: eet_data.c
434@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_data.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_data.Tpo -c -o libeet_la-eet_data.lo `test -f 'eet_data.c' || echo '$(srcdir)/'`eet_data.c
435@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_data.Tpo $(DEPDIR)/libeet_la-eet_data.Plo
436@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
437@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_data.c' object='libeet_la-eet_data.lo' libtool=yes @AMDEPBACKSLASH@
438@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
439@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_data.lo `test -f 'eet_data.c' || echo '$(srcdir)/'`eet_data.c
440
441libeet_la-eet_image.lo: eet_image.c
442@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_image.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_image.Tpo -c -o libeet_la-eet_image.lo `test -f 'eet_image.c' || echo '$(srcdir)/'`eet_image.c
443@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_image.Tpo $(DEPDIR)/libeet_la-eet_image.Plo
444@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
445@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_image.c' object='libeet_la-eet_image.lo' libtool=yes @AMDEPBACKSLASH@
446@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
447@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_image.lo `test -f 'eet_image.c' || echo '$(srcdir)/'`eet_image.c
448
449libeet_la-eet_cipher.lo: eet_cipher.c
450@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_cipher.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_cipher.Tpo -c -o libeet_la-eet_cipher.lo `test -f 'eet_cipher.c' || echo '$(srcdir)/'`eet_cipher.c
451@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_cipher.Tpo $(DEPDIR)/libeet_la-eet_cipher.Plo
452@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
453@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_cipher.c' object='libeet_la-eet_cipher.lo' libtool=yes @AMDEPBACKSLASH@
454@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
455@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_cipher.lo `test -f 'eet_cipher.c' || echo '$(srcdir)/'`eet_cipher.c
456
457libeet_la-eet_dictionary.lo: eet_dictionary.c
458@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_dictionary.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_dictionary.Tpo -c -o libeet_la-eet_dictionary.lo `test -f 'eet_dictionary.c' || echo '$(srcdir)/'`eet_dictionary.c
459@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_dictionary.Tpo $(DEPDIR)/libeet_la-eet_dictionary.Plo
460@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
461@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_dictionary.c' object='libeet_la-eet_dictionary.lo' libtool=yes @AMDEPBACKSLASH@
462@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
463@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_dictionary.lo `test -f 'eet_dictionary.c' || echo '$(srcdir)/'`eet_dictionary.c
464
465libeet_la-eet_node.lo: eet_node.c
466@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_node.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_node.Tpo -c -o libeet_la-eet_node.lo `test -f 'eet_node.c' || echo '$(srcdir)/'`eet_node.c
467@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_node.Tpo $(DEPDIR)/libeet_la-eet_node.Plo
468@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
469@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_node.c' object='libeet_la-eet_node.lo' libtool=yes @AMDEPBACKSLASH@
470@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
471@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_node.lo `test -f 'eet_node.c' || echo '$(srcdir)/'`eet_node.c
472
473libeet_la-eet_utils.lo: eet_utils.c
474@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_utils.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_utils.Tpo -c -o libeet_la-eet_utils.lo `test -f 'eet_utils.c' || echo '$(srcdir)/'`eet_utils.c
475@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_utils.Tpo $(DEPDIR)/libeet_la-eet_utils.Plo
476@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
477@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_utils.c' object='libeet_la-eet_utils.lo' libtool=yes @AMDEPBACKSLASH@
478@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
479@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_utils.lo `test -f 'eet_utils.c' || echo '$(srcdir)/'`eet_utils.c
480
481libeet_la-eet_connection.lo: eet_connection.c
482@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_connection.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_connection.Tpo -c -o libeet_la-eet_connection.lo `test -f 'eet_connection.c' || echo '$(srcdir)/'`eet_connection.c
483@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_connection.Tpo $(DEPDIR)/libeet_la-eet_connection.Plo
484@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
485@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_connection.c' object='libeet_la-eet_connection.lo' libtool=yes @AMDEPBACKSLASH@
486@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
487@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_connection.lo `test -f 'eet_connection.c' || echo '$(srcdir)/'`eet_connection.c
488
489libeet_la-eet_amalgamation.lo: eet_amalgamation.c
490@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_amalgamation.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_amalgamation.Tpo -c -o libeet_la-eet_amalgamation.lo `test -f 'eet_amalgamation.c' || echo '$(srcdir)/'`eet_amalgamation.c
491@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_amalgamation.Tpo $(DEPDIR)/libeet_la-eet_amalgamation.Plo
492@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
493@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_amalgamation.c' object='libeet_la-eet_amalgamation.lo' libtool=yes @AMDEPBACKSLASH@
494@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
495@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_amalgamation.lo `test -f 'eet_amalgamation.c' || echo '$(srcdir)/'`eet_amalgamation.c
496
497mostlyclean-libtool:
498 -rm -f *.lo
499
500clean-libtool:
501 -rm -rf .libs _libs
502install-includesHEADERS: $(includes_HEADERS)
503 @$(NORMAL_INSTALL)
504 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
505 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
506 for p in $$list; do \
507 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
508 echo "$$d$$p"; \
509 done | $(am__base_list) | \
510 while read files; do \
511 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
512 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
513 done
514
515uninstall-includesHEADERS:
516 @$(NORMAL_UNINSTALL)
517 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
518 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
519 test -n "$$files" || exit 0; \
520 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
521 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
522
523ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
524 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
525 unique=`for i in $$list; do \
526 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
527 done | \
528 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
529 END { if (nonempty) { for (i in files) print i; }; }'`; \
530 mkid -fID $$unique
531tags: TAGS
532
533TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
534 $(TAGS_FILES) $(LISP)
535 set x; \
536 here=`pwd`; \
537 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
538 unique=`for i in $$list; do \
539 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
540 done | \
541 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
542 END { if (nonempty) { for (i in files) print i; }; }'`; \
543 shift; \
544 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
545 test -n "$$unique" || unique=$$empty_fix; \
546 if test $$# -gt 0; then \
547 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
548 "$$@" $$unique; \
549 else \
550 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
551 $$unique; \
552 fi; \
553 fi
554ctags: CTAGS
555CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
556 $(TAGS_FILES) $(LISP)
557 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
558 unique=`for i in $$list; do \
559 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
560 done | \
561 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
562 END { if (nonempty) { for (i in files) print i; }; }'`; \
563 test -z "$(CTAGS_ARGS)$$unique" \
564 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
565 $$unique
566
567GTAGS:
568 here=`$(am__cd) $(top_builddir) && pwd` \
569 && $(am__cd) $(top_srcdir) \
570 && gtags -i $(GTAGS_ARGS) "$$here"
571
572distclean-tags:
573 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
574
575distdir: $(DISTFILES)
576 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
577 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
578 list='$(DISTFILES)'; \
579 dist_files=`for file in $$list; do echo $$file; done | \
580 sed -e "s|^$$srcdirstrip/||;t" \
581 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
582 case $$dist_files in \
583 */*) $(MKDIR_P) `echo "$$dist_files" | \
584 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
585 sort -u` ;; \
586 esac; \
587 for file in $$dist_files; do \
588 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
589 if test -d $$d/$$file; then \
590 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
591 if test -d "$(distdir)/$$file"; then \
592 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
593 fi; \
594 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
595 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
596 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
597 fi; \
598 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
599 else \
600 test -f "$(distdir)/$$file" \
601 || cp -p $$d/$$file "$(distdir)/$$file" \
602 || exit 1; \
603 fi; \
604 done
605check-am: all-am
606check: check-am
607all-am: Makefile $(LTLIBRARIES) $(HEADERS)
608installdirs:
609 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
610 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
611 done
612install: install-am
613install-exec: install-exec-am
614install-data: install-data-am
615uninstall: uninstall-am
616
617install-am: all-am
618 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
619
620installcheck: installcheck-am
621install-strip:
622 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
623 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
624 `test -z '$(STRIP)' || \
625 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
626mostlyclean-generic:
627
628clean-generic:
629
630distclean-generic:
631 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
632 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
633
634maintainer-clean-generic:
635 @echo "This command is intended for maintainers to use"
636 @echo "it deletes files that may require special tools to rebuild."
637 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
638clean: clean-am
639
640clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
641 mostlyclean-am
642
643distclean: distclean-am
644 -rm -rf ./$(DEPDIR)
645 -rm -f Makefile
646distclean-am: clean-am distclean-compile distclean-generic \
647 distclean-tags
648
649dvi: dvi-am
650
651dvi-am:
652
653html: html-am
654
655html-am:
656
657info: info-am
658
659info-am:
660
661install-data-am: install-includesHEADERS
662
663install-dvi: install-dvi-am
664
665install-dvi-am:
666
667install-exec-am: install-libLTLIBRARIES
668
669install-html: install-html-am
670
671install-html-am:
672
673install-info: install-info-am
674
675install-info-am:
676
677install-man:
678
679install-pdf: install-pdf-am
680
681install-pdf-am:
682
683install-ps: install-ps-am
684
685install-ps-am:
686
687installcheck-am:
688
689maintainer-clean: maintainer-clean-am
690 -rm -rf ./$(DEPDIR)
691 -rm -f Makefile
692maintainer-clean-am: distclean-am maintainer-clean-generic
693
694mostlyclean: mostlyclean-am
695
696mostlyclean-am: mostlyclean-compile mostlyclean-generic \
697 mostlyclean-libtool
698
699pdf: pdf-am
700
701pdf-am:
702
703ps: ps-am
704
705ps-am:
706
707uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
708
709.MAKE: install-am install-strip
710
711.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
712 clean-libLTLIBRARIES clean-libtool clean-local ctags distclean \
713 distclean-compile distclean-generic distclean-libtool \
714 distclean-tags distdir dvi dvi-am html html-am info info-am \
715 install install-am install-data install-data-am install-dvi \
716 install-dvi-am install-exec install-exec-am install-html \
717 install-html-am install-includesHEADERS install-info \
718 install-info-am install-libLTLIBRARIES install-man install-pdf \
719 install-pdf-am install-ps install-ps-am install-strip \
720 installcheck installcheck-am installdirs maintainer-clean \
721 maintainer-clean-generic mostlyclean mostlyclean-compile \
722 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
723 tags uninstall uninstall-am uninstall-includesHEADERS \
724 uninstall-libLTLIBRARIES
725
726
727@EET_AMALGAMATION_TRUE@eet_amalgamation.c: $(base_sources) Makefile
728@EET_AMALGAMATION_TRUE@ -rm -f eet_amalgamation.c
729
730@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_CONFIG_H" >> eet_amalgamation.c
731@EET_AMALGAMATION_TRUE@ @echo "# include \"config.h\"" >> eet_amalgamation.c
732@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
733
734@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_ALLOCA_H" >> eet_amalgamation.c
735@EET_AMALGAMATION_TRUE@ @echo "# include <alloca.h>" >> eet_amalgamation.c
736@EET_AMALGAMATION_TRUE@ @echo "#elif defined __GNUC__" >> eet_amalgamation.c
737@EET_AMALGAMATION_TRUE@ @echo "# define alloca __builtin_alloca" >> eet_amalgamation.c
738@EET_AMALGAMATION_TRUE@ @echo "#elif defined _AIX" >> eet_amalgamation.c
739@EET_AMALGAMATION_TRUE@ @echo "# define alloca __alloca" >> eet_amalgamation.c
740@EET_AMALGAMATION_TRUE@ @echo "#elif defined _MSC_VER" >> eet_amalgamation.c
741@EET_AMALGAMATION_TRUE@ @echo "# include <malloc.h>" >> eet_amalgamation.c
742@EET_AMALGAMATION_TRUE@ @echo "# define alloca _alloca" >> eet_amalgamation.c
743@EET_AMALGAMATION_TRUE@ @echo "#else" >> eet_amalgamation.c
744@EET_AMALGAMATION_TRUE@ @echo "# include <stddef.h>" >> eet_amalgamation.c
745@EET_AMALGAMATION_TRUE@ @echo "# ifdef __cplusplus" >> eet_amalgamation.c
746@EET_AMALGAMATION_TRUE@ @echo "#extern \"C\"" >> eet_amalgamation.c
747@EET_AMALGAMATION_TRUE@ @echo "# endif" >> eet_amalgamation.c
748@EET_AMALGAMATION_TRUE@ @echo "#void *alloca (size_t);" >> eet_amalgamation.c
749@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
750
751@EET_AMALGAMATION_TRUE@ @echo "#include <stdio.h>" >> eet_amalgamation.c
752@EET_AMALGAMATION_TRUE@ @echo "#include <string.h>" >> eet_amalgamation.c
753@EET_AMALGAMATION_TRUE@ @echo "#include <math.h>" >> eet_amalgamation.c
754@EET_AMALGAMATION_TRUE@ @echo "#include <ctype.h>" >> eet_amalgamation.c
755@EET_AMALGAMATION_TRUE@ @echo "#include <limits.h>" >> eet_amalgamation.c
756@EET_AMALGAMATION_TRUE@ @echo "#include <sys/types.h>" >> eet_amalgamation.c
757@EET_AMALGAMATION_TRUE@ @echo "#include <sys/stat.h>" >> eet_amalgamation.c
758@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_SIGNATURE" >> eet_amalgamation.c
759@EET_AMALGAMATION_TRUE@ @echo "# include <sys/mman.h>" >> eet_amalgamation.c
760@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
761@EET_AMALGAMATION_TRUE@ @echo "#include <setjmp.h>" >> eet_amalgamation.c
762@EET_AMALGAMATION_TRUE@ @echo "#include <errno.h>" >> eet_amalgamation.c
763@EET_AMALGAMATION_TRUE@ @echo "#include <time.h>" >> eet_amalgamation.c
764@EET_AMALGAMATION_TRUE@ @echo "#include <fnmatch.h>" >> eet_amalgamation.c
765@EET_AMALGAMATION_TRUE@ @echo "#include <fcntl.h>" >> eet_amalgamation.c
766
767@EET_AMALGAMATION_TRUE@ @echo "#ifdef _WIN32" >> eet_amalgamation.c
768@EET_AMALGAMATION_TRUE@ @echo "# include <winsock2.h>" >> eet_amalgamation.c
769@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
770
771@EET_AMALGAMATION_TRUE@ @echo "#ifndef _MSC_VER" >> eet_amalgamation.c
772@EET_AMALGAMATION_TRUE@ @echo "# include <unistd.h>" >> eet_amalgamation.c
773@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
774
775@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_NETINET_IN_H" >> eet_amalgamation.c
776@EET_AMALGAMATION_TRUE@ @echo "# include <netinet/in.h>" >> eet_amalgamation.c
777@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
778
779@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_GNUTLS" >> eet_amalgamation.c
780@EET_AMALGAMATION_TRUE@ @echo "# include <gnutls/gnutls.h>" >> eet_amalgamation.c
781@EET_AMALGAMATION_TRUE@ @echo "# include <gcrypt.h>" >> eet_amalgamation.c
782@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
783
784@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_OPENSSL" >> eet_amalgamation.c
785@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/err.h>" >> eet_amalgamation.c
786@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/evp.h>" >> eet_amalgamation.c
787@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/sha.h>" >> eet_amalgamation.c
788@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
789
790@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_SIGNATURE" >> eet_amalgamation.c
791@EET_AMALGAMATION_TRUE@ @echo "# ifdef HAVE_GNUTLS" >> eet_amalgamation.c
792@EET_AMALGAMATION_TRUE@ @echo "# include <gnutls/gnutls.h>" >> eet_amalgamation.c
793@EET_AMALGAMATION_TRUE@ @echo "# include <gnutls/x509.h>" >> eet_amalgamation.c
794@EET_AMALGAMATION_TRUE@ @echo "# else" >> eet_amalgamation.c
795@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/rsa.h>" >> eet_amalgamation.c
796@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/objects.h>" >> eet_amalgamation.c
797@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/err.h>" >> eet_amalgamation.c
798@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/ssl.h>" >> eet_amalgamation.c
799@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/dh.h>" >> eet_amalgamation.c
800@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/dsa.h>" >> eet_amalgamation.c
801@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/evp.h>" >> eet_amalgamation.c
802@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/x509.h>" >> eet_amalgamation.c
803@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/pem.h>" >> eet_amalgamation.c
804@EET_AMALGAMATION_TRUE@ @echo "# endif" >> eet_amalgamation.c
805@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
806
807@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_CIPHER" >> eet_amalgamation.c
808@EET_AMALGAMATION_TRUE@ @echo "# ifdef HAVE_GNUTLS" >> eet_amalgamation.c
809@EET_AMALGAMATION_TRUE@ @echo "# include <gnutls/x509.h>" >> eet_amalgamation.c
810@EET_AMALGAMATION_TRUE@ @echo "# include <gcrypt.h>" >> eet_amalgamation.c
811@EET_AMALGAMATION_TRUE@ @echo "# else" >> eet_amalgamation.c
812@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/evp.h>" >> eet_amalgamation.c
813@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/hmac.h>" >> eet_amalgamation.c
814@EET_AMALGAMATION_TRUE@ @echo "# include <openssl/rand.h>" >> eet_amalgamation.c
815@EET_AMALGAMATION_TRUE@ @echo "# endif" >> eet_amalgamation.c
816@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
817
818@EET_AMALGAMATION_TRUE@ @echo "#include <zlib.h>" >> eet_amalgamation.c
819@EET_AMALGAMATION_TRUE@ @echo "#include <jpeglib.h>" >> eet_amalgamation.c
820
821@EET_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_EVIL" >> eet_amalgamation.c
822@EET_AMALGAMATION_TRUE@ @echo "# include <Evil.h>" >> eet_amalgamation.c
823@EET_AMALGAMATION_TRUE@ @echo "#endif" >> eet_amalgamation.c
824
825@EET_AMALGAMATION_TRUE@ @echo "#include <Eet.h>" >> eet_amalgamation.c
826
827@EET_AMALGAMATION_TRUE@ @echo "#include \"Eet_private.h\"" >> eet_amalgamation.c
828@EET_AMALGAMATION_TRUE@ @echo "#include \"Eet.h\"" >> eet_amalgamation.c
829
830@EET_AMALGAMATION_TRUE@ @for f in $(base_sources); do \
831@EET_AMALGAMATION_TRUE@ if [ `echo $$f | sed -e 's/^...\(.\).*/\1/'` != '/' ]; then \
832@EET_AMALGAMATION_TRUE@ file="$(srcdir)/$$f" ; \
833@EET_AMALGAMATION_TRUE@ else \
834@EET_AMALGAMATION_TRUE@ file="$$f" ; \
835@EET_AMALGAMATION_TRUE@ fi ; \
836@EET_AMALGAMATION_TRUE@ echo "/* file: $$file */" >> eet_amalgamation.c; \
837@EET_AMALGAMATION_TRUE@ grep -v -e '^# *include \+.\(config\|\|Evil\|Eina\|stdio\|string\|math\|ctype\|limits\|sys/types\|sys/stat\|sys/mman\|setjmp\|errno\|time\|fnmatch\|fcntl\|winsock2\|unistd\|netinet/in\|gnutls/gnutls\|gcrypt\|gnutls/x509\|openssl/rsa\|openssl/objects\|openssl/err\|openssl/ssl\|openssl/dh\|openssl/dsa\|openssl/evp\|openssl/pem\|openssl/sha\|openssl/hmac\|openssl/x509\|openssl/rand\|zlib\|jpeglib\|Eet_private\|Eet\)[.]h.*' $$file >> eet_amalgamation.c; \
838@EET_AMALGAMATION_TRUE@ done
839@EET_AMALGAMATION_TRUE@ @echo "eet_amalgamation.c generated"
840
841clean-local:
842 @rm -rf *.gcno eet_amalgamation.c
843
844# Tell versions [3.59,3.63) of GNU make to not export all variables.
845# Otherwise a system limit (for SysV at least) may be exceeded.
846.NOEXPORT:
diff --git a/libraries/eet/src/lib/eet_cipher.c b/libraries/eet/src/lib/eet_cipher.c
new file mode 100644
index 0000000..89ee65d
--- /dev/null
+++ b/libraries/eet/src/lib/eet_cipher.c
@@ -0,0 +1,1342 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#ifdef HAVE_ALLOCA_H
6# include <alloca.h>
7#elif defined __GNUC__
8# define alloca __builtin_alloca
9#elif defined _AIX
10# define alloca __alloca
11#elif defined _MSC_VER
12# include <malloc.h>
13# define alloca _alloca
14#else /* ifdef HAVE_ALLOCA_H */
15# include <stddef.h>
16# ifdef __cplusplus
17extern "C"
18# endif /* ifdef __cplusplus */
19void *alloca(size_t);
20#endif /* ifdef HAVE_ALLOCA_H */
21
22#include <stdio.h>
23#include <string.h>
24#include <sys/types.h>
25#include <sys/stat.h>
26
27#ifdef HAVE_UNISTD_H
28# include <unistd.h>
29#endif /* ifdef HAVE_UNISTD_H */
30
31#ifdef HAVE_NETINET_IN_H
32# include <netinet/in.h>
33#endif /* ifdef HAVE_NETINET_IN_H */
34
35#ifdef HAVE_SIGNATURE
36# include <sys/mman.h>
37# ifdef HAVE_GNUTLS
38# include <gnutls/gnutls.h>
39# include <gnutls/x509.h>
40# else /* ifdef HAVE_GNUTLS */
41# include <openssl/rsa.h>
42# include <openssl/objects.h>
43# include <openssl/err.h>
44# include <openssl/ssl.h>
45# include <openssl/dh.h>
46# include <openssl/dsa.h>
47# include <openssl/evp.h>
48# include <openssl/x509.h>
49# include <openssl/pem.h>
50# endif /* ifdef HAVE_GNUTLS */
51#endif /* ifdef HAVE_SIGNATURE */
52
53#ifdef HAVE_OPENSSL
54# include <openssl/sha.h>
55#endif /* ifdef HAVE_OPENSSL */
56
57#ifdef HAVE_CIPHER
58# ifdef HAVE_GNUTLS
59# include <gnutls/x509.h>
60# include <gcrypt.h>
61# else /* ifdef HAVE_GNUTLS */
62# include <openssl/evp.h>
63# include <openssl/hmac.h>
64# include <openssl/rand.h>
65# endif /* ifdef HAVE_GNUTLS */
66#endif /* ifdef HAVE_CIPHER */
67
68#include "Eet.h"
69#include "Eet_private.h"
70
71#define EET_MAGIC_SIGN 0x1ee74271
72
73#ifdef HAVE_GNUTLS
74# define MAX_KEY_LEN 32
75# define MAX_IV_LEN 16
76#else /* ifdef HAVE_GNUTLS */
77# define MAX_KEY_LEN EVP_MAX_KEY_LENGTH
78# define MAX_IV_LEN EVP_MAX_IV_LENGTH
79#endif /* ifdef HAVE_GNUTLS */
80
81#ifdef HAVE_CIPHER
82# ifdef HAVE_GNUTLS
83static Eet_Error
84eet_hmac_sha1(const void *key,
85 size_t key_len,
86 const void *data,
87 size_t data_len,
88 unsigned char *res);
89# endif /* ifdef HAVE_GNUTLS */
90static Eet_Error
91eet_pbkdf2_sha1(const char *key,
92 int key_len,
93 const unsigned char *salt,
94 unsigned int salt_len,
95 int iter,
96 unsigned char *res,
97 int res_len);
98#endif /* ifdef HAVE_CIPHER */
99
100struct _Eet_Key
101{
102 int references;
103#ifdef HAVE_SIGNATURE
104# ifdef HAVE_GNUTLS
105 gnutls_x509_crt_t certificate;
106 gnutls_x509_privkey_t private_key;
107# else /* ifdef HAVE_GNUTLS */
108 X509 *certificate;
109 EVP_PKEY *private_key;
110# endif /* ifdef HAVE_GNUTLS */
111#endif /* ifdef HAVE_SIGNATURE */
112};
113
114EAPI Eet_Key *
115eet_identity_open(const char *certificate_file,
116 const char *private_key_file,
117 Eet_Key_Password_Callback cb)
118{
119#ifdef HAVE_SIGNATURE
120 /* Signature declarations */
121 Eet_Key *key = NULL;
122# ifdef HAVE_GNUTLS
123 /* Gnutls private declarations */
124 Eina_File *f = NULL;
125 void *data = NULL;
126 gnutls_datum_t load_file = { NULL, 0 };
127 char pass[1024];
128
129 /* Init */
130 if (!(key = malloc(sizeof(Eet_Key))))
131 goto on_error;
132
133 key->references = 1;
134
135 if (gnutls_x509_crt_init(&(key->certificate)))
136 goto on_error;
137
138 if (gnutls_x509_privkey_init(&(key->private_key)))
139 goto on_error;
140
141 /* Mmap certificate_file */
142 f = eina_file_open(certificate_file, 0);
143 if (!f)
144 goto on_error;
145
146 /* let's make mmap safe and just get 0 pages for IO erro */
147 eina_mmap_safety_enabled_set(EINA_TRUE);
148
149 data = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
150 if (!data) goto on_error;
151
152 /* Import the certificate in Eet_Key structure */
153 load_file.data = data;
154 load_file.size = eina_file_size_get(f);
155 if (gnutls_x509_crt_import(key->certificate, &load_file,
156 GNUTLS_X509_FMT_PEM) < 0)
157 goto on_error;
158
159 eina_file_map_free(f, data);
160
161 /* Reset values */
162 eina_file_close(f);
163 f = NULL;
164 data = NULL;
165 load_file.data = NULL;
166 load_file.size = 0;
167
168 /* Mmap private_key_file */
169 f = eina_file_open(private_key_file, 0);
170 if (!f)
171 goto on_error;
172
173 /* let's make mmap safe and just get 0 pages for IO erro */
174 eina_mmap_safety_enabled_set(EINA_TRUE);
175
176 data = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
177 if (!data)
178 goto on_error;
179
180 /* Import the private key in Eet_Key structure */
181 load_file.data = data;
182 load_file.size = eina_file_size_get(f);
183 /* Try to directly import the PEM encoded private key */
184 if (gnutls_x509_privkey_import(key->private_key, &load_file,
185 GNUTLS_X509_FMT_PEM) < 0)
186 {
187 /* Else ask for the private key pass */
188 if (cb && cb(pass, 1024, 0, NULL))
189 {
190 /* If pass then try to decode the pkcs 8 private key */
191 if (gnutls_x509_privkey_import_pkcs8(key->private_key, &load_file,
192 GNUTLS_X509_FMT_PEM, pass, 0))
193 goto on_error;
194 }
195 else
196 /* Else try to import the pkcs 8 private key without pass */
197 if (gnutls_x509_privkey_import_pkcs8(key->private_key, &load_file,
198 GNUTLS_X509_FMT_PEM, NULL, 1))
199 goto on_error;
200 }
201
202 eina_file_map_free(f, data);
203 eina_file_close(f);
204
205 return key;
206
207on_error:
208 if (data) eina_file_map_free(f, data);
209 if (f) eina_file_close(f);
210
211 if (key)
212 {
213 if (key->certificate)
214 gnutls_x509_crt_deinit(key->certificate);
215
216 if (key->private_key)
217 gnutls_x509_privkey_deinit(key->private_key);
218
219 free(key);
220 }
221
222# else /* ifdef HAVE_GNUTLS */
223 /* Openssl private declarations */
224 FILE *fp;
225 EVP_PKEY *pkey = NULL;
226 X509 *cert = NULL;
227
228 /* Load the X509 certificate in memory. */
229 fp = fopen(certificate_file, "r");
230 if (!fp)
231 return NULL;
232
233 cert = PEM_read_X509(fp, NULL, NULL, NULL);
234 fclose(fp);
235 if (!cert)
236 goto on_error;
237
238 /* Check the presence of the public key. Just in case. */
239 pkey = X509_get_pubkey(cert);
240 if (!pkey)
241 goto on_error;
242
243 /* Load the private key in memory. */
244 fp = fopen(private_key_file, "r");
245 if (!fp)
246 goto on_error;
247
248 pkey = PEM_read_PrivateKey(fp, NULL, cb, NULL);
249 fclose(fp);
250 if (!pkey)
251 goto on_error;
252
253 /* Load the certificate and the private key in Eet_Key structure */
254 key = malloc(sizeof(Eet_Key));
255 if (!key)
256 goto on_error;
257
258 key->references = 1;
259 key->certificate = cert;
260 key->private_key = pkey;
261
262 return key;
263
264on_error:
265 if (cert)
266 X509_free(cert);
267
268 if (pkey)
269 EVP_PKEY_free(pkey);
270
271# endif /* ifdef HAVE_GNUTLS */
272#else
273 certificate_file = NULL;
274 private_key_file = NULL;
275 cb = NULL;
276#endif /* ifdef HAVE_SIGNATURE */
277 return NULL;
278} /* eet_identity_open */
279
280EAPI void
281eet_identity_close(Eet_Key *key)
282{
283#ifdef HAVE_SIGNATURE
284 if (!key || (key->references > 0))
285 return;
286
287# ifdef HAVE_GNUTLS
288 gnutls_x509_crt_deinit(key->certificate);
289 gnutls_x509_privkey_deinit(key->private_key);
290# else /* ifdef HAVE_GNUTLS */
291 X509_free(key->certificate);
292 EVP_PKEY_free(key->private_key);
293# endif /* ifdef HAVE_GNUTLS */
294 free(key);
295#else
296 key = NULL;
297#endif /* ifdef HAVE_SIGNATURE */
298} /* eet_identity_close */
299
300EAPI void
301eet_identity_print(Eet_Key *key,
302 FILE *out)
303{
304#ifdef HAVE_SIGNATURE
305# ifdef HAVE_GNUTLS
306 const char *names[6] = {
307 "Modulus",
308 "Public exponent",
309 "Private exponent",
310 "First prime",
311 "Second prime",
312 "Coefficient"
313 };
314 int err = 0;
315 gnutls_datum_t data = { NULL, 0 };
316 gnutls_datum_t rsa_raw[6];
317 size_t size = 128;
318 char *res = NULL;
319 char buf[33];
320 unsigned int i, j;
321
322 if (!key)
323 return;
324
325 if (key->private_key)
326 {
327 if (gnutls_x509_privkey_export_rsa_raw(key->private_key,
328 rsa_raw + 0, /* Modulus */
329 rsa_raw + 1, /* Public exponent */
330 rsa_raw + 2, /* Private exponent */
331 rsa_raw + 3, /* First prime */
332 rsa_raw + 4, /* Second prime */
333 rsa_raw + 5)) /* Coefficient */
334 goto on_error;
335
336 if (!(res = malloc(size)))
337 goto on_error;
338
339 fprintf(out, "Private Key:\n");
340 buf[32] = '\0';
341
342 for (i = 0; i < 6; i++)
343 {
344 while ((err = gnutls_hex_encode(rsa_raw + i, res, &size)) ==
345 GNUTLS_E_SHORT_MEMORY_BUFFER)
346 {
347 size += 128;
348 if (!(res = realloc(res, size)))
349 goto on_error;
350 }
351 if (err)
352 goto on_error;
353
354 fprintf(out, "\t%s:\n", names[i]);
355 for (j = 0; strlen(res) > j; j += 32)
356 {
357 snprintf(buf, 32, "%s", res + j);
358 fprintf(out, "\t\t%s\n", buf);
359 }
360 }
361 free(res);
362 res = NULL;
363 }
364
365 if (key->certificate)
366 {
367 fprintf(out, "Public certificate:\n");
368 if (gnutls_x509_crt_print(key->certificate, GNUTLS_X509_CRT_FULL,
369 &data))
370 goto on_error;
371
372 fprintf(out, "%s\n", data.data);
373 gnutls_free(data.data);
374 data.data = NULL;
375 }
376
377on_error:
378 if (res)
379 free(res);
380
381 if (data.data)
382 gnutls_free(data.data);
383
384 return;
385# else /* ifdef HAVE_GNUTLS */
386 RSA *rsa;
387 DSA *dsa;
388 DH *dh;
389
390 if (!key)
391 return;
392
393 rsa = EVP_PKEY_get1_RSA(key->private_key);
394 if (rsa)
395 {
396 fprintf(out, "Private key (RSA):\n");
397 RSA_print_fp(out, rsa, 0);
398 }
399
400 dsa = EVP_PKEY_get1_DSA(key->private_key);
401 if (dsa)
402 {
403 fprintf(out, "Private key (DSA):\n");
404 DSA_print_fp(out, dsa, 0);
405 }
406
407 dh = EVP_PKEY_get1_DH(key->private_key);
408 if (dh)
409 {
410 fprintf(out, "Private key (DH):\n");
411 DHparams_print_fp(out, dh);
412 }
413
414 fprintf(out, "Public certificate:\n");
415 X509_print_fp(out, key->certificate);
416# endif /* ifdef HAVE_GNUTLS */
417#else /* ifdef HAVE_SIGNATURE */
418 key = NULL;
419 out = NULL;
420 ERR("You need to compile signature support in EET.");
421#endif /* ifdef HAVE_SIGNATURE */
422} /* eet_identity_print */
423
424void
425eet_identity_ref(Eet_Key *key)
426{
427 if (!key)
428 return;
429
430 key->references++;
431} /* eet_identity_ref */
432
433void
434eet_identity_unref(Eet_Key *key)
435{
436 if (!key)
437 return;
438
439 key->references--;
440 eet_identity_close(key);
441} /* eet_identity_unref */
442
443void *
444eet_identity_compute_sha1(const void *data_base,
445 unsigned int data_length,
446 int *sha1_length)
447{
448 void *result;
449
450#ifdef HAVE_SIGNATURE
451# ifdef HAVE_GNUTLS
452 result = malloc(gcry_md_get_algo_dlen(GCRY_MD_SHA1));
453 if (!result)
454 return NULL;
455
456 gcry_md_hash_buffer(GCRY_MD_SHA1, result, data_base, data_length);
457 if (sha1_length)
458 *sha1_length = gcry_md_get_algo_dlen(GCRY_MD_SHA1);
459
460# else /* ifdef HAVE_GNUTLS */
461# ifdef HAVE_OPENSSL
462 result = malloc(SHA_DIGEST_LENGTH);
463 if (!result)
464 return NULL;
465
466 SHA1(data_base, data_length, result);
467 if (sha1_length)
468 *sha1_length = SHA_DIGEST_LENGTH;
469
470# else /* ifdef HAVE_OPENSSL */
471 result = NULL;
472# endif /* ifdef HAVE_OPENSSL */
473# endif /* ifdef HAVE_GNUTLS */
474#else /* ifdef HAVE_SIGNATURE */
475 data_base = NULL;
476 data_length = 0;
477 sha1_length = NULL;
478 result = NULL;
479#endif /* ifdef HAVE_SIGNATURE */
480
481 return result;
482} /* eet_identity_compute_sha1 */
483
484Eet_Error
485eet_identity_sign(FILE *fp,
486 Eet_Key *key)
487{
488#ifdef HAVE_SIGNATURE
489 Eet_Error err = EET_ERROR_NONE;
490 struct stat st_buf;
491 void *data;
492 int fd;
493 int head[3];
494 unsigned char *sign = NULL;
495 unsigned char *cert = NULL;
496# ifdef HAVE_GNUTLS
497 gnutls_datum_t datum = { NULL, 0 };
498 size_t sign_len = 0;
499 size_t cert_len = 0;
500# else /* ifdef HAVE_GNUTLS */
501 EVP_MD_CTX md_ctx;
502 unsigned int sign_len = 0;
503 int cert_len = 0;
504# endif /* ifdef HAVE_GNUTLS */
505
506 /* A few check and flush pending write. */
507 if (!fp || !key || !key->certificate || !key->private_key)
508 return EET_ERROR_BAD_OBJECT;
509
510 /* Get the file size. */
511 fd = fileno(fp);
512 if (fd < 0)
513 return EET_ERROR_BAD_OBJECT;
514
515 if (fstat(fd, &st_buf) < 0)
516 return EET_ERROR_MMAP_FAILED;
517
518 /* let's make mmap safe and just get 0 pages for IO erro */
519 eina_mmap_safety_enabled_set(EINA_TRUE);
520
521 /* Map the file in memory. */
522 data = mmap(NULL, st_buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
523 if (data == MAP_FAILED)
524 return EET_ERROR_MMAP_FAILED;
525
526# ifdef HAVE_GNUTLS
527 datum.data = data;
528 datum.size = st_buf.st_size;
529
530 /* Get the signature length */
531 if (gnutls_x509_privkey_sign_data(key->private_key, GNUTLS_DIG_SHA1, 0,
532 &datum, sign, &sign_len) &&
533 !sign_len)
534 {
535 err = EET_ERROR_SIGNATURE_FAILED;
536 goto on_error;
537 }
538
539 /* Get the signature */
540 sign = malloc(sign_len);
541 if (!sign ||
542 gnutls_x509_privkey_sign_data(key->private_key, GNUTLS_DIG_SHA1, 0,
543 &datum,
544 sign, &sign_len))
545 {
546 if (!sign)
547 err = EET_ERROR_OUT_OF_MEMORY;
548 else
549 err = EET_ERROR_SIGNATURE_FAILED;
550
551 goto on_error;
552 }
553
554 /* Get the certificate length */
555 if (gnutls_x509_crt_export(key->certificate, GNUTLS_X509_FMT_DER, cert,
556 &cert_len) &&
557 !cert_len)
558 {
559 err = EET_ERROR_SIGNATURE_FAILED;
560 goto on_error;
561 }
562
563 /* Get the certificate */
564 cert = malloc(cert_len);
565 if (!cert ||
566 gnutls_x509_crt_export(key->certificate, GNUTLS_X509_FMT_DER, cert,
567 &cert_len))
568 {
569 if (!cert)
570 err = EET_ERROR_OUT_OF_MEMORY;
571 else
572 err = EET_ERROR_SIGNATURE_FAILED;
573
574 goto on_error;
575 }
576
577# else /* ifdef HAVE_GNUTLS */
578 sign_len = EVP_PKEY_size(key->private_key);
579 sign = malloc(sign_len);
580 if (!sign)
581 {
582 err = EET_ERROR_OUT_OF_MEMORY;
583 goto on_error;
584 }
585
586 /* Do the signature. */
587 EVP_SignInit(&md_ctx, EVP_sha1());
588 EVP_SignUpdate(&md_ctx, data, st_buf.st_size);
589 err = EVP_SignFinal(&md_ctx,
590 sign,
591 (unsigned int *)&sign_len,
592 key->private_key);
593 if (err != 1)
594 {
595 ERR_print_errors_fp(stdout);
596 err = EET_ERROR_SIGNATURE_FAILED;
597 goto on_error;
598 }
599
600 /* Give me the der (binary form for X509). */
601 cert_len = i2d_X509(key->certificate, &cert);
602 if (cert_len < 0)
603 {
604 ERR_print_errors_fp(stdout);
605 err = EET_ERROR_X509_ENCODING_FAILED;
606 goto on_error;
607 }
608
609# endif /* ifdef HAVE_GNUTLS */
610 /* Append the signature at the end of the file. */
611 head[0] = (int)htonl ((unsigned int)EET_MAGIC_SIGN);
612 head[1] = (int)htonl ((unsigned int)sign_len);
613 head[2] = (int)htonl ((unsigned int)cert_len);
614
615 if (fwrite(head, sizeof(head), 1, fp) != 1)
616 {
617 err = EET_ERROR_WRITE_ERROR;
618 goto on_error;
619 }
620
621 if (fwrite(sign, sign_len, 1, fp) != 1)
622 {
623 err = EET_ERROR_WRITE_ERROR;
624 goto on_error;
625 }
626
627 if (fwrite(cert, cert_len, 1, fp) != 1)
628 {
629 err = EET_ERROR_WRITE_ERROR;
630 goto on_error;
631 }
632
633on_error:
634# ifdef HAVE_GNUTLS
635 if (cert)
636 free(cert);
637
638# else /* ifdef HAVE_GNUTLS */
639 if (cert)
640 OPENSSL_free(cert);
641
642# endif /* ifdef HAVE_GNUTLS */
643 if (sign)
644 free(sign);
645
646 munmap(data, st_buf.st_size);
647 return err;
648#else /* ifdef HAVE_SIGNATURE */
649 fp = NULL;
650 key = NULL;
651 return EET_ERROR_NOT_IMPLEMENTED;
652#endif /* ifdef HAVE_SIGNATURE */
653} /* eet_identity_sign */
654
655const void *
656eet_identity_check(const void *data_base,
657 unsigned int data_length,
658 void **sha1,
659 int *sha1_length,
660 const void *signature_base,
661 unsigned int signature_length,
662 const void **raw_signature_base,
663 unsigned int *raw_signature_length,
664 int *x509_length)
665{
666#ifdef HAVE_SIGNATURE
667 const int *header = signature_base;
668 const unsigned char *sign;
669 const unsigned char *cert_der;
670 int sign_len;
671 int cert_len;
672 int magic;
673
674 /* At least the header size */
675 if (signature_length < sizeof(int) * 3)
676 return NULL;
677
678 /* Get the header */
679 magic = ntohl(header[0]);
680 sign_len = ntohl(header[1]);
681 cert_len = ntohl(header[2]);
682
683 /* Verify the header */
684 if (magic != EET_MAGIC_SIGN)
685 return NULL;
686
687 if (sign_len + cert_len + sizeof(int) * 3 > signature_length)
688 return NULL;
689
690 /* Update the signature and certificate pointer */
691 sign = (unsigned char *)signature_base + sizeof(int) * 3;
692 cert_der = sign + sign_len;
693
694# ifdef HAVE_GNUTLS
695 gnutls_x509_crt_t cert;
696 gnutls_datum_t datum;
697 gnutls_datum_t signature;
698# if EET_USE_NEW_GNUTLS_API
699 unsigned char *hash;
700 gcry_md_hd_t md;
701 int err;
702# endif /* if EET_USE_NEW_GNUTLS_API */
703
704 /* Create an understanding certificate structure for gnutls */
705 datum.data = (void *)cert_der;
706 datum.size = cert_len;
707 gnutls_x509_crt_init(&cert);
708 gnutls_x509_crt_import(cert, &datum, GNUTLS_X509_FMT_DER);
709
710 signature.data = (void *)sign;
711 signature.size = sign_len;
712
713 /* Verify the signature */
714# if EET_USE_NEW_GNUTLS_API
715 /*
716 I am waiting for my patch being accepted in GnuTLS release.
717 But we now have a way to prevent double computation of SHA1.
718 */
719 err = gcry_md_open (&md, GCRY_MD_SHA1, 0);
720 if (err < 0)
721 return NULL;
722
723 gcry_md_write(md, data_base, data_length);
724
725 hash = gcry_md_read(md, GCRY_MD_SHA1);
726 if (!hash)
727 {
728 gcry_md_close(md);
729 return NULL;
730 }
731
732 datum.size = gcry_md_get_algo_dlen(GCRY_MD_SHA1);
733 datum.data = hash;
734
735 if (!gnutls_x509_crt_verify_hash(cert, 0, &datum, &signature))
736 {
737 gcry_md_close(md);
738 return NULL;
739 }
740
741 if (sha1)
742 {
743 *sha1 = malloc(datum.size);
744 if (!*sha1)
745 {
746 gcry_md_close(md);
747 return NULL;
748 }
749
750 memcpy(*sha1, hash, datum.size);
751 *sha1_length = datum.size;
752 }
753
754 gcry_md_close(md);
755# else /* if EET_USE_NEW_GNUTLS_API */
756 datum.data = (void *)data_base;
757 datum.size = data_length;
758
759 if (!gnutls_x509_crt_verify_data(cert, 0, &datum, &signature))
760 return NULL;
761
762 if (sha1)
763 {
764 *sha1 = NULL;
765 *sha1_length = -1;
766 }
767
768# endif /* if EET_USE_NEW_GNUTLS_API */
769 gnutls_x509_crt_deinit(cert);
770
771# else /* ifdef HAVE_GNUTLS */
772 const unsigned char *tmp;
773 EVP_PKEY *pkey;
774 X509 *x509;
775 EVP_MD_CTX md_ctx;
776 int err;
777
778 /* Strange but d2i_X509 seems to put 0 all over the place. */
779 tmp = alloca(cert_len);
780 memcpy((char *)tmp, cert_der, cert_len);
781 x509 = d2i_X509(NULL, &tmp, cert_len);
782 if (!x509)
783 return NULL;
784
785 /* Get public key - eay */
786 pkey = X509_get_pubkey(x509);
787 if (!pkey)
788 {
789 X509_free(x509);
790 return NULL;
791 }
792
793 /* Verify the signature */
794 EVP_VerifyInit(&md_ctx, EVP_sha1());
795 EVP_VerifyUpdate(&md_ctx, data_base, data_length);
796 err = EVP_VerifyFinal(&md_ctx, sign, sign_len, pkey);
797
798 X509_free(x509);
799 EVP_PKEY_free(pkey);
800
801 if (sha1)
802 {
803 *sha1 = NULL;
804 *sha1_length = -1;
805 }
806
807 if (err != 1)
808 return NULL;
809
810# endif /* ifdef HAVE_GNUTLS */
811 if (x509_length)
812 *x509_length = cert_len;
813
814 if (raw_signature_base)
815 *raw_signature_base = sign;
816
817 if (raw_signature_length)
818 *raw_signature_length = sign_len;
819
820 return cert_der;
821#else /* ifdef HAVE_SIGNATURE */
822 data_base = NULL;
823 data_length = 0;
824 sha1 = NULL;
825 sha1_length = NULL;
826 signature_base = NULL;
827 signature_length = 0;
828 raw_signature_base = NULL;
829 raw_signature_length = NULL;
830 x509_length = NULL;
831 return NULL;
832#endif /* ifdef HAVE_SIGNATURE */
833} /* eet_identity_check */
834
835EAPI void
836eet_identity_certificate_print(const unsigned char *certificate,
837 int der_length,
838 FILE *out)
839{
840#ifdef HAVE_SIGNATURE
841 if (!certificate || !out || der_length <= 0)
842 {
843 ERR("No certificate provided.");
844 return;
845 }
846
847# ifdef HAVE_GNUTLS
848 gnutls_datum_t datum;
849 gnutls_x509_crt_t cert;
850
851 /* Create an understanding certificate structure for gnutls */
852 datum.data = (void *)certificate;
853 datum.size = der_length;
854 if (gnutls_x509_crt_init(&cert))
855 goto on_error;
856
857 if (gnutls_x509_crt_import(cert, &datum, GNUTLS_X509_FMT_DER))
858 goto on_error;
859
860 /* Pretty print the certificate */
861 datum.data = NULL;
862 datum.size = 0;
863 if (gnutls_x509_crt_print(cert, GNUTLS_X509_CRT_FULL, &datum))
864 goto on_error;
865
866 INF("Public certificate :");
867 INF("%s", datum.data);
868
869on_error:
870 if (datum.data)
871 gnutls_free(datum.data);
872
873 gnutls_x509_crt_deinit(cert);
874# else /* ifdef HAVE_GNUTLS */
875 const unsigned char *tmp;
876 X509 *x509;
877
878 /* Strange but d2i_X509 seems to put 0 all over the place. */
879 tmp = alloca(der_length);
880 memcpy((char *)tmp, certificate, der_length);
881 x509 = d2i_X509(NULL, &tmp, der_length);
882 if (!x509)
883 {
884 INF("Not a valid certificate.");
885 return;
886 }
887
888 INF("Public certificate :");
889 X509_print_fp(out, x509);
890
891 X509_free(x509);
892# endif /* ifdef HAVE_GNUTLS */
893#else /* ifdef HAVE_SIGNATURE */
894 certificate = NULL;
895 der_length = 0;
896 out = NULL;
897 ERR("You need to compile signature support in EET.");
898#endif /* ifdef HAVE_SIGNATURE */
899} /* eet_identity_certificate_print */
900
901Eet_Error
902eet_cipher(const void *data,
903 unsigned int size,
904 const char *key,
905 unsigned int length,
906 void **result,
907 unsigned int *result_length)
908{
909#ifdef HAVE_CIPHER
910 /* Cipher declarations */
911 unsigned int *ret = NULL;
912 unsigned char iv[MAX_IV_LEN];
913 unsigned char ik[MAX_KEY_LEN];
914 unsigned char key_material[MAX_IV_LEN + MAX_KEY_LEN];
915 unsigned int salt;
916 unsigned int tmp = 0;
917 int crypted_length;
918 int opened = 0;
919# ifdef HAVE_GNUTLS
920 /* Gcrypt declarations */
921 gcry_error_t err = 0;
922 gcry_cipher_hd_t cipher;
923# else /* ifdef HAVE_GNUTLS */
924 /* Openssl declarations*/
925 EVP_CIPHER_CTX ctx;
926 unsigned int *buffer;
927 int tmp_len;
928# endif /* ifdef HAVE_GNUTLS */
929
930# ifdef HAVE_GNUTLS
931 /* Gcrypt salt generation */
932 gcry_create_nonce((unsigned char *)&salt, sizeof(salt));
933# else /* ifdef HAVE_GNUTLS */
934 /* Openssl salt generation */
935 if (!RAND_bytes((unsigned char *)&salt, sizeof (unsigned int)))
936 return EET_ERROR_PRNG_NOT_SEEDED;
937
938# endif /* ifdef HAVE_GNUTLS */
939
940 eet_pbkdf2_sha1(key,
941 length,
942 (unsigned char *)&salt,
943 sizeof(unsigned int),
944 2048,
945 key_material,
946 MAX_KEY_LEN + MAX_IV_LEN);
947
948 memcpy(iv, key_material, MAX_IV_LEN);
949 memcpy(ik, key_material + MAX_IV_LEN, MAX_KEY_LEN);
950
951 memset(key_material, 0, sizeof (key_material));
952
953 crypted_length = ((((size + sizeof (unsigned int)) >> 5) + 1) << 5);
954 ret = malloc(crypted_length + sizeof(unsigned int));
955 if (!ret)
956 {
957 memset(iv, 0, sizeof (iv));
958 memset(ik, 0, sizeof (ik));
959 memset(&salt, 0, sizeof (salt));
960 return EET_ERROR_OUT_OF_MEMORY;
961 }
962
963 *ret = salt;
964 memset(&salt, 0, sizeof (salt));
965 tmp = htonl(size);
966
967# ifdef HAVE_GNUTLS
968 *(ret + 1) = tmp;
969 memcpy(ret + 2, data, size);
970
971 /* Gcrypt create the corresponding cipher
972 AES with a 256 bit key, Cipher Block Chaining mode */
973 err = gcry_cipher_open(&cipher, GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CBC, 0);
974 if (err)
975 goto on_error;
976
977 opened = 1;
978 err = gcry_cipher_setiv(cipher, iv, MAX_IV_LEN);
979 if (err)
980 goto on_error;
981
982 err = gcry_cipher_setkey(cipher, ik, MAX_KEY_LEN);
983 if (err)
984 goto on_error;
985
986 memset(iv, 0, sizeof (iv));
987 memset(ik, 0, sizeof (ik));
988
989 /* Gcrypt encrypt */
990 err = gcry_cipher_encrypt(cipher,
991 (unsigned char *)(ret + 1),
992 crypted_length,
993 NULL,
994 0);
995 if (err)
996 goto on_error;
997
998 /* Gcrypt close the cipher */
999 gcry_cipher_close(cipher);
1000# else /* ifdef HAVE_GNUTLS */
1001 buffer = alloca(crypted_length);
1002 *buffer = tmp;
1003
1004 memcpy(buffer + 1, data, size);
1005
1006 /* Openssl create the corresponding cipher
1007 AES with a 256 bit key, Cipher Block Chaining mode */
1008 EVP_CIPHER_CTX_init(&ctx);
1009 if (!EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, ik, iv))
1010 goto on_error;
1011
1012 opened = 1;
1013
1014 memset(iv, 0, sizeof (iv));
1015 memset(ik, 0, sizeof (ik));
1016
1017 /* Openssl encrypt */
1018 if (!EVP_EncryptUpdate(&ctx, (unsigned char *)(ret + 1), &tmp_len,
1019 (unsigned char *)buffer,
1020 size + sizeof(unsigned int)))
1021 goto on_error;
1022
1023 /* Openssl close the cipher */
1024 if (!EVP_EncryptFinal_ex(&ctx, ((unsigned char *)(ret + 1)) + tmp_len,
1025 &tmp_len))
1026 goto on_error;
1027
1028 EVP_CIPHER_CTX_cleanup(&ctx);
1029# endif /* ifdef HAVE_GNUTLS */
1030
1031 /* Set return values */
1032 if (result_length)
1033 *result_length = crypted_length + sizeof(unsigned int);
1034
1035 if (result)
1036 *result = ret;
1037 else
1038 free(ret);
1039
1040 return EET_ERROR_NONE;
1041
1042on_error:
1043 memset(iv, 0, sizeof (iv));
1044 memset(ik, 0, sizeof (ik));
1045
1046# ifdef HAVE_GNUTLS
1047 /* Gcrypt error */
1048 if (opened)
1049 gcry_cipher_close(cipher);
1050
1051# else /* ifdef HAVE_GNUTLS */
1052 /* Openssl error */
1053 if (opened)
1054 EVP_CIPHER_CTX_cleanup(&ctx);
1055
1056# endif /* ifdef HAVE_GNUTLS */
1057 /* General error */
1058 free(ret);
1059 if (result)
1060 *result = NULL;
1061
1062 if (result_length)
1063 *result_length = 0;
1064
1065 return EET_ERROR_ENCRYPT_FAILED;
1066#else /* ifdef HAVE_CIPHER */
1067 /* Cipher not supported */
1068 (void)data;
1069 (void)size;
1070 (void)key;
1071 (void)length;
1072 (void)result;
1073 (void)result_length;
1074 return EET_ERROR_NOT_IMPLEMENTED;
1075#endif /* ifdef HAVE_CIPHER */
1076} /* eet_cipher */
1077
1078Eet_Error
1079eet_decipher(const void *data,
1080 unsigned int size,
1081 const char *key,
1082 unsigned int length,
1083 void **result,
1084 unsigned int *result_length)
1085{
1086#ifdef HAVE_CIPHER
1087 const unsigned int *over = data;
1088 unsigned int *ret = NULL;
1089 unsigned char ik[MAX_KEY_LEN];
1090 unsigned char iv[MAX_IV_LEN];
1091 unsigned char key_material[MAX_KEY_LEN + MAX_IV_LEN];
1092 unsigned int salt;
1093 int tmp_len;
1094 int tmp = 0;
1095
1096 /* At least the salt and an AES block */
1097 if (size < sizeof(unsigned int) + 16)
1098 return EET_ERROR_BAD_OBJECT;
1099
1100 /* Get the salt */
1101 salt = *over;
1102
1103 /* Generate the iv and the key with the salt */
1104 eet_pbkdf2_sha1(key, length, (unsigned char *)&salt,
1105 sizeof(unsigned int), 2048, key_material,
1106 MAX_KEY_LEN + MAX_IV_LEN);
1107
1108 memcpy(iv, key_material, MAX_IV_LEN);
1109 memcpy(ik, key_material + MAX_IV_LEN, MAX_KEY_LEN);
1110
1111 memset(key_material, 0, sizeof (key_material));
1112 memset(&salt, 0, sizeof (salt));
1113
1114 /* Align to AES block size if size is not align */
1115 tmp_len = size - sizeof (unsigned int);
1116 if ((tmp_len & 0x1F) != 0)
1117 goto on_error;
1118
1119 ret = malloc(tmp_len);
1120 if (!ret)
1121 goto on_error;
1122
1123# ifdef HAVE_GNUTLS
1124 gcry_error_t err = 0;
1125 gcry_cipher_hd_t cipher;
1126
1127 /* Gcrypt create the corresponding cipher */
1128 err = gcry_cipher_open(&cipher, GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CBC, 0);
1129 if (err)
1130 return EET_ERROR_DECRYPT_FAILED;
1131
1132 err = gcry_cipher_setiv(cipher, iv, MAX_IV_LEN);
1133 if (err)
1134 goto on_error;
1135
1136 err = gcry_cipher_setkey(cipher, ik, MAX_KEY_LEN);
1137 if (err)
1138 goto on_error;
1139
1140 memset(iv, 0, sizeof (iv));
1141 memset(ik, 0, sizeof (ik));
1142
1143 /* Gcrypt decrypt */
1144 err = gcry_cipher_decrypt(cipher, ret, tmp_len,
1145 ((unsigned int *)data) + 1, tmp_len);
1146 if (err)
1147 goto on_error;
1148
1149 /* Gcrypt close the cipher */
1150 gcry_cipher_close(cipher);
1151
1152# else /* ifdef HAVE_GNUTLS */
1153 EVP_CIPHER_CTX ctx;
1154 int opened = 0;
1155
1156 /* Openssl create the corresponding cipher */
1157 EVP_CIPHER_CTX_init(&ctx);
1158 opened = 1;
1159
1160 if (!EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, ik, iv))
1161 goto on_error;
1162
1163 memset(iv, 0, sizeof (iv));
1164 memset(ik, 0, sizeof (ik));
1165
1166 /* Openssl decrypt */
1167 if (!EVP_DecryptUpdate(&ctx, (unsigned char *)ret, &tmp,
1168 (unsigned char *)(over + 1), tmp_len))
1169 goto on_error;
1170
1171 /* Openssl close the cipher*/
1172 EVP_CIPHER_CTX_cleanup(&ctx);
1173# endif /* ifdef HAVE_GNUTLS */
1174 /* Get the decrypted data size */
1175 tmp = *ret;
1176 tmp = ntohl(tmp);
1177 if (tmp > tmp_len)
1178 goto on_error;
1179
1180 /* Update the return values */
1181 if (result_length)
1182 *result_length = tmp;
1183
1184 if (result)
1185 {
1186 *result = NULL;
1187 *result = malloc(tmp);
1188 if (!*result)
1189 goto on_error;
1190
1191 memcpy(*result, ret + 1, tmp);
1192 }
1193
1194 free(ret);
1195
1196 return EET_ERROR_NONE;
1197
1198on_error:
1199 memset(iv, 0, sizeof (iv));
1200 memset(ik, 0, sizeof (ik));
1201
1202# ifdef HAVE_GNUTLS
1203# else
1204 if (opened)
1205 EVP_CIPHER_CTX_cleanup(&ctx);
1206
1207# endif /* ifdef HAVE_GNUTLS */
1208 if (result)
1209 *result = NULL;
1210
1211 if (result_length)
1212 *result_length = 0;
1213
1214 if (ret)
1215 free(ret);
1216
1217 return EET_ERROR_DECRYPT_FAILED;
1218#else /* ifdef HAVE_CIPHER */
1219 (void)data;
1220 (void)size;
1221 (void)key;
1222 (void)length;
1223 (void)result;
1224 (void)result_length;
1225 return EET_ERROR_NOT_IMPLEMENTED;
1226#endif /* ifdef HAVE_CIPHER */
1227} /* eet_decipher */
1228
1229#ifdef HAVE_CIPHER
1230# ifdef HAVE_GNUTLS
1231static Eet_Error
1232eet_hmac_sha1(const void *key,
1233 size_t key_len,
1234 const void *data,
1235 size_t data_len,
1236 unsigned char *res)
1237{
1238 size_t hlen = gcry_md_get_algo_dlen (GCRY_MD_SHA1);
1239 gcry_md_hd_t mdh;
1240 unsigned char *hash;
1241 gpg_error_t err;
1242
1243 err = gcry_md_open(&mdh, GCRY_MD_SHA1, GCRY_MD_FLAG_HMAC);
1244 if (err != GPG_ERR_NO_ERROR)
1245 return 1;
1246
1247 err = gcry_md_setkey(mdh, key, key_len);
1248 if (err != GPG_ERR_NO_ERROR)
1249 {
1250 gcry_md_close(mdh);
1251 return 1;
1252 }
1253
1254 gcry_md_write(mdh, data, data_len);
1255
1256 hash = gcry_md_read(mdh, GCRY_MD_SHA1);
1257 if (!hash)
1258 {
1259 gcry_md_close(mdh);
1260 return 1;
1261 }
1262
1263 memcpy(res, hash, hlen);
1264
1265 gcry_md_close(mdh);
1266
1267 return 0;
1268} /* eet_hmac_sha1 */
1269
1270# endif /* ifdef HAVE_GNUTLS */
1271
1272static Eet_Error
1273eet_pbkdf2_sha1(const char *key,
1274 int key_len,
1275 const unsigned char *salt,
1276 unsigned int salt_len,
1277 int iter,
1278 unsigned char *res,
1279 int res_len)
1280{
1281 unsigned char digest[20];
1282 unsigned char tab[4];
1283 unsigned char *p = res;
1284 unsigned char *buf;
1285 unsigned long i;
1286 int digest_len = 20;
1287 int len = res_len;
1288 int tmp_len;
1289 int j, k;
1290# ifdef HAVE_GNUTLS
1291# else
1292 HMAC_CTX hctx;
1293# endif /* ifdef HAVE_GNUTLS */
1294
1295 buf = alloca(salt_len + 4);
1296 if (!buf)
1297 return 1;
1298
1299 for (i = 1; len; len -= tmp_len, p += tmp_len, i++)
1300 {
1301 if (len > digest_len)
1302 tmp_len = digest_len;
1303 else
1304 tmp_len = len;
1305
1306 tab[0] = (unsigned char)(i & 0xff000000) >> 24;
1307 tab[1] = (unsigned char)(i & 0x00ff0000) >> 16;
1308 tab[2] = (unsigned char)(i & 0x0000ff00) >> 8;
1309 tab[3] = (unsigned char)(i & 0x000000ff) >> 0;
1310
1311# ifdef HAVE_GNUTLS
1312 memcpy(buf, salt, salt_len);
1313 memcpy(buf + salt_len, tab, 4);
1314 eet_hmac_sha1(key, key_len, buf, salt_len + 4, digest);
1315# else /* ifdef HAVE_GNUTLS */
1316 HMAC_Init(&hctx, key, key_len, EVP_sha1());
1317 HMAC_Update(&hctx, salt, salt_len);
1318 HMAC_Update(&hctx, tab, 4);
1319 HMAC_Final(&hctx, digest, NULL);
1320# endif /* ifdef HAVE_GNUTLS */
1321 memcpy(p, digest, tmp_len);
1322
1323 for (j = 1; j < iter; j++)
1324 {
1325# ifdef HAVE_GNUTLS
1326 eet_hmac_sha1(key, key_len, digest, 20, digest);
1327# else /* ifdef HAVE_GNUTLS */
1328 HMAC(EVP_sha1(), key, key_len, digest, 20, digest, NULL);
1329# endif /* ifdef HAVE_GNUTLS */
1330 for (k = 0; k < tmp_len; k++)
1331 p[k] ^= digest[k];
1332 }
1333 }
1334
1335# ifdef HAVE_GNUTLS
1336# else
1337 HMAC_cleanup(&hctx);
1338# endif /* ifdef HAVE_GNUTLS */
1339 return 0;
1340} /* eet_pbkdf2_sha1 */
1341
1342#endif /* ifdef HAVE_CIPHER */
diff --git a/libraries/eet/src/lib/eet_connection.c b/libraries/eet/src/lib/eet_connection.c
new file mode 100644
index 0000000..6171b7e
--- /dev/null
+++ b/libraries/eet/src/lib/eet_connection.c
@@ -0,0 +1,249 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#ifdef HAVE_ALLOCA_H
6# include <alloca.h>
7#elif defined __GNUC__
8# define alloca __builtin_alloca
9#elif defined _AIX
10# define alloca __alloca
11#elif defined _MSC_VER
12# include <malloc.h>
13# define alloca _alloca
14#else /* ifdef HAVE_ALLOCA_H */
15# include <stddef.h>
16# ifdef __cplusplus
17extern "C"
18# endif /* ifdef __cplusplus */
19void *alloca(size_t);
20#endif /* ifdef HAVE_ALLOCA_H */
21
22#include <string.h>
23#include <stdlib.h>
24
25#ifdef HAVE_NETINET_IN_H
26# include <netinet/in.h>
27#endif /* ifdef HAVE_NETINET_IN_H */
28
29#ifdef _WIN32
30# include <winsock2.h>
31#endif /* ifdef _WIN32 */
32
33#include <Eina.h>
34
35#include "Eet.h"
36#include "Eet_private.h"
37
38#define MAGIC_EET_DATA_PACKET 0x4270ACE1
39
40struct _Eet_Connection
41{
42 Eet_Read_Cb *eet_read_cb;
43 Eet_Write_Cb *eet_write_cb;
44 void *user_data;
45
46 size_t allocated;
47 size_t size;
48 size_t received;
49
50 void *buffer;
51};
52
53EAPI Eet_Connection *
54eet_connection_new(Eet_Read_Cb *eet_read_cb,
55 Eet_Write_Cb *eet_write_cb,
56 const void *user_data)
57{
58 Eet_Connection *conn;
59
60 if (!eet_read_cb || !eet_write_cb)
61 return NULL;
62
63 conn = calloc(1, sizeof (Eet_Connection));
64 if (!conn)
65 return NULL;
66
67 conn->eet_read_cb = eet_read_cb;
68 conn->eet_write_cb = eet_write_cb;
69 conn->user_data = (void *)user_data;
70
71 return conn;
72} /* eet_connection_new */
73
74EAPI int
75eet_connection_received(Eet_Connection *conn,
76 const void *data,
77 size_t size)
78{
79 if ((!conn) || (!data) || (!size))
80 return size;
81
82 do {
83 size_t copy_size;
84
85 if (conn->size == 0)
86 {
87 const int *msg;
88 size_t packet_size;
89
90 if (size < sizeof (int) * 2)
91 break;
92
93 msg = data;
94 /* Check the magic */
95 if (ntohl(msg[0]) != MAGIC_EET_DATA_PACKET)
96 break;
97
98 packet_size = ntohl(msg[1]);
99 /* Message should always be under 64K */
100 if (packet_size > 64 * 1024)
101 break;
102
103 data = (void *)(msg + 2);
104 size -= sizeof (int) * 2;
105 if ((size_t)packet_size <= size)
106 {
107 /* Not a partial receive, go the quick way. */
108 if (!conn->eet_read_cb(data, packet_size, conn->user_data))
109 break;
110
111 data = (void *)((char *)data + packet_size);
112 size -= packet_size;
113
114 conn->received = 0;
115 continue;
116 }
117
118 conn->size = packet_size;
119 if (conn->allocated < conn->size)
120 {
121 void *tmp;
122
123 tmp = realloc(conn->buffer, conn->size);
124 if (!tmp)
125 break;
126
127 conn->buffer = tmp;
128 conn->allocated = conn->size;
129 }
130 }
131
132 /* Partial receive */
133 copy_size =
134 (conn->size - conn->received >=
135 size) ? size : conn->size - conn->received;
136 memcpy((char *)conn->buffer + conn->received, data, copy_size);
137
138 conn->received += copy_size;
139 data = (void *)((char *)data + copy_size);
140 size -= copy_size;
141
142 if (conn->received == conn->size)
143 {
144 size_t data_size;
145
146 data_size = conn->size;
147 conn->size = 0;
148 conn->received = 0;
149
150 /* Completed a packet. */
151 if (!conn->eet_read_cb(conn->buffer, data_size, conn->user_data))
152 {
153 /* Something goes wrong. Stop now. */
154 size += data_size;
155 break;
156 }
157 }
158 } while (size > 0);
159
160 return size;
161} /* eet_connection_received */
162
163static Eina_Bool
164_eet_connection_raw_send(Eet_Connection *conn,
165 void *data,
166 int data_size)
167{
168 int *message;
169
170 /* Message should never be above 64K */
171 if (data_size > 64 * 1024)
172 return EINA_FALSE;
173
174 message = alloca(data_size + sizeof (int) * 2);
175 message[0] = htonl(MAGIC_EET_DATA_PACKET);
176 message[1] = htonl(data_size);
177
178 memcpy(message + 2, data, data_size);
179
180 conn->eet_write_cb(message,
181 data_size + sizeof (int) * 2,
182 conn->user_data);
183 return EINA_TRUE;
184} /* _eet_connection_raw_send */
185
186EAPI Eina_Bool
187eet_connection_send(Eet_Connection *conn,
188 Eet_Data_Descriptor *edd,
189 const void *data_in,
190 const char *cipher_key)
191{
192 void *flat_data;
193 int data_size;
194 Eina_Bool ret = EINA_FALSE;
195
196 flat_data = eet_data_descriptor_encode_cipher(edd,
197 data_in,
198 cipher_key,
199 &data_size);
200 if (!flat_data)
201 return EINA_FALSE;
202
203 if (_eet_connection_raw_send(conn, flat_data, data_size))
204 ret = EINA_TRUE;
205
206 free(flat_data);
207 return ret;
208} /* eet_connection_send */
209
210EAPI Eina_Bool
211eet_connection_node_send(Eet_Connection *conn,
212 Eet_Node *node,
213 const char *cipher_key)
214{
215 void *data;
216 int data_size;
217 Eina_Bool ret = EINA_FALSE;
218
219 data = eet_data_node_encode_cipher(node, cipher_key, &data_size);
220 if (!data)
221 return EINA_FALSE;
222
223 if (_eet_connection_raw_send(conn, data, data_size))
224 ret = EINA_TRUE;
225
226 free(data);
227 return ret;
228} /* eet_connection_node_send */
229
230EAPI void *
231eet_connection_close(Eet_Connection *conn,
232 Eina_Bool *on_going)
233{
234 void *user_data;
235
236 if (!conn)
237 return NULL;
238
239 if (on_going)
240 *on_going = conn->received == 0 ? EINA_FALSE : EINA_TRUE;
241
242 user_data = conn->user_data;
243
244 free(conn->buffer);
245 free(conn);
246
247 return user_data;
248} /* eet_connection_close */
249
diff --git a/libraries/eet/src/lib/eet_data.c b/libraries/eet/src/lib/eet_data.c
new file mode 100644
index 0000000..23b0b97
--- /dev/null
+++ b/libraries/eet/src/lib/eet_data.c
@@ -0,0 +1,4999 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#include <stdio.h>
6#include <string.h>
7#include <math.h>
8#include <ctype.h>
9#include <limits.h>
10
11#ifdef HAVE_NETINET_IN_H
12# include <netinet/in.h>
13#endif /* ifdef HAVE_NETINET_IN_H */
14
15#ifdef _WIN32
16# include <winsock2.h>
17#endif /* ifdef _WIN32 */
18
19#include <Eina.h>
20
21#include "Eet.h"
22#include "Eet_private.h"
23
24#ifdef _WIN32
25# define FMT_CHAR "%c"
26# define FMT_UCHAR "%c"
27# define FMT_LONG_LONG "%I64i"
28# define FMT_ULONG_LONG "%I64u"
29#else
30# define FMT_CHAR "%hhi"
31# define FMT_UCHAR "%hhu"
32# define FMT_LONG_LONG "%lli"
33# define FMT_ULONG_LONG "%llu"
34#endif
35
36/*
37 * routines for doing data -> struct and struct -> data conversion
38 *
39 * types:
40 *
41 * basic types:
42 * a sequence of...
43 *
44 * char
45 * short
46 * int
47 * long long
48 * float
49 * double
50 * unsigned char
51 * unsigned short
52 * unsigned int
53 * unsgined long long
54 * string
55 *
56 * groupings:
57 * multiple entries ordered as...
58 *
59 * fixed size array [ of basic types ]
60 * variable size array [ of basic types ]
61 * linked list [ of basic types ]
62 * hash table [ of basic types ]
63 *
64 * need to provide builder/accessor funcs for:
65 *
66 * list_next
67 * list_append
68 *
69 * hash_foreach
70 * hash_add
71 *
72 */
73
74/*---*/
75
76typedef struct _Eet_Data_Element Eet_Data_Element;
77typedef struct _Eet_Data_Basic_Type_Codec Eet_Data_Basic_Type_Codec;
78typedef struct _Eet_Data_Group_Type_Codec Eet_Data_Group_Type_Codec;
79typedef struct _Eet_Data_Chunk Eet_Data_Chunk;
80typedef struct _Eet_Data_Stream Eet_Data_Stream;
81typedef struct _Eet_Data_Descriptor_Hash Eet_Data_Descriptor_Hash;
82typedef struct _Eet_Data_Encode_Hash_Info Eet_Data_Encode_Hash_Info;
83typedef struct _Eet_Free Eet_Free;
84typedef struct _Eet_Free_Context Eet_Free_Context;
85typedef struct _Eet_Variant_Unknow Eet_Variant_Unknow;
86
87/*---*/
88
89/* TODO:
90 * Eet_Data_Basic_Type_Codec (Coder, Decoder)
91 * Eet_Data_Group_Type_Codec (Coder, Decoder)
92 */
93struct _Eet_Data_Basic_Type_Codec
94{
95 int size;
96 const char *name;
97 int (*get)(const Eet_Dictionary *ed,
98 const void *src,
99 const void *src_end,
100 void *dest);
101 void * (*put)(Eet_Dictionary *ed, const void *src, int *size_ret);
102};
103
104struct _Eet_Data_Group_Type_Codec
105{
106 int (*get)(Eet_Free_Context *context,
107 const Eet_Dictionary *ed,
108 Eet_Data_Descriptor *edd,
109 Eet_Data_Element *ede,
110 Eet_Data_Chunk *echnk,
111 int type,
112 int group_type,
113 void *data_in,
114 char **p,
115 int *size);
116 void (*put)(Eet_Dictionary *ed,
117 Eet_Data_Descriptor *edd,
118 Eet_Data_Element *ede,
119 Eet_Data_Stream *ds,
120 void *data_in);
121};
122
123struct _Eet_Data_Chunk
124{
125 char *name;
126 int len;
127 int size;
128 int hash;
129 void *data;
130 unsigned char type;
131 unsigned char group_type;
132};
133
134struct _Eet_Data_Stream
135{
136 void *data;
137 int size;
138 int pos;
139};
140
141struct _Eet_Data_Descriptor_Hash
142{
143 Eet_Data_Element *element;
144 Eet_Data_Descriptor_Hash *next;
145};
146
147struct _Eet_Data_Descriptor
148{
149 const char *name;
150 const Eet_Dictionary *ed;
151 int size;
152 struct
153 {
154 void * (*mem_alloc)(size_t size);
155 void (*mem_free)(void *mem);
156 char * (*str_alloc)(const char *str);
157 char * (*str_direct_alloc)(const char *str);
158 void (*str_free)(const char *str);
159 void (*str_direct_free)(const char *str);
160 void * (*list_next)(void *l);
161 void * (*list_append)(void *l, void *d);
162 void * (*list_data)(void *l);
163 void * (*list_free)(void *l);
164 void (*hash_foreach)(void *h,
165 int (*func)(void *h,
166 const char *k,
167 void *dt,
168 void *fdt),
169 void *fdt);
170 void * (*hash_add)(void *h, const char *k, void *d);
171 void (*hash_free)(void *h);
172 const char *(*type_get)(const void *data, Eina_Bool *unknow);
173 Eina_Bool (*type_set)(const char *type,
174 void *data,
175 Eina_Bool unknow);
176 void * (*array_alloc)(size_t size);
177 void (*array_free)(void *mem);
178 } func;
179 struct
180 {
181 int num;
182 Eet_Data_Element *set;
183 struct
184 {
185 int size;
186 Eet_Data_Descriptor_Hash *buckets;
187 } hash;
188 } elements;
189
190 Eina_Bool unified_type : 1;
191// char *strings;
192// int strings_len;
193};
194
195struct _Eet_Data_Element
196{
197 const char *name;
198 const char *counter_name;
199 const char *directory_name_ptr;
200 Eet_Data_Descriptor *subtype;
201 int offset; /* offset in bytes from the base element */
202 int count; /* number of elements for a fixed array */
203 int counter_offset; /* for a variable array we need the offset of the count variable */
204 unsigned char type; /* EET_T_XXX */
205 unsigned char group_type; /* EET_G_XXX */
206};
207
208struct _Eet_Data_Encode_Hash_Info
209{
210 Eet_Data_Stream *ds;
211 Eet_Data_Element *ede;
212 Eet_Dictionary *ed;
213};
214
215#define EET_FREE_COUNT 256
216struct _Eet_Free
217{
218 int ref;
219 Eina_Array list[EET_FREE_COUNT];
220};
221
222struct _Eet_Free_Context
223{
224 Eet_Free freelist;
225 Eet_Free freelist_array;
226 Eet_Free freelist_list;
227 Eet_Free freelist_hash;
228 Eet_Free freelist_str;
229 Eet_Free freelist_direct_str;
230};
231
232struct _Eet_Variant_Unknow
233{
234 EINA_MAGIC
235
236 int size;
237 char data[1];
238};
239
240/*---*/
241
242static void
243 eet_free_context_init(Eet_Free_Context *context);
244static void
245 eet_free_context_shutdown(Eet_Free_Context *context);
246
247static int
248eet_data_get_char(const Eet_Dictionary *ed,
249 const void *src,
250 const void *src_end,
251 void *dest);
252static void *
253eet_data_put_char(Eet_Dictionary *ed,
254 const void *src,
255 int *size_ret);
256static int
257eet_data_get_short(const Eet_Dictionary *ed,
258 const void *src,
259 const void *src_end,
260 void *dest);
261static void *
262eet_data_put_short(Eet_Dictionary *ed,
263 const void *src,
264 int *size_ret);
265static inline int
266eet_data_get_int(const Eet_Dictionary *ed,
267 const void *src,
268 const void *src_end,
269 void *dest);
270static void *
271eet_data_put_int(Eet_Dictionary *ed,
272 const void *src,
273 int *size_ret);
274static int
275eet_data_get_long_long(const Eet_Dictionary *ed,
276 const void *src,
277 const void *src_end,
278 void *dest);
279static void *
280eet_data_put_long_long(Eet_Dictionary *ed,
281 const void *src,
282 int *size_ret);
283static int
284eet_data_get_float(const Eet_Dictionary *ed,
285 const void *src,
286 const void *src_end,
287 void *dest);
288static void *
289eet_data_put_float(Eet_Dictionary *ed,
290 const void *src,
291 int *size_ret);
292static int
293eet_data_get_double(const Eet_Dictionary *ed,
294 const void *src,
295 const void *src_end,
296 void *dest);
297static void *
298eet_data_put_double(Eet_Dictionary *ed,
299 const void *src,
300 int *size_ret);
301static int
302eet_data_get_f32p32(const Eet_Dictionary *ed,
303 const void *src,
304 const void *src_end,
305 void *dest);
306static void *
307eet_data_put_f32p32(Eet_Dictionary *ed,
308 const void *src,
309 int *size_ret);
310static int
311eet_data_get_f16p16(const Eet_Dictionary *ed,
312 const void *src,
313 const void *src_end,
314 void *dest);
315static void *
316eet_data_put_f16p16(Eet_Dictionary *ed,
317 const void *src,
318 int *size_ret);
319static int
320eet_data_get_f8p24(const Eet_Dictionary *ed,
321 const void *src,
322 const void *src_end,
323 void *dest);
324static void *
325eet_data_put_f8p24(Eet_Dictionary *ed,
326 const void *src,
327 int *size_ret);
328static inline int
329eet_data_get_string(const Eet_Dictionary *ed,
330 const void *src,
331 const void *src_end,
332 void *dest);
333static void *
334eet_data_put_string(Eet_Dictionary *ed,
335 const void *src,
336 int *size_ret);
337static int
338eet_data_get_istring(const Eet_Dictionary *ed,
339 const void *src,
340 const void *src_end,
341 void *dest);
342static void *
343eet_data_put_istring(Eet_Dictionary *ed,
344 const void *src,
345 int *size_ret);
346static int
347eet_data_get_null(const Eet_Dictionary *ed,
348 const void *src,
349 const void *src_end,
350 void *dest);
351static void *
352eet_data_put_null(Eet_Dictionary *ed,
353 const void *src,
354 int *size_ret);
355
356static int
357eet_data_get_type(const Eet_Dictionary *ed,
358 int type,
359 const void *src,
360 const void *src_end,
361 void *dest);
362static void *
363eet_data_put_type(Eet_Dictionary *ed,
364 int type,
365 const void *src,
366 int *size_ret);
367
368static Eet_Node *
369eet_data_node_simple_type(int type,
370 const char *name,
371 void *dd);
372
373static int
374eet_data_get_unknown(Eet_Free_Context *context,
375 const Eet_Dictionary *ed,
376 Eet_Data_Descriptor *edd,
377 Eet_Data_Element *ede,
378 Eet_Data_Chunk *echnk,
379 int type,
380 int group_type,
381 void *data_in,
382 char **p,
383 int *size);
384static void
385eet_data_put_unknown(Eet_Dictionary *ed,
386 Eet_Data_Descriptor *edd,
387 Eet_Data_Element *ede,
388 Eet_Data_Stream *ds,
389 void *data_in);
390static void
391eet_data_put_array(Eet_Dictionary *ed,
392 Eet_Data_Descriptor *edd,
393 Eet_Data_Element *ede,
394 Eet_Data_Stream *ds,
395 void *data_in);
396static int
397eet_data_get_array(Eet_Free_Context *context,
398 const Eet_Dictionary *ed,
399 Eet_Data_Descriptor *edd,
400 Eet_Data_Element *ede,
401 Eet_Data_Chunk *echnk,
402 int type,
403 int group_type,
404 void *data,
405 char **p,
406 int *size);
407static int
408eet_data_get_list(Eet_Free_Context *context,
409 const Eet_Dictionary *ed,
410 Eet_Data_Descriptor *edd,
411 Eet_Data_Element *ede,
412 Eet_Data_Chunk *echnk,
413 int type,
414 int group_type,
415 void *data_in,
416 char **p,
417 int *size);
418static void
419eet_data_put_list(Eet_Dictionary *ed,
420 Eet_Data_Descriptor *edd,
421 Eet_Data_Element *ede,
422 Eet_Data_Stream *ds,
423 void *data_in);
424static void
425eet_data_put_hash(Eet_Dictionary *ed,
426 Eet_Data_Descriptor *edd,
427 Eet_Data_Element *ede,
428 Eet_Data_Stream *ds,
429 void *data_in);
430static int
431eet_data_get_hash(Eet_Free_Context *context,
432 const Eet_Dictionary *ed,
433 Eet_Data_Descriptor *edd,
434 Eet_Data_Element *ede,
435 Eet_Data_Chunk *echnk,
436 int type,
437 int group_type,
438 void *data,
439 char **p,
440 int *size);
441static void
442eet_data_put_union(Eet_Dictionary *ed,
443 Eet_Data_Descriptor *edd,
444 Eet_Data_Element *ede,
445 Eet_Data_Stream *ds,
446 void *data_in);
447static int
448eet_data_get_union(Eet_Free_Context *context,
449 const Eet_Dictionary *ed,
450 Eet_Data_Descriptor *edd,
451 Eet_Data_Element *ede,
452 Eet_Data_Chunk *echnk,
453 int type,
454 int group_type,
455 void *data,
456 char **p,
457 int *size);
458static void
459eet_data_put_variant(Eet_Dictionary *ed,
460 Eet_Data_Descriptor *edd,
461 Eet_Data_Element *ede,
462 Eet_Data_Stream *ds,
463 void *data_in);
464static int
465eet_data_get_variant(Eet_Free_Context *context,
466 const Eet_Dictionary *ed,
467 Eet_Data_Descriptor *edd,
468 Eet_Data_Element *ede,
469 Eet_Data_Chunk *echnk,
470 int type,
471 int group_type,
472 void *data,
473 char **p,
474 int *size);
475
476static void
477eet_data_chunk_get(const Eet_Dictionary *ed,
478 Eet_Data_Chunk *chnk,
479 const void *src,
480 int size);
481static Eet_Data_Chunk *
482eet_data_chunk_new(void *data,
483 int size,
484 const char *name,
485 int type,
486 int group_type);
487static void
488eet_data_chunk_free(Eet_Data_Chunk *chnk);
489
490static Eet_Data_Stream *
491 eet_data_stream_new(void);
492static void
493 eet_data_stream_write(Eet_Data_Stream *ds,
494 const void *data,
495 int size);
496static void
497eet_data_stream_free(Eet_Data_Stream *ds);
498
499static void
500eet_data_chunk_put(Eet_Dictionary *ed,
501 Eet_Data_Chunk *chnk,
502 Eet_Data_Stream *ds);
503
504static int
505eet_data_descriptor_encode_hash_cb(void *hash,
506 const char *key,
507 void *hdata,
508 void *fdata);
509static void *_eet_data_descriptor_encode(Eet_Dictionary *ed,
510 Eet_Data_Descriptor *edd,
511 const void *data_in,
512 int *size_ret);
513static void *_eet_data_descriptor_decode(Eet_Free_Context *context,
514 const Eet_Dictionary *ed,
515 Eet_Data_Descriptor *edd,
516 const void *data_in,
517 int size_in,
518 void *data_out,
519 int size_out);
520
521/*---*/
522
523static const Eet_Data_Basic_Type_Codec eet_basic_codec[] =
524{
525 {sizeof(char), "char", eet_data_get_char, eet_data_put_char },
526 {sizeof(short), "short", eet_data_get_short, eet_data_put_short },
527 {sizeof(int), "int", eet_data_get_int, eet_data_put_int },
528 {sizeof(long long), "long_long", eet_data_get_long_long, eet_data_put_long_long},
529 {sizeof(float), "float", eet_data_get_float, eet_data_put_float },
530 {sizeof(double), "double", eet_data_get_double, eet_data_put_double },
531 {sizeof(char), "uchar", eet_data_get_char, eet_data_put_char },
532 {sizeof(short), "ushort", eet_data_get_short, eet_data_put_short },
533 {sizeof(int), "uint", eet_data_get_int, eet_data_put_int },
534 {sizeof(long long), "ulong_long", eet_data_get_long_long, eet_data_put_long_long},
535 {sizeof(char *), "string", eet_data_get_string, eet_data_put_string },
536 {sizeof(char *), "inlined", eet_data_get_istring, eet_data_put_istring },
537 {sizeof(void *), "NULL", eet_data_get_null, eet_data_put_null },
538 {sizeof(Eina_F32p32), "f32p32", eet_data_get_f32p32, eet_data_put_f32p32 },
539 {sizeof(Eina_F16p16), "f16p16", eet_data_get_f16p16, eet_data_put_f16p16 },
540 {sizeof(Eina_F8p24), "f8p24", eet_data_get_f8p24, eet_data_put_f8p24 }
541};
542
543static const Eet_Data_Group_Type_Codec eet_group_codec[] =
544{
545 { eet_data_get_unknown, eet_data_put_unknown },
546 { eet_data_get_array, eet_data_put_array },
547 { eet_data_get_array, eet_data_put_array },
548 { eet_data_get_list, eet_data_put_list },
549 { eet_data_get_hash, eet_data_put_hash },
550 { eet_data_get_union, eet_data_put_union },
551 { eet_data_get_variant, eet_data_put_variant }
552};
553
554static int _eet_data_words_bigendian = -1;
555
556/*---*/
557
558#define SWAP64(x) (x) = \
559 ((((unsigned long long)(x) & 0x00000000000000ffULL) << 56) | \
560 (((unsigned long long)(x) & 0x000000000000ff00ULL) << 40) | \
561 (((unsigned long long)(x) & 0x0000000000ff0000ULL) << 24) | \
562 (((unsigned long long)(x) & 0x00000000ff000000ULL) << 8) | \
563 (((unsigned long long)(x) & 0x000000ff00000000ULL) >> 8) | \
564 (((unsigned long long)(x) & 0x0000ff0000000000ULL) >> 24) | \
565 (((unsigned long long)(x) & 0x00ff000000000000ULL) >> 40) | \
566 (((unsigned long long)(x) & 0xff00000000000000ULL) >> 56))
567#define SWAP32(x) (x) = \
568 ((((int)(x) & 0x000000ff) << 24) | \
569 (((int)(x) & 0x0000ff00) << 8) | \
570 (((int)(x) & 0x00ff0000) >> 8) | \
571 (((int)(x) & 0xff000000) >> 24))
572#define SWAP16(x) (x) = \
573 ((((short)(x) & 0x00ff) << 8) | \
574 (((short)(x) & 0xff00) >> 8))
575
576#ifdef CONV8
577# undef CONV8
578#endif /* ifdef CONV8 */
579#ifdef CONV16
580# undef CONV16
581#endif /* ifdef CONV16 */
582#ifdef CONV32
583# undef CONV32
584#endif /* ifdef CONV32 */
585#ifdef CONV64
586# undef CONV64
587#endif /* ifdef CONV64 */
588
589#define CONV8(x)
590#define CONV16(x) {if (_eet_data_words_bigendian) {SWAP16(x); }}
591#define CONV32(x) {if (_eet_data_words_bigendian) {SWAP32(x); }}
592#define CONV64(x) {if (_eet_data_words_bigendian) {SWAP64(x); }}
593
594#define IS_SIMPLE_TYPE(Type) (Type > EET_T_UNKNOW && Type < EET_T_LAST)
595#define IS_POINTER_TYPE(Type) (Type >= EET_T_STRING && Type <= EET_T_NULL)
596
597#define POINTER_TYPE_DECODE(Context, \
598 Ed, \
599 Edd, \
600 Ede, \
601 Echnk, \
602 Type, \
603 Data, \
604 P, \
605 Size, \
606 Label) \
607 do { \
608 int ___r; \
609 ___r = eet_data_get_unknown(Context, \
610 Ed, \
611 Edd, Ede, \
612 Echnk, \
613 Type, EET_G_UNKNOWN, \
614 Data, P, Size); \
615 if (!___r) { goto Label; } \
616 } while (0)
617
618#define STRUCT_TYPE_DECODE(Data_Ret, Context, Ed, Ede, Data, Size, SubSize, Label) \
619 do { \
620 Data_Ret = _eet_data_descriptor_decode(Context, \
621 Ed, \
622 Ede, \
623 Data, \
624 Size, \
625 SubSize > 0 ? Data_Ret : NULL, \
626 SubSize); \
627 if (!Data_Ret) { goto Label; } \
628 } while (0)
629
630#define EET_I_STRING 1 << 4
631#define EET_I_INLINED_STRING 2 << 4
632#define EET_I_NULL 3 << 4
633
634#define EET_MAGIC_VARIANT 0xF1234BC
635/*---*/
636
637/* CHAR TYPE */
638static int
639eet_data_get_char(const Eet_Dictionary *ed __UNUSED__,
640 const void *src,
641 const void *src_end,
642 void *dst)
643{
644 char *s, *d;
645
646 if (((char *)src + sizeof(char)) > (char *)src_end)
647 return -1;
648
649 s = (char *)src;
650 d = (char *)dst;
651 *d = *s;
652 CONV8(*d);
653 return sizeof(char);
654} /* eet_data_get_char */
655
656static void *
657eet_data_put_char(Eet_Dictionary *ed __UNUSED__,
658 const void *src,
659 int *size_ret)
660{
661 char *s, *d;
662
663 d = (char *)malloc(sizeof(char));
664 if (!d)
665 return NULL;
666
667 s = (char *)src;
668 *d = *s;
669 CONV8(*d);
670 *size_ret = sizeof(char);
671 return d;
672} /* eet_data_put_char */
673
674/* SHORT TYPE */
675static int
676eet_data_get_short(const Eet_Dictionary *ed __UNUSED__,
677 const void *src,
678 const void *src_end,
679 void *dst)
680{
681 short *d;
682
683 if (((char *)src + sizeof(short)) > (char *)src_end)
684 return -1;
685
686 memcpy(dst, src, sizeof(short));
687 d = (short *)dst;
688 CONV16(*d);
689 return sizeof(short);
690} /* eet_data_get_short */
691
692static void *
693eet_data_put_short(Eet_Dictionary *ed __UNUSED__,
694 const void *src,
695 int *size_ret)
696{
697 short *s, *d;
698
699 d = (short *)malloc(sizeof(short));
700 if (!d)
701 return NULL;
702
703 s = (short *)src;
704 *d = *s;
705 CONV16(*d);
706 *size_ret = sizeof(short);
707 return d;
708} /* eet_data_put_short */
709
710/* INT TYPE */
711static inline int
712eet_data_get_int(const Eet_Dictionary *ed __UNUSED__,
713 const void *src,
714 const void *src_end,
715 void *dst)
716{
717 int *d;
718
719 if (((char *)src + sizeof(int)) > (char *)src_end)
720 return -1;
721
722 memcpy(dst, src, sizeof(int));
723 d = (int *)dst;
724 CONV32(*d);
725 return sizeof(int);
726} /* eet_data_get_int */
727
728static void *
729eet_data_put_int(Eet_Dictionary *ed __UNUSED__,
730 const void *src,
731 int *size_ret)
732{
733 int *s, *d;
734
735 d = (int *)malloc(sizeof(int));
736 if (!d)
737 return NULL;
738
739 s = (int *)src;
740 *d = *s;
741 CONV32(*d);
742 *size_ret = sizeof(int);
743 return d;
744} /* eet_data_put_int */
745
746/* LONG LONG TYPE */
747static int
748eet_data_get_long_long(const Eet_Dictionary *ed __UNUSED__,
749 const void *src,
750 const void *src_end,
751 void *dst)
752{
753 unsigned long long *d;
754
755 if (((char *)src + sizeof(unsigned long long)) > (char *)src_end)
756 return -1;
757
758 memcpy(dst, src, sizeof(unsigned long long));
759 d = (unsigned long long *)dst;
760 CONV64(*d);
761 return sizeof(unsigned long long);
762} /* eet_data_get_long_long */
763
764static void *
765eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__,
766 const void *src,
767 int *size_ret)
768{
769 unsigned long long *s, *d;
770
771 d = (unsigned long long *)malloc(sizeof(unsigned long long));
772 if (!d)
773 return NULL;
774
775 s = (unsigned long long *)src;
776 *d = *s;
777 CONV64(*d);
778 *size_ret = sizeof(unsigned long long);
779 return d;
780} /* eet_data_put_long_long */
781
782/* STRING TYPE */
783static inline int
784eet_data_get_string_hash(const Eet_Dictionary *ed,
785 const void *src,
786 const void *src_end)
787{
788 if (ed)
789 {
790 int idx;
791
792 if (eet_data_get_int(ed, src, src_end, &idx) < 0)
793 return -1;
794
795 return eet_dictionary_string_get_hash(ed, idx);
796 }
797
798 return -1;
799} /* eet_data_get_string_hash */
800
801static inline int
802eet_data_get_string(const Eet_Dictionary *ed,
803 const void *src,
804 const void *src_end,
805 void *dst)
806{
807 char *s, **d;
808
809 d = (char **)dst;
810
811 if (ed)
812 {
813 const char *str;
814 int idx;
815
816 if (eet_data_get_int(ed, src, src_end, &idx) < 0)
817 return -1;
818
819 str = eet_dictionary_string_get_char(ed, idx);
820 if (!str)
821 return -1;
822
823 *d = (char *)str;
824 return eet_dictionary_string_get_size(ed, idx);
825 }
826
827 s = (char *)src;
828 if (!s)
829 {
830 *d = NULL;
831 return 0;
832 }
833
834 *d = s;
835 return strlen(s) + 1;
836} /* eet_data_get_string */
837
838static void *
839eet_data_put_string(Eet_Dictionary *ed,
840 const void *src,
841 int *size_ret)
842{
843 char *s, *d;
844 int len;
845
846 if (ed)
847 {
848 const char *str;
849 int idx;
850
851 str = *((const char **)src);
852 if (!str)
853 return NULL;
854
855 idx = eet_dictionary_string_add(ed, str);
856 if (idx == -1)
857 return NULL;
858
859 return eet_data_put_int(ed, &idx, size_ret);
860 }
861
862 s = (char *)(*((char **)src));
863 if (!s)
864 return NULL;
865
866 len = strlen(s);
867 d = malloc(len + 1);
868 if (!d)
869 return NULL;
870
871 memcpy(d, s, len + 1);
872 *size_ret = len + 1;
873 return d;
874} /* eet_data_put_string */
875
876/* ALWAYS INLINED STRING TYPE */
877static int
878eet_data_get_istring(const Eet_Dictionary *ed __UNUSED__,
879 const void *src,
880 const void *src_end,
881 void *dst)
882{
883 return eet_data_get_string(NULL, src, src_end, dst);
884} /* eet_data_get_istring */
885
886static void *
887eet_data_put_istring(Eet_Dictionary *ed __UNUSED__,
888 const void *src,
889 int *size_ret)
890{
891 return eet_data_put_string(NULL, src, size_ret);
892} /* eet_data_put_istring */
893
894/* ALWAYS NULL TYPE */
895static int
896eet_data_get_null(const Eet_Dictionary *ed __UNUSED__,
897 const void *src __UNUSED__,
898 const void *src_end __UNUSED__,
899 void *dst)
900{
901 char **d;
902
903 d = (char **)dst;
904
905 *d = NULL;
906 return 1;
907} /* eet_data_get_null */
908
909static void *
910eet_data_put_null(Eet_Dictionary *ed __UNUSED__,
911 const void *src __UNUSED__,
912 int *size_ret)
913{
914 *size_ret = 0;
915 return NULL;
916} /* eet_data_put_null */
917
918/**
919 * Fast lookups of simple doubles/floats.
920 *
921 * These aren't properly a cache because they don't store pre-calculated
922 * values, but have a so simple math that is almost as fast.
923 */
924static inline int
925_eet_data_float_cache_get(const char *s,
926 int len,
927 float *d)
928{
929 /* fast handle of simple case 0xMp+E*/
930 if ((len == 6) && (s[0] == '0') && (s[1] == 'x') && (s[3] == 'p'))
931 {
932 int mantisse = (s[2] >= 'a') ? (s[2] - 'a' + 10) : (s[2] - '0');
933 int exponent = (s[5] - '0');
934
935 if (s[4] == '+')
936 *d = (float)(mantisse << exponent);
937 else
938 *d = (float)mantisse / (float)(1 << exponent);
939
940 return 1;
941 }
942
943 return 0;
944} /* _eet_data_float_cache_get */
945
946static inline int
947_eet_data_double_cache_get(const char *s,
948 int len,
949 double *d)
950{
951 /* fast handle of simple case 0xMp+E*/
952 if ((len == 6) && (s[0] == '0') && (s[1] == 'x') && (s[3] == 'p'))
953 {
954 int mantisse = (s[2] >= 'a') ? (s[2] - 'a' + 10) : (s[2] - '0');
955 int exponent = (s[5] - '0');
956
957 if (s[4] == '+')
958 *d = (double)(mantisse << exponent);
959 else
960 *d = (double)mantisse / (double)(1 << exponent);
961
962 return 1;
963 }
964
965 return 0;
966} /* _eet_data_double_cache_get */
967
968/* FLOAT TYPE */
969static int
970eet_data_get_float(const Eet_Dictionary *ed,
971 const void *src,
972 const void *src_end,
973 void *dst)
974{
975 float *d;
976 int idx;
977
978 d = (float *)dst;
979 if (!ed)
980 {
981 const char *s, *p;
982 long long mantisse;
983 long exponent;
984 int len;
985
986 s = (const char *)src;
987 p = s;
988 len = 0;
989 while ((p < (const char *)src_end) && (*p != 0)) {len++; p++; }
990
991 if (_eet_data_float_cache_get(s, len, d) != 0)
992 return len + 1;
993
994 if (eina_convert_atod(s, len, &mantisse, &exponent) == EINA_FALSE)
995 return -1;
996
997 *d = (float)ldexp((double)mantisse, exponent);
998
999 return len + 1;
1000 }
1001
1002 if (eet_data_get_int(ed, src, src_end, &idx) < 0)
1003 return -1;
1004
1005 if (!eet_dictionary_string_get_float(ed, idx, d))
1006 return -1;
1007
1008 return 1;
1009} /* eet_data_get_float */
1010
1011static void *
1012eet_data_put_float(Eet_Dictionary *ed,
1013 const void *src,
1014 int *size_ret)
1015{
1016 char buf[128];
1017 int idx;
1018
1019 eina_convert_dtoa((double)(*(float *)src), buf);
1020
1021 if (!ed)
1022 {
1023 char *d;
1024 int len;
1025
1026 len = strlen(buf);
1027 d = malloc(len + 1);
1028 if (!d)
1029 return NULL;
1030
1031 memcpy(d, buf, len + 1);
1032 *size_ret = len + 1;
1033 return d;
1034 }
1035
1036 idx = eet_dictionary_string_add(ed, buf);
1037 if (idx == -1)
1038 return NULL;
1039
1040 return eet_data_put_int(ed, &idx, size_ret);
1041} /* eet_data_put_float */
1042
1043/* DOUBLE TYPE */
1044static int
1045eet_data_get_double(const Eet_Dictionary *ed,
1046 const void *src,
1047 const void *src_end,
1048 void *dst)
1049{
1050 double *d;
1051 int idx;
1052
1053 d = (double *)dst;
1054
1055 if (!ed)
1056 {
1057 const char *s, *p;
1058 long long mantisse = 0;
1059 long exponent = 0;
1060 int len;
1061
1062 s = (const char *)src;
1063 p = s;
1064 len = 0;
1065 while ((p < (const char *)src_end) && (*p != 0)) {len++; p++; }
1066
1067 if (_eet_data_double_cache_get(s, len, d) != 0)
1068 return len + 1;
1069
1070 if (eina_convert_atod(s, len, &mantisse, &exponent) == EINA_FALSE)
1071 return -1;
1072
1073 *d = ldexp((double)mantisse, exponent);
1074
1075 return len + 1;
1076 }
1077
1078 if (eet_data_get_int(ed, src, src_end, &idx) < 0)
1079 return -1;
1080
1081 if (!eet_dictionary_string_get_double(ed, idx, d))
1082 return -1;
1083
1084 return 1;
1085} /* eet_data_get_double */
1086
1087static void *
1088eet_data_put_double(Eet_Dictionary *ed,
1089 const void *src,
1090 int *size_ret)
1091{
1092 char buf[128];
1093 int idx;
1094
1095 eina_convert_dtoa((double)(*(double *)src), buf);
1096
1097 if (!ed)
1098 {
1099 char *d;
1100 int len;
1101
1102 len = strlen(buf);
1103 d = malloc(len + 1);
1104 if (!d)
1105 return NULL;
1106
1107 memcpy(d, buf, len + 1);
1108 *size_ret = len + 1;
1109
1110 return d;
1111 }
1112
1113 idx = eet_dictionary_string_add(ed, buf);
1114 if (idx == -1)
1115 return NULL;
1116
1117 return eet_data_put_int(ed, &idx, size_ret);
1118} /* eet_data_put_double */
1119
1120static int
1121eet_data_get_f32p32(const Eet_Dictionary *ed,
1122 const void *src,
1123 const void *src_end,
1124 void *dst)
1125{
1126 Eina_F32p32 *fp;
1127 int idx;
1128
1129 fp = (Eina_F32p32 *)dst;
1130
1131 if (!ed)
1132 {
1133 const char *s, *p;
1134 int len;
1135
1136 s = (const char *)src;
1137 p = s;
1138 len = 0;
1139 while ((p < (const char *)src_end) && (*p != 0)) { len++; p++; }
1140
1141 if (!(eina_convert_atofp(s, len, fp)))
1142 return -1;
1143
1144 return 1;
1145 }
1146
1147 if (eet_data_get_int(ed, src, src_end, &idx) < 0)
1148 return -1;
1149
1150 if (!eet_dictionary_string_get_fp(ed, idx, fp))
1151 return -1;
1152
1153 return 1;
1154} /* eet_data_get_f32p32 */
1155
1156static void *
1157eet_data_put_f32p32(Eet_Dictionary *ed,
1158 const void *src,
1159 int *size_ret)
1160{
1161 char buf[128];
1162 int idx;
1163
1164 eina_convert_fptoa((Eina_F32p32)(*(Eina_F32p32 *)src), buf);
1165
1166 if (!ed)
1167 {
1168 char *d;
1169 int len;
1170
1171 len = strlen(buf);
1172 d = malloc(len + 1);
1173 if (!d)
1174 return NULL;
1175
1176 memcpy(d, buf, len + 1);
1177 *size_ret = len + 1;
1178
1179 return d;
1180 }
1181
1182 idx = eet_dictionary_string_add(ed, buf);
1183 if (idx == -1)
1184 return NULL;
1185
1186 return eet_data_put_int(ed, &idx, size_ret);
1187} /* eet_data_put_f32p32 */
1188
1189static int
1190eet_data_get_f16p16(const Eet_Dictionary *ed,
1191 const void *src,
1192 const void *src_end,
1193 void *dst)
1194{
1195 Eina_F32p32 tmp;
1196 Eina_F16p16 *fp;
1197
1198 fp = (Eina_F16p16 *)dst;
1199
1200 if (eet_data_get_f32p32(ed, src, src_end, &tmp) < 0)
1201 return -1;
1202
1203 *fp = eina_f32p32_to_f16p16(tmp);
1204 return 1;
1205} /* eet_data_get_f16p16 */
1206
1207static void *
1208eet_data_put_f16p16(Eet_Dictionary *ed,
1209 const void *src,
1210 int *size_ret)
1211{
1212 Eina_F32p32 tmp;
1213
1214 tmp = eina_f16p16_to_f32p32((Eina_F16p16)(*(Eina_F16p16 *)src));
1215 return eet_data_put_f32p32(ed, &tmp, size_ret);
1216} /* eet_data_put_f16p16 */
1217
1218static int
1219eet_data_get_f8p24(const Eet_Dictionary *ed,
1220 const void *src,
1221 const void *src_end,
1222 void *dst)
1223{
1224 Eina_F32p32 tmp;
1225 Eina_F8p24 *fp;
1226
1227 fp = (Eina_F8p24 *)dst;
1228
1229 if (eet_data_get_f32p32(ed, src, src_end, &tmp) < 0)
1230 return -1;
1231
1232 *fp = eina_f32p32_to_f8p24(tmp);
1233 return 1;
1234} /* eet_data_get_f8p24 */
1235
1236static void *
1237eet_data_put_f8p24(Eet_Dictionary *ed,
1238 const void *src,
1239 int *size_ret)
1240{
1241 Eina_F32p32 tmp;
1242
1243 tmp = eina_f8p24_to_f32p32((Eina_F8p24)(*(Eina_F8p24 *)src));
1244 return eet_data_put_f32p32(ed, &tmp, size_ret);
1245} /* eet_data_put_f8p24 */
1246
1247static inline int
1248eet_data_get_type(const Eet_Dictionary *ed,
1249 int type,
1250 const void *src,
1251 const void *src_end,
1252 void *dest)
1253{
1254 int ret;
1255
1256 ret = eet_basic_codec[type - 1].get(ed, src, src_end, dest);
1257 return ret;
1258} /* eet_data_get_type */
1259
1260static inline void *
1261eet_data_put_type(Eet_Dictionary *ed,
1262 int type,
1263 const void *src,
1264 int *size_ret)
1265{
1266 void *ret;
1267
1268 ret = eet_basic_codec[type - 1].put(ed, src, size_ret);
1269 return ret;
1270} /* eet_data_put_type */
1271
1272static inline Eina_Bool
1273eet_data_type_match(int type1,
1274 int type2)
1275{
1276 if (type1 == type2)
1277 return EINA_TRUE;
1278
1279 /* Note: All floating point type are equivalent and could be read
1280 without problem by any other floating point getter. */
1281 switch (type1)
1282 {
1283 case EET_T_FLOAT:
1284 case EET_T_DOUBLE:
1285 case EET_T_F32P32:
1286 case EET_T_F16P16:
1287 case EET_T_F8P24:
1288 switch (type2)
1289 {
1290 case EET_T_FLOAT:
1291 case EET_T_DOUBLE:
1292 case EET_T_F32P32:
1293 case EET_T_F16P16:
1294 case EET_T_F8P24:
1295 return EINA_TRUE;
1296
1297 default:
1298 break;
1299 } /* switch */
1300 break;
1301
1302 default:
1303 break;
1304 } /* switch */
1305
1306 return EINA_FALSE;
1307} /* eet_data_type_match */
1308
1309/* chunk format...
1310 *
1311 * char[4] = "CHnK"; // untyped data ... or
1312 * char[4] = "CHKx"; // typed data - x == type
1313 *
1314 * int = chunk size (including magic string);
1315 * char[] = chunk magic/name string (0 byte terminated);
1316 * ... sub-chunks (a chunk can contain chuncks recusrively) ...
1317 * or
1318 * ... payload data ...
1319 *
1320 */
1321
1322static inline void
1323eet_data_chunk_get(const Eet_Dictionary *ed,
1324 Eet_Data_Chunk *chnk,
1325 const void *src,
1326 int size)
1327{
1328 const char *s;
1329 int ret1, ret2;
1330
1331 if (!src)
1332 return;
1333
1334 if (size <= 8)
1335 return;
1336
1337 if (!chnk)
1338 return;
1339
1340 s = src;
1341 if (s[2] == 'K')
1342 {
1343 if ((s[0] != 'C') || (s[1] != 'H') || (s[2] != 'K'))
1344 return;
1345
1346 chnk->type = (unsigned char)(s[3]);
1347 if (chnk->type >= EET_I_LIMIT)
1348 {
1349 chnk->group_type =
1350 ((chnk->type - EET_I_LIMIT) & 0xF) + EET_G_UNKNOWN;
1351 switch ((chnk->type - EET_I_LIMIT) & 0xF0)
1352 {
1353#define EET_UNMATCH_TYPE(Type) \
1354case EET_I_ ## Type: chnk->type = EET_T_ ## Type; break;
1355
1356 EET_UNMATCH_TYPE(STRING);
1357 EET_UNMATCH_TYPE(INLINED_STRING);
1358 EET_UNMATCH_TYPE(NULL);
1359
1360 default:
1361 return;
1362 } /* switch */
1363 }
1364 else if (chnk->type > EET_T_LAST)
1365 {
1366 chnk->group_type = chnk->type;
1367 chnk->type = EET_T_UNKNOW;
1368 }
1369 else
1370 chnk->group_type = EET_G_UNKNOWN;
1371 if ((chnk->type >= EET_T_LAST) ||
1372 (chnk->group_type >=
1373 EET_G_LAST))
1374 {
1375 chnk->type = 0;
1376 chnk->group_type = 0;
1377 }
1378 }
1379 else if ((s[0] != 'C') || (s[1] != 'H') || (s[2] != 'n') || (s[3] != 'K'))
1380 return;
1381
1382 ret1 = eet_data_get_type(ed, EET_T_INT, (s + 4), (s + size), &(chnk->size));
1383
1384 if (ret1 <= 0)
1385 return;
1386
1387 if ((chnk->size < 0) || ((chnk->size + 8) > size))
1388 return;
1389
1390 ret2 = eet_data_get_type(ed, EET_T_STRING, (s + 8), (s + size), &(chnk->name));
1391
1392 if (ret2 <= 0)
1393 return;
1394
1395 chnk->len = ret2;
1396
1397 /* Precalc hash */
1398 chnk->hash = eet_data_get_string_hash(ed, (s + 8), (s + size));
1399
1400 if (ed)
1401 {
1402 chnk->data = (char *)src + 4 + ret1 + sizeof(int);
1403 chnk->size -= sizeof(int);
1404 }
1405 else
1406 {
1407 chnk->data = (char *)src + 4 + ret1 + chnk->len;
1408 chnk->size -= chnk->len;
1409 }
1410
1411 return;
1412} /* eet_data_chunk_get */
1413
1414static inline Eet_Data_Chunk *
1415eet_data_chunk_new(void *data,
1416 int size,
1417 const char *name,
1418 int type,
1419 int group_type)
1420{
1421 Eet_Data_Chunk *chnk;
1422
1423 if (!name)
1424 return NULL;
1425
1426 chnk = calloc(1, sizeof(Eet_Data_Chunk));
1427 if (!chnk)
1428 return NULL;
1429
1430 /* Note: Another security, so older eet library could read file
1431 saved with fixed point value. */
1432 if (type == EET_T_F32P32
1433 || type == EET_T_F16P16
1434 || type == EET_T_F8P24)
1435 type = EET_T_DOUBLE;
1436
1437 chnk->name = strdup(name);
1438 chnk->len = strlen(name) + 1;
1439 chnk->size = size;
1440 chnk->data = data;
1441 chnk->type = type;
1442 chnk->group_type = group_type;
1443 return chnk;
1444} /* eet_data_chunk_new */
1445
1446static inline void
1447eet_data_chunk_free(Eet_Data_Chunk *chnk)
1448{
1449 if (chnk->name)
1450 free(chnk->name);
1451
1452 free(chnk);
1453} /* eet_data_chunk_free */
1454
1455static inline Eet_Data_Stream *
1456eet_data_stream_new(void)
1457{
1458 Eet_Data_Stream *ds;
1459
1460 ds = calloc(1, sizeof(Eet_Data_Stream));
1461 if (!ds)
1462 return NULL;
1463
1464 return ds;
1465} /* eet_data_stream_new */
1466
1467static inline void
1468eet_data_stream_free(Eet_Data_Stream *ds)
1469{
1470 if (ds->data)
1471 free(ds->data);
1472
1473 free(ds);
1474} /* eet_data_stream_free */
1475
1476static inline void
1477eet_data_stream_flush(Eet_Data_Stream *ds)
1478{
1479 free(ds);
1480} /* eet_data_stream_flush */
1481
1482static inline void
1483eet_data_stream_write(Eet_Data_Stream *ds,
1484 const void *data,
1485 int size)
1486{
1487 char *p;
1488
1489 if ((ds->pos + size) > ds->size)
1490 {
1491 ds->data = realloc(ds->data, ds->size + size + 512);
1492 if (!ds->data)
1493 {
1494 ds->pos = 0;
1495 ds->size = 0;
1496 return;
1497 }
1498
1499 ds->size = ds->size + size + 512;
1500 }
1501
1502 p = ds->data;
1503 memcpy(p + ds->pos, data, size);
1504 ds->pos += size;
1505} /* eet_data_stream_write */
1506
1507static void
1508eet_data_chunk_put(Eet_Dictionary *ed,
1509 Eet_Data_Chunk *chnk,
1510 Eet_Data_Stream *ds)
1511{
1512 int *size;
1513 void *string;
1514 int s;
1515 int size_ret = 0;
1516 int string_ret = 0;
1517 unsigned char buf[4] = "CHK";
1518
1519 /* disable this check - it will allow empty chunks to be written. this is
1520 * right for corner-cases when y have a struct with empty fields (empty
1521 * strings or empty list ptrs etc.) */
1522 /* if (!chnk->data && chnk->type != EET_T_NULL) return; */
1523 /* chunk head */
1524
1525/* eet_data_stream_write(ds, "CHnK", 4);*/
1526 if (chnk->type != EET_T_UNKNOW)
1527 {
1528 if (chnk->group_type != EET_G_UNKNOWN)
1529 {
1530 int type = EET_I_LIMIT + chnk->group_type - EET_G_UNKNOWN;
1531
1532 switch (chnk->type)
1533 {
1534 /* Only make sense with pointer type. */
1535#define EET_MATCH_TYPE(Type) \
1536case EET_T_ ## Type: type += EET_I_ ## Type; break;
1537
1538 EET_MATCH_TYPE(STRING);
1539 EET_MATCH_TYPE(INLINED_STRING);
1540 EET_MATCH_TYPE(NULL);
1541
1542 default:
1543 return;
1544 } /* switch */
1545
1546 buf[3] = type;
1547 }
1548 else
1549 buf[3] = chnk->type;
1550 }
1551 else
1552 buf[3] = chnk->group_type;
1553
1554 string = eet_data_put_string(ed, &chnk->name, &string_ret);
1555 if (!string)
1556 return;
1557
1558 /* size of chunk payload data + name */
1559 s = chnk->size + string_ret;
1560 size = eet_data_put_int(ed, &s, &size_ret);
1561
1562 /* FIXME: If something goes wrong the resulting file will be corrupted. */
1563 if (!size)
1564 goto on_error;
1565
1566 eet_data_stream_write(ds, buf, 4);
1567
1568 /* write chunk length */
1569 eet_data_stream_write(ds, size, size_ret);
1570
1571 /* write chunk name */
1572 eet_data_stream_write(ds, string, string_ret);
1573
1574 /* write payload */
1575 if (chnk->data)
1576 eet_data_stream_write(ds, chnk->data, chnk->size);
1577
1578 free(string);
1579on_error:
1580 free(size);
1581} /* eet_data_chunk_put */
1582
1583/*---*/
1584
1585static void
1586_eet_descriptor_hash_new(Eet_Data_Descriptor *edd)
1587{
1588 int i;
1589
1590 edd->elements.hash.size = 1 << 6;
1591 edd->elements.hash.buckets = calloc(
1592 1,
1593 sizeof(Eet_Data_Descriptor_Hash) *
1594 edd->elements.hash.size);
1595 for (i = 0; i < edd->elements.num; i++)
1596 {
1597 Eet_Data_Element *ede;
1598 int hash;
1599
1600 ede = &(edd->elements.set[i]);
1601 hash = _eet_hash_gen((char *)ede->name, 6);
1602 if (!edd->elements.hash.buckets[hash].element)
1603 edd->elements.hash.buckets[hash].element = ede;
1604 else
1605 {
1606 Eet_Data_Descriptor_Hash *bucket;
1607
1608 bucket = calloc(1, sizeof(Eet_Data_Descriptor_Hash));
1609 bucket->element = ede;
1610 bucket->next = edd->elements.hash.buckets[hash].next;
1611 edd->elements.hash.buckets[hash].next = bucket;
1612 }
1613 }
1614} /* _eet_descriptor_hash_new */
1615
1616static void
1617_eet_descriptor_hash_free(Eet_Data_Descriptor *edd)
1618{
1619 int i;
1620
1621 for (i = 0; i < edd->elements.hash.size; i++)
1622 {
1623 Eet_Data_Descriptor_Hash *bucket, *pbucket;
1624
1625 bucket = edd->elements.hash.buckets[i].next;
1626 while (bucket)
1627 {
1628 pbucket = bucket;
1629 bucket = bucket->next;
1630 free(pbucket);
1631 }
1632 }
1633 if (edd->elements.hash.buckets)
1634 free(edd->elements.hash.buckets);
1635} /* _eet_descriptor_hash_free */
1636
1637static Eet_Data_Element *
1638_eet_descriptor_hash_find(Eet_Data_Descriptor *edd,
1639 char *name,
1640 int hash)
1641{
1642 Eet_Data_Descriptor_Hash *bucket;
1643
1644 if (hash < 0)
1645 hash = _eet_hash_gen(name, 6);
1646 else
1647 hash &= 0x3f;
1648
1649 if (!edd->elements.hash.buckets[hash].element)
1650 return NULL; /*
1651 When we use the dictionary as a source for chunk name, we will always
1652 have the same pointer in name. It's a good idea to just compare pointer
1653 instead of running strcmp on both string.
1654 */
1655
1656 if (edd->elements.hash.buckets[hash].element->directory_name_ptr == name)
1657 return edd->elements.hash.buckets[hash].element;
1658
1659 if (!strcmp(edd->elements.hash.buckets[hash].element->name, name))
1660 {
1661 edd->elements.hash.buckets[hash].element->directory_name_ptr = name;
1662 return edd->elements.hash.buckets[hash].element;
1663 }
1664
1665 bucket = edd->elements.hash.buckets[hash].next;
1666 while (bucket)
1667 {
1668 if (bucket->element->directory_name_ptr == name)
1669 return bucket->element;
1670
1671 if (!strcmp(bucket->element->name, name))
1672 {
1673 bucket->element->directory_name_ptr = name;
1674 return bucket->element;
1675 }
1676
1677 bucket = bucket->next;
1678 }
1679 return NULL;
1680} /* _eet_descriptor_hash_find */
1681
1682static void *
1683_eet_mem_alloc(size_t size)
1684{
1685 return calloc(1, size);
1686} /* _eet_mem_alloc */
1687
1688static void
1689_eet_mem_free(void *mem)
1690{
1691 free(mem);
1692} /* _eet_mem_free */
1693
1694static char *
1695_eet_str_alloc(const char *str)
1696{
1697 return strdup(str);
1698} /* _eet_str_alloc */
1699
1700static void
1701_eet_str_free(const char *str)
1702{
1703 free((char *)str);
1704} /* _eet_str_free */
1705
1706static Eina_Hash *
1707_eet_eina_hash_add_alloc(Eina_Hash *hash,
1708 const char *key,
1709 void *data)
1710{
1711 if (!hash)
1712 hash = eina_hash_string_small_new(NULL);
1713
1714 if (!hash)
1715 return NULL;
1716
1717 eina_hash_add(hash, key, data);
1718 return hash;
1719} /* _eet_eina_hash_add_alloc */
1720
1721static Eina_Hash *
1722_eet_eina_hash_direct_add_alloc(Eina_Hash *hash,
1723 const char *key,
1724 void *data)
1725{
1726 if (!hash)
1727 hash = eina_hash_string_small_new(NULL);
1728
1729 if (!hash)
1730 return NULL;
1731
1732 eina_hash_direct_add(hash, key, data);
1733 return hash;
1734} /* _eet_eina_hash_direct_add_alloc */
1735
1736static char *
1737_eet_str_direct_alloc(const char *str)
1738{
1739 return (char *)str;
1740} /* _eet_str_direct_alloc */
1741
1742static void
1743_eet_str_direct_free(const char *str __UNUSED__)
1744{
1745} /* _eet_str_direct_free */
1746
1747static void
1748_eet_eina_hash_foreach(void *hash,
1749 Eina_Hash_Foreach cb,
1750 void *fdata)
1751{
1752 if (hash)
1753 eina_hash_foreach(hash, cb, fdata);
1754} /* _eet_eina_hash_foreach */
1755
1756static void
1757_eet_eina_hash_free(void *hash)
1758{
1759 if (hash)
1760 eina_hash_free(hash);
1761} /* _eet_eina_hash_free */
1762
1763/*---*/
1764EAPI Eina_Bool
1765eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc,
1766 /* When we change the structure content in the future, we need to handle old structure type too */
1767 unsigned int eddc_size,
1768 const char *name,
1769 int size)
1770{
1771 if (!eddc || !name || eddc_size != sizeof (Eet_Data_Descriptor_Class))
1772 return EINA_FALSE;
1773
1774 eddc->name = name;
1775 eddc->size = size;
1776 eddc->version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
1777
1778 eddc->func.mem_alloc = _eet_mem_alloc;
1779 eddc->func.mem_free = _eet_mem_free;
1780 eddc->func.str_alloc = (char *(*)(const char *))eina_stringshare_add;
1781 eddc->func.str_free = eina_stringshare_del;
1782 eddc->func.list_next = (void *(*)(void *))eina_list_next;
1783 eddc->func.list_append = (void *(*)(void *, void *))eina_list_append;
1784 eddc->func.list_data = (void *(*)(void *))eina_list_data_get;
1785 eddc->func.list_free = (void *(*)(void *))eina_list_free;
1786 eddc->func.hash_foreach = (void (*)(void *, int (*)(void *, const char *, void *, void *), void *))_eet_eina_hash_foreach;
1787 eddc->func.hash_add = (void *(*)(void *, const char *, void *))_eet_eina_hash_add_alloc;
1788 eddc->func.hash_free = (void (*)(void *))_eet_eina_hash_free;
1789
1790 /* This will cause an ABI incompatibility */
1791 eddc->func.array_alloc = _eet_mem_alloc;
1792 eddc->func.array_free = _eet_mem_free;
1793
1794 return EINA_TRUE;
1795} /* eet_eina_stream_data_descriptor_class_set */
1796
1797EAPI Eina_Bool
1798eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc,
1799 /* When we change the structure content in the future, we need to handle old structure type too */
1800 unsigned int eddc_size,
1801 const char *name,
1802 int size)
1803{
1804 if (!eet_eina_stream_data_descriptor_class_set(eddc, eddc_size, name, size))
1805 return EINA_FALSE;
1806
1807 eddc->version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
1808
1809 eddc->func.hash_add = (void *(*)(void *, const char *, void *))_eet_eina_hash_direct_add_alloc;
1810 eddc->func.str_direct_alloc = _eet_str_direct_alloc;
1811 eddc->func.str_direct_free = _eet_str_direct_free;
1812
1813 return EINA_TRUE;
1814} /* eet_eina_file_data_descriptor_class_set */
1815
1816static Eet_Data_Descriptor *
1817_eet_data_descriptor_new(const Eet_Data_Descriptor_Class *eddc,
1818 int version)
1819{
1820 Eet_Data_Descriptor *edd;
1821
1822 if (!eddc)
1823 return NULL;
1824
1825 edd = calloc(1, sizeof (Eet_Data_Descriptor));
1826 if (!edd)
1827 return NULL;
1828
1829 edd->name = eddc->name;
1830 edd->ed = NULL;
1831 edd->size = eddc->size;
1832 edd->func.mem_alloc = _eet_mem_alloc;
1833 edd->func.mem_free = _eet_mem_free;
1834 edd->func.str_alloc = _eet_str_alloc;
1835 edd->func.str_free = _eet_str_free;
1836 if (eddc->func.mem_alloc)
1837 edd->func.mem_alloc = eddc->func.mem_alloc;
1838
1839 if (eddc->func.mem_free)
1840 edd->func.mem_free = eddc->func.mem_free;
1841
1842 if (eddc->func.str_alloc)
1843 edd->func.str_alloc = eddc->func.str_alloc;
1844
1845 if (eddc->func.str_free)
1846 edd->func.str_free = eddc->func.str_free;
1847
1848 edd->func.list_next = eddc->func.list_next;
1849 edd->func.list_append = eddc->func.list_append;
1850 edd->func.list_data = eddc->func.list_data;
1851 edd->func.list_free = eddc->func.list_free;
1852 edd->func.hash_foreach = eddc->func.hash_foreach;
1853 edd->func.hash_add = eddc->func.hash_add;
1854 edd->func.hash_free = eddc->func.hash_free;
1855
1856 if (eddc->version > 1 && version > 1)
1857 {
1858 edd->func.str_direct_alloc = eddc->func.str_direct_alloc;
1859 edd->func.str_direct_free = eddc->func.str_direct_free;
1860 }
1861
1862 if (eddc->version > 2)
1863 {
1864 edd->func.type_get = eddc->func.type_get;
1865 edd->func.type_set = eddc->func.type_set;
1866 }
1867
1868 if (eddc->version > 3)
1869 {
1870 edd->func.array_alloc = eddc->func.array_alloc;
1871 edd->func.array_free = eddc->func.array_free;
1872 }
1873
1874 return edd;
1875} /* _eet_data_descriptor_new */
1876
1877EAPI Eet_Data_Descriptor *
1878eet_data_descriptor_new(const char *name,
1879 int size,
1880 Eet_Descriptor_List_Next_Callback func_list_next,
1881 Eet_Descriptor_List_Append_Callback func_list_append,
1882 Eet_Descriptor_List_Data_Callback func_list_data,
1883 Eet_Descriptor_List_Free_Callback func_list_free,
1884 Eet_Descriptor_Hash_Foreach_Callback func_hash_foreach,
1885 Eet_Descriptor_Hash_Add_Callback func_hash_add,
1886 Eet_Descriptor_Hash_Free_Callback func_hash_free)
1887{
1888 Eet_Data_Descriptor_Class eddc;
1889
1890 if (!name)
1891 return NULL;
1892
1893 memset(&eddc, 0, sizeof (Eet_Data_Descriptor_Class));
1894
1895 eddc.name = name;
1896 eddc.size = size;
1897 eddc.version = 0;
1898
1899 eddc.func.list_next = func_list_next;
1900 eddc.func.list_append = func_list_append;
1901 eddc.func.list_data = func_list_data;
1902 eddc.func.list_free = func_list_free;
1903 eddc.func.hash_foreach = func_hash_foreach;
1904 eddc.func.hash_add = func_hash_add;
1905 eddc.func.hash_free = func_hash_free;
1906
1907 return _eet_data_descriptor_new(&eddc, 0);
1908} /* eet_data_descriptor_new */
1909
1910EAPI Eet_Data_Descriptor *
1911eet_data_descriptor2_new(const Eet_Data_Descriptor_Class *eddc)
1912{
1913 return _eet_data_descriptor_new(eddc, 1);
1914} /* eet_data_descriptor2_new */
1915
1916EAPI Eet_Data_Descriptor *
1917eet_data_descriptor3_new(const Eet_Data_Descriptor_Class *eddc)
1918{
1919 return _eet_data_descriptor_new(eddc, 2);
1920} /* eet_data_descriptor3_new */
1921
1922EAPI Eet_Data_Descriptor *
1923eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class *eddc)
1924{
1925 return _eet_data_descriptor_new(eddc, 1);
1926} /* eet_data_descriptor_stream_new */
1927
1928EAPI Eet_Data_Descriptor *
1929eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class *eddc)
1930{
1931 return _eet_data_descriptor_new(eddc, 2);
1932} /* eet_data_descriptor_file_new */
1933
1934EAPI void
1935eet_data_descriptor_free(Eet_Data_Descriptor *edd)
1936{
1937 if (!edd)
1938 return;
1939
1940 _eet_descriptor_hash_free(edd);
1941 if (edd->elements.set)
1942 free(edd->elements.set);
1943
1944 free(edd);
1945} /* eet_data_descriptor_free */
1946
1947EAPI void
1948eet_data_descriptor_element_add(Eet_Data_Descriptor *edd,
1949 const char *name,
1950 int type,
1951 int group_type,
1952 int offset,
1953 int count,
1954/* int counter_offset, */
1955 const char *counter_name /* FIXME: Useless should go on a major release */,
1956 Eet_Data_Descriptor *subtype)
1957{
1958 Eet_Data_Element *ede;
1959 Eet_Data_Element *tmp;
1960
1961 /* UNION, VARIANT type would not work with simple type, we need a way to map the type. */
1962 if ((group_type == EET_G_UNION
1963 || group_type == EET_G_VARIANT)
1964 &&
1965 (type != EET_T_UNKNOW
1966 || !subtype
1967 || !subtype->func.type_get
1968 || !subtype->func.type_set))
1969 return;
1970
1971 /* VARIANT type will only work if the map only contains EET_G_*, but not UNION, VARIANT and ARRAY. */
1972 if (group_type == EET_G_VARIANT)
1973 {
1974 int i;
1975
1976 for (i = 0; i < subtype->elements.num; ++i)
1977 if (subtype->elements.set[i].type != EET_T_UNKNOW
1978 && subtype->elements.set[i].group_type > EET_G_VAR_ARRAY
1979 && subtype->elements.set[i].group_type < EET_G_UNION)
1980 return;
1981
1982 subtype->unified_type = EINA_TRUE;
1983 }
1984
1985 if (subtype
1986 && subtype->unified_type
1987 && (type != EET_T_UNKNOW
1988 || group_type < EET_G_UNION))
1989 return;
1990
1991 /* Sanity check done, let allocate ! */
1992 edd->elements.num++;
1993 tmp = realloc(edd->elements.set, edd->elements.num * sizeof(Eet_Data_Element));
1994 if (!tmp)
1995 return;
1996
1997 edd->elements.set = tmp;
1998 ede = &(edd->elements.set[edd->elements.num - 1]);
1999 ede->name = name;
2000 ede->directory_name_ptr = NULL;
2001
2002 /*
2003 * We do a special case when we do list,hash or whatever group of simple type.
2004 * Instead of handling it in encode/decode/dump/undump, we create an
2005 * implicit structure with only the simple type.
2006 */
2007 if ((group_type > EET_G_UNKNOWN)
2008 && (group_type < EET_G_LAST)
2009 && (((type > EET_T_UNKNOW) && (type < EET_T_STRING))
2010 || ((type > EET_T_NULL) && (type < EET_T_LAST)))
2011 && (!subtype))
2012 {
2013 subtype = calloc(1, sizeof (Eet_Data_Descriptor));
2014 if (!subtype)
2015 return;
2016
2017 subtype->name = "implicit";
2018 subtype->size = eet_basic_codec[type - 1].size;
2019 memcpy(&subtype->func, &edd->func, sizeof(subtype->func));
2020
2021 eet_data_descriptor_element_add(subtype,
2022 eet_basic_codec[type - 1].name,
2023 type,
2024 EET_G_UNKNOWN,
2025 0,
2026 0,
2027 /* 0, */ NULL,
2028 NULL);
2029 type = EET_T_UNKNOW;
2030 }
2031
2032 ede->type = type;
2033 ede->group_type = group_type;
2034 ede->offset = offset;
2035 ede->count = count;
2036 /* FIXME: For the time being, VAR_ARRAY, UNION and VARIANT will put the counter_offset in count. */
2037 ede->counter_offset = count;
2038/* ede->counter_offset = counter_offset; */
2039 ede->counter_name = counter_name;
2040
2041 ede->subtype = subtype;
2042} /* eet_data_descriptor_element_add */
2043
2044EAPI void *
2045eet_data_read_cipher(Eet_File *ef,
2046 Eet_Data_Descriptor *edd,
2047 const char *name,
2048 const char *cipher_key)
2049{
2050 const Eet_Dictionary *ed = NULL;
2051 const void *data = NULL;
2052 void *data_dec;
2053 Eet_Free_Context context;
2054 int required_free = 0;
2055 int size;
2056
2057 ed = eet_dictionary_get(ef);
2058
2059 if (!cipher_key)
2060 data = eet_read_direct(ef, name, &size);
2061
2062 if (!data)
2063 {
2064 required_free = 1;
2065 data = eet_read_cipher(ef, name, &size, cipher_key);
2066 if (!data)
2067 return NULL;
2068 }
2069
2070 eet_free_context_init(&context);
2071 data_dec = _eet_data_descriptor_decode(&context, ed, edd, data, size, NULL, 0);
2072 eet_free_context_shutdown(&context);
2073
2074 if (required_free)
2075 free((void *)data);
2076
2077 return data_dec;
2078} /* eet_data_read_cipher */
2079
2080EAPI Eet_Node *
2081eet_data_node_read_cipher(Eet_File *ef,
2082 const char *name,
2083 const char *cipher_key)
2084{
2085 const Eet_Dictionary *ed = NULL;
2086 const void *data = NULL;
2087 Eet_Node *result;
2088 Eet_Free_Context context;
2089 int required_free = 0;
2090 int size;
2091
2092 ed = eet_dictionary_get(ef);
2093
2094 if (!cipher_key)
2095 data = eet_read_direct(ef, name, &size);
2096
2097 if (!data)
2098 {
2099 required_free = 1;
2100 data = eet_read_cipher(ef, name, &size, cipher_key);
2101 if (!data)
2102 return NULL;
2103 }
2104
2105 eet_free_context_init(&context);
2106 result = _eet_data_descriptor_decode(&context, ed, NULL, data, size, NULL, 0);
2107 eet_free_context_shutdown(&context);
2108
2109 if (required_free)
2110 free((void *)data);
2111
2112 return result;
2113} /* eet_data_node_read_cipher */
2114
2115EAPI void *
2116eet_data_read(Eet_File *ef,
2117 Eet_Data_Descriptor *edd,
2118 const char *name)
2119{
2120 return eet_data_read_cipher(ef, edd, name, NULL);
2121} /* eet_data_read */
2122
2123EAPI int
2124eet_data_write_cipher(Eet_File *ef,
2125 Eet_Data_Descriptor *edd,
2126 const char *name,
2127 const char *cipher_key,
2128 const void *data,
2129 int compress)
2130{
2131 Eet_Dictionary *ed;
2132 void *data_enc;
2133 int size;
2134 int val;
2135
2136 ed = eet_dictionary_get(ef);
2137
2138 data_enc = _eet_data_descriptor_encode(ed, edd, data, &size);
2139 if (!data_enc)
2140 return 0;
2141
2142 val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key);
2143 free(data_enc);
2144 return val;
2145} /* eet_data_write_cipher */
2146
2147EAPI int
2148eet_data_write(Eet_File *ef,
2149 Eet_Data_Descriptor *edd,
2150 const char *name,
2151 const void *data,
2152 int compress)
2153{
2154 return eet_data_write_cipher(ef, edd, name, NULL, data, compress);
2155} /* eet_data_write */
2156
2157static void
2158eet_free_context_init(Eet_Free_Context *context)
2159{
2160 unsigned int i = 0;
2161
2162 memset(context, 0, sizeof (Eet_Free_Context));
2163 for (i = 0; i < EET_FREE_COUNT; ++i)
2164 {
2165 eina_array_step_set(&context->freelist.list[i],
2166 sizeof (context->freelist.list[i]),
2167 32);
2168 eina_array_step_set(&context->freelist_array.list[i],
2169 sizeof (context->freelist.list[i]),
2170 32);
2171 eina_array_step_set(&context->freelist_list.list[i],
2172 sizeof (context->freelist.list[i]),
2173 32);
2174 eina_array_step_set(&context->freelist_hash.list[i],
2175 sizeof (context->freelist.list[i]),
2176 32);
2177 eina_array_step_set(&context->freelist_str.list[i],
2178 sizeof (context->freelist.list[i]),
2179 32);
2180 eina_array_step_set(&context->freelist_direct_str.list[i],
2181 sizeof (context->freelist.list[i]),
2182 32);
2183 }
2184}
2185
2186static void
2187eet_free_context_shutdown(Eet_Free_Context *context)
2188{
2189 unsigned int i = 0;
2190
2191 for (i = 0; i < EET_FREE_COUNT; ++i)
2192 {
2193 eina_array_flush(&context->freelist.list[i]);
2194 eina_array_flush(&context->freelist_array.list[i]);
2195 eina_array_flush(&context->freelist_list.list[i]);
2196 eina_array_flush(&context->freelist_hash.list[i]);
2197 eina_array_flush(&context->freelist_str.list[i]);
2198 eina_array_flush(&context->freelist_direct_str.list[i]);
2199 }
2200}
2201
2202static int
2203_eet_free_hash(void *data)
2204{
2205#ifdef _WIN64
2206 __int64 ptr = (UINT_PTR)data;
2207#else /* ifdef _WIN64 */
2208 unsigned long ptr = (unsigned long)(data);
2209#endif /* ifdef _WIN64 */
2210 int hash;
2211
2212 hash = ptr;
2213 hash ^= ptr >> 8;
2214 hash ^= ptr >> 16;
2215 hash ^= ptr >> 24;
2216
2217#if defined (_WIN64) || ((!defined (_WIN32)) && (LONG_BIT != 32))
2218 hash ^= ptr >> 32;
2219 hash ^= ptr >> 40;
2220 hash ^= ptr >> 48;
2221 hash ^= ptr >> 56;
2222#endif /* if defined (_WIN64) || ((!defined (_WIN32)) && (LONG_BIT != 32)) */
2223
2224 return hash & 0xFF;
2225} /* _eet_free_hash */
2226
2227static void
2228_eet_free_add(Eet_Free *ef,
2229 void *data)
2230{
2231 void *track;
2232 Eina_Array_Iterator it;
2233 unsigned int i;
2234 int hash;
2235
2236 hash = _eet_free_hash(data);
2237
2238 EINA_ARRAY_ITER_NEXT(&ef->list[hash], i, track, it)
2239 if (track == data)
2240 return;
2241
2242 eina_array_push(&ef->list[hash], data);
2243} /* _eet_free_add */
2244
2245#if 0
2246static void
2247_eet_free_del(Eet_Free *ef,
2248 void *data)
2249{
2250 void *track;
2251 Eina_Array_Iterator it;
2252 unsigned int i;
2253 int hash;
2254
2255 hash = _eet_free_hash(data);
2256
2257 EINA_ARRAY_ITER_NEXT(&ef->list[hash], i, track, it)
2258 if (track == data)
2259 {
2260 eina_array_data_set(&ef->list[hash], i, NULL);
2261 return;
2262 }
2263}
2264
2265#endif
2266
2267static void
2268_eet_free_reset(Eet_Free *ef)
2269{
2270 unsigned int i;
2271
2272 if (ef->ref > 0)
2273 return;
2274
2275 for (i = 0; i < EET_FREE_COUNT; ++i)
2276 eina_array_clean(&ef->list[i]);
2277} /* _eet_free_reset */
2278
2279static void
2280_eet_free_ref(Eet_Free *ef)
2281{
2282 ef->ref++;
2283} /* _eet_free_ref */
2284
2285static void
2286_eet_free_unref(Eet_Free *ef)
2287{
2288 ef->ref--;
2289} /* _eet_free_unref */
2290
2291#define _eet_freelist_add(Ctx, Data) _eet_free_add(&Ctx->freelist, Data);
2292#define _eet_freelist_del(Ctx, Data) _eet_free_del(&Ctx->freelist, Data);
2293#define _eet_freelist_reset(Ctx) _eet_free_reset(&Ctx->freelist);
2294#define _eet_freelist_ref(Ctx) _eet_free_ref(&Ctx->freelist);
2295#define _eet_freelist_unref(Ctx) _eet_free_unref(&Ctx->freelist);
2296
2297static void
2298_eet_freelist_free(Eet_Free_Context *context,
2299 Eet_Data_Descriptor *edd)
2300{
2301 void *track;
2302 Eina_Array_Iterator it;
2303 unsigned int j;
2304 unsigned int i;
2305
2306 if (context->freelist.ref > 0)
2307 return;
2308
2309 for (j = 0; j < EET_FREE_COUNT; ++j)
2310 EINA_ARRAY_ITER_NEXT(&context->freelist.list[j], i, track, it)
2311 if (track)
2312 {
2313 if (edd)
2314 edd->func.mem_free(track);
2315 else
2316 free(track);
2317 }
2318 _eet_free_reset(&context->freelist);
2319} /* _eet_freelist_free */
2320
2321#define _eet_freelist_array_add(Ctx, Data) _eet_free_add(&Ctx->freelist_array, Data);
2322#define _eet_freelist_array_del(Ctx, Data) _eet_free_del(&Ctx->freelist_array, Data);
2323#define _eet_freelist_array_reset(Ctx) _eet_free_reset(&Ctx->freelist_array);
2324#define _eet_freelist_array_ref(Ctx) _eet_free_ref(&Ctx->freelist_array);
2325#define _eet_freelist_array_unref(Ctx) _eet_free_unref(&Ctx->freelist_array);
2326
2327static void
2328_eet_freelist_array_free(Eet_Free_Context *context,
2329 Eet_Data_Descriptor *edd)
2330{
2331 void *track;
2332 Eina_Array_Iterator it;
2333 unsigned int j;
2334 unsigned int i;
2335
2336 if (context->freelist_array.ref > 0)
2337 return;
2338
2339 for (j = 0; j < EET_FREE_COUNT; ++j)
2340 EINA_ARRAY_ITER_NEXT(&context->freelist_array.list[j], i, track, it)
2341 if (track)
2342 {
2343 if (edd)
2344 {
2345 if (edd->func.array_free)
2346 edd->func.array_free(track);
2347 else
2348 edd->func.mem_free(track);
2349 }
2350 else
2351 free(track);
2352 }
2353 _eet_free_reset(&context->freelist_array);
2354} /* _eet_freelist_array_free */
2355
2356#define _eet_freelist_list_add(Ctx, Data) _eet_free_add(&Ctx->freelist_list, Data);
2357#define _eet_freelist_list_del(Ctx, Data) _eet_free_del(&Ctx->freelist_list, Data);
2358#define _eet_freelist_list_reset(Ctx) _eet_free_reset(&Ctx->freelist_list);
2359#define _eet_freelist_list_ref(Ctx) _eet_free_ref(&Ctx->freelist_list);
2360#define _eet_freelist_list_unref(Ctx) _eet_free_unref(&Ctx->freelist_list);
2361
2362static void
2363_eet_freelist_list_free(Eet_Free_Context *context,
2364 Eet_Data_Descriptor *edd)
2365{
2366 void *track;
2367 Eina_Array_Iterator it;
2368 unsigned int j;
2369 unsigned int i;
2370
2371 if (context->freelist_list.ref > 0)
2372 return;
2373
2374 for (j = 0; j < EET_FREE_COUNT; ++j)
2375 EINA_ARRAY_ITER_NEXT(&context->freelist_list.list[j], i, track, it)
2376 if (track)
2377 {
2378 if (edd)
2379 edd->func.list_free(*((void **)(track)));
2380 }
2381 _eet_free_reset(&context->freelist_list);
2382} /* _eet_freelist_list_free */
2383
2384#define _eet_freelist_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_str, Data);
2385#define _eet_freelist_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_str, Data);
2386#define _eet_freelist_str_reset(Ctx) _eet_free_reset(&Ctx->freelist_str);
2387#define _eet_freelist_str_ref(Ctx) _eet_free_ref(&Ctx->freelist_str);
2388#define _eet_freelist_str_unref(Ctx) _eet_free_unref(&Ctx->freelist_str);
2389
2390static void
2391_eet_freelist_str_free(Eet_Free_Context *context,
2392 Eet_Data_Descriptor *edd)
2393{
2394 void *track;
2395 Eina_Array_Iterator it;
2396 unsigned int j;
2397 unsigned int i;
2398
2399 if (context->freelist_str.ref > 0)
2400 return;
2401
2402 for (j = 0; j < EET_FREE_COUNT; ++j)
2403 EINA_ARRAY_ITER_NEXT(&context->freelist_str.list[j], i, track, it)
2404 if (track)
2405 {
2406 if (edd)
2407 edd->func.str_free(track);
2408 else
2409 free(track);
2410 }
2411 _eet_free_reset(&context->freelist_str);
2412} /* _eet_freelist_str_free */
2413
2414#define _eet_freelist_direct_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_direct_str, Data);
2415#define _eet_freelist_direct_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_direct_str, Data);
2416#define _eet_freelist_direct_str_reset(Ctx) _eet_free_reset(&Ctx->freelist_direct_str);
2417#define _eet_freelist_direct_str_ref(Ctx) _eet_free_ref(&Ctx->freelist_direct_str);
2418#define _eet_freelist_direct_str_unref(Ctx) _eet_free_unref(&Ctx->freelist_direct_str);
2419
2420static void
2421_eet_freelist_direct_str_free(Eet_Free_Context *context,
2422 Eet_Data_Descriptor *edd)
2423{
2424 void *track;
2425 Eina_Array_Iterator it;
2426 unsigned int j;
2427 unsigned int i;
2428
2429 if (context->freelist_direct_str.ref > 0)
2430 return;
2431
2432 for (j = 0; j < EET_FREE_COUNT; ++j)
2433 EINA_ARRAY_ITER_NEXT(&context->freelist_str.list[j], i, track, it)
2434 if (track)
2435 {
2436 if (edd)
2437 edd->func.str_direct_free(track);
2438 else
2439 free(track);
2440 }
2441 _eet_free_reset(&context->freelist_direct_str);
2442} /* _eet_freelist_direct_str_free */
2443
2444#define _eet_freelist_hash_add(Ctx, Data) _eet_free_add(&Ctx->freelist_hash, Data);
2445#define _eet_freelist_hash_del(Ctx, Data) _eet_free_del(&Ctx->freelist_hash, Data);
2446#define _eet_freelist_hash_reset(Ctx) _eet_free_reset(&Ctx->freelist_hash);
2447#define _eet_freelist_hash_ref(Ctx) _eet_free_ref(&Ctx->freelist_hash);
2448#define _eet_freelist_hash_unref(Ctx) _eet_free_unref(&Ctx->freelist_hash);
2449
2450static void
2451_eet_freelist_hash_free(Eet_Free_Context *context,
2452 Eet_Data_Descriptor *edd)
2453{
2454 void *track;
2455 Eina_Array_Iterator it;
2456 unsigned int j;
2457 unsigned int i;
2458
2459 if (context->freelist_hash.ref > 0)
2460 return;
2461
2462 for (j = 0; j < EET_FREE_COUNT; ++j)
2463 EINA_ARRAY_ITER_NEXT(&context->freelist_hash.list[j], i, track, it)
2464 if (track)
2465 {
2466 if (edd)
2467 edd->func.hash_free(track);
2468 else
2469 free(track);
2470 }
2471 _eet_free_reset(&context->freelist_hash);
2472} /* _eet_freelist_hash_free */
2473
2474static void
2475_eet_freelist_all_ref(Eet_Free_Context *freelist_context)
2476{
2477 _eet_freelist_ref(freelist_context);
2478 _eet_freelist_str_ref(freelist_context);
2479 _eet_freelist_list_ref(freelist_context);
2480 _eet_freelist_hash_ref(freelist_context);
2481 _eet_freelist_direct_str_ref(freelist_context);
2482} /* _eet_freelist_all_ref */
2483
2484static void
2485_eet_freelist_all_unref(Eet_Free_Context *freelist_context)
2486{
2487 _eet_freelist_unref(freelist_context);
2488 _eet_freelist_str_unref(freelist_context);
2489 _eet_freelist_list_unref(freelist_context);
2490 _eet_freelist_hash_unref(freelist_context);
2491 _eet_freelist_direct_str_unref(freelist_context);
2492} /* _eet_freelist_all_unref */
2493
2494static int
2495eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__,
2496 const char *cipher_key,
2497 void *hdata,
2498 void *fdata)
2499{
2500 Eet_Dictionary *ed;
2501 Eet_Data_Encode_Hash_Info *edehi;
2502 Eet_Data_Stream *ds;
2503 Eet_Data_Element *ede;
2504 Eet_Data_Chunk *echnk;
2505 void *data = NULL;
2506 int size;
2507
2508 edehi = fdata;
2509 ede = edehi->ede;
2510 ds = edehi->ds;
2511 ed = edehi->ed;
2512
2513 /* Store key */
2514 data = eet_data_put_type(ed,
2515 EET_T_STRING,
2516 &cipher_key,
2517 &size);
2518 if (data)
2519 {
2520 echnk = eet_data_chunk_new(data,
2521 size,
2522 ede->name,
2523 ede->type,
2524 ede->group_type);
2525 eet_data_chunk_put(ed, echnk, ds);
2526 eet_data_chunk_free(echnk);
2527 free(data);
2528 data = NULL;
2529 }
2530
2531 EET_ASSERT(!((ede->type > EET_T_UNKNOW) && (ede->type < EET_T_STRING)), return );
2532
2533 /* Store data */
2534 if (ede->type >= EET_T_STRING)
2535 eet_data_put_unknown(ed, NULL, ede, ds, &hdata);
2536 else
2537 {
2538 if (ede->subtype)
2539 data = _eet_data_descriptor_encode(ed,
2540 ede->subtype,
2541 hdata,
2542 &size);
2543
2544 if (data)
2545 {
2546 echnk = eet_data_chunk_new(data,
2547 size,
2548 ede->name,
2549 ede->type,
2550 ede->group_type);
2551 eet_data_chunk_put(ed, echnk, ds);
2552 eet_data_chunk_free(echnk);
2553 free(data);
2554 data = NULL;
2555 }
2556 }
2557
2558 return 1;
2559} /* eet_data_descriptor_encode_hash_cb */
2560
2561static char *
2562_eet_data_dump_token_get(const char *src,
2563 int *len)
2564{
2565 const char *p;
2566 char *tok = NULL;
2567 int in_token = 0;
2568 int in_quote = 0;
2569 int tlen = 0, tsize = 0;
2570
2571#define TOK_ADD(x) \
2572 do { \
2573 tlen++; \
2574 if (tlen >= tsize) \
2575 { \
2576 tsize += 32; \
2577 tok = realloc(tok, tsize); \
2578 } \
2579 tok[tlen - 1] = x; \
2580 } while (0)
2581
2582 for (p = src; *len > 0; p++, (*len)--)
2583 {
2584 if (in_token)
2585 {
2586 if (in_quote)
2587 {
2588 if ((p[0] == '\"') && (p > src) && (p[-1] != '\\'))
2589 in_quote = 0;
2590 else if ((p[0] == '\\') && (*len > 1) &&
2591 (p[1] == '\"'))
2592 {
2593/* skip */
2594 }
2595 else if ((p[0] == '\\') && (p > src) && (p[-1] == '\\'))
2596 {
2597/* skip */
2598 }
2599 else if ((p[0] == '\\') && (*len > 1) && (p[1] == 'n'))
2600 {
2601/* skip */
2602 }
2603 else if ((p[0] == 'n') && (p > src) && (p[-1] == '\\'))
2604 TOK_ADD('\n');
2605 else
2606 TOK_ADD(p[0]);
2607 }
2608 else
2609 {
2610 if (p[0] == '\"')
2611 in_quote = 1;
2612 else
2613 {
2614 if ((isspace(p[0])) || (p[0] == ';')) /* token ends here */
2615 {
2616 TOK_ADD(0);
2617 (*len)--;
2618 return tok;
2619 }
2620 else
2621 TOK_ADD(p[0]);
2622 }
2623 }
2624 }
2625 else if (!((isspace(p[0])) || (p[0] == ';')))
2626 {
2627 in_token = 1;
2628 (*len)++;
2629 p--;
2630 }
2631 }
2632 if (in_token)
2633 {
2634 TOK_ADD(0);
2635 return tok;
2636 }
2637
2638 if (tok)
2639 free(tok);
2640
2641 return NULL;
2642} /* _eet_data_dump_token_get */
2643
2644static void
2645eet_data_encode(Eet_Dictionary *ed,
2646 Eet_Data_Stream *ds,
2647 void *data,
2648 const char *name,
2649 int size,
2650 int type,
2651 int group_type)
2652{
2653 Eet_Data_Chunk *echnk;
2654
2655 if (!data)
2656 type = EET_T_NULL;
2657
2658 if (group_type != EET_G_UNKNOWN)
2659 if (type >= EET_T_LAST)
2660 type = EET_T_UNKNOW;
2661
2662 echnk = eet_data_chunk_new(data, size, name, type, group_type);
2663 eet_data_chunk_put(ed, echnk, ds);
2664 eet_data_chunk_free(echnk);
2665 free(data);
2666} /* eet_data_encode */
2667
2668static void *
2669_eet_data_dump_encode(int parent_type,
2670 Eet_Dictionary *ed,
2671 Eet_Node *node,
2672 int *size_ret)
2673{
2674 Eet_Data_Chunk *chnk = NULL;
2675 Eet_Data_Stream *ds;
2676 void *cdata, *data;
2677 int csize, size;
2678 int count;
2679 int child_type;
2680 Eet_Node *n;
2681
2682 if (_eet_data_words_bigendian == -1)
2683 {
2684 unsigned long int v;
2685
2686 v = htonl(0x12345678);
2687 if (v == 0x12345678)
2688 _eet_data_words_bigendian = 1;
2689 else
2690 _eet_data_words_bigendian = 0;
2691 }
2692
2693 if (!node)
2694 return NULL;
2695
2696 ds = eet_data_stream_new();
2697 if (!ds)
2698 return NULL;
2699
2700 switch (node->type)
2701 {
2702 case EET_G_UNKNOWN:
2703 for (n = node->values; n; n = n->next)
2704 {
2705 data = _eet_data_dump_encode(node->type, ed, n, &size);
2706 if (data)
2707 {
2708 eet_data_stream_write(ds, data, size);
2709 free(data);
2710 }
2711 }
2712 break;
2713
2714 case EET_G_ARRAY:
2715 case EET_G_VAR_ARRAY:
2716 for (child_type = EET_T_NULL, n = node->values; n; n = n->next)
2717 {
2718 if (n->type != EET_T_NULL)
2719 {
2720 child_type = n->type;
2721 break;
2722 }
2723 }
2724
2725 data = eet_data_put_type(ed,
2726 EET_T_INT,
2727 &node->count,
2728 &size);
2729 eet_data_encode(ed,
2730 ds,
2731 data,
2732 node->name,
2733 size,
2734 child_type,
2735 node->type);
2736
2737 count = node->count;
2738
2739 for (n = node->values; n; n = n->next)
2740 {
2741 int pos = ds->pos;
2742
2743 switch (n->type)
2744 {
2745 case EET_T_STRING:
2746 case EET_T_INLINED_STRING:
2747 data = eet_data_put_type(ed,
2748 n->type,
2749 &(n->data.value.str),
2750 &size);
2751 if (data)
2752 eet_data_encode(ed,
2753 ds,
2754 data,
2755 node->name,
2756 size,
2757 n->type,
2758 node->type);
2759
2760 break;
2761
2762 case EET_T_NULL:
2763 continue;
2764
2765 default:
2766 data = _eet_data_dump_encode(n->type, ed, n, &size);
2767 eet_data_encode(ed,
2768 ds,
2769 data,
2770 node->name,
2771 size,
2772 n->type,
2773 node->type);
2774 break;
2775 } /* switch */
2776 if (ds->pos != pos)
2777 count--;
2778 }
2779
2780 for (; count; count--)
2781 {
2782 eet_data_encode(ed,
2783 ds,
2784 NULL,
2785 node->name,
2786 0,
2787 EET_T_NULL,
2788 node->type);
2789 }
2790
2791 /* Array is somekind of special case, so we should embed it inside another chunk. */
2792 *size_ret = ds->pos;
2793 cdata = ds->data;
2794
2795 ds->data = NULL;
2796 ds->size = 0;
2797 eet_data_stream_free(ds);
2798
2799 return cdata;
2800 break;
2801
2802 case EET_G_LIST:
2803 for (n = node->values; n; n = n->next)
2804 {
2805 switch (n->type)
2806 {
2807 case EET_T_STRING:
2808 case EET_T_INLINED_STRING:
2809 data = eet_data_put_type(ed,
2810 n->type,
2811 &(n->data.value.str),
2812 &size);
2813 if (data)
2814 eet_data_encode(ed,
2815 ds,
2816 data,
2817 node->name,
2818 size,
2819 n->type,
2820 node->type);
2821
2822 break;
2823
2824 case EET_T_NULL:
2825 continue;
2826
2827 default:
2828 data = _eet_data_dump_encode(node->type, ed, n, &size);
2829 eet_data_encode(ed,
2830 ds,
2831 data,
2832 node->name,
2833 size,
2834 n->type,
2835 node->type);
2836 } /* switch */
2837 }
2838
2839 /* List is another somekind of special case, every chunk is embed inside a list chunk. */
2840 *size_ret = ds->pos;
2841 cdata = ds->data;
2842
2843 ds->data = NULL;
2844 ds->size = 0;
2845 eet_data_stream_free(ds);
2846
2847 return cdata;
2848 break;
2849
2850 case EET_G_HASH:
2851 if (node->key)
2852 {
2853 data = eet_data_put_type(ed,
2854 EET_T_STRING,
2855 &node->key,
2856 &size);
2857 eet_data_encode(ed,
2858 ds,
2859 data,
2860 node->name,
2861 size,
2862 node->type,
2863 node->type);
2864 }
2865 else
2866 /* A Hash without key will not decode correctly. */
2867 return NULL;
2868
2869 for (n = node->values; n; n = n->next)
2870 {
2871 switch (n->type)
2872 {
2873 case EET_T_STRING:
2874 case EET_T_INLINED_STRING:
2875 data = eet_data_put_type(ed,
2876 n->type,
2877 &(n->data.value.str),
2878 &size);
2879 if (data)
2880 eet_data_encode(ed,
2881 ds,
2882 data,
2883 node->name,
2884 size,
2885 n->type,
2886 node->type);
2887
2888 break;
2889
2890 case EET_T_NULL:
2891 continue;
2892
2893 default:
2894 data = _eet_data_dump_encode(node->type, ed, n, &size);
2895 eet_data_encode(ed,
2896 ds,
2897 data,
2898 node->name,
2899 size,
2900 n->type,
2901 node->type);
2902 } /* switch */
2903 }
2904
2905 /* Hash is somekind of special case, so we should embed it inside another chunk. */
2906 *size_ret = ds->pos;
2907 cdata = ds->data;
2908
2909 eet_data_stream_flush(ds);
2910
2911 return cdata;
2912
2913 case EET_T_NULL:
2914 break;
2915
2916#define EET_DATA_NODE_ENCODE(Eet_Type, Type) \
2917case Eet_Type: \
2918 data = eet_data_put_type(ed, node->type, &(node->data.value.Type), &size); \
2919 if (data) \
2920 { \
2921 eet_data_encode(ed, \
2922 ds, \
2923 data, \
2924 node->name, \
2925 size, \
2926 node->type, \
2927 parent_type); \
2928 cdata = ds->data; \
2929 *size_ret = ds->pos; \
2930 eet_data_stream_flush(ds); \
2931 return cdata; \
2932 } /* switch */ \
2933 break;
2934
2935 EET_DATA_NODE_ENCODE(EET_T_CHAR, c);
2936 EET_DATA_NODE_ENCODE(EET_T_SHORT, s);
2937 EET_DATA_NODE_ENCODE(EET_T_INT, i);
2938 EET_DATA_NODE_ENCODE(EET_T_LONG_LONG, l);
2939 EET_DATA_NODE_ENCODE(EET_T_FLOAT, f);
2940 EET_DATA_NODE_ENCODE(EET_T_DOUBLE, d);
2941 EET_DATA_NODE_ENCODE(EET_T_UCHAR, uc);
2942 EET_DATA_NODE_ENCODE(EET_T_USHORT, us);
2943 EET_DATA_NODE_ENCODE(EET_T_UINT, ui);
2944 EET_DATA_NODE_ENCODE(EET_T_ULONG_LONG, ul);
2945 EET_DATA_NODE_ENCODE(EET_T_INLINED_STRING, str);
2946 EET_DATA_NODE_ENCODE(EET_T_STRING, str);
2947
2948 default:
2949 break;
2950 }
2951
2952 if ((node->type >= EET_G_UNKNOWN) && (node->type < EET_G_LAST))
2953 chnk = eet_data_chunk_new(ds->data,
2954 ds->pos,
2955 node->name,
2956 EET_T_UNKNOW,
2957 node->type);
2958 else
2959 chnk = eet_data_chunk_new(ds->data,
2960 ds->pos,
2961 node->name,
2962 node->type,
2963 EET_G_UNKNOWN);
2964
2965 eet_data_stream_flush(ds);
2966
2967 ds = eet_data_stream_new();
2968 eet_data_chunk_put(ed, chnk, ds);
2969 cdata = ds->data;
2970 csize = ds->pos;
2971
2972 eet_data_stream_flush(ds);
2973 *size_ret = csize;
2974
2975 free(chnk->data);
2976 eet_data_chunk_free(chnk);
2977
2978 return cdata;
2979} /* _eet_data_dump_encode */
2980
2981static void *
2982_eet_data_dump_parse(Eet_Dictionary *ed,
2983 int *size_ret,
2984 const char *src,
2985 int size)
2986{
2987 void *cdata = NULL;
2988 const char *p = NULL;
2989#define M_NONE 0
2990#define M_STRUCT 1
2991#define M_ 2
2992 int left, jump;
2993 Eet_Node *node_base = NULL;
2994 Eet_Node *node = NULL;
2995 Eet_Node *n = NULL, *nn = NULL;
2996
2997 /* FIXME; handle parse errors */
2998#define TOK_GET(t) \
2999 jump = left; t = _eet_data_dump_token_get(p, &left); p += jump - left;
3000 left = size;
3001 for (p = src; p < (src + size); )
3002 {
3003 char *tok1, *tok2, *tok3, *tok4;
3004
3005 TOK_GET(tok1);
3006 if (tok1)
3007 {
3008 if (!strcmp(tok1, "group"))
3009 {
3010 TOK_GET(tok2);
3011 if (tok2)
3012 {
3013 TOK_GET(tok3);
3014 if (tok3)
3015 {
3016 TOK_GET(tok4);
3017 if (tok4)
3018 {
3019 if (!strcmp(tok4, "{"))
3020 {
3021/* we have 'group NAM TYP {' */
3022 n = eet_node_new();
3023 if (n)
3024 {
3025 n->parent = node;
3026 if (!node_base)
3027 node_base = n;
3028
3029 if (node)
3030 {
3031/* append node */
3032 if (!node->values)
3033 node->values = n;
3034 else
3035 for (nn = node->values; nn;
3036 nn = nn->next)
3037 {
3038 if (!nn->next)
3039 {
3040 nn->next = n;
3041 break;
3042 }
3043 }
3044 }
3045
3046 n->name = eina_stringshare_add(tok2);
3047 if (!strcmp(tok3, "struct"))
3048 n->type = EET_G_UNKNOWN;
3049 else if (!strcmp(tok3, "array"))
3050 n->type = EET_G_ARRAY;
3051 else if (!strcmp(tok3, "var_array"))
3052 n->type = EET_G_VAR_ARRAY;
3053 else if (!strcmp(tok3, "list"))
3054 n->type = EET_G_LIST;
3055 else if (!strcmp(tok3, "hash"))
3056 n->type = EET_G_HASH;
3057 else
3058 ERR(
3059 "ERROR: group type '%s' invalid.",
3060 tok3);
3061
3062 node = n;
3063 }
3064 }
3065
3066 free(tok4);
3067 }
3068
3069 free(tok3);
3070 }
3071
3072 free(tok2);
3073 }
3074 }
3075 else if (!strcmp(tok1, "value"))
3076 {
3077 TOK_GET(tok2);
3078 if (tok2)
3079 {
3080 TOK_GET(tok3);
3081 if (tok3)
3082 {
3083 TOK_GET(tok4);
3084 if (tok4)
3085 {
3086/* we have 'value NAME TYP XXX' */
3087 if (node_base)
3088 {
3089 n = eet_node_new();
3090 if (n)
3091 {
3092 n->parent = node;
3093/* append node */
3094 if (!node->values)
3095 node->values = n;
3096 else
3097 for (nn = node->values; nn;
3098 nn = nn->next)
3099 {
3100 if (!nn->next)
3101 {
3102 nn->next = n;
3103 break;
3104 }
3105 }
3106
3107 n->name = eina_stringshare_add(tok2);
3108 if (!strcmp(tok3, "char:"))
3109 {
3110 n->type = EET_T_CHAR;
3111 sscanf(tok4, FMT_CHAR,
3112 &(n->data.value.c));
3113 }
3114 else if (!strcmp(tok3, "short:"))
3115 {
3116 n->type = EET_T_SHORT;
3117 sscanf(tok4, "%hi",
3118 &(n->data.value.s));
3119 }
3120 else if (!strcmp(tok3, "int:"))
3121 {
3122 n->type = EET_T_INT;
3123 sscanf(tok4, "%i",
3124 &(n->data.value.i));
3125 }
3126 else if (!strcmp(tok3, "long_long:"))
3127 {
3128 n->type = EET_T_LONG_LONG;
3129 sscanf(tok4, FMT_LONG_LONG,
3130 &(n->data.value.l));
3131 }
3132 else if (!strcmp(tok3, "float:"))
3133 {
3134 n->type = EET_T_FLOAT;
3135 sscanf(tok4, "%f",
3136 &(n->data.value.f));
3137 }
3138 else if (!strcmp(tok3, "double:"))
3139 {
3140 n->type = EET_T_DOUBLE;
3141 sscanf(tok4, "%lf",
3142 &(n->data.value.d));
3143 }
3144 else if (!strcmp(tok3, "uchar:"))
3145 {
3146 n->type = EET_T_UCHAR;
3147 sscanf(tok4, FMT_UCHAR,
3148 &(n->data.value.uc));
3149 }
3150 else if (!strcmp(tok3, "ushort:"))
3151 {
3152 n->type = EET_T_USHORT;
3153 sscanf(tok4, "%hu",
3154 &(n->data.value.us));
3155 }
3156 else if (!strcmp(tok3, "uint:"))
3157 {
3158 n->type = EET_T_UINT;
3159 sscanf(tok4, "%u",
3160 &(n->data.value.ui));
3161 }
3162 else if (!strcmp(tok3, "ulong_long:"))
3163 {
3164 n->type = EET_T_ULONG_LONG;
3165 sscanf(tok4, FMT_ULONG_LONG,
3166 &(n->data.value.ul));
3167 }
3168 else if (!strcmp(tok3, "string:"))
3169 {
3170 n->type = EET_T_STRING;
3171 n->data.value.str =
3172 eina_stringshare_add(tok4);
3173 }
3174 else if (!strcmp(tok3, "inlined:"))
3175 {
3176 n->type = EET_T_INLINED_STRING;
3177 n->data.value.str =
3178 eina_stringshare_add(tok4);
3179 }
3180 else if (!strcmp(tok3, "null"))
3181 {
3182 n->type = EET_T_NULL;
3183 n->data.value.str = NULL;
3184 }
3185 else
3186 ERR(
3187 "ERROR: value type '%s' invalid.",
3188 tok4);
3189 }
3190 }
3191
3192 free(tok4);
3193 }
3194
3195 free(tok3);
3196 }
3197
3198 free(tok2);
3199 }
3200 }
3201 else if (!strcmp(tok1, "key"))
3202 {
3203 TOK_GET(tok2);
3204 if (tok2)
3205 {
3206/* we have 'key NAME' */
3207 if (node)
3208 node->key = eina_stringshare_add(tok2);
3209
3210 free(tok2);
3211 }
3212 }
3213 else if (!strcmp(tok1, "count"))
3214 {
3215 TOK_GET(tok2);
3216 if (tok2)
3217 {
3218/* we have a 'count COUNT' */
3219 if (node)
3220 sscanf(tok2, "%i", &(node->count));
3221
3222 free(tok2);
3223 }
3224 }
3225 else if (!strcmp(tok1, "}"))
3226 /* we have an end of the group */
3227 if (node)
3228 node = node->parent;
3229
3230 free(tok1);
3231 }
3232 }
3233
3234 if (node_base)
3235 {
3236 cdata = _eet_data_dump_encode(EET_G_UNKNOWN, ed, node_base, size_ret);
3237 eet_node_del(node_base);
3238 }
3239
3240 return cdata;
3241} /* _eet_data_dump_parse */
3242
3243#define NEXT_CHUNK(P, Size, Echnk, Ed) \
3244 { \
3245 int __tmp; \
3246 __tmp = Ed ? (int)(sizeof(int) * 2) : Echnk.len + 4; \
3247 P += (4 + Echnk.size + __tmp); \
3248 Size -= (4 + Echnk.size + __tmp); \
3249 }
3250
3251static void *
3252_eet_data_descriptor_decode(Eet_Free_Context *context,
3253 const Eet_Dictionary *ed,
3254 Eet_Data_Descriptor *edd,
3255 const void *data_in,
3256 int size_in,
3257 void *data_out,
3258 int size_out)
3259{
3260 Eet_Node *result = NULL;
3261 void *data = NULL;
3262 char *p;
3263 int size, i;
3264 Eet_Data_Chunk chnk;
3265
3266 if (_eet_data_words_bigendian == -1)
3267 {
3268 unsigned long int v;
3269
3270 v = htonl(0x12345678);
3271 if (v == 0x12345678)
3272 _eet_data_words_bigendian = 1;
3273 else
3274 _eet_data_words_bigendian = 0;
3275 }
3276
3277 if (edd)
3278 {
3279 if (data_out)
3280 {
3281 if (size_out <= edd->size)
3282 data = data_out;
3283 }
3284 else
3285 {
3286 data = edd->func.mem_alloc(edd->size);
3287 }
3288
3289 if (!data)
3290 return NULL;
3291
3292 if (edd->ed != ed)
3293 {
3294 for (i = 0; i < edd->elements.num; i++)
3295 edd->elements.set[i].directory_name_ptr = NULL;
3296 edd->ed = ed;
3297 }
3298 }
3299
3300 _eet_freelist_all_ref(context);
3301 if (data && !data_out)
3302 _eet_freelist_add(context, data);
3303
3304 memset(&chnk, 0, sizeof(Eet_Data_Chunk));
3305 eet_data_chunk_get(ed, &chnk, data_in, size_in);
3306 if (!chnk.name)
3307 goto error;
3308
3309 if (edd)
3310 if (strcmp(chnk.name, edd->name))
3311 goto error;
3312
3313 p = chnk.data;
3314 if (ed)
3315 size = size_in - (4 + sizeof(int) * 2);
3316 else
3317 size = size_in - (4 + 4 + chnk.len);
3318
3319 if (edd)
3320 {
3321 if (!edd->elements.hash.buckets)
3322 _eet_descriptor_hash_new(edd);
3323 }
3324 else
3325 {
3326 switch (chnk.group_type)
3327 {
3328 case EET_G_UNKNOWN:
3329 switch (chnk.type)
3330 {
3331 case EET_T_STRING:
3332 return eet_node_string_new(chnk.name, chnk.data);
3333
3334 case EET_T_INLINED_STRING:
3335 return eet_node_inlined_string_new(chnk.name, chnk.data);
3336
3337 case EET_T_NULL:
3338 return eet_node_null_new(chnk.name);
3339
3340 default:
3341 result = eet_node_struct_new(chnk.name, NULL);
3342 } /* switch */
3343 break;
3344
3345 case EET_G_VAR_ARRAY:
3346 return eet_node_var_array_new(chnk.name, NULL);
3347
3348 case EET_G_LIST:
3349 case EET_G_HASH:
3350 case EET_G_ARRAY:
3351 case EET_G_UNION:
3352 case EET_G_VARIANT:
3353 default:
3354 goto error;
3355 } /* switch */
3356 }
3357
3358 while (size > 0)
3359 {
3360 Eet_Data_Chunk echnk;
3361 Eet_Data_Element *ede = NULL;
3362 Eet_Node *child = NULL;
3363 int group_type = EET_G_UNKNOWN, type = EET_T_UNKNOW;
3364 int ret = 0;
3365
3366 /* get next data chunk */
3367 memset(&echnk, 0, sizeof(Eet_Data_Chunk));
3368 eet_data_chunk_get(ed, &echnk, p, size);
3369 if (!echnk.name)
3370 goto error; /* FIXME: don't REPLY on edd - work without */
3371
3372 if (edd)
3373 {
3374 ede = _eet_descriptor_hash_find(edd, echnk.name, echnk.hash);
3375 if (ede)
3376 {
3377 group_type = ede->group_type;
3378 type = ede->type;
3379 if ((echnk.type == 0) && (echnk.group_type == 0))
3380 {
3381 type = ede->type;
3382 group_type = ede->group_type;
3383 }
3384 else
3385 {
3386 if (IS_SIMPLE_TYPE(echnk.type) &&
3387 eet_data_type_match(echnk.type, ede->type))
3388/* Needed when converting on the fly from FP to Float */
3389 type = ede->type;
3390 else if ((echnk.group_type > EET_G_UNKNOWN) &&
3391 (echnk.group_type < EET_G_LAST) &&
3392 (echnk.group_type == ede->group_type))
3393 group_type = echnk.group_type;
3394 }
3395 }
3396 }
3397 /*...... dump to node */
3398 else
3399 {
3400 type = echnk.type;
3401 group_type = echnk.group_type;
3402 }
3403
3404 if (!edd && group_type == EET_G_UNKNOWN && IS_SIMPLE_TYPE(type))
3405 {
3406 unsigned char dd[128];
3407
3408 ret = eet_data_get_type(ed,
3409 type,
3410 echnk.data,
3411 ((char *)echnk.data) + echnk.size,
3412 dd);
3413 if (ret <= 0)
3414 goto error;
3415
3416 child = eet_data_node_simple_type(type, echnk.name, dd);
3417
3418 eet_node_struct_append(result, echnk.name, child);
3419 }
3420 else
3421 {
3422 ret = eet_group_codec[group_type - 100].get(
3423 context,
3424 ed,
3425 edd,
3426 ede,
3427 &echnk,
3428 type,
3429 group_type,
3430 ede ? (void *)(((char *)data) + ede->offset) : (void **)&result,
3431 &p,
3432 &size);
3433
3434 if (ret <= 0)
3435 goto error;
3436 }
3437
3438 /* advance to next chunk */
3439 NEXT_CHUNK(p, size, echnk, ed);
3440 }
3441
3442 _eet_freelist_all_unref(context);
3443 if (!edd)
3444 {
3445 _eet_freelist_str_free(context, edd);
3446 _eet_freelist_direct_str_free(context, edd);
3447 _eet_freelist_list_free(context, edd);
3448 _eet_freelist_hash_free(context, edd);
3449 _eet_freelist_array_free(context, edd);
3450 _eet_freelist_free(context, edd);
3451 }
3452 else
3453 {
3454 _eet_freelist_reset(context);
3455 _eet_freelist_str_reset(context);
3456 _eet_freelist_list_reset(context);
3457 _eet_freelist_hash_reset(context);
3458 _eet_freelist_direct_str_reset(context);
3459 _eet_freelist_array_reset(context);
3460 }
3461
3462 if (!edd)
3463 return result;
3464
3465 return data;
3466
3467error:
3468 eet_node_del(result);
3469
3470 _eet_freelist_all_unref(context);
3471 _eet_freelist_str_free(context, edd);
3472 _eet_freelist_direct_str_free(context, edd);
3473 _eet_freelist_list_free(context, edd);
3474 _eet_freelist_hash_free(context, edd);
3475 _eet_freelist_array_free(context, edd);
3476 _eet_freelist_free(context, edd);
3477
3478 /* FIXME: Warn that something goes wrong here. */
3479 return NULL;
3480} /* _eet_data_descriptor_decode */
3481
3482static int
3483eet_data_get_list(Eet_Free_Context *context,
3484 const Eet_Dictionary *ed,
3485 Eet_Data_Descriptor *edd,
3486 Eet_Data_Element *ede,
3487 Eet_Data_Chunk *echnk,
3488 int type,
3489 int group_type __UNUSED__,
3490 void *data,
3491 char **p,
3492 int *size)
3493{
3494 Eet_Data_Descriptor *subtype = NULL;
3495 void *list = NULL;
3496 void **ptr;
3497 void *data_ret;
3498
3499 EET_ASSERT(!((type > EET_T_UNKNOW) && (type < EET_T_STRING)), return 0);
3500
3501 if (ede)
3502 {
3503 subtype = ede->subtype;
3504
3505 if (type != ede->type)
3506 return 0;
3507 }
3508
3509 ptr = (void **)data;
3510 list = *ptr;
3511 data_ret = NULL;
3512
3513 if (IS_POINTER_TYPE(type))
3514 POINTER_TYPE_DECODE(context,
3515 ed,
3516 edd,
3517 ede,
3518 echnk,
3519 type,
3520 &data_ret,
3521 p,
3522 size,
3523 on_error);
3524 else
3525 STRUCT_TYPE_DECODE(data_ret,
3526 context,
3527 ed,
3528 subtype,
3529 echnk->data,
3530 echnk->size,
3531 -1,
3532 on_error);
3533
3534 if (edd)
3535 {
3536 list = edd->func.list_append(list, data_ret);
3537 *ptr = list;
3538 _eet_freelist_list_add(context, ptr);
3539 }
3540 else
3541 eet_node_list_append(*((Eet_Node **)data), echnk->name, data_ret);
3542
3543 return 1;
3544
3545on_error:
3546 return 0;
3547} /* eet_data_get_list */
3548
3549static int
3550eet_data_get_hash(Eet_Free_Context *context,
3551 const Eet_Dictionary *ed,
3552 Eet_Data_Descriptor *edd,
3553 Eet_Data_Element *ede,
3554 Eet_Data_Chunk *echnk,
3555 int type,
3556 int group_type __UNUSED__,
3557 void *data,
3558 char **p,
3559 int *size)
3560{
3561 void **ptr;
3562 void *hash = NULL;
3563 char *key = NULL;
3564 void *data_ret = NULL;
3565 int ret = 0;
3566
3567 EET_ASSERT(!((type > EET_T_UNKNOW) && (type < EET_T_STRING)), return 0);
3568
3569 ptr = (void **)data;
3570 hash = *ptr;
3571
3572 /* Read key */
3573 ret = eet_data_get_type(ed,
3574 EET_T_STRING,
3575 echnk->data,
3576 ((char *)echnk->data) + echnk->size,
3577 &key);
3578 if (ret <= 0)
3579 goto on_error;
3580
3581 if (!key)
3582 goto on_error;
3583
3584 /* Advance to next chunk */
3585 NEXT_CHUNK((*p), (*size), (*echnk), ed);
3586 memset(echnk, 0, sizeof(Eet_Data_Chunk));
3587
3588 /* Read value */
3589 eet_data_chunk_get(ed, echnk, *p, *size);
3590 if (!echnk->name)
3591 goto on_error;
3592
3593 if (ede)
3594 if ((ede->group_type != echnk->group_type)
3595 || (ede->type != echnk->type))
3596 goto on_error;
3597
3598 if (IS_POINTER_TYPE(echnk->type))
3599 POINTER_TYPE_DECODE(context,
3600 ed,
3601 edd,
3602 ede,
3603 echnk,
3604 echnk->type,
3605 &data_ret,
3606 p,
3607 size,
3608 on_error);
3609 else
3610 STRUCT_TYPE_DECODE(data_ret,
3611 context,
3612 ed,
3613 ede ? ede->subtype : NULL,
3614 echnk->data,
3615 echnk->size,
3616 -1,
3617 on_error);
3618
3619 if (edd)
3620 {
3621 hash = edd->func.hash_add(hash, key, data_ret);
3622 *ptr = hash;
3623 _eet_freelist_hash_add(context, hash);
3624 }
3625 else
3626 eet_node_hash_add(*((Eet_Node **)data), echnk->name, key, data_ret);
3627
3628 return 1;
3629
3630on_error:
3631 return 0;
3632} /* eet_data_get_hash */
3633
3634/* var arrays and fixed arrays have to
3635 * get all chunks at once. for fixed arrays
3636 * we can get each chunk and increment a
3637 * counter stored on the element itself but
3638 * it wont be thread safe. for var arrays
3639 * we still need a way to get the number of
3640 * elements from the data, so storing the
3641 * number of elements and the element data on
3642 * each chunk is pointless.
3643 */
3644static int
3645eet_data_get_array(Eet_Free_Context *context,
3646 const Eet_Dictionary *ed,
3647 Eet_Data_Descriptor *edd,
3648 Eet_Data_Element *ede,
3649 Eet_Data_Chunk *echnk,
3650 int type,
3651 int group_type,
3652 void *data,
3653 char **p,
3654 int *size)
3655{
3656 Eina_List *childs = NULL;
3657 const char *name;
3658 Eet_Node *tmp;
3659 void *ptr;
3660 int count;
3661 int ret;
3662 int subsize = 0;
3663 int i;
3664
3665 EET_ASSERT(!((type > EET_T_UNKNOW) && (type < EET_T_STRING)), return 0);
3666
3667 ptr = data;
3668 /* read the number of elements */
3669 ret = eet_data_get_type(ed,
3670 EET_T_INT,
3671 echnk->data,
3672 ((char *)echnk->data) + echnk->size,
3673 &count);
3674 if (ret <= 0)
3675 return ret;
3676
3677 name = echnk->name;
3678
3679 if (ede)
3680 {
3681 if (IS_POINTER_TYPE(type))
3682 subsize = eet_basic_codec[ede->type].size;
3683 else
3684 subsize = ede->subtype->size;
3685
3686 if (group_type == EET_G_VAR_ARRAY)
3687 {
3688 /* store the number of elements
3689 * on the counter offset */
3690 *(int *)(((char *)data) + ede->count - ede->offset) = count;
3691 /* allocate space for the array of elements */
3692 if (edd->func.array_alloc)
3693 *(void **)ptr = edd->func.array_alloc(count * subsize);
3694 else
3695 *(void **)ptr = edd->func.mem_alloc(count * subsize);
3696
3697 if (!*(void **)ptr)
3698 return 0;
3699
3700 memset(*(void **)ptr, 0, count * subsize);
3701
3702 _eet_freelist_array_add(context, *(void **)ptr);
3703 }
3704 }
3705
3706 /* get all array elements */
3707 for (i = 0; i < count; i++)
3708 {
3709 void *dst = NULL;
3710
3711 /* Advance to next chunk */
3712 NEXT_CHUNK((*p), (*size), (*echnk), ed);
3713 memset(echnk, 0, sizeof(Eet_Data_Chunk));
3714
3715 eet_data_chunk_get(ed, echnk, *p, *size);
3716 if (!echnk->name || strcmp(echnk->name, name) != 0)
3717 goto on_error; /* get the data */
3718
3719 if ((echnk->group_type != group_type)
3720 || ((echnk->type != type) && (echnk->type != EET_T_NULL)))
3721 goto on_error;
3722
3723 if (ede)
3724 if ((ede->group_type != echnk->group_type)
3725 || ((echnk->type != ede->type) && (echnk->type != EET_T_NULL)))
3726 goto on_error;
3727
3728 /* get the destination pointer */
3729 if (ede)
3730 {
3731 if (group_type == EET_G_ARRAY)
3732 dst = (char *)ptr + (subsize * i);
3733 else
3734 dst = *(char **)ptr + (subsize * i);
3735 }
3736
3737 if (IS_POINTER_TYPE(echnk->type))
3738 {
3739 void *data_ret = NULL;
3740
3741 POINTER_TYPE_DECODE(context,
3742 ed,
3743 edd,
3744 ede,
3745 echnk,
3746 echnk->type,
3747 &data_ret,
3748 p,
3749 size,
3750 on_error);
3751 if (dst)
3752 memcpy(dst, &data_ret, subsize);
3753
3754 if (!edd)
3755 childs = eina_list_append(childs, data_ret);
3756 }
3757 else
3758 {
3759 STRUCT_TYPE_DECODE(dst,
3760 context,
3761 ed,
3762 ede ? ede->subtype : NULL,
3763 echnk->data,
3764 echnk->size,
3765 subsize,
3766 on_error);
3767
3768 if (!edd)
3769 childs = eina_list_append(childs, dst);
3770 }
3771 }
3772
3773 if (!edd)
3774 {
3775 Eet_Node *parent = *((Eet_Node **)data);
3776 Eet_Node *array;
3777
3778 if (group_type == EET_G_ARRAY)
3779 array = eet_node_array_new(name, count, childs);
3780 else
3781 array = eet_node_var_array_new(name, childs);
3782
3783 if (!array)
3784 goto on_error;
3785
3786 eet_node_struct_append(parent, name, array);
3787 }
3788
3789 return 1;
3790
3791on_error:
3792 EINA_LIST_FREE(childs, tmp)
3793 eet_node_del(tmp);
3794
3795 return 0;
3796} /* eet_data_get_array */
3797
3798static void
3799eet_data_put_union(Eet_Dictionary *ed,
3800 Eet_Data_Descriptor *edd __UNUSED__,
3801 Eet_Data_Element *ede,
3802 Eet_Data_Stream *ds,
3803 void *data_in)
3804{
3805 const char *union_type;
3806 int i;
3807
3808 EET_ASSERT(!((ede->type != EET_T_UNKNOW) || (!ede->subtype)), return );
3809
3810 union_type = ede->subtype->func.type_get(
3811 ((char *)data_in) + ede->count - ede->offset,
3812 NULL);
3813
3814 if (!union_type)
3815 return;
3816
3817 /* Search the structure of the union to encode. */
3818 for (i = 0; i < ede->subtype->elements.num; ++i)
3819 if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0)
3820 {
3821 Eet_Data_Element *sede;
3822 void *data;
3823 int size;
3824
3825 /* Yeah we found it ! */
3826 data = eet_data_put_type(ed, EET_T_STRING, &union_type, &size);
3827 if (data)
3828 eet_data_encode(ed,
3829 ds,
3830 data,
3831 ede->name,
3832 size,
3833 ede->type,
3834 ede->group_type);
3835
3836 sede = &(ede->subtype->elements.set[i]);
3837 data = _eet_data_descriptor_encode(ed,
3838 sede->subtype,
3839 data_in,
3840 &size);
3841 if (data)
3842 eet_data_encode(ed,
3843 ds,
3844 data,
3845 ede->name,
3846 size,
3847 ede->type,
3848 ede->group_type);
3849
3850 break;
3851 }
3852} /* eet_data_put_union */
3853
3854static int
3855eet_data_get_union(Eet_Free_Context *context,
3856 const Eet_Dictionary *ed,
3857 Eet_Data_Descriptor *edd __UNUSED__,
3858 Eet_Data_Element *ede,
3859 Eet_Data_Chunk *echnk,
3860 int type,
3861 int group_type,
3862 void *data,
3863 char **p,
3864 int *size)
3865{
3866 const char *union_type;
3867 void *data_ret = NULL;
3868 int ret = 0;
3869 int i;
3870
3871 /* Read type */
3872 ret = eet_data_get_type(ed,
3873 EET_T_STRING,
3874 echnk->data,
3875 ((char *)echnk->data) + echnk->size,
3876 &union_type);
3877 if (ret <= 0)
3878 goto on_error;
3879
3880 /* Advance to next chunk */
3881 NEXT_CHUNK((*p), (*size), (*echnk), ed);
3882 memset(echnk, 0, sizeof(Eet_Data_Chunk));
3883
3884 /* Read value */
3885 eet_data_chunk_get(ed, echnk, *p, *size);
3886 if (!echnk->name)
3887 goto on_error;
3888
3889 if (ede)
3890 {
3891 EET_ASSERT(!(ede->group_type != group_type || ede->type != type),
3892 goto on_error);
3893
3894 /* Search the structure of the union to decode */
3895 for (i = 0; i < ede->subtype->elements.num; ++i)
3896 if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0)
3897 {
3898 Eet_Data_Element *sede;
3899 char *ut;
3900
3901 /* Yeah we found it ! */
3902 sede = &(ede->subtype->elements.set[i]);
3903 EET_ASSERT(sede->subtype, goto on_error);
3904
3905 data_ret = _eet_data_descriptor_decode(context,
3906 ed,
3907 sede->subtype,
3908 echnk->data,
3909 echnk->size,
3910 data,
3911 sede->subtype->size);
3912 if (!data_ret)
3913 goto on_error;
3914
3915 /* Set union type. */
3916 if ((!ed) || (!ede->subtype->func.str_direct_alloc))
3917 {
3918 ut = ede->subtype->func.str_alloc(union_type);
3919 _eet_freelist_str_add(context, ut);
3920 }
3921 else
3922 {
3923 ut = ede->subtype->func.str_direct_alloc(union_type);
3924 _eet_freelist_direct_str_add(context, ut);
3925 }
3926
3927 ede->subtype->func.type_set(
3928 ut,
3929 ((char *)data) + ede->count -
3930 ede->offset,
3931 EINA_FALSE);
3932
3933 break;
3934 }
3935 }
3936 else
3937 {
3938 /* FIXME: generate node structure. */
3939 data_ret = _eet_data_descriptor_decode(context,
3940 ed, NULL,
3941 echnk->data, echnk->size,
3942 NULL, 0);
3943 goto on_error;
3944 }
3945
3946 return 1;
3947
3948on_error:
3949 return 0;
3950} /* eet_data_get_union */
3951
3952static void
3953eet_data_put_variant(Eet_Dictionary *ed,
3954 Eet_Data_Descriptor *edd __UNUSED__,
3955 Eet_Data_Element *ede,
3956 Eet_Data_Stream *ds,
3957 void *data_in)
3958{
3959 const char *union_type;
3960 void *data;
3961 Eina_Bool unknow = EINA_FALSE;
3962 int size;
3963 int i;
3964
3965 EET_ASSERT(!((ede->type != EET_T_UNKNOW) || (!ede->subtype)), return );
3966
3967 union_type = ede->subtype->func.type_get(
3968 ((char *)data_in) + ede->count - ede->offset,
3969 &unknow);
3970
3971 if (!union_type && unknow == EINA_FALSE)
3972 return;
3973
3974 if (unknow)
3975 {
3976 /* Handle opaque internal representation */
3977 Eet_Variant_Unknow *evu;
3978
3979 data = eet_data_put_type(ed, EET_T_STRING, &union_type, &size);
3980 if (data)
3981 eet_data_encode(ed,
3982 ds,
3983 data,
3984 ede->name,
3985 size,
3986 ede->type,
3987 ede->group_type);
3988
3989 evu = (Eet_Variant_Unknow *)data_in;
3990 if (evu && EINA_MAGIC_CHECK(evu, EET_MAGIC_VARIANT))
3991 eet_data_encode(ed,
3992 ds,
3993 evu->data,
3994 ede->name,
3995 evu->size,
3996 ede->type,
3997 ede->group_type);
3998 }
3999 else
4000 /* Search the structure of the union to encode. */
4001 for (i = 0; i < ede->subtype->elements.num; ++i)
4002 if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0)
4003 {
4004 Eet_Data_Element *sede;
4005
4006 /* Yeah we found it ! */
4007 data = eet_data_put_type(ed, EET_T_STRING, &union_type, &size);
4008 if (data)
4009 eet_data_encode(ed,
4010 ds,
4011 data,
4012 ede->name,
4013 size,
4014 ede->type,
4015 ede->group_type);
4016
4017 sede = &(ede->subtype->elements.set[i]);
4018
4019 if (sede->group_type != EET_G_UNKNOWN)
4020 {
4021 Eet_Data_Stream *lds;
4022
4023 lds = eet_data_stream_new();
4024 eet_group_codec[sede->group_type - 100].put(ed,
4025 sede->subtype,
4026 sede,
4027 lds,
4028 data_in);
4029 if (lds->size != 0)
4030 {
4031 eet_data_encode(ed, ds, lds->data, ede->name, lds->pos,
4032 ede->type, ede->group_type);
4033
4034 lds->data = NULL;
4035 lds->size = 0;
4036 }
4037 else
4038 eet_data_encode(ed, ds, NULL, ede->name, 0,
4039 EET_T_NULL, ede->group_type);
4040
4041 eet_data_stream_free(lds);
4042 }
4043 else
4044 {
4045 data = _eet_data_descriptor_encode(ed,
4046 sede->subtype,
4047 *(void **)data_in,
4048 &size);
4049 if (data)
4050 eet_data_encode(ed,
4051 ds,
4052 data,
4053 ede->name,
4054 size,
4055 ede->type,
4056 ede->group_type);
4057 }
4058
4059 break;
4060 }
4061} /* eet_data_put_variant */
4062
4063static int
4064eet_data_get_variant(Eet_Free_Context *context,
4065 const Eet_Dictionary *ed,
4066 Eet_Data_Descriptor *edd __UNUSED__,
4067 Eet_Data_Element *ede,
4068 Eet_Data_Chunk *echnk,
4069 int type __UNUSED__,
4070 int group_type __UNUSED__,
4071 void *data,
4072 char **p,
4073 int *size)
4074{
4075 const char *union_type;
4076 void *data_ret = NULL;
4077 int ret = 0;
4078 int i;
4079
4080 /* Read type */
4081 ret = eet_data_get_type(ed,
4082 EET_T_STRING,
4083 echnk->data,
4084 ((char *)echnk->data) + echnk->size,
4085 &union_type);
4086 if (ret <= 0)
4087 goto on_error;
4088
4089 /* Advance to next chunk */
4090 NEXT_CHUNK((*p), (*size), (*echnk), ed);
4091 memset(echnk, 0, sizeof(Eet_Data_Chunk));
4092
4093 /* Read value */
4094 eet_data_chunk_get(ed, echnk, *p, *size);
4095 if (!echnk->name)
4096 goto on_error;
4097
4098 if (ede)
4099 {
4100 char *ut;
4101
4102 EET_ASSERT(ede->subtype, goto on_error);
4103
4104 if ((!ed) || (!ede->subtype->func.str_direct_alloc))
4105 {
4106 ut = ede->subtype->func.str_alloc(union_type);
4107 _eet_freelist_str_add(context, ut);
4108 }
4109 else
4110 {
4111 ut = ede->subtype->func.str_direct_alloc(union_type);
4112 _eet_freelist_direct_str_add(context, ut);
4113 }
4114
4115 /* Search the structure of the union to decode */
4116 for (i = 0; i < ede->subtype->elements.num; ++i)
4117 if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0)
4118 {
4119 Eet_Data_Element *sede;
4120
4121 /* Yeah we found it ! */
4122 sede = &(ede->subtype->elements.set[i]);
4123
4124 if (sede->group_type != EET_G_UNKNOWN)
4125 {
4126 Eet_Data_Chunk chnk;
4127 char *p2;
4128 int size2;
4129
4130 p2 = echnk->data;
4131 size2 = echnk->size;
4132
4133 /* Didn't find a proper way to provide this
4134 without duplicating code */
4135 while (size2 > 0)
4136 {
4137 memset(&chnk, 0, sizeof(Eet_Data_Chunk));
4138 eet_data_chunk_get(ed, &chnk, p2, size2);
4139
4140 if (!chnk.name)
4141 goto on_error;
4142
4143 ret = eet_group_codec[sede->group_type - 100].get
4144 (context, ed, sede->subtype, sede, &chnk, sede->type,
4145 sede->group_type, data, &p2, &size2);
4146
4147 if (ret <= 0)
4148 goto on_error;
4149
4150/* advance to next chunk */
4151 NEXT_CHUNK(p2, size2, chnk, ed);
4152 }
4153
4154 /* Put garbage so that we will not put eet_variant_unknow in it */
4155 data_ret = (void *)data;
4156
4157 /* Set variant type. */
4158 ede->subtype->func.type_set
4159 (ut, ((char *)data) + ede->count - ede->offset,
4160 EINA_FALSE);
4161 break;
4162 }
4163
4164 data_ret = _eet_data_descriptor_decode(context,
4165 ed,
4166 sede->subtype,
4167 echnk->data,
4168 echnk->size,
4169 NULL, 0);
4170 if (!data_ret)
4171 break;
4172
4173 /* And point to the variant data. */
4174 *(void **)data = data_ret;
4175
4176 /* Set variant type. */
4177 ede->subtype->func.type_set
4178 (ut, ((char *)data) + ede->count - ede->offset, EINA_FALSE);
4179 break;
4180 }
4181
4182 if (!data_ret)
4183 {
4184 Eet_Variant_Unknow *evu;
4185
4186 evu = calloc(1, sizeof (Eet_Variant_Unknow) + echnk->size - 1);
4187 if (!evu)
4188 goto on_error;
4189
4190 evu->size = echnk->size;
4191 memcpy(evu->data, echnk->data, evu->size);
4192 EINA_MAGIC_SET(evu, EET_MAGIC_VARIANT);
4193
4194 /* And point to the opaque internal data scructure */
4195 *(void **)data = evu;
4196
4197 /* Set variant type. */
4198 ede->subtype->func.type_set
4199 (ut, ((char *)data) + ede->count - ede->offset, EINA_TRUE);
4200 }
4201 }
4202 else
4203 {
4204 /* FIXME: dump node structure. */
4205 data_ret = _eet_data_descriptor_decode(context,
4206 ed, NULL,
4207 echnk->data, echnk->size,
4208 NULL, 0);
4209 goto on_error;
4210 }
4211
4212 return 1;
4213
4214on_error:
4215 return 0;
4216} /* eet_data_get_variant */
4217
4218static Eet_Node *
4219eet_data_node_simple_type(int type,
4220 const char *name,
4221 void *dd)
4222{
4223#ifdef EET_T_TYPE
4224# undef EET_T_TYPE
4225#endif /* ifdef EET_T_TYPE */
4226
4227#define EET_T_TYPE(Eet_Type, Eet_Node_Type, Type) \
4228case Eet_Type: \
4229 return eet_node_ ## Eet_Node_Type ## _new(name, *((Type *)dd)); \
4230
4231 switch (type)
4232 {
4233 EET_T_TYPE(EET_T_CHAR, char, char);
4234 EET_T_TYPE(EET_T_SHORT, short, short);
4235 EET_T_TYPE(EET_T_INT, int, int);
4236 EET_T_TYPE(EET_T_LONG_LONG, long_long, long long);
4237 EET_T_TYPE(EET_T_FLOAT, float, float);
4238 EET_T_TYPE(EET_T_DOUBLE, double, double);
4239 EET_T_TYPE(EET_T_UCHAR, unsigned_char, unsigned char);
4240 EET_T_TYPE(EET_T_USHORT, unsigned_short, unsigned short);
4241 EET_T_TYPE(EET_T_UINT, unsigned_int, unsigned int);
4242 EET_T_TYPE(EET_T_ULONG_LONG, unsigned_long_long, unsigned long long);
4243 EET_T_TYPE(EET_T_STRING, string, char *);
4244 EET_T_TYPE(EET_T_INLINED_STRING, inlined_string, char *);
4245
4246 case EET_T_NULL:
4247 return eet_node_null_new(name);
4248
4249 default:
4250 ERR("Unknow type passed to eet_data_node_simple_type");
4251 return NULL;
4252 } /* switch */
4253} /* eet_data_node_simple_type */
4254
4255static int
4256eet_data_get_unknown(Eet_Free_Context *context,
4257 const Eet_Dictionary *ed,
4258 Eet_Data_Descriptor *edd,
4259 Eet_Data_Element *ede,
4260 Eet_Data_Chunk *echnk,
4261 int type,
4262 int group_type __UNUSED__,
4263 void *data,
4264 char **p __UNUSED__,
4265 int *size __UNUSED__)
4266{
4267 int ret;
4268 void *data_ret;
4269
4270 if (IS_SIMPLE_TYPE(type))
4271 {
4272 unsigned char dd[128];
4273
4274 ret = eet_data_get_type(ed,
4275 type,
4276 echnk->data,
4277 ((char *)echnk->data) + echnk->size,
4278 edd ? (char *)data : (char *)dd);
4279 if (ret <= 0)
4280 return ret;
4281
4282 if (!edd)
4283 {
4284 Eet_Node **parent = data;
4285 Eet_Node *node;
4286
4287 node = eet_data_node_simple_type(type, echnk->name, dd);
4288
4289 if (*parent)
4290 eet_node_struct_append(*parent, echnk->name, node);
4291 else
4292 *parent = node;
4293 }
4294 else
4295 {
4296 if (type == EET_T_STRING)
4297 {
4298 char **str;
4299
4300 str = (char **)(((char *)data));
4301 if (*str)
4302 {
4303 if ((!ed) || (!edd->func.str_direct_alloc))
4304 {
4305 *str = edd->func.str_alloc(*str);
4306 _eet_freelist_str_add(context, *str);
4307 }
4308 else
4309 {
4310 *str = edd->func.str_direct_alloc(*str);
4311 _eet_freelist_direct_str_add(context, *str);
4312 }
4313 }
4314 }
4315 else if (edd && type == EET_T_INLINED_STRING)
4316 {
4317 char **str;
4318
4319 str = (char **)(((char *)data));
4320 if (*str)
4321 {
4322 *str = edd->func.str_alloc(*str);
4323 _eet_freelist_str_add(context, *str);
4324 }
4325 }
4326 }
4327 }
4328 else
4329 {
4330 Eet_Data_Descriptor *subtype;
4331
4332 subtype = ede ? ede->subtype : NULL;
4333
4334 if (subtype || !edd)
4335 {
4336 Eet_Node **parent = data;
4337 void **ptr;
4338
4339 data_ret = _eet_data_descriptor_decode(context,
4340 ed,
4341 subtype,
4342 echnk->data,
4343 echnk->size,
4344 NULL, 0);
4345 if (!data_ret)
4346 return 0;
4347
4348 if (edd)
4349 {
4350 ptr = (void **)(((char *)data));
4351 *ptr = (void *)data_ret;
4352 }
4353 else
4354 {
4355 Eet_Node *node = data_ret;
4356
4357 if (*parent)
4358 {
4359 node = eet_node_struct_child_new(echnk->name, node);
4360 eet_node_struct_append(*parent, echnk->name, node);
4361 }
4362 else
4363 *parent = node;
4364 }
4365 }
4366 }
4367
4368 return 1;
4369} /* eet_data_get_unknown */
4370
4371static void
4372eet_data_put_array(Eet_Dictionary *ed,
4373 Eet_Data_Descriptor *edd __UNUSED__,
4374 Eet_Data_Element *ede,
4375 Eet_Data_Stream *ds,
4376 void *data_in)
4377{
4378 void *data;
4379 int offset = 0;
4380 int subsize;
4381 int count;
4382 int size;
4383 int j;
4384
4385 EET_ASSERT(!((ede->type > EET_T_UNKNOW) && (ede->type < EET_T_STRING)),
4386 return );
4387
4388 if (ede->group_type == EET_G_ARRAY)
4389 count = ede->counter_offset;
4390 else
4391 count = *(int *)(((char *)data_in) + ede->count - ede->offset);
4392
4393 if (count <= 0)
4394 return; /* Store number of elements */
4395
4396 data = eet_data_put_type(ed, EET_T_INT, &count, &size);
4397 if (data)
4398 eet_data_encode(ed, ds, data, ede->name, size, ede->type, ede->group_type);
4399
4400 if (IS_POINTER_TYPE(ede->type))
4401 subsize = eet_basic_codec[ede->type].size;
4402 else
4403 subsize = ede->subtype->size;
4404
4405 for (j = 0; j < count; j++)
4406 {
4407 void *d;
4408 int pos = ds->pos;
4409
4410 if (ede->group_type == EET_G_ARRAY)
4411 d = (void *)(((char *)data_in) + offset);
4412 else
4413 d = *(((char **)data_in)) + offset;
4414
4415 if (IS_POINTER_TYPE(ede->type))
4416 {
4417 if (*(char **)d)
4418 eet_data_put_unknown(ed, NULL, ede, ds, d);
4419 }
4420 else
4421 {
4422 data = _eet_data_descriptor_encode(ed, ede->subtype, d, &size);
4423 if (data)
4424 eet_data_encode(ed,
4425 ds,
4426 data,
4427 ede->name,
4428 size,
4429 ede->type,
4430 ede->group_type);
4431 }
4432
4433 if (pos == ds->pos)
4434 /* Add a NULL element just to have the correct array layout. */
4435 eet_data_encode(ed,
4436 ds,
4437 NULL,
4438 ede->name,
4439 0,
4440 EET_T_NULL,
4441 ede->group_type);
4442
4443 offset += subsize;
4444 }
4445} /* eet_data_put_array */
4446
4447static void
4448eet_data_put_unknown(Eet_Dictionary *ed,
4449 Eet_Data_Descriptor *edd __UNUSED__,
4450 Eet_Data_Element *ede,
4451 Eet_Data_Stream *ds,
4452 void *data_in)
4453{
4454 void *data = NULL;
4455 int size;
4456
4457 if (IS_SIMPLE_TYPE(ede->type))
4458 data = eet_data_put_type(ed, ede->type, data_in, &size);
4459 else if (ede->subtype)
4460 if (*((char **)data_in))
4461 data = _eet_data_descriptor_encode(ed,
4462 ede->subtype,
4463 *((char **)((char *)(data_in))),
4464 &size);
4465
4466 if (data)
4467 eet_data_encode(ed,
4468 ds,
4469 data,
4470 ede->name,
4471 size,
4472 ede->type,
4473 ede->group_type);
4474} /* eet_data_put_unknown */
4475
4476static void
4477eet_data_put_list(Eet_Dictionary *ed,
4478 Eet_Data_Descriptor *edd,
4479 Eet_Data_Element *ede,
4480 Eet_Data_Stream *ds,
4481 void *data_in)
4482{
4483 void *data;
4484 void *l;
4485 int size;
4486
4487 EET_ASSERT(!(((ede->type > EET_T_UNKNOW) && (ede->type < EET_T_STRING))
4488 || ((ede->type > EET_T_NULL) && (ede->type < EET_T_LAST))),
4489 return );
4490
4491 l = *((void **)(((char *)data_in)));
4492 for (; l; l = edd->func.list_next(l))
4493 {
4494 if (IS_POINTER_TYPE(ede->type))
4495 {
4496 const void *str = edd->func.list_data(l);
4497 eet_data_put_unknown(ed, NULL, ede, ds, &str);
4498 }
4499 else
4500 {
4501 data = _eet_data_descriptor_encode(ed,
4502 ede->subtype,
4503 edd->func.list_data(l),
4504 &size);
4505 if (data)
4506 eet_data_encode(ed,
4507 ds,
4508 data,
4509 ede->name,
4510 size,
4511 ede->type,
4512 ede->group_type);
4513 }
4514 }
4515} /* eet_data_put_list */
4516
4517static void
4518eet_data_put_hash(Eet_Dictionary *ed,
4519 Eet_Data_Descriptor *edd,
4520 Eet_Data_Element *ede,
4521 Eet_Data_Stream *ds,
4522 void *data_in)
4523{
4524 Eet_Data_Encode_Hash_Info fdata;
4525 void *l;
4526
4527 l = *((void **)(((char *)data_in)));
4528 fdata.ds = ds;
4529 fdata.ede = ede;
4530 fdata.ed = ed;
4531 edd->func.hash_foreach(l, eet_data_descriptor_encode_hash_cb, &fdata);
4532} /* eet_data_put_hash */
4533
4534EAPI int
4535eet_data_dump_cipher(Eet_File *ef,
4536 const char *name,
4537 const char *cipher_key,
4538 Eet_Dump_Callback dumpfunc,
4539 void *dumpdata)
4540{
4541 const Eet_Dictionary *ed = NULL;
4542 const void *data = NULL;
4543 Eet_Node *result;
4544 Eet_Free_Context context;
4545 int required_free = 0;
4546 int size;
4547
4548 ed = eet_dictionary_get(ef);
4549
4550 if (!cipher_key)
4551 data = eet_read_direct(ef, name, &size);
4552
4553 if (!data)
4554 {
4555 required_free = 1;
4556 data = eet_read_cipher(ef, name, &size, cipher_key);
4557 if (!data)
4558 return 0;
4559 }
4560
4561 eet_free_context_init(&context);
4562 result = _eet_data_descriptor_decode(&context, ed, NULL, data, size, NULL, 0);
4563 eet_free_context_shutdown(&context);
4564
4565 eet_node_dump(result, 0, dumpfunc, dumpdata);
4566
4567 eet_node_del(result);
4568
4569 if (required_free)
4570 free((void *)data);
4571
4572 return result ? 1 : 0;
4573} /* eet_data_dump_cipher */
4574
4575EAPI int
4576eet_data_dump(Eet_File *ef,
4577 const char *name,
4578 Eet_Dump_Callback dumpfunc,
4579 void *dumpdata)
4580{
4581 return eet_data_dump_cipher(ef, name, NULL, dumpfunc, dumpdata);
4582} /* eet_data_dump */
4583
4584EAPI int
4585eet_data_text_dump_cipher(const void *data_in,
4586 const char *cipher_key,
4587 int size_in,
4588 Eet_Dump_Callback dumpfunc,
4589 void *dumpdata)
4590{
4591 void *ret = NULL;
4592 Eet_Node *result;
4593 Eet_Free_Context context;
4594 unsigned int ret_len = 0;
4595
4596 if (!data_in)
4597 return 0;
4598
4599 if (cipher_key)
4600 {
4601 if (eet_decipher(data_in, size_in, cipher_key,
4602 strlen(cipher_key), &ret, &ret_len))
4603 {
4604 if (ret)
4605 free(ret);
4606
4607 return 0;
4608 }
4609 }
4610 else
4611 {
4612 ret = (void *)data_in;
4613 ret_len = size_in;
4614 }
4615
4616 eet_free_context_init(&context);
4617 result = _eet_data_descriptor_decode(&context, NULL, NULL, ret, ret_len, NULL, 0);
4618 eet_free_context_shutdown(&context);
4619
4620 eet_node_dump(result, 0, dumpfunc, dumpdata);
4621
4622 eet_node_del(result);
4623 if (cipher_key)
4624 free(ret);
4625
4626 return result ? 1 : 0;
4627} /* eet_data_text_dump_cipher */
4628
4629EAPI int
4630eet_data_text_dump(const void *data_in,
4631 int size_in,
4632 Eet_Dump_Callback dumpfunc,
4633 void *dumpdata)
4634{
4635 return eet_data_text_dump_cipher(data_in, NULL, size_in, dumpfunc, dumpdata);
4636} /* eet_data_text_dump */
4637
4638EAPI void *
4639eet_data_text_undump_cipher(const char *text,
4640 const char *cipher_key,
4641 int textlen,
4642 int *size_ret)
4643{
4644 void *ret = NULL;
4645
4646 ret = _eet_data_dump_parse(NULL, size_ret, text, textlen);
4647 if (ret && cipher_key)
4648 {
4649 void *ciphered = NULL;
4650 unsigned int ciphered_len;
4651
4652 if (eet_cipher(ret, *size_ret, cipher_key,
4653 strlen(cipher_key), &ciphered, &ciphered_len))
4654 {
4655 if (ciphered)
4656 free(ciphered);
4657
4658 size_ret = 0;
4659 free(ret);
4660 return NULL;
4661 }
4662
4663 free(ret);
4664 *size_ret = ciphered_len;
4665 ret = ciphered;
4666 }
4667
4668 return ret;
4669} /* eet_data_text_undump_cipher */
4670
4671EAPI void *
4672eet_data_text_undump(const char *text,
4673 int textlen,
4674 int *size_ret)
4675{
4676 return eet_data_text_undump_cipher(text, NULL, textlen, size_ret);
4677} /* eet_data_text_undump */
4678
4679EAPI int
4680eet_data_undump_cipher(Eet_File *ef,
4681 const char *name,
4682 const char *cipher_key,
4683 const char *text,
4684 int textlen,
4685 int compress)
4686{
4687 Eet_Dictionary *ed;
4688 void *data_enc;
4689 int size;
4690 int val;
4691
4692 ed = eet_dictionary_get(ef);
4693
4694 data_enc = _eet_data_dump_parse(ed, &size, text, textlen);
4695 if (!data_enc)
4696 return 0;
4697
4698 val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key);
4699 free(data_enc);
4700 return val;
4701} /* eet_data_undump_cipher */
4702
4703EAPI int
4704eet_data_undump(Eet_File *ef,
4705 const char *name,
4706 const char *text,
4707 int textlen,
4708 int compress)
4709{
4710 return eet_data_undump_cipher(ef, name, NULL, text, textlen, compress);
4711} /* eet_data_undump */
4712
4713EAPI void *
4714eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd,
4715 const void *data_in,
4716 const char *cipher_key,
4717 int size_in)
4718{
4719 void *deciphered = (void *)data_in;
4720 void *ret;
4721 Eet_Free_Context context;
4722 unsigned int deciphered_len = size_in;
4723
4724 if (cipher_key && data_in)
4725 if (eet_decipher(data_in, size_in, cipher_key,
4726 strlen(cipher_key), &deciphered, &deciphered_len))
4727 {
4728 if (deciphered)
4729 free(deciphered);
4730
4731 return NULL;
4732 }
4733
4734 eet_free_context_init(&context);
4735 ret = _eet_data_descriptor_decode(&context,
4736 NULL,
4737 edd,
4738 deciphered,
4739 deciphered_len,
4740 NULL, 0);
4741 eet_free_context_shutdown(&context);
4742
4743 if (data_in != deciphered)
4744 free(deciphered);
4745
4746 return ret;
4747} /* eet_data_descriptor_decode_cipher */
4748
4749EAPI void *
4750eet_data_descriptor_decode(Eet_Data_Descriptor *edd,
4751 const void *data_in,
4752 int size_in)
4753{
4754 return eet_data_descriptor_decode_cipher(edd, data_in, NULL, size_in);
4755} /* eet_data_descriptor_decode */
4756
4757EAPI Eet_Node *
4758eet_data_node_decode_cipher(const void *data_in,
4759 const char *cipher_key,
4760 int size_in)
4761{
4762 void *deciphered = (void *)data_in;
4763 Eet_Node *ret;
4764 Eet_Free_Context context;
4765 unsigned int deciphered_len = size_in;
4766
4767 if (cipher_key && data_in)
4768 if (eet_decipher(data_in, size_in, cipher_key,
4769 strlen(cipher_key), &deciphered, &deciphered_len))
4770 {
4771 if (deciphered)
4772 free(deciphered);
4773
4774 return NULL;
4775 }
4776
4777 eet_free_context_init(&context);
4778 ret = _eet_data_descriptor_decode(&context,
4779 NULL,
4780 NULL,
4781 deciphered,
4782 deciphered_len,
4783 NULL, 0);
4784 eet_free_context_shutdown(&context);
4785
4786 if (data_in != deciphered)
4787 free(deciphered);
4788
4789 return ret;
4790} /* eet_data_node_decode_cipher */
4791
4792static void *
4793_eet_data_descriptor_encode(Eet_Dictionary *ed,
4794 Eet_Data_Descriptor *edd,
4795 const void *data_in,
4796 int *size_ret)
4797{
4798 Eet_Data_Stream *ds;
4799 Eet_Data_Chunk *chnk;
4800 void *cdata;
4801 int csize;
4802 int i;
4803
4804 if (_eet_data_words_bigendian == -1)
4805 {
4806 unsigned long int v;
4807
4808 v = htonl(0x12345678);
4809 if (v == 0x12345678)
4810 _eet_data_words_bigendian = 1;
4811 else
4812 _eet_data_words_bigendian = 0;
4813 }
4814
4815 ds = eet_data_stream_new();
4816 for (i = 0; i < edd->elements.num; i++)
4817 {
4818 Eet_Data_Element *ede;
4819
4820 ede = &(edd->elements.set[i]);
4821 eet_group_codec[ede->group_type - 100].put(
4822 ed,
4823 edd,
4824 ede,
4825 ds,
4826 ((char *)data_in) +
4827 ede->offset);
4828 }
4829 chnk = eet_data_chunk_new(ds->data,
4830 ds->pos,
4831 edd->name,
4832 EET_T_UNKNOW,
4833 EET_G_UNKNOWN);
4834 ds->data = NULL;
4835 ds->size = 0;
4836 eet_data_stream_free(ds);
4837
4838 ds = eet_data_stream_new();
4839 eet_data_chunk_put(ed, chnk, ds);
4840 cdata = ds->data;
4841 csize = ds->pos;
4842
4843 ds->data = NULL;
4844 ds->size = 0;
4845 eet_data_stream_free(ds);
4846 *size_ret = csize;
4847
4848 free(chnk->data);
4849 eet_data_chunk_free(chnk);
4850
4851 return cdata;
4852} /* _eet_data_descriptor_encode */
4853
4854EAPI int
4855eet_data_node_write_cipher(Eet_File *ef,
4856 const char *name,
4857 const char *cipher_key,
4858 Eet_Node *node,
4859 int compress)
4860{
4861 Eet_Dictionary *ed;
4862 void *data_enc;
4863 int size;
4864 int val;
4865
4866 ed = eet_dictionary_get(ef);
4867
4868 data_enc = _eet_data_dump_encode(EET_G_UNKNOWN, ed, node, &size);
4869 if (!data_enc)
4870 return 0;
4871
4872 val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key);
4873 free(data_enc);
4874 return val;
4875} /* eet_data_node_write_cipher */
4876
4877EAPI void *
4878eet_data_node_encode_cipher(Eet_Node *node,
4879 const char *cipher_key,
4880 int *size_ret)
4881{
4882 void *ret = NULL;
4883 void *ciphered = NULL;
4884 unsigned int ciphered_len = 0;
4885 int size;
4886
4887 ret = _eet_data_dump_encode(EET_G_UNKNOWN, NULL, node, &size);
4888 if (cipher_key && ret)
4889 {
4890 if (eet_cipher(ret, size, cipher_key,
4891 strlen(cipher_key), &ciphered, &ciphered_len))
4892 {
4893 if (ciphered)
4894 free(ciphered);
4895
4896 if (size_ret)
4897 *size_ret = 0;
4898
4899 free(ret);
4900 return NULL;
4901 }
4902
4903 free(ret);
4904 size = (int)ciphered_len;
4905 ret = ciphered;
4906 }
4907
4908 if (size_ret)
4909 *size_ret = size;
4910
4911 return ret;
4912} /* eet_data_node_encode_cipher */
4913
4914EAPI void *
4915eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd,
4916 const void *data_in,
4917 const char *cipher_key,
4918 int *size_ret)
4919{
4920 void *ret = NULL;
4921 void *ciphered = NULL;
4922 unsigned int ciphered_len = 0;
4923 int size;
4924
4925 ret = _eet_data_descriptor_encode(NULL, edd, data_in, &size);
4926 if (cipher_key && ret)
4927 {
4928 if (eet_cipher(ret, size, cipher_key,
4929 strlen(cipher_key), &ciphered, &ciphered_len))
4930 {
4931 if (ciphered)
4932 free(ciphered);
4933
4934 if (size_ret)
4935 *size_ret = 0;
4936
4937 free(ret);
4938 return NULL;
4939 }
4940
4941 free(ret);
4942 size = ciphered_len;
4943 ret = ciphered;
4944 }
4945
4946 if (size_ret)
4947 *size_ret = size;
4948
4949 return ret;
4950} /* eet_data_descriptor_encode_cipher */
4951
4952EAPI void *
4953eet_data_descriptor_encode(Eet_Data_Descriptor *edd,
4954 const void *data_in,
4955 int *size_ret)
4956{
4957 return eet_data_descriptor_encode_cipher(edd, data_in, NULL, size_ret);
4958} /* eet_data_descriptor_encode */
4959
4960EAPI void *
4961eet_data_xattr_cipher_get(const char *filename,
4962 const char *attribute,
4963 Eet_Data_Descriptor *edd,
4964 const char *cipher_key)
4965{
4966 void *blob;
4967 void *ret;
4968 ssize_t size;
4969
4970 blob = eina_xattr_get(filename, attribute, &size);
4971 if (!blob) return NULL;
4972
4973 ret = eet_data_descriptor_decode_cipher(edd, blob, cipher_key, size);
4974 free(blob);
4975
4976 return ret;
4977}
4978
4979EAPI Eina_Bool
4980eet_data_xattr_cipher_set(const char *filename,
4981 const char *attribute,
4982 Eet_Data_Descriptor *edd,
4983 const char *cipher_key,
4984 const void *data,
4985 Eina_Xattr_Flags flags)
4986{
4987 void *blob;
4988 int size;
4989 Eina_Bool ret;
4990
4991 blob = eet_data_descriptor_encode_cipher(edd, data, cipher_key, &size);
4992 if (!blob) return EINA_FALSE;
4993
4994 ret = eina_xattr_set(filename, attribute, blob, size, flags);
4995 free(blob);
4996
4997 return ret;
4998}
4999
diff --git a/libraries/eet/src/lib/eet_dictionary.c b/libraries/eet/src/lib/eet_dictionary.c
new file mode 100644
index 0000000..60d0ec1
--- /dev/null
+++ b/libraries/eet/src/lib/eet_dictionary.c
@@ -0,0 +1,439 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#include <stdio.h>
6#include <string.h>
7#include <math.h>
8
9#include <Eina.h>
10
11#include "Eet.h"
12#include "Eet_private.h"
13
14Eet_Dictionary *
15eet_dictionary_add(void)
16{
17 Eet_Dictionary *new;
18
19 new = calloc(1, sizeof (Eet_Dictionary));
20 if (!new)
21 return NULL;
22
23 memset(new->hash, -1, sizeof (int) * 256);
24
25 return new;
26} /* eet_dictionary_add */
27
28void
29eet_dictionary_free(Eet_Dictionary *ed)
30{
31 if (ed)
32 {
33 int i;
34
35 for (i = 0; i < ed->count; ++i)
36 if (ed->all[i].allocated)
37 eina_stringshare_del(ed->all[i].str);
38
39 if (ed->all)
40 free(ed->all);
41
42 if (ed->converts) eina_hash_free(ed->converts);
43
44 free(ed);
45 }
46} /* eet_dictionary_free */
47
48static int
49_eet_dictionary_lookup(Eet_Dictionary *ed,
50 const char *string,
51 int len,
52 int hash)
53{
54 Eina_Bool found = EINA_FALSE;
55 int prev = -1;
56 int current;
57
58 current = ed->hash[hash];
59
60 while (current != -1)
61 {
62 if (ed->all[current].len == len)
63 {
64 if (ed->all[current].str &&
65 (ed->all[current].str == string || strcmp(ed->all[current].str, string) == 0))
66 {
67 found = EINA_TRUE;
68 break;
69 }
70 }
71
72 prev = current;
73 current = ed->all[current].next;
74 }
75
76 if (current == -1 && found)
77 return prev;
78
79 return current;
80} /* _eet_dictionary_lookup */
81
82int
83eet_dictionary_string_add(Eet_Dictionary *ed,
84 const char *string)
85{
86 Eet_String *current;
87 const char *str;
88 int hash;
89 int idx;
90 int len;
91
92 if (!ed)
93 return -1;
94
95 hash = _eet_hash_gen(string, 8);
96 len = strlen(string) + 1;
97
98 idx = _eet_dictionary_lookup(ed, string, len, hash);
99
100 if (idx != -1)
101 {
102 if (ed->all[idx].str && (ed->all[idx].str == string || strcmp(ed->all[idx].str, string) == 0))
103 return idx;
104 }
105
106 if (ed->total == ed->count)
107 {
108 Eet_String *new;
109 int total;
110
111 total = ed->total + 8;
112
113 new = realloc(ed->all, sizeof (Eet_String) * total);
114 if (!new)
115 return -1;
116
117 ed->all = new;
118 ed->total = total;
119 }
120
121 str = eina_stringshare_add(string);
122 if (!str)
123 return -1;
124
125 current = ed->all + ed->count;
126
127 current->allocated = EINA_TRUE;
128
129 current->hash = hash;
130
131 current->str = str;
132 current->len = len;
133
134 if (idx == -1)
135 {
136 current->next = ed->hash[hash];
137 current->prev = -1;
138 ed->hash[hash] = ed->count;
139 }
140 else
141 {
142 current->next = idx;
143 current->prev = ed->all[idx].prev;
144
145 if (current->next != -1)
146 ed->all[current->next].prev = ed->count;
147
148 if (current->prev != -1)
149 ed->all[current->prev].next = ed->count;
150 else
151 ed->hash[hash] = ed->count;
152 }
153
154 return ed->count++;
155} /* eet_dictionary_string_add */
156
157int
158eet_dictionary_string_get_size(const Eet_Dictionary *ed,
159 int idx)
160{
161 if (!ed)
162 return 0;
163
164 if (idx < 0)
165 return 0;
166
167 if (idx < ed->count)
168 return ed->all[idx].len;
169
170 return 0;
171} /* eet_dictionary_string_get_size */
172
173int
174eet_dictionary_string_get_hash(const Eet_Dictionary *ed,
175 int idx)
176{
177 if (!ed)
178 return -1;
179
180 if (idx < 0)
181 return -1;
182
183 if (idx < ed->count)
184 return ed->all[idx].hash;
185
186 return -1;
187} /* eet_dictionary_string_get_hash */
188
189const char *
190eet_dictionary_string_get_char(const Eet_Dictionary *ed,
191 int idx)
192{
193 if (!ed)
194 return NULL;
195
196 if (idx < 0)
197 return NULL;
198
199 if (idx < ed->count)
200 {
201#ifdef _WIN32
202 /* Windows file system could change the mmaped file when replacing a file. So we need to copy all string in memory to avoid bugs. */
203 if (!ed->all[idx].allocated)
204 {
205 ed->all[idx].str = eina_stringshare_add(ed->all[idx].str);
206 ed->all[idx].allocated = EINA_TRUE;
207 }
208#endif /* ifdef _WIN32 */
209 return ed->all[idx].str;
210 }
211
212 return NULL;
213} /* eet_dictionary_string_get_char */
214
215static inline Eina_Bool
216_eet_dictionary_string_get_me_cache(const char *s,
217 int len,
218 int *mantisse,
219 int *exponent)
220{
221 if ((len == 6) && (s[0] == '0') && (s[1] == 'x') && (s[3] == 'p'))
222 {
223 *mantisse = (s[2] >= 'a') ? (s[2] - 'a' + 10) : (s[2] - '0');
224 *exponent = (s[5] - '0');
225
226 return EINA_TRUE;
227 }
228
229 return EINA_FALSE;
230} /* _eet_dictionary_string_get_me_cache */
231
232static inline Eina_Bool
233_eet_dictionary_string_get_float_cache(const char *s,
234 int len,
235 float *result)
236{
237 int mantisse;
238 int exponent;
239
240 if (_eet_dictionary_string_get_me_cache(s, len, &mantisse, &exponent))
241 {
242 if (s[4] == '+')
243 *result = (float)(mantisse << exponent);
244 else
245 *result = (float)mantisse / (float)(1 << exponent);
246
247 return EINA_TRUE;
248 }
249
250 return EINA_FALSE;
251} /* _eet_dictionary_string_get_float_cache */
252
253static inline Eina_Bool
254_eet_dictionary_string_get_double_cache(const char *s,
255 int len,
256 double *result)
257{
258 int mantisse;
259 int exponent;
260
261 if (_eet_dictionary_string_get_me_cache(s, len, &mantisse, &exponent))
262 {
263 if (s[4] == '+')
264 *result = (double)(mantisse << exponent);
265 else
266 *result = (double)mantisse / (float)(1 << exponent);
267
268 return EINA_TRUE;
269 }
270
271 return EINA_FALSE;
272} /* _eet_dictionary_string_get_double_cache */
273
274static inline Eina_Bool
275_eet_dictionary_test(const Eet_Dictionary *ed,
276 int idx,
277 void *result)
278{
279 if (!result)
280 return EINA_FALSE;
281
282 if (!ed)
283 return EINA_FALSE;
284
285 if (idx < 0)
286 return EINA_FALSE;
287
288 if (!(idx < ed->count))
289 return EINA_FALSE;
290
291 return EINA_TRUE;
292} /* _eet_dictionary_test */
293
294static Eet_Convert *
295eet_dictionary_convert_get(const Eet_Dictionary *ed,
296 int idx,
297 const char **str)
298{
299 Eet_Convert *result;
300
301 *str = ed->all[idx].str;
302
303 if (!ed->converts)
304 {
305 ((Eet_Dictionary *)ed)->converts = eina_hash_int32_new(free);
306
307 goto add_convert;
308 }
309
310 result = eina_hash_find(ed->converts, &idx);
311 if (result) return result;
312
313add_convert:
314 result = calloc(1, sizeof (Eet_Convert));
315
316 eina_hash_add(ed->converts, &idx, result);
317 return result;
318}
319
320Eina_Bool
321eet_dictionary_string_get_float(const Eet_Dictionary *ed,
322 int idx,
323 float *result)
324{
325 Eet_Convert *convert;
326 const char *str;
327
328 if (!_eet_dictionary_test(ed, idx, result))
329 return EINA_FALSE;
330
331 convert = eet_dictionary_convert_get(ed, idx, &str);
332 if (!convert) return EINA_FALSE;
333
334 if (!(convert->type & EET_D_FLOAT))
335 {
336 if (!_eet_dictionary_string_get_float_cache(str, ed->all[idx].len,
337 &convert->f))
338 {
339 long long mantisse = 0;
340 long exponent = 0;
341
342 if (eina_convert_atod(str, ed->all[idx].len, &mantisse,
343 &exponent) == EINA_FALSE)
344 return EINA_FALSE;
345
346 convert->f = ldexpf((float)mantisse, exponent);
347 }
348
349 convert->type |= EET_D_FLOAT;
350 }
351
352 *result = convert->f;
353 return EINA_TRUE;
354} /* eet_dictionary_string_get_float */
355
356Eina_Bool
357eet_dictionary_string_get_double(const Eet_Dictionary *ed,
358 int idx,
359 double *result)
360{
361 Eet_Convert *convert;
362 const char *str;
363
364 if (!_eet_dictionary_test(ed, idx, result))
365 return EINA_FALSE;
366
367 convert = eet_dictionary_convert_get(ed, idx, &str);
368 if (!convert) return EINA_FALSE;
369
370 if (!(convert->type & EET_D_DOUBLE))
371 {
372 if (!_eet_dictionary_string_get_double_cache(str, ed->all[idx].len,
373 &convert->d))
374 {
375 long long mantisse = 0;
376 long exponent = 0;
377
378 if (eina_convert_atod(str, ed->all[idx].len, &mantisse,
379 &exponent) == EINA_FALSE)
380 return EINA_FALSE;
381
382 convert->d = ldexp((double)mantisse, exponent);
383 }
384
385 convert->type |= EET_D_DOUBLE;
386 }
387
388 *result = convert->d;
389 return EINA_TRUE;
390} /* eet_dictionary_string_get_double */
391
392Eina_Bool
393eet_dictionary_string_get_fp(const Eet_Dictionary *ed,
394 int idx,
395 Eina_F32p32 *result)
396{
397 Eet_Convert *convert;
398 const char *str;
399
400 if (!_eet_dictionary_test(ed, idx, result))
401 return EINA_FALSE;
402
403 convert = eet_dictionary_convert_get(ed, idx, &str);
404 if (!convert) return EINA_FALSE;
405
406 if (!(convert->type & EET_D_FIXED_POINT))
407 {
408 Eina_F32p32 fp;
409
410 if (!eina_convert_atofp(str, ed->all[idx].len, &fp))
411 return EINA_FALSE;
412
413 convert->fp = fp;
414 convert->type |= EET_D_FIXED_POINT;
415 }
416
417 *result = convert->fp;
418 return EINA_TRUE;
419} /* eet_dictionary_string_get_fp */
420
421EAPI int
422eet_dictionary_string_check(Eet_Dictionary *ed,
423 const char *string)
424{
425 int i;
426
427 if ((!ed) || (!string))
428 return 0;
429
430 if ((ed->start <= string) && (string < ed->end))
431 return 1;
432
433 for (i = 0; i < ed->count; ++i)
434 if ((ed->all[i].allocated) && ed->all[i].str == string)
435 return 1;
436
437 return 0;
438} /* eet_dictionary_string_check */
439
diff --git a/libraries/eet/src/lib/eet_image.c b/libraries/eet/src/lib/eet_image.c
new file mode 100644
index 0000000..79f6f90
--- /dev/null
+++ b/libraries/eet/src/lib/eet_image.c
@@ -0,0 +1,1820 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#ifdef HAVE_ALLOCA_H
6# include <alloca.h>
7#elif defined __GNUC__
8# define alloca __builtin_alloca
9#elif defined _AIX
10# define alloca __alloca
11#elif defined _MSC_VER
12# include <malloc.h>
13# define alloca _alloca
14#else /* ifdef HAVE_ALLOCA_H */
15# include <stddef.h>
16# ifdef __cplusplus
17extern "C"
18# endif /* ifdef __cplusplus */
19void *alloca(size_t);
20#endif /* ifdef HAVE_ALLOCA_H */
21
22#ifdef HAVE_NETINET_IN_H
23# ifdef __OpenBSD__
24# include <sys/types.h>
25# endif /* ifdef __OpenBSD__ */
26# include <netinet/in.h>
27#endif /* ifdef HAVE_NETINET_IN_H */
28
29#ifdef _WIN32
30# include <winsock2.h>
31# define HAVE_BOOLEAN
32#endif /* ifdef _WIN32 */
33
34#include <stdio.h>
35#include <string.h>
36#include <setjmp.h>
37#include <zlib.h>
38#include <jpeglib.h>
39
40#include "Eet.h"
41#include "Eet_private.h"
42
43/*---*/
44
45typedef struct _JPEG_error_mgr *emptr;
46
47/*---*/
48
49struct _JPEG_error_mgr
50{
51 struct jpeg_error_mgr pub;
52 jmp_buf setjmp_buffer;
53};
54
55struct jpeg_membuf_src
56{
57 struct jpeg_source_mgr pub;
58
59 const unsigned char *buf;
60 size_t len;
61 struct jpeg_membuf_src *self;
62};
63
64static void
65_eet_jpeg_membuf_src_init(j_decompress_ptr cinfo)
66{
67 /* FIXME: Use attribute unused */
68 (void)cinfo;
69} /* _eet_jpeg_membuf_src_init */
70
71static boolean
72_eet_jpeg_membuf_src_fill(j_decompress_ptr cinfo)
73{
74 static const JOCTET jpeg_eoi[2] = { 0xFF, JPEG_EOI };
75 struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src;
76
77 src->pub.bytes_in_buffer = sizeof(jpeg_eoi);
78 src->pub.next_input_byte = jpeg_eoi;
79
80 return TRUE;
81} /* _eet_jpeg_membuf_src_fill */
82
83static void
84_eet_jpeg_membuf_src_skip(j_decompress_ptr cinfo,
85 long num_bytes)
86{
87 struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src;
88
89 src->pub.bytes_in_buffer -= num_bytes;
90 src->pub.next_input_byte += num_bytes;
91} /* _eet_jpeg_membuf_src_skip */
92
93static void
94_eet_jpeg_membuf_src_term(j_decompress_ptr cinfo)
95{
96 struct jpeg_membuf_src *src = ((struct jpeg_membuf_src *)cinfo->src)->self;
97
98 free(src);
99 cinfo->src = NULL;
100} /* _eet_jpeg_membuf_src_term */
101
102static int
103eet_jpeg_membuf_src(j_decompress_ptr cinfo,
104 const void *buf,
105 size_t len)
106{
107 struct jpeg_membuf_src *src;
108
109 src = calloc(1, sizeof(*src));
110 if (!src)
111 return -1;
112
113 src->self = src;
114
115 cinfo->src = &src->pub;
116 src->buf = buf;
117 src->len = len;
118 src->pub.init_source = _eet_jpeg_membuf_src_init;
119 src->pub.fill_input_buffer = _eet_jpeg_membuf_src_fill;
120 src->pub.skip_input_data = _eet_jpeg_membuf_src_skip;
121 src->pub.resync_to_restart = jpeg_resync_to_restart;
122 src->pub.term_source = _eet_jpeg_membuf_src_term;
123 src->pub.bytes_in_buffer = src->len;
124 src->pub.next_input_byte = src->buf;
125
126 return 0;
127} /* eet_jpeg_membuf_src */
128
129struct jpeg_membuf_dst
130{
131 struct jpeg_destination_mgr pub;
132
133 void **dst_buf;
134 size_t *dst_len;
135
136 unsigned char *buf;
137 size_t len;
138 int failed;
139 struct jpeg_membuf_dst *self;
140};
141
142static void
143_eet_jpeg_membuf_dst_init(j_compress_ptr cinfo)
144{
145 /* FIXME: Use eina attribute */
146 (void)cinfo;
147} /* _eet_jpeg_membuf_dst_init */
148
149static boolean
150_eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo)
151{
152 struct jpeg_membuf_dst *dst = (struct jpeg_membuf_dst *)cinfo->dest;
153 unsigned char *buf;
154
155 if (dst->len >= 0x40000000 ||
156 !(buf = realloc(dst->buf, dst->len * 2)))
157 {
158 dst->failed = 1;
159 dst->pub.next_output_byte = dst->buf;
160 dst->pub.free_in_buffer = dst->len;
161 return TRUE;
162 }
163
164 dst->pub.next_output_byte =
165 buf + ((unsigned char *)dst->pub.next_output_byte - dst->buf);
166 dst->buf = buf;
167 dst->pub.free_in_buffer += dst->len;
168 dst->len *= 2;
169
170 return FALSE;
171} /* _eet_jpeg_membuf_dst_flush */
172
173static void
174_eet_jpeg_membuf_dst_term(j_compress_ptr cinfo)
175{
176 struct jpeg_membuf_dst *dst = ((struct jpeg_membuf_dst *)cinfo->dest)->self;
177
178 if (dst->failed)
179 {
180 *dst->dst_buf = NULL;
181 *dst->dst_len = 0;
182 free(dst->buf);
183 }
184 else
185 {
186 *dst->dst_buf = dst->buf;
187 *dst->dst_len = (unsigned char *)dst->pub.next_output_byte - dst->buf;
188 }
189
190 free(dst);
191 cinfo->dest = NULL;
192} /* _eet_jpeg_membuf_dst_term */
193
194static int
195eet_jpeg_membuf_dst(j_compress_ptr cinfo,
196 void **buf,
197 size_t *len)
198{
199 struct jpeg_membuf_dst *dst;
200
201 dst = calloc(1, sizeof(*dst));
202 if (!dst)
203 return -1;
204
205 dst->buf = malloc(32768);
206 if (!dst->buf)
207 {
208 free(dst);
209 return -1;
210 }
211
212 dst->self = dst;
213 dst->len = 32768;
214
215 cinfo->dest = &dst->pub;
216 dst->pub.init_destination = _eet_jpeg_membuf_dst_init;
217 dst->pub.empty_output_buffer = _eet_jpeg_membuf_dst_flush;
218 dst->pub.term_destination = _eet_jpeg_membuf_dst_term;
219 dst->pub.free_in_buffer = dst->len;
220 dst->pub.next_output_byte = dst->buf;
221 dst->dst_buf = buf;
222 dst->dst_len = len;
223 dst->failed = 0;
224
225 return 0;
226} /* eet_jpeg_membuf_dst */
227
228/*---*/
229
230static void _JPEGFatalErrorHandler(j_common_ptr cinfo);
231static void _JPEGErrorHandler(j_common_ptr cinfo);
232static void _JPEGErrorHandler2(j_common_ptr cinfo,
233 int msg_level);
234
235static int
236eet_data_image_jpeg_header_decode(const void *data,
237 int size,
238 unsigned int *w,
239 unsigned int *h);
240static int
241eet_data_image_jpeg_rgb_decode(const void *data,
242 int size,
243 unsigned int src_x,
244 unsigned int src_y,
245 unsigned int *d,
246 unsigned int w,
247 unsigned int h,
248 unsigned int row_stride);
249static void *
250eet_data_image_jpeg_alpha_decode(const void *data,
251 int size,
252 unsigned int src_x,
253 unsigned int src_y,
254 unsigned int *d,
255 unsigned int w,
256 unsigned int h,
257 unsigned int row_stride);
258static void *
259eet_data_image_lossless_convert(int *size,
260 const void *data,
261 unsigned int w,
262 unsigned int h,
263 int alpha);
264static void *
265eet_data_image_lossless_compressed_convert(int *size,
266 const void *data,
267 unsigned int w,
268 unsigned int h,
269 int alpha,
270 int compression);
271static void *
272eet_data_image_jpeg_convert(int *size,
273 const void *data,
274 unsigned int w,
275 unsigned int h,
276 int alpha,
277 int quality);
278static void *
279eet_data_image_jpeg_alpha_convert(int *size,
280 const void *data,
281 unsigned int w,
282 unsigned int h,
283 int alpha,
284 int quality);
285
286/*---*/
287
288static int _eet_image_words_bigendian = -1;
289
290/*---*/
291
292#define SWAP64(x) (x) = \
293 ((((unsigned long long)(x) & 0x00000000000000ffULL) << 56) | \
294 (((unsigned long long)(x) & 0x000000000000ff00ULL) << 40) | \
295 (((unsigned long long)(x) & 0x0000000000ff0000ULL) << 24) | \
296 (((unsigned long long)(x) & 0x00000000ff000000ULL) << 8) | \
297 (((unsigned long long)(x) & 0x000000ff00000000ULL) >> 8) | \
298 (((unsigned long long)(x) & 0x0000ff0000000000ULL) >> 24) | \
299 (((unsigned long long)(x) & 0x00ff000000000000ULL) >> 40) | \
300 (((unsigned long long)(x) & 0xff00000000000000ULL) >> 56))
301#define SWAP32(x) (x) = \
302 ((((int)(x) & 0x000000ff) << 24) | \
303 (((int)(x) & 0x0000ff00) << 8) | \
304 (((int)(x) & 0x00ff0000) >> 8) | \
305 (((int)(x) & 0xff000000) >> 24))
306#define SWAP16(x) (x) = \
307 ((((short)(x) & 0x00ff) << 8) | \
308 (((short)(x) & 0xff00) >> 8))
309
310#ifdef CONV8
311# undef CONV8
312#endif /* ifdef CONV8 */
313#ifdef CONV16
314# undef CONV16
315#endif /* ifdef CONV16 */
316#ifdef CONV32
317# undef CONV32
318#endif /* ifdef CONV32 */
319#ifdef CONV64
320# undef CONV64
321#endif /* ifdef CONV64 */
322
323#define CONV8(x)
324#define CONV16(x) {if (_eet_image_words_bigendian) {SWAP16(x); }}
325#define CONV32(x) {if (_eet_image_words_bigendian) {SWAP32(x); }}
326#define CONV64(x) {if (_eet_image_words_bigendian) {SWAP64(x); }}
327
328/*---*/
329
330static void
331_JPEGFatalErrorHandler(j_common_ptr cinfo)
332{
333 emptr errmgr;
334
335 errmgr = (emptr)cinfo->err;
336 /* cinfo->err->output_message(cinfo);*/
337 longjmp(errmgr->setjmp_buffer, 1);
338 return;
339} /* _JPEGFatalErrorHandler */
340
341static void
342_JPEGErrorHandler(j_common_ptr cinfo __UNUSED__)
343{
344 /* emptr errmgr; */
345
346 /* errmgr = (emptr) cinfo->err; */
347 /* cinfo->err->output_message(cinfo);*/
348 /* longjmp(errmgr->setjmp_buffer, 1);*/
349 return;
350} /* _JPEGErrorHandler */
351
352static void
353_JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__,
354 int msg_level __UNUSED__)
355{
356 /* emptr errmgr; */
357
358 /* errmgr = (emptr) cinfo->err; */
359 /* cinfo->err->output_message(cinfo);*/
360 /* longjmp(errmgr->setjmp_buffer, 1);*/
361 return;
362} /* _JPEGErrorHandler2 */
363
364static int
365eet_data_image_jpeg_header_decode(const void *data,
366 int size,
367 unsigned int *w,
368 unsigned int *h)
369{
370 struct jpeg_decompress_struct cinfo;
371 struct _JPEG_error_mgr jerr;
372
373 memset(&cinfo, 0, sizeof (struct jpeg_decompress_struct));
374
375 cinfo.err = jpeg_std_error(&(jerr.pub));
376 jerr.pub.error_exit = _JPEGFatalErrorHandler;
377 jerr.pub.emit_message = _JPEGErrorHandler2;
378 jerr.pub.output_message = _JPEGErrorHandler;
379 if (setjmp(jerr.setjmp_buffer))
380 return 0;
381
382 jpeg_create_decompress(&cinfo);
383
384 if (eet_jpeg_membuf_src(&cinfo, data, (size_t)size))
385 {
386 jpeg_destroy_decompress(&cinfo);
387 return 0;
388 }
389
390 jpeg_read_header(&cinfo, TRUE);
391 cinfo.do_fancy_upsampling = FALSE;
392 cinfo.do_block_smoothing = FALSE;
393 jpeg_start_decompress(&cinfo);
394
395 /* head decoding */
396 *w = cinfo.output_width;
397 *h = cinfo.output_height;
398
399 free(cinfo.src);
400 cinfo.src = NULL;
401
402 jpeg_destroy_decompress(&cinfo);
403
404 if ((*w < 1) || (*h < 1) || (*w > 8192) || (*h > 8192))
405 return 0;
406
407 return 1;
408} /* eet_data_image_jpeg_header_decode */
409
410static int
411eet_data_image_jpeg_rgb_decode(const void *data,
412 int size,
413 unsigned int src_x,
414 unsigned int src_y,
415 unsigned int *d,
416 unsigned int w,
417 unsigned int h,
418 unsigned int row_stride)
419{
420 struct jpeg_decompress_struct cinfo;
421 struct _JPEG_error_mgr jerr;
422 unsigned char *ptr, *line[16], *tdata = NULL;
423 unsigned int *ptr2, *tmp;
424 unsigned int iw, ih;
425 unsigned int x, y, l, scans;
426 unsigned int i;
427
428 /* FIXME: handle src_x, src_y and row_stride correctly */
429 if (!d)
430 return 0;
431
432 memset(&cinfo, 0, sizeof (struct jpeg_decompress_struct));
433
434 cinfo.err = jpeg_std_error(&(jerr.pub));
435 jerr.pub.error_exit = _JPEGFatalErrorHandler;
436 jerr.pub.emit_message = _JPEGErrorHandler2;
437 jerr.pub.output_message = _JPEGErrorHandler;
438 if (setjmp(jerr.setjmp_buffer))
439 return 0;
440
441 jpeg_create_decompress(&cinfo);
442
443 if (eet_jpeg_membuf_src(&cinfo, data, (size_t)size))
444 {
445 jpeg_destroy_decompress(&cinfo);
446 return 0;
447 }
448
449 jpeg_read_header(&cinfo, TRUE);
450 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
451 cinfo.do_fancy_upsampling = FALSE;
452 cinfo.do_block_smoothing = FALSE;
453 jpeg_start_decompress(&cinfo);
454
455 /* head decoding */
456 iw = cinfo.output_width;
457 ih = cinfo.output_height;
458 if ((iw != w) || (ih != h))
459 {
460 free(cinfo.src);
461 cinfo.src = NULL;
462
463 jpeg_destroy_decompress(&cinfo);
464 return 0;
465 }
466
467 /* end head decoding */
468 /* data decoding */
469 if (cinfo.rec_outbuf_height > 16)
470 {
471 free(cinfo.src);
472 cinfo.src = NULL;
473
474 jpeg_destroy_decompress(&cinfo);
475 return 0;
476 }
477
478 tdata = alloca((iw) * 16 * 3);
479 ptr2 = d;
480
481 if (cinfo.output_components == 3)
482 {
483 for (i = 0; i < (unsigned int)cinfo.rec_outbuf_height; i++)
484 line[i] = tdata + (i * (iw) * 3);
485 for (l = 0; l < ih; l += cinfo.rec_outbuf_height)
486 {
487 jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height);
488 scans = cinfo.rec_outbuf_height;
489 if ((ih - l) < scans)
490 scans = ih - l;
491
492 ptr = tdata;
493
494 if (l + scans >= src_y && l < src_y + h)
495 {
496 y = src_y - l;
497 if (src_y < l)
498 y = 0;
499
500 for (ptr += 3 * iw * y; y < scans && (y + l) < (src_y + h);
501 y++)
502 {
503 tmp = ptr2;
504 ptr += 3 * src_x;
505 for (x = 0; x < w; x++)
506 {
507 *ptr2 =
508 (0xff000000) |
509 ((ptr[0]) << 16) | ((ptr[1]) << 8) | (ptr[2]);
510 ptr += 3;
511 ptr2++;
512 }
513 ptr += 3 * (iw - w);
514 ptr2 = tmp + row_stride / 4;
515 }
516 }
517 }
518 }
519 else if (cinfo.output_components == 1)
520 {
521 for (i = 0; i < (unsigned int)cinfo.rec_outbuf_height; i++)
522 line[i] = tdata + (i * (iw));
523 for (l = 0; l < (ih); l += cinfo.rec_outbuf_height)
524 {
525 jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height);
526 scans = cinfo.rec_outbuf_height;
527 if (((ih) - l) < scans)
528 scans = (ih) - l;
529
530 ptr = tdata;
531
532 if (l >= src_y && l < src_y + h)
533 {
534 y = src_y - l;
535 if (src_y < l)
536 y = 0;
537
538 for (ptr += iw * y; y < scans && (y + l) < (src_y + h); y++)
539 {
540 tmp = ptr2;
541 ptr += src_x;
542 for (x = 0; x < w; x++)
543 {
544 *ptr2 =
545 (0xff000000) |
546 ((ptr[0]) << 16) | ((ptr[0]) << 8) | (ptr[0]);
547 ptr++;
548 ptr2++;
549 }
550 ptr += iw - w;
551 ptr2 = tmp + row_stride / 4;
552 }
553 }
554 }
555 }
556
557 /* end data decoding */
558 jpeg_finish_decompress(&cinfo);
559 jpeg_destroy_decompress(&cinfo);
560 return 1;
561} /* eet_data_image_jpeg_rgb_decode */
562
563static void *
564eet_data_image_jpeg_alpha_decode(const void *data,
565 int size,
566 unsigned int src_x,
567 unsigned int src_y,
568 unsigned int *d,
569 unsigned int w,
570 unsigned int h,
571 unsigned int row_stride)
572{
573 struct jpeg_decompress_struct cinfo;
574 struct _JPEG_error_mgr jerr;
575 unsigned char *ptr, *line[16], *tdata = NULL;
576 unsigned int *ptr2, *tmp;
577 unsigned int x, y, l, scans;
578 unsigned int i, iw;
579
580 memset(&cinfo, 0, sizeof (struct jpeg_decompress_struct));
581
582 cinfo.err = jpeg_std_error(&(jerr.pub));
583 jerr.pub.error_exit = _JPEGFatalErrorHandler;
584 jerr.pub.emit_message = _JPEGErrorHandler2;
585 jerr.pub.output_message = _JPEGErrorHandler;
586 if (setjmp(jerr.setjmp_buffer))
587 return NULL;
588
589 jpeg_create_decompress(&cinfo);
590
591 if (eet_jpeg_membuf_src(&cinfo, data, (size_t)size))
592 {
593 jpeg_destroy_decompress(&cinfo);
594 return NULL;
595 }
596
597 jpeg_read_header(&cinfo, TRUE);
598 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
599 cinfo.do_fancy_upsampling = FALSE;
600 cinfo.do_block_smoothing = FALSE;
601 jpeg_start_decompress(&cinfo);
602
603 /* head decoding */
604 iw = cinfo.output_width;
605 if (w != cinfo.output_width
606 || h != cinfo.output_height)
607 {
608 free(cinfo.src);
609 cinfo.src = NULL;
610
611 jpeg_destroy_decompress(&cinfo);
612 return NULL;
613 }
614
615 /* end head decoding */
616 /* data decoding */
617 if (cinfo.rec_outbuf_height > 16)
618 {
619 free(cinfo.src);
620 cinfo.src = NULL;
621
622 jpeg_destroy_decompress(&cinfo);
623 return NULL;
624 }
625
626 tdata = alloca(w * 16 * 3);
627 ptr2 = d;
628 if (cinfo.output_components == 1)
629 {
630 for (i = 0; i < (unsigned int)cinfo.rec_outbuf_height; i++)
631 line[i] = tdata + (i * w);
632 for (l = 0; l < h; l += cinfo.rec_outbuf_height)
633 {
634 jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height);
635 scans = cinfo.rec_outbuf_height;
636 if ((h - l) < scans)
637 scans = h - l;
638
639 ptr = tdata;
640
641 if (l >= src_y && l < src_y + h)
642 {
643 y = src_y - l;
644 if (src_y < l)
645 y = 0;
646
647 for (ptr += iw * y; y < scans && (y + l) < (src_y + h); y++)
648 {
649 tmp = ptr2;
650 ptr += src_x;
651 for (x = 0; x < w; x++)
652 {
653 *ptr2 =
654 ((*ptr2) & 0x00ffffff) |
655 ((ptr[0]) << 24);
656 ptr++;
657 ptr2++;
658 }
659 ptr += iw - w;
660 ptr2 = tmp + row_stride / 4;
661 }
662 }
663 }
664 }
665
666 /* end data decoding */
667 jpeg_finish_decompress(&cinfo);
668 jpeg_destroy_decompress(&cinfo);
669 return d;
670} /* eet_data_image_jpeg_alpha_decode */
671
672static void *
673eet_data_image_lossless_convert(int *size,
674 const void *data,
675 unsigned int w,
676 unsigned int h,
677 int alpha)
678{
679 if (_eet_image_words_bigendian == -1)
680 {
681 unsigned long int v;
682
683 v = htonl(0x12345678);
684 if (v == 0x12345678)
685 _eet_image_words_bigendian = 1;
686 else
687 _eet_image_words_bigendian = 0;
688 }
689
690 {
691 unsigned char *d;
692 int *header;
693
694 d = malloc((w * h * 4) + (8 * 4));
695 if (!d)
696 return NULL;
697
698 header = (int *)d;
699 memset(d, 0, 32);
700
701 header[0] = 0xac1dfeed;
702 header[1] = w;
703 header[2] = h;
704 header[3] = alpha;
705
706 memcpy(d + 32, data, w * h * 4);
707
708 if (_eet_image_words_bigendian)
709 {
710 unsigned int i;
711
712 for (i = 0; i < ((w * h) + 8); i++) SWAP32(header[i]);
713 }
714
715 *size = ((w * h * 4) + (8 * 4));
716 return d;
717 }
718} /* eet_data_image_lossless_convert */
719
720static void *
721eet_data_image_lossless_compressed_convert(int *size,
722 const void *data,
723 unsigned int w,
724 unsigned int h,
725 int alpha,
726 int compression)
727{
728 if (_eet_image_words_bigendian == -1)
729 {
730 unsigned long int v;
731
732 v = htonl(0x12345678);
733 if (v == 0x12345678)
734 _eet_image_words_bigendian = 1;
735 else
736 _eet_image_words_bigendian = 0;
737 }
738
739 {
740 unsigned char *d;
741 unsigned char *comp;
742 int *header;
743 int ret;
744 uLongf buflen;
745
746 d = malloc((w * h * 4) + (8 * 4));
747 if (!d)
748 return NULL;
749
750 buflen = (((w * h * 101) / 100) + 3) * 4;
751 comp = malloc(buflen);
752 if (!comp)
753 {
754 free(d);
755 return NULL;
756 }
757
758 header = (int *)d;
759 memset(d, 0, 32);
760
761 header[0] = 0xac1dfeed;
762 header[1] = w;
763 header[2] = h;
764 header[3] = alpha;
765 header[4] = compression;
766 memcpy(d + 32, data, w * h * 4);
767
768 if (_eet_image_words_bigendian)
769 {
770 unsigned int i;
771
772 for (i = 0; i < ((w * h) + 8); i++) SWAP32(header[i]);
773 }
774
775 ret = compress2((Bytef *)comp, &buflen,
776 (Bytef *)(d + 32),
777 (uLong)(w * h * 4),
778 compression);
779 if (ret != Z_OK || buflen > (w * h * 4))
780 {
781 free(comp);
782 free(d);
783 *size = -1;
784 return NULL;
785 }
786
787 memcpy(d + 32, comp, buflen);
788 *size = (8 * 4) + buflen;
789 free(comp);
790 return d;
791 }
792} /* eet_data_image_lossless_compressed_convert */
793
794static void *
795eet_data_image_jpeg_convert(int *size,
796 const void *data,
797 unsigned int w,
798 unsigned int h,
799 int alpha,
800 int quality)
801{
802 struct jpeg_compress_struct cinfo;
803 struct _JPEG_error_mgr jerr;
804 const int *ptr;
805 void *d = NULL;
806 size_t sz = 0;
807 JSAMPROW *jbuf;
808 unsigned char *buf;
809
810 (void)alpha; /* unused */
811
812 buf = alloca(3 * w);
813
814 memset(&cinfo, 0, sizeof (struct jpeg_compress_struct));
815
816 cinfo.err = jpeg_std_error(&(jerr.pub));
817 jerr.pub.error_exit = _JPEGFatalErrorHandler;
818 jerr.pub.emit_message = _JPEGErrorHandler2;
819 jerr.pub.output_message = _JPEGErrorHandler;
820 if (setjmp(jerr.setjmp_buffer))
821 return NULL;
822
823 jpeg_create_compress(&cinfo);
824
825 if (eet_jpeg_membuf_dst(&cinfo, &d, &sz))
826 {
827 jpeg_destroy_compress(&cinfo);
828 return NULL;
829 }
830
831 cinfo.image_width = w;
832 cinfo.image_height = h;
833 cinfo.input_components = 3;
834 cinfo.in_color_space = JCS_RGB;
835 cinfo.optimize_coding = FALSE;
836 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
837 if (quality < 60) cinfo.dct_method = JDCT_IFAST;
838 jpeg_set_defaults(&cinfo);
839 jpeg_set_quality(&cinfo, quality, TRUE);
840
841 if (quality >= 90)
842 {
843 cinfo.comp_info[0].h_samp_factor = 1;
844 cinfo.comp_info[0].v_samp_factor = 1;
845 cinfo.comp_info[1].h_samp_factor = 1;
846 cinfo.comp_info[1].v_samp_factor = 1;
847 cinfo.comp_info[2].h_samp_factor = 1;
848 cinfo.comp_info[2].v_samp_factor = 1;
849 }
850
851 jpeg_start_compress(&cinfo, TRUE);
852
853 while (cinfo.next_scanline < cinfo.image_height)
854 {
855 unsigned int i, j;
856
857 /* convert scaline from ARGB to RGB packed */
858 ptr = ((const int *)data) + cinfo.next_scanline * w;
859 for (j = 0, i = 0; i < w; i++)
860 {
861 buf[j++] = ((*ptr) >> 16) & 0xff;
862 buf[j++] = ((*ptr) >> 8) & 0xff;
863 buf[j++] = ((*ptr)) & 0xff;
864 ptr++;
865 }
866 jbuf = (JSAMPROW *)(&buf);
867 jpeg_write_scanlines(&cinfo, jbuf, 1);
868 }
869
870 jpeg_finish_compress(&cinfo);
871 jpeg_destroy_compress(&cinfo);
872
873 *size = sz;
874 return d;
875} /* eet_data_image_jpeg_convert */
876
877static void *
878eet_data_image_jpeg_alpha_convert(int *size,
879 const void *data,
880 unsigned int w,
881 unsigned int h,
882 int alpha,
883 int quality)
884{
885 unsigned char *d1, *d2;
886 unsigned char *d;
887 int *header;
888 int sz1, sz2;
889
890 (void)alpha; /* unused */
891
892 if (_eet_image_words_bigendian == -1)
893 {
894 unsigned long int v;
895
896 v = htonl(0x12345678);
897 if (v == 0x12345678)
898 _eet_image_words_bigendian = 1;
899 else
900 _eet_image_words_bigendian = 0;
901 }
902
903 {
904 const int *ptr;
905 void *dst = NULL;
906 size_t sz = 0;
907 struct _JPEG_error_mgr jerr;
908 JSAMPROW *jbuf;
909 struct jpeg_compress_struct cinfo;
910 unsigned char *buf;
911
912 buf = alloca(3 * w);
913
914 cinfo.err = jpeg_std_error(&(jerr.pub));
915 jerr.pub.error_exit = _JPEGFatalErrorHandler;
916 jerr.pub.emit_message = _JPEGErrorHandler2;
917 jerr.pub.output_message = _JPEGErrorHandler;
918 if (setjmp(jerr.setjmp_buffer))
919 return NULL;
920
921 jpeg_create_compress(&cinfo);
922 if (eet_jpeg_membuf_dst(&cinfo, &dst, &sz))
923 {
924 jpeg_destroy_compress(&cinfo);
925 return NULL;
926 }
927
928 cinfo.image_width = w;
929 cinfo.image_height = h;
930 cinfo.input_components = 3;
931 cinfo.in_color_space = JCS_RGB;
932 cinfo.optimize_coding = FALSE;
933 cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss)
934 if (quality < 60) cinfo.dct_method = JDCT_IFAST;
935 jpeg_set_defaults(&cinfo);
936 jpeg_set_quality(&cinfo, quality, TRUE);
937 if (quality >= 90)
938 {
939 cinfo.comp_info[0].h_samp_factor = 1;
940 cinfo.comp_info[0].v_samp_factor = 1;
941 cinfo.comp_info[1].h_samp_factor = 1;
942 cinfo.comp_info[1].v_samp_factor = 1;
943 cinfo.comp_info[2].h_samp_factor = 1;
944 cinfo.comp_info[2].v_samp_factor = 1;
945 }
946
947 jpeg_start_compress(&cinfo, TRUE);
948
949 while (cinfo.next_scanline < cinfo.image_height)
950 {
951 unsigned int i, j;
952
953 ptr = ((const int *)data) + cinfo.next_scanline * w;
954 /* convert scaline from ARGB to RGB packed */
955 for (j = 0, i = 0; i < w; i++)
956 {
957 buf[j++] = ((*ptr) >> 16) & 0xff;
958 buf[j++] = ((*ptr) >> 8) & 0xff;
959 buf[j++] = ((*ptr)) & 0xff;
960 ptr++;
961 }
962 jbuf = (JSAMPROW *)(&buf);
963 jpeg_write_scanlines(&cinfo, jbuf, 1);
964 }
965
966 jpeg_finish_compress(&cinfo);
967 jpeg_destroy_compress(&cinfo);
968
969 d1 = dst;
970 sz1 = sz;
971 }
972 {
973 const int *ptr;
974 void *dst = NULL;
975 size_t sz = 0;
976 struct _JPEG_error_mgr jerr;
977 JSAMPROW *jbuf;
978 struct jpeg_compress_struct cinfo;
979 unsigned char *buf;
980
981 buf = alloca(3 * w);
982
983 cinfo.err = jpeg_std_error(&(jerr.pub));
984 jerr.pub.error_exit = _JPEGFatalErrorHandler;
985 jerr.pub.emit_message = _JPEGErrorHandler2;
986 jerr.pub.output_message = _JPEGErrorHandler;
987 if (setjmp(jerr.setjmp_buffer))
988 {
989 free(d1);
990 return NULL;
991 }
992
993 jpeg_create_compress(&cinfo);
994 if (eet_jpeg_membuf_dst(&cinfo, &dst, &sz))
995 {
996 jpeg_destroy_compress(&cinfo);
997 free(d1);
998 return NULL;
999 }
1000
1001 cinfo.image_width = w;
1002 cinfo.image_height = h;
1003 cinfo.input_components = 1;
1004 cinfo.in_color_space = JCS_GRAYSCALE;
1005 jpeg_set_defaults(&cinfo);
1006 jpeg_set_quality(&cinfo, quality, TRUE);
1007 if (quality >= 90)
1008 {
1009 cinfo.comp_info[0].h_samp_factor = 1;
1010 cinfo.comp_info[0].v_samp_factor = 1;
1011 cinfo.comp_info[1].h_samp_factor = 1;
1012 cinfo.comp_info[1].v_samp_factor = 1;
1013 cinfo.comp_info[2].h_samp_factor = 1;
1014 cinfo.comp_info[2].v_samp_factor = 1;
1015 }
1016
1017 jpeg_start_compress(&cinfo, TRUE);
1018
1019 while (cinfo.next_scanline < cinfo.image_height)
1020 {
1021 unsigned int i, j;
1022
1023 ptr = ((const int *)data) + cinfo.next_scanline * w;
1024 /* convert scaline from ARGB to RGB packed */
1025 for (j = 0, i = 0; i < w; i++)
1026 {
1027 buf[j++] = ((*ptr) >> 24) & 0xff;
1028 ptr++;
1029 }
1030 jbuf = (JSAMPROW *)(&buf);
1031 jpeg_write_scanlines(&cinfo, jbuf, 1);
1032 }
1033
1034 jpeg_finish_compress(&cinfo);
1035 jpeg_destroy_compress(&cinfo);
1036
1037 d2 = dst;
1038 sz2 = sz;
1039 }
1040 d = malloc(12 + sz1 + sz2);
1041 if (!d)
1042 {
1043 free(d1);
1044 free(d2);
1045 return NULL;
1046 }
1047
1048 header = (int *)d;
1049 header[0] = 0xbeeff00d;
1050 header[1] = sz1;
1051 header[2] = sz2;
1052 if (_eet_image_words_bigendian)
1053 {
1054 int i;
1055
1056 for (i = 0; i < 3; i++) SWAP32(header[i]);
1057 }
1058
1059 memcpy(d + 12, d1, sz1);
1060 memcpy(d + 12 + sz1, d2, sz2);
1061
1062 free(d1);
1063 free(d2);
1064 *size = 12 + sz1 + sz2;
1065 return d;
1066} /* eet_data_image_jpeg_alpha_convert */
1067
1068EAPI int
1069eet_data_image_write_cipher(Eet_File *ef,
1070 const char *name,
1071 const char *cipher_key,
1072 const void *data,
1073 unsigned int w,
1074 unsigned int h,
1075 int alpha,
1076 int comp,
1077 int quality,
1078 int lossy)
1079{
1080 void *d = NULL;
1081 int size = 0;
1082
1083 d = eet_data_image_encode(data, &size, w, h, alpha, comp, quality, lossy);
1084 if (d)
1085 {
1086 int v;
1087
1088 v = eet_write_cipher(ef, name, d, size, 0, cipher_key);
1089 free(d);
1090 return v;
1091 }
1092
1093 return 0;
1094} /* eet_data_image_write_cipher */
1095
1096EAPI int
1097eet_data_image_write(Eet_File *ef,
1098 const char *name,
1099 const void *data,
1100 unsigned int w,
1101 unsigned int h,
1102 int alpha,
1103 int comp,
1104 int quality,
1105 int lossy)
1106{
1107 return eet_data_image_write_cipher(ef,
1108 name,
1109 NULL,
1110 data,
1111 w,
1112 h,
1113 alpha,
1114 comp,
1115 quality,
1116 lossy);
1117} /* eet_data_image_write */
1118
1119EAPI void *
1120eet_data_image_read_cipher(Eet_File *ef,
1121 const char *name,
1122 const char *cipher_key,
1123 unsigned int *w,
1124 unsigned int *h,
1125 int *alpha,
1126 int *comp,
1127 int *quality,
1128 int *lossy)
1129{
1130 unsigned int *d = NULL;
1131 void *data = NULL;
1132 int free_data = 0;
1133 int size;
1134
1135 if (!cipher_key)
1136 data = (void *)eet_read_direct(ef, name, &size);
1137
1138 if (!data)
1139 {
1140 data = eet_read_cipher(ef, name, &size, cipher_key);
1141 free_data = 1;
1142 if (!data)
1143 return NULL;
1144 }
1145
1146 d = eet_data_image_decode(data, size, w, h, alpha, comp, quality, lossy);
1147
1148 if (free_data)
1149 free(data);
1150
1151 return d;
1152} /* eet_data_image_read_cipher */
1153
1154EAPI void *
1155eet_data_image_read(Eet_File *ef,
1156 const char *name,
1157 unsigned int *w,
1158 unsigned int *h,
1159 int *alpha,
1160 int *comp,
1161 int *quality,
1162 int *lossy)
1163{
1164 return eet_data_image_read_cipher(ef, name, NULL, w, h, alpha,
1165 comp, quality, lossy);
1166} /* eet_data_image_read */
1167
1168EAPI int
1169eet_data_image_read_to_surface_cipher(Eet_File *ef,
1170 const char *name,
1171 const char *cipher_key,
1172 unsigned int src_x,
1173 unsigned int src_y,
1174 unsigned int *d,
1175 unsigned int w,
1176 unsigned int h,
1177 unsigned int row_stride,
1178 int *alpha,
1179 int *comp,
1180 int *quality,
1181 int *lossy)
1182{
1183 void *data = NULL;
1184 int free_data = 0;
1185 int res = 1;
1186 int size;
1187
1188 if (!cipher_key)
1189 data = (void *)eet_read_direct(ef, name, &size);
1190
1191 if (!data)
1192 {
1193 data = eet_read_cipher(ef, name, &size, cipher_key);
1194 free_data = 1;
1195 if (!data)
1196 return 0;
1197 }
1198
1199 res = eet_data_image_decode_to_surface(data, size, src_x, src_y, d,
1200 w, h, row_stride, alpha,
1201 comp, quality, lossy);
1202
1203 if (free_data)
1204 free(data);
1205
1206 return res;
1207} /* eet_data_image_read_to_surface_cipher */
1208
1209EAPI int
1210eet_data_image_read_to_surface(Eet_File *ef,
1211 const char *name,
1212 unsigned int src_x,
1213 unsigned int src_y,
1214 unsigned int *d,
1215 unsigned int w,
1216 unsigned int h,
1217 unsigned int row_stride,
1218 int *alpha,
1219 int *comp,
1220 int *quality,
1221 int *lossy)
1222{
1223 return eet_data_image_read_to_surface_cipher(ef, name, NULL,
1224 src_x, src_y, d,
1225 w, h, row_stride,
1226 alpha, comp, quality,
1227 lossy);
1228} /* eet_data_image_read_to_surface */
1229
1230EAPI int
1231eet_data_image_header_read_cipher(Eet_File *ef,
1232 const char *name,
1233 const char *cipher_key,
1234 unsigned int *w,
1235 unsigned int *h,
1236 int *alpha,
1237 int *comp,
1238 int *quality,
1239 int *lossy)
1240{
1241 void *data = NULL;
1242 int size = 0;
1243 int free_data = 0;
1244 int d;
1245
1246 if (!cipher_key)
1247 data = (void *)eet_read_direct(ef, name, &size);
1248
1249 if (!data)
1250 {
1251 data = eet_read_cipher(ef, name, &size, cipher_key);
1252 free_data = 1;
1253 if (!data)
1254 return 0;
1255 }
1256
1257 d = eet_data_image_header_decode(data, size, w, h, alpha,
1258 comp, quality, lossy);
1259 if (free_data)
1260 free(data);
1261
1262 return d;
1263} /* eet_data_image_header_read_cipher */
1264
1265EAPI int
1266eet_data_image_header_read(Eet_File *ef,
1267 const char *name,
1268 unsigned int *w,
1269 unsigned int *h,
1270 int *alpha,
1271 int *comp,
1272 int *quality,
1273 int *lossy)
1274{
1275 return eet_data_image_header_read_cipher(ef, name, NULL,
1276 w, h, alpha,
1277 comp, quality, lossy);
1278} /* eet_data_image_header_read */
1279
1280EAPI void *
1281eet_data_image_encode_cipher(const void *data,
1282 const char *cipher_key,
1283 unsigned int w,
1284 unsigned int h,
1285 int alpha,
1286 int comp,
1287 int quality,
1288 int lossy,
1289 int *size_ret)
1290{
1291 void *d = NULL;
1292 void *ciphered_d = NULL;
1293 unsigned int ciphered_sz = 0;
1294 int size = 0;
1295
1296 if (lossy == 0)
1297 {
1298 if (comp > 0)
1299 d = eet_data_image_lossless_compressed_convert(&size, data,
1300 w, h, alpha, comp);
1301
1302 /* eet_data_image_lossless_compressed_convert will refuse to compress something
1303 if the result is bigger than the entry. */
1304 if (comp <= 0 || !d)
1305 d = eet_data_image_lossless_convert(&size, data, w, h, alpha);
1306 }
1307 else
1308 {
1309 if (!alpha)
1310 d = eet_data_image_jpeg_convert(&size, data, w, h, alpha, quality);
1311 else
1312 d = eet_data_image_jpeg_alpha_convert(&size, data,
1313 w, h, alpha, quality);
1314 }
1315
1316 if (cipher_key)
1317 {
1318 if(!eet_cipher(d, size, cipher_key, strlen(cipher_key), &ciphered_d,
1319 &ciphered_sz))
1320 {
1321 if (d)
1322 free(d);
1323
1324 d = ciphered_d;
1325 size = ciphered_sz;
1326 }
1327 else
1328 if (ciphered_d)
1329 free(ciphered_d);
1330 }
1331
1332 if (size_ret)
1333 *size_ret = size;
1334
1335 return d;
1336} /* eet_data_image_encode_cipher */
1337
1338EAPI void *
1339eet_data_image_encode(const void *data,
1340 int *size_ret,
1341 unsigned int w,
1342 unsigned int h,
1343 int alpha,
1344 int comp,
1345 int quality,
1346 int lossy)
1347{
1348 return eet_data_image_encode_cipher(data, NULL, w, h, alpha,
1349 comp, quality, lossy, size_ret);
1350} /* eet_data_image_encode */
1351
1352EAPI int
1353eet_data_image_header_decode_cipher(const void *data,
1354 const char *cipher_key,
1355 int size,
1356 unsigned int *w,
1357 unsigned int *h,
1358 int *alpha,
1359 int *comp,
1360 int *quality,
1361 int *lossy)
1362{
1363 int header[8];
1364 void *deciphered_d = NULL;
1365 unsigned int deciphered_sz = 0;
1366
1367 if (cipher_key)
1368 {
1369 if (!eet_decipher(data, size, cipher_key, strlen(cipher_key),
1370 &deciphered_d, &deciphered_sz))
1371 {
1372 data = deciphered_d;
1373 size = deciphered_sz;
1374 }
1375 else
1376 if (deciphered_d)
1377 free(deciphered_d);
1378 }
1379
1380 if (_eet_image_words_bigendian == -1)
1381 {
1382 unsigned long int v;
1383
1384 v = htonl(0x12345678);
1385 if (v == 0x12345678)
1386 _eet_image_words_bigendian = 1;
1387 else
1388 _eet_image_words_bigendian = 0;
1389 }
1390
1391 if (size < 32)
1392 return 0;
1393
1394 memcpy(header, data, 32);
1395 if (_eet_image_words_bigendian)
1396 {
1397 int i;
1398
1399 for (i = 0; i < 8; i++) SWAP32(header[i]);
1400 }
1401
1402 if ((unsigned)header[0] == 0xac1dfeed)
1403 {
1404 int iw, ih, al, cp;
1405
1406 iw = header[1];
1407 ih = header[2];
1408 al = header[3];
1409 cp = header[4];
1410 if ((iw < 1) || (ih < 1) || (iw > 8192) || (ih > 8192))
1411 return 0;
1412
1413 if ((cp == 0) && (size < ((iw * ih * 4) + 32)))
1414 return 0;
1415
1416 if (w)
1417 *w = iw;
1418
1419 if (h)
1420 *h = ih;
1421
1422 if (alpha)
1423 *alpha = al ? 1 : 0;
1424
1425 if (comp)
1426 *comp = cp;
1427
1428 if (lossy)
1429 *lossy = 0;
1430
1431 if (quality)
1432 *quality = 100;
1433
1434 return 1;
1435 }
1436 else if ((unsigned)header[0] == 0xbeeff00d)
1437 {
1438 unsigned int iw = 0, ih = 0;
1439 unsigned const char *dt;
1440 int sz1;
1441 int ok;
1442
1443 sz1 = header[1];
1444/* sz2 = header[2]; */
1445 dt = data;
1446 dt += 12;
1447 ok = eet_data_image_jpeg_header_decode(dt, sz1, &iw, &ih);
1448 if (ok)
1449 {
1450 if (w)
1451 *w = iw;
1452
1453 if (h)
1454 *h = ih;
1455
1456 if (alpha)
1457 *alpha = 1;
1458
1459 if (comp)
1460 *comp = 0;
1461
1462 if (lossy)
1463 *lossy = 1;
1464
1465 if (quality)
1466 *quality = 75;
1467
1468 return 1;
1469 }
1470 }
1471 else
1472 {
1473 unsigned int iw = 0, ih = 0;
1474 int ok;
1475
1476 ok = eet_data_image_jpeg_header_decode(data, size, &iw, &ih);
1477 if (ok)
1478 {
1479 if (w)
1480 *w = iw;
1481
1482 if (h)
1483 *h = ih;
1484
1485 if (alpha)
1486 *alpha = 0;
1487
1488 if (comp)
1489 *comp = 0;
1490
1491 if (lossy)
1492 *lossy = 1;
1493
1494 if (quality)
1495 *quality = 75;
1496
1497 return 1;
1498 }
1499 }
1500
1501 return 0;
1502} /* eet_data_image_header_decode_cipher */
1503
1504EAPI int
1505eet_data_image_header_decode(const void *data,
1506 int size,
1507 unsigned int *w,
1508 unsigned int *h,
1509 int *alpha,
1510 int *comp,
1511 int *quality,
1512 int *lossy)
1513{
1514 return eet_data_image_header_decode_cipher(data,
1515 NULL,
1516 size,
1517 w,
1518 h,
1519 alpha,
1520 comp,
1521 quality,
1522 lossy);
1523} /* eet_data_image_header_decode */
1524
1525static void
1526_eet_data_image_copy_buffer(const unsigned int *src,
1527 unsigned int src_x,
1528 unsigned int src_y,
1529 unsigned int src_w,
1530 unsigned int *dst,
1531 unsigned int w,
1532 unsigned int h,
1533 unsigned int row_stride)
1534{
1535 src += src_x + src_y * src_w;
1536
1537 if (row_stride == src_w * 4 && w == src_w)
1538 memcpy(dst, src, row_stride * h);
1539 else
1540 {
1541 unsigned int *over = dst;
1542 unsigned int y;
1543
1544 for (y = 0; y < h; ++y, src += src_w, over += row_stride)
1545 memcpy(over, src, w * 4);
1546 }
1547} /* _eet_data_image_copy_buffer */
1548
1549static int
1550_eet_data_image_decode_inside(const void *data,
1551 int size,
1552 unsigned int src_x,
1553 unsigned int src_y,
1554 unsigned int src_w,
1555 unsigned int src_h,
1556 unsigned int *d,
1557 unsigned int w,
1558 unsigned int h,
1559 unsigned int row_stride,
1560 int alpha,
1561 int comp,
1562 int quality,
1563 int lossy)
1564{
1565 if (lossy == 0 && quality == 100)
1566 {
1567 unsigned int *body;
1568
1569 body = ((unsigned int *)data) + 8;
1570 if (!comp)
1571 _eet_data_image_copy_buffer(body, src_x, src_y, src_w, d,
1572 w, h, row_stride);
1573 else
1574 {
1575 if (src_h == h && src_w == w && row_stride == src_w * 4)
1576 {
1577 uLongf dlen;
1578
1579 dlen = w * h * 4;
1580 uncompress((Bytef *)d, &dlen, (Bytef *)body,
1581 (uLongf)(size - 32));
1582 }
1583 else
1584 {
1585 Bytef *dtmp;
1586 uLongf dlen = src_w * src_h * 4;
1587
1588 /* FIXME: This could create a huge alloc. So compressed
1589 data and tile could not always work. */
1590 dtmp = malloc(dlen);
1591 if (!dtmp)
1592 return 0;
1593
1594 uncompress(dtmp, &dlen, (Bytef *)body, (uLongf)(size - 32));
1595
1596 _eet_data_image_copy_buffer((unsigned int *)dtmp,
1597 src_x, src_y, src_w, d,
1598 w, h, row_stride);
1599
1600 free(dtmp);
1601 }
1602 }
1603
1604 /* Fix swapiness. */
1605 if (_eet_image_words_bigendian)
1606 {
1607 unsigned int x;
1608
1609 for (x = 0; x < (w * h); x++) SWAP32(d[x]);
1610 }
1611 }
1612 else if (comp == 0 && lossy == 1)
1613 {
1614 if (alpha)
1615 {
1616 unsigned const char *dt;
1617 int header[8];
1618 int sz1, sz2;
1619
1620 memcpy(header, data, 32);
1621 if (_eet_image_words_bigendian)
1622 {
1623 int i;
1624
1625 for (i = 0; i < 8; i++) SWAP32(header[i]);
1626 }
1627
1628 sz1 = header[1];
1629 sz2 = header[2];
1630 dt = data;
1631 dt += 12;
1632
1633 if (eet_data_image_jpeg_rgb_decode(dt, sz1, src_x, src_y, d, w, h,
1634 row_stride))
1635 {
1636 dt += sz1;
1637 if (!eet_data_image_jpeg_alpha_decode(dt, sz2, src_x, src_y,
1638 d, w, h, row_stride))
1639 return 0;
1640 }
1641 }
1642 else if (!eet_data_image_jpeg_rgb_decode(data, size, src_x, src_y, d, w,
1643 h, row_stride))
1644 return 0;
1645 }
1646 else
1647 abort();
1648
1649 return 1;
1650} /* _eet_data_image_decode_inside */
1651
1652EAPI void *
1653eet_data_image_decode_cipher(const void *data,
1654 const char *cipher_key,
1655 int size,
1656 unsigned int *w,
1657 unsigned int *h,
1658 int *alpha,
1659 int *comp,
1660 int *quality,
1661 int *lossy)
1662{
1663 unsigned int *d = NULL;
1664 unsigned int iw, ih;
1665 int ialpha, icompress, iquality, ilossy;
1666 void *deciphered_d = NULL;
1667 unsigned int deciphered_sz = 0;
1668
1669 if (cipher_key)
1670 {
1671 if (!eet_decipher(data, size, cipher_key, strlen(cipher_key),
1672 &deciphered_d, &deciphered_sz))
1673 {
1674 data = deciphered_d;
1675 size = deciphered_sz;
1676 }
1677 else
1678 if (deciphered_d)
1679 free(deciphered_d);
1680 }
1681
1682 /* All check are done during header decode, this simplify the code a lot. */
1683 if (!eet_data_image_header_decode(data, size, &iw, &ih, &ialpha, &icompress,
1684 &iquality, &ilossy))
1685 return NULL;
1686
1687 d = malloc(iw * ih * 4);
1688 if (!d)
1689 return NULL;
1690
1691 if (!_eet_data_image_decode_inside(data, size, 0, 0, iw, ih, d, iw, ih, iw *
1692 4, ialpha, icompress, iquality, ilossy))
1693 {
1694 free(d);
1695 return NULL;
1696 }
1697
1698 if (w)
1699 *w = iw;
1700
1701 if (h)
1702 *h = ih;
1703
1704 if (alpha)
1705 *alpha = ialpha;
1706
1707 if (comp)
1708 *comp = icompress;
1709
1710 if (quality)
1711 *quality = iquality;
1712
1713 if (lossy)
1714 *lossy = ilossy;
1715
1716 return d;
1717} /* eet_data_image_decode_cipher */
1718
1719EAPI void *
1720eet_data_image_decode(const void *data,
1721 int size,
1722 unsigned int *w,
1723 unsigned int *h,
1724 int *alpha,
1725 int *comp,
1726 int *quality,
1727 int *lossy)
1728{
1729 return eet_data_image_decode_cipher(data, NULL, size, w, h,
1730 alpha, comp, quality, lossy);
1731} /* eet_data_image_decode */
1732
1733EAPI int
1734eet_data_image_decode_to_surface_cipher(const void *data,
1735 const char *cipher_key,
1736 int size,
1737 unsigned int src_x,
1738 unsigned int src_y,
1739 unsigned int *d,
1740 unsigned int w,
1741 unsigned int h,
1742 unsigned int row_stride,
1743 int *alpha,
1744 int *comp,
1745 int *quality,
1746 int *lossy)
1747{
1748 unsigned int iw, ih;
1749 int ialpha, icompress, iquality, ilossy;
1750 void *deciphered_d = NULL;
1751 unsigned int deciphered_sz = 0;
1752
1753 if (cipher_key)
1754 {
1755 if (!eet_decipher(data, size, cipher_key, strlen(cipher_key),
1756 &deciphered_d, &deciphered_sz))
1757 {
1758 data = deciphered_d;
1759 size = deciphered_sz;
1760 }
1761 else
1762 if (deciphered_d)
1763 free(deciphered_d);
1764 }
1765
1766 /* All check are done during header decode, this simplify the code a lot. */
1767 if (!eet_data_image_header_decode(data, size, &iw, &ih, &ialpha, &icompress,
1768 &iquality, &ilossy))
1769 return 0;
1770
1771 if (!d)
1772 return 0;
1773
1774 if (w * 4 > row_stride)
1775 return 0;
1776
1777 if (w > iw || h > ih)
1778 return 0;
1779
1780 if (!_eet_data_image_decode_inside(data, size, src_x, src_y, iw, ih, d, w, h,
1781 row_stride, ialpha, icompress, iquality,
1782 ilossy))
1783 return 0;
1784
1785 if (alpha)
1786 *alpha = ialpha;
1787
1788 if (comp)
1789 *comp = icompress;
1790
1791 if (quality)
1792 *quality = iquality;
1793
1794 if (lossy)
1795 *lossy = ilossy;
1796
1797 return 1;
1798} /* eet_data_image_decode_to_surface_cipher */
1799
1800EAPI int
1801eet_data_image_decode_to_surface(const void *data,
1802 int size,
1803 unsigned int src_x,
1804 unsigned int src_y,
1805 unsigned int *d,
1806 unsigned int w,
1807 unsigned int h,
1808 unsigned int row_stride,
1809 int *alpha,
1810 int *comp,
1811 int *quality,
1812 int *lossy)
1813{
1814 return eet_data_image_decode_to_surface_cipher(data, NULL, size,
1815 src_x, src_y, d,
1816 w, h, row_stride,
1817 alpha, comp, quality,
1818 lossy);
1819} /* eet_data_image_decode_to_surface */
1820
diff --git a/libraries/eet/src/lib/eet_lib.c b/libraries/eet/src/lib/eet_lib.c
new file mode 100644
index 0000000..a0d6435
--- /dev/null
+++ b/libraries/eet/src/lib/eet_lib.c
@@ -0,0 +1,2648 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#ifdef HAVE_ALLOCA_H
6# include <alloca.h>
7#elif defined __GNUC__
8# define alloca __builtin_alloca
9#elif defined _AIX
10# define alloca __alloca
11#elif defined _MSC_VER
12# include <malloc.h>
13# define alloca _alloca
14#else /* ifdef HAVE_ALLOCA_H */
15# include <stddef.h>
16# ifdef __cplusplus
17extern "C"
18# endif /* ifdef __cplusplus */
19void *alloca(size_t);
20#endif /* ifdef HAVE_ALLOCA_H */
21
22#ifdef _WIN32
23# include <winsock2.h>
24#endif /* ifdef _WIN32 */
25
26#include <stdio.h>
27#include <errno.h>
28#include <sys/types.h>
29#include <sys/stat.h>
30#include <time.h>
31#include <string.h>
32#include <fnmatch.h>
33#include <fcntl.h>
34#include <zlib.h>
35
36#ifdef HAVE_UNISTD_H
37# include <unistd.h>
38#endif /* ifdef HAVE_UNISTD_H */
39
40#ifdef HAVE_NETINET_IN_H
41# include <netinet/in.h>
42#endif /* ifdef HAVE_NETINET_IN_H */
43
44#ifdef HAVE_EVIL
45# include <Evil.h>
46#endif /* ifdef HAVE_EVIL */
47
48#include <Eina.h>
49
50#ifdef HAVE_GNUTLS
51# include <gnutls/gnutls.h>
52# include <gcrypt.h>
53#endif /* ifdef HAVE_GNUTLS */
54
55#ifdef HAVE_OPENSSL
56# include <openssl/err.h>
57# include <openssl/evp.h>
58#endif /* ifdef HAVE_OPENSSL */
59
60#ifdef EINA_HAVE_THREADS
61# ifdef HAVE_GNUTLS
62GCRY_THREAD_OPTION_PTHREAD_IMPL;
63# endif /* ifdef HAVE_GNUTLS */
64#endif /* ifdef EINA_HAVE_THREADS */
65
66#include "Eet.h"
67#include "Eet_private.h"
68
69#ifndef O_BINARY
70# define O_BINARY 0
71#endif
72
73static Eet_Version _version = { VMAJ, VMIN, VMIC, VREV };
74EAPI Eet_Version *eet_version = &_version;
75
76#ifdef HAVE_REALPATH
77# undef HAVE_REALPATH
78#endif /* ifdef HAVE_REALPATH */
79
80#define EET_MAGIC_FILE 0x1ee7ff00
81#define EET_MAGIC_FILE_HEADER 0x1ee7ff01
82
83#define EET_MAGIC_FILE2 0x1ee70f42
84
85typedef struct _Eet_File_Header Eet_File_Header;
86typedef struct _Eet_File_Node Eet_File_Node;
87typedef struct _Eet_File_Directory Eet_File_Directory;
88
89struct _Eet_File
90{
91 char *path;
92 Eina_File *readfp;
93 Eet_File_Header *header;
94 Eet_Dictionary *ed;
95 Eet_Key *key;
96 const unsigned char *data;
97 const void *x509_der;
98 const void *signature;
99 void *sha1;
100
101 Eet_File_Mode mode;
102
103 int magic;
104 int references;
105
106 unsigned long int data_size;
107 int x509_length;
108 unsigned int signature_length;
109 int sha1_length;
110
111 Eina_Lock file_lock;
112
113 unsigned char writes_pending : 1;
114 unsigned char delete_me_now : 1;
115};
116
117struct _Eet_File_Header
118{
119 int magic;
120 Eet_File_Directory *directory;
121};
122
123struct _Eet_File_Directory
124{
125 int size;
126 Eet_File_Node **nodes;
127};
128
129struct _Eet_File_Node
130{
131 char *name;
132 void *data;
133 Eet_File_Node *next; /* FIXME: make buckets linked lists */
134
135 unsigned long int offset;
136 unsigned long int dictionary_offset;
137 unsigned long int name_offset;
138
139 unsigned int name_size;
140 unsigned int size;
141 unsigned int data_size;
142
143 unsigned char free_name : 1;
144 unsigned char compression : 1;
145 unsigned char ciphered : 1;
146 unsigned char alias : 1;
147};
148
149#if 0
150/* Version 2 */
151/* NB: all int's are stored in network byte order on disk */
152/* file format: */
153int magic; /* magic number ie 0x1ee7ff00 */
154int num_directory_entries; /* number of directory entries to follow */
155int bytes_directory_entries; /* bytes of directory entries to follow */
156struct
157{
158 int offset; /* bytes offset into file for data chunk */
159 int flags; /* flags - for now 0 = uncompressed and clear, 1 = compressed and clear, 2 = uncompressed and ciphered, 3 = compressed and ciphered */
160 int size; /* size of the data chunk */
161 int data_size; /* size of the (uncompressed) data chunk */
162 int name_size; /* length in bytes of the name field */
163 char name[name_size]; /* name string (variable length) and \0 terminated */
164} directory[num_directory_entries];
165/* and now startes the data stream... */
166#endif /* if 0 */
167
168#if 0
169/* Version 3 */
170/* NB: all int's are stored in network byte order on disk */
171/* file format: */
172int magic; /* magic number ie 0x1ee70f42 */
173int num_directory_entries; /* number of directory entries to follow */
174int num_dictionary_entries; /* number of dictionary entries to follow */
175struct
176{
177 int data_offset; /* bytes offset into file for data chunk */
178 int size; /* size of the data chunk */
179 int data_size; /* size of the (uncompressed) data chunk */
180 int name_offset; /* bytes offset into file for name string */
181 int name_size; /* length in bytes of the name field */
182 int flags; /* bit flags - for now:
183 bit 0 => compresion on/off
184 bit 1 => ciphered on/off
185 bit 2 => alias
186 */
187} directory[num_directory_entries];
188struct
189{
190 int hash;
191 int offset;
192 int size;
193 int prev;
194 int next;
195} dictionary[num_dictionary_entries];
196/* now start the string stream. */
197/* and right after them the data stream. */
198int magic_sign; /* Optional, only if the eet file is signed. */
199int signature_length; /* Signature length. */
200int x509_length; /* Public certificate that signed the file. */
201char signature[signature_length]; /* The signature. */
202char x509[x509_length]; /* The public certificate. */
203#endif /* if 0 */
204
205#define EET_FILE2_HEADER_COUNT 3
206#define EET_FILE2_DIRECTORY_ENTRY_COUNT 6
207#define EET_FILE2_DICTIONARY_ENTRY_COUNT 5
208
209#define EET_FILE2_HEADER_SIZE (sizeof(int) * \
210 EET_FILE2_HEADER_COUNT)
211#define EET_FILE2_DIRECTORY_ENTRY_SIZE (sizeof(int) * \
212 EET_FILE2_DIRECTORY_ENTRY_COUNT)
213#define EET_FILE2_DICTIONARY_ENTRY_SIZE (sizeof(int) * \
214 EET_FILE2_DICTIONARY_ENTRY_COUNT)
215
216/* prototypes of internal calls */
217static Eet_File *
218eet_cache_find(const char *path,
219 Eet_File **cache,
220 int cache_num);
221static void
222eet_cache_add(Eet_File *ef,
223 Eet_File ***cache,
224 int *cache_num,
225 int *cache_alloc);
226static void
227eet_cache_del(Eet_File *ef,
228 Eet_File ***cache,
229 int *cache_num,
230 int *cache_alloc);
231static int
232eet_string_match(const char *s1,
233 const char *s2);
234#if 0 /* Unused */
235static Eet_Error
236eet_flush(Eet_File *ef);
237#endif /* if 0 */
238static Eet_Error
239 eet_flush2(Eet_File *ef);
240static Eet_File_Node *
241 find_node_by_name(Eet_File *ef,
242 const char *name);
243static int
244read_data_from_disk(Eet_File *ef,
245 Eet_File_Node *efn,
246 void *buf,
247 int len);
248
249static Eet_Error
250eet_internal_close(Eet_File *ef,
251 Eina_Bool locked);
252
253static Eina_Lock eet_cache_lock;
254
255#define LOCK_CACHE eina_lock_take(&eet_cache_lock)
256#define UNLOCK_CACHE eina_lock_release(&eet_cache_lock)
257
258#define INIT_FILE(File) eina_lock_new(&File->file_lock)
259#define LOCK_FILE(File) eina_lock_take(&File->file_lock)
260#define UNLOCK_FILE(File) eina_lock_release(&File->file_lock)
261#define DESTROY_FILE(File) eina_lock_free(&File->file_lock)
262
263/* cache. i don't expect this to ever be large, so arrays will do */
264static int eet_writers_num = 0;
265static int eet_writers_alloc = 0;
266static Eet_File **eet_writers = NULL;
267static int eet_readers_num = 0;
268static int eet_readers_alloc = 0;
269static Eet_File **eet_readers = NULL;
270static int eet_init_count = 0;
271
272/* log domain variable */
273int _eet_log_dom_global = -1;
274
275/* Check to see its' an eet file pointer */
276static inline int
277eet_check_pointer(const Eet_File *ef)
278{
279 if ((!ef) || (ef->magic != EET_MAGIC_FILE))
280 return 1;
281
282 return 0;
283} /* eet_check_pointer */
284
285static inline int
286eet_check_header(const Eet_File *ef)
287{
288 if (!ef->header)
289 return 1;
290
291 if (!ef->header->directory)
292 return 1;
293
294 return 0;
295} /* eet_check_header */
296
297static inline int
298eet_test_close(int test,
299 Eet_File *ef)
300{
301 if (test)
302 {
303 ef->delete_me_now = 1;
304 eet_internal_close(ef, EINA_TRUE);
305 }
306
307 return test;
308} /* eet_test_close */
309
310/* find an eet file in the currently in use cache */
311static Eet_File *
312eet_cache_find(const char *path,
313 Eet_File **cache,
314 int cache_num)
315{
316 int i;
317
318 /* walk list */
319 for (i = 0; i < cache_num; i++)
320 {
321 /* if matches real path - return it */
322 if (eet_string_match(cache[i]->path, path))
323 if (!cache[i]->delete_me_now)
324 return cache[i];
325 }
326
327 /* not found */
328 return NULL;
329} /* eet_cache_find */
330
331/* add to end of cache */
332/* this should only be called when the cache lock is already held */
333static void
334eet_cache_add(Eet_File *ef,
335 Eet_File ***cache,
336 int *cache_num,
337 int *cache_alloc)
338{
339 Eet_File **new_cache;
340 int new_cache_num;
341 int new_cache_alloc;
342
343 new_cache_num = *cache_num;
344 if (new_cache_num >= 64) /* avoid fd overruns - limit to 128 (most recent) in the cache */
345 {
346 Eet_File *del_ef = NULL;
347 int i;
348
349 new_cache = *cache;
350 for (i = 0; i < new_cache_num; i++)
351 {
352 if (new_cache[i]->references == 0)
353 {
354 del_ef = new_cache[i];
355 break;
356 }
357 }
358
359 if (del_ef)
360 {
361 del_ef->delete_me_now = 1;
362 eet_internal_close(del_ef, EINA_TRUE);
363 }
364 }
365
366 new_cache = *cache;
367 new_cache_num = *cache_num;
368 new_cache_alloc = *cache_alloc;
369 new_cache_num++;
370 if (new_cache_num > new_cache_alloc)
371 {
372 new_cache_alloc += 16;
373 new_cache = realloc(new_cache, new_cache_alloc * sizeof(Eet_File *));
374 if (!new_cache)
375 {
376 CRIT("BAD ERROR! Eet realloc of cache list failed. Abort");
377 abort();
378 }
379 }
380
381 new_cache[new_cache_num - 1] = ef;
382 *cache = new_cache;
383 *cache_num = new_cache_num;
384 *cache_alloc = new_cache_alloc;
385} /* eet_cache_add */
386
387/* delete from cache */
388/* this should only be called when the cache lock is already held */
389static void
390eet_cache_del(Eet_File *ef,
391 Eet_File ***cache,
392 int *cache_num,
393 int *cache_alloc)
394{
395 Eet_File **new_cache;
396 int new_cache_num, new_cache_alloc;
397 int i, j;
398
399 new_cache = *cache;
400 new_cache_num = *cache_num;
401 new_cache_alloc = *cache_alloc;
402 if (new_cache_num <= 0)
403 return;
404
405 for (i = 0; i < new_cache_num; i++)
406 {
407 if (new_cache[i] == ef)
408 break;
409 }
410
411 if (i >= new_cache_num)
412 return;
413
414 new_cache_num--;
415 for (j = i; j < new_cache_num; j++)
416 new_cache[j] = new_cache[j + 1];
417
418 if (new_cache_num <= (new_cache_alloc - 16))
419 {
420 new_cache_alloc -= 16;
421 if (new_cache_num > 0)
422 {
423 new_cache = realloc(new_cache, new_cache_alloc * sizeof(Eet_File *));
424 if (!new_cache)
425 {
426 CRIT("BAD ERROR! Eet realloc of cache list failed. Abort");
427 abort();
428 }
429 }
430 else
431 {
432 free(new_cache);
433 new_cache = NULL;
434 }
435 }
436
437 *cache = new_cache;
438 *cache_num = new_cache_num;
439 *cache_alloc = new_cache_alloc;
440} /* eet_cache_del */
441
442/* internal string match. null friendly, catches same ptr */
443static int
444eet_string_match(const char *s1,
445 const char *s2)
446{
447 /* both null- no match */
448 if ((!s1) || (!s2))
449 return 0;
450
451 if (s1 == s2)
452 return 1;
453
454 return !strcmp(s1, s2);
455} /* eet_string_match */
456
457/* flush out writes to a v2 eet file */
458static Eet_Error
459eet_flush2(Eet_File *ef)
460{
461 Eet_File_Node *efn;
462 FILE *fp;
463 Eet_Error error = EET_ERROR_NONE;
464 int head[EET_FILE2_HEADER_COUNT];
465 int num_directory_entries = 0;
466 int num_dictionary_entries = 0;
467 int bytes_directory_entries = 0;
468 int bytes_dictionary_entries = 0;
469 int bytes_strings = 0;
470 int data_offset = 0;
471 int strings_offset = 0;
472 int num;
473 int i;
474 int j;
475
476 if (eet_check_pointer(ef))
477 return EET_ERROR_BAD_OBJECT;
478
479 if (eet_check_header(ef))
480 return EET_ERROR_EMPTY;
481
482 if (!ef->writes_pending)
483 return EET_ERROR_NONE;
484
485 if ((ef->mode == EET_FILE_MODE_READ_WRITE)
486 || (ef->mode == EET_FILE_MODE_WRITE))
487 {
488 int fd;
489
490 /* opening for write - delete old copy of file right away */
491 unlink(ef->path);
492 fd = open(ef->path, O_CREAT | O_TRUNC | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR);
493 fp = fdopen(fd, "wb");
494 if (!fp)
495 return EET_ERROR_NOT_WRITABLE;
496
497 fcntl(fileno(fp), F_SETFD, FD_CLOEXEC);
498 }
499 else
500 return EET_ERROR_NOT_WRITABLE;
501
502 /* calculate string base offset and data base offset */
503 num = (1 << ef->header->directory->size);
504 for (i = 0; i < num; ++i)
505 {
506 for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
507 {
508 num_directory_entries++;
509 bytes_strings += strlen(efn->name) + 1;
510 }
511 }
512 if (ef->ed)
513 {
514 num_dictionary_entries = ef->ed->count;
515
516 for (i = 0; i < num_dictionary_entries; ++i)
517 bytes_strings += ef->ed->all[i].len;
518 }
519
520 /* calculate section bytes size */
521 bytes_directory_entries = EET_FILE2_DIRECTORY_ENTRY_SIZE *
522 num_directory_entries + EET_FILE2_HEADER_SIZE;
523 bytes_dictionary_entries = EET_FILE2_DICTIONARY_ENTRY_SIZE *
524 num_dictionary_entries;
525
526 /* calculate per entry offset */
527 strings_offset = bytes_directory_entries + bytes_dictionary_entries;
528 data_offset = bytes_directory_entries + bytes_dictionary_entries +
529 bytes_strings;
530
531 for (i = 0; i < num; ++i)
532 {
533 for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
534 {
535 efn->offset = data_offset;
536 data_offset += efn->size;
537
538 efn->name_offset = strings_offset;
539 strings_offset += efn->name_size;
540 }
541 }
542
543 /* calculate dictionary strings offset */
544 if (ef->ed)
545 ef->ed->offset = strings_offset;
546
547 /* go thru and write the header */
548 head[0] = (int)htonl((unsigned int)EET_MAGIC_FILE2);
549 head[1] = (int)htonl((unsigned int)num_directory_entries);
550 head[2] = (int)htonl((unsigned int)num_dictionary_entries);
551
552 fseek(fp, 0, SEEK_SET);
553 if (fwrite(head, sizeof (head), 1, fp) != 1)
554 goto write_error;
555
556 /* write directories entry */
557 for (i = 0; i < num; i++)
558 {
559 for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
560 {
561 unsigned int flag;
562 int ibuf[EET_FILE2_DIRECTORY_ENTRY_COUNT];
563
564 flag = (efn->alias << 2) | (efn->ciphered << 1) | efn->compression;
565
566 ibuf[0] = (int)htonl((unsigned int)efn->offset);
567 ibuf[1] = (int)htonl((unsigned int)efn->size);
568 ibuf[2] = (int)htonl((unsigned int)efn->data_size);
569 ibuf[3] = (int)htonl((unsigned int)efn->name_offset);
570 ibuf[4] = (int)htonl((unsigned int)efn->name_size);
571 ibuf[5] = (int)htonl((unsigned int)flag);
572
573 if (fwrite(ibuf, sizeof(ibuf), 1, fp) != 1)
574 goto write_error;
575 }
576 }
577
578 /* write dictionary */
579 if (ef->ed)
580 {
581 int offset = strings_offset;
582
583 for (j = 0; j < ef->ed->count; ++j)
584 {
585 int sbuf[EET_FILE2_DICTIONARY_ENTRY_COUNT];
586
587 sbuf[0] = (int)htonl((unsigned int)ef->ed->all[j].hash);
588 sbuf[1] = (int)htonl((unsigned int)offset);
589 sbuf[2] = (int)htonl((unsigned int)ef->ed->all[j].len);
590 sbuf[3] = (int)htonl((unsigned int)ef->ed->all[j].prev);
591 sbuf[4] = (int)htonl((unsigned int)ef->ed->all[j].next);
592
593 offset += ef->ed->all[j].len;
594
595 if (fwrite(sbuf, sizeof (sbuf), 1, fp) != 1)
596 goto write_error;
597 }
598 }
599
600 /* write directories name */
601 for (i = 0; i < num; i++)
602 {
603 for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
604 {
605 if (fwrite(efn->name, efn->name_size, 1, fp) != 1)
606 goto write_error;
607 }
608 }
609
610 /* write strings */
611 if (ef->ed)
612 for (j = 0; j < ef->ed->count; ++j)
613 {
614 if (fwrite(ef->ed->all[j].str, ef->ed->all[j].len, 1, fp) != 1)
615 goto write_error;
616 }
617
618 /* write data */
619 for (i = 0; i < num; i++)
620 {
621 for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
622 {
623 if (fwrite(efn->data, efn->size, 1, fp) != 1)
624 goto write_error;
625 }
626 }
627
628 /* flush all write to the file. */
629 fflush(fp);
630// this is going to really cause trouble. if ANYTHING this needs to go into a
631// thread spawned off - but even then...
632// in this case... ext4 is "wrong". (yes we can jump up and down and point posix
633// manual pages at eachother, but ext4 broke behavior that has been in place
634// for decades and that 1000's of apps rely on daily - that is that one operation
635// to disk is committed to disk BEFORE following operations, so the fs retains
636// a consistent state
637// fsync(fileno(fp));
638
639 /* append signature if required */
640 if (ef->key)
641 {
642 error = eet_identity_sign(fp, ef->key);
643 if (error != EET_ERROR_NONE)
644 goto sign_error;
645 }
646
647 /* no more writes pending */
648 ef->writes_pending = 0;
649
650 fclose(fp);
651
652 return EET_ERROR_NONE;
653
654write_error:
655 if (ferror(fp))
656 {
657 switch (errno)
658 {
659 case EFBIG: error = EET_ERROR_WRITE_ERROR_FILE_TOO_BIG; break;
660
661 case EIO: error = EET_ERROR_WRITE_ERROR_IO_ERROR; break;
662
663 case ENOSPC: error = EET_ERROR_WRITE_ERROR_OUT_OF_SPACE; break;
664
665 case EPIPE: error = EET_ERROR_WRITE_ERROR_FILE_CLOSED; break;
666
667 default: error = EET_ERROR_WRITE_ERROR; break;
668 } /* switch */
669 }
670
671sign_error:
672 fclose(fp);
673 return error;
674} /* eet_flush2 */
675
676EAPI int
677eet_init(void)
678{
679 if (++eet_init_count != 1)
680 return eet_init_count;
681
682 if (!eina_init())
683 {
684 fprintf(stderr, "Eet: Eina init failed");
685 return --eet_init_count;
686 }
687
688 _eet_log_dom_global = eina_log_domain_register("eet", EET_DEFAULT_LOG_COLOR);
689 if (_eet_log_dom_global < 0)
690 {
691 EINA_LOG_ERR("Eet Can not create a general log domain.");
692 goto shutdown_eina;
693 }
694
695 eina_lock_new(&eet_cache_lock);
696
697 if (!eet_node_init())
698 {
699 EINA_LOG_ERR("Eet: Eet_Node mempool creation failed");
700 goto unregister_log_domain;
701 }
702
703#ifdef HAVE_GNUTLS
704 /* Before the library can be used, it must initialize itself if needed. */
705 if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0)
706 {
707 gcry_check_version(NULL);
708 /* Disable warning messages about problems with the secure memory subsystem.
709 This command should be run right after gcry_check_version. */
710 if (gcry_control(GCRYCTL_DISABLE_SECMEM_WARN))
711 goto shutdown_eet; /* This command is used to allocate a pool of secure memory and thus
712 enabling the use of secure memory. It also drops all extra privileges the
713 process has (i.e. if it is run as setuid (root)). If the argument nbytes
714 is 0, secure memory will be disabled. The minimum amount of secure memory
715 allocated is currently 16384 bytes; you may thus use a value of 1 to
716 request that default size. */
717
718 if (gcry_control(GCRYCTL_INIT_SECMEM, 16384, 0))
719 WRN(
720 "BIG FAT WARNING: I AM UNABLE TO REQUEST SECMEM, Cryptographic operation are at risk !");
721 }
722
723# ifdef EINA_HAVE_THREADS
724 if (gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread))
725 WRN(
726 "YOU ARE USING PTHREADS, BUT I CANNOT INITIALIZE THREADSAFE GCRYPT OPERATIONS!");
727
728# endif /* ifdef EINA_HAVE_THREADS */
729 if (gnutls_global_init())
730 goto shutdown_eet;
731
732#endif /* ifdef HAVE_GNUTLS */
733#ifdef HAVE_OPENSSL
734 ERR_load_crypto_strings();
735 OpenSSL_add_all_algorithms();
736#endif /* ifdef HAVE_OPENSSL */
737
738 return eet_init_count;
739
740#ifdef HAVE_GNUTLS
741shutdown_eet:
742#endif
743 eet_node_shutdown();
744unregister_log_domain:
745 eina_log_domain_unregister(_eet_log_dom_global);
746 _eet_log_dom_global = -1;
747shutdown_eina:
748 eina_shutdown();
749 return --eet_init_count;
750} /* eet_init */
751
752EAPI int
753eet_shutdown(void)
754{
755 if (--eet_init_count != 0)
756 return eet_init_count;
757
758 eet_clearcache();
759 eet_node_shutdown();
760
761 eina_lock_free(&eet_cache_lock);
762
763#ifdef HAVE_GNUTLS
764 gnutls_global_deinit();
765#endif /* ifdef HAVE_GNUTLS */
766#ifdef HAVE_OPENSSL
767 EVP_cleanup();
768 ERR_free_strings();
769#endif /* ifdef HAVE_OPENSSL */
770 eina_log_domain_unregister(_eet_log_dom_global);
771 _eet_log_dom_global = -1;
772 eina_shutdown();
773
774 return eet_init_count;
775} /* eet_shutdown */
776
777EAPI Eet_Error
778eet_sync(Eet_File *ef)
779{
780 Eet_Error ret;
781
782 if (eet_check_pointer(ef))
783 return EET_ERROR_BAD_OBJECT;
784
785 if ((ef->mode != EET_FILE_MODE_WRITE) &&
786 (ef->mode != EET_FILE_MODE_READ_WRITE))
787 return EET_ERROR_NOT_WRITABLE;
788
789 if (!ef->writes_pending)
790 return EET_ERROR_NONE;
791
792 LOCK_FILE(ef);
793
794 ret = eet_flush2(ef);
795
796 UNLOCK_FILE(ef);
797 return ret;
798} /* eet_sync */
799
800EAPI void
801eet_clearcache(void)
802{
803 int num = 0;
804 int i;
805
806 /*
807 * We need to compute the list of eet file to close separately from the cache,
808 * due to eet_close removing them from the cache after each call.
809 */
810 LOCK_CACHE;
811 for (i = 0; i < eet_writers_num; i++)
812 {
813 if (eet_writers[i]->references <= 0)
814 num++;
815 }
816
817 for (i = 0; i < eet_readers_num; i++)
818 {
819 if (eet_readers[i]->references <= 0)
820 num++;
821 }
822
823 if (num > 0)
824 {
825 Eet_File **closelist = NULL;
826
827 closelist = alloca(num * sizeof(Eet_File *));
828 num = 0;
829 for (i = 0; i < eet_writers_num; i++)
830 {
831 if (eet_writers[i]->references <= 0)
832 {
833 closelist[num] = eet_writers[i];
834 eet_writers[i]->delete_me_now = 1;
835 num++;
836 }
837 }
838
839 for (i = 0; i < eet_readers_num; i++)
840 {
841 if (eet_readers[i]->references <= 0)
842 {
843 closelist[num] = eet_readers[i];
844 eet_readers[i]->delete_me_now = 1;
845 num++;
846 }
847 }
848
849 for (i = 0; i < num; i++)
850 {
851 eet_internal_close(closelist[i], EINA_TRUE);
852 }
853 }
854
855 UNLOCK_CACHE;
856} /* eet_clearcache */
857
858/* FIXME: MMAP race condition in READ_WRITE_MODE */
859static Eet_File *
860eet_internal_read2(Eet_File *ef)
861{
862 const int *data = (const int *)ef->data;
863 const char *start = (const char *)ef->data;
864 int idx = 0;
865 unsigned long int bytes_directory_entries;
866 unsigned long int bytes_dictionary_entries;
867 unsigned long int signature_base_offset;
868 unsigned long int num_directory_entries;
869 unsigned long int num_dictionary_entries;
870 unsigned int i;
871
872 idx += sizeof(int);
873 if (eet_test_close((int)ntohl(*data) != EET_MAGIC_FILE2, ef))
874 return NULL;
875
876 data++;
877
878#define GET_INT(Value, Pointer, Index) \
879 { \
880 Value = ntohl(*Pointer); \
881 Pointer++; \
882 Index += sizeof(int); \
883 }
884
885 /* get entries count and byte count */
886 GET_INT(num_directory_entries, data, idx);
887 /* get dictionary count and byte count */
888 GET_INT(num_dictionary_entries, data, idx);
889
890 bytes_directory_entries = EET_FILE2_DIRECTORY_ENTRY_SIZE *
891 num_directory_entries + EET_FILE2_HEADER_SIZE;
892 bytes_dictionary_entries = EET_FILE2_DICTIONARY_ENTRY_SIZE *
893 num_dictionary_entries;
894
895 /* we can't have > 0x7fffffff values here - invalid */
896 if (eet_test_close((num_directory_entries > 0x7fffffff), ef))
897 return NULL;
898
899 /* we can't have more bytes directory and bytes in dictionaries than the size of the file */
900 if (eet_test_close((bytes_directory_entries + bytes_dictionary_entries) >
901 ef->data_size, ef))
902 return NULL;
903
904 /* allocate header */
905 ef->header = calloc(1, sizeof(Eet_File_Header));
906 if (eet_test_close(!ef->header, ef))
907 return NULL;
908
909 ef->header->magic = EET_MAGIC_FILE_HEADER;
910
911 /* allocate directory block in ram */
912 ef->header->directory = calloc(1, sizeof(Eet_File_Directory));
913 if (eet_test_close(!ef->header->directory, ef))
914 return NULL;
915
916 /* 8 bit hash table (256 buckets) */
917 ef->header->directory->size = 8;
918 /* allocate base hash table */
919 ef->header->directory->nodes =
920 calloc(1, sizeof(Eet_File_Node *) * (1 << ef->header->directory->size));
921 if (eet_test_close(!ef->header->directory->nodes, ef))
922 return NULL;
923
924 signature_base_offset = 0;
925 if (num_directory_entries == 0)
926 {
927 signature_base_offset = ef->data_size;
928 }
929
930 /* actually read the directory block - all of it, into ram */
931 for (i = 0; i < num_directory_entries; ++i)
932 {
933 const char *name;
934 Eet_File_Node *efn;
935 unsigned long int name_offset;
936 unsigned long int name_size;
937 int hash;
938 int flag;
939
940 /* out directory block is inconsistent - we have overrun our */
941 /* dynamic block buffer before we finished scanning dir entries */
942 efn = malloc(sizeof(Eet_File_Node));
943 if (eet_test_close(!efn, ef))
944 {
945 if (efn) free(efn); /* yes i know - we only get here if
946 * efn is null/0 -> trying to shut up
947 * warning tools like cppcheck */
948 return NULL;
949 }
950
951 /* get entrie header */
952 GET_INT(efn->offset, data, idx);
953 GET_INT(efn->size, data, idx);
954 GET_INT(efn->data_size, data, idx);
955 GET_INT(name_offset, data, idx);
956 GET_INT(name_size, data, idx);
957 GET_INT(flag, data, idx);
958
959 efn->compression = flag & 0x1 ? 1 : 0;
960 efn->ciphered = flag & 0x2 ? 1 : 0;
961 efn->alias = flag & 0x4 ? 1 : 0;
962
963#define EFN_TEST(Test, Ef, Efn) \
964 if (eet_test_close(Test, Ef)) \
965 { \
966 free(Efn); \
967 return NULL; \
968 }
969
970 /* check data pointer position */
971 EFN_TEST(!((efn->size > 0)
972 && (efn->offset + efn->size <= ef->data_size)
973 && (efn->offset > bytes_dictionary_entries +
974 bytes_directory_entries)), ef, efn);
975
976 /* check name position */
977 EFN_TEST(!((name_size > 0)
978 && (name_offset + name_size < ef->data_size)
979 && (name_offset >= bytes_dictionary_entries +
980 bytes_directory_entries)), ef, efn);
981
982 name = start + name_offset;
983
984 /* check '\0' at the end of name string */
985 EFN_TEST(name[name_size - 1] != '\0', ef, efn);
986
987 efn->free_name = 0;
988 efn->name = (char *)name;
989 efn->name_size = name_size;
990
991 hash = _eet_hash_gen(efn->name, ef->header->directory->size);
992 efn->next = ef->header->directory->nodes[hash];
993 ef->header->directory->nodes[hash] = efn;
994
995 /* read-only mode, so currently we have no data loaded */
996 if (ef->mode == EET_FILE_MODE_READ)
997 efn->data = NULL; /* read-write mode - read everything into ram */
998 else
999 {
1000 efn->data = malloc(efn->size);
1001 if (efn->data)
1002 memcpy(efn->data, ef->data + efn->offset, efn->size);
1003 }
1004
1005 /* compute the possible position of a signature */
1006 if (signature_base_offset < efn->offset + efn->size)
1007 signature_base_offset = efn->offset + efn->size;
1008 }
1009
1010 ef->ed = NULL;
1011
1012 if (num_dictionary_entries)
1013 {
1014 const int *dico = (const int *)ef->data +
1015 EET_FILE2_DIRECTORY_ENTRY_COUNT * num_directory_entries +
1016 EET_FILE2_HEADER_COUNT;
1017 int j;
1018
1019 if (eet_test_close((num_dictionary_entries *
1020 (int)EET_FILE2_DICTIONARY_ENTRY_SIZE + idx) >
1021 (bytes_dictionary_entries + bytes_directory_entries),
1022 ef))
1023 return NULL;
1024
1025 ef->ed = calloc(1, sizeof (Eet_Dictionary));
1026 if (eet_test_close(!ef->ed, ef))
1027 return NULL;
1028
1029 ef->ed->all = calloc(num_dictionary_entries, sizeof (Eet_String));
1030 if (eet_test_close(!ef->ed->all, ef))
1031 return NULL;
1032
1033 ef->ed->count = num_dictionary_entries;
1034 ef->ed->total = num_dictionary_entries;
1035 ef->ed->start = start + bytes_dictionary_entries +
1036 bytes_directory_entries;
1037 ef->ed->end = ef->ed->start;
1038
1039 for (j = 0; j < ef->ed->count; ++j)
1040 {
1041 unsigned int offset;
1042 int hash;
1043
1044 GET_INT(hash, dico, idx);
1045 GET_INT(offset, dico, idx);
1046 GET_INT(ef->ed->all[j].len, dico, idx);
1047 GET_INT(ef->ed->all[j].prev, dico, idx);
1048 GET_INT(ef->ed->all[j].next, dico, idx);
1049
1050 /* Hash value could be stored on 8bits data, but this will break alignment of all the others data.
1051 So stick to int and check the value. */
1052 if (eet_test_close(hash & 0xFFFFFF00, ef))
1053 return NULL;
1054
1055 /* Check string position */
1056 if (eet_test_close(!((ef->ed->all[j].len > 0)
1057 && (offset >
1058 (bytes_dictionary_entries +
1059 bytes_directory_entries))
1060 && (offset + ef->ed->all[j].len <
1061 ef->data_size)), ef))
1062 return NULL;
1063
1064 ef->ed->all[j].str = start + offset;
1065
1066 if (ef->ed->all[j].str + ef->ed->all[j].len > ef->ed->end)
1067 ef->ed->end = ef->ed->all[j].str + ef->ed->all[j].len;
1068
1069 /* Check '\0' at the end of the string */
1070 if (eet_test_close(ef->ed->all[j].str[ef->ed->all[j].len - 1] !=
1071 '\0', ef))
1072 return NULL;
1073
1074 ef->ed->all[j].hash = hash;
1075 if (ef->ed->all[j].prev == -1)
1076 ef->ed->hash[hash] = j;
1077
1078 /* compute the possible position of a signature */
1079 if (signature_base_offset < offset + ef->ed->all[j].len)
1080 signature_base_offset = offset + ef->ed->all[j].len;
1081 }
1082 }
1083
1084 /* Check if the file is signed */
1085 ef->x509_der = NULL;
1086 ef->x509_length = 0;
1087 ef->signature = NULL;
1088 ef->signature_length = 0;
1089
1090 if (signature_base_offset < ef->data_size)
1091 {
1092#ifdef HAVE_SIGNATURE
1093 const unsigned char *buffer = ((const unsigned char *)ef->data) +
1094 signature_base_offset;
1095 ef->x509_der = eet_identity_check(ef->data,
1096 signature_base_offset,
1097 &ef->sha1,
1098 &ef->sha1_length,
1099 buffer,
1100 ef->data_size - signature_base_offset,
1101 &ef->signature,
1102 &ef->signature_length,
1103 &ef->x509_length);
1104
1105 if (eet_test_close(!ef->x509_der, ef))
1106 return NULL;
1107
1108#else /* ifdef HAVE_SIGNATURE */
1109 ERR(
1110 "This file could be signed but you didn't compile the necessary code to check the signature.");
1111#endif /* ifdef HAVE_SIGNATURE */
1112 }
1113
1114 return ef;
1115} /* eet_internal_read2 */
1116
1117#if EET_OLD_EET_FILE_FORMAT
1118static Eet_File *
1119eet_internal_read1(Eet_File *ef)
1120{
1121 const unsigned char *dyn_buf = NULL;
1122 const unsigned char *p = NULL;
1123 unsigned long int byte_entries;
1124 unsigned long int num_entries;
1125 unsigned int i;
1126 int idx = 0;
1127
1128 WRN(
1129 "EET file format of '%s' is deprecated. You should just open it one time with mode == EET_FILE_MODE_READ_WRITE to solve this issue.",
1130 ef->path);
1131
1132 /* build header table if read mode */
1133 /* geat header */
1134 idx += sizeof(int);
1135 if (eet_test_close((int)ntohl(*((int *)ef->data)) != EET_MAGIC_FILE, ef))
1136 return NULL;
1137
1138#define EXTRACT_INT(Value, Pointer, Index) \
1139 { \
1140 int tmp; \
1141 memcpy(&tmp, Pointer + Index, sizeof(int)); \
1142 Value = ntohl(tmp); \
1143 Index += sizeof(int); \
1144 }
1145
1146 /* get entries count and byte count */
1147 EXTRACT_INT(num_entries, ef->data, idx);
1148 EXTRACT_INT(byte_entries, ef->data, idx);
1149
1150 /* we can't have <= 0 values here - invalid */
1151 if (eet_test_close((num_entries > 0x7fffffff) ||
1152 (byte_entries > 0x7fffffff), ef))
1153 return NULL;
1154
1155 /* we can't have more entires than minimum bytes for those! invalid! */
1156 if (eet_test_close((num_entries * 20) > byte_entries, ef))
1157 return NULL;
1158
1159 /* check we will not outrun the file limit */
1160 if (eet_test_close(((byte_entries + (int)(sizeof(int) * 3)) >
1161 ef->data_size), ef))
1162 return NULL;
1163
1164 /* allocate header */
1165 ef->header = calloc(1, sizeof(Eet_File_Header));
1166 if (eet_test_close(!ef->header, ef))
1167 return NULL;
1168
1169 ef->header->magic = EET_MAGIC_FILE_HEADER;
1170
1171 /* allocate directory block in ram */
1172 ef->header->directory = calloc(1, sizeof(Eet_File_Directory));
1173 if (eet_test_close(!ef->header->directory, ef))
1174 return NULL;
1175
1176 /* 8 bit hash table (256 buckets) */
1177 ef->header->directory->size = 8;
1178 /* allocate base hash table */
1179 ef->header->directory->nodes =
1180 calloc(1, sizeof(Eet_File_Node *) * (1 << ef->header->directory->size));
1181 if (eet_test_close(!ef->header->directory->nodes, ef))
1182 return NULL;
1183
1184 /* actually read the directory block - all of it, into ram */
1185 dyn_buf = ef->data + idx;
1186
1187 /* parse directory block */
1188 p = dyn_buf;
1189
1190 for (i = 0; i < num_entries; i++)
1191 {
1192 Eet_File_Node *efn;
1193 void *data = NULL;
1194 int indexn = 0;
1195 int name_size;
1196 int hash;
1197 int k;
1198
1199#define HEADER_SIZE (sizeof(int) * 5)
1200
1201 /* out directory block is inconsistent - we have overrun our */
1202 /* dynamic block buffer before we finished scanning dir entries */
1203 if (eet_test_close(p + HEADER_SIZE >= (dyn_buf + byte_entries), ef))
1204 return NULL;
1205
1206 /* allocate all the ram needed for this stored node accounting */
1207 efn = malloc (sizeof(Eet_File_Node));
1208 if (eet_test_close(!efn, ef))
1209 {
1210 if (efn) free(efn); /* yes i know - we only get here if
1211 * efn is null/0 -> trying to shut up
1212 * warning tools like cppcheck */
1213 return NULL;
1214 }
1215
1216 /* get entrie header */
1217 EXTRACT_INT(efn->offset, p, indexn);
1218 EXTRACT_INT(efn->compression, p, indexn);
1219 EXTRACT_INT(efn->size, p, indexn);
1220 EXTRACT_INT(efn->data_size, p, indexn);
1221 EXTRACT_INT(name_size, p, indexn);
1222
1223 efn->name_size = name_size;
1224 efn->ciphered = 0;
1225 efn->alias = 0;
1226
1227 /* invalid size */
1228 if (eet_test_close(efn->size <= 0, ef))
1229 {
1230 free(efn);
1231 return NULL;
1232 }
1233
1234 /* invalid name_size */
1235 if (eet_test_close(name_size <= 0, ef))
1236 {
1237 free(efn);
1238 return NULL;
1239 }
1240
1241 /* reading name would mean falling off end of dyn_buf - invalid */
1242 if (eet_test_close((p + 16 + name_size) > (dyn_buf + byte_entries), ef))
1243 {
1244 free(efn);
1245 return NULL;
1246 }
1247
1248 /* This code is useless if we dont want backward compatibility */
1249 for (k = name_size;
1250 k > 0 && ((unsigned char)*(p + HEADER_SIZE + k)) != 0; --k)
1251 ;
1252
1253 efn->free_name = ((unsigned char)*(p + HEADER_SIZE + k)) != 0;
1254
1255 if (efn->free_name)
1256 {
1257 efn->name = malloc(sizeof(char) * name_size + 1);
1258 if (eet_test_close(!efn->name, ef))
1259 {
1260 free(efn);
1261 return NULL;
1262 }
1263
1264 strncpy(efn->name, (char *)p + HEADER_SIZE, name_size);
1265 efn->name[name_size] = 0;
1266
1267 WRN(
1268 "File: %s is not up to date for key \"%s\" - needs rebuilding sometime",
1269 ef->path,
1270 efn->name);
1271 }
1272 else
1273 /* The only really useful peace of code for efn->name (no backward compatibility) */
1274 efn->name = (char *)((unsigned char *)(p + HEADER_SIZE));
1275
1276 /* get hash bucket it should go in */
1277 hash = _eet_hash_gen(efn->name, ef->header->directory->size);
1278 efn->next = ef->header->directory->nodes[hash];
1279 ef->header->directory->nodes[hash] = efn;
1280
1281 /* read-only mode, so currently we have no data loaded */
1282 if (ef->mode == EET_FILE_MODE_READ)
1283 efn->data = NULL; /* read-write mode - read everything into ram */
1284 else
1285 {
1286 data = malloc(efn->size);
1287 if (data)
1288 memcpy(data, ef->data + efn->offset, efn->size);
1289
1290 efn->data = data;
1291 }
1292
1293 /* advance */
1294 p += HEADER_SIZE + name_size;
1295 }
1296 return ef;
1297} /* eet_internal_read1 */
1298
1299#endif /* if EET_OLD_EET_FILE_FORMAT */
1300
1301/*
1302 * this should only be called when the cache lock is already held
1303 * (We could drop this restriction if we add a parameter to eet_test_close
1304 * that indicates if the lock is held or not. For now it is easiest
1305 * to just require that it is always held.)
1306 */
1307static Eet_File *
1308eet_internal_read(Eet_File *ef)
1309{
1310 const int *data = (const int *)ef->data;
1311
1312 if (eet_test_close((ef->data == (void *)-1) || (!ef->data), ef))
1313 return NULL;
1314
1315 if (eet_test_close(ef->data_size < (int)sizeof(int) * 3, ef))
1316 return NULL;
1317
1318 switch (ntohl(*data))
1319 {
1320#if EET_OLD_EET_FILE_FORMAT
1321 case EET_MAGIC_FILE:
1322 return eet_internal_read1(ef);
1323
1324#endif /* if EET_OLD_EET_FILE_FORMAT */
1325 case EET_MAGIC_FILE2:
1326 return eet_internal_read2(ef);
1327
1328 default:
1329 ef->delete_me_now = 1;
1330 eet_internal_close(ef, EINA_TRUE);
1331 break;
1332 } /* switch */
1333
1334 return NULL;
1335} /* eet_internal_read */
1336
1337static Eet_Error
1338eet_internal_close(Eet_File *ef,
1339 Eina_Bool locked)
1340{
1341 Eet_Error err;
1342
1343 /* check to see its' an eet file pointer */
1344 if (eet_check_pointer(ef))
1345 return EET_ERROR_BAD_OBJECT;
1346
1347 if (!locked)
1348 LOCK_CACHE;
1349
1350 /* deref */
1351 ef->references--;
1352 /* if its still referenced - dont go any further */
1353 if (ef->references > 0)
1354 {
1355 /* flush any writes */
1356 if ((ef->mode == EET_FILE_MODE_WRITE) ||
1357 (ef->mode == EET_FILE_MODE_READ_WRITE))
1358 eet_sync(ef);
1359 goto on_error;
1360 }
1361
1362 err = eet_flush2(ef);
1363
1364 eet_identity_unref(ef->key);
1365 ef->key = NULL;
1366
1367 /* if not urgent to delete it - dont free it - leave it in cache */
1368 if ((!ef->delete_me_now) && (ef->mode == EET_FILE_MODE_READ))
1369 goto on_error;
1370
1371 /* remove from cache */
1372 if (ef->mode == EET_FILE_MODE_READ)
1373 eet_cache_del(ef, &eet_readers, &eet_readers_num, &eet_readers_alloc);
1374 else if ((ef->mode == EET_FILE_MODE_WRITE) ||
1375 (ef->mode == EET_FILE_MODE_READ_WRITE))
1376 eet_cache_del(ef, &eet_writers, &eet_writers_num, &eet_writers_alloc);
1377
1378 /* we can unlock the cache now */
1379 if (!locked)
1380 UNLOCK_CACHE;
1381
1382 DESTROY_FILE(ef);
1383
1384 /* free up data */
1385 if (ef->header)
1386 {
1387 if (ef->header->directory)
1388 {
1389 if (ef->header->directory->nodes)
1390 {
1391 int i, num;
1392
1393 num = (1 << ef->header->directory->size);
1394 for (i = 0; i < num; i++)
1395 {
1396 Eet_File_Node *efn;
1397
1398 while ((efn = ef->header->directory->nodes[i]))
1399 {
1400 if (efn->data)
1401 free(efn->data);
1402
1403 ef->header->directory->nodes[i] = efn->next;
1404
1405 if (efn->free_name)
1406 free(efn->name);
1407
1408 free(efn);
1409 }
1410 }
1411 free(ef->header->directory->nodes);
1412 }
1413
1414 free(ef->header->directory);
1415 }
1416
1417 free(ef->header);
1418 }
1419
1420 eet_dictionary_free(ef->ed);
1421
1422 if (ef->sha1)
1423 free(ef->sha1);
1424
1425 if (ef->readfp)
1426 {
1427 if (ef->data)
1428 eina_file_map_free(ef->readfp, (void *)ef->data);
1429
1430 eina_file_close(ef->readfp);
1431 }
1432
1433 /* zero out ram for struct - caution tactic against stale memory use */
1434 memset(ef, 0, sizeof(Eet_File));
1435
1436 /* free it */
1437 free(ef);
1438 return err;
1439
1440on_error:
1441 if (!locked)
1442 UNLOCK_CACHE;
1443
1444 return EET_ERROR_NONE;
1445} /* eet_internal_close */
1446
1447EAPI Eet_File *
1448eet_memopen_read(const void *data,
1449 size_t size)
1450{
1451 Eet_File *ef;
1452
1453 if (!data || size == 0)
1454 return NULL;
1455
1456 ef = malloc (sizeof (Eet_File));
1457 if (!ef)
1458 return NULL;
1459
1460 INIT_FILE(ef);
1461 ef->ed = NULL;
1462 ef->path = NULL;
1463 ef->key = NULL;
1464 ef->magic = EET_MAGIC_FILE;
1465 ef->references = 1;
1466 ef->mode = EET_FILE_MODE_READ;
1467 ef->header = NULL;
1468 ef->delete_me_now = 1;
1469 ef->readfp = NULL;
1470 ef->data = data;
1471 ef->data_size = size;
1472 ef->sha1 = NULL;
1473 ef->sha1_length = 0;
1474
1475 /* eet_internal_read expects the cache lock to be held when it is called */
1476 LOCK_CACHE;
1477 ef = eet_internal_read(ef);
1478 UNLOCK_CACHE;
1479 return ef;
1480} /* eet_memopen_read */
1481
1482EAPI Eet_File *
1483eet_open(const char *file,
1484 Eet_File_Mode mode)
1485{
1486 Eina_File *fp;
1487 Eet_File *ef;
1488 int file_len;
1489 unsigned long int size;
1490
1491 if (!file)
1492 return NULL;
1493
1494 /* find the current file handle in cache*/
1495 ef = NULL;
1496 LOCK_CACHE;
1497 if (mode == EET_FILE_MODE_READ)
1498 {
1499 ef = eet_cache_find((char *)file, eet_writers, eet_writers_num);
1500 if (ef)
1501 {
1502 eet_sync(ef);
1503 ef->references++;
1504 ef->delete_me_now = 1;
1505 eet_internal_close(ef, EINA_TRUE);
1506 }
1507
1508 ef = eet_cache_find((char *)file, eet_readers, eet_readers_num);
1509 }
1510 else if ((mode == EET_FILE_MODE_WRITE) ||
1511 (mode == EET_FILE_MODE_READ_WRITE))
1512 {
1513 ef = eet_cache_find((char *)file, eet_readers, eet_readers_num);
1514 if (ef)
1515 {
1516 ef->delete_me_now = 1;
1517 ef->references++;
1518 eet_internal_close(ef, EINA_TRUE);
1519 }
1520
1521 ef = eet_cache_find((char *)file, eet_writers, eet_writers_num);
1522 }
1523
1524 /* try open the file based on mode */
1525 if ((mode == EET_FILE_MODE_READ) || (mode == EET_FILE_MODE_READ_WRITE))
1526 {
1527 /* Prevent garbage in futur comparison. */
1528 fp = eina_file_open(file, EINA_FALSE);
1529 if (!fp)
1530 goto open_error;
1531
1532 size = eina_file_size_get(fp);
1533
1534 if (size < ((int)sizeof(int) * 3))
1535 {
1536 eina_file_close(fp);
1537 fp = NULL;
1538
1539 size = 0;
1540
1541 goto open_error;
1542 }
1543
1544open_error:
1545 if (!fp && mode == EET_FILE_MODE_READ)
1546 goto on_error;
1547 }
1548 else
1549 {
1550 if (mode != EET_FILE_MODE_WRITE)
1551 return NULL;
1552
1553 size = 0;
1554
1555 fp = NULL;
1556 }
1557
1558 /* We found one */
1559 if (ef && ef->readfp != fp)
1560 {
1561 ef->delete_me_now = 1;
1562 ef->references++;
1563 eet_internal_close(ef, EINA_TRUE);
1564 ef = NULL;
1565 }
1566
1567 if (ef)
1568 {
1569 /* reference it up and return it */
1570 if (fp)
1571 eina_file_close(fp);
1572
1573 ef->references++;
1574 UNLOCK_CACHE;
1575 return ef;
1576 }
1577
1578 file_len = strlen(file) + 1;
1579
1580 /* Allocate struct for eet file and have it zero'd out */
1581 ef = malloc(sizeof(Eet_File) + file_len);
1582 if (!ef)
1583 goto on_error;
1584
1585 /* fill some of the members */
1586 INIT_FILE(ef);
1587 ef->key = NULL;
1588 ef->readfp = fp;
1589 ef->path = ((char *)ef) + sizeof(Eet_File);
1590 memcpy(ef->path, file, file_len);
1591 ef->magic = EET_MAGIC_FILE;
1592 ef->references = 1;
1593 ef->mode = mode;
1594 ef->header = NULL;
1595 ef->writes_pending = 0;
1596 ef->delete_me_now = 0;
1597 ef->data = NULL;
1598 ef->data_size = 0;
1599 ef->sha1 = NULL;
1600 ef->sha1_length = 0;
1601
1602 ef->ed = (mode == EET_FILE_MODE_WRITE)
1603 || (!ef->readfp && mode == EET_FILE_MODE_READ_WRITE) ?
1604 eet_dictionary_add() : NULL;
1605
1606 if (!ef->readfp &&
1607 (mode == EET_FILE_MODE_READ_WRITE || mode == EET_FILE_MODE_WRITE))
1608 goto empty_file;
1609
1610 /* if we can't open - bail out */
1611 if (eet_test_close(!ef->readfp, ef))
1612 goto on_error;
1613
1614 /* if we opened for read or read-write */
1615 if ((mode == EET_FILE_MODE_READ) || (mode == EET_FILE_MODE_READ_WRITE))
1616 {
1617 ef->data_size = size;
1618 ef->data = eina_file_map_all(fp, EINA_FILE_SEQUENTIAL);
1619 if (eet_test_close((ef->data == NULL), ef))
1620 goto on_error;
1621
1622 ef = eet_internal_read(ef);
1623 if (!ef)
1624 goto on_error;
1625 }
1626
1627empty_file:
1628 /* add to cache */
1629 if (ef->references == 1)
1630 {
1631 if (ef->mode == EET_FILE_MODE_READ)
1632 eet_cache_add(ef, &eet_readers, &eet_readers_num, &eet_readers_alloc);
1633 else if ((ef->mode == EET_FILE_MODE_WRITE) ||
1634 (ef->mode == EET_FILE_MODE_READ_WRITE))
1635 eet_cache_add(ef, &eet_writers, &eet_writers_num, &eet_writers_alloc);
1636 }
1637
1638 UNLOCK_CACHE;
1639 return ef;
1640
1641on_error:
1642 UNLOCK_CACHE;
1643 return NULL;
1644} /* eet_open */
1645
1646EAPI Eet_File_Mode
1647eet_mode_get(Eet_File *ef)
1648{
1649 /* check to see its' an eet file pointer */
1650 if ((!ef) || (ef->magic != EET_MAGIC_FILE))
1651 return EET_FILE_MODE_INVALID;
1652 else
1653 return ef->mode;
1654} /* eet_mode_get */
1655
1656EAPI const void *
1657eet_identity_x509(Eet_File *ef,
1658 int *der_length)
1659{
1660 if (!ef->x509_der)
1661 return NULL;
1662
1663 if (der_length)
1664 *der_length = ef->x509_length;
1665
1666 return ef->x509_der;
1667} /* eet_identity_x509 */
1668
1669EAPI const void *
1670eet_identity_signature(Eet_File *ef,
1671 int *signature_length)
1672{
1673 if (!ef->signature)
1674 return NULL;
1675
1676 if (signature_length)
1677 *signature_length = ef->signature_length;
1678
1679 return ef->signature;
1680} /* eet_identity_signature */
1681
1682EAPI const void *
1683eet_identity_sha1(Eet_File *ef,
1684 int *sha1_length)
1685{
1686 if (!ef->sha1)
1687 ef->sha1 = eet_identity_compute_sha1(ef->data,
1688 ef->data_size,
1689 &ef->sha1_length);
1690
1691 if (sha1_length)
1692 *sha1_length = ef->sha1_length;
1693
1694 return ef->sha1;
1695} /* eet_identity_sha1 */
1696
1697EAPI Eet_Error
1698eet_identity_set(Eet_File *ef,
1699 Eet_Key *key)
1700{
1701 Eet_Key *tmp;
1702
1703 if (!ef)
1704 return EET_ERROR_BAD_OBJECT;
1705
1706 tmp = ef->key;
1707 ef->key = key;
1708 eet_identity_ref(ef->key);
1709 eet_identity_unref(tmp);
1710
1711 /* flags that writes are pending */
1712 ef->writes_pending = 1;
1713
1714 return EET_ERROR_NONE;
1715} /* eet_identity_set */
1716
1717EAPI Eet_Error
1718eet_close(Eet_File *ef)
1719{
1720 return eet_internal_close(ef, EINA_FALSE);
1721} /* eet_close */
1722
1723EAPI void *
1724eet_read_cipher(Eet_File *ef,
1725 const char *name,
1726 int *size_ret,
1727 const char *cipher_key)
1728{
1729 Eet_File_Node *efn;
1730 char *data = NULL;
1731 unsigned long int size = 0;
1732
1733 if (size_ret)
1734 *size_ret = 0;
1735
1736 /* check to see its' an eet file pointer */
1737 if (eet_check_pointer(ef))
1738 return NULL;
1739
1740 if (!name)
1741 return NULL;
1742
1743 if ((ef->mode != EET_FILE_MODE_READ) &&
1744 (ef->mode != EET_FILE_MODE_READ_WRITE))
1745 return NULL;
1746
1747 /* no header, return NULL */
1748 if (eet_check_header(ef))
1749 return NULL;
1750
1751 LOCK_FILE(ef);
1752
1753 /* hunt hash bucket */
1754 efn = find_node_by_name(ef, name);
1755 if (!efn)
1756 goto on_error;
1757
1758 /* get size (uncompressed, if compressed at all) */
1759 size = efn->data_size;
1760
1761 /* allocate data */
1762 data = malloc(size);
1763 if (!data)
1764 goto on_error;
1765
1766 /* uncompressed data */
1767 if (efn->compression == 0)
1768 {
1769 void *data_deciphered = NULL;
1770 unsigned int data_deciphered_sz = 0;
1771 /* if we already have the data in ram... copy that */
1772
1773 if (efn->ciphered && efn->size > size)
1774 {
1775 size = efn->size;
1776 data = realloc(data, efn->size);
1777 }
1778
1779 if (efn->data)
1780 memcpy(data, efn->data, size);
1781 else
1782 if (!read_data_from_disk(ef, efn, data, size))
1783 goto on_error;
1784
1785 if (efn->ciphered && cipher_key)
1786 {
1787 if (eet_decipher(data, efn->size, cipher_key, strlen(cipher_key),
1788 &data_deciphered, &data_deciphered_sz))
1789 {
1790 if (data_deciphered)
1791 free(data_deciphered);
1792
1793 goto on_error;
1794 }
1795
1796 free(data);
1797 data = data_deciphered;
1798 size = data_deciphered_sz;
1799 }
1800 }
1801 /* compressed data */
1802 else
1803 {
1804 void *tmp_data = NULL;
1805 void *data_deciphered = NULL;
1806 unsigned int data_deciphered_sz = 0;
1807 int free_tmp = 0;
1808 int compr_size = efn->size;
1809 uLongf dlen;
1810
1811 /* if we already have the data in ram... copy that */
1812 if (efn->data)
1813 tmp_data = efn->data;
1814 else
1815 {
1816 tmp_data = malloc(compr_size);
1817 if (!tmp_data)
1818 goto on_error;
1819
1820 free_tmp = 1;
1821
1822 if (!read_data_from_disk(ef, efn, tmp_data, compr_size))
1823 {
1824 free(tmp_data);
1825 goto on_error;
1826 }
1827 }
1828
1829 if (efn->ciphered && cipher_key)
1830 {
1831 if (eet_decipher(tmp_data, compr_size, cipher_key,
1832 strlen(cipher_key), &data_deciphered,
1833 &data_deciphered_sz))
1834 {
1835 if (free_tmp)
1836 free(tmp_data);
1837
1838 if (data_deciphered)
1839 free(data_deciphered);
1840
1841 goto on_error;
1842 }
1843
1844 if (free_tmp)
1845 free(tmp_data);
1846 free_tmp = 1;
1847 tmp_data = data_deciphered;
1848 compr_size = data_deciphered_sz;
1849 }
1850
1851 /* decompress it */
1852 dlen = size;
1853 if (uncompress((Bytef *)data, &dlen,
1854 tmp_data, (uLongf)compr_size))
1855 {
1856 if (free_tmp)
1857 free(tmp_data);
1858 goto on_error;
1859 }
1860
1861 if (free_tmp)
1862 free(tmp_data);
1863 }
1864
1865 UNLOCK_FILE(ef);
1866
1867 /* handle alias */
1868 if (efn->alias)
1869 {
1870 void *tmp;
1871
1872 if (data[size - 1] != '\0')
1873 goto on_error;
1874
1875 tmp = eet_read_cipher(ef, data, size_ret, cipher_key);
1876
1877 free(data);
1878
1879 data = tmp;
1880 }
1881 else
1882 /* fill in return values */
1883 if (size_ret)
1884 *size_ret = size;
1885
1886 return data;
1887
1888on_error:
1889 UNLOCK_FILE(ef);
1890 free(data);
1891 return NULL;
1892} /* eet_read_cipher */
1893
1894EAPI void *
1895eet_read(Eet_File *ef,
1896 const char *name,
1897 int *size_ret)
1898{
1899 return eet_read_cipher(ef, name, size_ret, NULL);
1900} /* eet_read */
1901
1902EAPI const void *
1903eet_read_direct(Eet_File *ef,
1904 const char *name,
1905 int *size_ret)
1906{
1907 Eet_File_Node *efn;
1908 const char *data = NULL;
1909 int size = 0;
1910
1911 if (size_ret)
1912 *size_ret = 0;
1913
1914 /* check to see its' an eet file pointer */
1915 if (eet_check_pointer(ef))
1916 return NULL;
1917
1918 if (!name)
1919 return NULL;
1920
1921 if ((ef->mode != EET_FILE_MODE_READ) &&
1922 (ef->mode != EET_FILE_MODE_READ_WRITE))
1923 return NULL;
1924
1925 /* no header, return NULL */
1926 if (eet_check_header(ef))
1927 return NULL;
1928
1929 LOCK_FILE(ef);
1930
1931 /* hunt hash bucket */
1932 efn = find_node_by_name(ef, name);
1933 if (!efn)
1934 goto on_error;
1935
1936 /* trick to detect data in memory instead of mmaped from disk */
1937 if (efn->offset > ef->data_size && !efn->data)
1938 goto on_error;
1939
1940 /* get size (uncompressed, if compressed at all) */
1941 size = efn->data_size;
1942
1943 if (efn->alias)
1944 {
1945 data = efn->data ? efn->data : ef->data + efn->offset;
1946
1947 /* handle alias case */
1948 if (efn->compression)
1949 {
1950 char *tmp;
1951 int compr_size = efn->size;
1952 uLongf dlen;
1953
1954 tmp = alloca(sizeof (compr_size));
1955 dlen = size;
1956
1957 if (uncompress((Bytef *)tmp, &dlen, (Bytef *)data,
1958 (uLongf)compr_size))
1959 goto on_error;
1960
1961 if (tmp[compr_size - 1] != '\0')
1962 goto on_error;
1963
1964 UNLOCK_FILE(ef);
1965
1966 return eet_read_direct(ef, tmp, size_ret);
1967 }
1968
1969 if (!data)
1970 goto on_error;
1971
1972 if (data[size - 1] != '\0')
1973 goto on_error;
1974
1975 UNLOCK_FILE(ef);
1976
1977 return eet_read_direct(ef, data, size_ret);
1978 }
1979 else
1980 /* uncompressed data */
1981 if (efn->compression == 0
1982 && efn->ciphered == 0)
1983 data = efn->data ? efn->data : ef->data + efn->offset; /* compressed data */
1984 else
1985 data = NULL;
1986
1987 /* fill in return values */
1988 if (size_ret)
1989 *size_ret = size;
1990
1991 UNLOCK_FILE(ef);
1992
1993 return data;
1994
1995on_error:
1996 UNLOCK_FILE(ef);
1997 return NULL;
1998} /* eet_read_direct */
1999
2000EAPI const char *
2001eet_alias_get(Eet_File *ef,
2002 const char *name)
2003{
2004 Eet_File_Node *efn;
2005 const char *data = NULL;
2006 int size = 0;
2007
2008 /* check to see its' an eet file pointer */
2009 if (eet_check_pointer(ef))
2010 return NULL;
2011
2012 if (!name)
2013 return NULL;
2014
2015 if ((ef->mode != EET_FILE_MODE_READ) &&
2016 (ef->mode != EET_FILE_MODE_READ_WRITE))
2017 return NULL;
2018
2019 /* no header, return NULL */
2020 if (eet_check_header(ef))
2021 return NULL;
2022
2023 LOCK_FILE(ef);
2024
2025 /* hunt hash bucket */
2026 efn = find_node_by_name(ef, name);
2027 if (!efn)
2028 goto on_error;
2029
2030 /* trick to detect data in memory instead of mmaped from disk */
2031 if (efn->offset > ef->data_size && !efn->data)
2032 goto on_error;
2033
2034 /* get size (uncompressed, if compressed at all) */
2035 size = efn->data_size;
2036
2037 if (!efn->alias) return NULL;
2038 data = efn->data ? efn->data : ef->data + efn->offset;
2039
2040 /* handle alias case */
2041 if (efn->compression)
2042 {
2043 char *tmp;
2044 int compr_size = efn->size;
2045 uLongf dlen;
2046
2047 tmp = alloca(sizeof (compr_size));
2048 dlen = size;
2049
2050 if (uncompress((Bytef *)tmp, &dlen, (Bytef *)data,
2051 (uLongf)compr_size))
2052 goto on_error;
2053
2054 if (tmp[compr_size - 1] != '\0')
2055 goto on_error;
2056
2057 UNLOCK_FILE(ef);
2058
2059 return eina_stringshare_add(tmp);
2060 }
2061
2062 if (!data)
2063 goto on_error;
2064
2065 if (data[size - 1] != '\0')
2066 goto on_error;
2067
2068 UNLOCK_FILE(ef);
2069
2070 return eina_stringshare_add(data);
2071
2072on_error:
2073 UNLOCK_FILE(ef);
2074 return NULL;
2075}
2076
2077EAPI Eina_Bool
2078eet_alias(Eet_File *ef,
2079 const char *name,
2080 const char *destination,
2081 int comp)
2082{
2083 Eet_File_Node *efn;
2084 void *data2;
2085 Eina_Bool exists_already = EINA_FALSE;
2086 int data_size;
2087 int hash;
2088
2089 /* check to see its' an eet file pointer */
2090 if (eet_check_pointer(ef))
2091 return EINA_FALSE;
2092
2093 if ((!name) || (!destination))
2094 return EINA_FALSE;
2095
2096 if ((ef->mode != EET_FILE_MODE_WRITE) &&
2097 (ef->mode != EET_FILE_MODE_READ_WRITE))
2098 return EINA_FALSE;
2099
2100 LOCK_FILE(ef);
2101
2102 if (!ef->header)
2103 {
2104 /* allocate header */
2105 ef->header = calloc(1, sizeof(Eet_File_Header));
2106 if (!ef->header)
2107 goto on_error;
2108
2109 ef->header->magic = EET_MAGIC_FILE_HEADER;
2110 /* allocate directory block in ram */
2111 ef->header->directory = calloc(1, sizeof(Eet_File_Directory));
2112 if (!ef->header->directory)
2113 {
2114 free(ef->header);
2115 ef->header = NULL;
2116 goto on_error;
2117 }
2118
2119 /* 8 bit hash table (256 buckets) */
2120 ef->header->directory->size = 8;
2121 /* allocate base hash table */
2122 ef->header->directory->nodes =
2123 calloc(1, sizeof(Eet_File_Node *) *
2124 (1 << ef->header->directory->size));
2125 if (!ef->header->directory->nodes)
2126 {
2127 free(ef->header->directory);
2128 ef->header = NULL;
2129 goto on_error;
2130 }
2131 }
2132
2133 /* figure hash bucket */
2134 hash = _eet_hash_gen(name, ef->header->directory->size);
2135
2136 data_size = comp ?
2137 12 + (((strlen(destination) + 1) * 101) / 100)
2138 : strlen(destination) + 1;
2139
2140 data2 = malloc(data_size);
2141 if (!data2)
2142 goto on_error;
2143
2144 /* if we want to compress */
2145 if (comp)
2146 {
2147 uLongf buflen;
2148
2149 /* compress the data with max compression */
2150 buflen = (uLongf)data_size;
2151 if (compress2((Bytef *)data2, &buflen, (Bytef *)destination,
2152 (uLong)strlen(destination) + 1,
2153 Z_BEST_COMPRESSION) != Z_OK)
2154 {
2155 free(data2);
2156 goto on_error;
2157 }
2158
2159 /* record compressed chunk size */
2160 data_size = (int)buflen;
2161 if (data_size < 0 || data_size >= (int)(strlen(destination) + 1))
2162 {
2163 comp = 0;
2164 data_size = strlen(destination) + 1;
2165 }
2166 else
2167 {
2168 void *data3;
2169
2170 data3 = realloc(data2, data_size);
2171 if (data3)
2172 data2 = data3;
2173 }
2174 }
2175
2176 if (!comp)
2177 memcpy(data2, destination, data_size);
2178
2179 /* Does this node already exist? */
2180 for (efn = ef->header->directory->nodes[hash]; efn; efn = efn->next)
2181 {
2182 /* if it matches */
2183 if ((efn->name) && (eet_string_match(efn->name, name)))
2184 {
2185 free(efn->data);
2186 efn->alias = 1;
2187 efn->ciphered = 0;
2188 efn->compression = !!comp;
2189 efn->size = data_size;
2190 efn->data_size = strlen(destination) + 1;
2191 efn->data = data2;
2192 /* Put the offset above the limit to avoid direct access */
2193 efn->offset = ef->data_size + 1;
2194 exists_already = EINA_TRUE;
2195
2196 break;
2197 }
2198 }
2199 if (!exists_already)
2200 {
2201 efn = malloc(sizeof(Eet_File_Node));
2202 if (!efn)
2203 {
2204 free(data2);
2205 goto on_error;
2206 }
2207
2208 efn->name = strdup(name);
2209 efn->name_size = strlen(efn->name) + 1;
2210 efn->free_name = 1;
2211
2212 efn->next = ef->header->directory->nodes[hash];
2213 ef->header->directory->nodes[hash] = efn;
2214 /* Put the offset above the limit to avoid direct access */
2215 efn->offset = ef->data_size + 1;
2216 efn->alias = 1;
2217 efn->ciphered = 0;
2218 efn->compression = !!comp;
2219 efn->size = data_size;
2220 efn->data_size = strlen(destination) + 1;
2221 efn->data = data2;
2222 }
2223
2224 /* flags that writes are pending */
2225 ef->writes_pending = 1;
2226
2227 UNLOCK_FILE(ef);
2228 return EINA_TRUE;
2229
2230on_error:
2231 UNLOCK_FILE(ef);
2232 return EINA_FALSE;
2233} /* eet_alias */
2234
2235EAPI int
2236eet_write_cipher(Eet_File *ef,
2237 const char *name,
2238 const void *data,
2239 int size,
2240 int comp,
2241 const char *cipher_key)
2242{
2243 Eet_File_Node *efn;
2244 void *data2 = NULL;
2245 int exists_already = 0;
2246 int data_size;
2247 int hash;
2248
2249 /* check to see its' an eet file pointer */
2250 if (eet_check_pointer(ef))
2251 return 0;
2252
2253 if ((!name) || (!data) || (size <= 0))
2254 return 0;
2255
2256 if ((ef->mode != EET_FILE_MODE_WRITE) &&
2257 (ef->mode != EET_FILE_MODE_READ_WRITE))
2258 return 0;
2259
2260 LOCK_FILE(ef);
2261
2262 if (!ef->header)
2263 {
2264 /* allocate header */
2265 ef->header = calloc(1, sizeof(Eet_File_Header));
2266 if (!ef->header)
2267 goto on_error;
2268
2269 ef->header->magic = EET_MAGIC_FILE_HEADER;
2270 /* allocate directory block in ram */
2271 ef->header->directory = calloc(1, sizeof(Eet_File_Directory));
2272 if (!ef->header->directory)
2273 {
2274 free(ef->header);
2275 ef->header = NULL;
2276 goto on_error;
2277 }
2278
2279 /* 8 bit hash table (256 buckets) */
2280 ef->header->directory->size = 8;
2281 /* allocate base hash table */
2282 ef->header->directory->nodes =
2283 calloc(1, sizeof(Eet_File_Node *) *
2284 (1 << ef->header->directory->size));
2285 if (!ef->header->directory->nodes)
2286 {
2287 free(ef->header->directory);
2288 ef->header = NULL;
2289 goto on_error;
2290 }
2291 }
2292
2293 /* figure hash bucket */
2294 hash = _eet_hash_gen(name, ef->header->directory->size);
2295
2296 data_size = comp ? 12 + ((size * 101) / 100) : size;
2297
2298 if (comp || !cipher_key)
2299 {
2300 data2 = malloc(data_size);
2301 if (!data2)
2302 goto on_error;
2303 }
2304
2305 /* if we want to compress */
2306 if (comp)
2307 {
2308 uLongf buflen;
2309
2310 /* compress the data with max compression */
2311 buflen = (uLongf)data_size;
2312 if (compress2((Bytef *)data2, &buflen, (Bytef *)data,
2313 (uLong)size, Z_BEST_COMPRESSION) != Z_OK)
2314 {
2315 free(data2);
2316 goto on_error;
2317 }
2318
2319 /* record compressed chunk size */
2320 data_size = (int)buflen;
2321 if (data_size < 0 || data_size >= size)
2322 {
2323 comp = 0;
2324 data_size = size;
2325 }
2326 else
2327 {
2328 void *data3;
2329
2330 data3 = realloc(data2, data_size);
2331 if (data3)
2332 data2 = data3;
2333 }
2334 }
2335
2336 if (cipher_key)
2337 {
2338 void *data_ciphered = NULL;
2339 unsigned int data_ciphered_sz = 0;
2340 const void *tmp;
2341
2342 tmp = comp ? data2 : data;
2343 if (!eet_cipher(tmp, data_size, cipher_key, strlen(cipher_key),
2344 &data_ciphered, &data_ciphered_sz))
2345 {
2346 if (data2)
2347 free(data2);
2348
2349 data2 = data_ciphered;
2350 data_size = data_ciphered_sz;
2351 }
2352 else
2353 {
2354 if (data_ciphered)
2355 free(data_ciphered);
2356
2357 cipher_key = NULL;
2358 }
2359 }
2360 else
2361 if (!comp)
2362 memcpy(data2, data, size);
2363
2364 /* Does this node already exist? */
2365 for (efn = ef->header->directory->nodes[hash]; efn; efn = efn->next)
2366 {
2367 /* if it matches */
2368 if ((efn->name) && (eet_string_match(efn->name, name)))
2369 {
2370 free(efn->data);
2371 efn->alias = 0;
2372 efn->ciphered = cipher_key ? 1 : 0;
2373 efn->compression = !!comp;
2374 efn->size = data_size;
2375 efn->data_size = size;
2376 efn->data = data2;
2377 /* Put the offset above the limit to avoid direct access */
2378 efn->offset = ef->data_size + 1;
2379 exists_already = 1;
2380 break;
2381 }
2382 }
2383 if (!exists_already)
2384 {
2385 efn = malloc(sizeof(Eet_File_Node));
2386 if (!efn)
2387 {
2388 free(data2);
2389 goto on_error;
2390 }
2391
2392 efn->name = strdup(name);
2393 efn->name_size = strlen(efn->name) + 1;
2394 efn->free_name = 1;
2395
2396 efn->next = ef->header->directory->nodes[hash];
2397 ef->header->directory->nodes[hash] = efn;
2398 /* Put the offset above the limit to avoid direct access */
2399 efn->offset = ef->data_size + 1;
2400 efn->alias = 0;
2401 efn->ciphered = cipher_key ? 1 : 0;
2402 efn->compression = !!comp;
2403 efn->size = data_size;
2404 efn->data_size = size;
2405 efn->data = data2;
2406 }
2407
2408 /* flags that writes are pending */
2409 ef->writes_pending = 1;
2410 UNLOCK_FILE(ef);
2411 return data_size;
2412
2413on_error:
2414 UNLOCK_FILE(ef);
2415 return 0;
2416} /* eet_write_cipher */
2417
2418EAPI int
2419eet_write(Eet_File *ef,
2420 const char *name,
2421 const void *data,
2422 int size,
2423 int comp)
2424{
2425 return eet_write_cipher(ef, name, data, size, comp, NULL);
2426} /* eet_write */
2427
2428EAPI int
2429eet_delete(Eet_File *ef,
2430 const char *name)
2431{
2432 Eet_File_Node *efn;
2433 Eet_File_Node *pefn;
2434 int hash;
2435 int exists_already = 0;
2436
2437 /* check to see its' an eet file pointer */
2438 if (eet_check_pointer(ef))
2439 return 0;
2440
2441 if (!name)
2442 return 0;
2443
2444 /* deleting keys is only possible in RW or WRITE mode */
2445 if (ef->mode == EET_FILE_MODE_READ)
2446 return 0;
2447
2448 if (eet_check_header(ef))
2449 return 0;
2450
2451 LOCK_FILE(ef);
2452
2453 /* figure hash bucket */
2454 hash = _eet_hash_gen(name, ef->header->directory->size);
2455
2456 /* Does this node already exist? */
2457 for (pefn = NULL, efn = ef->header->directory->nodes[hash];
2458 efn;
2459 pefn = efn, efn = efn->next)
2460 {
2461 /* if it matches */
2462 if (eet_string_match(efn->name, name))
2463 {
2464 if (efn->data)
2465 free(efn->data);
2466
2467 if (!pefn)
2468 ef->header->directory->nodes[hash] = efn->next;
2469 else
2470 pefn->next = efn->next;
2471
2472 if (efn->free_name)
2473 free(efn->name);
2474
2475 free(efn);
2476 exists_already = 1;
2477 break;
2478 }
2479 }
2480 /* flags that writes are pending */
2481 if (exists_already)
2482 ef->writes_pending = 1;
2483
2484 UNLOCK_FILE(ef);
2485
2486 /* update access time */
2487 return exists_already;
2488} /* eet_delete */
2489
2490EAPI Eet_Dictionary *
2491eet_dictionary_get(Eet_File *ef)
2492{
2493 if (eet_check_pointer(ef))
2494 return NULL;
2495
2496 return ef->ed;
2497} /* eet_dictionary_get */
2498
2499EAPI char **
2500eet_list(Eet_File *ef,
2501 const char *glob,
2502 int *count_ret)
2503{
2504 Eet_File_Node *efn;
2505 char **list_ret = NULL;
2506 int list_count = 0;
2507 int list_count_alloc = 0;
2508 int i, num;
2509
2510 /* check to see its' an eet file pointer */
2511 if (eet_check_pointer(ef) || eet_check_header(ef) ||
2512 (!glob) ||
2513 ((ef->mode != EET_FILE_MODE_READ) &&
2514 (ef->mode != EET_FILE_MODE_READ_WRITE)))
2515 {
2516 if (count_ret)
2517 *count_ret = 0;
2518
2519 return NULL;
2520 }
2521
2522 if (!strcmp(glob, "*"))
2523 glob = NULL;
2524
2525 LOCK_FILE(ef);
2526
2527 /* loop through all entries */
2528 num = (1 << ef->header->directory->size);
2529 for (i = 0; i < num; i++)
2530 {
2531 for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
2532 {
2533 /* if the entry matches the input glob
2534 * check for * explicitly, because on some systems, * isn't well
2535 * supported
2536 */
2537 if ((!glob) || !fnmatch(glob, efn->name, 0))
2538 {
2539 /* add it to our list */
2540 list_count++;
2541
2542 /* only realloc in 32 entry chunks */
2543 if (list_count > list_count_alloc)
2544 {
2545 char **new_list = NULL;
2546
2547 list_count_alloc += 64;
2548 new_list =
2549 realloc(list_ret, list_count_alloc * (sizeof(char *)));
2550 if (!new_list)
2551 {
2552 free(list_ret);
2553
2554 goto on_error;
2555 }
2556
2557 list_ret = new_list;
2558 }
2559
2560 /* put pointer of name string in */
2561 list_ret[list_count - 1] = efn->name;
2562 }
2563 }
2564 }
2565
2566 UNLOCK_FILE(ef);
2567
2568 /* return count and list */
2569 if (count_ret)
2570 *count_ret = list_count;
2571
2572 return list_ret;
2573
2574on_error:
2575 UNLOCK_FILE(ef);
2576
2577 if (count_ret)
2578 *count_ret = 0;
2579
2580 return NULL;
2581} /* eet_list */
2582
2583EAPI int
2584eet_num_entries(Eet_File *ef)
2585{
2586 int i, num, ret = 0;
2587 Eet_File_Node *efn;
2588
2589 /* check to see its' an eet file pointer */
2590 if (eet_check_pointer(ef) || eet_check_header(ef) ||
2591 ((ef->mode != EET_FILE_MODE_READ) &&
2592 (ef->mode != EET_FILE_MODE_READ_WRITE)))
2593 return -1;
2594
2595 LOCK_FILE(ef);
2596
2597 /* loop through all entries */
2598 num = (1 << ef->header->directory->size);
2599 for (i = 0; i < num; i++)
2600 {
2601 for (efn = ef->header->directory->nodes[i]; efn; efn = efn->next)
2602 ret++;
2603 }
2604
2605 UNLOCK_FILE(ef);
2606
2607 return ret;
2608} /* eet_num_entries */
2609
2610static Eet_File_Node *
2611find_node_by_name(Eet_File *ef,
2612 const char *name)
2613{
2614 Eet_File_Node *efn;
2615 int hash;
2616
2617 /* get hash bucket this should be in */
2618 hash = _eet_hash_gen(name, ef->header->directory->size);
2619
2620 for (efn = ef->header->directory->nodes[hash]; efn; efn = efn->next)
2621 {
2622 if (eet_string_match(efn->name, name))
2623 return efn;
2624 }
2625
2626 return NULL;
2627} /* find_node_by_name */
2628
2629static int
2630read_data_from_disk(Eet_File *ef,
2631 Eet_File_Node *efn,
2632 void *buf,
2633 int len)
2634{
2635 if (efn->offset > ef->data_size)
2636 return 0;
2637
2638 if (!ef->data)
2639 return 0;
2640
2641 if ((efn->offset + len) > ef->data_size)
2642 return 0;
2643
2644 memcpy(buf, ef->data + efn->offset, len);
2645
2646 return len;
2647} /* read_data_from_disk */
2648
diff --git a/libraries/eet/src/lib/eet_node.c b/libraries/eet/src/lib/eet_node.c
new file mode 100644
index 0000000..d90ef83
--- /dev/null
+++ b/libraries/eet/src/lib/eet_node.c
@@ -0,0 +1,797 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#include <string.h>
6#include <stdio.h>
7
8#ifdef HAVE_EVIL
9# include <Evil.h>
10#endif /* ifdef HAVE_EVIL */
11
12#include <Eina.h>
13
14#include "Eet.h"
15#include "Eet_private.h"
16
17static Eina_Mempool *_eet_node_mp = NULL;
18
19Eet_Node *
20eet_node_new(void)
21{
22 Eet_Node *result;
23
24 result = eina_mempool_malloc(_eet_node_mp, sizeof (Eet_Node));
25 if (!result)
26 return NULL;
27
28 memset(result, 0, sizeof (Eet_Node));
29 return result;
30} /* eet_node_new */
31
32void
33eet_node_free(Eet_Node *node)
34{
35 eina_mempool_free(_eet_node_mp, node);
36} /* eet_node_free */
37
38static Eet_Node *
39_eet_node_new(const char *name,
40 int type)
41{
42 Eet_Node *n;
43
44 n = eet_node_new();
45 if (!n)
46 return NULL;
47
48 n->type = type;
49 n->name = eina_stringshare_add(name);
50
51 return n;
52} /* _eet_node_new */
53
54static void
55_eet_node_append(Eet_Node *n,
56 Eina_List *nodes)
57{
58 Eet_Node *value;
59 Eina_List *l;
60
61 EINA_LIST_REVERSE_FOREACH(nodes, l, value)
62 {
63 value->next = n->values;
64 n->values = value;
65 }
66} /* _eet_node_append */
67
68#define EET_NODE_NEW(Eet_type, Name, Value, Type) \
69 EAPI Eet_Node * \
70 eet_node_ ## Name ## _new(const char *name, Type Value) \
71 { \
72 Eet_Node *n; \
73 \
74 n = _eet_node_new(name, Eet_type); \
75 if (!n) { return NULL; } \
76 \
77 n->data.value.Value = Value; \
78 \
79 return n; \
80 }
81
82#define EET_NODE_STR_NEW(Eet_type, Name, Value, Type) \
83 EAPI Eet_Node * \
84 eet_node_ ## Name ## _new(const char *name, Type Value) \
85 { \
86 Eet_Node *n; \
87 \
88 n = _eet_node_new(name, Eet_type); \
89 if (!n) { return NULL; } \
90 \
91 n->data.value.Value = eina_stringshare_add(Value); \
92 \
93 return n; \
94 }
95
96EET_NODE_NEW(EET_T_CHAR, char, c, char)
97EET_NODE_NEW(EET_T_SHORT, short, s, short)
98EET_NODE_NEW(EET_T_INT, int, i, int)
99EET_NODE_NEW(EET_T_LONG_LONG, long_long, l, long long)
100EET_NODE_NEW(EET_T_FLOAT, float, f, float)
101EET_NODE_NEW(EET_T_DOUBLE, double, d, double)
102EET_NODE_NEW(EET_T_UCHAR, unsigned_char, uc, unsigned char)
103EET_NODE_NEW(EET_T_USHORT, unsigned_short, us, unsigned short)
104EET_NODE_NEW(EET_T_UINT, unsigned_int, ui, unsigned int)
105EET_NODE_NEW(EET_T_ULONG_LONG, unsigned_long_long, ul, unsigned long long)
106EET_NODE_STR_NEW(EET_T_STRING, string, str, const char *)
107EET_NODE_STR_NEW(EET_T_INLINED_STRING, inlined_string, str, const char *)
108
109Eet_Node *
110eet_node_null_new(const char *name)
111{
112 Eet_Node *n;
113
114 n = _eet_node_new(name, EET_T_NULL);
115 if (!n)
116 return NULL;
117
118 n->data.value.str = NULL;
119
120 return n;
121}
122
123Eet_Node *
124eet_node_list_new(const char *name,
125 Eina_List *nodes)
126{
127 Eet_Node *n;
128
129 n = _eet_node_new(name, EET_G_LIST);
130 if (!n)
131 return NULL;
132
133 _eet_node_append(n, nodes);
134
135 return n;
136} /* eet_node_list_new */
137
138Eet_Node *
139eet_node_array_new(const char *name,
140 int count,
141 Eina_List *nodes)
142{
143 Eet_Node *n;
144
145 n = _eet_node_new(name, EET_G_ARRAY);
146 if (!n)
147 return NULL;
148
149 n->count = count;
150
151 _eet_node_append(n, nodes);
152
153 return n;
154} /* eet_node_array_new */
155
156Eet_Node *
157eet_node_var_array_new(const char *name,
158 Eina_List *nodes)
159{
160 Eet_Node *n;
161
162 n = _eet_node_new(name, EET_G_VAR_ARRAY);
163 if (!n)
164 return NULL;
165
166 n->count = eina_list_count(nodes);
167
168 _eet_node_append(n, nodes);
169
170 return n;
171} /* eet_node_var_array_new */
172
173Eet_Node *
174eet_node_hash_new(const char *name,
175 const char *key,
176 Eet_Node *node)
177{
178 Eina_List *nodes;
179 Eet_Node *n;
180
181 if (!node)
182 return NULL;
183
184 n = _eet_node_new(name, EET_G_HASH);
185 if (!n)
186 return NULL;
187
188 n->key = eina_stringshare_add(key);
189 nodes = eina_list_append(NULL, node);
190
191 _eet_node_append(n, nodes);
192
193 return n;
194} /* eet_node_hash_new */
195
196Eet_Node *
197eet_node_struct_new(const char *name,
198 Eina_List *nodes)
199{
200 Eet_Node *n;
201
202 n = _eet_node_new(name, EET_G_UNKNOWN);
203 if (!n)
204 return NULL;
205
206 _eet_node_append(n, nodes);
207
208 return n;
209} /* eet_node_struct_new */
210
211Eet_Node *
212eet_node_struct_child_new(const char *parent,
213 Eet_Node *child)
214{
215 Eet_Node *n;
216
217 if (!child) return NULL;
218
219 if (child->type != EET_G_UNKNOWN)
220 return child;
221
222 n = _eet_node_new(parent, EET_G_UNKNOWN);
223 if (!n)
224 return NULL;
225
226 _eet_node_append(n, eina_list_prepend(NULL, child));
227
228 return n;
229} /* eet_node_struct_child_new */
230
231Eet_Node *
232eet_node_children_get(Eet_Node *node)
233{
234 if (!node) return NULL;
235 return node->values;
236}
237
238Eet_Node *
239eet_node_next_get(Eet_Node *node)
240{
241 if (!node) return NULL;
242 return node->next;
243}
244
245Eet_Node *
246eet_node_parent_get(Eet_Node *node)
247{
248 if (!node) return NULL;
249 return node->parent;
250}
251
252void
253eet_node_list_append(Eet_Node *parent,
254 const char *name,
255 Eet_Node *child)
256{
257 const char *tmp;
258 Eet_Node *nn;
259
260 if ((!parent) || (!child)) return;
261 tmp = eina_stringshare_add(name);
262
263 for (nn = parent->values; nn; nn = nn->next)
264 if (nn->name == tmp && nn->type == EET_G_LIST)
265 {
266 Eet_Node *n;
267
268 if (!nn->values)
269 nn->values = child;
270 else
271 {
272 for (n = nn->values; n->next; n = n->next)
273 ;
274 n->next = child;
275 }
276
277 child->next = NULL;
278
279 eina_stringshare_del(tmp);
280
281 return;
282 }
283
284 /* No list found, so create it. */
285 nn = eet_node_list_new(tmp, eina_list_append(NULL, child));
286
287 /* And add it to the parent. */
288 nn->next = parent->values;
289 parent->values = nn;
290
291 eina_stringshare_del(tmp);
292} /* eet_node_list_append */
293
294void
295eet_node_struct_append(Eet_Node *parent,
296 const char *name,
297 Eet_Node *child)
298{
299 const char *tmp;
300 Eet_Node *prev;
301 Eet_Node *nn;
302
303 if ((!parent) || (!child)) return;
304 if (parent->type != EET_G_UNKNOWN)
305 {
306 ERR("[%s] is not a structure. Will not insert [%s] in it",
307 parent->name,
308 name);
309 eet_node_del(child);
310 return;
311 }
312
313 tmp = eina_stringshare_add(name);
314
315 for (prev = NULL, nn = parent->values; nn; prev = nn, nn = nn->next)
316 if (nn->name == tmp && nn->type == child->type)
317 {
318 if (prev)
319 prev->next = nn->next;
320 else
321 parent->values = nn->next;
322
323 nn->next = NULL;
324 eet_node_del(nn);
325
326 break;
327 }
328
329 if (prev)
330 {
331 prev->next = child;
332 child->next = NULL;
333 }
334 else
335 {
336 child->next = NULL;
337 parent->values = child;
338 }
339
340 eina_stringshare_del(tmp);
341} /* eet_node_struct_append */
342
343void
344eet_node_hash_add(Eet_Node *parent,
345 const char *name,
346 const char *key,
347 Eet_Node *child)
348{
349 Eet_Node *nn;
350
351 if ((!parent) || (!child)) return;
352
353 /* No list found, so create it. */
354 nn = eet_node_hash_new(name, key, child);
355
356 /* And add it to the parent. */
357 nn->next = parent->values;
358 parent->values = nn;
359} /* eet_node_hash_add */
360
361int
362eet_node_type_get(Eet_Node *node)
363{
364 if (!node) return EET_T_UNKNOW;
365 return node->type;
366}
367
368Eet_Node_Data *
369eet_node_value_get(Eet_Node *node)
370{
371 if (!node) return NULL;
372 return &node->data;
373}
374
375const char *
376eet_node_name_get(Eet_Node *node)
377{
378 if (!node) return NULL;
379 return node->name;
380}
381
382void
383eet_node_del(Eet_Node *n)
384{
385 Eet_Node *nn;
386 Eet_Node *tmp;
387
388 if (!n)
389 return;
390
391 switch (n->type)
392 {
393 case EET_G_HASH:
394 eina_stringshare_del(n->key);
395
396 case EET_G_UNKNOWN:
397 case EET_G_VAR_ARRAY:
398 case EET_G_ARRAY:
399 case EET_G_LIST:
400 for (nn = n->values; nn; )
401 {
402 tmp = nn;
403 nn = nn->next;
404 eet_node_del(tmp);
405 }
406 break;
407
408 case EET_T_STRING:
409 case EET_T_INLINED_STRING:
410 eina_stringshare_del(n->data.value.str);
411 break;
412
413 case EET_T_CHAR:
414 case EET_T_SHORT:
415 case EET_T_INT:
416 case EET_T_LONG_LONG:
417 case EET_T_FLOAT:
418 case EET_T_DOUBLE:
419 case EET_T_UCHAR:
420 case EET_T_USHORT:
421 case EET_T_UINT:
422 break;
423 } /* switch */
424
425 eina_stringshare_del(n->name);
426 eet_node_free(n);
427} /* eet_node_del */
428
429static const char *eet_node_dump_g_name[6] = {
430 "struct",
431 "array",
432 "var_array",
433 "list",
434 "hash",
435 "???"
436};
437
438static const char *eet_node_dump_t_name[14][2] = {
439 { "???: ", "???" },
440 { "char: ", "%hhi" },
441 { "short: ", "%hi" },
442 { "int: ", "%i" },
443 { "long_long: ", "%lli" },
444 { "float: ", "%1.25f" },
445 { "double: ", "%1.25f" },
446 { "uchar: ", "%hhu" },
447 { "ushort: ", "%i" },
448 { "uint: ", "%u" },
449 { "ulong_long: ", "%llu" },
450 { "null", "" }
451};
452
453static void
454eet_node_dump_level(int level,
455 Eet_Dump_Callback dumpfunc,
456 void *dumpdata)
457{
458 int i;
459
460 for (i = 0; i < level; i++) dumpfunc(dumpdata, " ");
461} /* eet_node_dump_level */
462
463static char *
464eet_node_string_escape(const char *str)
465{
466 char *s, *sp;
467 const char *strp;
468 int sz = 0;
469
470 for (strp = str; *strp; strp++)
471 {
472 if (*strp == '\"')
473 sz += 2;
474 else if (*strp == '\\')
475 sz += 2;
476 else if (*strp == '\n')
477 sz += 2;
478 else
479 sz += 1;
480 }
481 s = malloc(sz + 1);
482 if (!s)
483 return NULL;
484
485 for (strp = str, sp = s; *strp; strp++, sp++)
486 {
487 if (*strp == '\"'
488 || *strp == '\\'
489 || *strp == '\n')
490 {
491 *sp = '\\';
492 sp++;
493 }
494
495 if (*strp == '\n')
496 *sp = 'n';
497 else
498 *sp = *strp;
499 }
500 *sp = 0;
501 return s;
502} /* eet_node_string_escape */
503
504static void
505eet_node_dump_string_escape(void *dumpdata,
506 Eet_Dump_Callback dumpfunc,
507 const char *str)
508{
509 char *s;
510
511 s = eet_node_string_escape(str);
512 if (!s)
513 return;
514
515 dumpfunc(dumpdata, s);
516 free(s);
517} /* eet_node_dump_string_escape */
518
519static void
520eet_node_dump_simple_type(Eet_Node *n,
521 int level,
522 Eet_Dump_Callback dumpfunc,
523 void *dumpdata)
524{
525 const char *type_name = NULL;
526 char tbuf[256];
527
528 eet_node_dump_level(level, dumpfunc, dumpdata);
529 dumpfunc(dumpdata, "value \"");
530 eet_node_dump_string_escape(dumpdata, dumpfunc, n->name);
531 dumpfunc(dumpdata, "\" ");
532
533#ifdef EET_T_TYPE
534# undef EET_T_TYPE
535#endif /* ifdef EET_T_TYPE */
536
537#define EET_T_TYPE(Eet_Type, Type) \
538case Eet_Type: \
539{ \
540 dumpfunc(dumpdata, eet_node_dump_t_name[Eet_Type][0]); \
541 snprintf(tbuf, \
542 sizeof (tbuf), \
543 eet_node_dump_t_name[Eet_Type][1], \
544 n->data.value.Type); \
545 dumpfunc(dumpdata, tbuf); \
546 break; \
547}
548
549 switch (n->type)
550 {
551 EET_T_TYPE(EET_T_CHAR, c);
552 EET_T_TYPE(EET_T_SHORT, s);
553 EET_T_TYPE(EET_T_INT, i);
554 EET_T_TYPE(EET_T_LONG_LONG, l);
555 EET_T_TYPE(EET_T_FLOAT, f);
556 EET_T_TYPE(EET_T_DOUBLE, d);
557 EET_T_TYPE(EET_T_UCHAR, uc);
558 EET_T_TYPE(EET_T_USHORT, us);
559 EET_T_TYPE(EET_T_UINT, ui);
560 EET_T_TYPE(EET_T_ULONG_LONG, ul);
561
562 case EET_T_INLINED_STRING:
563 type_name = "inlined: \"";
564
565 case EET_T_STRING:
566 if (!type_name)
567 type_name = "string: \"";
568
569 dumpfunc(dumpdata, type_name);
570 eet_node_dump_string_escape(dumpdata, dumpfunc, n->data.value.str);
571 dumpfunc(dumpdata, "\"");
572 break;
573
574 case EET_T_NULL:
575 dumpfunc(dumpdata, "null");
576 break;
577
578 default:
579 dumpfunc(dumpdata, "???: ???");
580 break;
581 } /* switch */
582
583 dumpfunc(dumpdata, ";\n");
584} /* eet_node_dump_simple_type */
585
586static void
587eet_node_dump_group_start(int level,
588 Eet_Dump_Callback dumpfunc,
589 void *dumpdata,
590 int group_type,
591 const char *name)
592{
593 int chnk_type;
594
595 chnk_type = (group_type >= EET_G_UNKNOWN && group_type <= EET_G_HASH) ?
596 group_type : EET_G_LAST;
597
598 eet_node_dump_level(level, dumpfunc, dumpdata);
599 dumpfunc(dumpdata, "group \"");
600 eet_node_dump_string_escape(dumpdata, dumpfunc, name);
601 dumpfunc(dumpdata, "\" ");
602
603 dumpfunc(dumpdata, eet_node_dump_g_name[chnk_type - EET_G_UNKNOWN]);
604 dumpfunc(dumpdata, " {\n");
605} /* eet_node_dump_group_start */
606
607static void
608eet_node_dump_group_end(int level,
609 Eet_Dump_Callback dumpfunc,
610 void *dumpdata)
611{
612 eet_node_dump_level(level, dumpfunc, dumpdata);
613 dumpfunc(dumpdata, "}\n");
614} /* eet_node_dump_group_end */
615
616void
617eet_node_dump(Eet_Node *n,
618 int dumplevel,
619 Eet_Dump_Callback dumpfunc,
620 void *dumpdata)
621{
622 Eet_Node *it;
623
624 if (!n)
625 return;
626
627 switch (n->type)
628 {
629 case EET_G_VAR_ARRAY:
630 case EET_G_ARRAY:
631 case EET_G_UNKNOWN:
632 case EET_G_HASH:
633 case EET_G_LIST:
634 eet_node_dump_group_start(dumplevel,
635 dumpfunc,
636 dumpdata,
637 n->type,
638 n->name);
639
640 if (n->type == EET_G_VAR_ARRAY
641 || n->type == EET_G_ARRAY)
642 {
643 char tbuf[256];
644
645 eet_node_dump_level(dumplevel, dumpfunc, dumpdata);
646 dumpfunc(dumpdata, " count ");
647 eina_convert_itoa(n->count, tbuf);
648 dumpfunc(dumpdata, tbuf);
649 dumpfunc(dumpdata, ";\n");
650 }
651 else if (n->type == EET_G_HASH)
652 {
653 eet_node_dump_level(dumplevel, dumpfunc, dumpdata);
654 dumpfunc(dumpdata, " key \"");
655 eet_node_dump_string_escape(dumpdata, dumpfunc, n->key);
656 dumpfunc(dumpdata, "\";\n");
657 }
658
659 for (it = n->values; it; it = it->next)
660 eet_node_dump(it, dumplevel + 2, dumpfunc, dumpdata);
661
662 eet_node_dump_group_end(dumplevel, dumpfunc, dumpdata);
663 break;
664
665 case EET_T_STRING:
666 case EET_T_INLINED_STRING:
667 case EET_T_CHAR:
668 case EET_T_SHORT:
669 case EET_T_INT:
670 case EET_T_LONG_LONG:
671 case EET_T_FLOAT:
672 case EET_T_DOUBLE:
673 case EET_T_UCHAR:
674 case EET_T_USHORT:
675 case EET_T_UINT:
676 case EET_T_ULONG_LONG:
677 eet_node_dump_simple_type(n, dumplevel, dumpfunc, dumpdata);
678 break;
679 } /* switch */
680} /* eet_node_dump */
681
682void *
683eet_node_walk(void *parent,
684 const char *name,
685 Eet_Node *root,
686 Eet_Node_Walk *cb,
687 void *user_data)
688{
689 Eet_Node *it;
690 void *me = NULL;
691 int i;
692
693 if (!root)
694 {
695 if (parent)
696 cb->struct_add(parent, name, NULL, user_data);
697
698 return NULL;
699 }
700
701 switch (root->type)
702 {
703 case EET_G_UNKNOWN:
704 me = cb->struct_alloc(root->name, user_data);
705
706 for (it = root->values; it; it = it->next)
707 eet_node_walk(me, it->name, it, cb, user_data);
708
709 break;
710
711 case EET_G_VAR_ARRAY:
712 case EET_G_ARRAY:
713 me = cb->array(root->type == EET_G_VAR_ARRAY ? EINA_TRUE : EINA_FALSE,
714 root->name, root->count, user_data);
715
716 for (i = 0, it = root->values; it; it = it->next)
717 cb->insert(me, i++, eet_node_walk(NULL,
718 NULL,
719 it,
720 cb,
721 user_data), user_data);
722
723 break;
724
725 case EET_G_LIST:
726 me = cb->list(root->name, user_data);
727
728 for (it = root->values; it; it = it->next)
729 cb->append(me, eet_node_walk(NULL,
730 NULL,
731 it,
732 cb,
733 user_data), user_data);
734
735 break;
736
737 case EET_G_HASH:
738 if (!parent)
739 return NULL;
740
741 return cb->hash(parent, root->name, root->key,
742 eet_node_walk(NULL,
743 NULL,
744 root->values,
745 cb,
746 user_data), user_data);
747
748 case EET_T_STRING:
749 case EET_T_INLINED_STRING:
750 case EET_T_CHAR:
751 case EET_T_SHORT:
752 case EET_T_INT:
753 case EET_T_LONG_LONG:
754 case EET_T_FLOAT:
755 case EET_T_DOUBLE:
756 case EET_T_UCHAR:
757 case EET_T_USHORT:
758 case EET_T_UINT:
759 case EET_T_ULONG_LONG:
760 me = cb->simple(root->type, &root->data, user_data);
761 break;
762 } /* switch */
763
764 if (parent)
765 cb->struct_add(parent, name, me, user_data);
766
767 return me;
768} /* eet_node_walk */
769
770int
771eet_node_init(void)
772{
773 const char *choice;
774 const char *tmp;
775
776#ifdef EINA_DEFAULT_MEMPOOL
777 choice = "pass_through";
778#else
779 choice = "chained_mempool";
780#endif
781 tmp = getenv("EET_MEMPOOL");
782 if (tmp && tmp[0])
783 choice = tmp;
784
785 _eet_node_mp =
786 eina_mempool_add(choice, "eet-node-alloc", NULL, sizeof(Eet_Node), 1024);
787
788 return _eet_node_mp ? 1 : 0;
789} /* eet_node_init */
790
791void
792eet_node_shutdown(void)
793{
794 eina_mempool_del(_eet_node_mp);
795 _eet_node_mp = NULL;
796} /* eet_node_shutdown */
797
diff --git a/libraries/eet/src/lib/eet_utils.c b/libraries/eet/src/lib/eet_utils.c
new file mode 100644
index 0000000..8e591a2
--- /dev/null
+++ b/libraries/eet/src/lib/eet_utils.c
@@ -0,0 +1,36 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#include <stdio.h>
6#include <math.h>
7
8#include "Eet.h"
9#include "Eet_private.h"
10
11int
12_eet_hash_gen(const char *key,
13 int hash_size)
14{
15 int hash_num = 0;
16 int value, i;
17 int mask;
18 unsigned char *ptr;
19
20 /* no string - index 0 */
21 if (!key)
22 return 0;
23
24 /* calc hash num */
25 for (i = 0, ptr = (unsigned char *)key, value = (int)(*ptr);
26 value;
27 ptr++, i++, value = (int)(*ptr))
28 hash_num ^= (value | (value << 8)) >> (i & 0x7);
29
30 /* mask it */
31 mask = (1 << hash_size) - 1;
32 hash_num &= mask;
33 /* return it */
34 return hash_num;
35} /* _eet_hash_gen */
36
diff --git a/libraries/eet/src/tests/Makefile.am b/libraries/eet/src/tests/Makefile.am
new file mode 100644
index 0000000..c90a1d5
--- /dev/null
+++ b/libraries/eet/src/tests/Makefile.am
@@ -0,0 +1,17 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib \
5@CHECK_CFLAGS@ \
6@EINA_CFLAGS@
7
8if EFL_ENABLE_TESTS
9
10check_PROGRAMS = eet_suite
11
12eet_suite_SOURCES = eet_suite.c eet_data_suite.c
13eet_suite_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @CHECK_LIBS@
14
15endif
16
17EXTRA_DIST = eet_suite.h cert.pem key_enc_none.pem key_enc.pem key.pem
diff --git a/libraries/eet/src/tests/Makefile.in b/libraries/eet/src/tests/Makefile.in
new file mode 100644
index 0000000..bb15127
--- /dev/null
+++ b/libraries/eet/src/tests/Makefile.in
@@ -0,0 +1,544 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36@EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = eet_suite$(EXEEXT)
37subdir = src/tests
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
41 $(top_srcdir)/m4/ac_path_generic.m4 \
42 $(top_srcdir)/m4/efl_binary.m4 \
43 $(top_srcdir)/m4/efl_compiler_flag.m4 \
44 $(top_srcdir)/m4/efl_coverage.m4 \
45 $(top_srcdir)/m4/efl_doxygen.m4 \
46 $(top_srcdir)/m4/efl_fnmatch.m4 \
47 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
48 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
49 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
50 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
51am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
52 $(ACLOCAL_M4)
53mkinstalldirs = $(install_sh) -d
54CONFIG_HEADER = $(top_builddir)/config.h
55CONFIG_CLEAN_FILES =
56CONFIG_CLEAN_VPATH_FILES =
57am__eet_suite_SOURCES_DIST = eet_suite.c eet_data_suite.c
58@EFL_ENABLE_TESTS_TRUE@am_eet_suite_OBJECTS = eet_suite.$(OBJEXT) \
59@EFL_ENABLE_TESTS_TRUE@ eet_data_suite.$(OBJEXT)
60eet_suite_OBJECTS = $(am_eet_suite_OBJECTS)
61@EFL_ENABLE_TESTS_TRUE@eet_suite_DEPENDENCIES = \
62@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libeet.la
63AM_V_lt = $(am__v_lt_$(V))
64am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
65am__v_lt_0 = --silent
66DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
67depcomp = $(SHELL) $(top_srcdir)/depcomp
68am__depfiles_maybe = depfiles
69am__mv = mv -f
70COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
71 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
72LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
73 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
74 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
75 $(AM_CFLAGS) $(CFLAGS)
76AM_V_CC = $(am__v_CC_$(V))
77am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
78am__v_CC_0 = @echo " CC " $@;
79AM_V_at = $(am__v_at_$(V))
80am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
81am__v_at_0 = @
82CCLD = $(CC)
83LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
84 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
85 $(AM_LDFLAGS) $(LDFLAGS) -o $@
86AM_V_CCLD = $(am__v_CCLD_$(V))
87am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
88am__v_CCLD_0 = @echo " CCLD " $@;
89AM_V_GEN = $(am__v_GEN_$(V))
90am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
91am__v_GEN_0 = @echo " GEN " $@;
92SOURCES = $(eet_suite_SOURCES)
93DIST_SOURCES = $(am__eet_suite_SOURCES_DIST)
94ETAGS = etags
95CTAGS = ctags
96DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
97ACLOCAL = @ACLOCAL@
98ALLOCA = @ALLOCA@
99AMTAR = @AMTAR@
100AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
101AR = @AR@
102AS = @AS@
103AUTOCONF = @AUTOCONF@
104AUTOHEADER = @AUTOHEADER@
105AUTOMAKE = @AUTOMAKE@
106AWK = @AWK@
107CC = @CC@
108CCDEPMODE = @CCDEPMODE@
109CFLAGS = @CFLAGS@
110CHECK_CFLAGS = @CHECK_CFLAGS@
111CHECK_LIBS = @CHECK_LIBS@
112CPP = @CPP@
113CPPFLAGS = @CPPFLAGS@
114CYGPATH_W = @CYGPATH_W@
115DEBUG_CFLAGS = @DEBUG_CFLAGS@
116DEFS = @DEFS@
117DEPDIR = @DEPDIR@
118DLLTOOL = @DLLTOOL@
119DSYMUTIL = @DSYMUTIL@
120DUMPBIN = @DUMPBIN@
121ECHO_C = @ECHO_C@
122ECHO_N = @ECHO_N@
123ECHO_T = @ECHO_T@
124EET_CFLAGS = @EET_CFLAGS@
125EET_CPPFLAGS = @EET_CPPFLAGS@
126EET_LIBS = @EET_LIBS@
127EET_PRG = @EET_PRG@
128EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
129EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
130EFL_EET_BUILD = @EFL_EET_BUILD@
131EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
132EGREP = @EGREP@
133EINA_CFLAGS = @EINA_CFLAGS@
134EINA_LIBS = @EINA_LIBS@
135EVIL_CFLAGS = @EVIL_CFLAGS@
136EVIL_LIBS = @EVIL_LIBS@
137EXEEXT = @EXEEXT@
138FGREP = @FGREP@
139GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
140GNUTLS_LIBS = @GNUTLS_LIBS@
141GREP = @GREP@
142INSTALL = @INSTALL@
143INSTALL_DATA = @INSTALL_DATA@
144INSTALL_PROGRAM = @INSTALL_PROGRAM@
145INSTALL_SCRIPT = @INSTALL_SCRIPT@
146INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
147LD = @LD@
148LDFLAGS = @LDFLAGS@
149LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
150LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
151LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
152LIBOBJS = @LIBOBJS@
153LIBS = @LIBS@
154LIBTOOL = @LIBTOOL@
155LIPO = @LIPO@
156LN_S = @LN_S@
157LTLIBOBJS = @LTLIBOBJS@
158MAKEINFO = @MAKEINFO@
159MKDIR_P = @MKDIR_P@
160NM = @NM@
161NMEDIT = @NMEDIT@
162OBJDUMP = @OBJDUMP@
163OBJEXT = @OBJEXT@
164OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
165OPENSSL_LIBS = @OPENSSL_LIBS@
166OTOOL = @OTOOL@
167OTOOL64 = @OTOOL64@
168PACKAGE = @PACKAGE@
169PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
170PACKAGE_NAME = @PACKAGE_NAME@
171PACKAGE_STRING = @PACKAGE_STRING@
172PACKAGE_TARNAME = @PACKAGE_TARNAME@
173PACKAGE_URL = @PACKAGE_URL@
174PACKAGE_VERSION = @PACKAGE_VERSION@
175PATH_SEPARATOR = @PATH_SEPARATOR@
176PKG_CONFIG = @PKG_CONFIG@
177PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
178PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
179RANLIB = @RANLIB@
180SED = @SED@
181SET_MAKE = @SET_MAKE@
182SHELL = @SHELL@
183STRIP = @STRIP@
184VERSION = @VERSION@
185VMAJ = @VMAJ@
186abs_builddir = @abs_builddir@
187abs_srcdir = @abs_srcdir@
188abs_top_builddir = @abs_top_builddir@
189abs_top_srcdir = @abs_top_srcdir@
190ac_ct_CC = @ac_ct_CC@
191ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
192am__include = @am__include@
193am__leading_dot = @am__leading_dot@
194am__quote = @am__quote@
195am__tar = @am__tar@
196am__untar = @am__untar@
197bindir = @bindir@
198build = @build@
199build_alias = @build_alias@
200build_cpu = @build_cpu@
201build_os = @build_os@
202build_vendor = @build_vendor@
203builddir = @builddir@
204datadir = @datadir@
205datarootdir = @datarootdir@
206docdir = @docdir@
207dvidir = @dvidir@
208efl_doxygen = @efl_doxygen@
209efl_have_doxygen = @efl_have_doxygen@
210exec_prefix = @exec_prefix@
211have_lcov = @have_lcov@
212host = @host@
213host_alias = @host_alias@
214host_cpu = @host_cpu@
215host_os = @host_os@
216host_vendor = @host_vendor@
217htmldir = @htmldir@
218includedir = @includedir@
219infodir = @infodir@
220install_sh = @install_sh@
221libdir = @libdir@
222libexecdir = @libexecdir@
223localedir = @localedir@
224localstatedir = @localstatedir@
225lt_ECHO = @lt_ECHO@
226lt_enable_auto_import = @lt_enable_auto_import@
227mandir = @mandir@
228mkdir_p = @mkdir_p@
229oldincludedir = @oldincludedir@
230pdfdir = @pdfdir@
231pkgconfig_requires_private = @pkgconfig_requires_private@
232prefix = @prefix@
233program_transform_name = @program_transform_name@
234psdir = @psdir@
235release_info = @release_info@
236requirement_eet = @requirement_eet@
237sbindir = @sbindir@
238sharedstatedir = @sharedstatedir@
239srcdir = @srcdir@
240sysconfdir = @sysconfdir@
241target_alias = @target_alias@
242top_build_prefix = @top_build_prefix@
243top_builddir = @top_builddir@
244top_srcdir = @top_srcdir@
245version_info = @version_info@
246MAINTAINERCLEANFILES = Makefile.in
247AM_CPPFLAGS = \
248-I$(top_srcdir)/src/lib \
249@CHECK_CFLAGS@ \
250@EINA_CFLAGS@
251
252@EFL_ENABLE_TESTS_TRUE@eet_suite_SOURCES = eet_suite.c eet_data_suite.c
253@EFL_ENABLE_TESTS_TRUE@eet_suite_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ @CHECK_LIBS@
254EXTRA_DIST = eet_suite.h cert.pem key_enc_none.pem key_enc.pem key.pem
255all: all-am
256
257.SUFFIXES:
258.SUFFIXES: .c .lo .o .obj
259$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
260 @for dep in $?; do \
261 case '$(am__configure_deps)' in \
262 *$$dep*) \
263 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
264 && { if test -f $@; then exit 0; else break; fi; }; \
265 exit 1;; \
266 esac; \
267 done; \
268 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tests/Makefile'; \
269 $(am__cd) $(top_srcdir) && \
270 $(AUTOMAKE) --gnu src/tests/Makefile
271.PRECIOUS: Makefile
272Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
273 @case '$?' in \
274 *config.status*) \
275 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
276 *) \
277 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
278 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
279 esac;
280
281$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
282 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
283
284$(top_srcdir)/configure: $(am__configure_deps)
285 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
286$(ACLOCAL_M4): $(am__aclocal_m4_deps)
287 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
288$(am__aclocal_m4_deps):
289
290clean-checkPROGRAMS:
291 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
292 echo " rm -f" $$list; \
293 rm -f $$list || exit $$?; \
294 test -n "$(EXEEXT)" || exit 0; \
295 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
296 echo " rm -f" $$list; \
297 rm -f $$list
298eet_suite$(EXEEXT): $(eet_suite_OBJECTS) $(eet_suite_DEPENDENCIES)
299 @rm -f eet_suite$(EXEEXT)
300 $(AM_V_CCLD)$(LINK) $(eet_suite_OBJECTS) $(eet_suite_LDADD) $(LIBS)
301
302mostlyclean-compile:
303 -rm -f *.$(OBJEXT)
304
305distclean-compile:
306 -rm -f *.tab.c
307
308@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet_data_suite.Po@am__quote@
309@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eet_suite.Po@am__quote@
310
311.c.o:
312@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
313@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
314@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
315@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
316@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
317@am__fastdepCC_FALSE@ $(COMPILE) -c $<
318
319.c.obj:
320@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
321@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
322@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
323@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
324@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
325@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
326
327.c.lo:
328@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
329@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
330@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
331@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
332@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
333@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
334
335mostlyclean-libtool:
336 -rm -f *.lo
337
338clean-libtool:
339 -rm -rf .libs _libs
340
341ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
342 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
343 unique=`for i in $$list; do \
344 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
345 done | \
346 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
347 END { if (nonempty) { for (i in files) print i; }; }'`; \
348 mkid -fID $$unique
349tags: TAGS
350
351TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
352 $(TAGS_FILES) $(LISP)
353 set x; \
354 here=`pwd`; \
355 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
356 unique=`for i in $$list; do \
357 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
358 done | \
359 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
360 END { if (nonempty) { for (i in files) print i; }; }'`; \
361 shift; \
362 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
363 test -n "$$unique" || unique=$$empty_fix; \
364 if test $$# -gt 0; then \
365 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
366 "$$@" $$unique; \
367 else \
368 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
369 $$unique; \
370 fi; \
371 fi
372ctags: CTAGS
373CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
374 $(TAGS_FILES) $(LISP)
375 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
376 unique=`for i in $$list; do \
377 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
378 done | \
379 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
380 END { if (nonempty) { for (i in files) print i; }; }'`; \
381 test -z "$(CTAGS_ARGS)$$unique" \
382 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
383 $$unique
384
385GTAGS:
386 here=`$(am__cd) $(top_builddir) && pwd` \
387 && $(am__cd) $(top_srcdir) \
388 && gtags -i $(GTAGS_ARGS) "$$here"
389
390distclean-tags:
391 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
392
393distdir: $(DISTFILES)
394 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
395 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
396 list='$(DISTFILES)'; \
397 dist_files=`for file in $$list; do echo $$file; done | \
398 sed -e "s|^$$srcdirstrip/||;t" \
399 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
400 case $$dist_files in \
401 */*) $(MKDIR_P) `echo "$$dist_files" | \
402 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
403 sort -u` ;; \
404 esac; \
405 for file in $$dist_files; do \
406 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
407 if test -d $$d/$$file; then \
408 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
409 if test -d "$(distdir)/$$file"; then \
410 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
411 fi; \
412 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
413 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
414 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
415 fi; \
416 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
417 else \
418 test -f "$(distdir)/$$file" \
419 || cp -p $$d/$$file "$(distdir)/$$file" \
420 || exit 1; \
421 fi; \
422 done
423check-am: all-am
424 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
425check: check-am
426all-am: Makefile
427installdirs:
428install: install-am
429install-exec: install-exec-am
430install-data: install-data-am
431uninstall: uninstall-am
432
433install-am: all-am
434 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
435
436installcheck: installcheck-am
437install-strip:
438 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
439 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
440 `test -z '$(STRIP)' || \
441 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
442mostlyclean-generic:
443
444clean-generic:
445
446distclean-generic:
447 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
448 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
449
450maintainer-clean-generic:
451 @echo "This command is intended for maintainers to use"
452 @echo "it deletes files that may require special tools to rebuild."
453 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
454clean: clean-am
455
456clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
457 mostlyclean-am
458
459distclean: distclean-am
460 -rm -rf ./$(DEPDIR)
461 -rm -f Makefile
462distclean-am: clean-am distclean-compile distclean-generic \
463 distclean-tags
464
465dvi: dvi-am
466
467dvi-am:
468
469html: html-am
470
471html-am:
472
473info: info-am
474
475info-am:
476
477install-data-am:
478
479install-dvi: install-dvi-am
480
481install-dvi-am:
482
483install-exec-am:
484
485install-html: install-html-am
486
487install-html-am:
488
489install-info: install-info-am
490
491install-info-am:
492
493install-man:
494
495install-pdf: install-pdf-am
496
497install-pdf-am:
498
499install-ps: install-ps-am
500
501install-ps-am:
502
503installcheck-am:
504
505maintainer-clean: maintainer-clean-am
506 -rm -rf ./$(DEPDIR)
507 -rm -f Makefile
508maintainer-clean-am: distclean-am maintainer-clean-generic
509
510mostlyclean: mostlyclean-am
511
512mostlyclean-am: mostlyclean-compile mostlyclean-generic \
513 mostlyclean-libtool
514
515pdf: pdf-am
516
517pdf-am:
518
519ps: ps-am
520
521ps-am:
522
523uninstall-am:
524
525.MAKE: check-am install-am install-strip
526
527.PHONY: CTAGS GTAGS all all-am check check-am clean \
528 clean-checkPROGRAMS clean-generic clean-libtool ctags \
529 distclean distclean-compile distclean-generic \
530 distclean-libtool distclean-tags distdir dvi dvi-am html \
531 html-am info info-am install install-am install-data \
532 install-data-am install-dvi install-dvi-am install-exec \
533 install-exec-am install-html install-html-am install-info \
534 install-info-am install-man install-pdf install-pdf-am \
535 install-ps install-ps-am install-strip installcheck \
536 installcheck-am installdirs maintainer-clean \
537 maintainer-clean-generic mostlyclean mostlyclean-compile \
538 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
539 tags uninstall uninstall-am
540
541
542# Tell versions [3.59,3.63) of GNU make to not export all variables.
543# Otherwise a system limit (for SysV at least) may be exceeded.
544.NOEXPORT:
diff --git a/libraries/eet/src/tests/TODO b/libraries/eet/src/tests/TODO
new file mode 100644
index 0000000..da5fa1b
--- /dev/null
+++ b/libraries/eet/src/tests/TODO
@@ -0,0 +1,3 @@
1The purpose of the current test is to check the validity of the result in a
2normal environment. But we should at some point also test the robustness of
3this library when for example malloc fail.
diff --git a/libraries/eet/src/tests/cert.pem b/libraries/eet/src/tests/cert.pem
new file mode 100644
index 0000000..3265462
--- /dev/null
+++ b/libraries/eet/src/tests/cert.pem
@@ -0,0 +1,22 @@
1-----BEGIN CERTIFICATE-----
2MIIDmTCCAwKgAwIBAgIJAIKWPcLUT5FAMA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD
3VQQGEwJGUjEWMBQGA1UECBMNSWxlLURlLUZyYW5jZTEOMAwGA1UEBxMFUGFyaXMx
4FjAUBgNVBAoTDUVubGlnaHRlbm1lbnQxDjAMBgNVBAsTBVRlc3RzMQ0wCwYDVQQD
5EwRCQUlMMSIwIAYJKoZIhvcNAQkBFhNjZWRyaWMuYmFpbEBmcmVlLmZyMB4XDTA4
6MDczMDEzNDU1OVoXDTA5MDczMDEzNDU1OVowgZAxCzAJBgNVBAYTAkZSMRYwFAYD
7VQQIEw1JbGUtRGUtRnJhbmNlMQ4wDAYDVQQHEwVQYXJpczEWMBQGA1UEChMNRW5s
8aWdodGVubWVudDEOMAwGA1UECxMFVGVzdHMxDTALBgNVBAMTBEJBSUwxIjAgBgkq
9hkiG9w0BCQEWE2NlZHJpYy5iYWlsQGZyZWUuZnIwgZ8wDQYJKoZIhvcNAQEBBQAD
10gY0AMIGJAoGBAMiE486eROKePG0/639D4XTTDR9XSRWp1xqZzq7P+jjWRFbZ/MWV
11IVzkc4MRm83UOolbPj76LjM10cseaVAhK7G9CHp2dur4alWvdCXPH5Q+LPOFS9gM
12x0Jz9EZeHHOHZKLyJdKSmot+zluwJTLe081RRUwzNKct6JrVVG/7SmITAgMBAAGj
13gfgwgfUwHQYDVR0OBBYEFEFar6doT5ImL2rf0rJX7EYQqtYQMIHFBgNVHSMEgb0w
14gbqAFEFar6doT5ImL2rf0rJX7EYQqtYQoYGWpIGTMIGQMQswCQYDVQQGEwJGUjEW
15MBQGA1UECBMNSWxlLURlLUZyYW5jZTEOMAwGA1UEBxMFUGFyaXMxFjAUBgNVBAoT
16DUVubGlnaHRlbm1lbnQxDjAMBgNVBAsTBVRlc3RzMQ0wCwYDVQQDEwRCQUlMMSIw
17IAYJKoZIhvcNAQkBFhNjZWRyaWMuYmFpbEBmcmVlLmZyggkAgpY9wtRPkUAwDAYD
18VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCpZJhk8BgQh0foiMkOwOMKvObq
19GxAzqjbr7iU9tEvJgwukCBv59ndBM0B5l5ybQdIYWQJOfZE1HTvB60swZMwqap9X
205QXgewymuXiVk+roVh34wg8Pg8F588G2BtLIoujY/gN3WJQR7YPD34iTPc4koV+A
214vs6nmL6wtW21+hsaw==
22-----END CERTIFICATE-----
diff --git a/libraries/eet/src/tests/eet_data_suite.c b/libraries/eet/src/tests/eet_data_suite.c
new file mode 100644
index 0000000..c4d5e50
--- /dev/null
+++ b/libraries/eet/src/tests/eet_data_suite.c
@@ -0,0 +1,73 @@
1#include <string.h>
2#include <stdio.h>
3
4#include <Eina.h>
5
6#include "eet_suite.h"
7
8static char *
9_eet_str_direct_alloc(const char *str)
10{
11 return (char *)str;
12} /* _eet_str_direct_alloc */
13
14static void
15_eet_str_direct_free(const char *str)
16{
17 /* FIXME: Use attribute unused */
18 (void)str;
19} /* _eet_str_direct_free */
20
21static void
22_eet_eina_hash_foreach(void *hash,
23 Eina_Hash_Foreach cb,
24 void *fdata)
25{
26 if (hash)
27 eina_hash_foreach(hash, cb, fdata);
28} /* _eet_eina_hash_foreach */
29
30/* Internal wrapper for eina_hash */
31static Eina_Hash *
32_eet_eina_hash_add(Eina_Hash *hash,
33 const char *key,
34 const void *data)
35{
36 if (!hash)
37 hash = eina_hash_string_superfast_new(NULL);
38
39 if (!hash)
40 return NULL;
41
42 eina_hash_add(hash, key, data);
43 return hash;
44} /* _eet_eina_hash_add */
45
46static void
47_eet_eina_hash_free(Eina_Hash *hash)
48{
49 if (hash)
50 eina_hash_free(hash);
51} /* _eet_eina_hash_free */
52
53void
54eet_test_setup_eddc(Eet_Data_Descriptor_Class *eddc)
55{
56 eddc->version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
57 eddc->func.mem_alloc = NULL;
58 eddc->func.mem_free = NULL;
59 eddc->func.str_alloc = NULL;
60 eddc->func.str_free = NULL;
61 eddc->func.list_next = (void *)eina_list_next;
62 eddc->func.list_append = (void *)eina_list_append;
63 eddc->func.list_data = (void *)eina_list_data_get;
64 eddc->func.list_free = (void *)eina_list_free;
65 eddc->func.hash_foreach = (void *)_eet_eina_hash_foreach;
66 eddc->func.hash_add = (void *)_eet_eina_hash_add;
67 eddc->func.hash_free = (void *)_eet_eina_hash_free;
68 eddc->func.str_direct_alloc = (void *)_eet_str_direct_alloc;
69 eddc->func.str_direct_free = (void *)_eet_str_direct_free;
70 eddc->func.array_alloc = NULL;
71 eddc->func.array_free = NULL;
72} /* eet_test_setup_eddc */
73
diff --git a/libraries/eet/src/tests/eet_suite.c b/libraries/eet/src/tests/eet_suite.c
new file mode 100644
index 0000000..5230c86
--- /dev/null
+++ b/libraries/eet/src/tests/eet_suite.c
@@ -0,0 +1,2777 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#include <sys/types.h>
6#include <sys/stat.h>
7#include <stdlib.h>
8#include <string.h>
9#include <strings.h>
10#include <stdio.h>
11#include <fcntl.h>
12#include <unistd.h>
13
14#include <Eina.h>
15
16#ifdef EINA_HAVE_THREADS
17#if ((!defined(_WIN32_WCE)) && (!defined(_WIN32)))
18# include <pthread.h>
19# define _EET_INCLUDED_PTHREAD
20#endif
21#endif /* ifdef EINA_HAVE_THREADS */
22
23#include <check.h>
24
25#include "eet_suite.h"
26
27START_TEST(eet_test_init)
28{
29 int ret;
30
31 ret = eet_init();
32 fail_if(ret != 1);
33
34 ret = eet_shutdown();
35 fail_if(ret != 0);
36}
37END_TEST
38
39typedef struct _Eet_Test_Basic_Type Eet_Test_Basic_Type;
40struct _Eet_Test_Basic_Type
41{
42 char c;
43 short s;
44 int i;
45 long long l;
46 char *str;
47 char *istr;
48 float f1;
49 float f2;
50 double d;
51 unsigned char uc;
52 unsigned short us;
53 unsigned int ui;
54 unsigned long long ul;
55 Eet_Test_Basic_Type *empty;
56 Eet_Test_Basic_Type *with;
57};
58
59#define EET_TEST_CHAR 0x42
60#define EET_TEST_SHORT 0x4224
61#define EET_TEST_INT 0x42211224
62#define EET_TEST_LONG_LONG 0x84CB42211224BC48
63#define EET_TEST_STRING "my little test with escape \\\""
64#define EET_TEST_KEY1 "key1"
65#define EET_TEST_KEY2 "key2"
66#define EET_TEST_FLOAT 123.45689
67#define EET_TEST_FLOAT2 1.0
68#define EET_TEST_FLOAT3 0.25
69#define EET_TEST_FLOAT4 0.0001234
70#define EET_TEST_DOUBLE 123456789.9876543210
71#define EET_TEST_DOUBLE2 1.0
72#define EET_TEST_DOUBLE3 0.25
73#define EET_TEST_FILE_KEY1 "keys/data/1"
74#define EET_TEST_FILE_KEY2 "keys/data/2"
75#define EET_TEST_FILE_IMAGE "keys/images/"
76
77typedef struct _Eet_Test_Image Eet_Test_Image;
78struct _Eet_Test_Image
79{
80 unsigned int w;
81 unsigned int h;
82 int alpha;
83 unsigned int color[64];
84};
85
86static const Eet_Test_Image test_noalpha = {
87 8, 8, 0,
88 {
89 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000, 0x0000AA00,
90 0x000000AA, 0x00110000,
91 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000, 0x0000AA00, 0x000000AA,
92 0x00110000, 0x00AA0000,
93 0x000000AA, 0x00110000, 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000,
94 0x00AA0000, 0x0000AA00,
95 0x00110000, 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000,
96 0x0000AA00, 0x000000AA,
97 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000, 0x0000AA00,
98 0x000000AA, 0x00110000,
99 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000, 0x0000AA00, 0x000000AA,
100 0x00110000, 0x00AA0000,
101 0x000000AA, 0x00110000, 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000,
102 0x00AA0000, 0x0000AA00,
103 0x00110000, 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000,
104 0x0000AA00, 0x000000AA
105 }
106};
107
108static const Eet_Test_Image test_alpha = {
109 8, 8, 1,
110 {
111 0x0FAA0000, 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000, 0x0000AA00,
112 0x000000AA, 0x0F110000,
113 0x0000AA00, 0x0F0000AA, 0x00110000, 0x00AA0000, 0x0000AA00, 0x000000AA,
114 0x0F110000, 0x00AA0000,
115 0x000000AA, 0x00110000, 0x0FAA0000, 0x0000AA00, 0x000000AA, 0x0F110000,
116 0x00AA0000, 0x0000AA00,
117 0x00110000, 0x00AA0000, 0x0000AA00, 0x0F0000AA, 0x0F110000, 0x00AA0000,
118 0x0000AA00, 0x000000AA,
119 0x00AA0000, 0x0000AA00, 0x000000AA, 0x0F110000, 0x0FAA0000, 0x0000AA00,
120 0x000000AA, 0x00110000,
121 0x0000AA00, 0x000000AA, 0x0F110000, 0x00AA0000, 0x0000AA00, 0x0F0000AA,
122 0x00110000, 0x00AA0000,
123 0x000000AA, 0x0F110000, 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000,
124 0x0FAA0000, 0x0000AA00,
125 0x0F110000, 0x00AA0000, 0x0000AA00, 0x000000AA, 0x00110000, 0x00AA0000,
126 0x0000AA00, 0x0F0000AA
127 }
128};
129
130static void
131_eet_test_basic_set(Eet_Test_Basic_Type *res,
132 int i)
133{
134 res->c = EET_TEST_CHAR;
135 res->s = EET_TEST_SHORT;
136 res->i = EET_TEST_INT + i;
137 res->l = EET_TEST_LONG_LONG;
138 res->str = EET_TEST_STRING;
139 res->istr = EET_TEST_STRING;
140 res->f1 = -EET_TEST_FLOAT;
141 res->d = -EET_TEST_DOUBLE;
142 res->f2 = EET_TEST_FLOAT4;
143 res->uc = EET_TEST_CHAR;
144 res->us = EET_TEST_SHORT;
145 res->ui = EET_TEST_INT;
146 res->ul = EET_TEST_LONG_LONG;
147 res->empty = NULL;
148 res->with = NULL;
149
150 if (i == 0)
151 {
152 Eet_Test_Basic_Type *tmp;
153
154 tmp = malloc(sizeof (Eet_Test_Basic_Type));
155 fail_if(!tmp);
156
157 res->with = tmp;
158 tmp->c = EET_TEST_CHAR;
159 tmp->s = EET_TEST_SHORT;
160 tmp->i = EET_TEST_INT + i + 1;
161 tmp->l = EET_TEST_LONG_LONG;
162 tmp->str = EET_TEST_STRING;
163 tmp->istr = EET_TEST_STRING;
164 tmp->f1 = -EET_TEST_FLOAT;
165 tmp->d = -EET_TEST_DOUBLE;
166 tmp->f2 = EET_TEST_FLOAT4;
167 tmp->uc = EET_TEST_CHAR;
168 tmp->us = EET_TEST_SHORT;
169 tmp->ui = EET_TEST_INT;
170 tmp->ul = EET_TEST_LONG_LONG;
171 tmp->empty = NULL;
172 tmp->with = NULL;
173 }
174} /* _eet_test_basic_set */
175
176static void
177_eet_test_basic_check(Eet_Test_Basic_Type *result,
178 int i)
179{
180 float tmp;
181
182 fail_if(result->c != EET_TEST_CHAR);
183 fail_if(result->s != EET_TEST_SHORT);
184 fail_if(result->i != EET_TEST_INT + i);
185 fail_if(result->l != (long long)EET_TEST_LONG_LONG);
186 fail_if(strcmp(result->str, EET_TEST_STRING) != 0);
187 fail_if(strcmp(result->istr, EET_TEST_STRING) != 0);
188 fail_if(result->uc != EET_TEST_CHAR);
189 fail_if(result->us != EET_TEST_SHORT);
190 fail_if(result->ui != EET_TEST_INT);
191 fail_if(result->ul != EET_TEST_LONG_LONG);
192
193 tmp = (result->f1 + EET_TEST_FLOAT);
194 if (tmp < 0)
195 tmp = -tmp;
196
197 fail_if(tmp > 0.005);
198
199 tmp = (result->f2 - EET_TEST_FLOAT4);
200 if (tmp < 0)
201 tmp = -tmp;
202
203 fail_if(tmp > 0.005);
204
205 tmp = (result->d + EET_TEST_DOUBLE);
206 if (tmp < 0)
207 tmp = -tmp;
208
209 fail_if(tmp > 0.00005);
210
211 fail_if(result->empty != NULL);
212 if (i == 0)
213 {
214 Eet_Test_Basic_Type *tmp;
215
216 tmp = result->with;
217 fail_if(tmp == NULL);
218
219 fail_if(tmp->c != EET_TEST_CHAR);
220 fail_if(tmp->s != EET_TEST_SHORT);
221 fail_if(tmp->i != EET_TEST_INT + i + 1);
222 fail_if(tmp->l != (long long)EET_TEST_LONG_LONG);
223 fail_if(strcmp(tmp->str, EET_TEST_STRING) != 0);
224 fail_if(strcmp(tmp->istr, EET_TEST_STRING) != 0);
225 fail_if(tmp->uc != EET_TEST_CHAR);
226 fail_if(tmp->us != EET_TEST_SHORT);
227 fail_if(tmp->ui != EET_TEST_INT);
228 fail_if(tmp->ul != EET_TEST_LONG_LONG);
229 }
230 else
231 fail_if(result->with != NULL);
232} /* _eet_test_basic_check */
233
234static void
235_eet_build_basic_descriptor(Eet_Data_Descriptor *edd)
236{
237 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
238 Eet_Test_Basic_Type,
239 "c",
240 c,
241 EET_T_CHAR);
242 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
243 Eet_Test_Basic_Type,
244 "s",
245 s,
246 EET_T_SHORT);
247 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
248 Eet_Test_Basic_Type,
249 "i",
250 i,
251 EET_T_INT);
252 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
253 Eet_Test_Basic_Type,
254 "l",
255 l,
256 EET_T_LONG_LONG);
257 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
258 Eet_Test_Basic_Type,
259 "str",
260 str,
261 EET_T_STRING);
262 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
263 Eet_Test_Basic_Type,
264 "istr",
265 istr,
266 EET_T_INLINED_STRING);
267 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
268 Eet_Test_Basic_Type,
269 "f1",
270 f1,
271 EET_T_FLOAT);
272 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
273 Eet_Test_Basic_Type,
274 "f2",
275 f2,
276 EET_T_FLOAT);
277 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
278 Eet_Test_Basic_Type,
279 "d",
280 d,
281 EET_T_DOUBLE);
282 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
283 Eet_Test_Basic_Type,
284 "uc",
285 uc,
286 EET_T_UCHAR);
287 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
288 Eet_Test_Basic_Type,
289 "us",
290 us,
291 EET_T_USHORT);
292 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
293 Eet_Test_Basic_Type,
294 "ui",
295 ui,
296 EET_T_UINT);
297 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
298 Eet_Test_Basic_Type,
299 "ul",
300 ul,
301 EET_T_ULONG_LONG);
302
303 EET_DATA_DESCRIPTOR_ADD_SUB(edd, Eet_Test_Basic_Type, "empty", empty, edd);
304 EET_DATA_DESCRIPTOR_ADD_SUB(edd, Eet_Test_Basic_Type, "with", with, edd);
305} /* _eet_build_basic_descriptor */
306
307START_TEST(eet_test_basic_data_type_encoding_decoding)
308{
309 Eet_Data_Descriptor *edd;
310 Eet_Test_Basic_Type *result;
311 Eet_Data_Descriptor_Class eddc;
312 Eet_Test_Basic_Type etbt;
313 void *transfert;
314 int size;
315
316 eet_init();
317
318 _eet_test_basic_set(&etbt, 0);
319
320 eet_test_setup_eddc(&eddc);
321 eddc.name = "Eet_Test_Basic_Type";
322 eddc.size = sizeof(Eet_Test_Basic_Type);
323
324 edd = eet_data_descriptor_stream_new(&eddc);
325 fail_if(!edd);
326
327 _eet_build_basic_descriptor(edd);
328
329 transfert = eet_data_descriptor_encode(edd, &etbt, &size);
330 fail_if(!transfert || size <= 0);
331
332 result = eet_data_descriptor_decode(edd, transfert, size);
333 fail_if(!result);
334
335 _eet_test_basic_check(result, 0);
336
337 free(result->str);
338 free(result);
339
340 eet_data_descriptor_free(edd);
341
342 eet_shutdown();
343}
344END_TEST
345
346typedef struct _Eet_Test_Ex_Type Eet_Test_Ex_Type;
347struct _Eet_Test_Ex_Type
348{
349 char c;
350 short s;
351 int i;
352 unsigned long long l;
353 char *str;
354 char *istr;
355 float f1;
356 float f2;
357 float f3;
358 float f4;
359 double d1;
360 double d2;
361 double d3;
362 double d4;
363 Eina_List *list;
364 Eina_Hash *hash;
365 Eina_List *ilist;
366 Eina_List *slist;
367 Eina_Hash *ihash;
368 Eina_Hash *shash;
369 Eet_Test_Basic_Type sarray1[10];
370 unsigned int sarray2[5];
371 unsigned int varray1_count;
372 unsigned int *varray1;
373 unsigned int varray2_count;
374 Eet_Test_Basic_Type *varray2;
375 unsigned char uc;
376 unsigned short us;
377 unsigned int ui;
378 unsigned long long ul;
379 char *charray[10];
380};
381
382static int i42 = 42;
383static int i7 = 7;
384
385static void
386_eet_build_ex_descriptor(Eet_Data_Descriptor *edd)
387{
388 Eet_Data_Descriptor_Class eddc;
389 Eet_Test_Ex_Type etbt;
390 Eet_Data_Descriptor *eddb;
391
392 eet_test_setup_eddc(&eddc);
393 eddc.name = "Eet_Test_Basic_Type";
394 eddc.size = sizeof(Eet_Test_Basic_Type);
395 eddb = eet_data_descriptor_file_new(&eddc);
396 fail_if(!eddb);
397
398 _eet_build_basic_descriptor(eddb);
399
400 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
401 Eet_Test_Ex_Type,
402 "c",
403 c,
404 EET_T_CHAR);
405 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
406 Eet_Test_Ex_Type,
407 "s",
408 s,
409 EET_T_SHORT);
410 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, Eet_Test_Ex_Type, "i", i, EET_T_INT);
411 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
412 Eet_Test_Ex_Type,
413 "l",
414 l,
415 EET_T_LONG_LONG);
416 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
417 Eet_Test_Ex_Type,
418 "str",
419 str,
420 EET_T_STRING);
421 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
422 Eet_Test_Ex_Type,
423 "istr",
424 istr,
425 EET_T_INLINED_STRING);
426 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
427 Eet_Test_Ex_Type,
428 "f1",
429 f1,
430 EET_T_FLOAT);
431 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
432 Eet_Test_Ex_Type,
433 "f2",
434 f2,
435 EET_T_FLOAT);
436 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
437 Eet_Test_Ex_Type,
438 "f3",
439 f3,
440 EET_T_FLOAT);
441 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
442 Eet_Test_Ex_Type,
443 "f4",
444 f4,
445 EET_T_FLOAT);
446 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
447 Eet_Test_Ex_Type,
448 "d1",
449 d1,
450 EET_T_DOUBLE);
451 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
452 Eet_Test_Ex_Type,
453 "d2",
454 d2,
455 EET_T_DOUBLE);
456 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
457 Eet_Test_Ex_Type,
458 "d3",
459 d3,
460 EET_T_DOUBLE);
461 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
462 Eet_Test_Ex_Type,
463 "d4",
464 d4,
465 EET_T_DOUBLE);
466 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
467 Eet_Test_Ex_Type,
468 "uc",
469 uc,
470 EET_T_UCHAR);
471 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
472 Eet_Test_Ex_Type,
473 "us",
474 us,
475 EET_T_USHORT);
476 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
477 Eet_Test_Ex_Type,
478 "ui",
479 ui,
480 EET_T_UINT);
481 EET_DATA_DESCRIPTOR_ADD_BASIC(edd,
482 Eet_Test_Ex_Type,
483 "ul",
484 ul,
485 EET_T_ULONG_LONG);
486 EET_DATA_DESCRIPTOR_ADD_ARRAY(edd,
487 Eet_Test_Ex_Type,
488 "sarray1",
489 sarray1,
490 eddb);
491 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(edd,
492 Eet_Test_Ex_Type,
493 "varray2",
494 varray2,
495 eddb);
496 eet_data_descriptor_element_add(edd,
497 "varray1",
498 EET_T_INT,
499 EET_G_VAR_ARRAY,
500 (char *)(&(etbt.varray1)) - (char *)(&(etbt)),
501 (char *)(&(etbt.varray1_count)) -
502 (char *)(&(etbt)),
503 /* 0, */ NULL,
504 NULL);
505 eet_data_descriptor_element_add(edd, "sarray2", EET_T_INT, EET_G_ARRAY,
506 (char *)(&(etbt.sarray2)) - (char *)(&(etbt)),
507 /* 0, */ sizeof(etbt.sarray2) /
508 sizeof(etbt.sarray2[0]), NULL, NULL);
509 eet_data_descriptor_element_add(edd, "charray", EET_T_STRING, EET_G_ARRAY,
510 (char *)(&(etbt.charray)) - (char *)(&(etbt)),
511 /* 0, */ sizeof(etbt.charray) /
512 sizeof(etbt.charray[0]), NULL, NULL);
513 EET_DATA_DESCRIPTOR_ADD_LIST(edd, Eet_Test_Ex_Type, "list", list, edd);
514 EET_DATA_DESCRIPTOR_ADD_HASH(edd, Eet_Test_Ex_Type, "hash", hash, edd);
515 eet_data_descriptor_element_add(edd, "ilist", EET_T_INT, EET_G_LIST,
516 (char *)(&(etbt.ilist)) - (char *)(&(etbt)),
517 0, /* 0, */ NULL, NULL);
518 eet_data_descriptor_element_add(edd, "ihash", EET_T_INT, EET_G_HASH,
519 (char *)(&(etbt.ihash)) - (char *)(&(etbt)),
520 0, /* 0, */ NULL, NULL);
521 eet_data_descriptor_element_add(edd, "slist", EET_T_STRING, EET_G_LIST,
522 (char *)(&(etbt.slist)) - (char *)(&(etbt)),
523 0, /* 0, */ NULL, NULL);
524 eet_data_descriptor_element_add(edd, "shash", EET_T_STRING, EET_G_HASH,
525 (char *)(&(etbt.shash)) - (char *)(&(etbt)),
526 0, /* 0, */ NULL, NULL);
527} /* _eet_build_ex_descriptor */
528
529static Eet_Test_Ex_Type *
530_eet_test_ex_set(Eet_Test_Ex_Type *res,
531 int offset)
532{
533 unsigned int i;
534
535 if (!res)
536 res = malloc(sizeof(Eet_Test_Ex_Type));
537
538 if (!res)
539 return NULL;
540
541 res->c = EET_TEST_CHAR + offset;
542 res->s = EET_TEST_SHORT + offset;
543 res->i = EET_TEST_INT + offset;
544 res->l = EET_TEST_LONG_LONG + offset;
545 res->str = EET_TEST_STRING;
546 res->istr = EET_TEST_STRING;
547 res->f1 = EET_TEST_FLOAT + offset;
548 res->f2 = -(EET_TEST_FLOAT2 + offset);
549 res->f3 = EET_TEST_FLOAT3 + offset;
550 res->f4 = EET_TEST_FLOAT2 + offset;
551 res->d1 = EET_TEST_DOUBLE + offset;
552 res->d2 = -(EET_TEST_DOUBLE2 + offset);
553 res->d3 = EET_TEST_DOUBLE3 + offset;
554 res->d4 = EET_TEST_DOUBLE2 + offset;
555 res->list = NULL;
556 res->hash = NULL;
557 res->ilist = NULL;
558 res->ihash = NULL;
559 res->slist = NULL;
560 res->shash = NULL;
561 for (i = 0; i < sizeof(res->charray) / sizeof(res->charray[0]); ++i)
562 res->charray[i] = NULL;
563
564 res->varray2 = malloc(sizeof (Eet_Test_Basic_Type) * 10);
565 res->varray1 = malloc(sizeof (int) * 5);
566 fail_if(!res->varray1 || !res->varray2);
567 for (i = 0; i < 10; ++i)
568 {
569 _eet_test_basic_set(res->sarray1 + i, i);
570 _eet_test_basic_set(res->varray2 + i, i);
571 }
572 res->varray2_count = 10;
573 for (i = 0; i < 5; ++i)
574 {
575 res->sarray2[i] = i * 42 + 1;
576 res->varray1[i] = i * 42 + 1;
577 }
578 res->varray1_count = 5;
579
580 res->uc = EET_TEST_CHAR + offset;
581 res->us = EET_TEST_SHORT + offset;
582 res->ui = EET_TEST_INT + offset;
583 res->ul = EET_TEST_LONG_LONG + offset;
584
585 return res;
586} /* _eet_test_ex_set */
587
588static int
589_eet_test_ex_check(Eet_Test_Ex_Type *stuff,
590 int offset)
591{
592 double tmp;
593 unsigned int i;
594
595 if (!stuff)
596 return 1;
597
598 if (stuff->c != EET_TEST_CHAR + offset)
599 return 1;
600
601 if (stuff->s != EET_TEST_SHORT + offset)
602 return 1;
603
604 if (stuff->i != EET_TEST_INT + offset)
605 return 1;
606
607 if (stuff->l != EET_TEST_LONG_LONG + offset)
608 return 1;
609
610 if (strcmp(stuff->str, EET_TEST_STRING) != 0)
611 return 1;
612
613 if (strcmp(stuff->istr, EET_TEST_STRING) != 0)
614 return 1;
615
616 tmp = stuff->f1 - (EET_TEST_FLOAT + offset);
617 if (tmp < 0)
618 tmp = -tmp;
619
620 if (tmp > 0.005)
621 return 1;
622
623 tmp = stuff->d1 - (EET_TEST_DOUBLE + offset);
624 if (tmp < 0)
625 tmp = -tmp;
626
627 if (tmp > 0.00005)
628 return 1;
629
630 if (stuff->f2 != -(EET_TEST_FLOAT2 + offset))
631 return 1;
632
633 if (stuff->d2 != -(EET_TEST_DOUBLE2 + offset))
634 return 1;
635
636 if (stuff->f3 != EET_TEST_FLOAT3 + offset)
637 return 1;
638
639 if (stuff->d3 != EET_TEST_DOUBLE3 + offset)
640 return 1;
641
642 if (stuff->f4 != EET_TEST_FLOAT2 + offset)
643 return 1;
644
645 if (stuff->d4 != EET_TEST_DOUBLE2 + offset)
646 return 1;
647
648 if (stuff->uc != EET_TEST_CHAR + offset)
649 return 1;
650
651 if (stuff->us != EET_TEST_SHORT + offset)
652 return 1;
653
654 if (stuff->ui != (unsigned int)EET_TEST_INT + offset)
655 return 1;
656
657 if (stuff->ul != EET_TEST_LONG_LONG + offset)
658 return 1;
659
660 if (stuff->varray1_count != 5)
661 return 1;
662
663 if (stuff->varray2_count != 10)
664 return 1;
665
666 for (i = 0; i < 5; ++i)
667 if (stuff->sarray2[i] != i * 42 + 1 && stuff->varray1[i] != i * 42 + 1)
668 return 1;
669
670 for (i = 0; i < 10; ++i)
671 {
672 _eet_test_basic_check(stuff->sarray1 + i, i);
673 _eet_test_basic_check(stuff->varray2 + i, i);
674 }
675
676 return 0;
677} /* _eet_test_ex_check */
678
679static Eina_Bool
680func(__UNUSED__ const Eina_Hash *hash,
681 const void *key,
682 void *data,
683 void *fdata)
684{
685 int *res = fdata;
686
687 if (strcmp(key, EET_TEST_KEY1) != 0
688 && strcmp(key, EET_TEST_KEY2) != 0)
689 *res = 1;
690
691 if (_eet_test_ex_check(data, 2))
692 *res = 1;
693
694 return EINA_TRUE;
695} /* func */
696
697static Eina_Bool
698func7(__UNUSED__ const Eina_Hash *hash,
699 __UNUSED__ const void *key,
700 void *data,
701 void *fdata)
702{
703 int *res = fdata;
704 int *val;
705
706 val = data;
707 if (!val)
708 *res = 1;
709
710 if (*val != 7)
711 *res = 1;
712
713 return EINA_TRUE;
714} /* func7 */
715
716START_TEST(eet_test_data_type_encoding_decoding)
717{
718 Eet_Data_Descriptor *edd;
719 Eet_Test_Ex_Type *result;
720 void *transfert;
721 Eet_Data_Descriptor_Class eddc;
722 Eet_Test_Ex_Type etbt;
723 int size;
724 int test;
725
726 eet_init();
727
728 _eet_test_ex_set(&etbt, 0);
729 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
730 etbt.hash = eina_hash_string_superfast_new(NULL);
731 eina_hash_add(etbt.hash, EET_TEST_KEY1, _eet_test_ex_set(NULL, 2));
732 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
733 etbt.ihash = eina_hash_string_superfast_new(NULL);
734 eina_hash_add(etbt.ihash, EET_TEST_KEY1, &i7);
735 etbt.slist = eina_list_prepend(NULL, "test");
736 etbt.shash = eina_hash_string_superfast_new(NULL);
737 eina_hash_add(etbt.shash, EET_TEST_KEY1, "test");
738 memset(&etbt.charray, 0, sizeof(etbt.charray));
739 etbt.charray[0] = "test";
740 etbt.charray[5] = "plouf";
741
742 eet_test_setup_eddc(&eddc);
743 eddc.name = "Eet_Test_Ex_Type";
744 eddc.size = sizeof(Eet_Test_Ex_Type);
745
746 edd = eet_data_descriptor_file_new(&eddc);
747 fail_if(!edd);
748
749 _eet_build_ex_descriptor(edd);
750
751 transfert = eet_data_descriptor_encode(edd, &etbt, &size);
752 fail_if(!transfert || size <= 0);
753
754 result = eet_data_descriptor_decode(edd, transfert, size);
755 fail_if(!result);
756
757 fail_if(_eet_test_ex_check(result, 0) != 0);
758 fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0);
759 fail_if(eina_list_data_get(result->ilist) == NULL);
760 fail_if(*((int *)eina_list_data_get(result->ilist)) != 42);
761 fail_if(eina_list_data_get(result->slist) == NULL);
762 fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0);
763 fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL);
764 fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0);
765 fail_if(strcmp(result->charray[0], "test") != 0);
766 fail_if(strcmp(result->charray[5], "plouf") != 0);
767
768 test = 0;
769 if (result->hash)
770 eina_hash_foreach(result->hash, func, &test);
771
772 fail_if(test != 0);
773 if (result->ihash)
774 eina_hash_foreach(result->ihash, func7, &test);
775
776 fail_if(test != 0);
777
778 eet_shutdown();
779}
780END_TEST
781
782static void
783append_string(void *data,
784 const char *str)
785{
786 char **string = data;
787 int length;
788
789 if (!data)
790 return;
791
792 length = *string ? strlen(*string) : 0;
793 *string = realloc(*string, strlen(str) + length + 1);
794
795 memcpy((*string) + length, str, strlen(str) + 1);
796} /* append_string */
797
798START_TEST(eet_test_data_type_dump_undump)
799{
800 Eet_Data_Descriptor *edd;
801 Eet_Test_Ex_Type *result;
802 Eet_Data_Descriptor_Class eddc;
803 Eet_Test_Ex_Type etbt;
804 char *transfert1;
805 char *transfert2;
806 char *string1;
807 char *string2;
808 int size1;
809 int size2;
810 int test;
811
812 eet_init();
813
814 _eet_test_ex_set(&etbt, 0);
815 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
816 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
817 etbt.hash = eina_hash_string_superfast_new(NULL);
818 eina_hash_add(etbt.hash, EET_TEST_KEY1, _eet_test_ex_set(NULL, 2));
819 etbt.hash = eina_hash_string_superfast_new(NULL);
820 eina_hash_add(etbt.hash, EET_TEST_KEY2, _eet_test_ex_set(NULL, 2));
821 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
822 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
823 etbt.ihash = eina_hash_string_superfast_new(NULL);
824 eina_hash_add(etbt.ihash, EET_TEST_KEY1, &i7);
825 etbt.ihash = eina_hash_string_superfast_new(NULL);
826 eina_hash_add(etbt.ihash, EET_TEST_KEY2, &i7);
827 etbt.slist = eina_list_prepend(NULL, "test");
828 etbt.shash = eina_hash_string_superfast_new(NULL);
829 eina_hash_add(etbt.shash, EET_TEST_KEY1, "test");
830 memset(&etbt.charray, 0, sizeof(etbt.charray));
831 etbt.charray[0] = "test";
832
833 eet_test_setup_eddc(&eddc);
834 eddc.name = "Eet_Test_Ex_Type";
835 eddc.size = sizeof(Eet_Test_Ex_Type);
836
837 edd = eet_data_descriptor_file_new(&eddc);
838 fail_if(!edd);
839
840 _eet_build_ex_descriptor(edd);
841
842 transfert1 = eet_data_descriptor_encode(edd, &etbt, &size1);
843 fail_if(!transfert1 || size1 <= 0);
844
845 string1 = NULL;
846 eet_data_text_dump(transfert1, size1, append_string, &string1);
847 fail_if(!string1);
848
849 transfert2 = eet_data_text_undump(string1, string1 ? strlen(
850 string1) : 0, &size2);
851 fail_if(!transfert2 && size2 <= 0);
852
853 string2 = NULL;
854 eet_data_text_dump(transfert2, size2, append_string, &string2);
855 fail_if(!string2);
856
857 fail_if(strlen(string2) != strlen(string1));
858
859 result = eet_data_descriptor_decode(edd, transfert2, size2);
860 fail_if(!result);
861
862 fail_if(_eet_test_ex_check(result, 0) != 0);
863 fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0);
864 fail_if(eina_list_data_get(result->ilist) == NULL);
865 fail_if(*((int *)eina_list_data_get(result->ilist)) != 42);
866 fail_if(eina_list_data_get(result->slist) == NULL);
867 fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0);
868 fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL);
869 fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0);
870 fail_if(strcmp(result->charray[0], "test") != 0);
871
872 test = 0;
873 if (result->hash)
874 eina_hash_foreach(result->hash, func, &test);
875
876 fail_if(test != 0);
877 if (result->ihash)
878 eina_hash_foreach(result->ihash, func7, &test);
879
880 fail_if(test != 0);
881
882 eet_shutdown();
883}
884END_TEST
885START_TEST(eet_file_simple_write)
886{
887 const char *buffer = "Here is a string of data to save !";
888 Eet_File *ef;
889 char *test;
890 char *file = strdup("/tmp/eet_suite_testXXXXXX");
891 int size;
892
893 eet_init();
894
895 fail_if(!(file = tmpnam(file)));
896
897 fail_if(eet_mode_get(NULL) != EET_FILE_MODE_INVALID);
898
899 ef = eet_open(file, EET_FILE_MODE_WRITE);
900 fail_if(!ef);
901
902 fail_if(!eet_write(ef, "keys/tests", buffer, strlen(buffer) + 1, 1));
903 fail_if(!eet_alias(ef, "keys/alias", "keys/tests", 0));
904 fail_if(!eet_alias(ef, "keys/alias2", "keys/alias", 1));
905
906 fail_if(eet_mode_get(ef) != EET_FILE_MODE_WRITE);
907
908 fail_if(eet_list(ef, "*", &size) != NULL);
909 fail_if(eet_num_entries(ef) != -1);
910
911 eet_close(ef);
912
913 /* Test read of simple file */
914 ef = eet_open(file, EET_FILE_MODE_READ);
915 fail_if(!ef);
916
917 test = eet_read(ef, "keys/tests", &size);
918 fail_if(!test);
919 fail_if(size != (int)strlen(buffer) + 1);
920
921 fail_if(memcmp(test, buffer, strlen(buffer) + 1) != 0);
922
923 test = eet_read(ef, "keys/alias2", &size);
924 fail_if(!test);
925 fail_if(size != (int)strlen(buffer) + 1);
926
927 fail_if(eet_read_direct(ef, "key/alias2", &size));
928
929 fail_if(eet_mode_get(ef) != EET_FILE_MODE_READ);
930 fail_if(eet_num_entries(ef) != 3);
931
932 eet_close(ef);
933
934 /* Test eet cache system */
935 ef = eet_open(file, EET_FILE_MODE_READ);
936 fail_if(!ef);
937
938 test = eet_read(ef, "keys/tests", &size);
939 fail_if(!test);
940 fail_if(size != (int)strlen(buffer) + 1);
941
942 fail_if(memcmp(test, buffer, strlen(buffer) + 1) != 0);
943
944 eet_close(ef);
945
946 fail_if(unlink(file) != 0);
947
948 eet_shutdown();
949} /* START_TEST */
950
951END_TEST
952START_TEST(eet_file_data_test)
953{
954 Eet_Data_Descriptor *edd;
955 Eet_Test_Ex_Type *result;
956 Eet_Dictionary *ed;
957 Eet_File *ef;
958 char **list;
959 char *file = strdup("/tmp/eet_suite_testXXXXXX");
960 Eet_Data_Descriptor_Class eddc;
961 Eet_Test_Ex_Type etbt;
962 int size;
963 int test;
964
965 eet_init();
966
967 _eet_test_ex_set(&etbt, 0);
968 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
969 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
970 etbt.hash = eina_hash_string_superfast_new(NULL);
971 eina_hash_add(etbt.hash, EET_TEST_KEY1, _eet_test_ex_set(NULL, 2));
972 etbt.hash = eina_hash_string_superfast_new(NULL);
973 eina_hash_add(etbt.hash, EET_TEST_KEY2, _eet_test_ex_set(NULL, 2));
974 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
975 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
976 etbt.ihash = eina_hash_string_superfast_new(NULL);
977 eina_hash_add(etbt.ihash, EET_TEST_KEY1, &i7);
978 etbt.ihash = eina_hash_string_superfast_new(NULL);
979 eina_hash_add(etbt.ihash, EET_TEST_KEY2, &i7);
980 etbt.slist = eina_list_prepend(NULL, "test");
981 etbt.shash = eina_hash_string_superfast_new(NULL);
982 eina_hash_add(etbt.shash, EET_TEST_KEY1, "test");
983 memset(&etbt.charray, 0, sizeof(etbt.charray));
984 etbt.charray[0] = "test";
985
986 eet_test_setup_eddc(&eddc);
987 eddc.name = "Eet_Test_Ex_Type";
988 eddc.size = sizeof(Eet_Test_Ex_Type);
989
990 edd = eet_data_descriptor_file_new(&eddc);
991 fail_if(!edd);
992
993 _eet_build_ex_descriptor(edd);
994
995 fail_if(!(file = tmpnam(file)));
996
997 /* Insert an error in etbt. */
998 etbt.i = 0;
999
1000 /* Save the encoded data in a file. */
1001 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
1002 fail_if(!ef);
1003
1004 fail_if(!eet_data_write(ef, edd, EET_TEST_FILE_KEY1, &etbt, 0));
1005
1006 result = eet_data_read(ef, edd, EET_TEST_FILE_KEY1);
1007 fail_if(!result);
1008
1009 fail_if(eet_mode_get(ef) != EET_FILE_MODE_READ_WRITE);
1010
1011 /* Test string space. */
1012 ed = eet_dictionary_get(ef);
1013
1014 fail_if(!eet_dictionary_string_check(ed, result->str));
1015 fail_if(eet_dictionary_string_check(ed, result->istr));
1016
1017 eet_close(ef);
1018
1019 /* Attempt to replace etbt by the correct one. */
1020 etbt.i = EET_TEST_INT;
1021
1022 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
1023 fail_if(!ef);
1024
1025 fail_if(!eet_data_write(ef, edd, EET_TEST_FILE_KEY1, &etbt, 0));
1026
1027 result = eet_data_read(ef, edd, EET_TEST_FILE_KEY1);
1028 fail_if(!result);
1029
1030 /* Test the resulting data. */
1031 fail_if(_eet_test_ex_check(result, 0) != 0);
1032
1033 eet_close(ef);
1034
1035 /* Read back the data. */
1036 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
1037 fail_if(!ef);
1038
1039 fail_if(!eet_data_write(ef, edd, EET_TEST_FILE_KEY2, &etbt, 0));
1040
1041 result = eet_data_read(ef, edd, EET_TEST_FILE_KEY1);
1042 fail_if(!result);
1043
1044 /* Test string space. */
1045 ed = eet_dictionary_get(ef);
1046 fail_if(!ed);
1047
1048 fail_if(!eet_dictionary_string_check(ed, result->str));
1049 fail_if(eet_dictionary_string_check(ed, result->istr));
1050
1051 /* Test the resulting data. */
1052 fail_if(_eet_test_ex_check(result, 0) != 0);
1053 fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0);
1054 fail_if(eina_list_data_get(result->ilist) == NULL);
1055 fail_if(*((int *)eina_list_data_get(result->ilist)) != 42);
1056 fail_if(eina_list_data_get(result->slist) == NULL);
1057 fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0);
1058 fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL);
1059 fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0);
1060 fail_if(strcmp(result->charray[0], "test") != 0);
1061
1062 test = 0;
1063 if (result->hash)
1064 eina_hash_foreach(result->hash, func, &test);
1065
1066 fail_if(test != 0);
1067 if (result->ihash)
1068 eina_hash_foreach(result->ihash, func7, &test);
1069
1070 fail_if(test != 0);
1071
1072 list = eet_list(ef, "keys/*", &size);
1073 fail_if(eet_num_entries(ef) != 2);
1074 fail_if(size != 2);
1075 fail_if(!(strcmp(list[0],
1076 EET_TEST_FILE_KEY1) == 0 &&
1077 strcmp(list[1], EET_TEST_FILE_KEY2) == 0)
1078 && !(strcmp(list[0],
1079 EET_TEST_FILE_KEY2) == 0 &&
1080 strcmp(list[1], EET_TEST_FILE_KEY1) == 0));
1081 free(list);
1082
1083 fail_if(eet_delete(ef, NULL) != 0);
1084 fail_if(eet_delete(NULL, EET_TEST_FILE_KEY1) != 0);
1085 fail_if(eet_delete(ef, EET_TEST_FILE_KEY1) == 0);
1086
1087 list = eet_list(ef, "keys/*", &size);
1088 fail_if(size != 1);
1089 fail_if(eet_num_entries(ef) != 1);
1090
1091 /* Test some more wrong case */
1092 fail_if(eet_data_read(ef, edd, "plop") != NULL);
1093 fail_if(eet_data_read(ef, edd, EET_TEST_FILE_KEY1) != NULL);
1094
1095 /* Reinsert and reread data */
1096 fail_if(!eet_data_write(ef, edd, EET_TEST_FILE_KEY1, &etbt, 0));
1097 fail_if(eet_data_read(ef, edd, EET_TEST_FILE_KEY1) == NULL);
1098 fail_if(eet_read_direct(ef, EET_TEST_FILE_KEY1, &size) == NULL);
1099
1100 eet_close(ef);
1101
1102 fail_if(unlink(file) != 0);
1103
1104 eet_shutdown();
1105} /* START_TEST */
1106
1107END_TEST
1108START_TEST(eet_file_data_dump_test)
1109{
1110 Eet_Data_Descriptor *edd;
1111 Eet_Test_Ex_Type *result;
1112 Eet_Data_Descriptor_Class eddc;
1113 Eet_Test_Ex_Type etbt;
1114 Eet_File *ef;
1115 char *string1;
1116 char *file = strdup("/tmp/eet_suite_testXXXXXX");
1117 int test;
1118
1119 eet_init();
1120
1121 _eet_test_ex_set(&etbt, 0);
1122 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
1123 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
1124 etbt.hash = eina_hash_string_superfast_new(NULL);
1125 eina_hash_add(etbt.hash, EET_TEST_KEY1, _eet_test_ex_set(NULL, 2));
1126 eina_hash_add(etbt.hash, EET_TEST_KEY2, _eet_test_ex_set(NULL, 2));
1127 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
1128 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
1129 etbt.ihash = eina_hash_string_superfast_new(NULL);
1130 eina_hash_add(etbt.ihash, EET_TEST_KEY1, &i7);
1131 eina_hash_add(etbt.ihash, EET_TEST_KEY2, &i7);
1132 etbt.slist = eina_list_prepend(NULL, "test");
1133 etbt.shash = eina_hash_string_superfast_new(NULL);
1134 eina_hash_add(etbt.shash, EET_TEST_KEY1, "test");
1135 memset(&etbt.charray, 0, sizeof(etbt.charray));
1136 etbt.charray[0] = "test";
1137
1138 eet_eina_file_data_descriptor_class_set(&eddc, sizeof (eddc),
1139 "Eet_Test_Ex_Type",
1140 sizeof(Eet_Test_Ex_Type));
1141
1142 edd = eet_data_descriptor_file_new(&eddc);
1143 fail_if(!edd);
1144
1145 _eet_build_ex_descriptor(edd);
1146
1147 fail_if(!(file = tmpnam(file)));
1148
1149 /* Save the encoded data in a file. */
1150 ef = eet_open(file, EET_FILE_MODE_WRITE);
1151 fail_if(!ef);
1152
1153 fail_if(!eet_data_write(ef, edd, EET_TEST_FILE_KEY1, &etbt, 0));
1154
1155 eet_close(ef);
1156
1157 /* Use dump/undump in the middle */
1158 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
1159 fail_if(!ef);
1160
1161 string1 = NULL;
1162 fail_if(eet_data_dump(ef, EET_TEST_FILE_KEY1, append_string, &string1) != 1);
1163 fail_if(eet_delete(ef, EET_TEST_FILE_KEY1) == 0);
1164 fail_if(!eet_data_undump(ef, EET_TEST_FILE_KEY1, string1, strlen(string1), 1));
1165
1166 eet_close(ef);
1167
1168 /* Test the correctness of the reinsertion. */
1169 ef = eet_open(file, EET_FILE_MODE_READ);
1170 fail_if(!ef);
1171
1172 result = eet_data_read(ef, edd, EET_TEST_FILE_KEY1);
1173 fail_if(!result);
1174
1175 eet_close(ef);
1176
1177 /* Test the resulting data. */
1178 fail_if(_eet_test_ex_check(result, 0) != 0);
1179 fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0);
1180 fail_if(eina_list_data_get(result->ilist) == NULL);
1181 fail_if(*((int *)eina_list_data_get(result->ilist)) != 42);
1182 fail_if(eina_list_data_get(result->slist) == NULL);
1183 fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0);
1184 fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL);
1185 fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0);
1186 fail_if(strcmp(result->charray[0], "test") != 0);
1187
1188 test = 0;
1189 if (result->hash)
1190 eina_hash_foreach(result->hash, func, &test);
1191
1192 fail_if(test != 0);
1193 if (result->ihash)
1194 eina_hash_foreach(result->ihash, func7, &test);
1195
1196 fail_if(test != 0);
1197
1198 fail_if(unlink(file) != 0);
1199
1200 eet_shutdown();
1201} /* START_TEST */
1202
1203END_TEST
1204START_TEST(eet_image)
1205{
1206 Eet_File *ef;
1207 char *file = strdup("/tmp/eet_suite_testXXXXXX");
1208 unsigned int *data;
1209 int compress;
1210 int quality;
1211 int result;
1212 int lossy;
1213 int alpha;
1214 unsigned int w;
1215 unsigned int h;
1216
1217 eet_init();
1218
1219 fail_if(!(file = tmpnam(file)));
1220
1221 /* Save the encoded data in a file. */
1222 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
1223 fail_if(!ef);
1224
1225 result = eet_data_image_write(ef,
1226 EET_TEST_FILE_IMAGE "0",
1227 test_noalpha.color,
1228 test_noalpha.w,
1229 test_noalpha.h,
1230 test_noalpha.alpha,
1231 0,
1232 100,
1233 0);
1234 fail_if(result == 0);
1235
1236 result = eet_data_image_write(ef,
1237 EET_TEST_FILE_IMAGE "1",
1238 test_noalpha.color,
1239 test_noalpha.w,
1240 test_noalpha.h,
1241 test_noalpha.alpha,
1242 5,
1243 100,
1244 0);
1245 fail_if(result == 0);
1246
1247 result = eet_data_image_write(ef,
1248 EET_TEST_FILE_IMAGE "2",
1249 test_noalpha.color,
1250 test_noalpha.w,
1251 test_noalpha.h,
1252 test_noalpha.alpha,
1253 9,
1254 100,
1255 0);
1256 fail_if(result == 0);
1257
1258 result = eet_data_image_write(ef,
1259 EET_TEST_FILE_IMAGE "3",
1260 test_noalpha.color,
1261 test_noalpha.w,
1262 test_noalpha.h,
1263 test_noalpha.alpha,
1264 0,
1265 100,
1266 1);
1267 fail_if(result == 0);
1268
1269 result = eet_data_image_write(ef,
1270 EET_TEST_FILE_IMAGE "4",
1271 test_noalpha.color,
1272 test_noalpha.w,
1273 test_noalpha.h,
1274 test_noalpha.alpha,
1275 0,
1276 60,
1277 1);
1278 fail_if(result == 0);
1279
1280 result = eet_data_image_write(ef,
1281 EET_TEST_FILE_IMAGE "5",
1282 test_noalpha.color,
1283 test_noalpha.w,
1284 test_noalpha.h,
1285 test_noalpha.alpha,
1286 0,
1287 10,
1288 1);
1289 fail_if(result == 0);
1290
1291 result = eet_data_image_write(ef,
1292 EET_TEST_FILE_IMAGE "6",
1293 test_noalpha.color,
1294 test_noalpha.w,
1295 test_noalpha.h,
1296 test_noalpha.alpha,
1297 0,
1298 0,
1299 1);
1300 fail_if(result == 0);
1301
1302 result = eet_data_image_write(ef, EET_TEST_FILE_IMAGE "7", test_alpha.color,
1303 test_alpha.w, test_alpha.h, test_alpha.alpha,
1304 9, 100, 0);
1305 fail_if(result == 0);
1306
1307 result = eet_data_image_write(ef, EET_TEST_FILE_IMAGE "8", test_alpha.color,
1308 test_alpha.w, test_alpha.h, test_alpha.alpha,
1309 0, 80, 1);
1310 fail_if(result == 0);
1311
1312 result = eet_data_image_write(ef, EET_TEST_FILE_IMAGE "9", test_alpha.color,
1313 test_alpha.w, test_alpha.h, test_alpha.alpha,
1314 0, 100, 1);
1315 fail_if(result == 0);
1316
1317 data = eet_data_image_read(ef,
1318 EET_TEST_FILE_IMAGE "2",
1319 &w,
1320 &h,
1321 &alpha,
1322 &compress,
1323 &quality,
1324 &lossy);
1325 fail_if(data == NULL);
1326 fail_if(w != test_noalpha.w);
1327 fail_if(h != test_noalpha.h);
1328 fail_if(alpha != test_noalpha.alpha);
1329 fail_if(compress != 9);
1330 fail_if(lossy != 0);
1331 fail_if(data[0] != test_noalpha.color[0]);
1332 free(data);
1333
1334 result = eet_data_image_header_read(ef,
1335 EET_TEST_FILE_IMAGE "2",
1336 &w,
1337 &h,
1338 &alpha,
1339 &compress,
1340 &quality,
1341 &lossy);
1342 fail_if(result == 0);
1343 fail_if(w != test_noalpha.w);
1344 fail_if(h != test_noalpha.h);
1345 fail_if(alpha != test_noalpha.alpha);
1346 fail_if(compress != 9);
1347 fail_if(lossy != 0);
1348
1349 eet_close(ef);
1350
1351 /* Test read of image */
1352 ef = eet_open(file, EET_FILE_MODE_READ);
1353 fail_if(!ef);
1354
1355 result = eet_data_image_header_read(ef,
1356 EET_TEST_FILE_IMAGE "0",
1357 &w,
1358 &h,
1359 &alpha,
1360 &compress,
1361 &quality,
1362 &lossy);
1363 fail_if(result == 0);
1364 fail_if(w != test_noalpha.w);
1365 fail_if(h != test_noalpha.h);
1366 fail_if(alpha != test_noalpha.alpha);
1367 fail_if(compress != 0);
1368 fail_if(lossy != 0);
1369
1370 data = malloc(w * h * 4);
1371 fail_if(data == NULL);
1372 result = eet_data_image_read_to_surface(ef,
1373 EET_TEST_FILE_IMAGE "0",
1374 4,
1375 4,
1376 data,
1377 2,
1378 2,
1379 w * 4,
1380 &alpha,
1381 &compress,
1382 &quality,
1383 &lossy);
1384 fail_if(result != 1);
1385 fail_if(alpha != test_noalpha.alpha);
1386 fail_if(compress != 0);
1387 fail_if(quality != 100);
1388 fail_if(lossy != 0);
1389 fail_if(data[0] != test_noalpha.color[4 + 4 * w]);
1390 free(data);
1391
1392 data = malloc(w * h * 4);
1393 fail_if(data == NULL);
1394 result = eet_data_image_read_to_surface(ef,
1395 EET_TEST_FILE_IMAGE "0",
1396 0,
1397 0,
1398 data,
1399 w,
1400 h,
1401 w * 4,
1402 &alpha,
1403 &compress,
1404 &quality,
1405 &lossy);
1406 fail_if(result != 1);
1407 fail_if(alpha != test_noalpha.alpha);
1408 fail_if(compress != 0);
1409 fail_if(quality != 100);
1410 fail_if(lossy != 0);
1411 fail_if(data[0] != test_noalpha.color[0]);
1412 free(data);
1413
1414 data = eet_data_image_read(ef,
1415 EET_TEST_FILE_IMAGE "1",
1416 &w,
1417 &h,
1418 &alpha,
1419 &compress,
1420 &quality,
1421 &lossy);
1422 fail_if(data == NULL);
1423 fail_if(w != test_noalpha.w);
1424 fail_if(h != test_noalpha.h);
1425 fail_if(alpha != test_noalpha.alpha);
1426 fail_if(compress != 5);
1427 fail_if(quality != 100);
1428 fail_if(lossy != 0);
1429 fail_if(data[0] != test_noalpha.color[0]);
1430 free(data);
1431
1432 data = eet_data_image_read(ef,
1433 EET_TEST_FILE_IMAGE "2",
1434 &w,
1435 &h,
1436 &alpha,
1437 &compress,
1438 &quality,
1439 &lossy);
1440 fail_if(data == NULL);
1441 fail_if(w != test_noalpha.w);
1442 fail_if(h != test_noalpha.h);
1443 fail_if(alpha != test_noalpha.alpha);
1444 fail_if(compress != 9);
1445 fail_if(lossy != 0);
1446 fail_if(data[0] != test_noalpha.color[0]);
1447 free(data);
1448
1449 data = eet_data_image_read(ef,
1450 EET_TEST_FILE_IMAGE "3",
1451 &w,
1452 &h,
1453 &alpha,
1454 &compress,
1455 &quality,
1456 &lossy);
1457 fail_if(data == NULL);
1458 fail_if(w != test_noalpha.w);
1459 fail_if(h != test_noalpha.h);
1460 fail_if(alpha != test_noalpha.alpha);
1461 fail_if(lossy != 1);
1462 free(data);
1463
1464 data = eet_data_image_read(ef,
1465 EET_TEST_FILE_IMAGE "5",
1466 &w,
1467 &h,
1468 &alpha,
1469 &compress,
1470 &quality,
1471 &lossy);
1472 fail_if(data == NULL);
1473 fail_if(w != test_noalpha.w);
1474 fail_if(h != test_noalpha.h);
1475 fail_if(alpha != test_noalpha.alpha);
1476 fail_if(lossy != 1);
1477 free(data);
1478
1479 data = eet_data_image_read(ef,
1480 EET_TEST_FILE_IMAGE "6",
1481 &w,
1482 &h,
1483 &alpha,
1484 &compress,
1485 &quality,
1486 &lossy);
1487 fail_if(data == NULL);
1488 fail_if(w != test_noalpha.w);
1489 fail_if(h != test_noalpha.h);
1490 fail_if(alpha != test_noalpha.alpha);
1491 fail_if(lossy != 1);
1492 free(data);
1493
1494 result = eet_data_image_header_read(ef,
1495 EET_TEST_FILE_IMAGE "7",
1496 &w,
1497 &h,
1498 &alpha,
1499 &compress,
1500 &quality,
1501 &lossy);
1502 fail_if(result == 0);
1503 fail_if(w != test_alpha.w);
1504 fail_if(h != test_alpha.h);
1505 fail_if(alpha != test_alpha.alpha);
1506 fail_if(compress != 9);
1507 fail_if(lossy != 0);
1508
1509 data = eet_data_image_read(ef,
1510 EET_TEST_FILE_IMAGE "7",
1511 &w,
1512 &h,
1513 &alpha,
1514 &compress,
1515 &quality,
1516 &lossy);
1517 fail_if(data == NULL);
1518 fail_if(w != test_alpha.w);
1519 fail_if(h != test_alpha.h);
1520 fail_if(alpha != test_alpha.alpha);
1521 fail_if(compress != 9);
1522 fail_if(lossy != 0);
1523 fail_if(data[0] != test_alpha.color[0]);
1524 free(data);
1525
1526 result = eet_data_image_header_read(ef,
1527 EET_TEST_FILE_IMAGE "9",
1528 &w,
1529 &h,
1530 &alpha,
1531 &compress,
1532 &quality,
1533 &lossy);
1534 fail_if(result == 0);
1535 fail_if(w != test_alpha.w);
1536 fail_if(h != test_alpha.h);
1537 fail_if(alpha != test_alpha.alpha);
1538 fail_if(lossy != 1);
1539
1540 data = eet_data_image_read(ef,
1541 EET_TEST_FILE_IMAGE "9",
1542 &w,
1543 &h,
1544 &alpha,
1545 &compress,
1546 &quality,
1547 &lossy);
1548 fail_if(data == NULL);
1549 fail_if(w != test_alpha.w);
1550 fail_if(h != test_alpha.h);
1551 fail_if(alpha != test_alpha.alpha);
1552 fail_if(lossy != 1);
1553 free(data);
1554
1555 eet_close(ef);
1556
1557 fail_if(unlink(file) != 0);
1558
1559 eet_shutdown();
1560} /* START_TEST */
1561
1562END_TEST
1563
1564#define IM0 0x00112233
1565#define IM1 0x44556677
1566#define IM2 0x8899aabb
1567#define IM3 0xccddeeff
1568
1569START_TEST(eet_small_image)
1570{
1571 char *file = strdup("/tmp/eet_suite_testXXXXXX");
1572 unsigned int image[4];
1573 unsigned int *data;
1574 Eet_File *ef;
1575 unsigned int w;
1576 unsigned int h;
1577 int alpha;
1578 int compression;
1579 int quality;
1580 int lossy;
1581 int result;
1582
1583 image[0] = IM0;
1584 image[1] = IM1;
1585 image[2] = IM2;
1586 image[3] = IM3;
1587
1588 eet_init();
1589
1590 fail_if(!(file = tmpnam(file)));
1591
1592 ef = eet_open(file, EET_FILE_MODE_WRITE);
1593 fail_if(!ef);
1594
1595 result = eet_data_image_write(ef, "/images/test", image, 2, 2, 1, 9, 100, 0);
1596 fail_if(result == 0);
1597
1598 eet_close(ef);
1599
1600 ef = eet_open(file, EET_FILE_MODE_READ);
1601 fail_if(!ef);
1602
1603 data = (unsigned int *)eet_data_image_read(ef,
1604 "/images/test",
1605 &w,
1606 &h,
1607 &alpha,
1608 &compression,
1609 &quality,
1610 &lossy);
1611 fail_if(data == NULL);
1612
1613 eet_close(ef);
1614
1615 fail_if(unlink(file) != 0);
1616
1617 fail_if(data[0] != IM0);
1618 fail_if(data[1] != IM1);
1619 fail_if(data[2] != IM2);
1620 fail_if(data[3] != IM3);
1621
1622 free(data);
1623
1624 eet_shutdown();
1625} /* START_TEST */
1626
1627END_TEST
1628START_TEST(eet_identity_simple)
1629{
1630 const char *buffer = "Here is a string of data to save !";
1631 const void *tmp;
1632 Eet_File *ef;
1633 Eet_Key *k;
1634 FILE *noread;
1635 char *test;
1636 char *file = strdup("/tmp/eet_suite_testXXXXXX");
1637 int size;
1638 int fd;
1639
1640 eet_init();
1641
1642 fail_if(!(file = tmpnam(file)));
1643 fail_if(chdir("src/tests"));
1644 fail_if(!(noread = fopen("/dev/null", "w")));
1645
1646 /* Sign an eet file. */
1647 ef = eet_open(file, EET_FILE_MODE_WRITE);
1648 fail_if(!ef);
1649
1650 fail_if(!eet_write(ef, "keys/tests", buffer, strlen(buffer) + 1, 0));
1651
1652 k = eet_identity_open("cert.pem", "key.pem", NULL);
1653 fail_if(!k);
1654
1655 fail_if(eet_identity_set(ef, k) != EET_ERROR_NONE);
1656 eet_identity_print(k, noread);
1657
1658 eet_close(ef);
1659
1660 /* Open a signed file. */
1661 ef = eet_open(file, EET_FILE_MODE_READ);
1662 fail_if(!ef);
1663
1664 test = eet_read(ef, "keys/tests", &size);
1665 fail_if(!test);
1666 fail_if(size != (int)strlen(buffer) + 1);
1667
1668 fail_if(memcmp(test, buffer, strlen(buffer) + 1) != 0);
1669
1670 tmp = eet_identity_x509(ef, &size);
1671 fail_if(tmp == NULL);
1672
1673 eet_identity_certificate_print(tmp, size, noread);
1674
1675 eet_close(ef);
1676
1677 /* As we are changing file contain in less than 1s, this could get unnoticed
1678 by eet cache system. */
1679 eet_clearcache();
1680
1681 /* Corrupting the file. */
1682 fd = open(file, O_WRONLY);
1683 fail_if(fd < 0);
1684
1685 fail_if(lseek(fd, 200, SEEK_SET) != 200);
1686 fail_if(write(fd, "42", 2) != 2);
1687 fail_if(lseek(fd, 50, SEEK_SET) != 50);
1688 fail_if(write(fd, "42", 2) != 2);
1689 fail_if(lseek(fd, 88, SEEK_SET) != 88);
1690 fail_if(write(fd, "42", 2) != 2);
1691
1692 close(fd);
1693
1694 /* Attempt to open a modified file. */
1695 ef = eet_open(file, EET_FILE_MODE_READ);
1696 fail_if(ef);
1697
1698 fail_if(unlink(file) != 0);
1699
1700 eet_shutdown();
1701} /* START_TEST */
1702
1703END_TEST
1704START_TEST(eet_identity_open_simple)
1705{
1706 Eet_Key *k = NULL;
1707
1708 eet_init();
1709
1710 fail_if(chdir("src/tests"));
1711
1712 k = eet_identity_open("cert.pem", "key.pem", NULL);
1713 fail_if(!k);
1714
1715 if (k)
1716 eet_identity_close(k);
1717
1718 eet_shutdown();
1719} /* START_TEST */
1720
1721END_TEST
1722START_TEST(eet_identity_open_pkcs8)
1723{
1724 Eet_Key *k = NULL;
1725
1726 eet_init();
1727
1728 fail_if(chdir("src/tests"));
1729
1730 k = eet_identity_open("cert.pem", "key_enc_none.pem", NULL);
1731 fail_if(!k);
1732
1733 if (k)
1734 eet_identity_close(k);
1735
1736 eet_shutdown();
1737} /* START_TEST */
1738
1739END_TEST
1740
1741static int
1742pass_get(char *pass,
1743 int size,
1744 __UNUSED__ int rwflags,
1745 __UNUSED__ void *u)
1746{
1747 memset(pass, 0, size);
1748
1749 if ((int)strlen("password") > size)
1750 return 0;
1751
1752 snprintf(pass, size, "%s", "password");
1753 return strlen(pass);
1754} /* pass_get */
1755
1756static int
1757badpass_get(char *pass,
1758 int size,
1759 __UNUSED__ int rwflags,
1760 __UNUSED__ void *u)
1761{
1762 memset(pass, 0, size);
1763
1764 if ((int)strlen("bad password") > size)
1765 return 0;
1766
1767 snprintf(pass, size, "%s", "bad password");
1768 return strlen(pass);
1769} /* badpass_get */
1770
1771START_TEST(eet_identity_open_pkcs8_enc)
1772{
1773 Eet_Key *k = NULL;
1774
1775 eet_init();
1776
1777 fail_if(chdir("src/tests"));
1778
1779 k = eet_identity_open("cert.pem", "key_enc.pem", NULL);
1780 fail_if(k);
1781
1782 if (k)
1783 eet_identity_close(k);
1784
1785 k = eet_identity_open("cert.pem", "key_enc.pem", &badpass_get);
1786 fail_if(k);
1787
1788 if (k)
1789 eet_identity_close(k);
1790
1791 k = eet_identity_open("cert.pem", "key_enc.pem", &pass_get);
1792 fail_if(!k);
1793
1794 if (k)
1795 eet_identity_close(k);
1796
1797 eet_shutdown();
1798}
1799END_TEST
1800START_TEST(eet_cipher_decipher_simple)
1801{
1802 const char *buffer = "Here is a string of data to save !";
1803 const char *key = "This is a crypto key";
1804 const char *key_bad = "This is another crypto key";
1805 Eet_File *ef;
1806 char *test;
1807 char *file = strdup("/tmp/eet_suite_testXXXXXX");
1808 int size;
1809
1810 eet_init();
1811
1812 fail_if(!(file = tmpnam(file)));
1813 fail_if(chdir("src/tests"));
1814
1815 /* Crypt an eet file. */
1816 ef = eet_open(file, EET_FILE_MODE_WRITE);
1817 fail_if(!ef);
1818
1819 fail_if(!eet_write_cipher(ef, "keys/tests", buffer, strlen(buffer) + 1, 0,
1820 key));
1821
1822 eet_close(ef);
1823
1824 /* Decrypt an eet file. */
1825 ef = eet_open(file, EET_FILE_MODE_READ);
1826 fail_if(!ef);
1827
1828 test = eet_read_cipher(ef, "keys/tests", &size, key);
1829 fail_if(!test);
1830 fail_if(size != (int)strlen(buffer) + 1);
1831
1832 fail_if(memcmp(test, buffer, strlen(buffer) + 1) != 0);
1833
1834 eet_close(ef);
1835
1836 /* Decrypt an eet file. */
1837 ef = eet_open(file, EET_FILE_MODE_READ);
1838 fail_if(!ef);
1839
1840 test = eet_read_cipher(ef, "keys/tests", &size, key_bad);
1841
1842 if (size == (int)strlen(buffer) + 1)
1843 fail_if(memcmp(test, buffer, strlen(buffer) + 1) == 0);
1844
1845 eet_close(ef);
1846
1847 fail_if(unlink(file) != 0);
1848
1849 eet_shutdown();
1850} /* START_TEST */
1851
1852END_TEST
1853
1854#ifdef EINA_HAVE_THREADS
1855
1856static Eina_Bool open_worker_stop;
1857
1858# ifdef _EET_INCLUDED_PTHREAD
1859
1860static void *
1861open_close_worker(void *path)
1862{
1863 while (!open_worker_stop)
1864 {
1865 Eet_File *ef = eet_open((char const *)path, EET_FILE_MODE_READ);
1866 if (ef == NULL)
1867 pthread_exit("eet_open() failed");
1868 else
1869 {
1870 Eet_Error err_code = eet_close(ef);
1871 if (err_code != EET_ERROR_NONE)
1872 pthread_exit("eet_close() failed");
1873 }
1874 }
1875
1876 pthread_exit(NULL);
1877} /* open_close_worker */
1878
1879# else /* ifdef _EET_INCLUDED_PTHREAD */
1880
1881static unsigned int __stdcall
1882open_close_worker(void *path)
1883{
1884 while (!open_worker_stop)
1885 {
1886 Eet_File *ef = eet_open((char const *)path, EET_FILE_MODE_READ);
1887 if (ef == NULL)
1888 _endthreadex(-1);
1889 else
1890 {
1891 Eet_Error err_code = eet_close(ef);
1892 if (err_code != EET_ERROR_NONE)
1893 _endthreadex(-2);
1894 }
1895 }
1896
1897 _endthreadex(0);
1898} /* open_close_worker */
1899
1900# endif /* ifdef _EET_INCLUDED_PTHREAD */
1901
1902START_TEST(eet_cache_concurrency)
1903{
1904 char *file = strdup("/tmp/eet_suite_testXXXXXX");
1905 const char *buffer = "test data";
1906 Eet_File *ef;
1907 void *thread_ret;
1908 unsigned int n;
1909# ifdef _EET_INCLUDED_PTHREAD
1910 pthread_t thread;
1911# else /* ifdef _EET_INCLUDED_PTHREAD */
1912 uintptr_t thread;
1913 unsigned int thread_id;
1914 DWORD ret;
1915# endif /* ifdef _EET_INCLUDED_PTHREAD */
1916
1917 eet_init();
1918 eina_threads_init();
1919
1920 /* create a file to test with */
1921 fail_if(!(file = tmpnam(file)));
1922 ef = eet_open(file, EET_FILE_MODE_WRITE);
1923 fail_if(!ef);
1924 fail_if(!eet_write(ef, "keys/tests", buffer, strlen(buffer) + 1, 0));
1925
1926 /* start a thread that repeatedly opens and closes a file */
1927 open_worker_stop = 0;
1928# ifdef _EET_INCLUDED_PTHREAD
1929 pthread_create(&thread, NULL, open_close_worker, file);
1930# else /* ifdef _EET_INCLUDED_PTHREAD */
1931 thread = _beginthreadex(NULL, 0, open_close_worker, file, 0, &thread_id);
1932# endif /* ifdef _EET_INCLUDED_PTHREAD */
1933 /* clear the cache repeatedly in this thread */
1934 for (n = 0; n < 50000; ++n)
1935 {
1936 eet_clearcache();
1937 }
1938
1939 /* join the other thread, and fail if it returned an error message */
1940 open_worker_stop = 1;
1941# ifdef _EET_INCLUDED_PTHREAD
1942 fail_if(pthread_join(thread, &thread_ret) != 0);
1943 fail_unless(thread_ret == NULL, (char const *)thread_ret);
1944# else /* ifdef _EET_INCLUDED_PTHREAD */
1945 ret = WaitForSingleObject((HANDLE)thread, INFINITE);
1946 fail_if(ret != WAIT_OBJECT_0);
1947 fail_if(GetExitCodeThread((HANDLE)thread, &ret) == FALSE);
1948 fail_if(ret != 0);
1949# endif /* ifdef _EET_INCLUDED_PTHREAD */
1950
1951 fail_if(unlink(file) != 0);
1952
1953 eina_threads_shutdown();
1954 eet_shutdown();
1955}
1956END_TEST
1957
1958#endif /* EINA_HAVE_THREADS */
1959
1960typedef struct _Eet_Connection_Data Eet_Connection_Data;
1961struct _Eet_Connection_Data
1962{
1963 Eet_Connection *conn;
1964 Eet_Data_Descriptor *edd;
1965 Eina_Bool test;
1966};
1967
1968static Eina_Bool
1969_eet_connection_read(const void *eet_data,
1970 size_t size,
1971 void *user_data)
1972{
1973 Eet_Connection_Data *dt = user_data;
1974 Eet_Test_Ex_Type *result;
1975 Eet_Node *node;
1976 int test;
1977
1978 result = eet_data_descriptor_decode(dt->edd, eet_data, size);
1979 node = eet_data_node_decode_cipher(eet_data, NULL, size);
1980
1981 /* Test the resulting data. */
1982 fail_if(!node);
1983 fail_if(_eet_test_ex_check(result, 0) != 0);
1984 fail_if(_eet_test_ex_check(eina_list_data_get(result->list), 1) != 0);
1985 fail_if(eina_list_data_get(result->ilist) == NULL);
1986 fail_if(*((int *)eina_list_data_get(result->ilist)) != 42);
1987 fail_if(eina_list_data_get(result->slist) == NULL);
1988 fail_if(strcmp(eina_list_data_get(result->slist), "test") != 0);
1989 fail_if(eina_hash_find(result->shash, EET_TEST_KEY1) == NULL);
1990 fail_if(strcmp(eina_hash_find(result->shash, EET_TEST_KEY1), "test") != 0);
1991 fail_if(strcmp(result->charray[0], "test") != 0);
1992
1993 test = 0;
1994 if (result->hash)
1995 eina_hash_foreach(result->hash, func, &test);
1996
1997 fail_if(test != 0);
1998 if (result->ihash)
1999 eina_hash_foreach(result->ihash, func7, &test);
2000
2001 fail_if(test != 0);
2002
2003 if (!dt->test)
2004 {
2005 dt->test = EINA_TRUE;
2006 fail_if(!eet_connection_node_send(dt->conn, node, NULL));
2007 }
2008
2009 return EINA_TRUE;
2010} /* _eet_connection_read */
2011
2012static Eina_Bool
2013_eet_connection_write(const void *data,
2014 size_t size,
2015 void *user_data)
2016{
2017 Eet_Connection_Data *dt = user_data;
2018 int still;
2019
2020 if (!dt->test)
2021 {
2022 int step = size / 3;
2023
2024 eet_connection_received(dt->conn, data, step);
2025 eet_connection_received(dt->conn, (char *)data + step, step);
2026 size -= 2 * step;
2027 still = eet_connection_received(dt->conn, (char *)data + 2 * step, size);
2028 }
2029 else
2030 still = eet_connection_received(dt->conn, data, size);
2031
2032 fail_if(still);
2033
2034 return EINA_TRUE;
2035} /* _eet_connection_write */
2036
2037START_TEST(eet_connection_check)
2038{
2039 Eet_Connection *conn;
2040 Eet_Data_Descriptor *edd;
2041 Eet_Data_Descriptor_Class eddc;
2042 Eet_Connection_Data ecd;
2043 Eet_Test_Ex_Type etbt;
2044 Eina_Bool on_going;
2045
2046 eet_init();
2047
2048 _eet_test_ex_set(&etbt, 0);
2049 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
2050 etbt.list = eina_list_prepend(etbt.list, _eet_test_ex_set(NULL, 1));
2051 etbt.hash = eina_hash_string_superfast_new(NULL);
2052 eina_hash_add(etbt.hash, EET_TEST_KEY1, _eet_test_ex_set(NULL, 2));
2053 eina_hash_add(etbt.hash, EET_TEST_KEY2, _eet_test_ex_set(NULL, 2));
2054 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
2055 etbt.ilist = eina_list_prepend(etbt.ilist, &i42);
2056 etbt.ihash = eina_hash_string_superfast_new(NULL);
2057 eina_hash_add(etbt.ihash, EET_TEST_KEY1, &i7);
2058 eina_hash_add(etbt.ihash, EET_TEST_KEY2, &i7);
2059 etbt.slist = eina_list_prepend(NULL, "test");
2060 etbt.shash = eina_hash_string_superfast_new(NULL);
2061 eina_hash_add(etbt.shash, EET_TEST_KEY1, "test");
2062 memset(&etbt.charray, 0, sizeof(etbt.charray));
2063 etbt.charray[0] = "test";
2064
2065 eet_eina_file_data_descriptor_class_set(&eddc, sizeof (eddc),
2066 "Eet_Test_Ex_Type",
2067 sizeof(Eet_Test_Ex_Type));
2068
2069 edd = eet_data_descriptor_file_new(&eddc);
2070 fail_if(!edd);
2071
2072 _eet_build_ex_descriptor(edd);
2073
2074 /* Create a connection. */
2075 conn = eet_connection_new(_eet_connection_read, _eet_connection_write, &ecd);
2076 fail_if(!conn);
2077
2078 /* Init context. */
2079 ecd.test = EINA_FALSE;
2080 ecd.conn = conn;
2081 ecd.edd = edd;
2082
2083 /* Test the connection. */
2084 fail_if(!eet_connection_send(conn, edd, &etbt, NULL));
2085
2086 fail_if(!ecd.test);
2087
2088 fail_if(!eet_connection_close(conn, &on_going));
2089
2090 fail_if(on_going);
2091
2092 eet_shutdown();
2093}
2094END_TEST
2095
2096struct _Eet_5FP
2097{
2098 Eina_F32p32 fp32;
2099 Eina_F16p16 fp16;
2100 Eina_F8p24 fp8;
2101 Eina_F32p32 f1;
2102 Eina_F32p32 f0;
2103};
2104typedef struct _Eet_5FP Eet_5FP;
2105
2106struct _Eet_5DBL
2107{
2108 double fp32;
2109 double fp16;
2110 float fp8;
2111 double f1;
2112 double f0;
2113};
2114typedef struct _Eet_5DBL Eet_5DBL;
2115
2116START_TEST(eet_fp)
2117{
2118 Eet_Data_Descriptor_Class eddc;
2119 Eet_Data_Descriptor *edd_5FP;
2120 Eet_Data_Descriptor *edd_5DBL;
2121 Eet_5FP origin;
2122 Eet_5DBL *convert;
2123 Eet_5FP *build;
2124 void *blob;
2125 int size;
2126
2127 eet_init();
2128
2129 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_5FP);
2130 edd_5FP = eet_data_descriptor_stream_new(&eddc);
2131
2132 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "fp32", fp32, EET_T_F32P32);
2133 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "fp16", fp16, EET_T_F16P16);
2134 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "fp8", fp8, EET_T_F8P24);
2135 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "f1", f1, EET_T_F32P32);
2136 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "f0", f0, EET_T_F32P32);
2137
2138 eet_eina_stream_data_descriptor_class_set(&eddc, sizeof (eddc), "Eet_5FP", sizeof (Eet_5DBL));
2139 edd_5DBL = eet_data_descriptor_stream_new(&eddc);
2140
2141 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "fp32", fp32, EET_T_DOUBLE);
2142 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "fp16", fp16, EET_T_DOUBLE);
2143 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "fp8", fp8, EET_T_FLOAT);
2144 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "f1", f1, EET_T_DOUBLE);
2145 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "f0", f0, EET_T_DOUBLE);
2146
2147 origin.fp32 = eina_f32p32_double_from(1.125);
2148 origin.fp16 = eina_f16p16_int_from(2000);
2149 origin.fp8 = eina_f8p24_int_from(125);
2150 origin.f1 = eina_f32p32_int_from(1);
2151 origin.f0 = 0;
2152
2153 blob = eet_data_descriptor_encode(edd_5FP, &origin, &size);
2154 fail_if(!blob || size <= 0);
2155
2156 build = eet_data_descriptor_decode(edd_5FP, blob, size);
2157 fail_if(!build);
2158
2159 convert = eet_data_descriptor_decode(edd_5DBL, blob, size);
2160 fail_if(!convert);
2161
2162 fail_if(build->fp32 != eina_f32p32_double_from(1.125));
2163 fail_if(build->fp16 != eina_f16p16_int_from(2000));
2164 fail_if(build->fp8 != eina_f8p24_int_from(125));
2165 fail_if(build->f1 != eina_f32p32_int_from(1));
2166 fail_if(build->f0 != 0);
2167
2168 fail_if(convert->fp32 != 1.125);
2169 fail_if(convert->fp16 != 2000);
2170 fail_if(convert->fp8 != 125);
2171 fail_if(convert->f1 != 1);
2172 fail_if(convert->f0 != 0);
2173
2174 eet_shutdown();
2175}
2176END_TEST
2177START_TEST(eet_file_fp)
2178{
2179 char *file = strdup("/tmp/eet_suite_testXXXXXX");
2180 Eet_Data_Descriptor_Class eddc;
2181 Eet_Data_Descriptor *edd_5FP;
2182 Eet_Data_Descriptor *edd_5DBL;
2183 Eet_File *ef;
2184 Eet_5FP origin;
2185 Eet_5DBL *convert;
2186 Eet_5FP *build;
2187
2188 eet_init();
2189
2190 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_5FP);
2191 edd_5FP = eet_data_descriptor_file_new(&eddc);
2192
2193 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "fp32", fp32, EET_T_F32P32);
2194 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "fp16", fp16, EET_T_F16P16);
2195 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "fp8", fp8, EET_T_F8P24);
2196 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "f1", f1, EET_T_F32P32);
2197 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5FP, Eet_5FP, "f0", f0, EET_T_F32P32);
2198
2199 eet_eina_file_data_descriptor_class_set(&eddc, sizeof (eddc), "Eet_5FP", sizeof (Eet_5DBL));
2200 edd_5DBL = eet_data_descriptor_file_new(&eddc);
2201
2202 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "fp32", fp32, EET_T_DOUBLE);
2203 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "fp16", fp16, EET_T_DOUBLE);
2204 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "fp8", fp8, EET_T_FLOAT);
2205 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "f1", f1, EET_T_DOUBLE);
2206 EET_DATA_DESCRIPTOR_ADD_BASIC(edd_5DBL, Eet_5DBL, "f0", f0, EET_T_DOUBLE);
2207
2208 origin.fp32 = eina_f32p32_double_from(1.125);
2209 origin.fp16 = eina_f16p16_int_from(2000);
2210 origin.fp8 = eina_f8p24_int_from(125);
2211 origin.f1 = eina_f32p32_int_from(1);
2212 origin.f0 = 0;
2213
2214 fail_if(!(file = tmpnam(file)));
2215
2216 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
2217 fail_if(!ef);
2218
2219 fail_if(!eet_data_write(ef, edd_5FP, EET_TEST_FILE_KEY1, &origin, 1));
2220
2221 build = eet_data_read(ef, edd_5FP, EET_TEST_FILE_KEY1);
2222 fail_if(!build);
2223
2224 convert = eet_data_read(ef, edd_5DBL, EET_TEST_FILE_KEY1);
2225 fail_if(!convert);
2226
2227 fail_if(build->fp32 != eina_f32p32_double_from(1.125));
2228 fail_if(build->fp16 != eina_f16p16_int_from(2000));
2229 fail_if(build->fp8 != eina_f8p24_int_from(125));
2230 fail_if(build->f1 != eina_f32p32_int_from(1));
2231 fail_if(build->f0 != 0);
2232
2233 fail_if(convert->fp32 != 1.125);
2234 fail_if(convert->fp16 != 2000);
2235 fail_if(convert->fp8 != 125);
2236 fail_if(convert->f1 != 1);
2237 fail_if(convert->f0 != 0);
2238
2239 eet_close(ef);
2240
2241 fail_if(unlink(file) != 0);
2242
2243 eet_shutdown();
2244} /* START_TEST */
2245
2246END_TEST
2247
2248typedef struct _Eet_Union_Test Eet_Union_Test;
2249typedef struct _Eet_Variant_Test Eet_Variant_Test;
2250typedef struct _Eet_Variant_Type Eet_Variant_Type;
2251typedef struct _Eet_Inherit_Test1 Eet_Inherit_Test1;
2252typedef struct _Eet_Inherit_Test2 Eet_Inherit_Test2;
2253typedef struct _Eet_Inherit_Test3 Eet_Inherit_Test3;
2254typedef struct _Eet_St1 Eet_St1;
2255typedef struct _Eet_St2 Eet_St2;
2256typedef struct _Eet_St3 Eet_St3;
2257typedef struct _Eet_List Eet_List;
2258
2259typedef enum _Eet_Union
2260{
2261 EET_UNKNOWN,
2262 EET_ST1,
2263 EET_ST2,
2264 EET_ST3
2265} Eet_Union;
2266
2267struct
2268{
2269 Eet_Union u;
2270 const char *name;
2271} eet_mapping[] = {
2272 { EET_ST1, "ST1" },
2273 { EET_ST2, "ST2" },
2274 { EET_ST3, "ST3" },
2275 { EET_UNKNOWN, NULL }
2276};
2277
2278struct _Eet_St1
2279{
2280 double val1;
2281 int stuff;
2282 char *s1;
2283};
2284
2285struct _Eet_St2
2286{
2287 Eina_Bool b1;
2288 unsigned long long v1;
2289};
2290
2291struct _Eet_St3
2292{
2293 int boby;
2294};
2295
2296struct _Eet_Union_Test
2297{
2298 Eet_Union type;
2299
2300 union {
2301 Eet_St1 st1;
2302 Eet_St2 st2;
2303 Eet_St3 st3;
2304 } u;
2305};
2306
2307struct _Eet_Variant_Type
2308{
2309 const char *type;
2310 Eina_Bool unknow : 1;
2311};
2312
2313struct _Eet_Variant_Test
2314{
2315 Eet_Variant_Type t;
2316
2317 void *data;
2318 Eina_List *data_list;
2319};
2320
2321struct _Eet_Inherit_Test1
2322{
2323 Eet_Union type;
2324 Eet_St1 st1;
2325};
2326struct _Eet_Inherit_Test2
2327{
2328 Eet_Union type;
2329 Eet_St2 st2;
2330};
2331struct _Eet_Inherit_Test3
2332{
2333 Eet_Union type;
2334 Eet_St3 st3;
2335};
2336
2337struct _Eet_List
2338{
2339 Eina_List *list;
2340};
2341
2342static const char *
2343_eet_union_type_get(const void *data,
2344 Eina_Bool *unknow)
2345{
2346 const Eet_Union *u = data;
2347 int i;
2348
2349 if (unknow)
2350 *unknow = EINA_FALSE;
2351
2352 for (i = 0; eet_mapping[i].name != NULL; ++i)
2353 if (*u == eet_mapping[i].u)
2354 return eet_mapping[i].name;
2355
2356 if (unknow)
2357 *unknow = EINA_TRUE;
2358
2359 return NULL;
2360} /* _eet_union_type_get */
2361
2362static Eina_Bool
2363_eet_union_type_set(const char *type,
2364 void *data,
2365 Eina_Bool unknow)
2366{
2367 Eet_Union *u = data;
2368 int i;
2369
2370 if (unknow)
2371 return EINA_FALSE;
2372
2373 for (i = 0; eet_mapping[i].name != NULL; ++i)
2374 if (strcmp(eet_mapping[i].name, type) == 0)
2375 {
2376 *u = eet_mapping[i].u;
2377 return EINA_TRUE;
2378 }
2379
2380 return EINA_FALSE;
2381} /* _eet_union_type_set */
2382
2383static const char *
2384_eet_variant_type_get(const void *data,
2385 Eina_Bool *unknow)
2386{
2387 const Eet_Variant_Type *type = data;
2388 int i;
2389
2390 if (unknow)
2391 *unknow = type->unknow;
2392
2393 for (i = 0; eet_mapping[i].name != NULL; ++i)
2394 if (strcmp(type->type, eet_mapping[i].name) == 0)
2395 return eet_mapping[i].name;
2396
2397 if (unknow)
2398 *unknow = EINA_FALSE;
2399
2400 return type->type;
2401} /* _eet_variant_type_get */
2402
2403static Eina_Bool
2404_eet_variant_type_set(const char *type,
2405 void *data,
2406 Eina_Bool unknow)
2407{
2408 Eet_Variant_Type *vt = data;
2409
2410 vt->type = type;
2411 vt->unknow = unknow;
2412 return EINA_TRUE;
2413} /* _eet_variant_type_set */
2414
2415static Eet_Data_Descriptor *
2416_eet_st1_dd(void)
2417{
2418 Eet_Data_Descriptor_Class eddc;
2419 Eet_Data_Descriptor *res;
2420
2421 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_St1);
2422 res = eet_data_descriptor_stream_new(&eddc);
2423 EET_DATA_DESCRIPTOR_ADD_BASIC(res, Eet_St1, "val1", val1, EET_T_DOUBLE);
2424 EET_DATA_DESCRIPTOR_ADD_BASIC(res, Eet_St1, "stuff", stuff, EET_T_INT);
2425 EET_DATA_DESCRIPTOR_ADD_BASIC(res, Eet_St1, "s1", s1, EET_T_STRING);
2426
2427 return res;
2428} /* _eet_st1_dd */
2429
2430static void
2431_eet_st1_set(Eet_St1 *st1,
2432 int i)
2433{
2434 st1->val1 = EET_TEST_DOUBLE;
2435 st1->stuff = EET_TEST_INT + i;
2436 st1->s1 = EET_TEST_STRING;
2437} /* _eet_st1_set */
2438
2439static void
2440_eet_st1_cmp(Eet_St1 *st1,
2441 int i)
2442{
2443 double tmp;
2444
2445 fail_if(!st1);
2446
2447 tmp = st1->val1 - EET_TEST_DOUBLE;
2448 if (tmp < 0)
2449 tmp = -tmp;
2450
2451 fail_if(tmp > 0.005);
2452 fail_if(st1->stuff != EET_TEST_INT + i);
2453 fail_if(strcmp(st1->s1, EET_TEST_STRING));
2454} /* _eet_st1_cmp */
2455
2456static Eet_Data_Descriptor *
2457_eet_st2_dd(void)
2458{
2459 Eet_Data_Descriptor_Class eddc;
2460 Eet_Data_Descriptor *res;
2461
2462 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_St2);
2463 res = eet_data_descriptor_stream_new(&eddc);
2464 EET_DATA_DESCRIPTOR_ADD_BASIC(res, Eet_St2, "b1", b1, EET_T_UCHAR);
2465 EET_DATA_DESCRIPTOR_ADD_BASIC(res, Eet_St2, "v1", v1, EET_T_ULONG_LONG);
2466
2467 return res;
2468} /* _eet_st2_dd */
2469
2470static void
2471_eet_st2_set(Eet_St2 *st2,
2472 int i)
2473{
2474 st2->b1 = EINA_TRUE;
2475 st2->v1 = EET_TEST_LONG_LONG + i;
2476} /* _eet_st2_set */
2477
2478static void
2479_eet_st2_cmp(Eet_St2 *st2,
2480 int i)
2481{
2482 fail_if(!st2->b1);
2483 fail_if(st2->v1 != EET_TEST_LONG_LONG + i);
2484} /* _eet_st2_cmp */
2485
2486static Eet_Data_Descriptor *
2487_eet_st3_dd(void)
2488{
2489 Eet_Data_Descriptor_Class eddc;
2490 Eet_Data_Descriptor *res;
2491
2492 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_St3);
2493 res = eet_data_descriptor_stream_new(&eddc);
2494 EET_DATA_DESCRIPTOR_ADD_BASIC(res, Eet_St3, "boby", boby, EET_T_INT);
2495
2496 return res;
2497} /* _eet_st3_dd */
2498
2499static void
2500_eet_st3_set(Eet_St3 *st3,
2501 int i)
2502{
2503 st3->boby = EET_TEST_INT + i;
2504} /* _eet_st3_set */
2505
2506static void
2507_eet_st3_cmp(Eet_St3 *st3,
2508 int i)
2509{
2510 fail_if(st3->boby != EET_TEST_INT + i);
2511} /* _eet_st3_cmp */
2512
2513START_TEST(eet_test_union)
2514{
2515 Eet_Union_Test *eut;
2516 Eet_List *l;
2517 Eet_Data_Descriptor_Class eddc;
2518 Eet_Data_Descriptor *edd;
2519 Eet_Data_Descriptor *unified;
2520 Eet_Data_Descriptor *m;
2521 void *blob;
2522 int size;
2523 int i;
2524
2525 eina_init();
2526 eet_init();
2527
2528 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_Union_Test);
2529 edd = eet_data_descriptor_stream_new(&eddc);
2530
2531 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_Union_Test);
2532 m = eet_data_descriptor_stream_new(&eddc);
2533
2534 eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
2535 eddc.func.type_get = _eet_union_type_get;
2536 eddc.func.type_set = _eet_union_type_set;
2537 unified = eet_data_descriptor_stream_new(&eddc);
2538
2539 EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "ST1", _eet_st1_dd());
2540 EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "ST2", _eet_st2_dd());
2541 EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "ST3", _eet_st3_dd());
2542
2543 EET_DATA_DESCRIPTOR_ADD_UNION(edd, Eet_Union_Test, "u", u, type, unified);
2544
2545 EET_DATA_DESCRIPTOR_ADD_LIST(m, Eet_List, "list", list, edd);
2546
2547 l = calloc(1, sizeof (Eet_List));
2548
2549#define EUT_NEW(Type_Index) \
2550 eut = calloc(1, sizeof (Eet_Union_Test)); \
2551 eut->type = EET_ST ## Type_Index; \
2552 _eet_st ## Type_Index ## _set(&(eut->u.st ## Type_Index), i);
2553
2554 for (i = 0; i < 3; ++i)
2555 {
2556 EUT_NEW(1);
2557 l->list = eina_list_append(l->list, eut);
2558
2559 EUT_NEW(2);
2560 l->list = eina_list_append(l->list, eut);
2561
2562 EUT_NEW(3);
2563 l->list = eina_list_append(l->list, eut);
2564 }
2565
2566 blob = eet_data_descriptor_encode(m, l, &size);
2567 fail_if(!blob || size <= 0);
2568
2569 l = eet_data_descriptor_decode(m, blob, size);
2570 fail_if(!l);
2571
2572 fail_if(eina_list_count(l->list) != 9);
2573
2574#define EUT_CMP(Type_Index) \
2575 eut = eina_list_nth(l->list, i * 3 + Type_Index - 1); \
2576 fail_if(eut->type != EET_ST ## Type_Index); \
2577 _eet_st ## Type_Index ## _cmp(&(eut->u.st ## Type_Index), i);
2578
2579 for (i = 0; i < 3; ++i)
2580 {
2581 EUT_CMP(1);
2582 EUT_CMP(2);
2583 EUT_CMP(3);
2584 }
2585
2586 eet_shutdown();
2587 eina_shutdown();
2588}
2589END_TEST
2590START_TEST(eet_test_variant)
2591{
2592 Eet_Variant_Test *evt;
2593 Eet_List *l;
2594 Eet_St1 *st1;
2595 Eet_St2 *st2;
2596 Eet_St3 *st3;
2597 Eet_Data_Descriptor_Class eddc;
2598 Eet_Data_Descriptor *edd;
2599 Eet_Data_Descriptor *unified;
2600 Eet_Data_Descriptor *m;
2601 void *blob;
2602 int size;
2603 int i;
2604
2605 eina_init();
2606 eet_init();
2607
2608 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_Variant_Test);
2609 edd = eet_data_descriptor_stream_new(&eddc);
2610
2611 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Eet_Variant_Test);
2612 m = eet_data_descriptor_stream_new(&eddc);
2613
2614 eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
2615 eddc.func.type_get = _eet_variant_type_get;
2616 eddc.func.type_set = _eet_variant_type_set;
2617 unified = eet_data_descriptor_stream_new(&eddc);
2618
2619 EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "ST1", _eet_st1_dd());
2620 EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "ST2", _eet_st2_dd());
2621 EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "ST3", _eet_st3_dd());
2622
2623 EET_DATA_DESCRIPTOR_ADD_VARIANT(edd,
2624 Eet_Variant_Test,
2625 "data",
2626 data,
2627 t,
2628 unified);
2629
2630 unified = eet_data_descriptor_stream_new(&eddc);
2631 eet_data_descriptor_element_add(unified, "ST1",
2632 EET_T_UNKNOW, EET_G_LIST,
2633 0, 0, NULL, _eet_st1_dd());
2634 eet_data_descriptor_element_add(unified, "ST2",
2635 EET_T_UNKNOW, EET_G_LIST,
2636 0, 0, NULL, _eet_st2_dd());
2637
2638 EET_DATA_DESCRIPTOR_ADD_VARIANT(edd, Eet_Variant_Test,
2639 "data_list", data_list, t, unified);
2640
2641 EET_DATA_DESCRIPTOR_ADD_LIST(m, Eet_List, "list", list, edd);
2642
2643 l = calloc(1, sizeof (Eet_List));
2644
2645#define EVT_NEW(Type_Index) \
2646 evt = calloc(1, sizeof (Eet_Variant_Test)); \
2647 evt->t.type = eet_mapping[Type_Index - 1].name; \
2648 st ## Type_Index = calloc(1, sizeof (Eet_St ## Type_Index)); \
2649 _eet_st ## Type_Index ## _set(st ## Type_Index, i); \
2650 evt->data = st ## Type_Index;
2651
2652 for (i = 0; i < 3; ++i)
2653 {
2654 EVT_NEW(1);
2655 l->list = eina_list_append(l->list, evt);
2656
2657 st1 = calloc(1, sizeof (Eet_St1));
2658 _eet_st1_set(st1, i);
2659 evt->data_list = eina_list_append(evt->data_list, st1);
2660
2661 EVT_NEW(2);
2662 l->list = eina_list_append(l->list, evt);
2663
2664 EVT_NEW(3);
2665 l->list = eina_list_append(l->list, evt);
2666 }
2667
2668 blob = eet_data_descriptor_encode(m, l, &size);
2669 fail_if(!blob || size <= 0);
2670
2671 l = eet_data_descriptor_decode(m, blob, size);
2672 fail_if(!l);
2673
2674 fail_if(eina_list_count(l->list) != 9);
2675
2676#define EVT_CMP(Type_Index) \
2677 evt = eina_list_nth(l->list, i * 3 + Type_Index - 1); \
2678 fail_if(strcmp(evt->t.type, eet_mapping[Type_Index - 1].name) != 0); \
2679 _eet_st ## Type_Index ## _cmp(evt->data, i);
2680
2681 for (i = 0; i < 3; ++i)
2682 {
2683 EVT_CMP(1);
2684
2685 fail_if(!evt->data_list);
2686 fail_if(eina_list_count(evt->data_list) != 1);
2687
2688 st1 = eina_list_data_get(evt->data_list);
2689 _eet_st1_cmp(st1, i);
2690
2691 EVT_CMP(2);
2692 EVT_CMP(3);
2693 }
2694
2695 eet_shutdown();
2696 eina_shutdown();
2697} /* START_TEST */
2698
2699END_TEST
2700
2701Suite *
2702eet_suite(void)
2703{
2704 Suite *s;
2705 TCase *tc;
2706
2707 s = suite_create("Eet");
2708
2709 tc = tcase_create("Eet_Init");
2710 tcase_add_test(tc, eet_test_init);
2711 suite_add_tcase(s, tc);
2712
2713 tc = tcase_create("Eet Data Encoding/Decoding");
2714 tcase_add_test(tc, eet_test_basic_data_type_encoding_decoding);
2715 tcase_add_test(tc, eet_test_data_type_encoding_decoding);
2716 tcase_add_test(tc, eet_test_data_type_dump_undump);
2717 tcase_add_test(tc, eet_fp);
2718 tcase_add_test(tc, eet_test_union);
2719 tcase_add_test(tc, eet_test_variant);
2720 suite_add_tcase(s, tc);
2721
2722 tc = tcase_create("Eet File");
2723 tcase_add_test(tc, eet_file_simple_write);
2724 tcase_add_test(tc, eet_file_data_test);
2725 tcase_add_test(tc, eet_file_data_dump_test);
2726 tcase_add_test(tc, eet_file_fp);
2727 suite_add_tcase(s, tc);
2728
2729 tc = tcase_create("Eet Image");
2730 tcase_add_test(tc, eet_image);
2731 tcase_add_test(tc, eet_small_image);
2732 suite_add_tcase(s, tc);
2733
2734#ifdef HAVE_SIGNATURE
2735 tc = tcase_create("Eet Identity");
2736 tcase_add_test(tc, eet_identity_simple);
2737 tcase_add_test(tc, eet_identity_open_simple);
2738 tcase_add_test(tc, eet_identity_open_pkcs8);
2739 tcase_add_test(tc, eet_identity_open_pkcs8_enc);
2740 suite_add_tcase(s, tc);
2741#endif /* ifdef HAVE_SIGNATURE */
2742
2743#ifdef HAVE_CIPHER
2744 tc = tcase_create("Eet Cipher");
2745 tcase_add_test(tc, eet_cipher_decipher_simple);
2746 suite_add_tcase(s, tc);
2747#endif /* ifdef HAVE_CIPHER */
2748
2749#ifdef EINA_HAVE_THREADS
2750 tc = tcase_create("Eet Cache");
2751 tcase_add_test(tc, eet_cache_concurrency);
2752 suite_add_tcase(s, tc);
2753#endif /* ifdef EFL_HAVE_THREADS */
2754
2755 tc = tcase_create("Eet Connection");
2756 tcase_add_test(tc, eet_connection_check);
2757 suite_add_tcase(s, tc);
2758
2759 return s;
2760} /* eet_suite */
2761
2762int
2763main(void)
2764{
2765 Suite *s;
2766 SRunner *sr;
2767 int failed_count;
2768
2769 s = eet_suite();
2770 sr = srunner_create(s);
2771 srunner_run_all(sr, CK_ENV);
2772 failed_count = srunner_ntests_failed(sr);
2773 srunner_free(sr);
2774
2775 return (failed_count == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
2776} /* main */
2777
diff --git a/libraries/eet/src/tests/eet_suite.h b/libraries/eet/src/tests/eet_suite.h
new file mode 100644
index 0000000..c5c91aa
--- /dev/null
+++ b/libraries/eet/src/tests/eet_suite.h
@@ -0,0 +1,9 @@
1#ifndef _EET_SUITE_H
2# define _EET_SUITE_H
3
4#include "Eet.h"
5
6void
7eet_test_setup_eddc(Eet_Data_Descriptor_Class *eddc);
8
9#endif /* _EET_SUITE_H */
diff --git a/libraries/eet/src/tests/key.pem b/libraries/eet/src/tests/key.pem
new file mode 100644
index 0000000..74763ca
--- /dev/null
+++ b/libraries/eet/src/tests/key.pem
@@ -0,0 +1,15 @@
1-----BEGIN RSA PRIVATE KEY-----
2MIICXAIBAAKBgQDIhOPOnkTinjxtP+t/Q+F00w0fV0kVqdcamc6uz/o41kRW2fzF
3lSFc5HODEZvN1DqJWz4++i4zNdHLHmlQISuxvQh6dnbq+GpVr3Qlzx+UPizzhUvY
4DMdCc/RGXhxzh2Si8iXSkpqLfs5bsCUy3tPNUUVMMzSnLeia1VRv+0piEwIDAQAB
5AoGAfLLHyNJ8HEIzae16UmawaqplWrw5YxOABbbo5aXJAledoDVoEKexW8dmXngw
64Eu/K3RmvVtwJ8CsexiqfX5jYMU+YKRbww6Vqr/punIUhiEHVarHMFKG9yo14qSa
7z2xPgXvC5p7/Rhci+rAUp36S5kIHch5sLhEEcJayymyzDyECQQD/5B3JdpcovrSI
8+nyZ8Iub2+I3f3uox6m1DKxHead26ICoIr7VCnPV5J1gLIB2MofVCbKhmy4PNi5a
90QdvazJfAkEAyJq9Y+9SQ4sCOVDrFklJxhXuZE4WbnR32XsBdnQ9dauo0E2vDVkv
106mHnzMWroTjLv4hH5nufE5NvMo8PNGB0zQJAFOKkf737JmsyRv/Szamxa14t/4Ob
11LzJkqo9HPGo0feMKJS74zmCVBb8sDR50ubD0HzI0bzZAMyOj8uuepLxmFwJAH+RR
125bhfeLN52AjgRvvBycckzjeH42mKwD2I/v794l43CV7ATLv4HSgRhQGMBqaT5dBR
13tffDU4Zl8EDEJwyKpQJBAJ2NNacURTyavU699QJOIdGAsA4KXici8H3PuuWMtHLR
14RKdPFeaCRn+9p7Tglf0rH9hUGOpUXHYD3+ECt6gnVDc=
15-----END RSA PRIVATE KEY-----
diff --git a/libraries/eet/src/tests/key_enc.pem b/libraries/eet/src/tests/key_enc.pem
new file mode 100644
index 0000000..83c1ba2
--- /dev/null
+++ b/libraries/eet/src/tests/key_enc.pem
@@ -0,0 +1,17 @@
1-----BEGIN ENCRYPTED PRIVATE KEY-----
2MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQILLqDZE1i0Y8CAggA
3MBQGCCqGSIb3DQMHBAjwbnSdTCCDOASCAoB0rMuSIXrzqFQnCexMkC9A5jyd+HvC
42UV6EWIfFU4yBvp+2dfHg6RKUoZ0wGk8FxAkaAj+boVwf16PPXXQ70AQBb0iGeb4
5YLdjDF2zSoIK3SbsWrhAfJhSMbcMftEZnLTYxLSkTv5R8jb0IPybVNTqFf+KmGav
6DwyRVQrdAxIYdJSPwd61Fhs1VqzptmQ8DLKHy35X1fIro3py4jncBhsuqf6H3yj1
7ZFuzCPnwB8unASgbTPD43yObrjyWTjbTtp59WavVdnNS+m7QNW+OfxznHUUJXtMz
8/EniglUhR1Uf75wpMpQIPfC77Cary0Y4iLGQZiF1C0WjQzMBufckJFJVRFGfkkMl
9ijlaijLUYMqENJ6wsyK5lihsoBCzIDoqI375s9pdeln8sd33Yu+L/Gu4Xo8Bh5cM
106mlo9WUgw5KibmlZHGEAGdKxcvL0ywswuwQ6yhwcdvCAt6MfrWJNpksa9JmpXJi8
11c21lHwnoyG1DgSqY5VhRyitfnuY3Jegj+7njhooiAJM9w7fxpafN9oxiaJBvPFqd
12lfJ42Pj5rkjjVqXOJX7Cf7sF85tW7ygwdGWyXvHn2fhQ+vjaDtZalry//Xytet4r
13lvTerO6M6WVMk2yM7vdeBU7c74LVIJmwGR6d837OPax1V+Z9yq6zDuJAQ3l9mtmu
14gowV3xInTFRsnSOQcYW5y8dNnugR9FBh8f1NI7SPyW0reeVbPXXhRxg+TyogIXhh
15yAfWJ6dDLZ31EVCdqRKxK7b9u2r3dsuaiwT1jFg59Eu2AifFi0j7aDA1lGIKoj3C
16cPDwJd8weC+UoWpWX/O4KOpaU62Rwt5wRoOxELG6lHy7cOjZgLmwjg1G
17-----END ENCRYPTED PRIVATE KEY-----
diff --git a/libraries/eet/src/tests/key_enc_none.pem b/libraries/eet/src/tests/key_enc_none.pem
new file mode 100644
index 0000000..1163851
--- /dev/null
+++ b/libraries/eet/src/tests/key_enc_none.pem
@@ -0,0 +1,16 @@
1-----BEGIN PRIVATE KEY-----
2MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMiE486eROKePG0/
3639D4XTTDR9XSRWp1xqZzq7P+jjWRFbZ/MWVIVzkc4MRm83UOolbPj76LjM10cse
4aVAhK7G9CHp2dur4alWvdCXPH5Q+LPOFS9gMx0Jz9EZeHHOHZKLyJdKSmot+zluw
5JTLe081RRUwzNKct6JrVVG/7SmITAgMBAAECgYB8ssfI0nwcQjNp7XpSZrBqqmVa
6vDljE4AFtujlpckCV52gNWgQp7Fbx2ZeeDDgS78rdGa9W3AnwKx7GKp9fmNgxT5g
7pFvDDpWqv+m6chSGIQdVqscwUob3KjXipJrPbE+Be8Lmnv9GFyL6sBSnfpLmQgdy
8HmwuEQRwlrLKbLMPIQJBAP/kHcl2lyi+tIj6fJnwi5vb4jd/e6jHqbUMrEd5p3bo
9gKgivtUKc9XknWAsgHYyh9UJsqGbLg82LlrRB29rMl8CQQDImr1j71JDiwI5UOsW
10SUnGFe5kThZudHfZewF2dD11q6jQTa8NWS/qYefMxauhOMu/iEfme58Tk28yjw80
11YHTNAkAU4qR/vfsmazJG/9LNqbFrXi3/g5svMmSqj0c8ajR94wolLvjOYJUFvywN
12HnS5sPQfMjRvNkAzI6Py656kvGYXAkAf5FHluF94s3nYCOBG+8HJxyTON4fjaYrA
13PYj+/v3iXjcJXsBMu/gdKBGFAYwGppPl0FG198NThmXwQMQnDIqlAkEAnY01pxRF
14PJq9Tr31Ak4h0YCwDgpeJyLwfc+65Yy0ctFEp08V5oJGf72ntOCV/Ssf2FQY6lRc
15dgPf4QK3qCdUNw==
16-----END PRIVATE KEY-----